megazx
Graphic designer
Hello
This is A Double Edged Spell
That When you use it on target it kills you
To cause him Damage
Its My idea to make such spell But Credits go to owned And Tetra20
for Scripting it
Spells.xml
This is A Double Edged Spell
That When you use it on target it kills you
To cause him Damage
Its My idea to make such spell But Credits go to owned And Tetra20
for Scripting it
Spells.xml
PHP:
<instant name="sucide" words="mega mort" lvl="200" mana="1000" prem="1" range="6" blockwalls="1" needtarget="1" exhaustion="2000" needlearn="0" event="script" value="attack/megahell.lua">
<vocation id="2"/>
<vocation id="6"/>
</instant>
scripts\attack\megahell.lua
PHP:
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
local damage = (getCreatureHealth(target) * .8)
if isPlayer(target) then
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(target), 31)
doTargetCombatHealth(cid, target, COMBAT_DEATHDAMAGE, -damage * 2, -damage * 2, 17)
doCreatureAddMana(target, -math.floor((getCreatureMana(target) * 80) / 100))
doCreatureAddHealth(target, -math.floor((getCreatureHealth(target) * 80) / 100))
doCreatureAddHealth(cid, -1000000)
else
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(target), 31)
doTargetCombatHealth(cid, target, COMBAT_DEATHDAMAGE, -damage, -damage, 17)
doCreatureAddHealth(cid, -100000)
end
return true
end