quest DevilsCatacomb_Zone begin state start begin when login with AzraelCatacomb.isInDungeon() begin local data = AzraelCatacomb.ReturnData(); local outside_coords_l = data["outside_Pos"]; local FirstBossCoords = data["boss_Posit"]; d.set_warp_location(data["outside_index"], outside_coords_l["x"], outside_coords_l["y"]); if (party.is_party() and party.is_leader() or not party.is_party()) then d.spawn_mob(data["KingVnum"], FirstBossCoords["x"], FirstBossCoords["y"]); server_timer("devilscatacomb_time_out", data["time_until_you_got_kicked"], d.get_map_index()); d.notice(string.format("Catacomba Diavolului: De acum inainte vei avea %s.", get_time_format(data["time_until_you_got_kicked"]))) d.notice("Catacomba Diavolului: pentru a completa temnita.") end end when logout with AzraelCatacomb.isInDungeon() begin local data = AzraelCatacomb.ReturnData(); if (data["time_after_you_complete_the_dungeon"] > 0) then local party_pids = party_get_member_pids(); AzraelCatacomb.setWatingTime(party_pids); end end when kill with AzraelCatacomb.isInDungeon() begin local data = AzraelCatacomb.ReturnData(); local FirstBossCoords = data["boss_Posit"]; if npc.get_race() == data["KingVnum"] and d.getf("KingDeafeted") == 0 then d.spawn_mob(data["AzraelVnum"], FirstBossCoords["x"], FirstBossCoords["y"]); d.setf("KingDeafeted", 1); d.notice("Catacomba Diavolului: L-ai infrant pe Tartaros, acum Azrael s-a infuriat!") end if npc.get_race() == data["AzraelVnum"] then clear_server_timer("devilscatacomb_time_out", get_server_timer_arg()); server_timer("devilscatacomb_time_out", 30, d.get_map_index()); AzraelCatacomb.ClearDungeon(); d.notice("Catacomba Diavolului: Felicitari Catacomba a fost completata cu succes!") d.notice("Catacomba Diavolului: In 60 de secunde veti fi teleportati!") notice_all(string.format("[Catacomba Diavolului]: Catacomba a fost infranta de catre %s, felicitari!", pc.get_name())) end end when devilscatacomb_time_out.server_timer begin if (d.select(get_server_timer_arg())) then d.notice("Catacomba Diavolului: Timpul a expirat, vei fi teleportat inafara Catacombei.") d.exit_all(); end end when 20367.chat."Intra in Catacomba Diavolului" with not AzraelCatacomb.isInDungeon() begin say_title(string.format("%s:[ENTER]", mob_name(npc.get_race()))) say("Doresti sa intri in Catacomba Diavolului?") if (select("Da, doresc", "Nu, nu doresc") == 1) then if AzraelCatacomb.CheckInfo() then AzraelCatacomb.EnterInDungeon(); end end end end end