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

stay on top of the magic wall

nokia_.

Member
Joined
Sep 16, 2010
Messages
109
Reaction score
5
Hello friends, how do I when the player down the stairs, hole and have magic wall in place to get off and it does not disappear?

I want you on top , but only after some seconds it lasts .
 
Hello friends, how do I when the player down the stairs, hole and have magic wall in place to get off and it does not disappear?

I want you on top , but only after some seconds it lasts .
Code:
local magicWall = {1497, 1498, 8753, 11098}
local c = {[0] = 'y' , 'x', 'y', 'x'}

function onStepIn(cid, item, position, fromPosition)

    local pos = getCreaturePosition(cid)

    local function movePlayer()
        local dir = getCreatureLookDirection(cid)
        pos[c[dir]] = isInArray({0, 1}, dir) and pos[c[dir]] + 1 or pos[c[dir]] - 1
        return pos
    end

    if isInArray(magicWall, item.itemid) then
        doTeleportThing(cid, movePlayer(), false)
        doCreateItem(item.itemid, 1, position)
    end
    return true
end
 
Last edited:
data\movements\movements.xml and delete/comment:

Code:
<movevent event="StepIn" itemid="1497" function="onStepInField"/>
<movevent event="StepIn" itemid="1499" function="onStepInField"/>
 
Last edited:
Back
Top