Nightwish 16 Posted March 29, 2014 Share Posted March 29, 2014 Hello, I have two problems. 1. The blazing purgatory quest stops at one point. Everysting works beside this part. Its the level where you have to kill all mobs spawning in one area. Here is the part of the quest wich seems buggy. [FULL QUEST, .DE Files] define BLOCK_DOOR 20387 define DUNGEON_MAN 20385 define DUNGEON_MAN_DIR 0 define DUNGEON_MAP_INDEX 351 define ENTER_LIMIT_TIME 30 define ENTRY_MAN 20394 define ENTRY_MAP_INDEX 62 define FINAL_BOSS 6091 define LEVEL2_KEY 30329 define LEVEL2_STONE 20386 define LEVEL4_TARGET 6051 define LEVEL5_REALKEY 30330 define LEVEL5_STONE 20386 define LEVEL5_GEN_LIMIT 100 define LEVEL6_TARGET 8057 define LEVEL_CUT 100 define MOB_REGEN_FILE_PATH = "data/dungeon/flame_dungeon/" define IN_DOOR 20388 define NPC_REGEN_FILE_PATH = "data/dungeon/flame_dungeon/npc.txt" define TICKET_GROUP 10033 define LIMITED_PASS_TICKET 71175 quest flame_dungeon begin state start begin when ENTRY_MAN.click with pc.get_level() >= 90 begin pc.give_item2(LIMITED_PASS_TICKET, 1) set_state(run) end end state run begin function setting() return { ["bossroom_entry_pos"] = {8109,6867}, ["boss_pos"] = {686,637}, ["doors_pos"] = { {320,394}, {293,359}, {333,321}, {378,320}, {400,355}, {394,401} }, ["idoors_pos"] = { {268,447}, {234,359}, {300,264}, {454,217}, {470,355}, {467,469} }, ["doors_dir"] = {135,90,210,152,90,223}, ["idoors_dir"] = {135,90,210,135,90,239}, ["dungeon_entry_pos"] = {7762, 6739},-- ´øÀü¿¡ óÀ½ µé¾î¿À´Â °÷ ["DUNGEON_MAN_bpos"] = {690,722}, ["DUNGEON_MAN_pos"] = {354,362}, ["LEVEL2_STONE_pos"] = {195,352}, ["LEVEL4_TARGET_pos"] = {470,175}, ["LEVEL5_STONE_pos"] = { {486, 345}, {511, 336}, {525, 349}, {521, 365}, {503, 372}, {486, 365}, {500, 354} }, ["LEVEL6_TARGET_pos"] = {511,480}, ["outside_entry_pos"] = {6142,7068}, --ÀÔÀå½ÃÄÑÁÖ´Â¾Ö ¼ÀÖ´Â °÷ ["YAK_pos"] = {376, 397} -- ¾àȯ ºÎÇÏ } end function is_flamed(idx) -- Àû·æ¼º¿¡ ÀÖ´ÂÁö È®ÀÎ return idx >= DUNGEON_MAP_INDEX * 10000 and idx < (DUNGEON_MAP_INDEX + 1) *10000 end function make_dungeon() -- ´øÀü ¸¸µé±â local setting = flame_dungeon.setting() d.new_jump_party(DUNGEON_MAP_INDEX, setting.dungeon_entry_pos[1], setting.dungeon_entry_pos[2]) -- d.spawn_mob_ac_dir(DUNGEON_MAN, setting.DUNGEON_MAN_pos[1], setting.DUNGEON_MAN_pos[2],DUNGEON_MAN_DIR) -- d.spawn_mob(YAK,setting.YAK_pos[1],setting.YAK_pos[2]) d.regen_file(NPC_REGEN_FILE_PATH) d.setf("level",0) for i=1,6 do d.set_unique("door"..i, d.spawn_mob_ac_dir(BLOCK_DOOR, setting.doors_pos[i][1], setting.doors_pos[i][2],setting.doors_dir[i])) end for i=1,6 do d.set_unique("idoor"..i, d.spawn_mob_ac_dir(IN_DOOR, setting.idoors_pos[i][1], setting.idoors_pos[i][2],setting.idoors_dir[i])) end d.setf("clear_count",0) d.setf("started",0) d.setf("dungeon_enter",0) -- Á¤»óÀûÀ¸·Î ÀÔÀåÇß´ÂÁö? // ºñÁ¤»ó : 0 Á¤»ó : 1 // ƨ±â¸é ÀÔÀåÁ¦Çѽð£À» ±â·Ï ¾ÈÇÔ end function go_boss() -- º¸½º·ë °¡±â local setting = flame_dungeon.setting() if pc.get_level() < 104 then --·¹º§È®ÀÎ -- syschat(gameforge.flame_dungeon._580_notice) say(gameforge.flame_dungeon._580_notice) return else if pc.getf("main_quest_flame_lv103", "__status")==main_quest_flame_lv103.__COMPLETE__ then -- ¼±ÇàÄù½ºÆ® È®ÀÎ -- say_title(gameforge.flame_dungeon._010_say) say(gameforge.flame_dungeon._010_say) local warp = select(gameforge.flame_dungeon._020_select,gameforge.flame_dungeon._030_select) if warp == 1 then d.setf("level",17) d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2]) d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_fild_boss.txt") -- d.spawn_mob(DUNGEON_MAN,setting.DUNGEON_MAN_bpos[1],setting.DUNGEON_MAN_bpos[2]) d.spawn_mob(FINAL_BOSS,setting.boss_pos[1],setting.boss_pos[2]) end else -- syschat(gameforge.flame_dungeon._040_notice) say(gameforge.flame_dungeon._040_notice) return end end end function level_clear() -- ·¹º§ ²£À»¶§, ¸®Á¨Å¬¸®¾î, Áö¿ªÅ¬¸®¾î d.setf("level",0) d.clear_regen() d.purge_area(750000,620000,817400,689400) -- ¸ÊÀüü -- d.purge() »ç¿ë°í·Á end function clear_timer(inx) -- ŸÀÌ¸Ó ´ÙÁö¿ì±â clear_server_timer ("flame_dungeon_0m_left_timer", inx) clear_server_timer ("flame_dungeon_1m_left_timer", inx) clear_server_timer ("flame_dungeon_5m_left_timer", inx) clear_server_timer ("flame_dungeon_10m_left_timer", inx) clear_server_timer ("flame_dungeon_15m_left_timer", inx) clear_server_timer ("flame_dungeon_30m_left_timer", inx) clear_server_timer ("flame_dungeon_45m_left_timer", inx) clear_server_timer ("killed_A_1", inx) clear_server_timer ("killed_A_2", inx) clear_server_timer ("flame_dungeon_ticket_remove", inx) end when login begin local idx = pc.get_map_index() local setting = flame_dungeon.setting() if idx == DUNGEON_MAP_INDEX then pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX) elseif flame_dungeon.is_flamed(idx) then -- ´øÀü ÀÔÀå, º¸½º·ë ÀÔÀå ¿¹¿Ü ------------------------------------------------------------------------------------------------------------------------------------------------------ --¾Æ·¡ÀÇ µÎÁÙÁß À§¿¡ÁÙÀ» »ç¿ëÇÏ¸é ´øÀü¿¡¼ Á¾·áÇßÀ»°æ¿ì ´Ù½Ã ¿ø·¡ À§Ä¡·Î µ¹¾Æ¿Â´Ù. ¾Æ·¡ÁÙÀ» È°¼ºÈ ÇÏ¸é ´øÀü¿¡¼ Á¾·áÇßÀ» °æ¿ì ´øÀü ¹ÛÀ¸·Î ³ª°¡°Ô µÈ´Ù. --´øÀü¿¡¼ Á¾·áÇßÀ» °æ¿ì ´Ù½Ã ¿ø·¡ À§Ä¡·Î µ¹¾Æ¿Ã °æ¿ì, ´øÀü¿¡¼ ³ª°¡´Â ¹æ¹ýÀ» ¸¸µé¾îÁà¾ß Çϱ⠶§¹®¿¡ Àû·æ¼ººñÀÇ ³ª°¡±â¶õ ¿É¼ÇÀ» È°¼ºÈ ÇØÁà¾ß ÇÑ´Ù. ------------------------------------------------------------------------------------------------------------------------------------------------------ -- pc.set_warp_location(0, 0 , 0) --ƨ°åÀ»¶§ ´Ù½Ã µ¹¾Æ¿À°Ô ¸¸µé¾î ÁÖ´Â ºÎºÐ pc.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) -- ´øÀü ³ª°¬À» ¶§ ¹ÛÀ¸·Î ƨ±â°ÔÇÔ local ticketGroup = {get_special_item_group (TICKET_GROUP)} if d.getf("dungeon_enter") == 0 then -- ÁøÇàÁßÀÌ ¾Æ´Ï¸é local canPass = false for i=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then canPass = true break end end if get_global_time() - pc.getf("flame_dungeon","exit_time") < ENTER_LIMIT_TIME * 60 then -- ÀÔÀåÁ¦Çѽð£ÀÌ °É·ÈÀ¸¸é notice_multiline(gameforge.flame_dungeon._050_notice,d.notice) say(gameforge.flame_dungeon._060_say) timer("flame_dungeon_warp_timer", 5) elseif not canPass then notice_multiline(gameforge.flame_dungeon._070_notice,d.notice) say(gameforge.flame_dungeon._080_say) timer("flame_dungeon_warp_timer", 5) elseif pc.get_level() < 100 then notice_multiline(gameforge.flame_dungeon._090_notice,d.notice) say(gameforge.flame_dungeon._100_say) timer("flame_dungeon_warp_timer", 5) end elseif pc.getf("flame_dungeon","ticket_delete") == 0 then -- ÁøÇàÁßÀε¥ ƼÄÏÀÌ ¾ÈÁö¿öÁ³À»°æ¿ì for i=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then pc.remove_item(ticketGroup[i], ticketGroup[i+1]) break end end pc.setf("flame_dungeon","ticket_delete",1) end else pc.setf("flame_dungeon","ticket_delete",0) end end when flame_dungeon_warp_timer.timer begin local setting = flame_dungeon.setting() pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX) end when logout begin local idx = pc.get_map_index() if flame_dungeon.is_flamed(idx) then if d.getf("dungeon_enter") == 1 then -- Á¤»óÀûÀÎ ´øÀü ÀÔÀå ÈÄ ·Î±×¾Æ¿ô pc.setf("flame_dungeon","exit_time",get_global_time()) -- ÀνºÅϽº ¾È¿¡¼ÀÇ ¸¶Áö¸· ½Ã°£À» ±â·Ï, ±Ùµ¥ ½Ã°£Á¦ÇÑ ¶§¹®¿¡ or ±×³É ƨ±ä°Å¸é ¾È±â·Ï end end end when ENTRY_MAN.chat.gameforge.flame_dungeon._110_npcChat begin local setting = flame_dungeon.setting() if party.is_party() then -- ´øÀü µµÁß ³ª°¥ °æ¿ì ÀçÀÔÀå °¡´ÉÇϵµ·Ï local party_check = 0 if d.find(party.getf("dungeon_index")) then party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid()) end if d.find(party.getf("dungeon_index")) and party_check then if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then -- Á¢Á¾ ÀÌÈÄ 5ºÐ ³»? local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index")) if dungeon_level == 17 then -- º¸½º pc.warp(setting.bossroom_entry_pos[1] * 100, setting.bossroom_entry_pos[2] * 100, party.getf("dungeon_index")) else pc.warp(setting.dungeon_entry_pos[1] * 100, setting.dungeon_entry_pos[2] * 100, party.getf("dungeon_index")) end else -- 5ºÐ ÃÊ°úÇÏ¿© Àç ÀÔÀå ºÒ°¡ say_title(mob_name(ENTRY_MAN)) say(gameforge.flame_dungeon._590_say) end else local pids = {party.get_member_pids()} local noTicketMembers = {} local notEnoughLevelMembers = {} local ticketCheck = true local levelCheck = true local ticketGroup = {get_special_item_group (TICKET_GROUP)} for i, pid in next, pids, nil do q.begin_other_pc_block(pid) local canPass = false for idx=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then canPass = true break end end if not canPass then table.insert(noTicketMembers, pc.get_name()) ticketCheck = false end if pc.level < LEVEL_CUT then table.insert(notEnoughLevelMembers, pc.get_name()) levelCheck = false end q.end_other_pc_block() end if not ticketCheck then say_title(mob_name(ENTRY_MAN)) say(gameforge.flame_dungeon._610_say) for i, name in next, noTicketMembers, nil do say(color(1,1,0), " "..name) end if levelCheck then return else wait() end end if not levelCheck then say_title(mob_name(ENTRY_MAN)) say(gameforge.flame_dungeon._630_say) for i, name in next, notEnoughLevelMembers, nil do say(color(1,1,0), " "..name) end return end if party.is_leader() then say(gameforge.flame_dungeon._120_say) local warp = select(gameforge.flame_dungeon._130_select,gameforge.flame_dungeon._140_select) if warp == 1 then if party.is_map_member_flag_lt("exit_time", get_global_time() - ENTER_LIMIT_TIME * 60 ) then flame_dungeon.make_dungeon() else --say("test : ÆÄƼ¿øÀÇ ÀÔÀå Á¦Çѽð£ÀÌ ³¡³ªÁö ¾Ê¾Ò½À´Ï´Ù.") say(gameforge.flame_dungeon._600_say) end end party.setf("flame_dungeon_boss_kill_count", 0) else say(gameforge.flame_dungeon._150_say) end end else say(gameforge.flame_dungeon._160_say) end end -- when ENTRY_MAN.chat."Test : ¸®¼Ò½ºÈ®ÀÎ" with is_test_server() begin -- Å×½ºÆ®¿ë -- local setting = flame_dungeon.setting() -- pc.setf("flame_dungeon","fdRtest",1) -- pc.warp( setting.dungeon_entry_pos[1]*100, setting.dungeon_entry_pos[2]*100, DUNGEON_MAP_INDEX) -- end when ENTRY_MAN.chat."TEST : Init time limit init" with is_test_server() begin -- Å×½ºÆ®¿ë pc.setf("flame_dungeon","exit_time",get_global_time()-1800) say("Done") end -- when DUNGEON_MAN.chat."Test : ÇöÀç »óÅÂ" with is_test_server() begin -- Å×½ºÆ®¿ë -- say("³²Àº ¸ó½ºÅÍ : "..d.count_monster()) -- say("level : "..d.getf("level")) -- say("Dmap index : "..d.get_map_index()) -- say("Pmap index : "..pc.get_map_index()) -- say("access limit : "..pc.getf("flame_dungeon","exit_time")) -- say("global time : "..get_global_time()) -- if flame_dungeon.is_flamed(d.get_map_index()) then -- say("in dungeon") -- is_flamed ÇÔ¼ö üũ -- end -- if d.is_unique_dead("stone1") then -- say("stone1 is dead") -- else -- say("stone1 is not dead") -- end -- end -- when DUNGEON_MAN.chat."óÀ½À¸·Î" begin -- Å×½ºÆ®¿ë -- say("ÃʱâÈ ÇÕ´Ï´Ù") -- flame_dungeon.clear_timer(d.get_map_index()) -- flame_dungeon.make_dungeon() -- end when DUNGEON_MAN.chat."Test : Boss Room" with is_test_server() begin -- Å×½ºÆ®¿ë flame_dungeon.go_boss() end -- < ½Ã°£ °æ°ú ŸÀ̸Ó> -- when DUNGEON_MAN.chat."³ª°¡±â" begin -- ´øÀü¿¡¼ ƨ±âÁö ¾Ê°Ô ÇÒ °æ¿ì È°¼ºÈ -- local setting = flame_dungeon.setting() -- say("¹ÛÀ¸·Î ³ª°¡½Ã°Ú½À´Ï±î?") -- local warp = select("È®ÀÎ","Ãë¼Ò") -- if warp == 1 then -- pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX) -- end -- end when flame_dungeon_45m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 45),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_30m_left_timer', 15*60, get_server_timer_arg()) end end when flame_dungeon_30m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 30),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_15m_left_timer', 15*60, get_server_timer_arg()) end end when flame_dungeon_15m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 15),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_5m_left_timer', 10*60, get_server_timer_arg()) end end when flame_dungeon_5m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 5),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_1m_left_timer', 4*60, get_server_timer_arg()) end end when flame_dungeon_1m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 1),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer ("flame_dungeon_0m_left_timer", 60, get_server_timer_arg()) end end when flame_dungeon_0m_left_timer.server_timer begin local setting = flame_dungeon.setting() if d.select(get_server_timer_arg()) then notice_multiline(gameforge.flame_dungeon._190_notice,d.notice) notice_multiline(gameforge.flame_dungeon._200_notice,d.notice) server_timer("dungeon_end_timer",10,d.get_map_index()) end end -- <<<< ´øÀü ÁøÇà>>>> -- when DUNGEON_MAN.chat.gameforge.flame_dungeon._210_npcChat with npc.lock() begin -- '0x'´Â x¹ø° ·¹º§ Äù½ºÆ® ¹ÞÀ» ¼ö ÀÖ´Â »óÅ , '1x'´Â x¹ø° ·¹º§ Äù½ºÆ® ÁøÇàÁß local setting = flame_dungeon.setting() if d.getf("started") == 0 then say(gameforge.flame_dungeon._230_say) say(gameforge.flame_dungeon._240_say) wait() d.setf("started",1) -- ÆÄƼ¿øÀÌ Æ¨°Ü¹ö·È´Âµ¥ Àڱ⸸ ³²¾Æ¼ exit timer°¡ ¸®¼ÂµÇ¸é ¾ÈµÇ´Ï±ñ ´ÙÀ½·¹º§À» ´·¶À»¶§¸¦ ½ÃÀÛÇÒ¶§·Î º½ server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index()) notice_multiline(gameforge.flame_dungeon._250_notice,d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) -- ÅëÇàÁõ °ü·ÃµÈ ó¸® -- ÀÔÀå ÈÄ¿¡ ƼÄÏÀ» ¾ø¾Ø »ç¶÷À» ƨ°Ü³»±â À§Çؼ ŸÀ̸Ӹ¦ ÀÌ¿ëÇØ Æ¼ÄÏÀ» Á¦°ÅÇÑ´Ù. local pids = {party.get_member_pids()} local ticketGroup = {get_special_item_group (TICKET_GROUP)} for i, pid in next, pids, nil do q.begin_other_pc_block(pid) local canPass = false for idx=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then canPass = true pc.remove_item(ticketGroup[idx], ticketGroup[idx+1]) break end end if not canPass then pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, ENTRY_MAP_INDEX) end q.end_other_pc_block() end d.setqf2("flame_dungeon","ticket_delete",1) d.setf("dungeon_enter",1) -- ´øÀü°ú ÆÄƼ¿¡ ¼·Î¿¡ ´ëÇÑ Á¤º¸¸¦ ÀúÀåÇÑ´Ù. party.setf("dungeon_index", d.get_map_index()) d.setf("party_leader_pid", party.get_leader_pid()) end if d.getf("level") < 7 then --ÁøÇàÁßÀÌ ¾Æ´Ï¸é if d.getf("clear_count") == 6 then -- ¹æ ¿©¼¸°³ ÇßÀ¸¸é º¸½º¹æ d.setf("level",7) else local rand = number(1,6)--·£´ý¿¡¼ ¹æ¹®Ã¼Å©´Â µû·Î ¹è¿¾øÀÌ ¹æÀÇ ¹®ÀÇ ¿·ÁÀÖ´ÂÁö·Î üũÇÔ local setlev = 0 d.setf("level",7) -- Ȥ½Ã ¸ð¸¦ ¹®Á¦°¡ »ý°Ü ·¹º§ÀÌ ¾ÈÀâÈú°æ¿ì¸¦ ´ëºñÇØ º¸½º·ëÀ¸·Î ¼ÂÆÃÇØµÒ for i=1,50 do setlev = setlev + 1 if setlev > 6 then setlev = 1 end if not d.is_unique_dead("door"..setlev) then rand = rand - 1 if rand == 0 then d.setf("level",setlev) d.setf("clear_count",d.getf("clear_count")+1) break end end end end end if d.getf("level") == 1 then say(gameforge.flame_dungeon._260_say) notice_multiline(gameforge.flame_dungeon._260_say,d.notice) d.kill_unique("door1") d.kill_unique("idoor1") d.setf("level",11) d.regen_file (MOB_REGEN_FILE_PATH.."fd_a.txt") server_timer ("killed_A_1", 12, d.get_map_index()) elseif d.getf("level") == 11 then say(gameforge.flame_dungeon._270_say) say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster()) elseif d.getf("level") == 2 then say(gameforge.flame_dungeon._290_say) say(gameforge.flame_dungeon._300_say) notice_multiline(gameforge.flame_dungeon._290_say,d.notice) notice_multiline(gameforge.flame_dungeon._300_say,d.notice) d.spawn_mob(LEVEL2_STONE, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- ºÀÀμ® ¼Òȯ d.kill_unique("door2") d.kill_unique("idoor2") d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_b.txt") d.setf("level",12) elseif d.getf("level") == 12 then say(gameforge.flame_dungeon._310_say) elseif d.getf("level") == 3 then say(gameforge.flame_dungeon._260_say) notice_multiline(gameforge.flame_dungeon._260_say,d.notice) d.kill_unique("door3") d.kill_unique("idoor3") d.setf("level",13) d.regen_file (MOB_REGEN_FILE_PATH.."fd_c.txt") server_timer ("killed_A_1", 12, d.get_map_index()) elseif d.getf("level") == 13 then say(gameforge.flame_dungeon._270_say) say_title(gameforge.flame_dungeon._280_sayTitle..d.count_monster()) elseif d.getf("level") == 4 then -- 474 178 say(gameforge.flame_dungeon._320_notice) notice_multiline(gameforge.flame_dungeon._320_notice,d.notice) d.setf("level",14) d.kill_unique("door4") d.kill_unique("idoor4") d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_d.txt") d.spawn_mob(LEVEL4_TARGET,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) -- Ÿ°Ù¸ó½ºÅÍ ¼ÒÇÑ elseif d.getf("level") == 14 then say(gameforge.flame_dungeon._330_say) say(gameforge.flame_dungeon._340_say) elseif d.getf("level") == 5 then -- 510 355 say(gameforge.flame_dungeon._350_say) say(gameforge.flame_dungeon._360_say) notice_multiline(gameforge.flame_dungeon._350_say,d.notice) notice_multiline(gameforge.flame_dungeon._360_say,d.notice) d.kill_unique("door5") d.kill_unique("idoor5") d.setf("level",15) d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") local vis = { 0,0,0,0,0,0,0} for i=1,7 do vis[i] = 0 end for i = 1, 7 do -- ·£´ýÇÏ°Ô µ¹¼Òȯ local ran = number(1,7) local st = 0 for j = 1, 50 do st = st + 1 if st > 7 then st = 1 end if vis[st] == 0 then ran = ran - 1 if ran == 0 then vis[st] = 1 d.set_unique("stone5_"..st, d.spawn_mob(LEVEL5_STONE, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2])) break end end end end elseif d.getf("level") == 15 then say(gameforge.flame_dungeon._370_say) elseif d.getf("level") == 6 then -- 507 490 say(gameforge.flame_dungeon._380_say) notice_multiline(gameforge.flame_dungeon._380_say,d.notice) d.setf("level",16) d.kill_unique("door6") d.kill_unique("idoor6") d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_f.txt") d.spawn_mob(LEVEL6_TARGET, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) -- Ÿ°Ù¿ÀºêÁ§Æ® ¼Òȯ elseif d.getf("level") == 16 then say(gameforge.flame_dungeon._390_say) say(gameforge.flame_dungeon._400_say) elseif d.getf("level") == 7 then -- setskin(NOWINDOW) flame_dungeon.go_boss() else say(gameforge.flame_dungeon._410_say) end npc.unlock() end when dungeon_end_timer.server_timer begin -- Á¾·á ŸÀÌ¸Ó (³¡³ª°í ³ª°¡´Â°Å) local setting = flame_dungeon.setting() if d.select(get_server_timer_arg()) then flame_dungeon.clear_timer(d.get_map_index()) d.set_warp_location(ENTRY_MAP_INDEX, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) d.exit_all() d.setf("party_leader_pid", 0) end end when killed_A_1.server_timer begin -- ŸÀÌ¸Ó µ¹¸®±â1 (level1,level3) if d.select(get_server_timer_arg()) then if d.count_monster() <= 0 then -- 1·¹º§ ¸ó½ºÅÍ Àü¸ê½Ã if d.getf("level") == 11 then notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) else notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) end d.setf("level",0) else server_timer ("killed_A_2", 6, get_server_timer_arg()) end end end when killed_A_2.server_timer begin -- ŸÀÌ¸Ó µ¹¸®±â2 (1°ú 2 ¹ø°¥¾Æ°¡¸é¼ µ¹¾Æ°¨) if d.select(get_server_timer_arg()) then if d.count_monster() <= 0 then -- 1·¹º§ ¸ó½ºÅÍ Àü¸ê½Ã if d.getf("level") == 11 then notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) else notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) end d.setf("level",0) else server_timer ("killed_A_1", 6, get_server_timer_arg()) end end end when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 12 begin -- 2·¹º§ ºÀÀμ® ¿¼è µå¶ø local i = number(1, 100) -- 100ºÐÀÇ 1 È®·ü·Î ¿¼èµå¶ø if i == 1 then game.drop_item (LEVEL2_KEY, 1) end end when LEVEL2_STONE.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == LEVEL2_KEY and d.getf("level") == 12 begin -- 2·¹º§ ¿¼è ¸Ô¾úÀ»¶§ local i = number(1, 5) -- 5ºÐÀÇ 1 È®·ü·Î ÁøÂ¥ ¿¼è if i == 1 then npc.purge() item.remove() notice_multiline(gameforge.flame_dungeon._440_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() else item.remove() say(gameforge.flame_dungeon._450_say) end end when LEVEL4_TARGET.kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin notice_multiline(gameforge.flame_dungeon._460_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() end when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin -- 5·¹º§ ºÀÀμ® ¿¼è µå¶ø local i = number(1, 30) -- 30ºÐÀÇ 1 È®·ü·Î ¿¼èµå¶ø if i == 1 then game.drop_item (LEVEL5_REALKEY, 1) end end when LEVEL5_STONE.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == LEVEL5_REALKEY and d.getf("level") == 15 begin -- 5·¹º§ ÁøÂ¥¿¼è ¸Ô¾úÀ»¶§ local setting = flame_dungeon.setting() if npc.get_vid() == d.get_unique_vid("stone5_1") then -- ù¹ø° ²¨´Â ¼±ÇàµÇ¾î¾ß ÇÒ ÀÏÀÌ ÇÊ¿ä¾øÀ¸´Ï ãÀÚ¸¶ÀÚ Á¦°ÅÇØÁÜ npc.purge() item.remove() say(gameforge.flame_dungeon._470_say) d.setf("stonekill",2) -- 2¹ø µ¹À» Á׿©¶ó if d.count_monster() < LEVEL5_GEN_LIMIT then d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") end elseif npc.get_vid() == d.get_unique_vid("stone5_2") then if d.getf("stonekill") == 2 then -- 2¹øµ¹À» Á×ÀÏ Â÷·Ëµ¥ 2¹øµ¹¿¡°Ô ¿¼è¸¦ ¸Ô¿´À» ¶§ npc.purge() item.remove() say(gameforge.flame_dungeon._480_say) d.setf("stonekill",3) if d.count_monster() < LEVEL5_GEN_LIMIT then d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") end else item.remove() say(gameforge.flame_dungeon._490_say) -- say("2¹ø") end elseif npc.get_vid() == d.get_unique_vid("stone5_3") then if d.getf("stonekill") == 3 then npc.purge() item.remove() say(gameforge.flame_dungeon._500_say) d.setf("stonekill",4) if d.count_monster() < LEVEL5_GEN_LIMIT then d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") end else item.remove() say(gameforge.flame_dungeon._490_say) -- say("3¹ø") end elseif npc.get_vid() == d.get_unique_vid("stone5_4") then if d.getf("stonekill") == 4 then npc.purge() item.remove() say(gameforge.flame_dungeon._510_say) d.setf("stonekill",5) if d.count_monster() < LEVEL5_GEN_LIMIT then d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") end else item.remove() say(gameforge.flame_dungeon._490_say) -- say("4¹ø") end elseif npc.get_vid() == d.get_unique_vid("stone5_5") then if d.getf("stonekill") == 5 then npc.purge() item.remove() say(gameforge.flame_dungeon._520_say) d.setf("stonekill",6) if d.count_monster() < LEVEL5_GEN_LIMIT then d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") end else item.remove() say(gameforge.flame_dungeon._490_say) -- say("5¹ø") end elseif npc.get_vid() == d.get_unique_vid("stone5_6") then if d.getf("stonekill") == 6 then npc.purge() item.remove() say(gameforge.flame_dungeon._530_say) d.setf("stonekill",7) if d.count_monster() < LEVEL5_GEN_LIMIT then d.regen_file (MOB_REGEN_FILE_PATH.."fd_e.txt") end else item.remove() say(gameforge.flame_dungeon._490_say) -- say("6¹ø") end else if d.getf("stonekill") == 7 then npc.purge() item.remove() notice_multiline(gameforge.flame_dungeon._440_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() else item.remove() say(gameforge.flame_dungeon._490_say) -- say("7¹ø") end end end when LEVEL6_TARGET.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin -- ¸Á¸¶¼® Æı«ÇßÀ» ¶§ notice_multiline(gameforge.flame_dungeon._540_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() end when FINAL_BOSS.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin -- º¸½º Á׿´À»¶§ notice_multiline(gameforge.flame_dungeon._550_notice,d.notice) notice_multiline(gameforge.flame_dungeon._560_notice,d.notice) server_timer("dungeon_end_timer", 60,d.get_map_index()) flame_dungeon.level_clear() -- ÆÄƼ¿ø Áß, ¾ß¸¶Ãµ Àâ´Â Äù½ºÆ®(104·¾, 105·¾ Äù½ºÆ®) ÁøÇàÁßÀÎ »ç¶÷ÀÌ ÀÖÀ¸¸é Äù½ºÆ® Ŭ¸®¾î µÇµµ·Ï. if party.is_party() then party.setf("flame_dungeon_boss_kill_count", 1) end end end end Here is the part : when killed_A_1.server_timer begin -- ŸÀÌ¸Ó µ¹¸®±â1 (level1,level3) if d.select(get_server_timer_arg()) then if d.count_monster() <= 0 then -- 1·¹º§ ¸ó½ºÅÍ Àü¸ê½Ã if d.getf("level") == 11 then notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) else notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) end d.setf("level",0) else server_timer ("killed_A_2", 6, get_server_timer_arg()) end end end when killed_A_2.server_timer begin -- ŸÀÌ¸Ó µ¹¸®±â2 (1°ú 2 ¹ø°¥¾Æ°¡¸é¼ µ¹¾Æ°¨) if d.select(get_server_timer_arg()) then if d.count_monster() <= 0 then -- 1·¹º§ ¸ó½ºÅÍ Àü¸ê½Ã if d.getf("level") == 11 then notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) else notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) end d.setf("level",0) else server_timer ("killed_A_1", 6, get_server_timer_arg()) end end end The mobs you kill getting counted just @ the NPC you speaking with, but the quest seems to not run anymore. I dont get kicked after the time when Iam at this part! I hope you have have ideas to fixx this bug. Problem2: I cant use horse skills with some mounts. Is that defined in the quest ? In the game ? Hope you can help me, king regards, Nightwish Link to comment Share on other sites More sharing options...
metin2team 766 Posted March 30, 2014 Share Posted March 30, 2014 The mobs you kill getting counted just @ the NPC you speaking with, but the quest seems to not run anymore. I dont get kicked after the time when Iam at this part! I hope you have have ideas to fixx this bug. about this I used another quest .. I cant use horse skills with some mounts. Is that defined in the quest ? In the game ? You have to define the vnums of the mounts in the (Server + Client) CanUseSkill Good luck. Link to comment Share on other sites More sharing options...
Nightwish 16 Posted March 30, 2014 Author Share Posted March 30, 2014 Thank you. Does anybody has this run running ? Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted March 30, 2014 Developer Share Posted March 30, 2014 Delete killed_A_2's when. function clear_timer(inx) -- ŸÀÌ¸Ó ´ÙÁö¿ì±â clear_server_timer ("flame_dungeon_0m_left_timer", inx) clear_server_timer ("flame_dungeon_1m_left_timer", inx) clear_server_timer ("flame_dungeon_5m_left_timer", inx) clear_server_timer ("flame_dungeon_10m_left_timer", inx) clear_server_timer ("flame_dungeon_15m_left_timer", inx) clear_server_timer ("flame_dungeon_30m_left_timer", inx) clear_server_timer ("flame_dungeon_45m_left_timer", inx) clear_server_timer ("killed_A_1", inx) clear_server_timer ("flame_dungeon_ticket_remove", inx) end when flame_dungeon_45m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 45),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_30m_left_timer', 15*60, d.get_map_index()) end end when flame_dungeon_30m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 30),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_15m_left_timer', 15*60, d.get_map_index()) end end when flame_dungeon_15m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 15),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_5m_left_timer', 10*60, d.get_map_index()) end end when flame_dungeon_5m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 5),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_1m_left_timer', 4*60, d.get_map_index()) end end when flame_dungeon_1m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(gameforge.flame_dungeon._180_notice, 1),d.notice) notice_multiline(gameforge.flame_dungeon._170_notice,d.notice) server_timer ("flame_dungeon_0m_left_timer", 60, d.get_map_index()) end end when flame_dungeon_0m_left_timer.server_timer begin local setting = flame_dungeon.setting() if d.select(get_server_timer_arg()) then notice_multiline(gameforge.flame_dungeon._190_notice,d.notice) notice_multiline(gameforge.flame_dungeon._200_notice,d.notice) server_timer("dungeon_end_timer",10,d.get_map_index()) end end if d.getf("level") == 1 then say(gameforge.flame_dungeon._260_say) notice_multiline(gameforge.flame_dungeon._260_say,d.notice) d.kill_unique("door1") d.kill_unique("idoor1") d.setf("level",11) d.regen_file (MOB_REGEN_FILE_PATH.."fd_a.txt") server_loop_timer ("killed_A_1", 12, d.get_map_index()) elseif d.getf("level") == 11 then say(gameforge.flame_dungeon._270_say) say_title(gameforge.flame_dungeon._280_sayTitle .. d.count_monster()) elseif d.getf("level") == 2 then say(gameforge.flame_dungeon._290_say) say(gameforge.flame_dungeon._300_say) notice_multiline(gameforge.flame_dungeon._290_say,d.notice) notice_multiline(gameforge.flame_dungeon._300_say,d.notice) d.spawn_mob(LEVEL2_STONE, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) -- ºÀÀμ® ¼Òȯ d.kill_unique("door2") d.kill_unique("idoor2") d.set_regen_file (MOB_REGEN_FILE_PATH.."fd_b.txt") d.setf("level",12) elseif d.getf("level") == 12 then say(gameforge.flame_dungeon._310_say) elseif d.getf("level") == 3 then say(gameforge.flame_dungeon._260_say) notice_multiline(gameforge.flame_dungeon._260_say,d.notice) d.kill_unique("door3") d.kill_unique("idoor3") d.setf("level",13) d.regen_file (MOB_REGEN_FILE_PATH.."fd_c.txt") server_loop_timer ("killed_A_1", 12, d.get_map_index()) when killed_A_1.server_timer begin -- ŸÀÌ¸Ó µ¹¸®±â1 (level1,level3) if d.select(get_server_timer_arg()) then if d.count_monster() <= 0 then -- 1·¹º§ ¸ó½ºÅÍ Àü¸ê½Ã if d.getf("level") == 11 or d.getf("level") == 13 then notice_multiline(gameforge.flame_dungeon._420_notice,d.notice) notice_multiline(gameforge.flame_dungeon._430_notice,d.notice) end d.setf("level",0) end end end when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Nightwish 16 Posted March 30, 2014 Author Share Posted March 30, 2014 Still 0 mobs left to kill. Anyone else ideas? Link to comment Share on other sites More sharing options...
.SoNiiC. 185 Posted April 3, 2014 Share Posted April 3, 2014 Apr 4 01:09:57 :: XXX AddServerTimer killed_A_1 3510000 0x507fa580 Apr 4 01:10:09 :: QUEST clear timer 0 Apr 4 01:10:09 :: QUEST clear timer 0 thats the problem i dont know why but it look like that something stops the servertimer. Link to comment Share on other sites More sharing options...
Tacticus 73 Posted April 4, 2014 Share Posted April 4, 2014 ye something is problem in server timer Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted April 6, 2014 Developer Share Posted April 6, 2014 I gave the quest I use to Nightwish and, as I was specting, it works for him. So, if it works for me, and for him, obviously it'll work for you too. quest flame_dungeon begin state start begin function setting() return { ["bossroom_entry_pos"] = {8109,6867}, ["boss_pos"] = {686,637}, ["doors_pos"] = { {320,394}, {293,359}, {333,321}, {378,320}, {400,355}, {394,401} }, ["idoors_pos"] = { {268,447}, {234,359}, {300,264}, {454,217}, {470,355}, {467,469} }, ["doors_dir"] = {135,90,210,152,90,223}, ["idoors_dir"] = {135,90,210,135,90,239}, ["dungeon_entry_pos"] = {7762, 6739}, ["DUNGEON_MAN_bpos"] = {690,722}, ["DUNGEON_MAN_pos"] = {354,362}, ["LEVEL2_STONE_pos"] = {195,352}, ["LEVEL4_TARGET_pos"] = {470,175}, ["LEVEL5_STONE_pos"] = { {486, 345}, {511, 336}, {525, 349}, {521, 365}, {503, 372}, {486, 365}, {500, 354} }, ["LEVEL6_TARGET_pos"] = {511,480}, ["outside_entry_pos"] = {6142,7068}, ["YAK_pos"] = {376, 397} } end function is_flamed(idx) return idx >= 351 * 10000 and idx < (351 + 1) *10000 end function make_dungeon() local setting = flame_dungeon.setting() d.new_jump_party(351, setting.dungeon_entry_pos[1], setting.dungeon_entry_pos[2]) d.regen_file("data/dungeon/flame_dungeon/npc.txt") d.setf("level",0) for i=1,6 do d.set_unique("door"..i, d.spawn_mob_ac_dir(20387, setting.doors_pos[i][1], setting.doors_pos[i][2],setting.doors_dir[i])) end for i=1,6 do d.set_unique("idoor"..i, d.spawn_mob_ac_dir(20388, setting.idoors_pos[i][1], setting.idoors_pos[i][2],setting.idoors_dir[i])) end d.setf("clear_count",0) d.setf("started",0) d.setf("dungeon_enter",0) end function go_boss() local setting = flame_dungeon.setting() if pc.get_level() < 104 then say(quest_text.flame_dungeon._580_notice) return else if pc.getf("main_quest_flame_lv103", "__status")==main_quest_flame_lv103.__COMPLETE__ then -- ¼±ÇàÄù½ºÆ® È®ÀÎ say_title(quest_text.flame_dungeon._010_say) say(quest_text.flame_dungeon._010_say) local warp = select(quest_text.flame_dungeon._020_select,quest_text.flame_dungeon._030_select) if warp == 1 then d.setf("level",17) d.jump_all(setting.bossroom_entry_pos[1],setting.bossroom_entry_pos[2]) d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_fild_boss.txt") d.spawn_mob(6091,setting.boss_pos[1],setting.boss_pos[2]) end else syschat(quest_text.flame_dungeon._040_notice) say(quest_text.flame_dungeon._040_notice) return end end end function level_clear() d.setf("level",0) d.clear_regen() d.purge_area(750000,620000,817400,689400) end function clear_timer(inx) clear_server_timer ("flame_dungeon_0m_left_timer", inx) clear_server_timer ("flame_dungeon_1m_left_timer", inx) clear_server_timer ("flame_dungeon_5m_left_timer", inx) clear_server_timer ("flame_dungeon_10m_left_timer", inx) clear_server_timer ("flame_dungeon_15m_left_timer", inx) clear_server_timer ("flame_dungeon_30m_left_timer", inx) clear_server_timer ("flame_dungeon_45m_left_timer", inx) clear_server_timer ("killed_A_1", inx) end when login begin local idx = pc.get_map_index() local setting = flame_dungeon.setting() if idx == 351 then pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62) elseif flame_dungeon.is_flamed(idx) then pc.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) local ticketGroup = {get_special_item_group (10033)} if d.getf("dungeon_enter") == 0 then local canPass = false for i=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then canPass = true break end end if get_global_time() - pc.getf("flame_dungeon","exit_time") < 30 * 60 then notice_multiline(quest_text.flame_dungeon._050_notice,d.notice) say(quest_text.flame_dungeon._060_say) timer("flame_dungeon_warp_timer", 5) elseif not canPass then notice_multiline(quest_text.flame_dungeon._070_notice,d.notice) say(quest_text.flame_dungeon._080_say) timer("flame_dungeon_warp_timer", 5) elseif pc.get_level() < 100 then notice_multiline(quest_text.flame_dungeon._090_notice,d.notice) say(quest_text.flame_dungeon._100_say) timer("flame_dungeon_warp_timer", 5) end elseif pc.getf("flame_dungeon","ticket_delete") == 0 then for i=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[i]) >= ticketGroup[i+1] then pc.remove_item(ticketGroup[i], ticketGroup[i+1]) break end end pc.setf("flame_dungeon","ticket_delete",1) end else pc.setf("flame_dungeon","ticket_delete",0) end end when flame_dungeon_warp_timer.timer begin local setting = flame_dungeon.setting() pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62) end when logout begin local idx = pc.get_map_index() if flame_dungeon.is_flamed(idx) then if d.getf("dungeon_enter") == 1 then pc.setf("flame_dungeon","exit_time",get_global_time()) end end end when 20394.chat.quest_text.flame_dungeon._110_npcChat begin local setting = flame_dungeon.setting() if party.is_party() then local party_check = 0 if d.find(party.getf("dungeon_index")) then party_check = (d.getf_from_map_index("party_leader_pid", party.getf("dungeon_index")) == party.get_leader_pid()) end if d.find(party.getf("dungeon_index")) and party_check then if get_global_time() - pc.getf("flame_dungeon","exit_time") < 5 * 60 then local dungeon_level = d.getf_from_map_index("level", party.getf("dungeon_index")) if dungeon_level == 17 then pc.warp(setting.bossroom_entry_pos[1] * 100, setting.bossroom_entry_pos[2] * 100, party.getf("dungeon_index")) else pc.warp(setting.dungeon_entry_pos[1] * 100, setting.dungeon_entry_pos[2] * 100, party.getf("dungeon_index")) end else say_title(mob_name(20394)) say(quest_text.flame_dungeon._590_say) end else local pids = {party.get_member_pids()} local noTicketMembers = {} local notEnoughLevelMembers = {} local ticketCheck = true local levelCheck = true local ticketGroup = {get_special_item_group (10033)} for i, pid in next, pids, nil do q.begin_other_pc_block(pid) local canPass = false for idx=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then canPass = true break end end if not canPass then table.insert(noTicketMembers, pc.get_name()) ticketCheck = false end if pc.level < 100 then table.insert(notEnoughLevelMembers, pc.get_name()) levelCheck = false end q.end_other_pc_block() end if not ticketCheck then say_title(mob_name(20394)) say(quest_text.flame_dungeon._610_say) for i, name in next, noTicketMembers, nil do say(color(1,1,0), " "..name) end if levelCheck then return else wait() end end if not levelCheck then say_title(mob_name(20394)) say(quest_text.flame_dungeon._630_say) for i, name in next, notEnoughLevelMembers, nil do say(color(1,1,0), " "..name) end return end if party.is_leader() then say(quest_text.flame_dungeon._120_say) local warp = select(quest_text.flame_dungeon._130_select,quest_text.flame_dungeon._140_select) if warp == 1 then if party.is_map_member_flag_lt("exit_time", get_global_time() - 30 * 60 ) then flame_dungeon.make_dungeon() else say(quest_text.flame_dungeon._600_say) end end party.setf("flame_dungeon_boss_kill_count", 0) else say(quest_text.flame_dungeon._150_say) end end else say(quest_text.flame_dungeon._160_say) end end when 20385.chat."Test : Boss Room" with is_test_server() begin -- Å×½ºÆ®¿ë flame_dungeon.go_boss() end when flame_dungeon_45m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(quest_text.flame_dungeon._180_notice, 45),d.notice) notice_multiline(quest_text.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_30m_left_timer', 15*60, d.get_map_index()) end end when flame_dungeon_30m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(quest_text.flame_dungeon._180_notice, 30),d.notice) notice_multiline(quest_text.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_15m_left_timer', 15*60, d.get_map_index()) end end when flame_dungeon_15m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(quest_text.flame_dungeon._180_notice, 15),d.notice) notice_multiline(quest_text.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_5m_left_timer', 10*60, d.get_map_index()) end end when flame_dungeon_5m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(quest_text.flame_dungeon._180_notice, 5),d.notice) notice_multiline(quest_text.flame_dungeon._170_notice,d.notice) server_timer('flame_dungeon_1m_left_timer', 4*60, d.get_map_index()) end end when flame_dungeon_1m_left_timer.server_timer begin if d.select(get_server_timer_arg()) then notice_multiline(string.format(quest_text.flame_dungeon._180_notice, 1),d.notice) notice_multiline(quest_text.flame_dungeon._170_notice,d.notice) server_timer ("flame_dungeon_0m_left_timer", 60, d.get_map_index()) end end when flame_dungeon_0m_left_timer.server_timer begin local setting = flame_dungeon.setting() if d.select(get_server_timer_arg()) then notice_multiline(quest_text.flame_dungeon._190_notice,d.notice) notice_multiline(quest_text.flame_dungeon._200_notice,d.notice) server_timer("dungeon_end_timer",10, d.get_map_index()) end end when 20385.chat.quest_text.flame_dungeon._210_npcChat with npc.lock() begin local setting = flame_dungeon.setting() if d.getf("started") == 0 then say(quest_text.flame_dungeon._230_say) say(quest_text.flame_dungeon._240_say) wait() d.setf("started",1) server_timer ("flame_dungeon_45m_left_timer",15*60, d.get_map_index()) notice_multiline(quest_text.flame_dungeon._250_notice,d.notice) notice_multiline(quest_text.flame_dungeon._170_notice,d.notice) local pids = {party.get_member_pids()} local ticketGroup = {get_special_item_group (10033)} for i, pid in next, pids, nil do q.begin_other_pc_block(pid) local canPass = false for idx=1, table.getn(ticketGroup),2 do if pc.count_item(ticketGroup[idx]) >= ticketGroup[idx+1] then canPass = true pc.remove_item(ticketGroup[idx], ticketGroup[idx+1]) break end end if not canPass then pc.warp(setting.outside_entry_pos[1]*100, setting.outside_entry_pos[2] * 100, 62) end q.end_other_pc_block() end d.setqf2("flame_dungeon","ticket_delete",1) d.setf("dungeon_enter",1) party.setf("dungeon_index", d.get_map_index()) d.setf("party_leader_pid", party.get_leader_pid()) end if d.getf("level") < 7 then if d.getf("clear_count") == 6 then d.setf("level",7) else local rand = number(1,6) local setlev = 0 d.setf("level",7) for i=1,50 do setlev = setlev + 1 if setlev > 6 then setlev = 1 end if not d.is_unique_dead("door"..setlev) then rand = rand - 1 if rand == 0 then d.setf("level",setlev) d.setf("clear_count",d.getf("clear_count")+1) break end end end end end if d.getf("level") == 1 then say(quest_text.flame_dungeon._260_say) notice_multiline(quest_text.flame_dungeon._260_say,d.notice) d.kill_unique("door1") d.kill_unique("idoor1") d.setf("level",11) d.regen_file ("data/dungeon/flame_dungeon/".."fd_a.txt") server_loop_timer('killed_A_1', 12, d.get_map_index()) elseif d.getf("level") == 11 then say(quest_text.flame_dungeon._270_say) say_title(quest_text.flame_dungeon._280_sayTitle .. d.count_monster()) elseif d.getf("level") == 2 then say(quest_text.flame_dungeon._290_say) say(quest_text.flame_dungeon._300_say) notice_multiline(quest_text.flame_dungeon._290_say,d.notice) notice_multiline(quest_text.flame_dungeon._300_say,d.notice) d.spawn_mob(20386, setting.LEVEL2_STONE_pos[1], setting.LEVEL2_STONE_pos[2]) d.kill_unique("door2") d.kill_unique("idoor2") d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_b.txt") d.setf("level",12) elseif d.getf("level") == 12 then say(quest_text.flame_dungeon._310_say) elseif d.getf("level") == 3 then say(quest_text.flame_dungeon._260_say) notice_multiline(quest_text.flame_dungeon._260_say,d.notice) d.kill_unique("door3") d.kill_unique("idoor3") d.setf("level",13) d.regen_file ("data/dungeon/flame_dungeon/".."fd_c.txt") server_loop_timer('killed_A_1', 5, d.get_map_index()) elseif d.getf("level") == 13 then say(quest_text.flame_dungeon._270_say) say_title(quest_text.flame_dungeon._280_sayTitle..d.count_monster()) elseif d.getf("level") == 4 then -- 474 178 say(quest_text.flame_dungeon._320_notice) notice_multiline(quest_text.flame_dungeon._320_notice,d.notice) d.setf("level",14) d.kill_unique("door4") d.kill_unique("idoor4") d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_d.txt") d.spawn_mob(6051,setting.LEVEL4_TARGET_pos[1],setting.LEVEL4_TARGET_pos[2] ) elseif d.getf("level") == 14 then say(quest_text.flame_dungeon._330_say) say(quest_text.flame_dungeon._340_say) elseif d.getf("level") == 5 then -- 510 355 say(quest_text.flame_dungeon._350_say) say(quest_text.flame_dungeon._360_say) notice_multiline(quest_text.flame_dungeon._350_say,d.notice) notice_multiline(quest_text.flame_dungeon._360_say,d.notice) d.kill_unique("door5") d.kill_unique("idoor5") d.setf("level",15) d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") local vis = { 0,0,0,0,0,0,0} for i=1,7 do vis[i] = 0 end for i = 1, 7 do local ran = number(1,7) local st = 0 for j = 1, 50 do st = st + 1 if st > 7 then st = 1 end if vis[st] == 0 then ran = ran - 1 if ran == 0 then vis[st] = 1 d.set_unique("stone5_"..st, d.spawn_mob(20386, setting.LEVEL5_STONE_pos[i][1], setting.LEVEL5_STONE_pos[i][2])) break end end end end elseif d.getf("level") == 15 then say(quest_text.flame_dungeon._370_say) elseif d.getf("level") == 6 then -- 507 490 say(quest_text.flame_dungeon._380_say) notice_multiline(quest_text.flame_dungeon._380_say,d.notice) d.setf("level",16) d.kill_unique("door6") d.kill_unique("idoor6") d.set_regen_file ("data/dungeon/flame_dungeon/".."fd_f.txt") d.spawn_mob(8057, setting.LEVEL6_TARGET_pos[1],setting.LEVEL6_TARGET_pos[2]) elseif d.getf("level") == 16 then say(quest_text.flame_dungeon._390_say) say(quest_text.flame_dungeon._400_say) elseif d.getf("level") == 7 then -- setskin(NOWINDOW) flame_dungeon.go_boss() else say(quest_text.flame_dungeon._410_say) end npc.unlock() end when dungeon_end_timer.server_timer begin local setting = flame_dungeon.setting() if d.select(get_server_timer_arg()) then flame_dungeon.clear_timer(d.get_map_index()) d.set_warp_location(62, setting.outside_entry_pos[1] , setting.outside_entry_pos[2]) d.exit_all() d.setf("party_leader_pid", 0) end end when killed_A_1.server_timer begin if d.select(get_server_timer_arg()) then if d.getf("level") == 11 or d.getf("level") == 13 then if d.count_monster() <= 0 then notice_multiline(quest_text.flame_dungeon._420_notice,d.notice) notice_multiline(quest_text.flame_dungeon._430_notice,d.notice) d.setf("level", 0) end end end end when kill with flame_dungeon.is_flamed(pc.get_map_index()) begin if d.getf("level") == 12 then local i = number(1, 100) if i == 1 then game.drop_item (30329, 1) end end end when 20386.take with flame_dungeon.is_flamed(pc.get_map_index()) and item.vnum == 30329 and d.getf("level") == 12 begin -- 2·¹º§ ¿¼è ¸Ô¾úÀ»¶§ local i = number(1, 5) if i == 1 then npc.purge() item.remove() notice_multiline(quest_text.flame_dungeon._440_notice,d.notice) notice_multiline(quest_text.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() else item.remove() say(quest_text.flame_dungeon._450_say) end end when 6051.kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 14 begin notice_multiline(quest_text.flame_dungeon._460_notice,d.notice) notice_multiline(quest_text.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() end when kill with flame_dungeon.is_flamed(pc.get_map_index()) and d.getf("level") == 15 begin local i = number(1, 30) if i == 1 then game.drop_item (30330, 1) end end when 20386.take with flame_dungeon.is_flamed(d.get_map_index()) and item.vnum == 30330 and d.getf("level") == 15 begin local setting = flame_dungeon.setting() if npc.get_vid() == d.get_unique_vid("stone5_1") then npc.purge() item.remove() say(quest_text.flame_dungeon._470_say) d.setf("stonekill",2) if d.count_monster() < 100 then d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") end elseif npc.get_vid() == d.get_unique_vid("stone5_2") then if d.getf("stonekill") == 2 then -- 2¹øµ¹À» Á×ÀÏ Â÷·Ëµ¥ 2¹øµ¹¿¡°Ô ¿¼è¸¦ ¸Ô¿´À» ¶§ npc.purge() item.remove() say(quest_text.flame_dungeon._480_say) d.setf("stonekill",3) if d.count_monster() < 100 then d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") end else item.remove() say(quest_text.flame_dungeon._490_say) end elseif npc.get_vid() == d.get_unique_vid("stone5_3") then if d.getf("stonekill") == 3 then npc.purge() item.remove() say(quest_text.flame_dungeon._500_say) d.setf("stonekill",4) if d.count_monster() < 100 then d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") end else item.remove() say(quest_text.flame_dungeon._490_say) end elseif npc.get_vid() == d.get_unique_vid("stone5_4") then if d.getf("stonekill") == 4 then npc.purge() item.remove() say(quest_text.flame_dungeon._510_say) d.setf("stonekill",5) if d.count_monster() < 100 then d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") end else item.remove() say(quest_text.flame_dungeon._490_say) end elseif npc.get_vid() == d.get_unique_vid("stone5_5") then if d.getf("stonekill") == 5 then npc.purge() item.remove() say(quest_text.flame_dungeon._520_say) d.setf("stonekill",6) if d.count_monster() < 100 then d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") end else item.remove() say(quest_text.flame_dungeon._490_say) end elseif npc.get_vid() == d.get_unique_vid("stone5_6") then if d.getf("stonekill") == 6 then npc.purge() item.remove() say(quest_text.flame_dungeon._530_say) d.setf("stonekill",7) if d.count_monster() < 100 then d.regen_file ("data/dungeon/flame_dungeon/".."fd_e.txt") end else item.remove() say(quest_text.flame_dungeon._490_say) end else if d.getf("stonekill") == 7 then npc.purge() item.remove() notice_multiline(quest_text.flame_dungeon._440_notice,d.notice) notice_multiline(quest_text.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() else item.remove() say(quest_text.flame_dungeon._490_say) end end end when 8057.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==16 begin notice_multiline(quest_text.flame_dungeon._540_notice,d.notice) notice_multiline(quest_text.flame_dungeon._430_notice,d.notice) flame_dungeon.level_clear() end when 6091.kill with flame_dungeon.is_flamed(d.get_map_index()) and d.getf("level") ==17 begin notice_multiline(quest_text.flame_dungeon._550_notice,d.notice) notice_multiline(quest_text.flame_dungeon._560_notice,d.notice) server_timer("dungeon_end_timer", 60, d.get_map_index()) flame_dungeon.level_clear() if party.is_party() then party.setf("flame_dungeon_boss_kill_count", 1) end end end end Btw, I use quest_text table instead of gameforge table for the quest's text. Remember to change it! 1 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
.SoNiiC. 185 Posted April 7, 2014 Share Posted April 7, 2014 that cant be work because you disable the check for monsters on level 1 and 3. and this is not the problem. the problem is that any server_timer works on that quest. when a server_timer starts all server_timer will be cleared and this is the problem. 1 Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted April 8, 2014 Developer Share Posted April 8, 2014 (edited) I didn't disable anything. As I said before, if it works for me, and for him, it works for you too. Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
.SoNiiC. 185 Posted April 8, 2014 Share Posted April 8, 2014 you disabled killed_a_2 that means your quest checks only one time on level 1 or level 3 if monster exist. but this is not the bug. Apr 7 16:45:49 :: QUEST loading locale/germany/quest/object/killed_A_1/server_timer/flame_dungeon.run : flame_dungeon [sTATE] run Apr 7 16:45:49 :: XXX AddServerTimer killed_A_1 3510000 0x510cdb40 Apr 7 16:46:00 :: QUEST clear timer 0 Apr 7 16:46:00 :: QUEST clear timer 0 this is the bug. if any server_timer will starts at the same time all running server_timer on that quest will be cleared. let me give you example. the firtst QUEST clear timer 0 is for that Apr 7 16:41:20 :: QUEST loading locale/germany/quest/object/flame_dungeon_45m_left_timer/server_timer/flame_dungeon.run : flame_dungeon [sTATE] run and the otherone is for Apr 7 16:45:49 :: QUEST loading locale/germany/quest/object/killed_A_1/server_timer/flame_dungeon.run : flame_dungeon [sTATE] run if any server_timer will be startet all server_timer on that quest will be canceled and this is the real bug. i dont think that the quest will have a bug. i think its on the gamefile. because its a gamefile before the beta server started. Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted April 8, 2014 Developer Share Posted April 8, 2014 (edited) You're wrong again. if d.getf("level") == 1 then (...) server_loop_timer("killed_A_1", 12, d.get_map_index()) (...) elseif d.getf("level") == 3 then (...) server_loop_timer("killed_A_1", 5, d.get_map_index()) (...)And also, what didn't you understand of server_loop_timer ? Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
.SoNiiC. 185 Posted April 9, 2014 Share Posted April 9, 2014 The quest isnt buggy ! The devilscatacombe quest have the same funktion for check on 2 levels. And now tell me why that quest still work ? Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted April 9, 2014 Developer Share Posted April 9, 2014 Did I said it was buggy? No. I don't really care with devil's catacomb's quest. If this one wasn't working as it was suppost to work, and I made some changes that allows me to complete the dungeon without problems, why I wouldn't use the quest with the changes I made? lol Anyway, do whatever you want. I use the quest I posted, if you want to use it, nice, if not, ctrl + w. when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
astinasti 7 Posted May 21, 2014 Share Posted May 21, 2014 Did I said it was buggy? No. I don't really care with devil's catacomb's quest. If this one wasn't working as it was suppost to work, and I made some changes that allows me to complete the dungeon without problems, why I wouldn't use the quest with the changes I made? lol Anyway, do whatever you want. I use the quest I posted, if you want to use it, nice, if not, ctrl + w. Sorry But your quest don't work :| Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted May 21, 2014 Developer Share Posted May 21, 2014 This is the quest I use, and it's working for me. when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Tacticus 73 Posted May 21, 2014 Share Posted May 21, 2014 This is the quest I use, and it's working for me. i am test too...same problem in floor when need kill all mobs Link to comment Share on other sites More sharing options...
astinasti 7 Posted May 21, 2014 Share Posted May 21, 2014 You have another quest ? D: maybe one add functions.. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now