Good night, I would like anyone who can help me to add the exhausted five seconds in which the lever id is 10029, I want it to become 10030 (not being able to use it while in 10030), having to wait five seconds to go back to id 10029 and be able to buy the item.
Lua:
local config = {
money = 35000000,
item = 9693,
count = 1,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
pos = getCreaturePosition(cid)
if item.itemid == 1945 then
if doPlayerRemoveMoney(cid, config.money) == TRUE then
doPlayerAddItem(cid, config.item, config.count)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "you buy "..config.count.." "..getItemNameById(config.item)..".")
doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Not found.")
doSendMagicEffect(pos, CONST_ME_POFF)
end
end
end