Jump to content

Ingame Channel Switcher System


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 :: 

Link to comment
Share on other sites

  • Bronze
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

Link to comment
Share on other sites

  • 2 months later...
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?

 

 

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • 2 weeks later...
  • 4 weeks later...
  • 1 year later...
  • 6 months later...
  • 2 years later...
  • 2 years later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.