• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Request > script switch removes stone for x hours

98155100thp

New Member
Joined
Jun 12, 2014
Messages
3
Reaction score
0
Yo guys..
I need a script for a switch that if pulled, will remove a stone for x hours, and this switch will become desativated for x hours..

Thanks!
 
Code:
local stonepos = {x=33164, y=31671, z=13, stackpos=1} -- Stone pos
function onUse(cid, item, fromPos, item2, toPos)
    if item.itemid == 1945 then
        doRemoveItem(getThingfromPos(stonepos).uid, 1)
        doTransformItem(item.uid,1946)
        addEvent(onTimer7, 30*60*1000) --30minutes
    end
return true
end

function onTimer7() --creates wall back
    doTransformItem(getThingFromPos({x=33168, y=31669, z=13, stackpos=1}).uid, 1945)--lever pos
    doCreateItem(1484,1,{x=33164, y=31671, z=13})-- Stone pos
end
 
Back
Top