Jump to content
metin2dev
Micha aka xCPx

[RLS] Ingame Channel Switcher like WOM2

Recommended Posts

2 minutes ago, asterix2 said:

syserr?

1122 22:50:20184 :: Traceback (most recent call last):

1122 22:50:20184 ::   File "game.py", line 1253, in OnKeyDown

1122 22:50:20184 ::   File "game.py", line 354, in <lambda>

1122 22:50:20184 ::   File "game.py", line 2269, in __switch_channel

1122 22:50:20184 ::   File "uiChannel.py", line 18, in __init__

1122 22:50:20184 ::   File "uiChannel.py", line 125, in __Fill_Up_ChannelList

1122 22:50:20184 ::   File "uiChannel.py", line 131, in __RequestServerStateList

1122 22:50:20184 ::   File "uiChannel.py", line 122, in __GetServerID

1122 22:50:20184 :: UnboundLocalError
1122 22:50:20184 :: : 
1122 22:50:20184 :: local variable 'serverID' referenced before assignment
1122 22:50:20184 :: 

Share this post


Link to post
Share on other sites
9 minutes ago, vladbos35 said:

1122 22:50:20184 :: Traceback (most recent call last):

1122 22:50:20184 ::   File "game.py", line 1253, in OnKeyDown

1122 22:50:20184 ::   File "game.py", line 354, in <lambda>

1122 22:50:20184 ::   File "game.py", line 2269, in __switch_channel

1122 22:50:20184 ::   File "uiChannel.py", line 18, in __init__

1122 22:50:20184 ::   File "uiChannel.py", line 125, in __Fill_Up_ChannelList

1122 22:50:20184 ::   File "uiChannel.py", line 131, in __RequestServerStateList

1122 22:50:20184 ::   File "uiChannel.py", line 122, in __GetServerID

1122 22:50:20184 :: UnboundLocalError
1122 22:50:20184 :: : 
1122 22:50:20184 :: local variable 'serverID' referenced before assignment
1122 22:50:20184 :: 

Okay. Taskbar button.

root.eix/epk --> constinfo.py

Add:  switchbutton = 0

locale_hu.eix/epk --> taskbar.py

add:

##SwitchButton
{
"name" : "SwitchButton",
"type" : "button",

"x" : 114, # írd át
"y" : 90, # írd át

"tooltip_text" : "Csatorna választó ",

"default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
"over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
"down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",
},


root.eix/epk --> uitaskbar.py

Search: toggleButtonDict = {}

Add under:
toggleButtonDict[TaskBar.BUTTON_SWITCH]=self.GetChild("SwitchButton")

Search:
 class TaskBar(ui.ScriptWindow):

Under: BUTTON_SWITCH = 5

root.eix/epk --> interfacemodule.py

Search:  self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_SYSTEM, ui.__mem_func__(self.ToggleSystemDialog))

Add under:
self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_SWITCH, ui.__mem_func__(self.ToggleSwitch))

File end write:

def ToggleSwitch(self):
import uiChannel
if constInfo.switchbutton == 0:
constInfo.switchbutton = 1
a = uiChannel.ChannelChanger()
a.Show()
elif constInfo.switchbutton == 1:
constInfo.switchbutton = 0
a = uiChannel.ChannelChanger()
a.Hide()

uichannel.py put your root.

Sorry my english.

Server port:

ch1: 13002
ch2: 13102
ch3: 13202
ch4: 13302

#Python code make: pisti95

Share this post


Link to post
Share on other sites
On 4.7.2015 at 0:59 PM, alin2894 said:

I not really understand phase ports, so I port 50000 two core, why should I change?

 


		    for(int i = 0; i < 4; i++){ //replace with maximum channels -1   actual 1300x - 1330x
		        for(int i2 = 2; i2 < 9; i2++){ //replace with your core values actual  13x02 - 13x08
		            micha[13*1000 + i*100 + i2] = i+1;

in


		    for(int i = 0; i < 4; i++){ //replace with maximum channels -1   actual 1300x - 1330x
		        for(int i2 = 2; i2 < 9; i2++){ //replace with your core values actual  13x02 - 13x08
		            micha[50*1000 + i*100 + i2] = i+1;

right?

What Ports u need?

 

 

Share this post


Link to post
Share on other sites

Hi, i have problem with

Spoiler

elif net.GetServerInfo().strip().split(", ")[1] == self.ChannelList.textDict[self.ChannelList.selectedLine].strip().split(" ")[0]:
            chat.AppendChat(1, "Du bist bereits im ausgewaehlten Channel!")

for me not work on same CH. Can anyone help?

Share this post


Link to post
Share on other sites

i dont understand reglage of port and number, i use 6 ch and the port

ch1 core 1 : 23000

ch1 core 2 : 23005

ch2 core 1 : 23001

ch2 core 2 : 23006

ect ect

Share this post


Link to post
Share on other sites
39 minutes ago, Legor said:

Hello,

it's possible to add delay of 3-10 seconds like logout, with countdown?

Thanks

you can do this with TimedEventInfo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×