I finished it a second ago and wanted to share it with you guys, I made a throwing axe weapon with animation, distance fighting skill
1st go to your items.xml file, and add the following attributes to your weapon.
Then go to your weapons.xml file and add this in the list.
Once this done create a file in your weapons scripts file named "throwingaxe.lua"
Now open your throwingaxe.lua file and put the following script
Now you should have a throwing axe, distance skill weapon ready to go
1st go to your items.xml file, and add the following attributes to your weapon.
data\items>items.xmlPHP:<item id="8293" article="a" name="throwing axe" plural="throwing axes"> <attribute key="weight" value="3000"/> <attribute key="hitChance" value="98"/> <attribute key="attack" value="70"/> <attribute key="weaponType" value="axe"/> <attribute key="range" value="5"/> <attribute key="ammoAction" value="moveback"/>
Then go to your weapons.xml file and add this in the list.
data\weapons\>weapons.xmlPHP:<distance id="8293" script="throwingaxe.lua"/>
Once this done create a file in your weapons scripts file named "throwingaxe.lua"
Now open your throwingaxe.lua file and put the following script
data\weapons\scripts>throwingaxe.luaPHP:local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE) setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end
Now you should have a throwing axe, distance skill weapon ready to go