[Admin] tierrilopes Posted December 11, 2015 at 06:42 PM Share Posted December 11, 2015 at 06:42 PM quest change_empire begin state start begin when 71054.use begin say("Utilizaste a Permissão de Exílio.") pc.setqf("next_use_time", 0) if get_time() < pc.getqf("next_use_time") then say("Ainda não podes mudar de reino novamente.") say("") if pc.is_gm() then say("GM's podem resetar o tempo de espera.") say("") local s = select("Reset", "Não quero") if s == 1 then say("Tempo de espera resetado") 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("És casado.") say("Não podes mudar de reino.") say("") return false end if pc.is_married() then say("És casado.") say("Não podes mudar de reino.") say("") return false end if pc.is_polymorphed() then say("Estás transformado.") say("Não podes mudar de reino.") say("") return false end if pc.has_guild() then say("Pertences a uma guild.") say("Não podes mudar de reino.") say("") return false end if pc.money < 10000000 then say("Não tens dinheiro suficiente.") say("Precisas de 10kk yangs para mudar de reino.") say("") return false end local s = select("Reino Shinsoo","Reino Chunjo","Reino Jinno","Cancelar") if 1 == s then s = 1 end if 2 == s then s = 2 end if 3 == s then s = 3 end if 4 == s then return false end say("") say_reward("Desejas mesmo mudar de reino?") say("") local a = select("Mudar de reino", "Não mudar") if 2 == a then return false end local ret = pc.change_empire(s) local oldempire = pc.get_empire() if ret == 999 then say("Mudaste de reino com sucesso.") say("Precisas de voltar a entrar no jogo..") say("") pc.change_gold(-10000000) pc.remove_item(71054) ; char_log(0, "CHANGE_EMPIRE",string.format("%d -> %d", oldempire, s)) return true else if ret == 1 then say("O reino que escolheste é o teu reino atual.") say("Escolhe outro reino.") say("") say("") elseif ret == 2 then say("Outros personagens teus pertencem a uma Guild.") say("Não podes mudar de reino.") say("") say("") elseif ret == 3 then say("Outros personagens teus estão casados.") say("Não podes mudar de reino.") say("") say("") end end return false end endend change_empire.quest 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now