quest militarhorse begin state start begin when 20095.chat."Horse Militar" with horse.get_grade()>=11 begin if pc.level<=49 then say("You need level 50") say("to buy a militar horse!") say("") elseif pc.countitem("50050")>=1 then say("To have the militar horse") say("you need 21 medals.") say("You can drop the medals") say("at Cave of the Monkeys.") say("When you have a medal, please, come to me.") say("") setstate(need_item50050) elseif pc.countitem("50050")>=1 and pc.level>=49 then say("To get the horse") say("you need to pass an exam.") say("In 30 minutes, you must kill 300 Demon") say("Soldiers. Only then will receive the horse!") say("Results will be recorded on the medal.") local b=select("Okay", "Close") if 1==b then if pc.countitem("50050")>=1 then pc.removeitem("50050", 1) setstate(test) end elseif 2==b then say("You can not get your horse.") else say("UNKNOWN BUTTON ["..b.."]") end else say("You miss the Horse Mission.") end end end state need_item50050 begin when letter begin setskin(NOWINDOW) makequestbutton("Get 1 Horse Medal") q.set_title("Get 1 Horse Medal") q.start() end when button begin say(locale.NOTICE_COLOR.."1 Horse Medal!"..locale.NORMAL_COLOR) say("You need 1 Horse Medal") say("to be able to take the exam for the horse.") setstate(start) q.done() end when info begin say(locale.NOTICE_COLOR.."1 Horse Medal!"..locale.NORMAL_COLOR) say("You need 1 Horse Medal") say("to be able to take the exam for the horse.") setstate(start) q.done() end end state test begin when letter begin q.set_counter("剩下的五狼射手數量", 300-pc.getqf("kill_count")) end when 1001.kill begin pc.setqf("kill_count", pc.getqf("kill_count")+1) q.set_counter("剩下的五狼射手數量", 300-pc.getqf("kill_count")) if get_time()>=pc.getqf("limit_time") then setstate(failure) end end when letter begin q.set_clock("剩餘時間", pc.getqf("limit_time")-get_time()) end when enter begin pc.setqf("limit_time", get_time()+300*60) pc.setqf("kill_count", 0) end when leave begin q.done() end when letter begin setskin(NOWINDOW) makequestbutton("Kill 300 Demon Soldiers") q.set_title("Kill 300 Demon Soldiers") q.start() end when button begin say(locale.NOTICE_COLOR.."Kill 300 Demon Soldiers!"..locale.NORMAL_COLOR) say("In 30 minutes you have to kill 300 Demon Soldiers.") say("Then back to the Stable Boy.") end when info begin say(locale.NOTICE_COLOR.."Kill 300 Demon Soldiers!"..locale.NORMAL_COLOR) say("In 30 minutes you have to kill 300 Demon Soldiers.") say("Then back to the Stable Boy.") end when 1001.kill with pc.getf("pony_buy","kill_count") >= 30 and pc.getf("pony_buy","limit_time")>=get_time() begin setstate(report) end when 20095.chat."PONY QUEST STATE REPAIR" with horse.get_grade()!=0 begin setstate(start) q.done() end when 20095.chat."Examination of the Horse" begin say("You want start the examination?") local b=select("Yes", "No") if 1==b then elseif 2==b then say("Are you sure?") local b=select("Yes", "No") if 1==b then say("So, Go!") setstate(start) q.done() elseif 2==b then say("Well!") say("Check back soon!") else say("UNKNOWN BUTTON ["..b.."]") end else say("UNKNOWN BUTTON ["..b.."]") end end end state report begin when letter begin setskin(NOWINDOW) makequestbutton("Exam Successfully Completed") q.set_title("Exam Successfully Completed") q.start() end when button begin say(locale.NOTICE_COLOR.."Exam Successfully Completed!"..locale.NORMAL_COLOR) say("Returns to the Stable Boy") end when info begin say(locale.NOTICE_COLOR.."Exam Successfully Completed!"..locale.NORMAL_COLOR) say("Returns to the Stable Boy") end when 20095.chat."PONY QUEST STATE REPAIR" with horse.get_grade()!=0 begin setstate(start) q.done() end when 20095.chat."Mission Successfully Completed!" with horse.get_grade()==0 begin say("Congratulations!") say("You concluded the exam successfully!") say("What you have to wait a day for the thumbnail") say("Horse is completed.") say("And also need to 10,000,000 Yangs.") if is_test_server() then pc.setqf("make_time", get_time()+10) else pc.setqf("make_time", get_time()+number(8, 16)*60*60) end setstate(wait) end end state wait begin when letter begin setskin(NOWINDOW) makequestbutton("Waiting for the Military Horse Book") q.set_title("Waiting for the Military Horse Book") q.start() end when button begin say(locale.NOTICE_COLOR.."Waiting for the Military Horse Book"..locale.NORMAL_COLOR) say("Your exam is being recorded on the Military Horse Book") say("You have to wait.") end when info begin say(locale.NOTICE_COLOR.."Waiting for the Military Horse Book"..locale.NORMAL_COLOR) say("Waiting for the Military Horse Book") say("You have to wait.") end when login with get_time()>=pc.getf("pony_buy","make_time") begin setstate(buy) end when 20095.chat."Receive the Military Horse Book" with horse.get_grade()!=0 begin setstate(start) q.done() end when 20095.chat."Military Horse Book is ready?" with horse.get_grade()==0 begin say("Military Horse Book") say("Is still not ready. Back later.") say("Remember to bring 10.000.000 Yangs.") end end state buy begin when letter begin setskin(NOWINDOW) makequestbutton("Miniature Horse Finished") q.set_title("Miniature Horse Finished") q.start() end when button begin say(locale.NOTICE_COLOR.."Miniature Horse Finished!"..locale.NORMAL_COLOR) say("Apparently the Stable Boy") say("has finished your miniature.") say("Bring 10.000.000 Yangs. Go to Stable Boy") end when info begin say(locale.NOTICE_COLOR.."Miniature Horse Finished!"..locale.NORMAL_COLOR) say("Apparently the Stable Boy") say("has finished your miniature.") say("Bring 10.000.000 Yangs. Go to Stable Boy") end when 20095.chat."Miniature Horse" with horse.get_grade()==0 and get_time()>=pc.getf("pony_buy","make_time") begin say("Miniature Horse Is Finished!") say("Want to Buy a Miniature Horse?") local b=select("Yes", "No", "Abort!") if 1==b then if pc.money>=100000 then char_log(0, "HORSE_BUY", "BEGIN") pc.changemoney(-10000000) char_log(0, "HORSE_BUY", "DEC money 10000000") horse.unride() horse.advance() horse.ride() char_log(0, "HORSE_BUY", "INC horse_advance 1") pc.give_item2("50051", 1) char_log(0, "HORSE_BUY", "INC 50051 1") char_log(0, "HORSE_BUY", "END") say ("You already have the Horse.") say ("You can call the horse by clicking") say ("In Miniature Horse.") say ("Remember the Food!") setstate(start) q.done() else say("Back!") end elseif 2==b then say("Ok, back later.") elseif 3==b then say("Even Want to Abort?") say("Would Cancel It?") local b=select("Yes", "No") if 1==b then setstate(start) elseif 2==b then else say("UNKNOWN BUTTON ["..b.."]") end else say("UNKNOWN BUTTON ["..b.."]") end end end state failure begin when letter begin setskin(NOWINDOW) makequestbutton("You failed the exam") q.set_title("You failed the exam") q.start() end when button begin say(locale.NOTICE_COLOR.."You failed the exam"..locale.NORMAL_COLOR) say("Have you killed all 300 Demon Soldiers?") say("In 30 minutes? No.") say("What a shame.") say("Get yourself another Horse Medal") say("If you want to re-do the mission.") setstate(start) q.done() end when info begin say(locale.NOTICE_COLOR.."You failed the exam"..locale.NORMAL_COLOR) say("Have you killed all 300 Demon Soldiers?") say("In 30 minutes? No.") say("What a shame.") say("Get yourself another Horse Medal") say("If you want to re-do the mission.") setstate(start) q.done() end end state __COMPLETE__ begin when enter begin q.done() end endend
Quest nem abre :( Alguém ajuda?
Share this post
Link to post
Share on other sites