Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
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
Solution
E
Evil Puncker
or just use this as example and create a new monster for it to summon:
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
Just place all of this into a lua file into data/monster/
Lua:
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