Cornwallis
Member
- Joined
- Jan 3, 2010
- Messages
- 480
- Reaction score
- 16
well i made this, which doesn't work ofc
but what it does is when you attack, it attacks like this; say your level 100, sword skill 50, and attack on your weapon is 2; it'll do 15*50=750*2=1500/10=150 minimum, and max; 20*50=1000*2=2000/10=200 soo, the it's min/max is 150/200 at level 100 if you have sword 50.
Edit; SORRY, 0.3.6pl1
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
function onGetFormulaValues(cid, level, skill, attack, factor)
return -(level * 0.15 * skill * attack / 10), -(level * 0.15 * skill * attack / 10)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Edit; SORRY, 0.3.6pl1
Last edited: