• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Throwing Axes

Exotis

New Member
Joined
May 8, 2009
Messages
52
Reaction score
0
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.

data\items>items.xml
PHP:
	<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.xml
PHP:
	<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.lua
PHP:
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 :)
 
Even thought it says "plurial" you never get them to plurial. I tried to edit them so you can stack em up and it caused debug, so it's A throwing axe which doesn't break.
 
Back
Top