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

Wand of Life Drain

Evil Hero

Legacy Member
TFS Developer
Joined
Dec 12, 2007
Messages
1,254
Solutions
27
Reaction score
721
Location
Germany
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

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 :D

yours Evil Hero,
 
Last edited:
Code:
	<item id="7424" article="a" name="lunar staff">
		<attribute key="weight" value="3800"/>
		<attribute key="defense" value="25"/>
		<attribute key="attack" value="40"/>
		<attribute key="weaponType" value="club"/>
		<attribute key="slotType" value="two-handed"/>
	</item>
Lunar Staff is the thing your editing.
 
I thought that's what it is. Sorry can't use. Ill use this script for another weapon, cause Lunar Staff & Spirit Wand are counterparts.
Lunar = S, MS, AS
Spirit = D, ED, AD
 
You can use every item which you like :p
i just used that item becouse it looks like a wand ^^

yours Evil Hero,
 
i was looking for this! i posted on request but nothing! :D! thanks im gonna try it, would it work on 8.4 forgotten server? thanks! +rep

thaks it worked! only was doCreatureAddHealth instead of doPlayerAddHealth thanks!
 
Last edited:
Back
Top