Strzikjav 0 Posted June 3, 2014 Share Posted June 3, 2014 Hey Guys, hope to get fast help with myQuestion^^ Acutal i have a question: event.QuestButtonClick(ARGUMNT) Is this just a call to the function to open the Quest with Questindex as ARGUMNT or do i really need a button to call this function? Actual i am calling this method without a button, but nothing happens (even no error) so i was wondering. The Quest to get the Questindex looks like this: quest test begin state start begin when login begin cmdchat("myvalue "..q.getcurrentquestindex()) end end end I'm saving my Questindex in a var in constinfo (yes, i know ho to read out the cmdchat value via game.py) Regards €dit: i'm calling my quest like this: when button or info begin ##DO SOMETHING end Link to comment Share on other sites More sharing options...
Denis 1474 Posted June 3, 2014 Share Posted June 3, 2014 Did you save the value as int()?And no you don't need a button to call the function Link to comment Share on other sites More sharing options...
Strzikjav 0 Posted June 3, 2014 Author Share Posted June 3, 2014 Did you save the value as int()?And no you don't need a button to call the function Yeah, this is my called function (from serverCommandList): def TestWarpFunction(self, id) constInfo.VARIABLE = int(id) I'm calling my my method in a if-loop (sry 4 bad englisch) #SOME OTHER SOURCE... elif BLABLA: event.QuestButtonClick(constInfo.VARIABLE) self.__ResetChat() return Is the ___ResetChat() or return maybe disturbing my Quest? Link to comment Share on other sites More sharing options...
Zetsu 78 Posted June 3, 2014 Share Posted June 3, 2014 With event.QuestButtonClick(int(questIndex)) You need when button or info begin ##DO SOMETHING end In your quest. Look in uiquest.py and you will see that buttons works like that. Quests are started (don't know how..) and event.QuestButtonClick(int(questIndex)) it's used for gui buttons You can use event.QuestButtonClick(int(questIndex)) everywhere. In game.py add in def __init__ this: self.MyQuestNameIndex = 0 In ServerCommand...etc add: "myvalue" : self.InitMyQuestName, Then make this function def InitMyQuestName(self, id): self.MyQuestNameIndex = int(id) # i added int just in case... #Be careful! I used SPACE not TAB. You will get syntax errors if you don't replace it. then you can use event.QuestButtonClick(self.MyQuestNameIndex) if you want to use it everywhere in your client, then use constInfo instead of self.MyQuestNameIndex I'm not sure if you understood me... More details: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2355018-release-client-quest-kommunikation.html You have here everything, also how to get a value from client and use it in your quest 1 Link to comment Share on other sites More sharing options...
Active Member Koray 1995 Posted June 3, 2014 Active Member Share Posted June 3, 2014 how to do use "net.SendQuestInputStringPacket" func? example how read to serverside string Link to comment Share on other sites More sharing options...
Strzikjav 0 Posted June 3, 2014 Author Share Posted June 3, 2014 With event.QuestButtonClick(int(questIndex)) You need when button or info begin ##DO SOMETHING end In your quest. Look in uiquest.py and you will see that buttons works like that. Quests are started (don't know how..) and event.QuestButtonClick(int(questIndex)) it's used for gui buttons You can use event.QuestButtonClick(int(questIndex)) everywhere. In game.py add in def __init__ this: self.MyQuestNameIndex = 0 In ServerCommand...etc add: "myvalue" : self.InitMyQuestName, Then make this function def InitMyQuestName(self, id): self.MyQuestNameIndex = int(id) # i added int just in case... #Be careful! I used SPACE not TAB. You will get syntax errors if you don't replace it. then you can use event.QuestButtonClick(self.MyQuestNameIndex) if you want to use it everywhere in your client, then use constInfo instead of self.MyQuestNameIndex I'm not sure if you understood me... More details: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2355018-release-client-quest-kommunikation.html You have here everything, also how to get a value from client and use it in your quest I've already done everything you wrote in my first post (it seems that you missunderstood me, otherway you wouldnt post it^^) But thanks for the Link, this may be useful. Is it possible that: self.ResetChat() or return in my if clause are blocking the quest? (To display it) Cuz everything is working without errors and problems, but it doesnt show the quest (Already checked QuestIndex, everything is right) Link to comment Share on other sites More sharing options...
Zetsu 78 Posted June 3, 2014 Share Posted June 3, 2014 With event.QuestButtonClick(int(questIndex)) You need when button or info begin ##DO SOMETHING end In your quest. Look in uiquest.py and you will see that buttons works like that. Quests are started (don't know how..) and event.QuestButtonClick(int(questIndex)) it's used for gui buttons You can use event.QuestButtonClick(int(questIndex)) everywhere. In game.py add in def __init__ this: self.MyQuestNameIndex = 0 In ServerCommand...etc add: "myvalue" : self.InitMyQuestName, Then make this function def InitMyQuestName(self, id): self.MyQuestNameIndex = int(id) # i added int just in case... #Be careful! I used SPACE not TAB. You will get syntax errors if you don't replace it. then you can use event.QuestButtonClick(self.MyQuestNameIndex) if you want to use it everywhere in your client, then use constInfo instead of self.MyQuestNameIndex I'm not sure if you understood me... More details: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2355018-release-client-quest-kommunikation.html You have here everything, also how to get a value from client and use it in your quest I've already done everything you wrote in my first post (it seems that you missunderstood me, otherway you wouldnt post it^^) But thanks for the Link, this may be useful. Is it possible that: self.ResetChat() or return in my if clause are blocking the quest? (To display it) Cuz everything is working without errors and problems, but it doesnt show the quest (Already checked QuestIndex, everything is right) I would like to see self.ResetChat() function. If this function isn't right or it doesn't exist, curent function (with event.QuestButtonClick(int(questIndex))) doesn't work. Syserr would be nice too...! Link to comment Share on other sites More sharing options...
Strzikjav 0 Posted June 3, 2014 Author Share Posted June 3, 2014 Fail... totally forgott to look into the syserr.... global name 'event' is not definied This means that i've forgot to import the File where the event-Function is in, am i right? And where is the event-Function ty 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