Driguezgames 5 Posted June 21, 2018 Share Posted June 21, 2018 Hello, i have a problem in the hunting quest so if i kill a mob it count 2x what i did? https://pastebin.com/ZUPNWMW0 Link to comment Share on other sites More sharing options...
Driguezgames 5 Posted June 21, 2018 Author Share Posted June 21, 2018 UP Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted June 21, 2018 Premium Share Posted June 21, 2018 422 lines of LUA You've a problem and YDK where it is? You wrote all of this lines and you have problem on a "++"? Please share only the "when" where you've problems. Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted June 21, 2018 Premium Share Posted June 21, 2018 when kill begin local sel = pc.getqf("select") if sel == 0 then sel = 1 end local lev = pc.getqf("current") if lev != 0 and npc.race == (special.levelup_quest[lev][sel*2-1]) and pc.getqf("buttonstate") == -1 then local remain = pc.getqf("remain") - 1 if remain <= 0 then pc.setqf("remain", 0) q.set_counter_value(0) setskin(NOWINDOW) makequestbutton(locale.level..lev..' '..locale.quest_word..' - '..locale.complete) pc.setqf("buttonstate", 3) else pc.setqf("remain", remain) q.set_counter_value(remain) end end end This is the kill, but i see no problem here, probably you've touched the kill trigger inside your sources causing it to bug out. 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Driguezgames 5 Posted June 21, 2018 Author Share Posted June 21, 2018 3 hours ago, Syreldar said: when kill begin local sel = pc.getqf("select") if sel == 0 then sel = 1 end local lev = pc.getqf("current") if lev != 0 and npc.race == (special.levelup_quest[lev][sel*2-1]) and pc.getqf("buttonstate") == -1 then local remain = pc.getqf("remain") - 1 if remain <= 0 then pc.setqf("remain", 0) q.set_counter_value(0) setskin(NOWINDOW) makequestbutton(locale.level..lev..' '..locale.quest_word..' - '..locale.complete) pc.setqf("buttonstate", 3) else pc.setqf("remain", remain) q.set_counter_value(remain) end end end This is the kill, but i see no problem here, probably you've touched the kill trigger inside your sources causing it to bug out. Where i found it on source? Link to comment Share on other sites More sharing options...
boaspessoal 8 Posted June 22, 2018 Share Posted June 22, 2018 You probably have multiple files triggering the same event making it count twice instead of one(like intended), because as @Syreldar said, the kill trigger is fine, clean your object folder and compile the quest again and see if it counts twice again. Cheers Link to comment Share on other sites More sharing options...
Driguezgames 5 Posted June 22, 2018 Author Share Posted June 22, 2018 3 hours ago, boaspessoal said: You probably have multiple files triggering the same event making it count twice instead of one(like intended), because as @Syreldar said, the kill trigger is fine, clean your object folder and compile the quest again and see if it counts twice again. Cheers I Will see that thx Link to comment Share on other sites More sharing options...
Driguezgames 5 Posted June 22, 2018 Author Share Posted June 22, 2018 10 hours ago, boaspessoal said: You probably have multiple files triggering the same event making it count twice instead of one(like intended), because as @Syreldar said, the kill trigger is fine, clean your object folder and compile the quest again and see if it counts twice again. Cheers I delet folder object and reload the quest and same problem On 6/21/2018 at 4:07 PM, Syreldar said: when kill begin local sel = pc.getqf("select") if sel == 0 then sel = 1 end local lev = pc.getqf("current") if lev != 0 and npc.race == (special.levelup_quest[lev][sel*2-1]) and pc.getqf("buttonstate") == -1 then local remain = pc.getqf("remain") - 1 if remain <= 0 then pc.setqf("remain", 0) q.set_counter_value(0) setskin(NOWINDOW) makequestbutton(locale.level..lev..' '..locale.quest_word..' - '..locale.complete) pc.setqf("buttonstate", 3) else pc.setqf("remain", remain) q.set_counter_value(remain) end end end This is the kill, but i see no problem here, probably you've touched the kill trigger inside your sources causing it to bug out. Link to comment Share on other sites More sharing options...
Driguezgames 5 Posted June 27, 2018 Author Share Posted June 27, 2018 bump 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