• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help Change back on lever

Toast

New Member
Joined
Feb 28, 2008
Messages
150
Reaction score
0
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

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:
Back
Top