TFS 0.3.6 and 0.4
################################
I wrote it ~month ago to explain my friend how to make spells
You can use 4 or more parameters.
Param order:
setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]])
How TFS calculate it:
and then server check if value is in min - max damage, if not it return min or max value.
About formula:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
1. minimum multipier
2. minimum add value (after multiple)
3. max. multipier
4. max. add value (after multiple)
5. min. level multipier
6. max. level multipier
7. min. mag level multipier
8. max. mag level multipier
9. minimum damage
10. maximum damage
BASED ON 0.3.6 AND 0.4 luascript.cpp and combat.cpp
################################
I wrote it ~month ago to explain my friend how to make spells
You can use 4 or more parameters.
Param order:
setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]])
How TFS calculate it:
PHP:
min = (playerLevel / minl + playerMagicLevel * minm) * 1. * mina + minb
max = (playerLevel / maxl + playerMagicLevel * maxm) * 1. * maxa + maxb
About formula:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
1. minimum multipier
2. minimum add value (after multiple)
3. max. multipier
4. max. add value (after multiple)
5. min. level multipier
6. max. level multipier
7. min. mag level multipier
8. max. mag level multipier
9. minimum damage
10. maximum damage
BASED ON 0.3.6 AND 0.4 luascript.cpp and combat.cpp