• 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!

Lua Summon with same life as the caster TFS 1.3

Icaraii

Well-Known Member
Joined
Jan 5, 2020
Messages
469
Solutions
1
Reaction score
58
Hey guys,

I would like a spell, where the summon get the same life as the caster and if it's possible, when the caster lose health, the summon loses same amount of health, when player heals or get healed the summon get the same amount of heal. Summon last for 30 seconds.
 
Solution
untested. make the spell self-cast
Lua:
function onCastSpell(creature, variant)
    local summon = Game.createMonster("green djinn", creature:getPosition())
    if summon then
        summon:setMaster(creature)
        local healthAmount = creature:getMaxHealth()
        summon:setMaxHealth(healthAmount)
        summon:setHealth(healthAmount)
        return true
    end
    return false
end
Back
Top