jkhan 3 Posted June 3, 2017 Share Posted June 3, 2017 Hi, If it is active I want it not to run. Can you help me? Sorry for my bad English. Thanks, Good works. quest biolog_time_reset begin state start begin function remove_time() local biologistDict = { "collect_quest_lv30", "collect_quest_lv40", "collect_quest_lv50", "collect_quest_lv60", "collect_quest_lv70", "collect_quest_lv80", "collect_quest_lv85", "collect_quest_lv90", "collect_quest_lv92", "collect_quest_lv94" } for questName = 1, table.getn(biologistDict) do pc.setf(biologistDict[questName], "duration", 0) -- SetFlag(questName + "." + stateName, iValue); syschat(string.format("pc.setf(%s.duration, 0)", biologistDict[questName])) end end when 20094.chat."Reset Time..." begin if pc.count_item(70001) >= 1 then say_title("Reset Biolog Time:") say("reset time..") say("") say("") say("") local s = select("yes","no.") if s == 1 then say_title("reset time:") say("") say("your time reset") pc.remove_item("70022",1) biolog.remove_time(); else say_title("reset time:") say("") say("ok, see you") end else say_title("reset time") say("") say("no item") say("find and come") say("...") end end end end Link to comment Share on other sites More sharing options...
jkhan 3 Posted June 4, 2017 Author Share Posted June 4, 2017 #bump Link to comment Share on other sites More sharing options...
Source 4 Posted June 4, 2017 Share Posted June 4, 2017 quest biolog_reset_time begin state start begin when 20094.chat."Reset Time" begin say_title("Reset Time") say(" ") say("Do you want to reset the time?") say(" ") local s = option("Yes","No") if s == 1 and pc.count_item(70001) >= 1 and pc.getqf("collect_timewait") > get_time() then pc.setqf("collect_timewait", 0) pc.remove_item(70001, 1) say_title("Reset Time") say(" ") say("Okay, done!") say(" ") return elseif s == 1 and pc.count_item(70001) >= 1 and pc.getqf("collect_timewait") <= get_time() then say_title("Reset Time") say(" ") say("You don't need to reset the time...") say("You can already deliver the next item!") say(" ") return elseif s == 1 and pc.count_item(70001) < 1 then say_title("Reset Time") say(" ") say("You don't have "..item_name(70001).." !") say("Come back when you have it...") say(" ") return else say_title("Reset Time") say(" ") say("Okay! See you later...") say(" ") return end -- if end -- when end -- state end -- quest Link to comment Share on other sites More sharing options...
jkhan 3 Posted June 4, 2017 Author Share Posted June 4, 2017 21 minutes ago, Source said: quest biolog_reset_time begin state start begin when 20094.chat."Reset Time" begin say_title("Reset Time") say(" ") say("Do you want to reset the time?") say(" ") local s = option("Yes","No") if s == 1 and pc.count_item(70001) >= 1 then pc.setqf("collect_timewait", 0) pc.remove_item(70001, 1) say_title("Reset Time") say(" ") say("Okay, done!") say(" ") return elseif s == 1 and pc.count_item(70001) < 1 then say_title("Reset Time") say(" ") say("You don't have "..item_name(70001).." !") say("Come back when you have it...") say(" ") return else say_title("Reset Time") say(" ") say("Okay! See you later...") say(" ") return end -- if end -- when end -- state end -- quest Thanks but this is not what I want. if duration is 0 means not to use item i want. Link to comment Share on other sites More sharing options...
Source 4 Posted June 4, 2017 Share Posted June 4, 2017 9 minutes ago, jkhan said: Thanks but this is not what I want. if duration is 0 means not to use item i want. Fixed it in my first post. This should work now Or you can use this version, which is more simple: quest biolog_reset_time begin state start begin when 20094.chat."Reset Time" begin if pc.getqf("collect_timewait") > get_time() then say_title("Reset Time") say(" ") say("Do you want to reset the time?") say(" ") local s = option("Yes","No") if s == 1 and pc.count_item(70001) >= 1 then pc.setqf("collect_timewait", 0) pc.remove_item(70001, 1) say_title("Reset Time") say(" ") say("Okay, done!") say(" ") return elseif s == 1 and pc.count_item(70001) < 1 then say_title("Reset Time") say(" ") say("You don't have "..item_name(70001).." !") say("Come back when you have it...") say(" ") return else say_title("Reset Time") say(" ") say("Okay! See you later...") say(" ") return end -- if else say_title("Reset Time") say(" ") say("You don't need to reset the time...") say("You can already deliver the next item!") say(" ") return end -- if2 end -- when end -- state end -- quest Link to comment Share on other sites More sharing options...
jkhan 3 Posted June 4, 2017 Author Share Posted June 4, 2017 27 minutes ago, Source said: Fixed it in my first post. This should work now İt's doesn't work. Link to comment Share on other sites More sharing options...
jkhan 3 Posted June 6, 2017 Author Share Posted June 6, 2017 #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