function onStepIn(cid, item, pos, fromPos)
return getPlayerItemCount(cid, [COLOR="#FF0000"]2160[/COLOR]) > [COLOR="#0000FF"]10[/COLOR] and doTeleportThing(cid, {[COLOR="#00FF00"]x=1000,y=1000,z=7[/COLOR]}) or doTeleportThing(cid, fromPos, true)
end
Code:function onStepIn(cid, item, pos, fromPos) return getPlayerItemCount(cid, [COLOR="#FF0000"]2160[/COLOR]) > [COLOR="#0000FF"]10[/COLOR] and doTeleportThing(cid, {[COLOR="#00FF00"]x=1000,y=1000,z=7[/COLOR]}) or doTeleportThing(cid, fromPos, true) end
Red: Item for you can pass.
Blue: Count.
Green: Position you will be teleported.
Thankson movements/movements.xml
<movevent type="StepIn" actionid="2000" event="script" value="tile.lua"/>
LUA:function onStepIn(cid, item, pos, fromPos) return getPlayerItemCount(cid, itemID) > 0 and doTeleportThing(cid, {x=x,y=y,z=z}) or doTeleportThing(cid, fromPos, true) end
function onStepIn(cid, item, pos, fromPos)
return getPlayerItemCount(cid, itemID) > 0 and doRemoveItem(item.uid, 1) and doTeleportThing(cid, {x=x,y=y,z=z}) or doTeleportThing(cid, fromPos, true)
end