pioncz
New Member
- Joined
- Dec 3, 2008
- Messages
- 149
- Reaction score
- 1
Hi,
I want to make script what will make and remove strone.
Its him :
But it dont work.
Its something bad in removeitem, but i dont know what ;<
I want to make script what will make and remove strone.
Its him :
Code:
function onUse(cid, item, frompos, item2, topos)
local lever = 1945 -- The itemid of your lever (default state)
local objectid = 1355 -- The itemid of the object that you will be added/removed
local objectpos = {x=369, y=328, z=9, stackpos=1} -- Position of the object that will be added/removed
object = getThingfromPos(objectpos)
if (item.itemid == lever) then
doRemoveItem(object, 1)
doTransformItem(item.uid, lever+1)
else
doCreateItem(objectid, 1, objectpos)
doTransformItem(item.uid, lever)
end
end
Its something bad in removeitem, but i dont know what ;<