Hello Guys and Girls,
Credits to me
I'm here to release my Wand of Life Drain
if you attack something then you will get a random amount of HP everytime.
1st Step.
make a new file called lifedrainwand.lua and put it into data/Weapons/scripts
2nd Step.
go into data/items and open the items.xml
and replace that lines
I gave the wand def becouse it's a 2 handed weapon but you can change it if you want you just have to delete the part with
"<attribute key="slotType" value="two-handed"/>"
3rd Step.
go into data/Weapons and open the Weapons.xml
red = changeable
don't forget to set the lvl req and mana waste to what you want!
Druids and Sorcerer will be able to wield it
enjoy the wand
yours Evil Hero,
Credits to me
I'm here to release my Wand of Life Drain
if you attack something then you will get a random amount of HP everytime.
1st Step.
make a new file called lifedrainwand.lua and put it into data/Weapons/scripts
Code:
-- Made by Evil Hero
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -100, 0, -125)
function onUseWeapon(cid, var)
doPlayerAddHealth(cid, math.random(10, 70))
return doCombat(cid, combat, var)
end
2nd Step.
go into data/items and open the items.xml
and replace that lines
Code:
<item id="7424" name="Wand of Life Drain">
<attribute key="weight" value="3800"/>
<attribute key="defense" value="37"/>
<attribute key="weaponType" value="wand"/>
<attribute key="slotType" value="two-handed"/>
</item>
I gave the wand def becouse it's a 2 handed weapon but you can change it if you want you just have to delete the part with
"<attribute key="slotType" value="two-handed"/>"
3rd Step.
go into data/Weapons and open the Weapons.xml
Code:
<wand id="7424" range="[COLOR="Red"]3[/COLOR]" lvl="[COLOR="Red"]41[/COLOR]" mana="[COLOR="Red"]17[/COLOR]" enabled="1" exhaustion="0" script="lifedrainwand.lua"><vocation id="1"/><vocation id="2"/><vocation id="5"/><vocation id="6"/></wand>
red = changeable
don't forget to set the lvl req and mana waste to what you want!
Druids and Sorcerer will be able to wield it
enjoy the wand
yours Evil Hero,
Last edited: