Jump to content

pixelshasHUN

Newbie
  • Posts

    3
  • Joined

  • Last visited

About pixelshasHUN

pixelshasHUN's Achievements

Rookie

Rookie (2/14)

  • Dedicated Rare
  • Week One Done
  • First Post
  • Conversation Starter

Recent Badges

1

Reputation

  1. I solved the problem that how to get the vid from player name if the player is on other map. Its a python-quest communication. quest: quest send_vid begin state start begin function GetPlayerName() cmdchat("init_getInfo") local name = input(cmdchat("getInfo")) cmdchat("ignore_getInfo") return name end when button or info begin local vid = find_pc_by_name(send_vid.GetPlayerName()) cmdchat("sendInfo "..vid) end when login begin cmdchat("saveInfo "..q.getcurrentquestindex()) end end end python(game.py): #GET PLAYER VID FROM SERVER def InitPlayerNameInfo(self): constInfo.IGNORE_SEND_PLAYER_NAME = 1 def IgnorePlayerNameInfo(self): constInfo.IGNORE_SEND_PLAYER_NAME = 0 def SendPlayerNameInfo(self): net.SendQuestInputStringPacket(constInfo.PLAYER_NAME) def GetPlayerVIDInfo(self, vid): constInfo.PLAYER_VID = vid def SavePlayerVIDInfo(self, value): constInfo.get_vid = value #END OF GET PLAYER VID FROM SERVER for example i used this for whisper trade python(uiwhisper.py): def StartExchange(self): constInfo.PLAYER_NAME = self.targetName event.QuestButtonClick(int(constInfo.get_vid)) vid = int(constInfo.PLAYER_VID) if vid != 0: chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_TARGET.format(self.targetName)) #if player is online net.SendExchangeStartPacket(vid) self.interface.StartExchange(self.targetName) else: chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_NO_TARGET.format(self.targetName)) #if player is offline def EndExchange(self): self.interface.EndExchange() def RefreshExchange(self): self.interface.RefreshExchange() and of course i connected a button for the function: self.tradeButton.SetEvent(ui.__mem_func__(self.StartExchange))
  2. Can i put this just into server side ?
  3. I want to know if there is an option to get the VID from player's name. I know how to get name by VID but now i need to get the VID. Thanks for the help
×
×
  • 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.