Hello ,
I'm currently working on a script for my server and I would like to make it scale with damage. Specifically, I want the script to deal more damage as the player's stats skills increase. However, I'm not sure how to implement this.
Currently, my script looks like this:
As you can see the script uses the COMBAT_FORMULA_SKILL formula with a fixed base damage of -1900. However, I would like to implement a scaling mechanism that adjusts the damage output based on the player's skill stats. The idea is to make the formula more dynamic so that it deals more damage as the player's stats skills increase.
For instance, if the player has 20 magic levels, it should increase the damage output accordingly. Similarly, if the player has 50 distance fighting skills, it should also raise the damage output.
Can anyone suggest how I can achieve this? Any help or suggestions would be greatly appreciated.
I'm currently working on a script for my server and I would like to make it scale with damage. Specifically, I want the script to deal more damage as the player's stats skills increase. However, I'm not sure how to implement this.
Currently, my script looks like this:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -1900, 0, -1900)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
For instance, if the player has 20 magic levels, it should increase the damage output accordingly. Similarly, if the player has 50 distance fighting skills, it should also raise the damage output.
Can anyone suggest how I can achieve this? Any help or suggestions would be greatly appreciated.
Last edited: