Am si eu o problema la questul cu intrarea la dragon.
Daca cineva bate dragonul si iese din camera dupa imediat poate intra iar.
Uni dupa ce bat dragonul se teleporteaza cu inelul in map1 si asa se bugheaza dragonul si nu mai lasa pe nimeni sa intre.
Cum pot sa modific ceva la quest sa intre 1 data la 30 de minute?
Cod: Selectaţi tot
quest dragon_temple begin
state start begin
when dragon_temple_ghost.chat."GM: Deblocheazã " with pc.is_gm() begin
say_gm_title(mob_name(30121))
say_gm("")
say_gm("Camera de cristal a fost deblocatã!")
say_gm("")
game.set_event_flag("enter", 0)
game.set_event_flag("block",0)
end
when dragon_temple_ghost.chat."Vreau sã omor dragonul" begin
if game.get_event_flag("block") == 1 then
say_title(mob_name(30121))
say("")
say("Îmi pare rãu, dar camera este ocupatã momentan.")
say("Trebuie sã aºtepþi pânã se elibereazã.")
say("")
return
end
if game.get_event_flag("enter") >= 1 then
say_title(mob_name(30121))
say("")
say("Îmi pare rãu, dar deja este cineva înãuntru.")
say("Dacã ai parola te pot lãsa sã intri.")
say("")
say("Te rog introdu parola ...")
say("")
local password = input()
if game.get_event_flag("parola") == tonumber(password) then
say_title(mob_name(30121))
say("")
say("Ai introdus parola corectã. Pentru a")
say("te lãsa sã intri ai nevoie de 3 Pietre ude.")
say("")
local s = select("Te rog lasã-mã sã intru!", "Ieºire")
if s == 1 then
if pc.count_item(27991) >= 3 then
pc.remove_item(27991,3)
game.set_event_flag("enter", 1)
pc.warp(844000, 1066900,207)
pc.setqf("payment", 1)
pc.setqf("leader", 0)
else
say_title(mob_name(30121))
say("")
say("Îmi pare rãu, dar nu te pot lãsa sã intri.")
say("Nu ai destule Pietre ude.")
say("")
end
else
return
end
else
say_title(mob_name(30121))
say("")
say("Parola pe care ai introdus-o nu este")
say("corectã.")
say("")
return
end
end
if game.get_event_flag("enter") == 0 then
say_title(mob_name(30121))
say("")
say("Deci, vrei sã lupþi împotriva dragonului?")
say("Te rog dã-mi o parolã pentru a intra în")
say("bârlogul dragonului (doar numere) ca sã o pot")
say("proteja. Poþi spune parola prietenilor tãi")
say("pentru a te ajuta sã învingi dragonul.")
say("Spune-mi parola acum...")
say("")
local password = tonumber(input(""))
game.set_event_flag("parola",password)
say_title(mob_name(30121))
say("")
say("Bun, acum cã ai introdus parola, mai")
say("am nevoie de 3 Pietre ude pentru a")
say("te lãsa sã intri.")
say("")
local s = select("Te rog lasã-mã sã intru!", "Ieºire")
if s == 1 then
if pc.count_item(27991) >= 3 then
game.set_event_flag("enter", 1)
pc.remove_item(27991,3)
pc.warp(844000, 1066900,207)
pc.setqf("payment", 1)
pc.setqf("leader", 1)
else
say_title(mob_name(30121))
say("")
say("Îmi pare rãu, dar nu te pot lãsa sã intri.")
say("Ai nevoie de 3 Pietre ude.")
say("")
return
end
elseif s==2 then
return
end
end
end
when login with pc.get_map_index() == 207 begin
if pc.getqf("payment") == 0 then
warp_to_village()
end
end
when dragon_temple_stone_1.kill or dragon_temple_stone_2.kill or dragon_temple_stone_3.kill with pc.get_map_index() == 207 begin
kill_all_in_map(207)
game.set_event_flag("enter",0)
game.set_event_flag("block",1)
notice_in_map("Imediat veþi fi teleportaþi în templul dragonului.")
timer("dragon_temple_start",5)
end
when dragon_temple_start.timer begin
d.new_jump_all ( 207, 8440, 10669 )
end
when login with pc.in_dungeon() and pc.get_map_index() >= 2070000 and pc.get_map_index() < 2080000 begin
pc.set_warp_location(73,1825,12207)
if pc.getqf("leader") == 1 then
timer("dragon_temple_time", 3600)
notice_in_map("Aveþi la dispoziþie 60 minute pentru al învinge pe Beran-Setaou.")
notice_in_map("Atenþie, dacã liderul vostru se deconecteazã, automat veþi fi scoºi afarã cu toþii." )
d.regen_file("data/dungeon/dragon_temple/dragon_temple.txt")
end
end
when logout or disconnect with pc.in_dungeon() and pc.get_map_index() >= 2070000 and pc.get_map_index() < 2080000 begin
if pc.getqf("leader") == 1 then
notice_in_map("Liderul a pãrãsit harta. Imediat veþi fi deconectaþi cu toþii.")
d.exit_all()
game.set_event_flag("enter",0)
game.set_event_flag("block",0)
pc.setqf("leader",0)
pc.setqf("payment",0)
end
end
when dragon_temple_time.timer begin
notice_in_map("Timpul a expirat!")
timer("dragon_temple_exit",2)
end
when dragon_temple_dragon.kill with pc.in_dungeon() and pc.get_map_index() >= 2070000 and pc.get_map_index() < 2080000 begin
d.kill_all()
d.clear_regen()
if party.is_party() then
notice_all(pc.get_name().." ºi grupa sa au reuºit sã-l învingã pe Beran-Setaou!")
timer("dragon_temple_exit",60)
else
notice_all(pc.get_name().." a reuºit sã-l învingã pe Beran-Setaou!")
timer("dragon_temple_exit",60)
end
end
when dragon_temple_exit.timer begin
d.purge()
d.clear_regen()
game.set_event_flag("enter", 0)
game.set_event_flag("block" ,0)
pc.setqf("leader", 0)
pc.setqf("payment", 0)
d.exit_all()
end
end -- end_of_state
end -- end_of_quest
