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

Lua Question about spells formula and effect

Elwthz

Member
Joined
Jun 5, 2015
Messages
72
Reaction score
5
Hello,

First of all i need to understand the areas:

Code:
--Waves
AREA_WAVE3 = {
{1, 1, 1},
{1, 1, 1},
{0, 3, 0}
}

"1" means the sqm of the spell/damage, "3" means where it starts from (and maybe also means it's by the direction the player faces, but not sure about it)... So, what the "2" means?... There's more numbers with other purposes?

And if i want to make an effect like multiple "phases" of the spell? Like... The spell makes 3 hits in a line but sqm per sqm? in turns... like

(the numbers will be the turns of the attack/effect/spell)
0, 1, 0,
0, 2, 0,
0, 3, 0,

So when the spell is casted, appears a "flame" at sqm 1, then it dissapears and appears at the sqm 2, same with 3...
How can i achieve this?

and...

Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)

function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 1.4) + 8
local max = (level / 5) + (maglevel * 2.2) + 14
return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end

The formula, how this exactly multiplies and makes the damage?
This is what i understand:

local min = (level / 5) + (maglevel * 1.4) + 8
* (level /5) divides the level (lets say it's a lvl 100, so the total is 20)
* (maglevel *1.4) multiplies the ML (so if we have ML 10, the total is 14)
* + 8 (adds +8 "true damage" to the total)

So the min damage of the spells is 20+14+8 = 42 ?

Also,
Code:
function onGetFormulaValues(player, skill, attack, factor)
local min = (player:getLevel() / 5) + (skill * attack * 0.02) + 4
local max = (player:getLevel() / 5) + (skill * attack * 0.04) + 9
return -min, -max
end

For a physical spell, why this uses a different formula to get the level? "player:getLevel() / 5)"
and this.. same rules of the magic spell? "(skill * attack * 0.02)"
If Skill is 80, "attack" is the attack of the weapon and it is 35.... it should be 80*35*0.02 + 4, and total is 60, the min damage of the spell is 60?

I'm right? Or can please someone explain it?
This could save me lots of threads asking help for a spell and begin my way as "spell maker" here :D

Thanks for reading, i hope someone please take the time to explain if I'm right or what I'm wrong at :)
 
2 is mostly used for AoE spells

for example:

1,1,1
1,2,1
1,1,1

2 is the same as 0 the only thing that changes is that it defines where is the spell center like 3

so if you are going to use 2 that SQM wont take damage

if you are going to use 3 the SQM where you standing, if theres some1 stacked with you he will take damage

some1 correct me if I'm wrong :p
 
Back
Top