Tipologie server:PVM
*Resursă folosită:
*ServerFiles utilizat: Propriu.
*Syserr: Gol
quest deviltower_zone2222 begin
state start begin
when login begin
if pc.get_map_index() == 66 then
-- Nicht in einer Etage, die wieder nach drau¡¼n .
-- Layer Range
-- 1F 88 577 236 737
-- 2F 91 343 238 504
-- 3F 104 107 248 269
if pc.get_x() < 2048+88 or pc.get_y() < 6656+577 or pc.get_x() > 2048+236 or pc.get_y() > 6656+737 then
pc.warp((5376+532)*100, (512+596+4)*100, 65)
end
pc.set_warp_location(65, 5376+532, 512+596+4)
elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
pc.set_warp_location(65, 5376+532, 512+596+4)
end
end
when deviltower_man.chat.locale.deviltower_man_chat begin
if pc.get_level() < 40 then
say(locale.deviltower_man_say_you_cant)
else
say(locale.deviltower_man_say)
local s = select(locale.deviltower_enter,locale.deviltower_no_enter)
if s == 1 then
-- warp into!
pc.warp(216500,727000)
end
end
end
when devil_stone1.kill begin
timer("devil_stone1_1", 6)
end
when devil_stone1_1.timer begin
local mapto7= pc.count_item(30302) -- Ich weiß nicht, das wahre Tilgung der die Existenz der Seele des Turms
pc.remove_item(30302,mapto7)
local boxto7= pc.count_item(30300) -- Beseitigung des unbekannten weiß nicht, ob es sich um ein Feld
pc.remove_item(30300,boxto7)
d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2])
d.regen_file("data/dungeon/deviltower2_regen.txt")
d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt")
end
--when devil_stone2.kill begin
--d.jump_all_local(special.devil_tower[2][1], special.devil_tower[2][2])
--end
when devil_stone3.kill begin
--d.jump_all_local(special.devil_tower[3][1], special.devil_tower[3][2])
--d.set_exit_all_at_eliminate(6)
--d.set_warp_at_eliminate(6, d.get_map_index(), 100, 100)
--d.set_warp_at_eliminate(4, 65, 5376+532, 512+596+4)
d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[3][1], special.devil_tower[3][2], "data/dungeon/deviltower4_regen.txt")
d.check_eliminated()
--d.exit_all()
end
function get_4floor_stone_pos()
local positions = {
{368, 629},
{419, 630},
{428, 653},
{422, 679},
{395, 689},
{369, 679},
{361, 658},
}
for i = 1, 6 do
local j = number(i, 7)
if i != j then
local t = positions[j];
positions[j] = positions[j];
positions[j] = t;
end
end
--for i = 1, 7 do
-- positions[j][1] = positions[j][1] * 100
-- positions[j][2] = positions[j][2] * 100
-- end
return positions
end
when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.setf("level", 4)
-- Reproduzieren eine gro¡¼ Anzahl von Monstern und Herstellung von wahr und falsch Steine Steine
--d.regen_file("data/dungeon/deviltower4_regen.txt")
local positions = deviltower_zone.get_4floor_stone_pos()
for i = 1, 6 do
chat(positions[j][1], positions[j][2])
d.set_unique("fake" .. i , d.spawn_mob(8017, positions[j][1], positions[j][2]))
end
chat(positions[7][1], positions[7][2])
local vid = d.spawn_mob(8017, positions[7][1], positions[7][2])
chat(vid)
d.set_unique("real", vid)
server_loop_timer('devil_stone4_update', 10, pc.get_map_index())
server_timer('devil_stone4_fail1', 5*60, pc.get_map_index())
d.notice("Aici este al 4-lea etaj");
d.notice("gaseste adevarata piatra.");
d.notice("in terment de maxim 15 minute.");
end
when devil_stone4_fail1.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("10 minute!")
server_timer('devil_stone4_fail2', 5*60, get_server_timer_arg())
end
end
when devil_stone4_fail2.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("5 minute!")
server_timer('devil_stone4_fail', 5*60, get_server_timer_arg())
end
end
when devil_stone4_fail.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Timpul a expirat!")
d.exit_all()
clear_server_timer('devil_stone4_update', get_server_timer_arg())
end
end
when devil_stone4_update.server_timer begin
if d.select(get_server_timer_arg()) then
if not d.is_unique_dead("real") then
for i = 1, 6 do
if d.getf("fakedead" .. i) == 0 then
if d.unique_get_hp_perc("fake" .. i) < 50 then
d.purge_unique("fake" .. i)
d.setf("fakedead" .. i, 1)
d.notice("Piatra metin dispare.");
end
end
end
else
--d.clear_regen()
--d.regen_file("data/dungeon/deviltower5_regen.txt")
server_timer("devil_stone4_end", 5, get_server_timer_arg())
d.notice("Felicitari a-ti reusit!");
d.notice("Trece-ti la etajul urmator!")
clear_server_timer('devil_stone4_fail1', get_server_timer_arg())
clear_server_timer('devil_stone4_fail2', get_server_timer_arg())
clear_server_timer('devil_stone4_fail', get_server_timer_arg())
end
else
server_timer('devil_stone4_stop_timer', 1, get_server_timer_arg())
end
end
when devil_stone4_stop_timer.server_timer begin
clear_server_timer('devil_stone4_update', get_server_timer_arg())
end
when devil_stone4_end.server_timer begin
if d.select(get_server_timer_arg()) then
d.setf("level", 5)
d.setf("stone_count", 5)
d.notice("Etajul 5!")
d.notice("Omoara toti monstrii, iar de la acestia pica niste chei!")
d.notice("Gaseste cheia cea buna pentru a trece la nivelul urmator!")
d.notice("Cu ajutorul acestor chei vei putea ajunge la nivelul 6!(ai 20 de minute)")
d.jump_all(special.devil_tower[4][1], special.devil_tower[4][2])
server_timer('devil_stone5_fail1', 5*60, get_server_timer_arg())
clear_server_timer('devil_stone4_update', get_server_timer_arg())
-- 5. Stock, weiter zu reproduzieren
d.set_regen_file("data/dungeon/deviltower5_regen.txt")
-- 5. Stock, Seal Stone Reproduktion
d.spawn_mob(20073, 421, 452)
d.spawn_mob(20073, 380, 460)
d.spawn_mob(20073, 428, 414)
d.spawn_mob(20073, 398, 392)
d.spawn_mob(20073, 359, 426)
end
end
when devil_stone5_fail1.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("15 minute!")
server_timer('devil_stone5_fail2', 5*60, get_server_timer_arg())
end
end
when devil_stone5_fail2.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("10 minute!")
server_timer('devil_stone5_fail3', 5*60, get_server_timer_arg())
end
end
when devil_stone5_fail3.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("5 minute!")
server_timer('devil_stone5_fail', 5*60, get_server_timer_arg())
end
end
when devil_stone5_fail.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Timpul a expirat!")
d.exit_all()
end
end
--when devil_stone4.kill begin
--d.setf("level", 5)
--d.setf("stone_count", 4)
--d.clear_regen()
--d.regen_file("data/dungeon/deviltower5_regen.txt")
--d.jump_all_local(special.devil_tower[4][1], special.devil_tower[4][2])
--end
when 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin
local KILL_COUNT_FOR_DROP_KEY = 50
--if is_test_server() then
--KILL_COUNT_FOR_DROP_KEY = 1
--end
local n =d.getf("count") + 1
d.setf("count", n)
if n == KILL_COUNT_FOR_DROP_KEY then
-- Falling Tasten
game.drop_item(50084, 1)
d.setf("count", 0)
end
end
when devil_stone5.take with item.vnum == 50084 begin
npc.purge()
item.remove()
d.setf("stone_count", d.getf("stone_count") - 1)
if d.getf("stone_count") <= 0 then
d.setf("level", 6)
d.clear_regen()
d.regen_file("data/dungeon/deviltower6_regen.txt")
d.notice("Felicitari!")
d.notice("Vei urca la etajul urmator.")
d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2])
clear_server_timer('devil_stone5_fail1', get_server_timer_arg())
clear_server_timer('devil_stone5_fail2', get_server_timer_arg())
clear_server_timer('devil_stone5_fail3', get_server_timer_arg())
clear_server_timer('devil_stone5_fail', get_server_timer_arg())
else
d.notice("Coloana eliminate ... mai ai"..d.getf("stone_count").."Mult noroc!")
end
end
when devil_stone6.kill begin
-- Geschickt, um eine Karte, wo die Verfeinerung St.
-- Ansonsten ¡¼fnen Sie ein neues Lian Sheng
--d.jump_all(special.devil_tower[6][1], special.devil_tower[6][2])
d.kill_all()
-- d.set_warp_at_eliminate(3*60, 65, 5376+532, 512+596+4)
d.check_eliminated()
local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)
end
--------------------------------------
-- 7 D kommt man aus dem Zugriff vor dem 8. Stock
--------------------------------------
when 20074.chat."Die Oberen Stockwerke" with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say(""..mob_name(20074).."")
say("Doriti sa trece-ti mai departe?")
say("")
say("Eu unul voi ramane aici!")
say("")
wait()
if pc.level >=75 then
say("Sunteti cel putin suficient de mare in level.")
say("Dar sunteti, de asemenea, suficient de curajos?")
say("Exista o singura metoda de a afla acest lucru!")
timer("devil_jump_7", 6)
return
end
say("Sunteti din pacate, nu înca")
say("suficient de mari sa creasca în continuare")
say("Exercitarea un pic si apoi se întoarce.")
say("Mult noroc in calatoria voastra.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when 20075.chat."Mit Bezug auf den oberen Turm .." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say(""..mob_name(20075).."")
say("Doriti sa trece-ti mai departe?")
say("")
say("Eu voi ramane aici!")
say("")
wait()
if pc.level >=75 then
say("Sunteti cel putin suficient de mare in level.")
say("Dar sunteti, de asemenea, suficient de curajos?")
say("Exista o singura metoda de a afla acest lucru!")
timer("devil_jump_7", 6)
return
end
say("Sunteti din pacate, nu înca")
say("suficient de mari sa creasca în continuare")
say("Exercitarea un pic si apoi se întoarce.")
say("Mult noroc in calatoria voastra.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when 20076.chat."Mit Bezug auf den oberen Turm .." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say(""..mob_name(20076).."")
say("Doriti sa trece-ti mai departe?")
say("")
say("Eu voi ramane aici!")
say("")
wait()
if pc.level >=75 then
say("Sunteti cel putin suficient de mare in level.")
say("Dar sunteti, de asemenea, suficient de curajos?")
say("Exista o singura metoda de a afla acest lucru!")
timer("devil_jump_7", 6)
return
end
say("Sunteti din pacate, nu înca")
say("suficient de mari sa creasca în continuare")
say("Exercitarea un pic si apoi se întoarce.")
say("Mult noroc in calatoria voastra.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when devil_jump_7.timer begin
d.clear_regen()
d.spawn_mob(8018, 639, 658)
d.spawn_mob(8018, 611, 637)
d.spawn_mob(8018, 596, 674)
d.spawn_mob(8018, 629, 670)
d.setf("level", 7)
d.jump_all(2048+590, 6656+638)
end
when 8018.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
local cont = d.getf("7_stone_kill") + 1
d.setf("7_stone_kill", cont)
if cont >= 4 then
d.setf("7_stone_kill", 0)
d.set_regen_file("data/dungeon/deviltower7_regen.txt")
end
end
when 8019.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
game.drop_item(30300, 1)
end
when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
pc.remove_item("30300", 1)
local pct = number(1,10)
if pct == 1 then
-- Fall wahr Karte
game.drop_item(30302, 1)
d.clear_regen()
else
-- Fall wahr Karte
game.drop_item(30301, 1)
end
end
when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
-- An der 8th Floor
say("Vei fi teleportat in pestera Zin.Mult noroc in continuare!")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()
end
--------------------------------------------
-- Von 8 F vor der Ankunft geben Sie die 9 F
--------------------------------------------
when devil_jump_8.timer begin
d.setf("level", 8)
d.jump_all(2048+590, 6656+403)
d.set_regen_file("data/dungeon/deviltower8_regen.txt")
d.spawn_mob(20366, 640, 460)
local _count= pc.count_item(30302)-- True Tilgung Dead Turm
pc.remove_item(30302,_count)
end
when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
local pct1 = number(1, 5)
if pct1 == 1 then
local pct2 = number(1, 10)
if pct2 == 1 then
-- Fall wahre Schl¡¼sel
game.drop_item(30304, 1)
else
-- Keys fiel
game.drop_item(30303, 1)
end
else
return
end
end
when 20366.take with item.vnum == 30304 begin
-- 9 F-Zeichen aufgehoben
npc.purge()
item.remove()
timer("devil_jump_9", 6)
end
---------------------------------------------
-- 9 F ein Ende, indem Sie
---------------------------------------------
when devil_jump_9.timer begin
d.setf("level", 9)
d.jump_all(2048+590, 6656+155)
d.regen_file("data/dungeon/deviltower9_regen.txt")
end
when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.kill_all()
timer("devil_end_jump", 10)
d.notice("Felicitari!")
d.notice("Ai ucis pe Grim Reaper!")
d.notice("Acum, veti ajunge la stagiul urmator, ucide demon rege!")
end
when devil_end_jump.timer begin
d.setf("level", 7)
d.jump_all(2048+590, 6656+638)
d.clear_regen()
d.spawn_mob(1094, 639, 658)
end
when 1094.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.notice("Felicitari!")
d.notice("Ai ucis soldatii regelui demon!")
d.notice("Acum, veti ajunge la etajul urmator, Demon albastru!")
d.kill_all()
timer("devil_end_jump_schmied", 10)
end
when devil_end_jump_schmied.timer begin
d.setf("level", 9)
d.jump_all(2048+590, 6656+155)
d.clear_regen()
d.spawn_mob(1095, 605, 178)
end
when 1095.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
notice_all("".. pc.get_name() .." Felicitari ai ucis demonul!")
notice_all("Felicitari inca odata!")
d.notice("")
d.notice("Ai ucis Demonul Albastru!")
d.notice("Ca o recompensa iti va aparea toti cei 3 fierari din acest turn!")
d.check_eliminated()
local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(20074, 609, 179);
d.spawn_mob(20075, 609, 172);
d.spawn_mob(20076, 609, 185);
d.spawn_mob(9012, 619, 170);
d.setqf("can_refine", 1)
end
end
end
state start begin
when login begin
if pc.get_map_index() == 66 then
-- Nicht in einer Etage, die wieder nach drau¡¼n .
-- Layer Range
-- 1F 88 577 236 737
-- 2F 91 343 238 504
-- 3F 104 107 248 269
if pc.get_x() < 2048+88 or pc.get_y() < 6656+577 or pc.get_x() > 2048+236 or pc.get_y() > 6656+737 then
pc.warp((5376+532)*100, (512+596+4)*100, 65)
end
pc.set_warp_location(65, 5376+532, 512+596+4)
elseif pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 then
pc.set_warp_location(65, 5376+532, 512+596+4)
end
end
when deviltower_man.chat.locale.deviltower_man_chat begin
if pc.get_level() < 40 then
say(locale.deviltower_man_say_you_cant)
else
say(locale.deviltower_man_say)
local s = select(locale.deviltower_enter,locale.deviltower_no_enter)
if s == 1 then
-- warp into!
pc.warp(216500,727000)
end
end
end
when devil_stone1.kill begin
timer("devil_stone1_1", 6)
end
when devil_stone1_1.timer begin
local mapto7= pc.count_item(30302) -- Ich weiß nicht, das wahre Tilgung der die Existenz der Seele des Turms
pc.remove_item(30302,mapto7)
local boxto7= pc.count_item(30300) -- Beseitigung des unbekannten weiß nicht, ob es sich um ein Feld
pc.remove_item(30300,boxto7)
d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2])
d.regen_file("data/dungeon/deviltower2_regen.txt")
d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[2][1], special.devil_tower[2][2], "data/dungeon/deviltower3_regen.txt")
end
--when devil_stone2.kill begin
--d.jump_all_local(special.devil_tower[2][1], special.devil_tower[2][2])
--end
when devil_stone3.kill begin
--d.jump_all_local(special.devil_tower[3][1], special.devil_tower[3][2])
--d.set_exit_all_at_eliminate(6)
--d.set_warp_at_eliminate(6, d.get_map_index(), 100, 100)
--d.set_warp_at_eliminate(4, 65, 5376+532, 512+596+4)
d.set_warp_at_eliminate(4, d.get_map_index(), special.devil_tower[3][1], special.devil_tower[3][2], "data/dungeon/deviltower4_regen.txt")
d.check_eliminated()
--d.exit_all()
end
function get_4floor_stone_pos()
local positions = {
{368, 629},
{419, 630},
{428, 653},
{422, 679},
{395, 689},
{369, 679},
{361, 658},
}
for i = 1, 6 do
local j = number(i, 7)
if i != j then
local t = positions[j];
positions[j] = positions[j];
positions[j] = t;
end
end
--for i = 1, 7 do
-- positions[j][1] = positions[j][1] * 100
-- positions[j][2] = positions[j][2] * 100
-- end
return positions
end
when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.setf("level", 4)
-- Reproduzieren eine gro¡¼ Anzahl von Monstern und Herstellung von wahr und falsch Steine Steine
--d.regen_file("data/dungeon/deviltower4_regen.txt")
local positions = deviltower_zone.get_4floor_stone_pos()
for i = 1, 6 do
chat(positions[j][1], positions[j][2])
d.set_unique("fake" .. i , d.spawn_mob(8017, positions[j][1], positions[j][2]))
end
chat(positions[7][1], positions[7][2])
local vid = d.spawn_mob(8017, positions[7][1], positions[7][2])
chat(vid)
d.set_unique("real", vid)
server_loop_timer('devil_stone4_update', 10, pc.get_map_index())
server_timer('devil_stone4_fail1', 5*60, pc.get_map_index())
d.notice("Aici este al 4-lea etaj");
d.notice("gaseste adevarata piatra.");
d.notice("in terment de maxim 15 minute.");
end
when devil_stone4_fail1.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("10 minute!")
server_timer('devil_stone4_fail2', 5*60, get_server_timer_arg())
end
end
when devil_stone4_fail2.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("5 minute!")
server_timer('devil_stone4_fail', 5*60, get_server_timer_arg())
end
end
when devil_stone4_fail.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Timpul a expirat!")
d.exit_all()
clear_server_timer('devil_stone4_update', get_server_timer_arg())
end
end
when devil_stone4_update.server_timer begin
if d.select(get_server_timer_arg()) then
if not d.is_unique_dead("real") then
for i = 1, 6 do
if d.getf("fakedead" .. i) == 0 then
if d.unique_get_hp_perc("fake" .. i) < 50 then
d.purge_unique("fake" .. i)
d.setf("fakedead" .. i, 1)
d.notice("Piatra metin dispare.");
end
end
end
else
--d.clear_regen()
--d.regen_file("data/dungeon/deviltower5_regen.txt")
server_timer("devil_stone4_end", 5, get_server_timer_arg())
d.notice("Felicitari a-ti reusit!");
d.notice("Trece-ti la etajul urmator!")
clear_server_timer('devil_stone4_fail1', get_server_timer_arg())
clear_server_timer('devil_stone4_fail2', get_server_timer_arg())
clear_server_timer('devil_stone4_fail', get_server_timer_arg())
end
else
server_timer('devil_stone4_stop_timer', 1, get_server_timer_arg())
end
end
when devil_stone4_stop_timer.server_timer begin
clear_server_timer('devil_stone4_update', get_server_timer_arg())
end
when devil_stone4_end.server_timer begin
if d.select(get_server_timer_arg()) then
d.setf("level", 5)
d.setf("stone_count", 5)
d.notice("Etajul 5!")
d.notice("Omoara toti monstrii, iar de la acestia pica niste chei!")
d.notice("Gaseste cheia cea buna pentru a trece la nivelul urmator!")
d.notice("Cu ajutorul acestor chei vei putea ajunge la nivelul 6!(ai 20 de minute)")
d.jump_all(special.devil_tower[4][1], special.devil_tower[4][2])
server_timer('devil_stone5_fail1', 5*60, get_server_timer_arg())
clear_server_timer('devil_stone4_update', get_server_timer_arg())
-- 5. Stock, weiter zu reproduzieren
d.set_regen_file("data/dungeon/deviltower5_regen.txt")
-- 5. Stock, Seal Stone Reproduktion
d.spawn_mob(20073, 421, 452)
d.spawn_mob(20073, 380, 460)
d.spawn_mob(20073, 428, 414)
d.spawn_mob(20073, 398, 392)
d.spawn_mob(20073, 359, 426)
end
end
when devil_stone5_fail1.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("15 minute!")
server_timer('devil_stone5_fail2', 5*60, get_server_timer_arg())
end
end
when devil_stone5_fail2.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("10 minute!")
server_timer('devil_stone5_fail3', 5*60, get_server_timer_arg())
end
end
when devil_stone5_fail3.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("5 minute!")
server_timer('devil_stone5_fail', 5*60, get_server_timer_arg())
end
end
when devil_stone5_fail.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Timpul a expirat!")
d.exit_all()
end
end
--when devil_stone4.kill begin
--d.setf("level", 5)
--d.setf("stone_count", 4)
--d.clear_regen()
--d.regen_file("data/dungeon/deviltower5_regen.txt")
--d.jump_all_local(special.devil_tower[4][1], special.devil_tower[4][2])
--end
when 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin
local KILL_COUNT_FOR_DROP_KEY = 50
--if is_test_server() then
--KILL_COUNT_FOR_DROP_KEY = 1
--end
local n =d.getf("count") + 1
d.setf("count", n)
if n == KILL_COUNT_FOR_DROP_KEY then
-- Falling Tasten
game.drop_item(50084, 1)
d.setf("count", 0)
end
end
when devil_stone5.take with item.vnum == 50084 begin
npc.purge()
item.remove()
d.setf("stone_count", d.getf("stone_count") - 1)
if d.getf("stone_count") <= 0 then
d.setf("level", 6)
d.clear_regen()
d.regen_file("data/dungeon/deviltower6_regen.txt")
d.notice("Felicitari!")
d.notice("Vei urca la etajul urmator.")
d.jump_all(special.devil_tower[5][1], special.devil_tower[5][2])
clear_server_timer('devil_stone5_fail1', get_server_timer_arg())
clear_server_timer('devil_stone5_fail2', get_server_timer_arg())
clear_server_timer('devil_stone5_fail3', get_server_timer_arg())
clear_server_timer('devil_stone5_fail', get_server_timer_arg())
else
d.notice("Coloana eliminate ... mai ai"..d.getf("stone_count").."Mult noroc!")
end
end
when devil_stone6.kill begin
-- Geschickt, um eine Karte, wo die Verfeinerung St.
-- Ansonsten ¡¼fnen Sie ein neues Lian Sheng
--d.jump_all(special.devil_tower[6][1], special.devil_tower[6][2])
d.kill_all()
-- d.set_warp_at_eliminate(3*60, 65, 5376+532, 512+596+4)
d.check_eliminated()
local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)
end
--------------------------------------
-- 7 D kommt man aus dem Zugriff vor dem 8. Stock
--------------------------------------
when 20074.chat."Die Oberen Stockwerke" with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say(""..mob_name(20074).."")
say("Doriti sa trece-ti mai departe?")
say("")
say("Eu unul voi ramane aici!")
say("")
wait()
if pc.level >=75 then
say("Sunteti cel putin suficient de mare in level.")
say("Dar sunteti, de asemenea, suficient de curajos?")
say("Exista o singura metoda de a afla acest lucru!")
timer("devil_jump_7", 6)
return
end
say("Sunteti din pacate, nu înca")
say("suficient de mari sa creasca în continuare")
say("Exercitarea un pic si apoi se întoarce.")
say("Mult noroc in calatoria voastra.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when 20075.chat."Mit Bezug auf den oberen Turm .." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say(""..mob_name(20075).."")
say("Doriti sa trece-ti mai departe?")
say("")
say("Eu voi ramane aici!")
say("")
wait()
if pc.level >=75 then
say("Sunteti cel putin suficient de mare in level.")
say("Dar sunteti, de asemenea, suficient de curajos?")
say("Exista o singura metoda de a afla acest lucru!")
timer("devil_jump_7", 6)
return
end
say("Sunteti din pacate, nu înca")
say("suficient de mari sa creasca în continuare")
say("Exercitarea un pic si apoi se întoarce.")
say("Mult noroc in calatoria voastra.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when 20076.chat."Mit Bezug auf den oberen Turm .." with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
say(""..mob_name(20076).."")
say("Doriti sa trece-ti mai departe?")
say("")
say("Eu voi ramane aici!")
say("")
wait()
if pc.level >=75 then
say("Sunteti cel putin suficient de mare in level.")
say("Dar sunteti, de asemenea, suficient de curajos?")
say("Exista o singura metoda de a afla acest lucru!")
timer("devil_jump_7", 6)
return
end
say("Sunteti din pacate, nu înca")
say("suficient de mari sa creasca în continuare")
say("Exercitarea un pic si apoi se întoarce.")
say("Mult noroc in calatoria voastra.")
say("")
wait()
pc.warp(590500, 110500)
return
end
when devil_jump_7.timer begin
d.clear_regen()
d.spawn_mob(8018, 639, 658)
d.spawn_mob(8018, 611, 637)
d.spawn_mob(8018, 596, 674)
d.spawn_mob(8018, 629, 670)
d.setf("level", 7)
d.jump_all(2048+590, 6656+638)
end
when 8018.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
local cont = d.getf("7_stone_kill") + 1
d.setf("7_stone_kill", cont)
if cont >= 4 then
d.setf("7_stone_kill", 0)
d.set_regen_file("data/dungeon/deviltower7_regen.txt")
end
end
when 8019.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
game.drop_item(30300, 1)
end
when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
pc.remove_item("30300", 1)
local pct = number(1,10)
if pct == 1 then
-- Fall wahr Karte
game.drop_item(30302, 1)
d.clear_regen()
else
-- Fall wahr Karte
game.drop_item(30301, 1)
end
end
when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
-- An der 8th Floor
say("Vei fi teleportat in pestera Zin.Mult noroc in continuare!")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()
end
--------------------------------------------
-- Von 8 F vor der Ankunft geben Sie die 9 F
--------------------------------------------
when devil_jump_8.timer begin
d.setf("level", 8)
d.jump_all(2048+590, 6656+403)
d.set_regen_file("data/dungeon/deviltower8_regen.txt")
d.spawn_mob(20366, 640, 460)
local _count= pc.count_item(30302)-- True Tilgung Dead Turm
pc.remove_item(30302,_count)
end
when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
local pct1 = number(1, 5)
if pct1 == 1 then
local pct2 = number(1, 10)
if pct2 == 1 then
-- Fall wahre Schl¡¼sel
game.drop_item(30304, 1)
else
-- Keys fiel
game.drop_item(30303, 1)
end
else
return
end
end
when 20366.take with item.vnum == 30304 begin
-- 9 F-Zeichen aufgehoben
npc.purge()
item.remove()
timer("devil_jump_9", 6)
end
---------------------------------------------
-- 9 F ein Ende, indem Sie
---------------------------------------------
when devil_jump_9.timer begin
d.setf("level", 9)
d.jump_all(2048+590, 6656+155)
d.regen_file("data/dungeon/deviltower9_regen.txt")
end
when 1093.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.kill_all()
timer("devil_end_jump", 10)
d.notice("Felicitari!")
d.notice("Ai ucis pe Grim Reaper!")
d.notice("Acum, veti ajunge la stagiul urmator, ucide demon rege!")
end
when devil_end_jump.timer begin
d.setf("level", 7)
d.jump_all(2048+590, 6656+638)
d.clear_regen()
d.spawn_mob(1094, 639, 658)
end
when 1094.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.notice("Felicitari!")
d.notice("Ai ucis soldatii regelui demon!")
d.notice("Acum, veti ajunge la etajul urmator, Demon albastru!")
d.kill_all()
timer("devil_end_jump_schmied", 10)
end
when devil_end_jump_schmied.timer begin
d.setf("level", 9)
d.jump_all(2048+590, 6656+155)
d.clear_regen()
d.spawn_mob(1095, 605, 178)
end
when 1095.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
notice_all("".. pc.get_name() .." Felicitari ai ucis demonul!")
notice_all("Felicitari inca odata!")
d.notice("")
d.notice("Ai ucis Demonul Albastru!")
d.notice("Ca o recompensa iti va aparea toti cei 3 fierari din acest turn!")
d.check_eliminated()
local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(20074, 609, 179);
d.spawn_mob(20075, 609, 172);
d.spawn_mob(20076, 609, 185);
d.spawn_mob(9012, 619, 170);
d.setqf("can_refine", 1)
end
end
end
quest deviltower_zone begin
state start begin
when login with DemonTowerzone.isInDungeon() begin
local data = DemonTowerzone.ReturnData();
local outside_tower_coords = data["outside_tower_coords"];
local pid = pc.get_player_id();
d.set_warp_location(data["outside_index"], outside_tower_coords["x"], outside_tower_coords["y"]);
if (d.getf("demontower_leader_"..pid.."") == 1) then
-- loop_timer("demontower_secondfloor_monster_count", 15);
d.notice("Turnul Demonilor: Acest nivel poate fi completat doar cand toti monstrii sunt omorati.")
end
end
when deviltower_man.chat.locale.deviltower_man_chat begin
local data = DemonTowerzone.ReturnData();
local entry_pos = data["inside_tower_coords"];
say_title(string.format("%s[ENTER]", mob_name(npc.get_race())))
if DemonTowerzone.hasLevel() then
say("Acest turn este plin cu demoni.[ENTER]Doar cei mai puternici pot ajunge la ultimul etaj.[ENTER]Se spune, ca toti care au intrat[ENTER]in turn nu au mai iesit in viata.[ENTER][ENTER]Vrei sa intrii in Turnul Demonilor?[ENTER]")
if (select("Da", "Nu") == 1) then
pc.warp(entry_pos["x"]*100, entry_pos["y"]*100);
end
else
say(string.format("Nivelul minim pentru a intra in acest turn este %d.", data["min_level"]))
end
end
when kill with npc.get_race() == 8015 and DemonTowerzone.isInTower() begin
local data = DemonTowerzone.ReturnData();
local second_floor_pos = data["1th_teleport_coords"];
timer("demontower_2floor", 5);
notice_all(string.format("[Turnul Demonilor]: Metinul a fost distrus pe ch %d.", pc.get_channel_id()))
end
when demontower_2floor.timer begin
local data = DemonTowerzone.ReturnData();
local second_floor_pos = data["1th_teleport_coords"];
local pid = pc.get_player_id();
d.new_jump_all(data["inside_index"], second_floor_pos["x"], second_floor_pos["y"]);
d.setf("demontower_leader_"..pid.."", 1);
d.setf("demontower_floor", 1);
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower3_regen.txt");
end
when kill with npc.get_race() == 1091 begin
local data = DemonTowerzone.ReturnData();
local third_floor_pos = data["2th_teleport_coords"];
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.set_warp_at_eliminate(4, d.get_map_index(), third_floor_pos["x"], third_floor_pos["y"], get_locale_base_path().."/quest/dungeon/devil_tower/deviltower4_regen.txt");
d.check_eliminated();
end
when kill with npc.get_race() == 8016 and DemonTowerzone.isInDungeon() begin
local pos = {
{368, 629}, {419, 630}, {428, 653}, {422, 679},
{395, 689}, {369, 679}, {361, 658}
};
for i = 1, 6 do
local rN = number(1, table.getn(pos));
d.spawn_mob(8017, pos[rN][1], pos[rN][2]);
table.remove(pos, rN);
end
local vid = d.spawn_mob(8017, pos[1][1], pos[1][2]);
d.set_unique("real_metin_stone", vid);
end
when kill with npc.get_race() == 8017 and DemonTowerzone.isInDungeon() begin
if (npc.get_vid() == d.get_unique_vid("real_metin_stone")) then
d.notice("Turnul Demonilor: Ai gasit piatra corecta, in 5 secunde veti fi teleportati!")
DemonTowerzone.ClearDungeon();
server_timer("demontower_4floor", 5, d.get_map_index());
else
d.notice("Turnul Demonilor: Acesta piatra metin este piatra gresita!")
end
end
when demontower_4floor.server_timer begin
if (d.select(get_server_timer_arg())) then
local data = DemonTowerzone.ReturnData();
local forth_floor_pos = data["3th_teleport_coords"];
d.regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower5_regen.txt");
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.setf("demontower_5floor_seal_count", 5);
d.setf("demontower_5floor_monster_until_key", 150);
d.spawn_mob(20073, 421, 452);
d.spawn_mob(20073, 380, 460);
d.spawn_mob(20073, 428, 414);
d.spawn_mob(20073, 398, 392);
d.spawn_mob(20073, 359, 426);
d.notice("Turnul Demonilor: Omoara monstrii si gaseste cheile cu care sa deschizi")
d.notice("Turnul Demonilor: cele cinci sigilii ce se afla in camera.")
d.jump_all(forth_floor_pos["x"], forth_floor_pos["y"]);
end
end
when kill with DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 3 and not npc.is_pc() begin
d.setf("demontower_5floor_monster_until_key", d.getf("demontower_5floor_monster_until_key")-1);
if d.getf("demontower_5floor_monster_until_key") <= 0 then
d.setf("demontower_5floor_monster_until_key", 150);
game.drop_item(DemonTowerzone.ReturnData()["3th_key_vnum"]);
end
end
when devil_stone5.take with item.vnum == 50084 and DemonTowerzone.isInDungeon() begin
npc.purge();
item.remove();
d.setf("demontower_5floor_seal_count", d.getf("demontower_5floor_seal_count") - 1);
if (d.getf("demontower_5floor_seal_count") <= 0) then
d.notice("Turnul Demonilor: Ai deschis cu succes toate sigiliile, in 5 secunde veti fi teleportati!")
DemonTowerzone.ClearDungeon();
server_timer("demontower_5floor", 5, d.get_map_index());
else
d.notice(string.format("Turnul Demonilor: Ai deschis inca un Sigiliu! Au mai ramas %d sigilii de deschis!", d.getf("demontower_5floor_seal_count")))
d.notice("Turnul Demonilor: Un nou val de monstrii au aparut tocmai acum.")
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower5_regen.txt")
end
end
when demontower_5floor.server_timer begin
if (d.select(get_server_timer_arg())) then
local data = DemonTowerzone.ReturnData();
local fifth_floor_pos = data["4th_teleport_coords"];
d.regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower6_regen.txt");
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.notice("Turnul Demonilor: Omoara Regele Demon Mandru pentru a merge mai departe!")
d.jump_all(fifth_floor_pos["x"], fifth_floor_pos["y"]);
end
end
when kill with npc.get_race() == 1092 and DemonTowerzone.isInDungeon() begin
local data = DemonTowerzone.ReturnData();
local fith_blsmiths = data["4th_blacksmiths"];
d.notice("Turnul Demonilor: Ai infrant Regele Demon Mandru, unul dintre cei trei")
d.notice("Turnul Demonilor: fierari va aparea si doar cei de nivel 75 in sus vor")
d.notice("Turnul Demonilor: putea sa aleaga daca sa mearga mai departe sau nu.")
DemonTowerzone.ClearDungeon();
d.setqf("can_refine", data["4th_allowed_refines"]);
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.spawn_mob(fith_blsmiths[number(1, table.getn(fith_blsmiths))], 425, 216);
end
when 20074.chat."Etajele Superioare" or 20075.chat."Etajele Superioare" or 20076.chat."Etajele Superioare" with DemonTowerzone.isInDungeon() begin
local data = DemonTowerzone.ReturnData();
local pLevel = pc.get_level()
if d.getf("demontower_floor") == 5 then
say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
say("Au gasit calea de a ajunge la etajul 7.[ENTER]Este nevoie de o multime de abilitati si maiestrie pentru a merge acolo.[ENTER]Hmmmm...[ENTER]Dupa ce v-am examinat statusul pentru a urca la etajul urmator.....")
wait()
if pLevel >= data["6th_min_level"] then
say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
say("Ai ales sa mergi mai departe, noi probleme te vor astepta!")
timer("demontower_6floor", 5);
npc.unlock();
d.purge();
else
say(string.format("Nivelul minim pentru a merge mai departe este %d.", data["6th_min_level"]))
end
else
say("Trebuie sa fi la nivelul 6 pentru[ENTER]a accesa acest npc.")
end
end
when demontower_6floor.timer begin
local data = DemonTowerzone.ReturnData();
local sixth_floor_pos = data["5th_teleport_coords"];
DemonTowerzone.ClearDungeon();
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.setf("demontower_7th_metinstones", 4);
d.spawn_mob(8018, 639, 658);
d.spawn_mob(8018, 611, 637);
d.spawn_mob(8018, 596, 674);
d.spawn_mob(8018, 629, 670);
d.notice("Turnul Demonilor: Distruge cele 4 metine si asteapta Metinul Crimelor")
d.notice("Turnul Demonilor: sa apara, aceasta ascunde harta pentru nivelul urmator!")
d.jump_all(sixth_floor_pos["x"], sixth_floor_pos["y"]);
end
when kill with npc.get_race() == 8018 and DemonTowerzone.isInDungeon() and d.getf("demontower_7th_ms_done") == 0 begin
d.setf("demontower_7th_metinstones", d.getf("demontower_7th_metinstones")-1);
if (d.getf("demontower_7th_metinstones") <= 0) then
d.setf("demontower_7th_ms_done", 1);
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower7_regen.txt");
end
end
when kill with npc.get_race() == 8019 and DemonTowerzone.isInDungeon() begin
game.drop_item(30300, 1);
end
when 30300.use with DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 6 begin
pc.remove_item(30300, 1);
if (math.random(4) == 1) then
game.drop_item(30302, 1);
DemonTowerzone.ClearDungeon();
else
game.drop_item(30301, 1);
end
end
when 30302.use with DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 6 begin
if (d.getf("demontower_7th_map_used") == 0) then
say("Cu aceasta harta, te voi teleporta la etajul urmator!")
pc.remove_item(30302, 1);
d.setf("demontower_7th_map_used", 1);
timer("demontower_7floor", 5);
else
syschat("Alta persoana a dat click pe harta!")
end
end
when demontower_7floor.timer begin
local data = DemonTowerzone.ReturnData();
local seventh_floor_pos = data["6th_teleport_coords"];
DemonTowerzone.ClearDungeon();
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.spawn_mob(20366, 640, 460);
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower8_regen.txt");
d.notice("Turnul Demonilor: Omoara monstrii si gaseste cheia corecta pentru a merge mai departe!")
d.jump_all(seventh_floor_pos["x"], seventh_floor_pos["y"]);
end
when kill with npc.get_race() == 1040 and DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 7 begin
local data = DemonTowerzone.ReturnData();
if math.random(998) <= data["6th_key_chance"] then
game.drop_item(30304, 1);
else
game.drop_item(30303, 1);
end
end
when 20366.take with item.vnum == 30304 and DemonTowerzone.isInDungeon() begin
timer("demontower_8floor", 5)
DemonTowerzone.ClearDungeon();
npc.purge();
item.remove();
end
when demontower_8floor.timer begin
local data = DemonTowerzone.ReturnData();
local eight_floor_pos = data["7th_teleport_coords"];
DemonTowerzone.ClearDungeon();
d.jump_all(eight_floor_pos["x"], eight_floor_pos["y"]);
d.regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower9_regen.txt");
end
when kill with npc.get_race() == 1093 and DemonTowerzone.isInDungeon() begin
d.notice("Turnul Demonilor a fost finalizat, in doua minute toata lumea va fi teleportata!")
notice_all(string.format("Turnul Demonilor a fost finalizat de catre %s!", pc.get_name()))
DemonTowerzone.ClearDungeon();
server_timer("demontower_exit_dungeon", 120, d.get_map_index())
end
when demontower_exit_dungeon.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Turnul Demonilor: Timpul a expirat!")
d.exit_all();
end
end
end
end
state start begin
when login with DemonTowerzone.isInDungeon() begin
local data = DemonTowerzone.ReturnData();
local outside_tower_coords = data["outside_tower_coords"];
local pid = pc.get_player_id();
d.set_warp_location(data["outside_index"], outside_tower_coords["x"], outside_tower_coords["y"]);
if (d.getf("demontower_leader_"..pid.."") == 1) then
-- loop_timer("demontower_secondfloor_monster_count", 15);
d.notice("Turnul Demonilor: Acest nivel poate fi completat doar cand toti monstrii sunt omorati.")
end
end
when deviltower_man.chat.locale.deviltower_man_chat begin
local data = DemonTowerzone.ReturnData();
local entry_pos = data["inside_tower_coords"];
say_title(string.format("%s[ENTER]", mob_name(npc.get_race())))
if DemonTowerzone.hasLevel() then
say("Acest turn este plin cu demoni.[ENTER]Doar cei mai puternici pot ajunge la ultimul etaj.[ENTER]Se spune, ca toti care au intrat[ENTER]in turn nu au mai iesit in viata.[ENTER][ENTER]Vrei sa intrii in Turnul Demonilor?[ENTER]")
if (select("Da", "Nu") == 1) then
pc.warp(entry_pos["x"]*100, entry_pos["y"]*100);
end
else
say(string.format("Nivelul minim pentru a intra in acest turn este %d.", data["min_level"]))
end
end
when kill with npc.get_race() == 8015 and DemonTowerzone.isInTower() begin
local data = DemonTowerzone.ReturnData();
local second_floor_pos = data["1th_teleport_coords"];
timer("demontower_2floor", 5);
notice_all(string.format("[Turnul Demonilor]: Metinul a fost distrus pe ch %d.", pc.get_channel_id()))
end
when demontower_2floor.timer begin
local data = DemonTowerzone.ReturnData();
local second_floor_pos = data["1th_teleport_coords"];
local pid = pc.get_player_id();
d.new_jump_all(data["inside_index"], second_floor_pos["x"], second_floor_pos["y"]);
d.setf("demontower_leader_"..pid.."", 1);
d.setf("demontower_floor", 1);
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower3_regen.txt");
end
when kill with npc.get_race() == 1091 begin
local data = DemonTowerzone.ReturnData();
local third_floor_pos = data["2th_teleport_coords"];
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.set_warp_at_eliminate(4, d.get_map_index(), third_floor_pos["x"], third_floor_pos["y"], get_locale_base_path().."/quest/dungeon/devil_tower/deviltower4_regen.txt");
d.check_eliminated();
end
when kill with npc.get_race() == 8016 and DemonTowerzone.isInDungeon() begin
local pos = {
{368, 629}, {419, 630}, {428, 653}, {422, 679},
{395, 689}, {369, 679}, {361, 658}
};
for i = 1, 6 do
local rN = number(1, table.getn(pos));
d.spawn_mob(8017, pos[rN][1], pos[rN][2]);
table.remove(pos, rN);
end
local vid = d.spawn_mob(8017, pos[1][1], pos[1][2]);
d.set_unique("real_metin_stone", vid);
end
when kill with npc.get_race() == 8017 and DemonTowerzone.isInDungeon() begin
if (npc.get_vid() == d.get_unique_vid("real_metin_stone")) then
d.notice("Turnul Demonilor: Ai gasit piatra corecta, in 5 secunde veti fi teleportati!")
DemonTowerzone.ClearDungeon();
server_timer("demontower_4floor", 5, d.get_map_index());
else
d.notice("Turnul Demonilor: Acesta piatra metin este piatra gresita!")
end
end
when demontower_4floor.server_timer begin
if (d.select(get_server_timer_arg())) then
local data = DemonTowerzone.ReturnData();
local forth_floor_pos = data["3th_teleport_coords"];
d.regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower5_regen.txt");
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.setf("demontower_5floor_seal_count", 5);
d.setf("demontower_5floor_monster_until_key", 150);
d.spawn_mob(20073, 421, 452);
d.spawn_mob(20073, 380, 460);
d.spawn_mob(20073, 428, 414);
d.spawn_mob(20073, 398, 392);
d.spawn_mob(20073, 359, 426);
d.notice("Turnul Demonilor: Omoara monstrii si gaseste cheile cu care sa deschizi")
d.notice("Turnul Demonilor: cele cinci sigilii ce se afla in camera.")
d.jump_all(forth_floor_pos["x"], forth_floor_pos["y"]);
end
end
when kill with DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 3 and not npc.is_pc() begin
d.setf("demontower_5floor_monster_until_key", d.getf("demontower_5floor_monster_until_key")-1);
if d.getf("demontower_5floor_monster_until_key") <= 0 then
d.setf("demontower_5floor_monster_until_key", 150);
game.drop_item(DemonTowerzone.ReturnData()["3th_key_vnum"]);
end
end
when devil_stone5.take with item.vnum == 50084 and DemonTowerzone.isInDungeon() begin
npc.purge();
item.remove();
d.setf("demontower_5floor_seal_count", d.getf("demontower_5floor_seal_count") - 1);
if (d.getf("demontower_5floor_seal_count") <= 0) then
d.notice("Turnul Demonilor: Ai deschis cu succes toate sigiliile, in 5 secunde veti fi teleportati!")
DemonTowerzone.ClearDungeon();
server_timer("demontower_5floor", 5, d.get_map_index());
else
d.notice(string.format("Turnul Demonilor: Ai deschis inca un Sigiliu! Au mai ramas %d sigilii de deschis!", d.getf("demontower_5floor_seal_count")))
d.notice("Turnul Demonilor: Un nou val de monstrii au aparut tocmai acum.")
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower5_regen.txt")
end
end
when demontower_5floor.server_timer begin
if (d.select(get_server_timer_arg())) then
local data = DemonTowerzone.ReturnData();
local fifth_floor_pos = data["4th_teleport_coords"];
d.regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower6_regen.txt");
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.notice("Turnul Demonilor: Omoara Regele Demon Mandru pentru a merge mai departe!")
d.jump_all(fifth_floor_pos["x"], fifth_floor_pos["y"]);
end
end
when kill with npc.get_race() == 1092 and DemonTowerzone.isInDungeon() begin
local data = DemonTowerzone.ReturnData();
local fith_blsmiths = data["4th_blacksmiths"];
d.notice("Turnul Demonilor: Ai infrant Regele Demon Mandru, unul dintre cei trei")
d.notice("Turnul Demonilor: fierari va aparea si doar cei de nivel 75 in sus vor")
d.notice("Turnul Demonilor: putea sa aleaga daca sa mearga mai departe sau nu.")
DemonTowerzone.ClearDungeon();
d.setqf("can_refine", data["4th_allowed_refines"]);
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.spawn_mob(fith_blsmiths[number(1, table.getn(fith_blsmiths))], 425, 216);
end
when 20074.chat."Etajele Superioare" or 20075.chat."Etajele Superioare" or 20076.chat."Etajele Superioare" with DemonTowerzone.isInDungeon() begin
local data = DemonTowerzone.ReturnData();
local pLevel = pc.get_level()
if d.getf("demontower_floor") == 5 then
say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
say("Au gasit calea de a ajunge la etajul 7.[ENTER]Este nevoie de o multime de abilitati si maiestrie pentru a merge acolo.[ENTER]Hmmmm...[ENTER]Dupa ce v-am examinat statusul pentru a urca la etajul urmator.....")
wait()
if pLevel >= data["6th_min_level"] then
say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
say("Ai ales sa mergi mai departe, noi probleme te vor astepta!")
timer("demontower_6floor", 5);
npc.unlock();
d.purge();
else
say(string.format("Nivelul minim pentru a merge mai departe este %d.", data["6th_min_level"]))
end
else
say("Trebuie sa fi la nivelul 6 pentru[ENTER]a accesa acest npc.")
end
end
when demontower_6floor.timer begin
local data = DemonTowerzone.ReturnData();
local sixth_floor_pos = data["5th_teleport_coords"];
DemonTowerzone.ClearDungeon();
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.setf("demontower_7th_metinstones", 4);
d.spawn_mob(8018, 639, 658);
d.spawn_mob(8018, 611, 637);
d.spawn_mob(8018, 596, 674);
d.spawn_mob(8018, 629, 670);
d.notice("Turnul Demonilor: Distruge cele 4 metine si asteapta Metinul Crimelor")
d.notice("Turnul Demonilor: sa apara, aceasta ascunde harta pentru nivelul urmator!")
d.jump_all(sixth_floor_pos["x"], sixth_floor_pos["y"]);
end
when kill with npc.get_race() == 8018 and DemonTowerzone.isInDungeon() and d.getf("demontower_7th_ms_done") == 0 begin
d.setf("demontower_7th_metinstones", d.getf("demontower_7th_metinstones")-1);
if (d.getf("demontower_7th_metinstones") <= 0) then
d.setf("demontower_7th_ms_done", 1);
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower7_regen.txt");
end
end
when kill with npc.get_race() == 8019 and DemonTowerzone.isInDungeon() begin
game.drop_item(30300, 1);
end
when 30300.use with DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 6 begin
pc.remove_item(30300, 1);
if (math.random(4) == 1) then
game.drop_item(30302, 1);
DemonTowerzone.ClearDungeon();
else
game.drop_item(30301, 1);
end
end
when 30302.use with DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 6 begin
if (d.getf("demontower_7th_map_used") == 0) then
say("Cu aceasta harta, te voi teleporta la etajul urmator!")
pc.remove_item(30302, 1);
d.setf("demontower_7th_map_used", 1);
timer("demontower_7floor", 5);
else
syschat("Alta persoana a dat click pe harta!")
end
end
when demontower_7floor.timer begin
local data = DemonTowerzone.ReturnData();
local seventh_floor_pos = data["6th_teleport_coords"];
DemonTowerzone.ClearDungeon();
d.setf("demontower_floor", d.getf("demontower_floor")+1);
d.spawn_mob(20366, 640, 460);
d.set_regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower8_regen.txt");
d.notice("Turnul Demonilor: Omoara monstrii si gaseste cheia corecta pentru a merge mai departe!")
d.jump_all(seventh_floor_pos["x"], seventh_floor_pos["y"]);
end
when kill with npc.get_race() == 1040 and DemonTowerzone.isInDungeon() and d.getf("demontower_floor") == 7 begin
local data = DemonTowerzone.ReturnData();
if math.random(998) <= data["6th_key_chance"] then
game.drop_item(30304, 1);
else
game.drop_item(30303, 1);
end
end
when 20366.take with item.vnum == 30304 and DemonTowerzone.isInDungeon() begin
timer("demontower_8floor", 5)
DemonTowerzone.ClearDungeon();
npc.purge();
item.remove();
end
when demontower_8floor.timer begin
local data = DemonTowerzone.ReturnData();
local eight_floor_pos = data["7th_teleport_coords"];
DemonTowerzone.ClearDungeon();
d.jump_all(eight_floor_pos["x"], eight_floor_pos["y"]);
d.regen_file(get_locale_base_path().."/quest/dungeon/devil_tower/deviltower9_regen.txt");
end
when kill with npc.get_race() == 1093 and DemonTowerzone.isInDungeon() begin
d.notice("Turnul Demonilor a fost finalizat, in doua minute toata lumea va fi teleportata!")
notice_all(string.format("Turnul Demonilor a fost finalizat de catre %s!", pc.get_name()))
DemonTowerzone.ClearDungeon();
server_timer("demontower_exit_dungeon", 120, d.get_map_index())
end
when demontower_exit_dungeon.server_timer begin
if d.select(get_server_timer_arg()) then
d.notice("Turnul Demonilor: Timpul a expirat!")
d.exit_all();
end
end
end
end
Ma puteti ajuta cu un sfat?
Multumesc!



