Micha aka xCPx 336 Posted July 4, 2015 Author Share Posted July 4, 2015 Depending on exact values Also.you forgotten the calculation below Link to comment Share on other sites More sharing options...
alin2894 14 Posted July 5, 2015 Share Posted July 5, 2015 (edited) thx for the system i didnt test it or add italso iam not c++ progream but your code it seem to be ugly good luck Really? I can't find anything ugly about this. Actually the c++ part is very nice. I didn't check on python. And why are you wishing him good luck at his own release? ._. Sometimes I don't understand people...^^ Anyway, the idea behind that is great and I like the c++ part a lot. Oh, and a german sentence slipped through I know that it isn't the best c++ Code, but I really.love using maps ^^ Py part is 1:1 from wom:o And yeah the German sentence comes through sorry for that ^^ Mobile phone and yeah i dont know how to tell u why he is ugly also iam arabic from libya not germany alina wasn't talking to you when he/she wrote this ---> "and a german sentence slipped through " he/she was talking to the topic maker and for the python part : go to uisystem.py in root and search for this tow times self.GetChild("help_button").SAFE_SetEvent(self.__ClickHelpButton) and under it write this self.GetChild("Change_Channel").SAFE_SetEvent(self.__ClickChangeChButton) and after this def __ClickInGameShopButton(self): self.Close() net.SendChatPacket("/in_game_mall") write this Hidden Content 3: change systemdialog.py in uiscript with this Hidden Content and finally go to constnfo.py in root and write this channel = 0 and the python part is over <3 Forgot your post channel for uiscript . For press for change and not anything going on. Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted July 5, 2015 Former Staff Share Posted July 5, 2015 i wrote it now XD Link to comment Share on other sites More sharing options...
Migxelito 10 Posted July 8, 2015 Share Posted July 8, 2015 Thanks! Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted July 8, 2015 Former Staff Share Posted July 8, 2015 You know that the system as released here works perfectly or? But you need correct entries in the serverinfo and also the right ports Also the map checks is serverside If Ch99 isn't set to the map then you function allways returns if player is in ch99 The clientside part I just took from wom2 because was too lazy go create own guy i'm not saying that the system doesn't work i just can't open tow channels at the same time to test it (i don't know why -still investing.)... plus about the map check the server never check where is he going (to which map) just checks if the map index found or not .... to be more specific i'm talking about those maps dis_maps = [ "season1/metin2_map_oxevent", "season2/metin2_map_guild_inside01", "season2/metin2_map_empirewar01", "season2/metin2_map_empirewar02", "season2/metin2_map_empirewar03", "metin2_map_dragon_timeattack_01", "metin2_map_dragon_timeattack_02", "metin2_map_dragon_timeattack_03", "metin2_map_skipia_dungeon_boss", "metin2_map_skipia_dungeon_boss2", "metin2_map_devilsCatacomb", "metin2_map_deviltower1", "metin2_map_t1", "metin2_map_t2", "metin2_map_t3", "metin2_map_t4", "metin2_map_t5", "metin2_map_wedding_01", "metin2_map_duel", "metin2_map_orclabyrinth", "metin2_map_n_flame_dungeon_01", "metin2_map_n_snow_dungeon_01" ] you can open the index file from map folder in the server and take the indexes of these maps and check them in the c++ code ... (server side) Link to comment Share on other sites More sharing options...
Micha aka xCPx 336 Posted July 12, 2015 Author Share Posted July 12, 2015 All maps you are showing are on ch99. So basically it checks clientside if it is on ch99. If you don't add ch99 to the index in the mapping it doesn't find it and the function isn't run. So basically it allready checks it. Also if an port isn't added to the mapping then teleport won't work if you are on this ch Link to comment Share on other sites More sharing options...
Quentis. 0 Posted July 12, 2015 Share Posted July 12, 2015 Well done, everything works Link to comment Share on other sites More sharing options...
Ken 904 Posted July 12, 2015 Share Posted July 12, 2015 (edited) void CHARACTER::ChannelSwitch(int iNewChannel) { long lAddr, lMapIndex; WORD wPort; long x = GetX(); long y = GetY(); if (!CMapLocation::Instance().Get(x, y, lMapIndex, lAddr, wPort)) { sys_err("Can not find map location index[%ld] x[%ld] y[%ld] name[%s]", lMapIndex, x, y, GetName()); return; } if (lMapIndex >= 10000) return; std::map<WORD, BYTE> ChannelsPorts; for (BYTE i = 0; i < 4; i++) { for (BYTE j = 2; j < 9; j++) ChannelsPorts[13 * 1000 + (i * 100) + j] = i + 1; } int iChannel = ChannelsPorts.find(wPort) != ChannelsPorts.end() ? ChannelsPorts[wPort] : 0; if (iChannel == 0) { sys_err("This port is not available! (%d)", wPort); return; } Stop(); Save(); if (GetSectree()) { GetSectree()->RemoveEntity(this); ViewCleanUp(); EncodeRemovePacket(this); } TPacketGCWarp p; p.bHeader = HEADER_GC_WARP; p.lX = x; p.lY = y; p.lAddr = lAddr; p.wPort = (wPort - 100 * (iChannel - 1) + 100 * (iNewChannel - 1)); GetDesc()->Packet(&p, sizeof(TPacketGCWarp)); } Kind Regards Ken Edited July 12, 2015 by Ken 1 Do not be sorry, be better. Link to comment Share on other sites More sharing options...
miguelmig 13 Posted July 12, 2015 Share Posted July 12, 2015 The hard code is real 1 Link to comment Share on other sites More sharing options...
thespeedy 20 Posted August 21, 2015 Share Posted August 21, 2015 @flygun i have this error 0822 00:11:39668 :: File "networkModule.py", line 239, in SetGamePhase 0822 00:11:39668 :: File "game.py", line 111, in __init__ 0822 00:11:39668 :: File "interfaceModule.py", line 294, in MakeInterface 0822 00:11:39668 :: File "interfaceModule.py", line 229, in __MakeDialogs 0822 00:11:39668 :: File "uiSystem.py", line 33, in LoadDialog 0822 00:11:39669 :: File "uiSystem.py", line 48, in __LoadSystemMenu_Default 0822 00:11:39669 :: File "ui.py", line 2742, in GetChild 0822 00:11:39669 :: KeyError 0822 00:11:39669 :: : 0822 00:11:39669 :: 'Change_Channel' 0822 00:11:39669 :: Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted August 21, 2015 Former Staff Share Posted August 21, 2015 @flygun i have this error 0822 00:11:39668 :: File "networkModule.py", line 239, in SetGamePhase 0822 00:11:39668 :: File "game.py", line 111, in __init__ 0822 00:11:39668 :: File "interfaceModule.py", line 294, in MakeInterface 0822 00:11:39668 :: File "interfaceModule.py", line 229, in __MakeDialogs 0822 00:11:39668 :: File "uiSystem.py", line 33, in LoadDialog 0822 00:11:39669 :: File "uiSystem.py", line 48, in __LoadSystemMenu_Default 0822 00:11:39669 :: File "ui.py", line 2742, in GetChild 0822 00:11:39669 :: KeyError 0822 00:11:39669 :: : 0822 00:11:39669 :: 'Change_Channel' 0822 00:11:39669 :: make sure you did the third step 3: change systemdialog.py in uiscript with this import uiScriptLocale ROOT = "d:/ymir work/ui/public/" window = { "name" : "SystemDialog", "style" : ("float",), "x" : SCREEN_WIDTH/2 - 100, "y" : SCREEN_HEIGHT/2 - 114, "width" : 200, "height" : 298, "children" : ( { "name" : "board", "type" : "thinboard", "x" : 0, "y" : 0, "width" : 200, "height" : 298, "children" : ( { "name" : "Change_Channel", "type" : "button", "x" : 10, "y" : 17, "text" : uiScriptLocale.SYSTEM_CHANGE_CH, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "help_button", "type" : "button", "x" : 10, "y" : 47, "text" : uiScriptLocale.SYSTEM_HELP, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "system_option_button", "type" : "button", "x" : 10, "y" : 97, "text" : uiScriptLocale.SYSTEMOPTION_TITLE, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "game_option_button", "type" : "button", "x" : 10, "y" : 127, "text" : uiScriptLocale.GAMEOPTION_TITLE, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "change_button", "type" : "button", "x" : 10, "y" : 157, "text" : uiScriptLocale.SYSTEM_CHANGE, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "logout_button", "type" : "button", "x" : 10, "y" : 187, "text" : uiScriptLocale.SYSTEM_LOGOUT, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "exit_button", "type" : "button", "x" : 10, "y" : 217, "text" : uiScriptLocale.SYSTEM_EXIT, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "cancel_button", "type" : "button", "x" : 10, "y" : 257, "text" : uiScriptLocale.CANCEL, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, ), }, ), } [\spoiler] Link to comment Share on other sites More sharing options...
thespeedy 20 Posted August 21, 2015 Share Posted August 21, 2015 yes i have same error Link to comment Share on other sites More sharing options...
daredevil09 5 Posted September 7, 2015 Share Posted September 7, 2015 @flygun i have this error 0822 00:11:39668 :: File "networkModule.py", line 239, in SetGamePhase 0822 00:11:39668 :: File "game.py", line 111, in __init__ 0822 00:11:39668 :: File "interfaceModule.py", line 294, in MakeInterface 0822 00:11:39668 :: File "interfaceModule.py", line 229, in __MakeDialogs 0822 00:11:39668 :: File "uiSystem.py", line 33, in LoadDialog 0822 00:11:39669 :: File "uiSystem.py", line 48, in __LoadSystemMenu_Default 0822 00:11:39669 :: File "ui.py", line 2742, in GetChild 0822 00:11:39669 :: KeyError 0822 00:11:39669 :: : 0822 00:11:39669 :: 'Change_Channel' 0822 00:11:39669 :: help? Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted September 7, 2015 Share Posted September 7, 2015 (edited) Edit systemdialog.py from locale_xx(where xx is your used locale ) Edited September 7, 2015 by M.Sorin 1 Link to comment Share on other sites More sharing options...
luklak 0 Posted September 8, 2015 Share Posted September 8, 2015 Edit systemdialog.py from locale_xx(where xx is your used locale ) Got this Error... Link to comment Share on other sites More sharing options...
JarajTo 40 Posted September 8, 2015 Share Posted September 8, 2015 When i change channel from ch1 to ch2 channel with server name not updated Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted September 8, 2015 Share Posted September 8, 2015 Edit systemdialog.py from locale_xx(where xx is your used locale ) Got this Error... Create at the end of locale_game.txt this: SYSTEM_CHANGE_CH Change Channel 1 Link to comment Share on other sites More sharing options...
luklak 0 Posted September 9, 2015 Share Posted September 9, 2015 hmm, i got the same Error again... Link to comment Share on other sites More sharing options...
fatihbab34 15 Posted September 12, 2015 Share Posted September 12, 2015 Thank you. Link to comment Share on other sites More sharing options...
metin2-factory 1010 Posted October 25, 2015 Share Posted October 25, 2015 hmm, i got the same Error again... Same problem,help please. Link to comment Share on other sites More sharing options...
vladbos35 1 Posted November 22, 2015 Share Posted November 22, 2015 (edited) Anyone can help me? Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
asterix2 349 Posted November 22, 2015 Share Posted November 22, 2015 (edited) 17 minutes ago, vladbos35 said: Anyone can help me? Port ch1: 11002 and etc Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
vladbos35 1 Posted November 22, 2015 Share Posted November 22, 2015 4 minutes ago, asterix2 said: Port ch1: 11002 and etc Port is 13002, 13102. My port is in intrologin.py def SetChannelKurwy(self, ch): self.SetChannelInfo(ch) for (channelID, channelButtons) in self.channelButton.items(): if ch != channelID: channelButtons.SetUp() self.stream.SetConnectInfo("129.131.112.101", self.ChannelPort(ch, 0), "129.131.112.101", self.ChannelPort("LOGIN")) net.SetMarkServer("129.131.112.101", self.ChannelPort("LOGO")) app.SetGuildMarkPath("10.tga") app.SetGuildSymbolPath("10") net.SetServerInfo(self.ChannelPort(ch, 2)) def SetChannelInfo(self, ch): self.channels = str(ch) def GetChannel(self): return self.channels def ChannelPort(self, ch="CH1", value=0): channel = { "CH1" : [13002, "SERVERNAME", "CH 1"], "CH2" : [13102, "SERVERNAME", "CH 2"],} if ch == "LOGIN": return 11004 elif ch == "LOGO": return channel["CH1"][0] elif value == 2: return "%s, %s" % (channel[ch][1], channel[ch][2]) else: return channel[ch][value] Link to comment Share on other sites More sharing options...
asterix2 349 Posted November 22, 2015 Share Posted November 22, 2015 Just now, vladbos35 said: Port is 13002, 13102. My port is in intrologin.py def ChannelPort(self, ch="CH1", value=0): channel = { "CH1" : [13002, "SERVER", "CH 1"], "CH2" : [13102, "SERVER", "CH 2"], if ch == "LOGIN": return 11004 elif ch == "LOGO": return channel["CH1"][0] elif value == 2: return "%s, %s" % (channel[ch][1], channel[ch][2]) else: return channel[ch][value] hm Link to comment Share on other sites More sharing options...
vladbos35 1 Posted November 22, 2015 Share Posted November 22, 2015 59 minutes ago, asterix2 said: hm ? Link to comment Share on other sites More sharing options...
Recommended Posts