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

Windows ERROR IN SPELLS

JonatasLucas

New Member
Joined
Jun 12, 2013
Messages
116
Reaction score
3
6ec2eaea097f9b9c164937bb3da9498b400669ec.png

You are with this error does anyone know o'que can be?

use tfs 1.1 version: 10.76
 
Limos, the more I want to use this as already have my spells this error began when I put this new spells

Code:
<instant group="healing" name="sangue" words="sangue escuro!" lvl="36" mana="150" prem="0" aggressive="0" exhaustion="1200" groups="2,1000" icon="82" needlearn="0" event="script" value="healing/sangue.lua">

        <vocation id="11"/>

        <vocation id="12"/>

    </instant>

sangue.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
min = (level * 2 + maglevel * 1) * 1.4
max = (level * 1 + maglevel * 2) * 1.8
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 
Try to add it like this.
Code:
<instant group="healing" name="sangue" words="sangue escuro" lvl="36" mana="150" prem="0" aggressive="0" exhaustion="1200" groups="2,1000" icon="82" needlearn="0" event="script" value="healing/sangue.lua">
<vocation id="11"/>
<vocation id="12"/>

</instant>
 
Limos, the more I want to use this as already have my spells this error began when I put this new spells

Code:
<instant group="healing" name="sangue" words="sangue escuro!" lvl="36" mana="150" prem="0" aggressive="0" exhaustion="1200" groups="2,1000" icon="82" needlearn="0" event="script" value="healing/sangue.lua">

        <vocation id="11"/>

        <vocation id="12"/>

    </instant>

sangue.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
min = (level * 2 + maglevel * 1) * 1.4
max = (level * 1 + maglevel * 2) * 1.8
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
If you add new spells, do not use xml lines from older/other server versions. In spells.cpp you can see what you can use.
You can also ofc just use an other spell in spells.xml as example.
Code:
<instant group="healing" spellid="82" name="Sangue" words="sangue escuro!" lvl="36" mana="150" prem="0" aggressive="0" exhaustion="1200" groupcooldown="2000" needlearn="0" script="healing/sangue.lua">
     <vocation name="Add voc name here"/>
     <vocation name="Add voc name here"/>
</instant>
 
If you add new spells, do not use xml lines from older/other server versions. In spells.cpp you can see what you can use.
You can also ofc just use an other spell in spells.xml as example.
Code:
<instant group="healing" spellid="82" name="Sangue" words="sangue escuro!" lvl="36" mana="150" prem="0" aggressive="0" exhaustion="1200" groupcooldown="2000" needlearn="0" script="healing/sangue.lua">
     <vocation name="Add voc name here"/>
     <vocation name="Add voc name here"/>
</instant>
Limos, what is the difference between "exhaustion" and "groupcooldown"?
 
exhaustion is only for the spell with that id, so usually only for 1 spell (time you have to wait to do the same spell again), groupcooldown is the exhaustion for all spells in the same group.
 
Back
Top