• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Issue with weapon script

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:

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
 
probably inside source there is changes / formula / condition about increasing damage by % or flat value if you are on full attack stance, pretty sure its not about only this combat
 
Back
Top