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

Action

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hi guys.
I ask you for any script!
If you click on box you can get backpack once on 1 hour!
Its possible to do ?
 
Hi guys.
I ask you for any script!
If you click on box you can get backpack once on 1 hour!
Its possible to do ?

Can you be more specific? If you mean a random box like a quest then here it is:

LUA:
local config = {
     boxaid = xxxx --The action id of the box
     item = xxxx --The item you will recieve
     delay = xxxx --The delay storage value
     hour = 60 * 60 * 1000 --Default: 1 hour
}
onUse(cid, item, fromPosition, toPosition)
     if item.actionid ~= config.boxaid then
          return true
     end
     
     if exhaustion.get(cid, config.delay) > 0 then
          exhaustion.set(cid, config.delay, config.hour)
          doPlayerSendCancel(cid, "You must wait 1 hour before recieving another backpack.")
          return true
     end

     doPlayerAddItem(cid, config.item)
     doPlayerSendCancel(cid, "You have recieved a backpack.")
     return true
end
 
Back
Top