Hi epvp,
I'm having a problem with a quest I wrote..
I hope someone can give me a little help with it.
Kind Regards,
VMP
I'm having a problem with a quest I wrote..
I hope someone can give me a little help with it.
Code:
quest pvp_event begin
state start begin
when 20011.chat."Quero inscrever-me no torneio" begin
local player_id = pc.get_player_id()
local player_job = pc.get_job()
say_title("Uriel:")
if pc.getf("painel_gm", "pvp_reg") == 0 then
say("Registos fechados!")
return
elseif pc.getf("painel_gm", "pvp_aberto") == 0 then
say("Evento PvP fechado!")
return
elseif pc.getf("painel_gm", "pvp_aberto") == 1 and if pc.getf("painel_gm", "pvp_reg") == 1 then
say("")
say("Olá!")
say("Queres inscrever-te no Evento PvP?")
if pc.getf("inscrito_pvp") == 1 then
say("Já estás inscrito!")
return
else
local opzioni = select ("Sim","Não")
if opzioni == 1 then
mysql_query("INSERT INTO aom_db.aom_pvp_event (player_id, player_job) VALUES ('".. player_id .."', '".. player_job .."')")
pc.give_item(10)
say("Foste inscrito para o torneio!")
pc.setf("inscrito_pvp", 1)
elseif opzioni == 2 then
return
end
end
end
end
end
VMP