Tasho 243 Posted February 26, 2014 Share Posted February 26, 2014 (edited) Hi, I have a problem I think is from the client-side. Problem: When I click on the AntiExpRing and storage buttons it pops-up a this: Normally it dosen't suppous to pop-up nothing, just a text in the bottom-right that says whether or not the botton is activ or not. I'll pot sa quest and the client part maybe someone knows a solutin. Server-side: quest clientquest_test begin state start begin when login begin cmdchat("loadquest1 "..q.getcurrentquestindex()) end when button or info begin local get = clientquest_test.getinput("getinput") if get == "12" then -- Lager Button game.open_safebox() end if get == "13" then -- AntiExp Button if pc.getqf('reset2') == 0 then pc.setqf('reset2',1) pc.setqf('reset',pc.get_exp()) loop_timer("antiexp", 1) syschat("Ati blocat experienta.") else pc.setqf('reset2',0) cleartimer("antiexp") syschat("Ati deblocat experienta.") end end end when login with pc.getqf('reset2') > 0 begin loop_timer("antiexp", 1) syschat("Experienta este blocata.") end when antiexp.timer begin local oxp = pc.getqf('reset') if pc.get_exp() > oxp then pc.give_exp2(-(pc.get_exp()-oxp)) end end function getinput(par) cmdchat("getinputbegin") local ret = input(cmdchat(par)) cmdchat("getinputend") return ret end end end Client: constinfo.py LoadQuest1 = 0 INPUT_IGNORE = 0 SendInfo = "0 game.py def __QuestClient_1(self, qid): constInfo.LoadQuest1 = qid def __Inputget1(self): constInfo.INPUT_IGNORE = 1 def __Inputget2(self): constInfo.INPUT_IGNORE = 0 def __Inputget3(self): info = constInfo.SendInfo net.SendQuestInputStringPacket(str(info)) # QUEST KOMMUNIKATION "loadquest1" : self.__QuestClient_1, "getinputbegin" : self.__Inputget1, "getinputend" : self.__Inputget2, "getinput" : self.__Inputget3, uiinventory.py def ClickIshopButton(self): eq = constInfo.LoadQuest1 #chat.AppendChat(chat.CHAT_TYPE_INFO, eq) constInfo.SendInfo = "12" event.QuestButtonClick(int(eq)) def __AntiExpRing(self): eq = constInfo.LoadQuest1 constInfo.SendInfo = "13" event.QuestButtonClick(int(eq)) # MallButton if self.mallButton: self.mallButton.SetEvent(ui.__mem_func__(self.ClickMallButton)) self.ishopButton.SetEvent(ui.__mem_func__(self.ClickIshopButton)) self.AntiEXPButton.SetEvent(ui.__mem_func__(self.__AntiExpRing)) self.AntiEXPButton = self.GetChild2("AntiExpButton") self.ishopButton = self.GetChild2("IshopButton") self.ishopButton = None Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Pepineitor 69 Posted February 26, 2014 Share Posted February 26, 2014 Add to the when button or info begin setskin(NOWINDOW) I don't test it, but maybe it run. Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted February 26, 2014 Developer Share Posted February 26, 2014 game.py Search the following def: def OpenQuestWindow(self, skin, idx): self.interface.OpenQuestWindow(skin, idx)And replace it with this: def OpenQuestWindow(self, skin, idx): if constInfo.INPUT_IGNORE == 1: return self.interface.OpenQuestWindow(skin, idx) 2 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Alpha 482 Posted February 26, 2014 Share Posted February 26, 2014 You can use q.no_send() to tell the server that he shouild not send scripts about this quest to the server the button will still appear but nothing more and it will still acceppt input. Has less bugs than the public stuff everyone is using Link to comment Share on other sites More sharing options...
Tasho 243 Posted February 26, 2014 Author Share Posted February 26, 2014 game.py Search the following def: def OpenQuestWindow(self, skin, idx): self.interface.OpenQuestWindow(skin, idx) And replace it with this: def OpenQuestWindow(self, skin, idx): if constInfo.INPUT_IGNORE == 1: return self.interface.OpenQuestWindow(skin, idx) it worked. thanks 1 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