ojczulek
Advanced User
- Joined
- Sep 23, 2008
- Messages
- 284
- Reaction score
- 9
oby dwa itemy ko?cz? si? po 1 u?yciu, czy umia?by kto? napisa? skrypta by si? ko?czy?y po 3 u?yciach?
A o to co ja mamw items.xml:::
weapons.xml::
wepaons crystal arrow.lua :
Mam TFS 0.3.5, bardzo prosi?bym o pomoc, zrobi?em skrypty ze sprzedaje crystal arrow i ice rapier w bp, teraz bardzo potrzebuje tego. To jednak przerasta moje umiej?tno?ci i prosz? o pomoc, na necie nei ma czego? takiego.
A o to co ja mamw items.xml:::
Code:
<item id="2396" article="an" name="ice rapier">
<attribute key="description" value="Ice Rapier ma 3 uzycia, jest najlepsza bronia jednoreczna."/>
<attribute key="weight" value="1500"/>
<attribute key="attack" value="115"/>
<attribute key="defense" value="1"/>
<attribute key="weaponType" value="sword"/>
<attribute key="charges" value="3"/>
</item>
Code:
<item id="2352" article="a" name="crystal arrow" plural="crystal arrow">
<attribute key="description" value="This arrow seems not suitable for the use with ordinary bows. It seems to be rotting rapidly."/>
<attribute key="weight" value="100"/>
<attribute key="attack" value="115"/>
<attribute key="weaponType" value="ammunition"/>
<attribute key="ammoType" value="arrow"/>
<attribute key="shootType" value="arrow"/>
<attribute key="charges" value="3"/>
<attribute key="ammoAction" value="removecount"/>
</item>
Code:
<distance id="2352" charges="3" range="8" enabled="1" exhaustion="0" hitchance="80" ammo="removecount" script="crystal arrow.lua"></distance>
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 21)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 0, 0)
function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end