Premium BlackWidow 1 Posted May 11, 2015 Premium Share Posted May 11, 2015 Hello guys I tried / wanted to add the IG ChannelSwitch "system" to my client. But I found out that it's harder than I thought. With the buttons I don't have any prolems. They're looking wonderful. But I have a problm with their function The buttons have this function self.GetChild("ChWechseln").SAFE_SetEvent(self.__Phiro2CH) self.GetChild("ChWechseln2").SAFE_SetEvent(self.__Phiro2CH) self.GetChild("ChWechseln3").SAFE_SetEvent(self.__Phiro2CH) self.GetChild("ChWechseln4").SAFE_SetEvent(self.__Phiro2CH) And here I got stuck. I don't really know how to made the buttons, so that they're working Could somebody help me? I found something, but I still don't jnow what to do import ui import net import app import chat import math import wndMgr import serverInfo import background import ServerStateChecker def __IsSpecialMap(self): 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" ] if str(background.GetCurrentMapName()) in dis_maps: return TRUE return FALSE def __OnSelectChannel(self): if self.ChangeButton.IsDown(): self.EnableChangeButton() def __OnClickConnectButton(self): regionID = self.__GetRegionID() serverID = self.__GetServerID() channelID = self.ChannelList.GetSelectedItem() if not channelID: chat.AppendChat(1, "Erfolgreich!") return try: serverName = serverInfo.REGION_DICT[regionID][serverID]["name"] channelName = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["name"] addrKey = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["key"] ip = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["ip"] tcp_port = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["tcp_port"] state = serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["state"] account_ip = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["ip"] account_port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][serverID]["port"] markKey = regionID * 1000 + serverID * 10 markAddrValue=serverInfo.MARKADDR_DICT[markKey] net.SetMarkServer(markAddrValue["ip"], markAddrValue["tcp_port"]) app.SetGuildMarkPath(markAddrValue["mark"]) app.SetGuildSymbolPath(markAddrValue["symbol_path"]) except: chat.AppendChat(1, "Ein Fehler ist während des Logn Vorgang aufgetreten!") return if state == serverInfo.STATE_NONE: chat.AppendChat(1, "Der ausgewählte channel ist nicht verfügbar!") return elif state == serverInfo.STATE_DICT[3]: chat.AppendChat(1, "Der ausgewählte channel ist voll!") return elif net.GetServerInfo().strip().split(", ")[1] == self.ChannelList.textDict[self.ChannelList.selectedLine].strip().split(" ")[0]: chat.AppendChat(1, "Du befindest dich schon auf diesen channel!") return elif self.__IsSpecialMap(): chat.AppendChat(1, "Auf diese Map kannst du den channel nicht wechseln!") return self.Close() net.SetServerInfo("%s, %s" % (serverName, channelName)) self.DirectConnect(ip, tcp_port, account_ip, account_port) def DirectConnect(self, ChannelIP, ChannelPort, AuthServerIP, AuthServerPort): net.SetLoginInfo(decode_string(net.ACCOUNT_ID), decode_string(net.ACCOUNT_PW)) net.ConnectToAccountServer(ChannelIP, ChannelPort, AuthServerIP, AuthServerPort) net.DirectEnter(0) net.SendSelectCharacterPacket(0) net.SendEnterGamePacket() def Show(self): ui.ScriptWindow.Show(self) def Close(self): ServerStateChecker.Destroy(self) self.Hide() return TRUE def OnPressEscapeKey(self): self.Close() return TRUE def OnUpdate(self): ServerStateChecker.Update() iom = ChannelChanger() iom.Show() chat.AppendChat(1, "#P2#{Erfolgreich!}") 1 Link to comment Share on other sites More sharing options...
Premium BlackWidow 1 Posted May 13, 2015 Author Premium Share Posted May 13, 2015 Still need help Link to comment Share on other sites More sharing options...
Premium BlackWidow 1 Posted May 16, 2015 Author Premium Share Posted May 16, 2015 Aaaaand ... still need help Link to comment Share on other sites More sharing options...
Premium BlackWidow 1 Posted May 29, 2015 Author Premium Share Posted May 29, 2015 Nobody? Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted May 29, 2015 Premium Share Posted May 29, 2015 Do you need this sytem or... ? I don't understand your problem. The both piece of code looks like different people wrote it, so you are searching this system ? Link to comment Share on other sites More sharing options...
Premium BlackWidow 1 Posted May 29, 2015 Author Premium Share Posted May 29, 2015 I've made the functions for the buttons. And I found the code for such a system on the Internet. And now I need a little bit of help, to combine bought. It would be nice if someone could give me an Advice or something how to combine bought Link to comment Share on other sites More sharing options...
Premium Galet 509 Posted May 29, 2015 Premium Share Posted May 29, 2015 I don't know if you're code is "compatible" cause there'snt "class ..." and "def __init__(self):" "def __del__(self):" and so on... :/ Link to comment Share on other sites More sharing options...
Micha aka xCPx 336 Posted May 31, 2015 Share Posted May 31, 2015 If you want, look at my C++ Shop. I am Selling a whole Ingame Channel Switcher System that works Server based and its just like you warp from map 1 to map 2. Video for it coming soon Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted July 12, 2015 Share Posted July 12, 2015 https://metin2dev.org/board/index.php?/topic/7388-rls-ingame-channel-switcher-like-wom2/ already released but im having some errors could anyone help ? Link to comment Share on other sites More sharing options...
msmajda9 25 Posted May 26, 2020 Share Posted May 26, 2020 REUPLOADED: This is the hidden content, please Sign In or Sign Up 5 2 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now