quest change_empire begin
state start begin
when 20094.chat."Mudar de Reino" begin
local count = pc.get_change_empire_count() ;
if count >= 1 then
return
end
say_reward("Mudar de Reino")
say("")
say("Para mudar de Reino...")
say("Não deve possuir Guild.")
say("Se estiver Casado...")
say("Deve Divorciar.")
say("Irá Custar 500.000 Yangs")
say("")
say("Quer Mudar de Reino ?")
say("")
local s = select("Sim", "Não")
if s == 1 then
change_empire.move_pc()
end
end
when 71054.use begin
say_title("Pergaminho De Exílio:")
say("Tens o Teu Cavalo ?")
if get_time() < pc.getqf("next_use_time") then
say("Ainda não podes mudar de reino.")
say("")
if pc.is_gm() then
say("Como és GM podes Colocar o tempo")
say("de espera a 0.")
say("")
local s = select("Quero Fazer Isso", "Cancelar")
if s == 1 then
say("Feito")
pc.setqf("next_use_time", 0)
end
end
return
end
if change_empire.move_pc() == true then
pc.setqf("next_use_time", get_time() + 86400 * 7)
end
end
function move_pc()
if pc.is_engaged() then
say("Está Casado.")
say("Não Pode Mudar De Reino.")
say("")
return false
end
if pc.is_married() then
say("Está Casado.")
say("Não Pode Mudar De Reino.")
say("")
return false
end
if pc.is_polymorphed() then
say("Está Transformado.")
say("Não Pode Mudar De Reino.")
say("")
return false
end
if pc.has_guild() then
say("É Membro de Uma Guild.")
say("Não Pode Mudar De Reino.")
say("")
return false
end
if pc.money < 500000 then
say("Não tem Yang Suficiente.")
say("Precisa de 500.000 Yangs!")
say("")
return false
end
say("Escolhe O Reino Que Quer:")
local s = select("Shinsoo", "Chunjo", "Jinno", "Sair")
if 4==s then
return false
end
say("")
say_reward("Tem Certeza?")
say("")
local a = select("Sim", "Não")
if 2== a then
return false
end
local ret = pc.change_empire(s)
local oldempire = pc.get_empire()
if ret == 999 then
say("Já mudou de Reino!")
say("Deve ir até ao seu Novo Reino.")
say("")
pc.change_gold(-500000) ;
char_log(0, "CHANGE_EMPIRE",string.format("%d -> %d", oldempire, s))
return true
else
if ret == 1 then
say("Já é deste Reino!")
say("Escolhe Outro.")
say("")
say("")
elseif ret == 2 then
say("É Membro de Uma Guild.")
say("Não Pode Mudar de Reino.")
say("")
say("")
elseif ret == 3 then
say("Está Casado.")
say("Não Pode Mudar de Reino")
say("")
end
end
return false
end
end
end
quest change_empire begin
state start begin
when 20094.chat."Mudar de Sexo" begin
say_title("Alteração de Sexo")
if pc.get_level() < 50 then
say("Deve ser nível 50.")
say("")
return
elseif pc.is_married() then
say("Não pode estar numa relação.")
say("")
return
elseif pc.is_polymorphed() then
say("Não pode estar transformado.")
say("")
return
elseif get_time() < pc.getqf("next_time") then
say("Ainda não passou tempo suficiente")
say("desde a tua última mudança.")
say("Não pode mudar agora.")
if pc.is_gm() then
say_reward("O seu tempo de espera é de 0 segundos.")
pc.setqf("next_time", 0)
end
return
end
say("Tem os requisitos todos.")
say("Parece que está pronto para mudar")
say("o teu sexo.")
say_reward("Quer mudar?")
local s=select("Sim", "Não")
if 1==s then
say_title("Alteração de Sexo")
say("Mudou o teu sexo com sucesso!")
say_reward("Deve alterar a personagem")
say_reward("para que isto tenha efeito.")
pc.setqf("next_time", get_time() + 86400 * 3)
pc.change_sex()
end
end
end
end
Eu testei e funciona perfeitamente, espero que ajude alguem..