• 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!

Costum dist weapon

Maten

New Member
Joined
Mar 16, 2009
Messages
219
Reaction score
2
I whould like to make a new dist weapon so when pallys have slingshot thay shoot small stones?
script anyone?:rolleyes:
 
Try this, haven't tested:

create a file in - data/weapons/Scripts, name it slingshot:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_BLOCKHIT)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLSTONE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)

function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end
data/weapons/weapons.xml:
Code:
<distance id="xxxx" event="script" value="slingshot.lua"/>

That would work ;)
 
Last edited:
thnx it worked i just had to put this in items.xml to

Code:
<item id="5907" article="a" name="slingshot">
		<attribute key="weight" value="2200" />
		<attribute key="attack" value="110" />
		<attribute key="weaponType" value="distance" />
		<attribute key="shootType" value="smallstone" />
		<attribute key="range" value="7" />
		<attribute key="breakChance" value="0" />
		<attribute key="ammoAction" value="moveback" />
	</item>
 

Similar threads

Replies
3
Views
487
Back
Top