nefinoo
Carnage.flv
Someone could help me with a script so that when a monster is killed, it immediately adds another, as if it were about reviving the same monster but now with more life or with a different looktype. I am using tfs 1.3
function onKill(player, target)
local hp = 5000
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
bossName = targetMonster:getName():lower() == 'BOSSNAME HERE'
if not bossName then
return true
end
Game.createMonster(bossName, targetMonster:getPosition(), false, true)
bossName:setMaxHealth(hp)
bossName:addHealth(hp - monster:getHealth())
bossName:setOutfit(Outfitnumberhere)
return true
end
local creatureevent = CreatureEvent("xxx") -- *1
function creatureevent.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
Game.createMonster("MonsterName", creature:getPosition(), false, true)
return true
end
creatureevent:register()
local mType = MonsterType("MonsterName") -- name of the monster which dies in this case to summon the next.
mType:registerEvent("xxx") -- xxx has to be the same as you put into *1