• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Spell Formulas!

D3mon

New Member
Joined
Mar 26, 2011
Messages
28
Reaction score
0
Just need some help, I want to now how this formula works

setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.4, 2.8, 40, 70)

Like the numbers what are there values, how do you no which is what to change if you want to increase or decrease the damage thanks ill give REP++ :P
 
use search...
Guide officially written from scratch by Teclis@OTfans also known as Strikers@OTland at September 01, 2009 at 5:20PM~5:40PM GMT-05:00 (New York Time)


Hello, this is my first official tutorial, and here I am going to explain about the spell formulas and how to change them correctly.

Now let's start.

Story:
You are creating a spell and when you check on your lua *BOOM* you see the following:
Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, -900, -3.2, -1100)
Or
Code:
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1.0, -900, 3.2, -1100)

And you have no idea what the hell are those numbers.

Well I am going to explain.

Code:
1.0, -900, 3.2, -1100)

The first number is the multiplier of your skill (If it's set to COMBAT_FORMULAT_LEVELMAGIC, then it will be based of magic level, if set to SKILL then your main melee skill will take over the others)

The second number is the minimum damage (If you want to make a healing spell, remove the - (negative) symbol of the second and fourth numbers)

The third number is the multiplier of your character level.

The fourth number is the maximum damage (Read the parenthesis of the second set of number)

Now, there is a difference between SKILL and LEVELMAGIC formulas.

If you want them to deal damage and not heal each one has a different setup.

Code:
COMBAT_FORMULA_SKILL, 1.0, -100, 1.0, -200)
Will deal damage

Code:
COMBAT_FORMULA_SKILL, -1.0, -100, -1.0, -200)
WILL HEAL THE ENEMY IF YOU ARE HIGH LEVEL OR HAVE A HIGH SKILL LEVEL

Code:
COMBAT_FORMULA_SKILL, -1.0, 100, -1.0, 200)
Will heal the enemy

Code:
COMBAT_FORMULA_LEVELMAGIC, 1.0, -100, 1.0, -200)
WILL HEAL THE ENEMY IF YOU ARE HIGH LEVEL OR HAVE A HIGH MAGIC LEVEL
Note: Will deal damage if you are low level and have a low magic level since minimum and maximum damage are negative

Code:
COMBAT_FORMULA_LEVELMAGIC, -1.0, -100, -1.0, -200)
Will completely deal damage to the enemy

Code:
COMBAT_FORMULA_LEVELMAGIC, 1.0, 100, 1.0, 200)
Will heal the enemy.


So yeah, I think you get it how SKILL and LEVELMAGIC works now.

Now let's make some calculations on how the multipliers add up to the minimum and maximum damage.

Suppose you have this:
Code:
COMBAT_FORMULA_LEVELMAGIC, -1.0, -100, -1.0, -200)

And you are a level 100 character with 100 Magic level

first off at level 0 you would deal 100~200 damage.
Now at level 100 with 100 Magic level you would add up the first and third value (100+100) which is 200, and then add it up to both minimum and maximum damage

Which will be 300~400 damage at level 100 with 100 magic level.

So always sum up the first and third value, and them add it to both minimum and maximum values (The second and fourth).


I hope this guide help you guys make balanced spells =].
 

Similar threads

Back
Top