Tenta assim:
function isPlayerGuild(cid)
return getPlayerGuildName(cid) ~= "" and true or false
end
function getGuildNameById(id) -- by Vodka
local query = db.getResult("SELECT `name` FROM `guilds` WHERE `id` = "..id)
if query:getID() ~= -1 then
return query:getDataString("name")
end
return nil
end
function onStepIn(cid, item, position, fromPosition)
local castle_one_name = "Castle24Horas" -- Nome do castelo 1
local storages = {154154, 54321, 123123} -- Storages ( se vc eh iniciante)
local sto_ativ = getGlobalStorageValue(storages[2])
local position = getCreaturePosition(cid)
if isPlayerGuild(cid) then
if sto_ativ == 1 or sto_ativ == -1 then
guildname = getPlayerGuildName(cid)
guild = getPlayerGuildId(cid)
guild_sto = getGlobalStorageValue(storages[3])
if guild ~= guild_sto then
doBroadcastMessage("O Jogador: "..getCreatureName(cid)..", da GUILD: "..guildname..", Esta invadindo o "..castle_one_name..", Aviso #Donos Atuais: "..getGuildNameById(getGlobalStorageValue(storages[3]))
else
doPlayerSendCancel(cid,"O Castelo pertence a sua guild.")
end
else
doPlayerSendCancel(cid,"O Castelo pertence a sua guild.")
end
else
doPlayerSendCancel(cid,"O Castelo pertence a sua guild.")
end
return true
end




info
Grupo: Campones
Registrado: 17/11/11
Posts: 58
Reputação: +2
Char no Tibia: Shild Of Menera
Seguinte Galera,
Estou Com Este Erro no Script...
E Aqui Esta o Script
Alguem Poderia me Ajudar?
Valendo Sempre +REP