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

Spell not dealing damage, not sure why.

leokart7

New Member
Joined
Mar 19, 2015
Messages
46
Reaction score
0
Can some help, i'm trying to do this super awesome spell, however, i can't make it deal damage.. This is the code:

Code:
local combat2_Brush_2 = createCombatObject()
setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatArea(combat2_Brush_2,createCombatArea({
{0, 0, 1, 0, 0, 0, 1, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{1, 1, 0, 1, 1, 1, 0, 1, 1},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 1, 0, 2, 0, 1, 0, 0},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{1, 1, 0, 1, 1, 1, 0, 1, 1},
{0, 1, 1, 1, 0, 1, 1, 1, 0},
{0, 0, 1, 0, 0, 0, 1, 0, 0}}))
function getFormulaValues(cid, level, skill, attack, factor)
    local skillTotal, levelTotal = skill + attack * 2, level / 5
    return -(skillTotal * 2.1 + levelTotal), -(skillTotal * 4 + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "getFormulaValues")
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
I think it may be your combat formula. I'm only well read on OTHire based scripts, but maybe you should replace your combat formula with something really simple just to test.

This probably won't work but you can try it!

Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.68, -0, -1.3, 0)
 
Back
Top