Quest`ul arata asa:
Cod: Selectaţi tot
quest SnowDungeon_Zone begin
state start begin
when login with SnowDungeon.isInDungeon() begin
local data = SnowDungeon.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["TowerKing"], FirstBossCoords["x"], FirstBossCoords["y"]);
d.regen_file(get_locale_base_path().."/quest/dungeons/regen/snow_dungeon/nivel_10.txt");
server_timer("snowdungeon_time_out", data["time_until_you_got_kicked"], d.get_map_index());
d.notice(string.format("Turnul lui Nemere: De acum inainte vei avea %s.", get_time_format(data["time_until_you_got_kicked"])))
d.notice("Turnul lui Nemere: pentru a completa temnita.")
end
end
when logout with SnowDungeon.isInDungeon() begin
local data = SnowDungeon.ReturnData();
if (data["time_after_you_complete_the_dungeon"] > 0) then
local party_pids = party_get_member_pids();
SnowDungeon.setWatingTime(party_pids);
end
end
when kill with SnowDungeon.isInDungeon() begin
local data = SnowDungeon.ReturnData();
if npc.get_race() == data["TowerKing"] then
clear_server_timer("snowdungeon_time_out", get_server_timer_arg());
server_timer("snowdungeon_time_out", 60, d.get_map_index());
SnowDungeon.ClearDungeon();
d.notice("Turnul lui Nemere: Felicitari Turnul a fost completat cu succes!")
d.notice("Turnul lui Nemere: In 60 de secunde veti fi teleportati!")
notice_all(string.format("[Turnul lui Nemere]: Turnul lui Nemere a fost infranta de catre %s, felicitari!", pc.get_name()))
end
end
when snowdungeon_time_out.server_timer begin
if (d.select(get_server_timer_arg())) then
d.notice("Turnul lui Nemere: Timpul a expirat, vei fi teleportat inafara Purgatoriului.")
d.exit_all();
end
end
when 20395.chat."Intra in Turnul lui Nemere" with not SnowDungeon.isInDungeon() begin
say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
say("Doresti sa intri in Turnul lui Nemere?")
if (select("Da, doresc", "Nu, nu doresc") == 1) then
if SnowDungeon.CheckInfo() then
SnowDungeon.EnterInDungeon();
end
end
end
end
end

