• 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!

items respawn in a box every 30 min

If you tried to make then you could show us your script you need fix with.
 
Edit:
This should work on 0.3/0.4.

Try to study the code and comments to learn how to do more similar stuff in the future by yourself. Cheers.

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local num = 30153 -- Enter some number here that is not used anywhere else as a storage value key
local cooldown = 60*30 -- Enter the cooldown for the box in seconds
local reward = 2160 -- Enter the reward ID here


        if not(exhaustion.check(cid,num)) then -- If it's not on cooldown
            exhaustion.set(cid, num, cooldown) -- Sets the cooldown to desired time
            doPlayerAddItem(cid, reward, 1) -- Adds 1x of the reward
            doCreatureSay(cid, "Found a reward!", TALKTYPE_MONSTER) -- Some text to display when box is used
        else -- If the box is on cooldown
            doPlayerSendCancel(cid, "You need to wait "..exhaustion.get(cid, num).." seconds before you can use the box again.") -- Send an error message to the player
            doSendMagicEffect(getThingPos(cid), 2) -- Send the poff effect
        end


    return true
end
 
Back
Top