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

TFS 1.X+ Trainers

Kthxbye

New Member
Joined
Jul 11, 2012
Messages
122
Reaction score
2
How can I make trainer mass heal, I have players online that are dying from them
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Trainer" nameDescription="a training monk" race="blood" experience="0" speed="0" manacost="0">
<health now="99000" max="99000"/>
<look type="57" corpse="3128"/>
<targetchange interval="20000" chance="10"/>
<strategy attack="20" defense="5"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag staticattack="30"/>
<flag lightlevel="0"/>
<flag lightcolor="0"/>
<flag targetdistance="1"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="800" min="0" max="-1"/>
</attacks>
<defenses armor="5" defense="10">
<defense name="healing" interval="10000" chance="100" min="24000" max="24000"/>
</defenses>
<immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity poison="0"/>
<immunity lifedrain="0"/>
<immunity paralyze="0"/>
<immunity outfit="0"/>
<immunity drunk="0"/>
<immunity invisible="1"/>
</immunities>
</monster>
 
Why not create a healing tile and register it as a globalevent every x seconds? That's what I did on my server. I can post a script later if you'd like
 
I think the best thing would be not to make the trainer hurt: /
Using something like:
Lua:
<attack name="melee" interval="2000" skill="0" attack="-1"/>

But if you want a spell, you can try using it (not tested):

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)

arr = {
    {0, 0, 1, 1, 1, 0, 0},
    {0, 1, 1, 1, 1, 1, 0},
    {1, 1, 1, 1, 1, 1, 1},
    {1, 1, 1, 3, 1, 1, 1},
    {1, 1, 1, 1, 1, 1, 1},
    {0, 1, 1, 1, 1, 1, 0},
    {0, 0, 1, 1, 1, 0, 0}
}

local area = createCombatArea(arr)
combat:setArea(area)

function onTargetCreature(creature, target)
    doTargetCombatHealth(0, target, COMBAT_HEALING, 15000, 15000, CONST_ME_NONE)
    return true
end

combat:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")

function onCastSpell(creature, var)
    return combat:execute(creature, var)
end
 
Back
Top