• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Script help

sequera98

New Member
Joined
Mar 13, 2017
Messages
3
Reaction score
0
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:
Back
Top