Hello,
As the tittle says, i'd like to change the poison arrow script, to make the arrow poison the target only by certain chance, like 10% chance to poison the target instead of poison the target each hit...
Here's the TFS 1.x "poison_arrow.lua" from data>weapons>scripts
Can please someone help me with this quick edition?
Thanks
As the tittle says, i'd like to change the poison arrow script, to make the arrow poison the target only by certain chance, like 10% chance to poison the target instead of poison the target each hit...
Here's the TFS 1.x "poison_arrow.lua" from data>weapons>scripts
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_POISONARROW)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local condition = Condition(CONDITION_POISON)
condition:setParameter(CONDITION_PARAM_DELAYED, true)
condition:addDamage(4, 4000, -3)
condition:addDamage(9, 4000, -2)
condition:addDamage(20, 4000, -1)
combat:setCondition(condition)
function onUseWeapon(player, variant)
return combat:execute(player, variant)
end
Can please someone help me with this quick edition?
Thanks