Discussione [Problema]La quest si ferma dopo il primo if

Stato
Discussione chiusa ad ulteriori risposte.

adp95

Utente Silver
3 Ottobre 2009
96
21
12
92
Ultima modifica:
questa è la quest, appena riuscirò a sistemarla la posterò qui.
se potete aiutatemi si chiude quando devo scegliere se combattere il drago oppure no...
----------------------------------
-- Quest Tempio del Drago
-- Lvl 75
----------------------------------
quest tempio_del_drago begin
state start begin

when logout with pc.get_map_index() == 221 begin
pc.setqf("dentro", 1)
end

when login with pc.get_map_index() == 221 and pc.getqf("dentro") == 1 begin
pc.setqf("dentro", 0)
warp_to_village()
end

when 30121.chat."Il Drago" with pc.get_map_index() == 73 begin
pc.setqf("dentro", 0)
if game.get_event_flag("utilizzo_stanza") == 1 then
if game.get_event_flag("entrata_vietata") == 1 then
say_title(mob_name(30121))
say("")
say("La stanza e' chiusa, riprova piu' tardi!")
else
say_title(mob_name(30121))
say("")
say("Spiacente, la stanza e' riservata.")
say("Devi inserire la password")
say("che mi hanno dato.")
local password = input()
if game.get_event_flag("password_drago") == tonumber(password) then
say_title(""..mob_name(30121).."")
say("")
say("La password e' giusta.")
say("Ora devi darmi 3 di questi item.")
say_item_vnum(30179)
local s = select("Ok, tieni", "Annulla")
if s == 1 then
if pc.count_item(30179) >= 3 then
pc.remove_item(30179,3)
pc.warp(2610000, 2610000)
else
say("Hai solo "..pc.count_item(30179).." Chiavi a Spirale")
say("")
say_item_vnum(30179)
end
elseif s == 2 then
return
end

else
say_title(""..mob_name(30121).."")
say("")
say("Password sbagliata.")
return
end
end
elseif pc.has_guild() and game.get_event_flag("utilizzo_stanza") == 0 then
if pc.count_item(30179) >= 3 then
say_title(""..mob_name(30121).."")
say("")
say("Sei il primo che vuole entrare nel Tempio del")
say("Drago, una stanza che racchiude una bestia che")
say("ha sconfitto tutti i guerrieri che sono entrati!")
say("Prima di entrare devi darmi una password")
say("solo numerica e avrai 5 minuti per dirla")
say("ai tuoi compangi che devono aiutarti")
say("nello sconfiggere il Drago.")
say("")
say("Hai una ora per uccidere il Drago.")
say("Se entro questo tempo non ci riuscirete")
say("vi faro' uscire per la vostra sicurezza.")
local i = select("Sono pronto a Combattere!", "Annulla")
if i == 2 then
return
end
elseif i == 1 then
say_title(""..mob_name(30121).."")
say("Inserisci la password solo numerica.")
local password = tonumber(input(""))
if password > 0 and password <= 999999999 then
game.set_event_flag("password_drago",password)
game.set_event_flag("utilizzo_stanza",1)
timer("limit", 60*60)
timer("blockentry",5*60)
say_title(""..mob_name(30121).."")
say("")
say("La Password:")
syschat("Password Tempio del Drago: "..password.."")
say_reward(""..password.."")
say("Dici la Password ai tuoi compagni.")
pc.remove_item("30179",3)
pc.warp(2610000, 2610000)
mob.spawn(2493,150,150)
local spawn = number(1,4)
if spawn == q then
d.regen_file("data/dungeon/skipia_boss1.txt")
elseif spawn == 2 then
d.regen_file("data/dungeon/skipia_boss2.txt")
elseif spawn == 3 then
d.regen_file("data/dungeon/skipia_boss3.txt")
elseif spawn == 4 then
d.regen_file("data/dungeon/skipia_boss4.txt")
end
else
say_title(""..mob_name(30121).."")
say("")
say("Hai inserito una password non valida.")
say("Riprova ancora.")
end
else
say("Hai solo "..pc.count_item(30179).." Chiavi a Spirali")
say("")
say_item_vnum(30179)
say("")
return
end
elseif not pc.has_guild() then
say_title(""..mob_name(30121).."")
say("")
say("Hai bisono di una Gilda,")
say("per andare ad uccidere il drago.")
end
end

when 2493.kill with pc.get_map_index() >= 221 begin
timer("set_unused",30)
notice_all("La squadra di ".. pc.get_name " ha sconfitto il Drago Blu!" )
game.drop_item_with_ownership(50513, 5)
game.drop_item_with_ownership(50122, 1)
game.drop_item_with_ownership(50124, 1)
game.drop_item_with_ownership(27987, 1)
game.drop_item_with_ownership(27992, 1)
game.drop_item_with_ownership(27993, 1)
game.drop_item_with_ownership(27994, 1)
game.drop_item_with_ownership(30228, 1)
local b = number(1, 4)
if b == 1 then
game.drop_item_with_ownership(15374, 1)
end
if b == 2 then
game.drop_item_with_ownership(15394, 1)
end
if b == 3 then
game.drop_item_with_ownership(15414, 1)
end
if b == 4 then
game.drop_item_with_ownership(15434, 1)
end
local z = number(1, 4)
if b == 1 then
game.drop_item_with_ownership(12282, 1)
end
if b == 2 then
game.drop_item_with_ownership(12402, 1)
end
if b == 3 then
game.drop_item_with_ownership(12542, 1)
end
if b == 4 then
game.drop_item_with_ownership(12682, 1)
end
local a = number(1, 4)
if a == 1 then
game.drop_item_with_ownership(30190, 5)
end
if a == 2 then
game.drop_item_with_ownership(71123, 2)
end
if a == 3 then
game.drop_item_with_ownership(71129, 2)
end
if a == 4 then
game.drop_item_with_ownership(71084, 1)
end
end

when set_unused.timer begin
game.set_event_flag("utilizzo_stanza",0)
game.set_event_flag("entrata_vietata",0)
warp_to_village()
end

when limit.timer begin
kill_all_in_map(221)
game.set_event_flag("utilizzo_stanza",0)
game.set_event_flag("entrata_vietata",0)
warp_to_village()
end

when blockentry.timer begin
game.set_event_flag("entrata_vietata",1)
end
end
end

Ecco il link al file Deposit Files
 
Ultima modifica:
Non si capisce veramente niente in questa quest... tu metti end e poi elseif.. metti degli else dopo gli end lol
 
ma proprio nessuno la sa sistemare?

---------- Messaggio aggiunto il 03-05-12 alle 16:01 ---------- Il messaggio precedente risale il 30-04-12 alle 20:27 ----------

qualcuno mi risponde?
 
Succede che spariscano le indentazioni quando la posti, piuttosto fai l'upload del file di testo indentato bene e metti il link, perché leggerla così è veramente impossibile
 
Ultima modifica:
fatto come hai detto, ho inserito il link

---------- Messaggio aggiunto il 05-05-12 alle 10:53 ---------- Il messaggio precedente risale il 03-05-12 alle 19:38 ----------

ho messo il file, ora qualcuno mi può aiutare?

---------- Messaggio aggiunto il 07-05-12 alle 18:49 ---------- Il messaggio precedente risale il 05-05-12 alle 10:53 ----------

up up up up

---------- Messaggio aggiunto il 09-05-12 alle 20:01 ---------- Il messaggio precedente risale il 07-05-12 alle 18:49 ----------

up up up up
 
Ultima modifica:
Prima cosa c'è un errore qua:

Codice:
                    local i = select("Sono pronto a Combattere!", "Annulla")
                    if i == 2 then
                        return
                    end
                    elseif i == 1 then
                        say_title(""..mob_name(30121).."")
                        say("Inserisci la password solo numerica.")

hai chiuso l'if ma non dovevi, avendo messo un elseif

Poi c'è un erroraccio qua:

Codice:
 d.regen_file("data/dungeon/skipia_boss1.txt")

Non puoi usare le funzioni del dungeon se il personaggio non è dentro un dungeon. Esiste la funzione regen_in_map(index_mappa, percorso_regen) quando sei fuori dal dungeon.
 
Stato
Discussione chiusa ad ulteriori risposte.
Indietro
Top Bottom