Nightimarez
New Member
- Joined
- Jul 24, 2008
- Messages
- 287
- Reaction score
- 2
I'm trying to make a distance weapon script but I just can't seem to get it to hit depending on the paladins distance.
Paladins can't shoot and use potions at the same time, so they need to be scripted like wands.
Paladins can't shoot and use potions at the same time, so they need to be scripted like wands.
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 5)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, -0.2, 0, -0.4, 0)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
PHP:
<item id="8857" article="a" name="silkweaver bow">
<attribute key="weight" value="2200" />
<attribute key="attack" value="1500" />
<attribute key="weaponType" value="distance" />
<attribute key="shootType" value="poisonarrow" />
<attribute key="range" value="8" />
</item>