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

Healing spells % + Runes

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
Hello i searched but i don't find it.
1.I need a spell that Heal from 30 to 40% hp from max hp
2.I need rune that heal 30-40% hp from max hp

TFS 0.3.6pl1
 
Last edited:
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)
function onGetFormulaValues(cid, level, maglevel)
	local min = (getCreatureMaxHealth(cid) / 100) * 20
	local max = (getCreatureMaxHealth(cid) / 100) * 30
	return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
 
function onCastSpell(cid, var)	
	return doCombat(cid, combat, var)
end

local min = (getCreatureMaxHealth(cid) / 100) * 20
local max = (getCreatureMaxHealth(cid) / 100) * 30

Change this part ^ , the 20 = 20% which is the minimum percent chance of healing , the 30 = 30% which is the max , if you want a manarune the same way i have a script for it
 
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)
function onGetFormulaValues(cid, level, maglevel)
	local min = (getCreatureMaxHealth(cid) / 100) * 20
	local max = (getCreatureMaxHealth(cid) / 100) * 30
	return min, max
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
 
function onCastSpell(cid, var)	
	return doCombat(cid, combat, var)
end

local min = (getCreatureMaxHealth(cid) / 100) * 20
local max = (getCreatureMaxHealth(cid) / 100) * 30

Change this part ^ , the 20 = 20% which is the minimum percent chance of healing , the 30 = 30% which is the max , if you want a manarune the same way i have a script for it

its bugged, when i set min *15 and max *25 its heal me 50% health.
if i set min *5 and max *10 its heal me something about 20% health.

IDK that, anyone help?
 
Hmm, as i recall , there is a function related to healing in percentage to tfs 0.3.6... I will edit this post , in an hour or so , so i can find it , because i am using mystic spirit atm.
 
Back
Top