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

simple tile script

xexam

New Member
Joined
Aug 3, 2010
Messages
172
Reaction score
2
Hello!
I need a simple script - player step on a tile and the stone removes, when player step out of tile the stone appear again.
thanks in advance:)
 
Aw okay well i post it anyway xD

It's really easy. Go to your mapeditor and add at the tile which should remove your stone/create them actionid =1000 ofcourse you can also change this to 2000 but you should change that in movements.xml at actionid=1000 to actionid=2000 now let's go!

In Movements.XML:
Code:
		<movevent type="Stepin" actionid="1000" event="script" value="createstone.lua"/>
	<movevent type="StepOut" actionid="1000" event="script" value="createstone.lua"/>

and last!
In Data/movements/scripts
createstone.lua:
Code:
function onStepIn(cid, item, position, fromPosition)
    doCreateItem(1304, 1, {x = 1070, y = 1057, z = 7})
    doCreateItem(1304, 1, {x = 1071, y = 1057, z = 7}) 	
end
function onStepOut(cid, item, position, fromPosition)
    doRemoveItem(getTileItemById({x=1070, y=1057, z=7}, 1304).uid) 
    doRemoveItem(getTileItemById({x=1071, y=1057, z=7}, 1304).uid)	
end


that was it.
 
Last edited:
trolling.jpg

Trying to earn yourself a quick b&?
 
Back
Top