Advertisement
thespeedy

intrologin.py

Nov 13th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. g_ip = "5.154.174.118"
  2.  
  3. def SetChannel(self, ch):
  4.         for key, button in self.channelButton.items():
  5.             button.SetUp()
  6.            
  7.         self.channelButton[ch].Down()
  8.  
  9.         self.stream.SetConnectInfo(g_ip, self.ChannelPort(ch, 0), g_ip, self.ChannelPort("LOGIN"))
  10.         net.SetMarkServer(g_ip, self.ChannelPort("LOGO"))
  11.         app.SetGuildMarkPath("10.tga")
  12.         app.SetGuildSymbolPath("10")
  13.         net.SetServerInfo(self.ChannelPort(ch, 2))
  14.        
  15.     def ChannelPort(self, ch, value=0):
  16.         channel = {
  17.  
  18.             0   :   13000,
  19.             1   :   13001,
  20.             2   :   13002,
  21.             3   :   13003,
  22.             4   :   13004,
  23.             5   :   13005}
  24.        
  25.         if ch == "LOGIN":
  26.             return 11002
  27.         elif ch == "LOGO":
  28.             return channel[0]
  29.         elif value == 2:
  30.             return "Arianea, Channel %s" % (ch+1)
  31.         else:
  32.             return channel[ch]
  33.                
  34.     def Connect(self, id, pwd):
  35.         if constInfo.SEQUENCE_PACKET_ENABLE:
  36.             net.SetPacketSequenceMode()
  37.            
  38.         constInfo.LastAccount = id.lower()
  39.  
  40.         self.stream.popupWindow.Close()
  41.         self.stream.popupWindow.Open(localeInfo.LOGIN_CONNETING, self.EmptyFunc, localeInfo.UI_CANCEL)
  42.  
  43.         self.stream.SetLoginInfo(id, pwd)
  44.         self.stream.Connect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement