Hello guys!
I need some help with a bridge lever script that adds a 3SQM bridge with a cooldown.
I searched but couldnt really find anything good.
I currently have this one without multiple positions and no timer..
I need some help with a bridge lever script that adds a 3SQM bridge with a cooldown.
I searched but couldnt really find anything good.
I currently have this one without multiple positions and no timer..
Code:
local t, event = {
id = 1284,
pos = {x=1007, y=989, z=8},
from = {x=1008, y=989, z=8},
to = {x=700, y=600, z=7},
time = 5 * 60 * 1000
}, 0
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
doRemoveItem(getTileItemById(t.pos, t.id).uid)
event = addEvent(reset, t.time, toPosition)
doTransformItem(item.uid, 1946)
else
stopEvent(event)
reset(toPosition)
end
return true
end