Seguinte, estou fazendo um script em que, ao matar um monstro, em uma certa area, depois de um tempo nascerá outro novamente. O Script sem timing (ao matar, ja nasce outro) funciona perfeitamente, mas ao adicionar um timing, não funciona. Alguem consegue me ajudar?
Code:
function onKill(cid, target, lastHit)
local monstro = getPlayerStorageValue(cid, storage)
local Mpos = getThingPos(target)
print("morreu")
exhaustion.set(cid, 9999, 10)
if(isMonster(target) and isInArray(monstros, getCreatureName(target):lower()) and not block[target] and isInArea(Mpos, posi, posf)) then
print("Passou do If")
if exhaustion.get(cid, 9999) == false then
block[target] = true
doSummonCreature(monstro, getThingPos(target))
end
end
return true
end