• 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 Ethereal spear spell

Hanoger

Member
Joined
Mar 7, 2011
Messages
247
Reaction score
6
Hello, got problem with spell, don't know why it don't work... TFS 0.2.11pl2
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)
function onGetFormulaValues(cid, skill, level)
	local min =  ((skill * 0.7) + (level / 5))
	local max =  ((skill * 0.7) + (level / 5)) +5
	return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Here is example of my annihilation spell that work without problem
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
function onGetFormulaValues(cid, skill, attack, level)
	local min =  (((skill * attack) * 0.1606) + (level / 5)) /2 + 1
	local max =  (((skill * attack) * 0.1606) + (level / 5)) +1
	return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
check spells.xml

Code:
<instant name="Ethereal Spear" words="exori con" lvl="23" mana="25" prem="0" range="5" needtarget="1" exhaustion="2000" blockwalls="1" needlearn="0" event="script" value="attack/ethereal spear.lua">
 
try this one

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)

function onGetFormulaValues(cid, level, skill, attack, factor)
	local min =  ((level * 3.4 + skill * 1.2) * 1.4 + 220) / 4
	local max = ((level * 3.4 + skill * 1.3) * 1.4 + 240) / 3
	return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

rep if it helps
 
try this one

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)

function onGetFormulaValues(cid, level, skill, attack, factor)
	local min =  ((level * 3.4 + skill * 1.2) * 1.4 + 220) / 4
	local max = ((level * 3.4 + skill * 1.3) * 1.4 + 240) / 3
	return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

rep if it helps

When I will test it, then I will rep you, don't write to me!
I remade my strong ethereal spear spell with the formula I had before and it works, don't know why it wasn't working..

So, Solved, please lock.
 
Mr
Facebook-Like-Button-big.jpg
was here giving out free likes!
don't spam please.
annoying fuck
 
Back
Top