spell
the problem I'm having is when the player is out of guild he can't use the spell
lib function
Lua:
function wall(creature, tile)
local pos = creature:getPosition()
local playerGuild = creature:getGuild()
local playerGuildName = playerGuild:getName()
if guildIsInWar(playerGuildName) then
print(ok)
else
prin(nook)
end
end
lib function
Lua:
function guildIsInWar(guildName)
local resultId = db.storeQuery(string.format('SELECT `status`, `guild1`, `guild2` FROM `guild_wars` WHERE `name1` = %s or `name2` = %s AND `status` = 1', db.escapeString(guildName), db.escapeString(guildName)))
if resultId then
result.free(resultId)
return true
end
return false
end