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

UH Healing the player on TOP - 8.54 Version.

Kungenn

Veteran OT User
Joined
Jun 10, 2007
Messages
1,625
Reaction score
283
Location
USA California
I would like to have my UH heal the top player lets say if a player is on the same square as me and I use UH on our square it will heal the player that is "on the top".

Just like the old days in 7.1 etc.
So it is possible to make a UH Trap

Here is my current script.

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_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, 42, -1, 90, 5, 5, 7.29, 12.39)

function onGetFormulaValues(cid, level, maglevel)
	local min = ((level/5)+(maglevel*7.29)+42)
	local max = ((level/5)+(maglevel*12.39)+90)
	return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

Thanks in advance if you can help me with this :)
 
Back
Top