• 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!

TFS 1.X+ Diamond Arrow - Min Damage 200 TFS 1.3

damian00912

New Member
Joined
Sep 11, 2009
Messages
84
Reaction score
4
Hallo!

Sometimes it's ok when the hit is 500, sometimes 1800 from crit, but sometimes is 30, 40, 50 damage. Anyone able to change the min damage to 200+ in this script?

Thanks You!

Lua:
local area = createCombatArea({
     {0, 1, 1, 1, 0},
     {1, 1, 1, 1, 1},
     {1, 1, 3, 1, 1},
    {1, 1, 1, 1, 1},
    {0, 1, 1, 1, 0},
 })

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DIAMONDARROW)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setFormula(COMBAT_FORMULA_SKILL, 2, 0, 1, 0)
combat:setArea(area)

local diamondArrow = Weapon(WEAPON_AMMO)

function diamondArrow.onUseWeapon(player, variant)
    return combat:execute(player, variant)
end

diamondArrow:id(29057)
diamondArrow:id(40736)
diamondArrow:level(150)
diamondArrow:attack(58)
diamondArrow:action("removecount")
diamondArrow:ammoType("arrow")
diamondArrow:shootType(CONST_ANI_DIAMONDARROW)
diamondArrow:maxHitChance(100)
diamondArrow:wieldUnproperly(true)
diamondArrow:register()
 
Solution
remove this line: combat:setFormula(COMBAT_FORMULA_SKILL, 2, 0, 1, 0)

change it to:
Code:
function onGetFormulaValues(player, skill, attack, factor)
    local distanceSkill = player:getEffectiveSkillLevel(SKILL_DISTANCE)
    local min = 200
    local max = 200
    return -min, -max
end


combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local min = minimal damage by formuale
local max = max.
u can use this
Code:
local max = (player:getLevel() / 5) + ((((distanceSkill / 4) + 1) * (attack / 3)) * 0.7) instead of 200 and edit it by ur reference.
Joined
Feb 16, 2017
Messages
47
Solutions
2
Reaction score
6
remove this line: combat:setFormula(COMBAT_FORMULA_SKILL, 2, 0, 1, 0)

change it to:
Code:
function onGetFormulaValues(player, skill, attack, factor)
    local distanceSkill = player:getEffectiveSkillLevel(SKILL_DISTANCE)
    local min = 200
    local max = 200
    return -min, -max
end


combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

local min = minimal damage by formuale
local max = max.
u can use this
Code:
local max = (player:getLevel() / 5) + ((((distanceSkill / 4) + 1) * (attack / 3)) * 0.7) instead of 200 and edit it by ur reference.
 
Solution
Top