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

tile that makes a wall

Dodekus

Fighters Online
Joined
Jan 20, 2009
Messages
74
Reaction score
0
Location
Sweden
I want to do a script that makes a wall that blocks the path if a monster steps on it. Like a gate to my town, a tile in front of the gate, and when a monster steps on it the gate closes (a wall creates). The problem is I don't know how to check if the creature that stands on it is a monster or a player.

Hope you understand.

Dodekus
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isMonster(uid) == TRUE then
        doCreateItem(1026, 1, {x = 540, y = 456, z = 7})
        return TRUE
    end
end

Anything wrong with that code? I'm not a very good scripter (YET ^_^)
 
You should change the function to function onStepIn(cid, item, pos) and also create a function onStepOut(cid, item, pos). This should go inside the data/movements folder, not the data/actions folder.
 
Back
Top