Lurk
Active Member
- Joined
- Dec 4, 2017
- Messages
- 336
- Reaction score
- 49
ok so I have this script
but I wanted that the hits that are in the 1 of the area to do less damage than the one in the center (3), any idea?
LUA:
local test = createCombatArea{
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 39)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 24)
setCombatArea(combat, test)
local extra = 0
function onGetFormulaValues(cid, level, skill, attack, factor)
if getPlayerStorageValue(cid, 378378) > 0 then -- dano extra com reset
extra = (getPlayerStorageValue(cid, 378378)*23000)
local skillTotal, levelTotal = skill, level / 5
return -(229000+(skillTotal * 0.65 + (levelTotal/3)+extra)), -(299000+(skillTotal * 1.1 + (levelTotal/3)+extra))
else
local skillTotal, levelTotal = skill, level / 5
return -(229000+(skillTotal * 0.65 + (levelTotal/3))), -(299000+(skillTotal * 1.1 + (levelTotal/3)))
end
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
but I wanted that the hits that are in the 1 of the area to do less damage than the one in the center (3), any idea?