ond
Veteran OT User
Hello, I'm requesting a script that changes a ground tile into another. But this script is supposed to change 4 tiles at the same time.
Here is a failure edition example by me:
Here is a failure edition example by me:
Lua:
function onUse(cid, item, frompos, item2, topos)
demonhelmetuniqueid = 5010
peopleposition = {x=rockposition.x, y=rockposition.y, z=rockposition.z, stackpos=253}
people = getThingfromPos(peopleposition)
ground1 = {x=1020, y=1003, z=7, stackpos=0}
ground2 = {x=1020, y=1004, z=7, stackpos=0}
ground3 = {x=1020, y=1005, z=7, stackpos=0}
ground4 = {x=1020, y=1006, z=7, stackpos=0}
if people.itemid == 0 then
doTransformItem(item.uid,item.itemid+1)
doCreateItem(511,1,ground1)
doCreateItem(515,1,ground2)
doCreateItem(493,1,ground3)
doCreateItem(507,1,ground4)
doTransformItem(item.uid,item.itemid-1)
doCreateItem(1284,1,ground1)
doCreateItem(1284,1,ground2)
doCreateItem(1284,1,ground3)
doCreateItem(1284,1,ground4)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
peopleposition.x = rockposition.x+1
doTeleportThing(people.uid,peopleposition)
doTransformItem(item.uid,item.itemid-1)
removeTeleport(teleportcreateposition)
end
return 1
end
Last edited: