liqeen
Active Member
Hello, how could I add a cooldown for this script, for example 5secs.
I was trying with addEvent but can't do that.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 1263 then
local chance = math.random(0,3)
if chance < 1 then
Game.createMonster('Demon', Position(1810, 2404, 13))
elseif chance < 2 then
Game.createMonster('Fire Devil', Position(1809, 2402, 13))
elseif chance < 3 then
Game.createMonster('Orshabaal', Position(1809, 2402, 13))
end
end
return true
end