still going random hiting 85 sometimes and sometimes over 1000For damage
And remove the poison condition.Code:setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
yes to attack.luaDid you changed it in weapons.xml?
yes and yes!Did you save it and restarted the server? Post the weapons.xml line of the weapon you are using.
<melee id="7405" level="20" unproperly="1" event="function" value="attack.lua">
<vocation id="4"/>
<vocation id="8" showInDescription="1"/>
</melee>
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
function onGetFormulaValues(cid, level, skill, attack, factor)
min = 0.04 * attack * skill + (level/5)
max = 0.06 * attack * skill + (level/5)
return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
fixed thanks you are the best! how do i add so it works for distance weapons?Change function to script.
okay can you give me the distance effectAdd a distance effect, so create different scripts for the distance weapons since they have different distance effects.
is this a good one?Add a distance effect, so create different scripts for the distance weapons since they have different distance effects.
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT)
function onGetFormulaValues(cid, level, skill, attack, factor)
min = 0.04 * attack * skill + (level/5)
max = 0.06 * attack * skill + (level/5)
return -min, -max
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BURSTARROW)
thank you so much againExample for burst arrow
Code:setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BURSTARROW)
Other distance effects.
http://otland.net/threads/animation-effects-10-41-combat_param_distanceeffect.221740/