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

Lua Decay AddItem and non player Exhaust

sestorme

Member
Joined
Dec 9, 2011
Messages
272
Reaction score
6
Location
Birmingham, UK
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

       		doRemoveItem(item.uid, 1)
		doPlayerAddItem(cid, 2051, 1)

return true

end
How do I decay item I just added?

And also, how could I set an exhaust on step-in action? Like certain tile summons a demon (got the script - just without cooldown) but have certain time before it will work again?
 
For the decay.

Lua:
local time = 60
function decay()
local thing=getThingfromPos(toPosition)
doTransformItem(thing.uid, 1000)

addEvent(decay,time*1000)
 
Edit: Think this one is more easy.

Lua:
local storage = 1000
local time = 100

if not exhaustion.check(cid, 100) then

exhaustion.set(cid, 100, time
 
Last edited:
Back
Top