Help with the script for the winning guild can open the doors with the domain of the castle
LUA:
local gatepos = {x=194, y=91, z=15, stackpos=1} --posição do primeiro portão
local g = 1544 --id do primeiro portão
local g2 = 1544 --id do segundo portão
local g3 = 1544 --id do terceiro portão
local doorOpen = "The door has been opened!"
local doorClose = "The door has been closed!"
local guildname = 1
function onUse(cid, item, frompos, item2, topos)
if getPlayerAccess(cid) >= guildname then
local item = getTileItemById(gatepos, g)
if item.uid > 0 then
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid, 22, doorOpen)
else
doCreateItem(g, 1, gatepos)
doPlayerSendTextMessage(cid, 22, doorClose)
end
end
return true
end
Last edited by a moderator: