--2013.02.06 ±è¿ë¿í --Äù½ºÆ® ÁøÇà npc define YACKHWAN 20377 -- ¾à·ÉµµÀå ¾àȯ define SCHOLAR 20380 -- ÇÐÀÚ define ALCHEMIST 20001 -- ¿¬±Ý¼ú»ç define BLACKSMITH 20016 -- ´ëÀåÀåÀÌ define ITEM1_1 31074 -- Ãʸ¶´ÜÀÇ ¸íÆÐ define ITEM1_2 31079 -- ¾àȯ ºÎÇÏÀÇ ¼­½Å define NPC1_1 20393 -- ¾àȯ ºÎÇÏ define DUNGEON_MAP_INDEX 351 define ITEM2_1 31080 -- È­¿°¿ÕÀÇ ÇÇ quest main_quest_flame_lv101 begin state start begin end state state0 begin when login or levelup or enter with pc.level >= 101 begin set_state (state1_1) end end -- µ¿±¼ÀÇ Á¤Ã¼ state state1_1 begin when letter begin send_letter(gameforge.main_quest_flame_lv101._010_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(YACKHWAN) if 0 != v then target.vid("__TARGET__", v, mob_name(YACKHWAN)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._010_sendLetter) say(gameforge.main_quest_flame_lv101._020_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv101._010_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._030_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._040_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._050_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv101._070_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._080_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state1_2) end when leave begin --q.done() end end state state1_2 begin -- ´Ü¼­ X, ºÎÇÏ X when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._090_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._010_sendLetter) q.set_counter_name(gameforge.main_quest_lv97._670_counterName) q.set_counter_value(2) end when button or info begin say_title(gameforge.main_quest_flame_lv101._100_sayTitle) say(gameforge.main_quest_flame_lv101._110_say) say(gameforge.main_quest_lv97._670_counterName) say(string.format(gameforge.main_quest_lv90._1190_say, item_name(ITEM1_1), 1)) say(string.format(gameforge.main_quest_lv90._1190_say, item_name(ITEM1_2), 1)) say() say_reward(gameforge.main_quest_flame_lv101._120_sayReward) end when YACKHWAN.chat.gameforge.main_quest_flame_lv101._010_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._130_say) end when NPC1_1.click begin say(gameforge.main_quest_flame_lv101._140_say) set_state (state1_3) -- ´Ü¼­ X, ºÎÇÏ O end when kill with pc.get_map_index() >= DUNGEON_MAP_INDEX * 10000 and pc.get_map_index() < (DUNGEON_MAP_INDEX + 1) *10000 begin if number(1,100) == 1 then pc.give_item2(ITEM1_1, 1) set_state (state1_4) -- ´Ü¼­ O, ºÎÇÏ X end end when leave begin --q.done() end end state state1_3 begin -- ´Ü¼­ X, ºÎÇÏ O when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._150_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._010_sendLetter) q.set_counter_name(gameforge.main_quest_lv97._670_counterName) q.set_counter_value(1) end when button or info begin say_title(gameforge.main_quest_flame_lv101._100_sayTitle) say(gameforge.main_quest_flame_lv101._110_say) say(gameforge.main_quest_lv97._670_counterName) say(string.format(gameforge.main_quest_lv90._1190_say, item_name(ITEM1_1), 1)) say(string.format(gameforge.main_quest_lv90._1190_say, item_name(ITEM1_2), 0)) say() say_reward(gameforge.main_quest_flame_lv101._120_sayReward) end when YACKHWAN.chat.gameforge.main_quest_flame_lv101._010_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._160_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._180_say) end when kill with pc.get_map_index() >= DUNGEON_MAP_INDEX * 10000 and pc.get_map_index() < (DUNGEON_MAP_INDEX + 1) *10000 begin if number(1,100) == 1 then pc.give_item2(ITEM1_1, 1) set_state ("state1_5") -- ´Ü¼­ O, ºÎÇÏ O end end when leave begin --q.done() end end state state1_4 begin -- ´Ü¼­ O, ºÎÇÏ X when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._190_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._010_sendLetter) q.set_counter_name(gameforge.main_quest_lv97._670_counterName) q.set_counter_value(1) end when button or info begin say_title(gameforge.main_quest_flame_lv101._100_sayTitle) say(gameforge.main_quest_flame_lv101._110_say) say(gameforge.main_quest_lv97._670_counterName) say(string.format(gameforge.main_quest_lv90._1190_say, item_name(ITEM1_1), 0)) say(string.format(gameforge.main_quest_lv90._1190_say, item_name(ITEM1_2), 1)) say() say_reward(gameforge.main_quest_flame_lv101._120_sayReward) end when YACKHWAN.chat.gameforge.main_quest_flame_lv101._010_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._200_say) end when NPC1_1.click begin say(gameforge.main_quest_flame_lv101._140_say) set_state (state1_5) end when leave begin --q.done() end end state state1_5 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._210_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._010_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(YACKHWAN) if 0 != v then target.vid("__TARGET__", v, mob_name(YACKHWAN)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._010_sendLetter) say(gameforge.main_quest_flame_lv101._220_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv101._010_sendLetter begin target.delete("__TARGET__") --¾ÆÀÌÅÛ Á¦°Å pc.remove_item(ITEM1_1, pc.count_item(ITEM1_1)) say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._230_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv101._250_say) wait()--Ãß°¡ ´ëÈ­ say_title(gameforge.main_quest_flame_lv101._260_sayTitle) say(gameforge.main_quest_flame_lv101._270_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._280_say) --º¸»ó wait()--reward say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 37003000)) pc.give_exp2(37003000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 153000)) pc.change_money(153000) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(30047),2)) pc.give_item2(30047, 2) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(27992),2)) -- ¹éÁøÁÖ pc.give_item2(27992, 1) pc.give_item2(27992, 1) say() --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state2_1) end when leave begin --q.done() end end -- Ãʸ¶´ÜÀÇ ¸íÆÐ Çص¶ state state2_1 begin when letter begin send_letter(gameforge.main_quest_flame_lv101._290_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(SCHOLAR) if 0 != v then target.vid("__TARGET__", v, mob_name(SCHOLAR)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._290_sendLetter) say(gameforge.main_quest_flame_lv101._300_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when SCHOLAR.chat.gameforge.main_quest_flame_lv101._290_sendLetter begin target.delete("__TARGET__") say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._310_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._330_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv101._340_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._350_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state2_2) end when leave begin --q.done() end end state state2_2 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._360_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._290_sendLetter) --¾ÆÀÌÅÛ Áö±Þ ¼³Á¤ q.set_counter_name(gameforge.main_quest_lv97._670_counterName) main_quest_flame_lv101.item_count() end when button or info begin say_title(gameforge.main_quest_flame_lv101._100_sayTitle) say(gameforge.main_quest_flame_lv101._520_say) --³²Àº ¾ÆÀÌÅÛ ¾È³»¹® say(gameforge.main_quest_lv97._670_counterName) say(string.format(gameforge.main_quest_lv90._1190_say,item_name(ITEM2_1), 1 - pc.count_item(ITEM2_1))) end when SCHOLAR.chat.gameforge.main_quest_flame_lv101._290_sendLetter begin say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._370_say) end when 2206.kill begin if number(1,100) == 1 then pc.give_item2(ITEM2_1, 1) main_quest_flame_lv101.item_count() end end function item_count() if pc.count_item(ITEM2_1) >= 1 then set_state ("state2_3") end q.set_counter_value(1 - pc.count_item(ITEM2_1)) end when leave begin --q.done() end end state state2_3 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._380_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._290_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(SCHOLAR) if 0 != v then target.vid("__TARGET__", v, mob_name(SCHOLAR)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._290_sendLetter) say(gameforge.main_quest_flame_lv101._390_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when SCHOLAR.chat.gameforge.main_quest_flame_lv101._290_sendLetter begin target.delete("__TARGET__") --¾ÆÀÌÅÛ Á¦°Å pc.remove_item(ITEM2_1, pc.count_item(ITEM2_1)) say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._400_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î wait()--reward say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 48584000)) pc.give_exp2( 48584000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 154000)) pc.change_money(154000) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(72024),1)) -- Çà¿îÀÇ ±ÝÈ­ pc.give_item2_select(72024) item.set_socket(2, 180) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(71094),1)) -- ¼±ÀÎÀÇ ±³ÈÆ pc.give_item2(71094, 1) say() set_state (state2_4) end when leave begin --q.done() end end state state2_4 begin when enter begin --½Ã°£Á¦ÇÑ ¼³Á¤ pc.setqf("limit_time", get_time() + 60*60*24) end when login begin --½Ã°£Á¦ÇÑ ¼³Á¤ local remain_time = pc.getqf("limit_time") - get_time() timer("time_over", remain_time) end when letter begin send_letter(gameforge.main_quest_flame_lv101._290_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(SCHOLAR) if 0 != v then target.vid("__TARGET__", v, mob_name(SCHOLAR)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._290_sendLetter) say(gameforge.main_quest_flame_lv101._390_say) --npc Ÿ°Ù ¾È³»¹® local remain_time = pc.getqf("limit_time") - get_time() local left_hour = math.mod(remain_time / (60 * 60), 24); local left_minute = math.mod(remain_time / 60, 60); say(string.format(gameforge.main_quest_flame_lv101._410_say, left_hour, left_minute)) --say_reward(locale.target_npc_info) end when SCHOLAR.chat.gameforge.main_quest_flame_lv101._290_sendLetter begin say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._420_say) end when time_over.timer begin set_state ("state3_1") end when leave begin pc.setqf("limit_time", 0); --q.done() end end -- ¸íÆÐÀÇ Áø½Ç state state3_1 begin when letter begin send_letter(gameforge.main_quest_flame_lv101._430_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(SCHOLAR) if 0 != v then target.vid("__TARGET__", v, mob_name(SCHOLAR)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._430_sendLetter) say(gameforge.main_quest_flame_lv101._300_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when SCHOLAR.chat.gameforge.main_quest_flame_lv101._430_sendLetter begin target.delete("__TARGET__") say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._440_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv101._450_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv101._340_say) wait()--Ãß°¡ ´ëÈ­ set_state (state3_2) end when leave begin --q.done() end end state state3_2 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv101._470_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv101._430_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(YACKHWAN) if 0 != v then target.vid("__TARGET__", v, mob_name(YACKHWAN)) end end when button or info begin say_title(gameforge.main_quest_flame_lv101._480_sayTitle) say(gameforge.main_quest_flame_lv101._490_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv101._430_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._500_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv101._510_say) wait()--Ãß°¡ ´ëÈ­ say_title(gameforge.main_quest_lv27._120_sayTitle) say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 48584000)) pc.give_exp2( 48584000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 156000)) pc.change_money( 156000) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(71095),1)) -- ÅëÇàÁõ¸í¼­ pc.give_item2(71095, 1) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(72016),1)) -- Á¦3ÀÇ ¼Õ pc.give_item2_select(72016) item.set_socket(2, 60) say() say_title(string.format(gameforge.main_quest_flame_lv99._430_say, 102)) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (__COMPLETE__) set_quest_state ("main_quest_flame_lv102", "state0") end when leave begin --q.done() end end state __COMPLETE__ begin when enter begin --q.done() end end end