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

Solved Make tiles unwalkable?

highclick

New Member
Joined
Mar 21, 2011
Messages
80
Reaction score
4
Hey guys. So I've got some "holy ground" on my server and i don't want people too be able too step on the ground, is there a way too make the specified tiles unwalkable/push you back?

I don't need a finished script i just need some help too get started!
Thank you in advance.
 
You can use a stepin script, add it with actionid in movements.xml and add the actionids to the tiles, or if all tiles with that itemid should be unwalkable, you can also add it with itemid in movements.xml.
Code:
doTeleportThing(cid, fromPosition)
 
You can use a stepin script, add it with actionid in movements.xml and add the actionids to the tiles, or if all tiles with that itemid should be unwalkable, you can also add it with itemid in movements.xml.
Code:
doTeleportThing(cid, fromPosition)

Am i getting anywhere close or is this just plain wrong?

PHP:
    <movevent type="StepIn" actionid="101" event="script" value="holyground.lua"/>

PHP:
function onStepIn(cid, item, position, fromPosition)
        local player = getPlayerPos(cid)
        local newpos =   {x=1226, y=1097, z=6}
       
    if item.actionid == 101 then
        doTeleportThing(player,newpos)
    end
    return TRUE
end
 
Code:
function onStepIn(cid, item, position, fromPosition)
     return doTeleportThing(cid, fromPosition, false)
end

I keep getting this error:

PHP:
[22/01/2015 19:19:20] data/movements/scripts/holyground.lua:2: attempt to call global 'getPlayerPos' (a nil value)
 
Back
Top