function onUse(cid, item, fromPosition, itemEx, toPosition)
local z = {
x = 100098,
y = 2 * 60 * 60 * 24,
items = {
[1] = {2160, 3},
[2] = {2192, 1}
}
}
if(exhaustion.check(cid, z.x) == false) then
exhaustion.set(cid, z.x, z.y)
for i = 1, #z.items do
doPlayerAddItem(cid, z.items[i][1], z.items[i][2])
end
else
doPlayerSendCancel(cid, "You are exhausted in ".. exhaustion.get(cid, z.x) .." seconds.")
end
return true
end
local wait = 60 * 60 * 48 -- 48 hours
local storage = 1452 -- The storage id of the chest
local item = 100 -- The item in the chest
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(exhaustion.check(cid, storage) == false) then
exhaustion.set(cid, storage, wait)
doPlayerAddItem(cid, item)
else
if((exhaustion.get(cid, storage)/60) > 1)
doPlayerSendCancel(cid, "You may not loot this chest for another ".. exhaustion.get(cid, storage) / 60 .." minute(s).")
else
doPlayerSendCancel(cid, "You may not loot this chest for another ".. exhaustion.get(cid, storage) .." second(s).")
end
end
return true
end
Lua:local wait = 60 * 60 * 48 -- 48 hours local storage = 1452 -- The storage id of the chest local item = 100 -- The item in the chest function onUse(cid, item, fromPosition, itemEx, toPosition) if(exhaustion.check(cid, storage) == false) then exhaustion.set(cid, storage, wait) doPlayerAddItem(cid, item) else if((exhaustion.get(cid, storage)/60) > 1) doPlayerSendCancel(cid, "You may not loot this chest for another ".. exhaustion.get(cid, storage) / 60 .." minute(s).") else doPlayerSendCancel(cid, "You may not loot this chest for another ".. exhaustion.get(cid, storage) .." second(s).") end end return true end
Lol, why you post it again with a lower priority script?
Oh, well, I guess I need to start learning about those little stuff that dwell at the bottom of LUA_FUNCTIONS.
That's exactly what he requested.
Didn't you see my script?
My script had more configurations...