• 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!

[Request] Magic Wall Script

lopky

Member
Joined
Apr 24, 2016
Messages
14
Reaction score
6
Hi, I need your help guys!

I'm helping some friends in a 7.6 ot and I can't figure out how to make mwalls block stairs. I mean, we would like them to block stairs, ladders, etc. so people can't use/step up/down.. if theres a mwall.

Could u help me please? :D

Thanks!!!
 
Solution
Hi, I need your help guys!

I'm helping some friends in a 7.6 ot and I can't figure out how to make mwalls block stairs. I mean, we would like them to block stairs, ladders, etc. so people can't use/step up/down.. if theres a mwall.

Could u help me please? :D

Thanks!!!
Try this
Lua:
local magicWall = {1497, 1498}

local function isInArray(a, f)
    if type(a) == 'table' then
        for k, v in pairs(a) do
            if v == f then
                return true
            end
        end
    end
    return false
end

function onStepIn(cid, item, position, fromPosition)
    if isInArray(magicWall, item.itemid) then
        doTeleportThing(cid, fromPosition)
    end
    return true
end
Hi, I need your help guys!

I'm helping some friends in a 7.6 ot and I can't figure out how to make mwalls block stairs. I mean, we would like them to block stairs, ladders, etc. so people can't use/step up/down.. if theres a mwall.

Could u help me please? :D

Thanks!!!
Try this
Lua:
local magicWall = {1497, 1498}

local function isInArray(a, f)
    if type(a) == 'table' then
        for k, v in pairs(a) do
            if v == f then
                return true
            end
        end
    end
    return false
end

function onStepIn(cid, item, position, fromPosition)
    if isInArray(magicWall, item.itemid) then
        doTeleportThing(cid, fromPosition)
    end
    return true
end
 
Solution
Back
Top