• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

[weapons] Wand of Life

jestemPolakiem

New Member
Joined
Oct 17, 2009
Messages
48
Reaction score
2
Location
Poland
Wand of Life
by jestemPolakiem

script has been tested on The Forgotten Server 0.3.6pl1 and worked

mapatr.png


Code:
[B]To use the script, just you only need to set up his wand and start attacking - - wand will automatically heal you[/B]

data/weapons/weapons.xml - add before </weapons>
PHP:
<wand id="8920" override="yes" mana="6" event="buffer" value="return doCreatureAddHealth(cid, 200 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.05) and doSendAnimatedText(getCreaturePosition(cid), '+'..(200 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.05), COLOR_GREEN)">
	<vocation id="1"/>
	<vocation id="2"/>
	<vocation id="5"/>
	<vocation id="6"/>
</wand>

data/items/items.xml - add before </items>
PHP:
<item id="8920" article="a" name="wand of life">
	<attribute key="description" value="Magic wand that adds the quality of life during the attack." />
	<attribute key="weight"      value="3050" />
	<attribute key="weaponType"  value="wand" />
	<attribute key="shootType"   value="energy" />
	<attribute key="range"       value="4"/>
</item>


Greets
jestemPolakiem
 
Hmm.. everything fckin awsome (soz for swear but yeh) I cnt find sumthing bout this +220, I mean the regeneration points finaly lol :)
 
when I add that configuration to any wand such as the Wand Of Vortex, the wand does not attack ... Recharge your life just like I do to attack as well?
 
I wanna know how to make it attack at same time Answer please!! i give rep ++
 
@up
This is healing wand. It heal attacker, not hit target
@topic
Shorter code.
PHP:
PHP Code:
<wand id="8920" override="yes" mana="6" event="buffer" value="
local dmg = 200 + getPlayerMagLevel(cid) * getPlayerLevel(cid) * 0.05 return doCreatureAddHealth(cid, dmg) and doSendAnimatedText(getCreaturePosition(cid), '+'.. dmg, COLOR_GREEN)">
    <vocation id="1"/>
    <vocation id="2"/>
    <vocation id="5"/>
    <vocation id="6"/>
</wand>
 
Healing and hitting spell. - Learn to change to wep -


Here, .../data/spells/scripts:

Lua:
 local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, DEATHTARGET)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FLASHARROW)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.6, -0, -1.7, -0)

local area1 = {
       {0, 0, 0, 0, 0},
       {0, 0, 0, 0, 0},
       {0, 0, 3, 0, 0},
       {0, 0, 0, 0, 0},
       {0, 0, 0, 0, 0},
}
   
setCombatArea(combat1, createCombatArea(area1))

local parameters = { cid = cid, var = var, combat1 = combat1}

function onCastSpell(cid, var)
config = {
	formula = (getCreatureMaxHealth(cid) / 100) * 10, -- Change the 10 in any percent you want to heal it --
}
doCreatureAddHealth(cid, config.formula)
	addEvent(doCombat, 0, cid, combat1, var)
end
.../data/spells/spells.xml:

Lua:
 	<instant name="Healing Attack" words="xxxx" lvl="xxxx" mana="xxxx" needtarget="1" event="script" value="attack/xxxx.lua">
		<vocation id="3"/>
                <vocation id="7"/>
	</instant>

Rep if i helped :D
 
Back
Top