• 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] Custom Spell Request

Tibera Fan

New Member
Joined
May 9, 2010
Messages
6
Reaction score
0
Is it possible to make a spell heal what u have [Maxhealth] (mana and health) ?


Thanks for help REP++ ofc
 
I'm decent sure this would work, for TFS 0.3.6:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatCallback(CALLBACK_PARAM_LEVELMAGICVALUE, combat, "getFormula")

function getFormula(cid)
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    return 1, 1
end

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
ehM?
I'm decent sure this would work, for TFS 0.3.6:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatCallback(CALLBACK_PARAM_LEVELMAGICVALUE, combat, "getFormula")

function getFormula(cid)
    doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
[COLOR=red]    return 1, 1[/COLOR]
end

function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Back
Top