Jump to content

Official Move Channel


Recommended Posts

  • Premium

https://metin2.download/picture/qjiv7nO20Yb9Uuy8yTU68bZhJVYIInex/.png

Anyone can help me with this when i switch the CH 1 > CH2  below minimap " Servername CH-1 " not change to CH2 but am in CH2

Edited by Metin2 Dev
Core X - External 2 Internal

" Don`t pretend things change if you always do the same thing"

"Don`t give up on a dream for how long it will take, time will pass the same"

Link to comment
Share on other sites

  • 3 months later...
  • 4 weeks later...
  • Active Member
On 5/27/2022 at 6:34 PM, karona200 said:

Hice todos los pasos, no syserr ni error de compilación, lo único es que no hace nada... no cambia ch, ni siquiera la información en el chat dada

Check this function: 

Quote

#ifdef MOVE_CHANNEL
    p.lAddr    = lCustomAddr ? lCustomAddr : lAddr;
    p.wPort    = wCustomPort ? wCustomPort : wPort;
#else
    p.lAddr    = lAddr;
    p.wPort    = wPort;
#endif

maybe you don't add this function is the function for change ch

Thanks @ Mali for your time and your systems, work great :).

https://metin2.download/picture/H6o0yeCSOXr1YW261V7UTP9Rf6kJG3h0/.gif

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • 3 weeks later...

0223 11:18:02172 :: Traceback (most recent call last):

0223 11:18:02172 ::   File "ui.py", line 1047, in CallEvent

0223 11:18:02172 ::   File "ui.py", line 88, in __call__

0223 11:18:02172 ::   File "ui.py", line 70, in __call__

0223 11:18:02172 ::   File "introLogin.py", line 1284, in __OnClickSelectServerButton

0223 11:18:02173 :: KeyError
0223 11:18:02173 :: : 
0223 11:18:02173 :: 4
0223 11:18:02173 :: 

I add code correctly and this comes in syserr.
Am fight with it from 3days.

Can someone help me?

Link to comment
Share on other sites

  • Active Member
7 hours ago, Hanma said:

0223 11:18:02172 :: Traceback (most recent call last):

0223 11:18:02172 ::   File "ui.py", line 1047, in CallEvent

0223 11:18:02172 ::   File "ui.py", line 88, in __call__

0223 11:18:02172 ::   File "ui.py", line 70, in __call__

0223 11:18:02172 ::   File "introLogin.py", line 1284, in __OnClickSelectServerButton

0223 11:18:02173 :: KeyError
0223 11:18:02173 :: : 
0223 11:18:02173 :: 4
0223 11:18:02173 :: 

I add code correctly and this comes in syserr.
Am fight with it from 3days.

Can someone help me?

you have this in IntroLogin?:

Quote

        self.serverSelectButton.SetEvent(ui.__mem_func__(self.__OnClickSelectServerButton))

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Active Member
On 2/23/2023 at 6:49 PM, Hanma said:

yup

here is my intrologin.py

https://pastebin.com/raw/dPq1cqvM

mm i don't know the problem sorry, for my work great,  obviusly the problem is in python and you add in wrong site, try again 😞 when i have time i cand send you my .py but maybe i can the next week so try again 😕

  • Metin2 Dev 1

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

I'm getting this error:

0501 05:51:10824 :: Traceback (most recent call last): 0501 05:51:10824 :: File "ui.py", line 1051, in CallEvent

0501 05:51:10824 :: File "ui.py", line 88, in call

0501 05:51:10824 :: File "ui.py", line 70, in call

0501 05:51:10824 :: File "introLogin.py", line 1541, in __OnClickSelectServerButton

0501 05:51:10824 :: KeyError

0501 05:51:10824 :: :

0501 05:51:10824 :: 4

0501 05:51:10824 ::

 

Someone has this fix? Please help.

Link to comment
Share on other sites

  • 7 months later...
On 4/17/2023 at 8:49 AM, LethalStrikeR said:

I'm getting this error:

0501 05:51:10824 :: Traceback (most recent call last): 0501 05:51:10824 :: File "ui.py", line 1051, in CallEvent

0501 05:51:10824 :: File "ui.py", line 88, in call

0501 05:51:10824 :: File "ui.py", line 70, in call

0501 05:51:10824 :: File "introLogin.py", line 1541, in __OnClickSelectServerButton

0501 05:51:10824 :: KeyError

0501 05:51:10824 :: :

0501 05:51:10824 :: 4

0501 05:51:10824 ::

 

Someone has this fix? Please help.

You added python side wrong. Be more careful while adding the python side. Indentation and position matters. 

Link to comment
Share on other sites

  • 3 weeks later...

Good afternoon / night...

I implemented the system and I have the same python error, I tried the same user's correction, but it didn't work for me...

Error in question:

1229 13:50:28709 :: Traceback (most recent call last):
1229 13:50:28709 ::   File "ui.py", line 1512, in CallEvent
1229 13:50:28709 ::   File "ui.py", line 88, in _call_
1229 13:50:28709 ::   File "ui.py", line 70, in _call_
1229 13:50:28709 ::   File "uiSystem.py", line 194, in __ClickMoveChannelButton
1229 13:50:28709 ::   File "uiSystem.py", line 271, in Show
1229 13:50:28710 ::   File "uiSystem.py", line 256, in __SelectChannel

1229 13:50:28710 :: IndexError
1229 13:50:28710 :: : 
1229 13:50:28710 :: list index out of range
1229 13:50:28710 ::

I thank you for your help

 

Edited by Marcos17
Link to comment
Share on other sites

  • 1 month later...
On 12/29/2021 at 3:16 PM, EAkar said:
if app.BL_MOVE_CHANNEL:
	class MoveChannelDialog(ui.ScriptWindow):
		def __init__(self):
			ui.ScriptWindow.__init__(self)
			self.__LoadDialog()
			
			self.IsShow = False
			
		def __del__(self):
			ui.ScriptWindow.__del__(self)
			
		def __LoadDialog(self) :	
			try:
				pyScrLoader = ui.PythonScriptLoader()
				pyScrLoader.LoadScriptFile(self, "UIScript/MoveChannelDialog.py")
			except:
				import exception
				exception.Abort("MoveChannelDialog.__LoadDialog")
			

			self.ParentBoard = self.GetChild("MoveChannelBoard")
			self.ChildBoard = self.GetChild("BlackBoard")
			self.GetChild("MoveChannelTitle").SetCloseEvent(ui.__mem_func__(self.Close))
			
			self.ChannelList = []
			cnt = 5
			cnt = cnt - 1 # 99서버 제외
			
			self.DlgWidht = 190
			self.BlackBoardHeight = 23*cnt + 5*(cnt-1) + 13
			self.DlgHeight = self.BlackBoardHeight + 75
			
			self.AcceptBtn = ui.MakeButton(self.ParentBoard, 13, self.DlgHeight - 33, "", "d:/ymir work/ui/public/", "middle_button_01.sub", "middle_button_02.sub", "middle_button_03.sub")
			self.AcceptBtn.SetText( localeInfo.MOVE_CHANNEL_SELECT )
			self.AcceptBtn.SetEvent(ui.__mem_func__(self.AcceptButton))
			self.CloseBtn = ui.MakeButton(self.ParentBoard, self.DlgWidht - 73, self.DlgHeight - 33, "", "d:/ymir work/ui/public/", "middle_button_01.sub", "middle_button_02.sub", "middle_button_03.sub")
			self.CloseBtn.SetText( localeInfo.MOVE_CHANNEL_CANCEL )
			self.CloseBtn.SetEvent(ui.__mem_func__(self.Close))

			for i in xrange(cnt):
				btn = ui.MakeButton(self.ChildBoard, 8, 6 + i*28, "", "d:/ymir work/ui/game/myshop_deco/", "select_btn_01.sub", "select_btn_02.sub", "select_btn_03.sub")
				btn.SetText("Kanal {0}".format(int(i+1)))
				btn.SetEvent(ui.__mem_func__(self.__SelectChannel), i+1)
				self.ChannelList.append(btn)
			
			self.ParentBoard.SetSize(self.DlgWidht, self.DlgHeight)
			self.ChildBoard.SetSize(self.DlgWidht - 26, self.BlackBoardHeight)
			self.SetSize(self.DlgWidht, self.DlgHeight)
			
			self.UpdateRect()
			
		def __SelectChannel(self, idx):
			self.ChangeChannelNumber = idx
			
			for btn in self.ChannelList:
				btn.SetUp()
				btn.Enable()
				
			self.ChannelList[idx-1].Down()
			self.ChannelList[idx-1].Disable()
			
		def AcceptButton(self):
			if self.ChangeChannelNumber == self.StartChannelNumber:
				return
			
			net.MoveChannelGame(self.ChangeChannelNumber)
			self.StartChannelNumber = self.ChangeChannelNumber
			self.Close()
						
		def Show(self) :
			ui.ScriptWindow.Show(self)
			
			self.StartChannelNumber = net.GetChannelNumber()
			self.__SelectChannel(self.StartChannelNumber)
			
			self.IsShow = True
		
		def Close(self):
			self.Hide()
			
			self.IsShow = False
			
		def OnPressEscapeKey(self):
			self.Close()
			return True
			
		def IsShowWindow(self):
			return self.IsShow

İnterFaceModule.py

    if app.BL_MOVE_CHANNEL:
        def RefreshServerInfo(self, channelNumber):
            if self.wndMiniMap:
                self.wndMiniMap.RefreshServerInfo(channelNumber)

Game.py

    if app.BL_MOVE_CHANNEL:
        def __SeverInfo(self, channelNumber, mapIndex):
            #print "__SeverInfo %s %s" % (channelNumber, mapIndex)
            
            _chNum    = int(channelNumber.strip())
            _mapIdx    = int(mapIndex.strip())
            
            if _chNum == 99:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_GAME_99)
            elif _mapIdx >= 10000:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE_DUNGEON)
            else:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_CHANNEL_NOTICE % _chNum)
                
            net.SetChannelName(_chNum)
            net.SetMapIndex(_mapIdx)
            self.interface.RefreshServerInfo(channelNumber)

Following your help, now I have the following error:

0216 21:10:26587 :: Traceback (most recent call last):
0216 21:10:26588 ::   File "game.py", line 2007, in BINARY_ServerCommand_Run
0216 21:10:26588 ::   File "stringCommander.py", line 63, in Run
0216 21:10:26588 ::   File "stringCommander.py", line 31, in __call__
0216 21:10:26588 ::   File "stringCommander.py", line 20, in __call__
0216 21:10:26588 ::   File "game.py", line 2432, in __SeverInfo
0216 21:10:26588 ::   File "interfaceModule.py", line 2550, in RefreshServerInfo
0216 21:10:26588 ::   File "uiMiniMap.py", line 566, in RefreshServerInfo
0216 21:10:26588 :: AttributeError
0216 21:10:26588 :: : 
0216 21:10:26588 :: 'module' object has no attribute 'SERVER_1'
0216 21:10:26588 :: 
0216 21:10:26588 :: Unknown Server Command server_info 1 21 | server_info

Can you help, thanks in advance

Link to comment
Share on other sites

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.