ond
Veteran OT User
I want the script to do following:
When I walk on the tile, it summons a monsters on a position I choose, and when I walk off the tile, it creates an item on that tile. Here is my script so far:
When I walk on the tile, it summons a monsters on a position I choose, and when I walk off the tile, it creates an item on that tile. Here is my script so far:
PHP:
function onStepIn(cid, item, frompos, item2, topos, pos)
if item.uid == 5010 then
creaturepos = {x=1211, y=588, z=12}
doSummonCreature("Warlock", creaturepos)
end
end
wall1 = {x=1266, y=1242, z=11, stackpos=1}
getwall1 = getThingfromPos(wall1)
function onStepOut(cid, item, frompos, item2, topos, pos)
if item.uid == 5010 then
doCreateItem(1025,1,wall1)
end
end
end
Code:
<movevent event="StepIn" uniqueid="5010" script="quest.lua"/>
<movevent event="StepOut" uniqueid="5010" script="quest.lua"/>