PHP Code:
--AlbyWork--
quest alby begin
state start begin
when login begin
if pc.get_map_index()==index then
pc.set_warp_location(index, x, y)
end
end
when npc.chat."Alby's dungeon" begin
say("Vuoi entrare nel dungeon di alby?")
local j=select("Si", "No")
if j==2 then
return
elseif j==1 then
say("Verrai portato dentro")
pc.warp(x,y)
end
end
when npc.take with item.vnum()==value begin
item.remove()
chat("Verrai portato al piano n^ 2")
timer("piano2_timer",5)
end
when piano2_timer.timer begin
d.new_jump_all(index, x, y)
d.notice("Uccidete tutti i mob")
d.regen_file("data/dungeon/alby_regen.txt")
d.set_warp_at_eliminate(5, d.get_map_index(), x, y, "data/dungeon/alby2_regen.txt")
end
when boss.kill begin --in quel regen di prima ci doveva essere un boss
d.kill_all()
d.kill_all()
d.check_eliminated()
d.notice("Verrete trasportati al piano successivo")
timer("piano3_timer",5)
end
when piano3_timer.timer begin
d.clear_regen()
d.jump_all(x,y)
d.notice("Trovate la chiave")
d.regen_file("data/dungeon/alby3_regen.txt")--ci devono essere mob che droppano chiavi
end
when npc.take with item.vnum()==value begin
npc.purge()
item.remove()
d.notice("Verrete traportati al piano successivo")
timer("timerino",5)
end
when timerino.timer begin
d.clear_regen()
d.jump_all(x,y)
d.regen_file("data/dungeon/alby4_regen.txt")
d.notice("Uccidete tutti i mob")
d.set_warp_at_eliminate(5, d.get_map_index(),x,y, "data/dungeon/alby5_regen.txt") --nel regen alby5 ci deve essere il boss
end
when boss.kill begin
d.kill_all()
d.kill_all()
d.check_eliminated()
d.notice("Avete ucciso il boss, fra 10 secondi")
d.notice("Verrete trasportati fuori")
timer("fine",5)
end
when fine.timer begin
d.exit_all()
end
end
end






