Hello.
I want to add so you can't use the lever until the timer ended.
Right now, you can just spam it.
19:16 You opened the secret passage.
19:16 You opened the secret passage.
19:16 You opened the secret passage.
19:16 You opened the secret passage.
I want it to say "its already open" if its open.
Thanks.
I want to add so you can't use the lever until the timer ended.
Right now, you can just spam it.
19:16 You opened the secret passage.
19:16 You opened the secret passage.
19:16 You opened the secret passage.
19:16 You opened the secret passage.
I want it to say "its already open" if its open.
Thanks.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {x = 901, y = 1144, z = 10}
doTransformItem(getTileItemById(pos, 9023).uid, 369)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You opened the secret passage.")
doTransformItem(item.uid, item.itemid == 9825 and 9826 or 9825)
addEvent(function () doTransformItem(getTileItemById(pos, 369).uid, 9023) end, 10000)
return true
end