----- Quest: Vizuina Regelui Păianjen -----
----- Server: Rise of the Unknown -----
----- Author: Nica Virgil -----
----------------------------------------------------
quest sd3_complet begin
state start begin
when 20371.chat."Vizuina Regelui Păianjen" begin
if get_time() > game.get_event_flag("sd3_time") then
game.set_event_flag("sd3_utilizat",0)
end
if pc.is_gm() or pc.count_item(80041) >= 1 then
say ( "Bine ai venit "..pc.get_name().."" )
say ( "Poti intra fără ingrediente, deoarece esti menbru din STAFF." )
say ( "" )
wait()
pc.warp( 87900, 614300 )
return
end
if game.get_event_flag("sd3_utilizat") == 0 and pc.count_item(30324) < 3 then
say_title(""..mob_name(20371).."")
say_reward("Pentru a intra în vizuina Regelui Păianjen,")
say_reward("ai nevoie de 3 "..item_name(30324).."")
say_item_vnum(30324)
say_reward("Această Cheie a Arahnidelor este dropabilă, la")
say_reward("sfarsitul V1,din Regina Păianjenilor..")
return
end
if game.get_event_flag("sd3_utilizat") == 1 then
say_title(""..mob_name(20371).."")
pc.setqf("sd3_password", 078954687921)
if pc.getqf("sd3_loa") == 1 then
pc.setqf("sd3_loa",0)
say("")
say("Ai x3 "..item_name(30324).."")
say("Vei fi teleportat imediat la destinatie.")
pc.setqf("activat",1)
wait()
pc.warp(87900, 614300)
return
end
say("")
say("Introduceti codul ales de către liderul de grup.")
local passwort = tonumber(input(""))
--pc.setqf("sd3_password", passwort)
if game.get_event_flag("sd3_pass") == passwort then
say_title(""..mob_name(20371).."")
say("")
say("Ai introdus codul corect.")
if pc.count_item() < 0 then
say("Nu te pot teleporta deoarece nu ai")
say(""..item_name(30324).."")
say_item_vnum(30324)
say("")
say("Ai nevoie de x3 "..item_name(30324).."")
return
end
say("Vei fi teleportat imediat la destinatie.")
pc.setqf("activat",1)
wait()
pc.warp(87900, 614300)
elseif passi != pc.getqf("sd3_password") then
say_title(""..mob_name(20371).."")
say("")
say("Ai introdus un cod gresit, contactează membrii grupului!")
return
end
end
if game.get_event_flag("sd3_utilizat") == 0 and pc.count_item(30324) >= 3 then
say_title(""..mob_name(20371).."")
say("")
say("Am în mine la ultima suflare a dragonului lui Dumnezeu.")
say("Aceasta magie te poate trimite direct în")
say_reward("Vizuina Regelui Păianjen.")
say("")
say_reward("Această Cheie a Arahnidelor este dropabilă, la")
say_reward("sfarsitul V1,din Regina Păianjenilor..")
say("")
local i = select("Da, vreau", "Nu, multumesc")
if 1 == i then
say_title(""..mob_name(20371).."")
say("")
say("Acest run necesite un cod pentru tine si grupul tău.")
say("Introdu un cod, din minim 3 caractere")
local passwort = tonumber(input(""))
if passwort and passwort <= 999999999 and pc.count_item(30324)>=3 then
game.set_event_flag("sd3_utilizat",1)
game.set_event_flag("sd3_pass",passwort)
local times = get_time() + 300 --Wartezeit
game.set_event_flag("sd3_time", times)
say_title(""..mob_name(20371).."")
pc.setqf("sd3_loa",1)
say("")
say("Parola aleasă este: "..passwort.."")
notice("[Vizuina Regelui Păianjen:] Parola vizuinei este: "..passwort.." ")
pc.remove_item("30324",3)
else
say_title(""..mob_name(20371).."")
say("")
say("Codul poate contine maxim 9 caractere!")
end
end
end
end
when 2093.kill with pc.get_map_index() == 191 begin
timer("sd3_vaduva_timer", 10)
notice_in_map("[Vizuina Regelui Păianjen:] Ati omorât Văduva Neagră.")
notice_in_map("[Vizuina Regelui Păianjen:] Veti fi teleportati in Vizuina Regelui Păianjen !")
d.kill_all()
end
when sd3_vaduva_timer.timer begin
game.set_event_flag("sd3_utilizat",0)
d.new_jump_all(191, 879, 6143)
d.setf("sd3_etajul_reginei", 1)
end
when 2094.kill with d.getf("sd3_etajul_reginei") == 2 begin
local n = d.getf("count") + 1
d.setf("count", n)
notice_in_map("[Vizuina Regelui Păianjen:] Ati omorât "..n.." Ouă de Păianjen.")
if n > 2 then
local t = number(1,4)
notice_in_map("[Vizuina Regelui Păianjen:] Regele Păianjen este mort de foame.")
notice_in_map("[Vizuina Regelui Păianjen:] A chemat mai multe Ouă de Păianjen.")
if 1 == t then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_1.txt")
elseif 2 == t then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_2.txt")
elseif 3 == t then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_3.txt")
else
d.regen_file("data/dungeon/camera_regelui/sd3_regen_4.txt")
end
end
end
when 2092.kill with d.getf("sd3_etajul_reginei") == 2 begin
d.setf("sd3_etajul_reginei", 3)
notice_all("Jucătorul "..pc.get_name().." si grupul lui au reusit să distrugă Regele Păianjen!")
chat("Veti fi teleportati în 30 de secunde în oras..")
timer("sd3_boss_end", 30)
d.kill_all()
d.clear_regen()
d.spawn_mob(9012, 374, 510)
end
when login with d.getf("sd3_etajul_reginei") == 2 begin
pc.set_warp_location(71 , 7040, 5235)
end
when login with d.getf("sd3_etajul_reginei") == 1 begin
timer("sd3_boss_end", 3600)
d.set_regen_file("data/dungeon/camera_regelui/sd3_regen.txt")
local t = number(1,4)
if 1 == t then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_1.txt")
elseif 2 == t then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_2.txt")
elseif 3 == t then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_3.txt")
else
d.regen_file("data/dungeon/camera_regelui/sd3_regen_4.txt")
end
local o = number(1,4)
if 1 == o then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_5.txt")
elseif 2 == o then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_6.txt")
elseif 3 == o then
d.regen_file("data/dungeon/camera_regelui/sd3_regen_7.txt")
else
d.regen_file("data/dungeon/camera_regelui/sd3_regen_8.txt")
end
d.setf("sd3_etajul_reginei", 2)
d.notice("[Vizuina Regelui Păianjen:] Aveti 60 de minute să distrugeti Regele Păianjen.")
d.setf("count", 0)
pc.set_warp_location(71 , 7040, 5235)
end
when login with d.getf("sd3_etajul_reginei") == 3 begin
--pc.warp(181700, 1220600)
end
when sd3_boss_end.timer begin
warp_all_to_village( pc.get_map_index() , 3 )
end
when sd3_boss_ends.timer begin
kill_all_in_map(191)
d.spawn_mob(9012, 374, 510)
game.set_event_flag("sd3_utilizat",0)
d.setf("sd3_etajul_reginei", 1)
end
when login with pc.get_map_index() == 191 begin
pc.getqf("activat",0)
end
end
end