marcinek99097
Banned User
Witam , mam problem z exura vita , nie działa dla sorcera , gdy wpisuje czar nic się niedzieje nawet napis się nie pojawia , a na konsoli wyskakuje błąd :
Prosił bym kogoś o poprawienie bądź cały skrypt , silnik to tfs 0.3.6
a o to skrypt :
oraz spells.xml
[06/10/2010 22:09:08] [Error - Spell Interface]
[06/10/2010 22:09:08] data/spells/scripts/healing/ultimate healing.luanCastSpell
[06/10/2010 22:09:08] Description:
[06/10/2010 22:09:08] data/spells/scripts/healing/ultimate healing.lua:52: attempt to call global 'doCombatK' (a nil value)
[06/10/2010 22:09:08] stack traceback:
[06/10/2010 22:09:08] data/spells/scripts/healing/ultimate healing.lua:52: in function <data/spells/scripts/healing/ultimate healing.lua:49>
Prosił bym kogoś o poprawienie bądź cały skrypt , silnik to tfs 0.3.6
a o to skrypt :
--Calculed by ta4e--
--For tibia 8.5--
--Made in 11/10/09--
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function getCombatFormulas(cid, lv, maglv)
local formula_min = ((lv*0.25 + maglv*3) * 3.8)
local formula_max = ((lv*0.25 + maglv*3) * 4.2)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
local combatK = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function getCombatFormulas(cid, lv, maglv)
local formula_min = ((lv*0.25 + maglv*3) * 3.8)
local formula_max = ((lv*0.25 + maglv*3) * 4.2)
if(formula_max < formula_min) then
local tmp = formula_max
formula_max = formula_min
formula_min = tmp
end
return formula_min, formula_max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")
function onCastSpell(cid, var)
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 4 then
return doCombatK(cid, combat, var)
else
return doCombat(cid, combat, var)
end
end
oraz spells.xml
<instant name="Ultimate Healing" words="exura vita" lvl="20" mana="160" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="healing/ultimate healing.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
</instant>