--2013.02.12 ±è¿ë¿í --Äù½ºÆ® ÁøÇà npc define YACKHWAN 20377 -- ¾à·ÉµµÀå ¾àȯ define SCHOLAR 20380 -- ÇÐÀÚ define ALCHEMIST 20001 -- ¿¬±Ý¼ú»ç define BLACKSMITH 20016 -- ´ëÀåÀåÀÌ define YUHWAN 20017 -- À¯È¯ define NPC1_1 20393 -- ¾àȯ ºÎÇÏ define MOB4_1 8057 define DUNGEON_MAP_INDEX 351 quest main_quest_flame_lv103 begin state start begin end state state0 begin when login or levelup or enter with pc.level >= 103 begin set_state (state1_1) end end -- Àû·æ¼ºÀ» ÇâÇØ state state1_1 begin when letter begin send_letter(gameforge.main_quest_flame_lv103._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_lv103._010_sendLetter) say(gameforge.main_quest_flame_lv103._020_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._010_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._030_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._040_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv103._220_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._060_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state1_2) end when leave begin --q.done() end end state state1_2 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._070_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._010_sendLetter) --npc Ÿ°Ù local v = find_npc_by_vnum(NPC1_1) if 0 != v then target.vid("__TARGET__", v, mob_name(NPC1_1)) end end when button or info begin say_title(gameforge.main_quest_flame_lv103._080_sayTitle) say(gameforge.main_quest_flame_lv103._090_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._010_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._100_say) end when NPC1_1.click begin target.delete("__TARGET__") say_title(mob_name(NPC1_1)) say(gameforge.main_quest_flame_lv103._110_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state1_3) end when leave begin --q.done() end end state state1_3 begin when letter begin send_letter(gameforge.main_quest_flame_lv103._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_lv103._010_sendLetter) say(gameforge.main_quest_flame_lv103._120_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._010_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._130_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._150_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._170_say) --º¸»ó wait()--reward say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 42554000)) pc.give_exp2( 42554000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 163000)) pc.change_money( 163000) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(71095),1)) pc.give_item2(71095, 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_lv103._180_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_lv103._180_sendLetter) say(gameforge.main_quest_flame_lv103._020_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._180_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._190_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._200_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._210_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv103._220_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state2_2) end when leave begin --q.done() end end state state2_2 begin when enter begin --¸ó½ºÅÍ Ã³Ä¡ ¼ö ¼³Á¤ pc.setqf("kill_count_1", 0) -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._230_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._180_sendLetter) --³²Àº óġ ¼ö ¾È³»¹® q.set_counter_name(gameforge.main_quest_lv98._680_counterName) main_quest_flame_lv103.kill_count_state2_2() end when button or info begin say_title(gameforge.main_quest_flame_lv103._240_sayTitle) say(gameforge.main_quest_flame_lv103._250_say) --³²Àº óġ ¼ö ¾È³»¹® say(gameforge.main_quest_lv98._680_counterName) say(string.format(gameforge.main_quest_lv98._670_sayReward,"Àû·æ¼º ¸¶¹°", 1000 - pc.getqf("kill_count_1"))) say_reward(gameforge.main_quest_flame_lv103._260_sayReward) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._180_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._270_say) end when kill with pc.get_map_index() >= DUNGEON_MAP_INDEX * 10000 and pc.get_map_index() < (DUNGEON_MAP_INDEX + 1) *10000 begin local kill_count = pc.getqf("kill_count_1") pc.setqf("kill_count_1", kill_count+1) main_quest_flame_lv103.kill_count_state2_2() end function kill_count_state2_2() local total_remain = 0 local remain1 = 1000 - pc.getqf("kill_count_1") if remain1 < 0 then remain1 = 0 end total_remain = remain1 q.set_counter_value(total_remain) if total_remain == 0 then set_state ("state2_3") end end when leave begin pc.setqf("kill_count_1", 0) --q.done() end end state state2_3 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._280_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._180_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_lv103._180_sendLetter) say(gameforge.main_quest_flame_lv103._120_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._180_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._290_say) --º¸»ó wait()--reward say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 53784000)) pc.give_exp2(53784000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 164000)) pc.change_money(164000) 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(70024),1)) -- ÃູÀÇ ±¸½½ pc.give_item2(70024, 1) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(30039),3)) -- Çë°ÒÁ¶°¢ pc.give_item2(30039, 3) say() --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state3_1) end when leave begin --q.done() end end -- Àû·æ¼ºÀÇ °ñÄ©°Å¸® state state3_1 begin when letter begin send_letter(gameforge.main_quest_flame_lv103._300_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_lv103._300_sendLetter) say(gameforge.main_quest_flame_lv103._020_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._300_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._310_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv103._220_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state3_2) end when leave begin --q.done() end end state state3_2 begin when enter begin --¸ó½ºÅÍ Ã³Ä¡ ¼ö ¼³Á¤ pc.setqf("kill_count_1", 0) pc.setqf("kill_count_2", 0) pc.setqf("kill_count_3", 0) pc.setqf("kill_count_4", 0) pc.setqf("kill_count_5", 0) -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._330_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._300_sendLetter) --³²Àº óġ ¼ö ¾È³»¹® q.set_counter_name(gameforge.main_quest_lv98._680_counterName) main_quest_flame_lv103.kill_count_state3_2() end when button or info begin say_title(gameforge.main_quest_flame_lv103._340_sayTitle) say(gameforge.main_quest_flame_lv103._350_say) --³²Àº óġ ¼ö ¾È³»¹® say(gameforge.main_quest_lv98._680_counterName) local total_remain = 0 local remain1 = 50 - pc.getqf("kill_count_1") if remain1 < 0 then remain1 = 0 end total_remain = total_remain + remain1 local remain2 = 50 - pc.getqf("kill_count_2") if remain2 < 0 then remain2 = 0 end total_remain = total_remain + remain2 local remain3 = 50 - pc.getqf("kill_count_3") if remain3 < 0 then remain3 = 0 end total_remain = total_remain + remain3 local remain4 = 50 - pc.getqf("kill_count_4") if remain4 < 0 then remain4 = 0 end total_remain = total_remain + remain4 local remain5 = 50 - pc.getqf("kill_count_5") if remain5 < 0 then remain5 = 0 end say(string.format(gameforge.main_quest_lv98._690_sayReward ,mob_name(6005), remain1,mob_name(6006), remain2)) say(string.format(gameforge.main_quest_lv98._690_sayReward ,mob_name(6007), remain3,mob_name(6008), remain4)) say(string.format(gameforge.main_quest_lv98._670_sayReward,mob_name(6009), remain5)) say_reward(gameforge.main_quest_flame_lv103._260_sayReward) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._300_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._360_say) end when 6005.kill begin local kill_count = pc.getqf("kill_count_1") pc.setqf("kill_count_1", kill_count+1) main_quest_flame_lv103.kill_count_state3_2() end when 6006.kill begin local kill_count = pc.getqf("kill_count_2") pc.setqf("kill_count_2", kill_count+1) main_quest_flame_lv103.kill_count_state3_2() end when 6007.kill begin local kill_count = pc.getqf("kill_count_3") pc.setqf("kill_count_3", kill_count+1) main_quest_flame_lv103.kill_count_state3_2() end when 6008.kill begin local kill_count = pc.getqf("kill_count_4") pc.setqf("kill_count_4", kill_count+1) main_quest_flame_lv103.kill_count_state3_2() end when 6009.kill begin local kill_count = pc.getqf("kill_count_5") pc.setqf("kill_count_5", kill_count+1) main_quest_flame_lv103.kill_count_state3_2() end function kill_count_state3_2() local total_remain = 0 local remain1 = 50 - pc.getqf("kill_count_1") if remain1 < 0 then remain1 = 0 end total_remain = total_remain + remain1 local remain2 = 50 - pc.getqf("kill_count_2") if remain2 < 0 then remain2 = 0 end total_remain = total_remain + remain2 local remain3 = 50 - pc.getqf("kill_count_3") if remain3 < 0 then remain3 = 0 end total_remain = total_remain + remain3 local remain4 = 50 - pc.getqf("kill_count_4") if remain4 < 0 then remain4 = 0 end total_remain = total_remain + remain4 local remain5 = 50 - pc.getqf("kill_count_5") if remain5 < 0 then remain5 = 0 end total_remain = total_remain + remain5 q.set_counter_value(total_remain) if total_remain == 0 then set_state ("state3_3") end end when leave begin pc.setqf("kill_count_1", 0) pc.setqf("kill_count_2", 0) pc.setqf("kill_count_3", 0) pc.setqf("kill_count_4", 0) pc.setqf("kill_count_5", 0) --q.done() end end state state3_3 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._370_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._300_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_lv103._300_sendLetter) say(gameforge.main_quest_flame_lv103._120_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._300_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._380_say) --º¸»ó wait()--reward say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 54491000)) pc.give_exp2(54491000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 166000)) pc.change_money(166000) 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(72001),1)) -- °æÇèÀÇ ¹ÝÁö pc.give_item2_select(72001) item.set_socket(2, 60) say() --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state4_1) end when leave begin --q.done() end end -- ¾ß¸¶Ãµ Åä¹ú1-1 state state4_1 begin when letter begin send_letter(gameforge.main_quest_flame_lv103._390_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_lv103._390_sendLetter) say(gameforge.main_quest_flame_lv103._020_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._390_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._400_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv103._220_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state4_2) end when leave begin --q.done() end end state state4_2 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._410_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._390_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_lv103._080_sayTitle) say(gameforge.main_quest_flame_lv103._420_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when SCHOLAR.chat.gameforge.main_quest_flame_lv103._390_sendLetter begin target.delete("__TARGET__") say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv103._430_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv103._440_say) wait()--Ãß°¡ ´ëÈ­ say_title(mob_name(SCHOLAR)) say(gameforge.main_quest_flame_lv103._460_say) wait()--Ãß°¡ ´ëÈ­ say_title(pc.getname()) say(gameforge.main_quest_flame_lv103._220_say) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (state4_3) end when leave begin --q.done() end end state state4_3 begin when enter begin --¸ó½ºÅÍ Ã³Ä¡ ¼ö ¼³Á¤ pc.setqf("kill_count_1", 0) -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._480_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._390_sendLetter) --³²Àº óġ ¼ö ¾È³»¹® q.set_counter_name(gameforge.main_quest_lv98._680_counterName) main_quest_flame_lv103.kill_count_state4_3() end when button or info begin say_title(gameforge.main_quest_flame_lv103._490_sayTitle) say(gameforge.main_quest_flame_lv103._500_say) --³²Àº óġ ¼ö ¾È³»¹® say(gameforge.main_quest_flame_lv103._510_say) say(string.format(gameforge.main_quest_lv90._1190_say,mob_name(MOB4_1), 1 - pc.getqf("kill_count_1"))) say_reward(gameforge.main_quest_flame_lv103._260_sayReward) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._390_sendLetter begin say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._520_say) end when MOB4_1.kill begin local kill_count = pc.getqf("kill_count_1") pc.setqf("kill_count_1", kill_count+1) main_quest_flame_lv103.kill_count_state4_3() end function kill_count_state4_3() local total_remain = 0 local remain1 = 1 - pc.getqf("kill_count_1") if remain1 < 0 then remain1 = 0 end total_remain = total_remain + remain1 q.set_counter_value(total_remain) if total_remain == 0 then set_state ("state4_4") end end when leave begin pc.setqf("kill_count_1", 0) --q.done() end end state state4_4 begin when enter begin -- notice ¼³Á¤ notice_multiline(gameforge.main_quest_flame_lv103._530_notice,notice) end when letter begin send_letter(gameforge.main_quest_flame_lv103._390_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_lv103._390_sendLetter) say(gameforge.main_quest_flame_lv103._120_say) --npc Ÿ°Ù ¾È³»¹® --say_reward(locale.target_npc_info) end when YACKHWAN.chat.gameforge.main_quest_flame_lv103._390_sendLetter begin target.delete("__TARGET__") say_title(mob_name(YACKHWAN)) say(gameforge.main_quest_flame_lv103._540_say) --º¸»ó wait()--reward say_reward(string.format(gameforge.main_quest_lv60._190_sayReward, 49586000)) pc.give_exp2(49586000) say_reward(string.format(gameforge.main_quest_lv60._200_sayReward, 167000)) pc.change_money(167000) 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(31078),1)) -- Á¤È­¾× -- ¼öÁ¤ pc.give_item2(31078, 1) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(30015),2)) -- »ç±ÍÀÇ À¯Ç° pc.give_item2(30015, 2) say_reward(string.format(gameforge.main_quest_lv60._210_sayReward, item_name(70043),1)) -- µµµÏÀÇ Àå°© pc.give_item2_select(70043) item.set_socket(2, 60) say() say_title(string.format(gameforge.main_quest_flame_lv99._430_say, 104)) --´ÙÀ½ ½ºÅ×ÀÌÆ®·Î set_state (__COMPLETE__) set_quest_state ("main_quest_flame_lv104", "state0") end when leave begin --q.done() end end state __COMPLETE__ begin when enter begin --q.done() end end end