erikbs
Member
- Joined
- Jul 15, 2010
- Messages
- 40
- Reaction score
- 8
Hi there,
Iam having an issue with this script. The script works fine, but when i go full defence i do ALOT more dammage then when iam full attack.
Ive checked if the Shielding skill is higher then my Sword skill, but its not. Cant seem to figure out why this happens..
Anyone have any idea?
Here is the code:
Iam having an issue with this script. The script works fine, but when i go full defence i do ALOT more dammage then when iam full attack.
Ive checked if the Shielding skill is higher then my Sword skill, but its not. Cant seem to figure out why this happens..
Anyone have any idea?
Here is the code:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS)
function onGetFormulaValues(player, skill, attack, magicLevel, factor)
local min = (player:getLevel() * 3.4) + (skill * 4.0 + attack ) * (magicLevel * 0.6 ) + 23
local max = (player:getLevel() * 4.4) + (skill * 4.4 + attack ) * (magicLevel * 1.4 ) + 45
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
local area = createCombatArea(arr1)
setCombatArea(combat, area)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end