sick
Member
So i got this script: when i use the lamp the ladder appears, when i use it again, ladder disappears, however, I need to add a line that if lamp was used 1 time and ladder appeared, ladder would disappear automatically after 1 min.
Thanks in advance :thumbup:
Thanks in advance :thumbup:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local gatePosition = {x=912, y=992, z=7, stackpos=1}
local getGate = getThingFromPos(gatePosition)
if(item.uid == 6658) then
if(item.itemid == 2069 and getGate.itemid == 0) then
doCreateItem(1386, 1, gatePosition)
doTransformItem(item.uid, item.itemid-1)
elseif(item.itemid == 2068 and getGate.itemid == 1386) then
doRemoveItem(getGate.uid, 1)
doTransformItem(item.uid, item.itemid+1)
else
doPlayerSendCancel(cid, "The lamp seems to be already used recently.")
end
end
return TRUE
end