jareczekjsp
Member
Hello Guys I have problem Because When I use Potion My arrow Stop shooting have Exhaust I wouldlike When I use potions All the time my arrow attack ,how I can to do?
Items.xml
<item id="2352" article="a" name="Crystal arrow" plural="crystal arrow">
<attribute key="weight" value="90" />
<attribute key="slotType" value="ammo" />
<attribute key="attack" value="200" />
<attribute key="hitChance" value="100" />
<attribute key="weaponType" value="ammunition" />
<attribute key="ammoType" value="arrow" />
weapons.xml
</distance>
<distance id="2352" range="7" enabled="1" hitchance="100" exhaustion="0" level="8" script="arrow.lua">
<vocation id="3"/>
<vocation id="7" showInDescription="0"/>
</distance>
Script.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 34)
local condition = createConditionObject(CONDITION_ENERGY)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 5, 1000, -100)
setCombatCondition(combat, condition)
function onGetFormulaValues(cid, level, skill, attack, factor)
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
return -(level * 1) - 100, -(level * 3) - 200
end
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Can somebody help me?please
Items.xml
<item id="2352" article="a" name="Crystal arrow" plural="crystal arrow">
<attribute key="weight" value="90" />
<attribute key="slotType" value="ammo" />
<attribute key="attack" value="200" />
<attribute key="hitChance" value="100" />
<attribute key="weaponType" value="ammunition" />
<attribute key="ammoType" value="arrow" />
weapons.xml
</distance>
<distance id="2352" range="7" enabled="1" hitchance="100" exhaustion="0" level="8" script="arrow.lua">
<vocation id="3"/>
<vocation id="7" showInDescription="0"/>
</distance>
Script.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 34)
local condition = createConditionObject(CONDITION_ENERGY)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 5, 1000, -100)
setCombatCondition(combat, condition)
function onGetFormulaValues(cid, level, skill, attack, factor)
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
return -(level * 1) - 100, -(level * 3) - 200
end
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Can somebody help me?please