Ganja Boy 2 Posted August 18, 2015 Boas comunidade, estive a traduzir a quest monarch das files rancoroso, e tudo corre bem enquanto o sistema esta fechado, quando ativo o sistema com uma conta GM, se clicar em votar imperador e inscrição imperador, a janela fecha e nada acontece. Se alguem me puder ajudar, desde ja um obrigado. quest monarch begin state start begin when electionman1.chat."GM: Ativar sistema imperial" or electionman2.chat."GM: Ativar sistema imperial" or electionman3.chat."GM: Ativar sistema imperial" with pc.is_gm() begin if game.get_event_flag("monarch") == 1 then say("Olá queres finalizar o sistema imperial?") say("") local s = select("Sim","Não") if s == 1 then game.set_event_flag("monarch", 0) game.set_event_flag("monarch_elect", 0) say("Sistema imperial finalizado com êxito.") say("") end else say("Olá queres iniciar o sistema imperial?") say("") local s = select("Sim","Não") if s == 1 then game.set_event_flag("monarch", 1) game.set_event_flag("monarch_elect", 1) say("Sistema imperial iniciado com êxito.") say("") end end end when electionman1.chat."Escolher imperador" or electionman2.chat."Escolher imperador" or electionman3.chat."Escolher imperador" begin if game.get_event_flag("monarch_elect") == 0 then say("A eleição ainda não começou.") say("Volta quando as eleições tiverem começado.") return end local g = oh.candidacy_list() local gname_table = {} table.foreachi(g, function(n, p) gname_table[n] = n.."."..oh.candidacy_name(n-1) end) if table.getn(g) == 0 then say("Ainda não há candidatos") else gname_table[table.getn(g)+1] = "Fechar" say("Podes votar no teu imperador.") say("A votação para imperador é algo sério.") say("Vota com cuidado.") say("Só podes votar uma vez.") say("Escolhe o candidato que queres.") wait() local s = select_table(gname_table) if s == table.getn(gname_table) then return; else ret = oh.election(s-1) say(oh.candidacy_name(s-1).."Voto aceite") end end end when electionman1.chat."Mostrar candidatos imperiais" or electionman2.chat."Mostrar candidatos imperiais" or electionman3.chat."Mostrar candidatos imperiais" begin if game.get_event_flag("monarch") == 0 then say("Para te candidatares tens de ter os seguintes requesitos:") say("") say("") say_reward("1. Tens de ter 1kkk de Gold.") say_reward("2. Tens de ser Lider ou Sub-Lider de uma Guild.") say_reward("3. Tens de ser Lvl 100.") say("") say("Mas a eleição ainda não começou.") say("Volta mais tarde.") return end say("Podes te inscrever para imperador,") say("Para te candidatares tens de ter os seguintes requesitos:") say("") say_reward("1. Tens de ter 1kkk de Gold.") say_reward("2. Tens de ser Lider ou Sub-Lider de uma Guild.") say_reward("3. Tens de ser Lvl 100.") say("") say("Queres te inscrever?") local s = select("Sim. ","Não") local NEED_MONEY = 1000000000 if s == 1 then if oh.candidacycount() >= 8 then say("Desculpa!!!") say("Já temos candidatos suficientes.") say("Tenta na próxima eleição.") return end if pc.get_gold() >= NEED_MONEY and pc.get_level() >= 100 and oh.isguildmaster() == 1 then pc.change_gold(-NEED_MONEY); oh.candidacy(); end end end end end Share this post Link to post Share on other sites