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

Spell that changes your HP to MANA

Santy

Member
Joined
Aug 14, 2007
Messages
654
Reaction score
22
Hehe.. saw my other spell?
Now this one, changes hp instead of mana! :p..

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
	doPlayerAddHealth(cid, -100)
	doPlayerAddMana(cid, 100)
	return doCombat(cid, combat, var)
end

Make the cost in spells.xml 0.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
	doPlayerAddHealth(cid, -100)
	doPlayerAddMana(cid, 100)
	return doCombat(cid, combat, var)
end

Just change the
Code:
	doPlayerAddHealth(cid, -100)
	doPlayerAddMana(cid, 100)
to
Code:
	doPlayerAddHealth(cid, -500)
	doPlayerAddMana(cid, 500)

And now you have added so you loose 500 hp, and get 500 mana.
You can change this to w/e you want too.

Love it, simple and good spell if your thinking of making a warlock vocation. :)
 
Code:
local mana = 100

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
        local manaDiff = getPlayerMaxMana(cid) - getPlayerMana(cid)
        local addMana = math.min(mana, manaDiff)
	doPlayerAddHealth(cid, -addMana)
	doPlayerAddMana(cid, addMana)
	return doCombat(cid, combat, var)
end
 
Last edited:
Im pretty sure you cant use
Code:
doPlayerAddHealth(cid, -addMana)

Anymore to remove HP

Heres how you could do it
Code:
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -100, CONST_ME_BIGPLANTS)
 
LOL NOOB SCRIPT

LALA SPELLS -100 HP +100 MANA EXURA GRAN AGAIN SPELL

LOL ML 123123123 PLS

xD
 
You are right, but you can add a exahusted of healing spells on the script, so they can't heal for a while if they use this spell.
 
Back
Top