local timeToUse = 300
local monsters = {
{name = "Rat", pos = {x = 111, y = 111, z = 7}},
{name = "Troll", pos = {x = 112, y = 112, z = 7}},
{name = "Demon", pos = {x = 113, y = 113, z = 7}}
}
local lastTime = 0 -- Ignore this
function onUse(cid, item, position, itemEx, toPosition)
local osTime = os.time()
if(lastTime <= osTime) then
for _, mob in ipairs(monsters) do
Game.createMonster(mob.name, mob.pos)
end
lastTime = osTime + timeToUse
end
return true
end
local name = "Fury of the Emperor"
local timeToUse = 1200
local pos = {x = 33055, y = 31116, z = 15}
local lastTime = 0 -- Ignore this
function onUse(cid, item, position, itemEx, toPosition)
local osTime = os.time()
if(lastTime <= osTime) then
addEvent(furyoftheemperor,1200*1000)
doSummonCreature(name, pos)
lastTime = osTime + timeToUse
else
doPlayerSendTextMessage(cid,22,"You")
end
return true
end
function furyoftheemperor()
for _, monster in ipairs{(name)} do
doRemoveCreature(getCreatureByName(monster))
return true
end
end