quest subquest_26 begin state start begin when login or levelup with pc.level >= 57 and pc.level <= 59 begin set_state(information) end end state information begin when letter begin local v=find_npc_by_vnum(9005) if 0==v then else target.vid("__TARGET__", v, gameforge.subquest_26._10_targetVid) end end when __TARGET__.target.click or 9005.chat.gameforge.subquest_26._20_npcChat begin target.delete("__TARGET__") say_title(gameforge.subquest_26._30_sayTitle) say(gameforge.subquest_26._40_say) wait() say_title(gameforge.subquest_26._30_sayTitle) say(gameforge.subquest_26._50_say) local s= select(gameforge.subquest_26._60_select, gameforge.subquest_26._70_select) if 2==s then say(gameforge.subquest_26._80_say) local a= select(gameforge.locale.guild.yes, gameforge.locale.guild.no) if 2==a then say_title(gameforge.subquest_26._30_sayTitle) say(gameforge.subquest_26._90_say) return end say_title(gameforge.subquest_26._30_sayTitle) say(gameforge.subquest_26._100_say) set_state(__GIVEUP__) return end say_title(gameforge.subquest_26._30_sayTitle) say(gameforge.subquest_26._110_say) set_state(ask_okgu) end end state ask_okgu begin when letter begin send_letter(gameforge.subquest_26._120_sendLetter) local v=find_npc_by_vnum(20008) if 0==v then else target.vid("__TARGET1__", v, gameforge.subquest_26._130_targetVid) end end when info or button begin say_title(gameforge.subquest_26._140_sayTitle) say(gameforge.subquest_26._150_say) end when __TARGET1__.target.click or 20008.chat.gameforge.subquest_26._160_npcChat begin target.delete("__TARGET1__") say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._170_say) wait("") say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._180_say) local s= select(gameforge.subquest_26._190_select, gameforge.subquest_26._200_select) if 2==s then say(gameforge.subquest_26._210_say) local a= select(gameforge.locale.guild.yes, gameforge.locale.guild.no) if 2==a then say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._220_say) return end say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._230_say) set_state(__GIVEUP__) return end say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._240_say) set_state(accept) end end state accept begin when letter begin if pc.count_item(30116)>0 then send_letter(gameforge.subquest_26._250_sendLetter) local v=find_npc_by_vnum(20008) if 0==v then else target.vid("__TARGET__", v, gameforge.subquest_26._260_targetVid) end return end send_letter(gameforge.subquest_26._270_sendLetter) end when info or button begin if pc.count_item(30116)>0 then say_title(gameforge.subquest_26._250_sendLetter) say(gameforge.subquest_26._280_say) return end say_title(gameforge.subquest_26._290_sayTitle) say(gameforge.subquest_26._300_say) end when 20008.chat.gameforge.subquest_26._310_npcChat with pc.getqf("frog_done")==1 begin say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._320_say) local s= select(gameforge.subquest_26._330_select, gameforge.find_brother_article._170_select) if 2==s then say(gameforge.subquest_26._80_say) local a= select(gameforge.locale.guild.yes, gameforge.locale.guild.no) if 2==a then say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._340_say) return end say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._350_say) set_state(__GIVEUP__) return end say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._360_say) end when 1302.kill begin local s = number(1, 100) if s <= 5 and pc.count_item("30116")==0 then pc.give_item2(30116, 1) if pc.count_item("30116")>=1 then local v=find_npc_by_vnum(20008) if 0 != v then target.vid("__TARGET__",v, gameforge.subquest_26._370_targetVid) end end end end when __TARGET__.target.click or 20008.chat.gameforge.subquest_26._250_sendLetter with pc.count_item(30116)>=1 begin target.delete("__TARGET__") say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._380_say) wait() say_title(gameforge.subquest_06._320_sayTitle) say(gameforge.subquest_26._390_say) pc.remove_item(30116,1) say_reward(gameforge.subquest_26._400_sayReward) pc.change_money(50000) say_reward(gameforge.subquest_26._410_sayReward) pc.give_exp2(5000000) clear_letter() set_state(COMPLETE) end end state __GIVEUP__ begin end state COMPLETE begin when enter begin q.done() end end end