• 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 ur mana to hp

Santy

Member
Joined
Aug 14, 2007
Messages
654
Reaction score
22
This is a very good spell for knights, add this spell to spells folder:

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

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

And make the mana cost 100 in spells.xml.. or anything else.. to change the hp u get, change the "doPlayerAddHealth(cid, 100)".
 
Hmm yeah but this one adds you exactly the amount of hp.. just set it a high number and a high amount of mana and itll be very good for knights/pallys.
 
Ye, maybe exura vita for knights? I don't find it interesting and innovating but maybe someone does.
 
Will it work to do
Code:
	doPlayerAddHealth(cid, -100)
and you will loose 100hp?

Want a script like this, but you loose 500hp and gain 500 mana. Would be more helpful to special vocations to earn fast mana when not in comebat.

[you loose 500 hp, you get 500 mana, exura vita you loose 160mana [340 mana left]
Then you have earned 340 mana fairy fast. And its risky to use in comebat.

Also would be greate if this could ignore manashield.

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

function onCastSpell(cid, var)
	doPlayerAddHealth(cid, -500)
	doPlayerAddmana(cid, 510)
	return doCombat(cid, combat, var)
end

And make it cost 10 mana in spells.xml.?
 
Last edited:
@Up

So they can commit suicide, right?

add a HP check there.
Code:
if getCreatureHealth(cid) >= 600 then
->urcode<-
else
doPlayerSendTextMessage(cid, 22, "Your health points are too low.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
 
like this?

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

if getCreatureHealth(cid) >= 600 then

function onCastSpell(cid, var)
	doPlayerAddHealth(cid, -500)
	doPlayerAddmana(cid, 510)
	return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, 22, "Your health points are too low.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
 
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
        if getCreatureHealth(cid) >= 600 then
	doPlayerAddHealth(cid, -500)
	doPlayerAddmana(cid, 510)
	return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, 22, "Your health points are too low.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end

Also, isnt it, `doCreatureAddHealth`?
 
Thanks, your right. As you might see, I have no special experience in scripting :p
 
<double post> My internett is just weird >.<
 
Btw.

You can make a nice spell changing mana to hp/hp to mana with Lejjos lua functions (setCreatureMaxMana/Health). :)
 
Back
Top