• 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+ Spell regeneration use all vocation. why ?

Michcol94

Member
Joined
Sep 2, 2021
Messages
105
Reaction score
18
Lua:
<instant group="attack" name="Regeneration" words="regeneration" level="2" mana="50" manapercent="0" soul="0" premium="0" needtarget="0" casterTargetOrDirection="0" blockwalls="0" cooldown="2000" groupcooldown="2000" needlearn="0" script="attack/regeneration.lua">
    <vocations>
        <vocation name="Goku"/>
        <vocation name="Goku 2"/>
        <vocation name="Goku 3" />
        <vocation name="Goku 4" />
        <vocation name="Goku 5" />
        <vocation name="Goku 6" />
         </vocations>
</instant>
spell
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

function onGetFormulaValues(player, level, maglevel)
    local heal = player:getMaxHealth() * 0.2 -- 20% of max HP
    return heal, heal
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant)
    return combat:execute(creature, variant)
end
why use spell vocation name = "Majin" ???
 
So that the vocation Majin could use the skill?

I don't understand the question I guess..
 
So that the vocation Majin could use the skill?

I don't understand the question I guess..
I noticed that my spells were also affected. I put each spell with the correct vocation, but all vocations manage to use them normally. I changed it to the vocation ID, for example, I put ID 8 for the Elite Kiginth vocation in the 'exori tera' spell, but druids, sorcerers and paladins can use this spell normally. I also tried changing it to the name of the vocation, but it didn't help at all
 
You need to check in the vocations.xml file that the vocation name is correct or the vocation ID is correct. For example, I will explain here.
Lua:
<instant name="name spells" words="Regeneration" needlearn="0" lvl="11" prem="1" mana="20" direction="1" exhaustion="1000" script="attack/regeneration.lua">
        <vocation name="Goku"/>
        <vocation name="Goku ssj"/>
        <vocation name="Goku ss3"/>   
        <vocation name="Goku ss4"/>
    </instant>

You need to check the vocations.xml file according to the spells... it can be by name or vocation ID
Lua:
<instant name="name spells" words="Regeneration" needlearn="0" lvl="11" prem="1" mana="20" direction="1" exhaustion="1000" script="attack/regeneration.lua">
        <vocation name="1"/>
        <vocation name="5"/>
        <vocation name="8"/>   
        <vocation name="12"/>
    </instant>

For example, the number 1 corresponds to the ID 'goku', the number 5 corresponds to 'goku ssj' and the number 8 corresponds to 'goku ssj3', and so on
 
Lua:
    <vocation id="1" clientid="1" name="Goku" description="goku" gaincap="10" gainhp="25" gainmana="25" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120"  fromvoc="1">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
        <skill id="0" multiplier="1.1" />
        <skill id="1" multiplier="1.1" />
        <skill id="2" multiplier="1.1" />
        <skill id="3" multiplier="1.1" />
        <skill id="4" multiplier="1.4" />
        <skill id="5" multiplier="1.1" />
        <skill id="6" multiplier="1.1" />
    </vocation>
    <vocation id="2" clientid="0" name="Goku 2" description="goku 2" gaincap="10" gainhp="25" gainmana="25" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120"  fromvoc="1">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
        <skill id="0" multiplier="1.5" />
        <skill id="1" multiplier="2.0" />
        <skill id="2" multiplier="2.0" />
        <skill id="3" multiplier="2.0" />
        <skill id="4" multiplier="2.0" />
        <skill id="5" multiplier="1.5" />
        <skill id="6" multiplier="1.1" />
    </vocation>
    <vocation id="3" clientid="0" name="Goku 3" description="goku 3" gaincap="10" gainhp="25" gainmana="25" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120"  fromvoc="2">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
        <skill id="0" multiplier="1.5" />
        <skill id="1" multiplier="2.0" />
        <skill id="2" multiplier="2.0" />
        <skill id="3" multiplier="2.0" />
        <skill id="4" multiplier="2.0" />
        <skill id="5" multiplier="1.5" />
        <skill id="6" multiplier="1.1" />
    </vocation>
<vocation id="4" clientid="0" name="Goku 4" description="Goku 4" gaincap="10" gainhp="25" gainmana="25" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120" fromvoc="3">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
<skill id="0" mnożnik = "1.5" />
<skill id="1" mnożnik = "2.0" />
<skill id="2" mnożnik = "2.0" />
<skill id="3" mnożnik = "2.0" />
<skill id="4" mnożnik = "2.0" />
<skill id="5" mnożnik = "1.5" />
<skill id="6" mnożnik = "1.1" />
</powołanie>
<vocation id="5" clientid="0" name="Goku 5" description="Goku 5" gaincap="10" gainhp="25" gainmana="25" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120" fromvoc="4">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
<skill id="0" mnożnik = "1.5" />
<skill id="1" mnożnik = "2.0" />
<skill id="2" mnożnik = "2.0" />
<skill id="3" mnożnik = "2.0" />
<skill id="4" mnożnik = "2.0" />
<skill id="5" mnożnik = "1.5" />
<skill id="6" mnożnik = "1.1" />
</powołanie>
<vocation id="6" clientid="0" name="Goku 6" description="Goku 6" gaincap="10" gainhp="25" gainmana="25" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" basespeed="220" soulmax="100" gainsoulticks="120" fromvoc="5">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" />
<skill id="0" mnożnik = "1.5" />
<skill id="1" mnożnik = "2.0" />
<skill id="2" mnożnik = "2.0" />
<skill id="3" mnożnik = "2.0" />
<skill id="4" mnożnik = "2.0" />
<skill id="5" mnożnik = "1.5" />
<skill id="6" mnożnik = "1.1" />
</powołanie>
Post automatically merged:

For example, the spell genki lady uses only the Goku race but the spell regeneration is used by all races, which is not understandable to me
Code:
<instant group="attack" name="Genki Dama" words="genki dama" level="2" mana="2" premium="0" range="5" needtarget="1" blockwalls="1" needweapon="0"  needlearn="0" cooldown="1000" script="attack/genki dama.lua">
        <vocation name="Goku" />
        <vocation name="Goku 2" />
        <vocation name="Goku 3" />
        <vocation name="Goku 4" />
        <vocation name="Goku 5" />
        <vocation name="Goku 6" />
    </instant>
 
what is your TFS VERSION?
Lua:
<instant group="attack" name="Regeneration" words="regeneration" level="2" mana="50" manapercent="0" soul="0" premium="0" needtarget="0" casterTargetOrDirection="0" blockwalls="0" cooldown="2000" groupcooldown="2000" needlearn="0" script="attack/regeneration.lua">
    <vocations>
        <vocation name="1"/>
        <vocation name="2"/>
        <vocation name="3"/>
        <vocation name="4"/>
        <vocation name="5"/>
        <vocation name="6"/>
         </vocations>
</instant>

SEE HOW EACH VOCATION ID "1" IS GOKU, 2 " is goku 2 so on
 
Back
Top