Problema DT

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
Noxus
Nou Venit

Nou Venit
Mesaje: 35
Membru din: 13 Ian 2017, 16:07
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Bat metinul din dt, insa nu ma teleporteaza la etajul 2 .. din ce cauza poate fi?
Avatar utilizator
maic
Membru Club

Membru Club
Mesaje: 936
Membru din: 20 Sep 2015, 18:00
Aprecieri: 37  
Mulţumiri: 1331  
Discord: Copiază ID
Medalii

Schimba questul, el se foloseste de chestiile astea.

[ Postat de pe iPhone ] Imagine
ImagineImagine
Afișează semnătura
Avatar utilizator
Noxus
Nou Venit

Nou Venit
Mesaje: 35
Membru din: 13 Ian 2017, 16:07
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

L-am schimbat inainte de a posta.. insa nimic nou :/ . Poate am pus iarasi un quest defect. Imi poti recomanda unul functional ? ^^
Avatar utilizator
Noxus
Nou Venit

Nou Venit
Mesaje: 35
Membru din: 13 Ian 2017, 16:07
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Asta apare in putty dupa ce bat metinul de la etajul 1. Insa nu se intampla absolut nimic.

Cod: Selectaţi tot

[string "IsScriptTrue"]:1: <eof> expected near `return'
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Noxus scrie:Asta apare in putty dupa ce bat metinul de la etajul 1. Insa nu se intampla absolut nimic.

Cod: Selectaţi tot

[string "IsScriptTrue"]:1: <eof> expected near `return'
<eof> expected near `return'
Lipseste o comanda din quest(ex: "when";"if";etc.)
Poti pune eventual questul aici, in

Cod: Selectaţi tot

, sa ne facem si noi o idee.
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
Noxus
Nou Venit

Nou Venit
Mesaje: 35
Membru din: 13 Ian 2017, 16:07
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Acesta este questul.

Cod: Selectaţi tot

--------------------------------
-- Copyright @ DT 2013
--------------------------------
quest deviltower_zone begin
state start begin

when login begin

if pc.get_map_index() == 66 then

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() >= 66 and pc.get_map_index() < 67 then

pc.set_warp_location(65, 5376+532, 512+596+4)

end

end

------------------------------------------------------
-- Paznicul demonilor : Intrare în turnul demonilor --
------------------------------------------------------
when deviltower_man.chat.locale.deviltower_man_chat with pc.get_map_index() == 65 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

pc.warp(216500,727000)

elseif s == 2 then

return

end

end

end
------------------------------------------------------
-- Paznicul demonilor : Ieºire din turnul demonilor --
------------------------------------------------------
when deviltower_man.chat."Ieºire din turn" with pc.get_map_index() == 66 begin

say_title("Gardianul turnului:")
say("Esti de acord sa parasesti Turnul Demonilor?")
local b =select("Da!","Mai stau..")
if b == 1 then
say_title("Gardianul turnului:")
say("O decizie foarte buna. Este prea periculos")
say("pentru tine sa mai ramai acolo. Ai grija.")

wait()

pc.warp(590500, 110500)

end

end

------------------------------------
-- Turnul Demonilor : Fix iteme --
------------------------------------
when login or logout with pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end


when login or logout with pc.in_dungeon() and pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when logout with pc.get_map_index() == 66 begin

pc.warp(590500, 110500)

end
------------------------------------
-- Turnul Demonilor : Parter --
------------------------------------
when devil_stone1.kill begin

timer("devil_stone1_1", 6)

end
-------------------------------
-- Turnul Demonilor : Etaj 2 --
-------------------------------

when devil_stone1_1.timer begin

pc.remove_item(30302, pc.count_item(30302))
pc.remove_item(30300, pc.count_item(30300))
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
----------------------------------------------
-- Turnul Demonilor : Etaj 3 : Regele Demon --
----------------------------------------------
when devil_stone3.kill begin

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()

end
------------------------------------------------
-- Turnul Demonilor : Etaj 4 : Pietrele Metin --
------------------------------------------------
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[i];
positions[i] = positions[j];
positions[j] = t;

end

end

return positions

end
when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

d.setf("level", 4)

d.notice("Te afli la poarta sigilata de la etajul 4.")
d.notice("Multe pietre false te asteapta pentru a te")
d.notice("induce in eroare si numai una dintre ele")
d.notice("este Piatra Metin cu adevarat importanta.")
d.notice("Trebuie sa o distrugi in 15 minute sau nu")
d.notice("vei putea trece prin poarta.")

local positions = deviltower_zone.get_4floor_stone_pos()

for i = 1, 6 do

chat(positions[i][1], positions[i][2])
d.set_unique("fake" .. i , d.spawn_mob(8017, positions[i][1], positions[i][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())
end
when devil_stone4_fail1.server_timer begin

if d.select(get_server_timer_arg()) then

d.notice("Minute ramase: 10")
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("Minute ramase: 5")
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("Pietrele metin false dispar ...")

end

end

end

else

server_timer("devil_stone4_end", 5, get_server_timer_arg())

d.notice("Ai dovedit un auz excelent si un instinct bun, si")
d.notice("ai distrus adevarata piatra metin.")
d.notice("Vei ajunge de indata la etajul 5.")

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
-------------------------------------------------
-- Turnul Demonilor : Etaj 5 : Sigiliile vechi --
-------------------------------------------------
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("Acum esti la poarta sigilata de la etajul 5.")
d.notice("Trebuie sa deschizi cele cinci Sigilii Antice")
d.notice("pentru a trece la etajul urmator. Drumul este")
d.notice("plin de creaturi care te vor ataca.")
d.notice("Unele dintre ele au niste chei. Strange destule")
d.notice("Pietre Chei, sa deschizi toate cele cinci Sigilii")
d.notice("Antice si sa treci la etajul 6.")
d.notice("Dar ai grija: Ai timp numai 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())
d.set_regen_file("data/dungeon/deviltower5_regen.txt")
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("Minute ramase: 15")
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("Minute ramase: 10")
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("Minute ramase: 5")
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 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin

local KILL_COUNT_FOR_DROP_KEY = 50
local n =d.getf("count") + 1

d.setf("count", n) 

if n == KILL_COUNT_FOR_DROP_KEY then

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("Ai rupt sigiliul Cheii de Piatra si poti sa")
d.notice("intri in etajul 5. Regele Demon Mandru este de")
d.notice("asemenea la acest etaj. Distruge toate creaturile")
d.notice("intalnite acolo.")
d.notice("Ucide toti monstrii de la etajul 6!") 

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("Ai deschis pecetea! Mai raman "..d.getf("stone_count")..".")

end

end

-----------------------------------------------------
-- Turnul Demonilor : Etaj 6 : Regele Demon Mandru --
-----------------------------------------------------
when devil_stone6.kill begin

d.kill_all()
d.kill_all()
d.kill_all()
d.kill_all()

d.check_eliminated()

d.notice("Ai omorat toate creaturile. Acum mergi la Fierar")
d.notice("si alege recompensa - iti va imbunatati un obiect")
d.notice("la alegerea ta. pentru a face asta, pune")
d.notice("obiectul care vrei sa il imbunatatesti pe fierar.")

local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)

end
-------------------------------------------
-- Turnul Demonilor : Etajele superioare --
-------------------------------------------
when 20074.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20074).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20074).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say_title(""..mob_name(20074)..":")
say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
when 20075.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20075).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20075).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")
npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end

when 20076.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()
say_title(""..mob_name(20076).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20076).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
-------------------------------------------
-- Turnul Demonilor : Etaj 7 : Planurile --
-------------------------------------------
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)

d.notice("Harta Turnului Zin-Sa-Gui deschide calea catre")
d.notice("urmatorul etaj. Le poti gasi distrugand Pietrele")
d.notice("Metin.")

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() >= 66 and pc.get_map_index() < 670000 begin
-- Cutie de fier necunoscuta
game.drop_item(30300, 1)

end
when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

pc.remove_item("30300", 1)
local pct = number(1,10)
if pct == 1 then
-- Harta Zin-Sa-Gui (Adevarat)
game.drop_item(30302, 1)
d.clear_regen()

else
-- Harta Sa-Gui (Fals)
game.drop_item(30301, 1)

end

end
when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

say_title("Informatie:")
say("Aceasta hart te teleporteaza la etajul 7 al")
say("Turnului Demonilor")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()

end
----------------------------------------
-- Turnul Demonilor : Etaj 8 : Cheile --
----------------------------------------
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)
pc.remove_item(30302,_count)

d.notice("Gaseste cheia potrivita.")
d.notice("Ai nevoie de cheia Zin-Bong-In pentru a")
d.notice("deschide Pecetea Sa-Soein si a ajunge la")
d.notice("etajul urmator.")

end
when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 66 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
-- Cheie Zin-Bong (Adevarat)
game.drop_item(30304, 1)

else

-- Cheie Bong-In (Fals)
game.drop_item(30303, 1)

end

else
return

end

end
when 20366.take with item.vnum == 30304 begin

npc.purge()
item.remove()
timer("devil_jump_9", 6)

d.notice("Ucide conducatorul demonilor.")

end
--------------------------------------------------
-- Turnul Demonilor : Etaj 9 : Îngerul cu coasa --
--------------------------------------------------
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() >= 66 and pc.get_map_index() < 670000 begin

d.kill_all()
d.kill_all()
d.kill_all()

d.notice("Ai indeplinit sarcina cu succes si vei")
d.notice("fi teleportat la urmatorul nivel.")
timer("devil_end_jump", 60)

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("[Informatie]L-ai ucis pe comandantul general albastru.")
d.notice("[Informatie]Acum vei trece la ultimul etaj al turnului.Etajul 11.")
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
d.check_eliminated()
d.spawn_mob(9012, 619, 170);
d.setqf("can_refine", 1)
d.notice("[Informatie]Ai ucis moartea albastra.In 30 de secunde vei fii")
d.notice("[Informatie]teleportat afara.Grabeste-te si strange drop-ul.")
notice_all("Felicitari, "..pc.get_name().." a ucis moartea albastra!")
timer("exitfinalus", 30)
end
when exitfinalus.timer begin
d.exit_all()
end

end

end
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Noxus scrie:Acesta este questul.

Cod: Selectaţi tot

--------------------------------
-- Copyright @ DT 2013
--------------------------------
quest deviltower_zone begin
state start begin

when login begin

if pc.get_map_index() == 66 then

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() >= 66 and pc.get_map_index() < 67 then

pc.set_warp_location(65, 5376+532, 512+596+4)

end

end

------------------------------------------------------
-- Paznicul demonilor : Intrare în turnul demonilor --
------------------------------------------------------
when deviltower_man.chat.locale.deviltower_man_chat with pc.get_map_index() == 65 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

pc.warp(216500,727000)

elseif s == 2 then

return

end

end

end
------------------------------------------------------
-- Paznicul demonilor : Ieºire din turnul demonilor --
------------------------------------------------------
when deviltower_man.chat."Ieºire din turn" with pc.get_map_index() == 66 begin

say_title("Gardianul turnului:")
say("Esti de acord sa parasesti Turnul Demonilor?")
local b =select("Da!","Mai stau..")
if b == 1 then
say_title("Gardianul turnului:")
say("O decizie foarte buna. Este prea periculos")
say("pentru tine sa mai ramai acolo. Ai grija.")

wait()

pc.warp(590500, 110500)

end

end

------------------------------------
-- Turnul Demonilor : Fix iteme --
------------------------------------
when login or logout with pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end


when login or logout with pc.in_dungeon() and pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when logout with pc.get_map_index() == 66 begin

pc.warp(590500, 110500)

end
------------------------------------
-- Turnul Demonilor : Parter --
------------------------------------
when devil_stone1.kill begin

timer("devil_stone1_1", 6)

end
-------------------------------
-- Turnul Demonilor : Etaj 2 --
-------------------------------

when devil_stone1_1.timer begin

pc.remove_item(30302, pc.count_item(30302))
pc.remove_item(30300, pc.count_item(30300))
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
----------------------------------------------
-- Turnul Demonilor : Etaj 3 : Regele Demon --
----------------------------------------------
when devil_stone3.kill begin

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()

end
------------------------------------------------
-- Turnul Demonilor : Etaj 4 : Pietrele Metin --
------------------------------------------------
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[i];
positions[i] = positions[j];
positions[j] = t;

end

end

return positions

end
when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

d.setf("level", 4)

d.notice("Te afli la poarta sigilata de la etajul 4.")
d.notice("Multe pietre false te asteapta pentru a te")
d.notice("induce in eroare si numai una dintre ele")
d.notice("este Piatra Metin cu adevarat importanta.")
d.notice("Trebuie sa o distrugi in 15 minute sau nu")
d.notice("vei putea trece prin poarta.")

local positions = deviltower_zone.get_4floor_stone_pos()

for i = 1, 6 do

chat(positions[i][1], positions[i][2])
d.set_unique("fake" .. i , d.spawn_mob(8017, positions[i][1], positions[i][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())
end
when devil_stone4_fail1.server_timer begin

if d.select(get_server_timer_arg()) then

d.notice("Minute ramase: 10")
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("Minute ramase: 5")
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("Pietrele metin false dispar ...")

end

end

end

else

server_timer("devil_stone4_end", 5, get_server_timer_arg())

d.notice("Ai dovedit un auz excelent si un instinct bun, si")
d.notice("ai distrus adevarata piatra metin.")
d.notice("Vei ajunge de indata la etajul 5.")

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
-------------------------------------------------
-- Turnul Demonilor : Etaj 5 : Sigiliile vechi --
-------------------------------------------------
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("Acum esti la poarta sigilata de la etajul 5.")
d.notice("Trebuie sa deschizi cele cinci Sigilii Antice")
d.notice("pentru a trece la etajul urmator. Drumul este")
d.notice("plin de creaturi care te vor ataca.")
d.notice("Unele dintre ele au niste chei. Strange destule")
d.notice("Pietre Chei, sa deschizi toate cele cinci Sigilii")
d.notice("Antice si sa treci la etajul 6.")
d.notice("Dar ai grija: Ai timp numai 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())
d.set_regen_file("data/dungeon/deviltower5_regen.txt")
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("Minute ramase: 15")
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("Minute ramase: 10")
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("Minute ramase: 5")
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 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin

local KILL_COUNT_FOR_DROP_KEY = 50
local n =d.getf("count") + 1

d.setf("count", n) 

if n == KILL_COUNT_FOR_DROP_KEY then

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("Ai rupt sigiliul Cheii de Piatra si poti sa")
d.notice("intri in etajul 5. Regele Demon Mandru este de")
d.notice("asemenea la acest etaj. Distruge toate creaturile")
d.notice("intalnite acolo.")
d.notice("Ucide toti monstrii de la etajul 6!") 

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("Ai deschis pecetea! Mai raman "..d.getf("stone_count")..".")

end

end

-----------------------------------------------------
-- Turnul Demonilor : Etaj 6 : Regele Demon Mandru --
-----------------------------------------------------
when devil_stone6.kill begin

d.kill_all()
d.kill_all()
d.kill_all()
d.kill_all()

d.check_eliminated()

d.notice("Ai omorat toate creaturile. Acum mergi la Fierar")
d.notice("si alege recompensa - iti va imbunatati un obiect")
d.notice("la alegerea ta. pentru a face asta, pune")
d.notice("obiectul care vrei sa il imbunatatesti pe fierar.")

local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)

end
-------------------------------------------
-- Turnul Demonilor : Etajele superioare --
-------------------------------------------
when 20074.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20074).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20074).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say_title(""..mob_name(20074)..":")
say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
when 20075.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20075).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20075).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")
npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end

when 20076.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()
say_title(""..mob_name(20076).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20076).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
-------------------------------------------
-- Turnul Demonilor : Etaj 7 : Planurile --
-------------------------------------------
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)

d.notice("Harta Turnului Zin-Sa-Gui deschide calea catre")
d.notice("urmatorul etaj. Le poti gasi distrugand Pietrele")
d.notice("Metin.")

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() >= 66 and pc.get_map_index() < 670000 begin
-- Cutie de fier necunoscuta
game.drop_item(30300, 1)

end
when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

pc.remove_item("30300", 1)
local pct = number(1,10)
if pct == 1 then
-- Harta Zin-Sa-Gui (Adevarat)
game.drop_item(30302, 1)
d.clear_regen()

else
-- Harta Sa-Gui (Fals)
game.drop_item(30301, 1)

end

end
when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

say_title("Informatie:")
say("Aceasta hart te teleporteaza la etajul 7 al")
say("Turnului Demonilor")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()

end
----------------------------------------
-- Turnul Demonilor : Etaj 8 : Cheile --
----------------------------------------
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)
pc.remove_item(30302,_count)

d.notice("Gaseste cheia potrivita.")
d.notice("Ai nevoie de cheia Zin-Bong-In pentru a")
d.notice("deschide Pecetea Sa-Soein si a ajunge la")
d.notice("etajul urmator.")

end
when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 66 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
-- Cheie Zin-Bong (Adevarat)
game.drop_item(30304, 1)

else

-- Cheie Bong-In (Fals)
game.drop_item(30303, 1)

end

else
return

end

end
when 20366.take with item.vnum == 30304 begin

npc.purge()
item.remove()
timer("devil_jump_9", 6)

d.notice("Ucide conducatorul demonilor.")

end
--------------------------------------------------
-- Turnul Demonilor : Etaj 9 : Îngerul cu coasa --
--------------------------------------------------
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() >= 66 and pc.get_map_index() < 670000 begin

d.kill_all()
d.kill_all()
d.kill_all()

d.notice("Ai indeplinit sarcina cu succes si vei")
d.notice("fi teleportat la urmatorul nivel.")
timer("devil_end_jump", 60)

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("[Informatie]L-ai ucis pe comandantul general albastru.")
d.notice("[Informatie]Acum vei trece la ultimul etaj al turnului.Etajul 11.")
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
d.check_eliminated()
d.spawn_mob(9012, 619, 170);
d.setqf("can_refine", 1)
d.notice("[Informatie]Ai ucis moartea albastra.In 30 de secunde vei fii")
d.notice("[Informatie]teleportat afara.Grabeste-te si strange drop-ul.")
notice_all("Felicitari, "..pc.get_name().." a ucis moartea albastra!")
timer("exitfinalus", 30)
end
when exitfinalus.timer begin
d.exit_all()
end

end

end
Poftim:
--------------------------------
-- Copyright @ DT 2013
--------------------------------
quest deviltower_zone begin
state start begin

when login begin

if pc.get_map_index() == 66 then

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() >= 66 and pc.get_map_index() < 67 then

pc.set_warp_location(65, 5376+532, 512+596+4)

end

end

------------------------------------------------------
-- Paznicul demonilor : Intrare în turnul demonilor --
------------------------------------------------------
when deviltower_man.chat.locale.deviltower_man_chat with pc.get_map_index() == 65 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

pc.warp(216500,727000)

elseif s == 2 then

return

end

end

end
------------------------------------------------------
-- Paznicul demonilor : Ieºire din turnul demonilor --
------------------------------------------------------
when deviltower_man.chat."Ieºire din turn" with pc.get_map_index() == 66 begin

say_title("Gardianul turnului:")
say("Esti de acord sa parasesti Turnul Demonilor?")
local b =select("Da!","Mai stau..")
if b == 1 then
say_title("Gardianul turnului:")
say("O decizie foarte buna. Este prea periculos")
say("pentru tine sa mai ramai acolo. Ai grija.")

wait()

pc.warp(590500, 110500)

end

end

------------------------------------
-- Turnul Demonilor : Fix iteme --
------------------------------------
when login or logout with pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end


when login or logout with pc.in_dungeon() and pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when logout with pc.get_map_index() == 66 begin

pc.warp(590500, 110500)

end
------------------------------------
-- Turnul Demonilor : Parter --
------------------------------------
when devil_stone1.kill begin

timer("devil_stone1_1", 6)

end
-------------------------------
-- Turnul Demonilor : Etaj 2 --
-------------------------------

when devil_stone1_1.timer begin

pc.remove_item(30302, pc.count_item(30302))
pc.remove_item(30300, pc.count_item(30300))
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
----------------------------------------------
-- Turnul Demonilor : Etaj 3 : Regele Demon --
----------------------------------------------
when devil_stone3.kill begin

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()

end
------------------------------------------------
-- Turnul Demonilor : Etaj 4 : Pietrele Metin --
------------------------------------------------
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;
positions = positions[j];
positions[j] = t;

end

end

return positions

end
when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

d.setf("level", 4)

d.notice("Te afli la poarta sigilata de la etajul 4.")
d.notice("Multe pietre false te asteapta pentru a te")
d.notice("induce in eroare si numai una dintre ele")
d.notice("este Piatra Metin cu adevarat importanta.")
d.notice("Trebuie sa o distrugi in 15 minute sau nu")
d.notice("vei putea trece prin poarta.")

local positions = deviltower_zone.get_4floor_stone_pos()

for i = 1, 6 do

chat(positions[1], positions[2])
d.set_unique("fake" .. i , d.spawn_mob(8017, positions[1], positions[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())
end
when devil_stone4_fail1.server_timer begin

if d.select(get_server_timer_arg()) then

d.notice("Minute ramase: 10")
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("Minute ramase: 5")
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("Pietrele metin false dispar ...")

end

end

end

else

server_timer("devil_stone4_end", 5, get_server_timer_arg())

d.notice("Ai dovedit un auz excelent si un instinct bun, si")
d.notice("ai distrus adevarata piatra metin.")
d.notice("Vei ajunge de indata la etajul 5.")

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
-------------------------------------------------
-- Turnul Demonilor : Etaj 5 : Sigiliile vechi --
-------------------------------------------------
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("Acum esti la poarta sigilata de la etajul 5.")
d.notice("Trebuie sa deschizi cele cinci Sigilii Antice")
d.notice("pentru a trece la etajul urmator. Drumul este")
d.notice("plin de creaturi care te vor ataca.")
d.notice("Unele dintre ele au niste chei. Strange destule")
d.notice("Pietre Chei, sa deschizi toate cele cinci Sigilii")
d.notice("Antice si sa treci la etajul 6.")
d.notice("Dar ai grija: Ai timp numai 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())
d.set_regen_file("data/dungeon/deviltower5_regen.txt")
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("Minute ramase: 15")
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("Minute ramase: 10")
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("Minute ramase: 5")
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 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin

local KILL_COUNT_FOR_DROP_KEY = 50
local n =d.getf("count") + 1

d.setf("count", n) 

if n == KILL_COUNT_FOR_DROP_KEY then

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("Ai rupt sigiliul Cheii de Piatra si poti sa")
d.notice("intri in etajul 5. Regele Demon Mandru este de")
d.notice("asemenea la acest etaj. Distruge toate creaturile")
d.notice("intalnite acolo.")
d.notice("Ucide toti monstrii de la etajul 6!") 

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("Ai deschis pecetea! Mai raman "..d.getf("stone_count")..".")

end

end

-----------------------------------------------------
-- Turnul Demonilor : Etaj 6 : Regele Demon Mandru --
-----------------------------------------------------
when devil_stone6.kill begin

d.kill_all()
d.kill_all()
d.kill_all()
d.kill_all()

d.check_eliminated()

d.notice("Ai omorat toate creaturile. Acum mergi la Fierar")
d.notice("si alege recompensa - iti va imbunatati un obiect")
d.notice("la alegerea ta. pentru a face asta, pune")
d.notice("obiectul care vrei sa il imbunatatesti pe fierar.")

local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)

end
-------------------------------------------
-- Turnul Demonilor : Etajele superioare --
-------------------------------------------
when 20074.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20074).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20074).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say_title(""..mob_name(20074)..":")
say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
when 20075.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20075).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20075).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")
npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end

when 20076.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()
say_title(""..mob_name(20076).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20076).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
-------------------------------------------
-- Turnul Demonilor : Etaj 7 : Planurile --
-------------------------------------------
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)

d.notice("Harta Turnului Zin-Sa-Gui deschide calea catre")
d.notice("urmatorul etaj. Le poti gasi distrugand Pietrele")
d.notice("Metin.")

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() >= 66 and pc.get_map_index() < 670000 begin
-- Cutie de fier necunoscuta
game.drop_item(30300, 1)

end
when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin
pc.remove_item("30300", 1)
local pct = number(1,10)
if pct == 1 then
-- Harta Zin-Sa-Gui (Adevarat)
game.drop_item(30302, 1)
d.clear_regen()
else
-- Harta Sa-Gui (Fals)
game.drop_item(30301, 1)
end
end
when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin
say_title("Informatie:")
say("Aceasta hart te teleporteaza la etajul 7 al")
say("Turnului Demonilor")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()
end
----------------------------------------
-- Turnul Demonilor : Etaj 8 : Cheile --
----------------------------------------
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)
pc.remove_item(30302,_count)
d.notice("Gaseste cheia potrivita.")
d.notice("Ai nevoie de cheia Zin-Bong-In pentru a")
d.notice("deschide Pecetea Sa-Soein si a ajunge la")
d.notice("etajul urmator.")
end
when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 66 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
-- Cheie Zin-Bong (Adevarat)
game.drop_item(30304, 1)
else
-- Cheie Bong-In (Fals)
game.drop_item(30303, 1)
end
end
end
when 20366.take with item.vnum == 30304 begin
npc.purge()
item.remove()
timer("devil_jump_9", 6)
d.notice("Ucide conducatorul demonilor.")
end
--------------------------------------------------
-- Turnul Demonilor : Etaj 9 : Îngerul cu coasa --
--------------------------------------------------
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() >= 66 and pc.get_map_index() < 670000 begin
d.kill_all()
d.kill_all()
d.kill_all()
d.notice("Ai indeplinit sarcina cu succes si vei")
d.notice("fi teleportat la urmatorul nivel.")
timer("devil_end_jump", 60)
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("[Informatie]L-ai ucis pe comandantul general albastru.")
d.notice("[Informatie]Acum vei trece la ultimul etaj al turnului.Etajul 11.")
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
d.check_eliminated()
d.spawn_mob(9012, 619, 170);
d.setqf("can_refine", 1)
d.notice("[Informatie]Ai ucis moartea albastra.In 30 de secunde vei fii")
d.notice("[Informatie]teleportat afara.Grabeste-te si strange drop-ul.")
notice_all("Felicitari, "..pc.get_name().." a ucis moartea albastra!")
timer("exitfinalus", 30)
end
when exitfinalus.timer begin
d.exit_all()
end

end

end

Cod: Selectaţi tot

--------------------------------
-- Copyright @ DT 2013
--------------------------------
quest deviltower_zone begin
state start begin

when login begin

if pc.get_map_index() == 66 then

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() >= 66 and pc.get_map_index() < 67 then

pc.set_warp_location(65, 5376+532, 512+596+4)

end

end

------------------------------------------------------
-- Paznicul demonilor : Intrare în turnul demonilor --
------------------------------------------------------
when deviltower_man.chat.locale.deviltower_man_chat with pc.get_map_index() == 65 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

pc.warp(216500,727000)

elseif s == 2 then

return

end

end

end
------------------------------------------------------
-- Paznicul demonilor : Ieºire din turnul demonilor --
------------------------------------------------------
when deviltower_man.chat."Ieºire din turn" with pc.get_map_index() == 66 begin

say_title("Gardianul turnului:")
say("Esti de acord sa parasesti Turnul Demonilor?")
local b =select("Da!","Mai stau..")
if b == 1 then
say_title("Gardianul turnului:")
say("O decizie foarte buna. Este prea periculos")
say("pentru tine sa mai ramai acolo. Ai grija.")

wait()

pc.warp(590500, 110500)

end

end

------------------------------------
-- Turnul Demonilor : Fix iteme --
------------------------------------
when login or logout with pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end


when login or logout with pc.in_dungeon() and pc.get_map_index() == 66 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when login or logout with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 67 begin

pc.remove_item(30302, pc.count_item(30302)) -- Harta pentru pestera Zin

pc.remove_item(22010, pc.count_item(22010)) -- Pergamentul Orasului
pc.remove_item(30300, pc.count_item(30300)) -- Lada veche necunoscuta

pc.remove_item(50084, pc.count_item(50084)) -- Piatra Cheie

pc.remove_item(30304, pc.count_item(30304)) -- Cheie Zin-Bong-In


end

when logout with pc.get_map_index() == 66 begin

pc.warp(590500, 110500)

end
------------------------------------
-- Turnul Demonilor : Parter --
------------------------------------
when devil_stone1.kill begin

timer("devil_stone1_1", 6)

end
-------------------------------
-- Turnul Demonilor : Etaj 2 --
-------------------------------

when devil_stone1_1.timer begin

pc.remove_item(30302, pc.count_item(30302))
pc.remove_item(30300, pc.count_item(30300))
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
----------------------------------------------
-- Turnul Demonilor : Etaj 3 : Regele Demon --
----------------------------------------------
when devil_stone3.kill begin

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()

end
------------------------------------------------
-- Turnul Demonilor : Etaj 4 : Pietrele Metin --
------------------------------------------------
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[i];
positions[i] = positions[j];
positions[j] = t;

end

end

return positions

end
when 8016.kill with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

d.setf("level", 4)

d.notice("Te afli la poarta sigilata de la etajul 4.")
d.notice("Multe pietre false te asteapta pentru a te")
d.notice("induce in eroare si numai una dintre ele")
d.notice("este Piatra Metin cu adevarat importanta.")
d.notice("Trebuie sa o distrugi in 15 minute sau nu")
d.notice("vei putea trece prin poarta.")

local positions = deviltower_zone.get_4floor_stone_pos()

for i = 1, 6 do

chat(positions[i][1], positions[i][2])
d.set_unique("fake" .. i , d.spawn_mob(8017, positions[i][1], positions[i][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())
end
when devil_stone4_fail1.server_timer begin

if d.select(get_server_timer_arg()) then

d.notice("Minute ramase: 10")
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("Minute ramase: 5")
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("Pietrele metin false dispar ...")

end

end

end

else

server_timer("devil_stone4_end", 5, get_server_timer_arg())

d.notice("Ai dovedit un auz excelent si un instinct bun, si")
d.notice("ai distrus adevarata piatra metin.")
d.notice("Vei ajunge de indata la etajul 5.")

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
-------------------------------------------------
-- Turnul Demonilor : Etaj 5 : Sigiliile vechi --
-------------------------------------------------
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("Acum esti la poarta sigilata de la etajul 5.")
d.notice("Trebuie sa deschizi cele cinci Sigilii Antice")
d.notice("pentru a trece la etajul urmator. Drumul este")
d.notice("plin de creaturi care te vor ataca.")
d.notice("Unele dintre ele au niste chei. Strange destule")
d.notice("Pietre Chei, sa deschizi toate cele cinci Sigilii")
d.notice("Antice si sa treci la etajul 6.")
d.notice("Dar ai grija: Ai timp numai 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())
d.set_regen_file("data/dungeon/deviltower5_regen.txt")
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("Minute ramase: 15")
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("Minute ramase: 10")
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("Minute ramase: 5")
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 1062.kill with pc.in_dungeon() and d.getf("level") == 5 begin

local KILL_COUNT_FOR_DROP_KEY = 50
local n =d.getf("count") + 1

d.setf("count", n) 

if n == KILL_COUNT_FOR_DROP_KEY then

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("Ai rupt sigiliul Cheii de Piatra si poti sa")
d.notice("intri in etajul 5. Regele Demon Mandru este de")
d.notice("asemenea la acest etaj. Distruge toate creaturile")
d.notice("intalnite acolo.")
d.notice("Ucide toti monstrii de la etajul 6!") 

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("Ai deschis pecetea! Mai raman "..d.getf("stone_count")..".")

end

end

-----------------------------------------------------
-- Turnul Demonilor : Etaj 6 : Regele Demon Mandru --
-----------------------------------------------------
when devil_stone6.kill begin

d.kill_all()
d.kill_all()
d.kill_all()
d.kill_all()

d.check_eliminated()

d.notice("Ai omorat toate creaturile. Acum mergi la Fierar")
d.notice("si alege recompensa - iti va imbunatati un obiect")
d.notice("la alegerea ta. pentru a face asta, pune")
d.notice("obiectul care vrei sa il imbunatatesti pe fierar.")

local reward_alchemist = {20074, 20075, 20076}
d.spawn_mob(reward_alchemist[number(1,3)], 425, 216);
d.setqf("can_refine", 1)

end
-------------------------------------------
-- Turnul Demonilor : Etajele superioare --
-------------------------------------------
when 20074.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20074).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20074).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say_title(""..mob_name(20074)..":")
say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
when 20075.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()

say_title(""..mob_name(20075).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20075).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")
npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end

when 20076.chat."Etajele superioare .." with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin

npc.lock()
say_title(""..mob_name(20076).."")
say("Vrei sa mergi la etajul 7 al turnului?")
say("E nevoie de multe competente si multa")
say("dibacie pentru a invinge acest etaj.")
say("Doar daca ai atins nivelul 75 te pot")
say("teleporta acolo!")

wait()

if pc.level >=75 then

say_title(""..mob_name(20076).."")
say("Ai experienta necesara deci ai o sansa buna")
say("sa supravietuiesti etajelor superioare.")
say("Poti intra acum!")

npc.purge()
timer("devil_jump_7", 6)

return

end

say("Ai nevoie de nivelul 75 pentru a urca!")
say("Revino cand esti mai puternic, aici cei slabi pier in fata demonilor..")
say("Acum te voi teleporta in fata turnului, doar pentru siguranta ta.")
say("")

wait()

pc.warp(590500, 110500)

return

end
-------------------------------------------
-- Turnul Demonilor : Etaj 7 : Planurile --
-------------------------------------------
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)

d.notice("Harta Turnului Zin-Sa-Gui deschide calea catre")
d.notice("urmatorul etaj. Le poti gasi distrugand Pietrele")
d.notice("Metin.")

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() >= 66 and pc.get_map_index() < 670000 begin
-- Cutie de fier necunoscuta
game.drop_item(30300, 1)

end
when 30300.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin
pc.remove_item("30300", 1)
local pct = number(1,10)
if pct == 1 then
-- Harta Zin-Sa-Gui (Adevarat)
game.drop_item(30302, 1)
d.clear_regen()
else
-- Harta Sa-Gui (Fals)
game.drop_item(30301, 1)
end
end
when 30302.use with pc.in_dungeon() and pc.get_map_index() >= 66 and pc.get_map_index() < 670000 begin
say_title("Informatie:")
say("Aceasta hart te teleporteaza la etajul 7 al")
say("Turnului Demonilor")
pc.remove_item("30302", 1)
timer("devil_jump_8", 6)
d.clear_regen()
end
----------------------------------------
-- Turnul Demonilor : Etaj 8 : Cheile --
----------------------------------------
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)
pc.remove_item(30302,_count)
d.notice("Gaseste cheia potrivita.")
d.notice("Ai nevoie de cheia Zin-Bong-In pentru a")
d.notice("deschide Pecetea Sa-Soein si a ajunge la")
d.notice("etajul urmator.")
end
when 1040.kill with pc.in_dungeon() and pc.get_map_index() >= 66 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
-- Cheie Zin-Bong (Adevarat)
game.drop_item(30304, 1)
else
-- Cheie Bong-In (Fals)
game.drop_item(30303, 1)
end
end
end
when 20366.take with item.vnum == 30304 begin
npc.purge()
item.remove()
timer("devil_jump_9", 6)
d.notice("Ucide conducatorul demonilor.")
end
--------------------------------------------------
-- Turnul Demonilor : Etaj 9 : Îngerul cu coasa --
--------------------------------------------------
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() >= 66 and pc.get_map_index() < 670000 begin
d.kill_all()
d.kill_all()
d.kill_all()
d.notice("Ai indeplinit sarcina cu succes si vei")
d.notice("fi teleportat la urmatorul nivel.")
timer("devil_end_jump", 60)
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("[Informatie]L-ai ucis pe comandantul general albastru.")
d.notice("[Informatie]Acum vei trece la ultimul etaj al turnului.Etajul 11.")
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
d.check_eliminated()
d.spawn_mob(9012, 619, 170);
d.setqf("can_refine", 1)
d.notice("[Informatie]Ai ucis moartea albastra.In 30 de secunde vei fii")
d.notice("[Informatie]teleportat afara.Grabeste-te si strange drop-ul.")
notice_all("Felicitari, "..pc.get_name().." a ucis moartea albastra!")
timer("exitfinalus", 30)
end
when exitfinalus.timer begin
d.exit_all()
end

end

end
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
Noxus
Nou Venit

Nou Venit
Mesaje: 35
Membru din: 13 Ian 2017, 16:07
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Nu mai este acea eroare, insa tot nu ma teleporteaza etaj 2 :/ . Am incercat aproape toate quest-urile pentru dt de aici..
Avatar utilizator
Noxus
Nou Venit

Nou Venit
Mesaje: 35
Membru din: 13 Ian 2017, 16:07
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 0
Medalii

Deja raman fara idei.. Am dezinstalat sd3, camera de cristal, catacomba, crezand ca se timerele sunt identice ca cele de la dt. Am schimbat questul, de mai multe ori. Si nimic, tot nu ma teleporteaza etaj 2 :/
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

Noxus scrie:Deja raman fara idei.. Am dezinstalat sd3, camera de cristal, catacomba, crezand ca se timerele sunt identice ca cele de la dt. Am schimbat questul, de mai multe ori. Si nimic, tot nu ma teleporteaza etaj 2 :/
Verifica in fisierele .txt ale dt (ex:"data/dungeon/deviltower3_regen.txt"), coordonatele alocate acestei locatii:

Cod: Selectaţi tot

d.new_jump_all(66, special.devil_tower[1][1], special.devil_tower[1][2])
Pentru acest mesaj, [RaffaeL] for the post:
Noxus
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Închis

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 22 vizitatori