quest main_quest_lv72 begin state start begin end state state_0 begin when login or levelup or enter with pc.level >= 72 begin set_state (state_1) end end state state_1 begin when letter begin local v = find_npc_by_vnum (20369) if v != 0 then target.vid ("__TARGET__",v,"") end send_letter(gameforge.main_quest_lv72._10_sendLetter) end when button or info begin say_title(gameforge.main_quest_lv72._10_sendLetter) say (gameforge.main_quest_lv72._20_say) end when 20369.chat.gameforge.main_quest_lv72._10_sendLetter begin target.delete("__TARGET__") say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._30_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._40_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._50_say) set_state (state_2) end end state state_2 begin when letter begin local v = find_npc_by_vnum (20372) if v != 0 then target.vid ("__TARGET__",v,"") end send_letter(gameforge.main_quest_lv72._60_sendLetter) end when button or info begin say_title(gameforge.main_quest_lv72._60_sendLetter) say (gameforge.main_quest_lv72._70_say) end when 20372.click begin target.delete("__TARGET__") say(gameforge.main_quest_lv72._80_say) wait() say_title(mob_name(20372)) say(gameforge.main_quest_lv72._90_say) wait() say_title(mob_name(20372)) say(gameforge.main_quest_lv72._100_say) wait() say(gameforge.main_quest_lv72._110_say) pc.give_item2 (30160, 1) set_state (report_discovery) end end state report_discovery begin when button or info begin return end when 20369.chat.gameforge.main_quest_lv72._60_sendLetter begin pc.remove_item (30160) say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._120_say) wait() say_title ( pc.getname()) say(gameforge.main_quest_lv72._130_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._140_say) wait() say_title ( pc.getname()) say(gameforge.main_quest_lv72._150_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._160_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._170_say) wait() if number (1,2) == 1 then drug = 30009 else drug = 30083 end say_title (locale.reward) say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 3100000)) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(70005))) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(drug))) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(30039))) pc.give_exp2(3100000) pc.give_item2(70005) -- °æÇèÀÇ ¹ÝÁö pc.give_item2(drug) -- ¾Ë¼ö ¾ø´Â ¾à (+ÀÏ ¼öµµ) pc.give_item2(30039) -- Çë°ÒÁ¶°¢ set_state (state_4) end end state state_4 begin when letter begin local v = find_npc_by_vnum (20369) if v != 0 then target.vid ("__TARGET__",v,"") end send_letter(gameforge.main_quest_lv72._180_sendLetter) end when button or info begin say_title(gameforge.main_quest_lv72._180_sendLetter) say(gameforge.main_quest_lv72._190_say) end when 20369.chat.gameforge.main_quest_lv72._180_sendLetter begin target.delete("__TARGET__") say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._200_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._210_say) wait() say_title (gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._220_say) pc.setqf ("collect_beads", 0) set_state (state_5) end end state state_5 begin when letter begin send_letter(gameforge.main_quest_lv72._180_sendLetter) end when button or info begin say_title(gameforge.main_quest_lv72._180_sendLetter) say(gameforge.main_quest_lv72._190_say) end when 1105.kill or 1106.kill or 1107.kill begin if number(1, 100) > 1 then return end local n = pc.getqf ("pass_beads") local i = pc.count_item (31005) if n < 50 and pc.count_item (31005) < 50 - n then notice_multiline(gameforge.main_quest_lv72._240_notice, notice) notice_multiline(string.format(gameforge.main_quest_lv72._250_notice, 50 - n - 1), notice) pc.give_item2 (31005, 1) end end when 20369.chat.gameforge.main_quest_lv72._180_sendLetter with pc.count_item (31005) > 0 begin local now = get_global_time() local today = now - math.mod (now, 86400) local can_report_num if pc.getqf ("last_access_date") != today then pc.setqf ("last_access_date", today) pc.setqf ("blue_bead_todays_report_num", 1) else local reported_num = pc.getqf("blue_bead_todays_report_num") if 10 - reported_num <= 0 then say(gameforge.main_quest_lv72._260_say) return else if not pc.is_gm() then pc.setqf ("blue_bead_todays_report_num", reported_num + 1) end end end pc.remove_item (31005, 1) local n = pc.getqf("pass_beads") if number (1,100) > 60 then say_title (mob_name(20369)) say(gameforge.main_quest_lv72._270_say) return elseif n < 50 -1 then pc.setqf ("pass_beads", n + 1) say_title (gameforge.main_quest_lv66._300_sayTitle) say (string.format(gameforge.main_quest_lv72._280_say, 50 - n - 1)) else pc.setqf("pass_beads", 0) say_title(gameforge.main_quest_lv66._300_sayTitle) say(gameforge.main_quest_lv72._290_say) wait() say_title (locale.reward) say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 20000000)) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 225000)) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(71035).." ".."3"..locale.count_postfix)) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(70043))) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(72024))) pc.give_exp2(20000000) pc.change_money(225000) pc.give_item2(71035) pc.give_item2(71035) pc.give_item2(71035) pc.give_item2(70043) pc.give_item2(72024) wait() say(gameforge.main_quest_lv72._300_say) set_state (__COMPLETE__) q.done() set_quest_state ("main_quest_lv78", "state_0") end end end state __COMPLETE__ begin end end