Im useing TFS 0.3.2 and im trying to add a timer to change back a lever, heres the script im useing to remove 2 stones.
I would like the lever to reset after a certian ammount of time.
Any help would be great ty
I would like the lever to reset after a certian ammount of time.
Any help would be great ty
Code:
function onUse(cid, item, frompos, item2, topos)
wall1 = {x=1212, y=1053, z=9, stackpos=1}
wall2 = {x=1213, y=1053, z=9, stackpos=1}
getwall1 = getThingfromPos(wall1)
getwall2 = getThingfromPos(wall2)
if item.uid == 15000 and item.itemid == 1945 then
doRemoveItem(getwall1.uid,1)
doRemoveItem(getwall2.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 15000 and item.itemid == 1946 then
doCreateItem(1304,1,wall1)
doCreateItem(1304,1,wall2)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Last edited by a moderator: