Is there any possibility to make a summon die after some time (5 min or so)?
script:
rep + for helping
script:
Code:
function onCastSpell(cid, var)
local playerpos = getPlayerPosition(cid)
local health = getCreatureHealth(cid)
local maxhealth = getCreatureMaxHealth(cid)
local MaximoSummon = 2
local summons = getCreatureSummons(cid)
if(table.maxn(summons) < MaximoSummon) then
local clone = doSummonCreature("Monster", getCreaturePosition(cid))
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
registerCreatureEvent(clone, "DieClone")
local clone2 = doSummonCreature("Monster", getCreaturePosition(cid))
doConvinceCreature(cid, clone2)
setCreatureMaxHealth(clone2, maxhealth)
doCreatureAddHealth(clone2, health)
registerCreatureEvent(clone2, "DieClone")
return TRUE
end
end
rep + for helping
Last edited: