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

Monster Spell damage formula

Swiff

Member
Joined
Apr 6, 2009
Messages
366
Reaction score
12
Location
Sweden
Hello! I've been trying from time to time to create a monster spell with more than 1 animation. Such spells I created with Minrage's spellmaker and most recently with SpellCreator by TGYoshi.

My problem is the same everytime, the spell wil lnot do any damage, or it will do damage on all animations/phases.

What I want is to know what to put in these lines for example:
Code:
local combat9_holycircle = createCombatObject()
setCombatParam(combat9_holycircle, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat9_holycircle, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatParam(combat9_holycircle, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) 
?? <----
setCombatArea(combat9_holycircle,createCombatArea({{0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}}))
function getDmg_holycircle(cid, level, maglevel)
    return (1000)*-1,(2000)*-1
end
setCombatCallback(combat9_holycircle, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_holycircle")<--
local dfcombat9_holycircle = {CONST_ANI_SMALLHOLY,1,-5,5,1,-1,5,-5,-1}<--

Or:
Code:
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0)<--

If I set the damage in the xmonster.xml like this:
Code:
<attack name="smokar" interval="2000" chance="20" min="-20000" max="-25000"/>
It will do damage on ALL the animations, and not 20.25k, but spread out on all animations or something.

I need to get some help on what code I can use here.. All I am trying is no good :/

Using TFS 0.3.6.pl1
 
Last edited:
Replace
Code:
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0)

with
Code:
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 5, 10)
By adjusting the numbers the damage will be different. Experiment how you want the damage to be.

This mine from Wrath of Nature

But im not sure it will help. You give it a try
 
I think you missed the point. I have tried different things, if I do as you say, it will do damage on all phases, even though there's only aformula for the last one. It even randomizes the damage so that some pahses won't do damage and some will.

My point is that by trying these different settings, I only get these results:
1. no dmg
2. dmg on all phases
3. damage on random phases.

I need to understand how I cnan make only the last animation to do damage when you have
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
--=======================================================================
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 3)
--=======================================================================
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, 3)
--=======================================================================
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, 3)
--=======================================================================
local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, 3)

These animations only for show.

Like, is there some secret formula or something?
 
As I said, if i do like this (this is the last animation that should do no dmg, and the final animation that should be the only that does damage)
Code:
--=======================================================================
local combat9 = createCombatObject() 
setCombatParam(combat9, COMBAT_PARAM_TYPE, 8)
setCombatParam(combat9, COMBAT_PARAM_EFFECT, 6)
setCombatParam(combat9, COMBAT_PARAM_DISTANCEEFFECT, 3)
--=======================================================================
local combat10 = createCombatObject() 
setCombatParam(combat10, COMBAT_PARAM_TYPE, 2048)
setCombatParam(combat10, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat10, COMBAT_PARAM_DISTANCEEFFECT, 255)
setAttackFormula(combat10, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 5, 10)
--=======================================================================

What this will do is result number 3
 
Back
Top