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
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