Ir para conteúdo

Posts Recomendados

Muleek , provaaveelmente as talk's nao estão no seu OT vou ti passar as Talk's pra você por no seu script

Nome da pasta "guildcast.lua"

function onSay(cid, words, param)

local playerGuild = getPlayerGuildId(cid)

if playerGuild > 0 then

local playerGuildLevel = getPlayerGuildLevel(cid)

if playerGuildLevel >= GUILDLEVEL_VICE then

local players = getOnlinePlayers()

local message = "*Guild* " .. getCreatureName(cid) .. " [" .. getPlayerLevel(cid) .. "]:\n" .. param;

for i,playerName in ipairs(players) do

local player = getPlayerByName(playerName);

if getPlayerGuildId(player) == playerGuild then

doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, message);

end

end

doPlayerSendCancel(cid, "Message sent to whole guild.");

else

doPlayerSendCancel(cid, "You have to be at least Vice-Leader to guildcast!");

end

else

doPlayerSendCancel(cid, "Sorry, you're not in a guild.");

end

doPlayerSendTextMessage(cid, 25, words)

return FALSE

end

 

Nome da pasta "guildlist.lua"

function onSay(cid, words, param, channel)

if param == '' then

local lista = db.getResult("SELECT `name` FROM `guilds`;")

if(lista:getID() ~= -1) then

local v = ''

repeat

v = v .. lista:getDataString("name") .. "\n"

until not lista:next()

lista:free()

doShowTextDialog(cid, 2529, v)

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não existem guilds no servidor.")

end

else

local id = getGuildId(param)

if id then

local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ");")

if(lista:getID() ~= -1) then

local v = ''

repeat

local rank = db.getResult("SELECT `name` FROM `guild_ranks` WHERE `id` = " .. lista:getDataInt("rank_id") .. " LIMIT 1;")

v = v .. lista:getDataString("name") .. " [" .. rank:getDataString("name") .. "]\n"

rank:free()

until not lista:next()

lista:free()

doShowTextDialog(cid, 2529, v)

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não há jogadores nesta guild.")

end

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Está Guild não existe.")

end

end

return TRUE

end

 

AJUDEI ? REP + !

Link para o comentário
https://xtibia.com/forum/topic/175442-problema-com-comando-de-guild/#findComment-1153848
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...