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

movement script

mmheo

New Member
Joined
Sep 14, 2017
Messages
157
Reaction score
1
hello guys
anyone can help me in this script if x creature stepin x Position remove wall in x Position
0.4
 
i need if monster stepin
example
if demon stepin Position 1000,1000,7
remove wall in Position 1002,1003,7
Add this to movements with name remove.lua and change XYZ/Wall ID and time
LUA:
local config = {
    wall = {id = 1037, pos = {x = 32333, y = 32239, z = 7}},
    transformid = 10766,
        time = 10, -- time in minutes
    playerpos = {
        {x = 32333, y = 32238, z = 7},
    }
}

function onStepIn(cid, item, position, fromPosition)

    if(getTileItemById(config.wall.pos, config.wall.id).uid > 0) then
        local n = 0
        for pos = 1, #config.playerpos do
            if(isCreature(getTopCreature(config.playerpos[pos]).uid)) then
                n = n + 1
            end
        end
        if(n == #config.playerpos) then
            doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED)
            doRemoveItem(getTileItemById(config.wall.pos, config.wall.id).uid,1)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.")
            addEvent(doCreateItem, config.time * 60 * 1000, config.wall.id, 1, config.wall.pos)
        end
    end
    doTransformItem(item.uid, config.transformid)
    return true
end
Add this to movements.xml.
XML:
<movevent type="StepIn" actionid="6565" event="script" value="remove.lua"/>
 
Back
Top