antiblock
Elveron
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
  • 0
FelipeSantos

Quest guild_war_observer

Question

Alguém poderia me mostrar a solução para essa quest?

Somente GM pode assistir guerras entre Guildas.

 

 

quest guild_war_observer begin
    state start begin
        when 11001.chat."Olhe a lista das Batalhas de Guilda" with pc.is_gm() begin
            local g = guild.get_warp_war_list() -- return format {{1,2}, {3,4}}
            local gname_table = {}

            table.foreachi(g,
            function(n, p)
                gname_table[n] = guild.get_name(p[1]).." vs "..guild.get_name(p[2])
            end)

            if table.getn(g) == 0 then
                -- no currently war
                say("Neste momento não há Batalhas de Guilda.")
            else
                gname_table[table.getn(g)+1] = locale.confirm
                say_title("Lista de guerras")

                local s = select_table(gname_table)

                if s != table.getn(gname_table) then
                    pc.warp_to_guild_war_observer_position(g[1], g[2])
                end
            end
        end
        when 11003.chat."Olhe a lista das Batalhas de Guilda" with pc.is_gm() begin
            local g = guild.get_warp_war_list() -- return format {{1,2}, {3,4}}
            local gname_table = {}

            table.foreachi(g,
            function(n, p)
                gname_table[n] = guild.get_name(p[1]).." vs "..guild.get_name(p[2])
            end)

            if table.getn(g) == 0 then
                -- no currently war
                say("Neste momento não há Batalhas de Guilda.")
            else
                gname_table[table.getn(g)+1] = locale.confirm
                say_title("Lista de guerras")

                local s = select_table(gname_table)

                if s != table.getn(gname_table) then
                    pc.warp_to_guild_war_observer_position(g[1], g[2])
                end
            end
        end
        when 11005.chat."Olhe a lista das Batalhas de Guilda" with pc.is_gm() begin
            local g = guild.get_warp_war_list() -- return format {{1,2}, {3,4}}
            local gname_table = {}

            table.foreachi(g,
            function(n, p)
                gname_table[n] = guild.get_name(p[1]).." vs "..guild.get_name(p[2])
            end)

            if table.getn(g) == 0 then
                -- no currently war
                say("Neste momento não há Batalhas de Guilda.")
            else
                gname_table[table.getn(g)+1] = locale.confirm
                say_title("Lista de guerras")

                local s = select_table(gname_table)

                if s != table.getn(gname_table) then
                    pc.warp_to_guild_war_observer_position(g[1], g[2])
                end
            end
        end
    end
end
 

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

pc.is_gm()

 

remove essa função

Share this post


Link to post
Share on other sites
antiblock
Rodnia | Alpha & Omega
  • 0
11 horas atrás, Theji disse:

pc.is_gm()

 

remove essa função

Resolvido, obrigado.

Edited by FelipeSantos (see edit history)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now