Hi
How can I to set script that arrows deal damage to a certain limit?
I mean that damage will increase with the level and skills but do not have to damage one another too much difference, for example: at 100 level 600-750hp and not as now from 7-1400hp. In short, so it was not such a large difference between the maximum and minimum injury. I think I described it well.
c arrow.lua
weapons.xml
items.xml
How can I to set script that arrows deal damage to a certain limit?
I mean that damage will increase with the level and skills but do not have to damage one another too much difference, for example: at 100 level 600-750hp and not as now from 7-1400hp. In short, so it was not such a large difference between the maximum and minimum injury. I think I described it well.
c arrow.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SHIVERARROW)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 7, 0, 1, 0)
local condition = createConditionObject(CONDITION_ENERGY)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 4, 1000, -200)
setCombatCondition(combat, condition)
local condition = createConditionObject(CONDITION_ENERGY)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 3, 1000, -125)
setCombatCondition(combat, condition)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
weapons.xml
Code:
<distance id="2352" level="8" range="8" enabled="1" exhaustion="0" hitchance="100" ammo="removecount" script="crystal.lua">
<vocation id="3"/>
<vocation id="7" showInDescription="0"/>
</distance>
items.xml
Code:
</item>
<item id="2352" article="a" name="crystal arrow" plural="crystal arrow">
<attribute key="weight" value="80"/>
<attribute key="slotType" value="ammo"/>
<attribute key="hitChance" value="100" />
<attribute key="attack" value="105" />
<attribute key="weaponType" value="ammunition"/>
<attribute key="ammoType" value="arrow"/>
<attribute key="shootType" value="arrow"/>
</item>
Last edited: