Hi everyone! Look at this:
I have a little problem :/
I'm trying to do a spell which dmg will depends on a
variable which is reading from player's storage value.
For example player storage value numer 15100 is '15'
variable will look like this:
local dmg = getPlayerStorageValue(cid,15100)
min = -(dmg*10)
now min will be = -150.
Simple, but i can't use it in the spell's formula, why?
Anybody know how to do this?
I'm using 0.3.6 crying damson.
Code:
combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, min,-2.0,min)
arr1 = {
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat, area1)
function onCastSpell(cid, var)
local dmg = getPlayerStorageValue(cid,15100)
min = -(dmg)
return doCombat(cid, combat, var)
end
I have a little problem :/
I'm trying to do a spell which dmg will depends on a
variable which is reading from player's storage value.
For example player storage value numer 15100 is '15'
variable will look like this:
local dmg = getPlayerStorageValue(cid,15100)
min = -(dmg*10)
now min will be = -150.
Simple, but i can't use it in the spell's formula, why?
Anybody know how to do this?
I'm using 0.3.6 crying damson.