ond
Veteran OT User
Hi, I'm requesting a lua script. The lua scripts function is when I put an item on a certain tile and stand on another and after that pull a lever, I shall be teleported and the item shall be removed.
I've already got a script but it doesn't quite works. It only tells me:
Here's my script:
Would be really thank full if someone helped me out!
I've already got a script but it doesn't quite works. It only tells me:
Sorry, not possible.
Here's my script:
Lua:
function onUse(cid, item, frompos, item2, topos)
player1pos = {x=311, y=1542, z=10, stackpos=253}
player1 = getThingfromPos(player1pos)
piece1pos = {x=310, y=1543, z=10, stackpos=1}
getpiece1 = getThingfromPos(piece1pos)
if item.uid == 6435 and item.itemid == 1945 and getpiece1.itemid == 2363 and player1.itemid > 0 then
doRemoveItem(getpiece1.uid,1)
nplayer1pos = {x=300, y=1536, z=10}
doTeleportThing(player1.uid,nplayer1pos)
doSendMagicEffect(nplayer1pos,10)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 6435 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
return 1
end
Would be really thank full if someone helped me out!