• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

custom healing spell

Cris2387

Member
Joined
Dec 30, 2013
Messages
177
Reaction score
9
hello i want a spell that heals x amount depending on the player level for example if the player is level lets say 50 then the spell will heal him 500 and if the player is level 100 then it will heal him 100 and etc i need atleast 4 options idk please help im currently using this 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_TYPE, COMBAT_NONE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)




function onCastSpell(cid, var)
doCreatureAddHealth(cid, 600)
return doCombat(cid, combat, var)
end
please i need it
 
Code:
function onCastSpell(cid, var)
local x = getPlayerLevel(cid) * 10
doCreatureAddHealth(cid, x)
doSendMagicEffect(getCreaturePosition(cid), 12)
return true
end
 
Code:
function onCastSpell(cid, var)
local x = getPlayerLevel(cid) * 10
doCreatureAddHealth(cid, x)
doSendMagicEffect(getCreaturePosition(cid), 12)
return true
end
and so how hum can you give me an example ? like i want players level 50 to heal 350 hp how do i put that
 
change 10 to accommodate what you want.
Currently it takes the players level multiplies it by 10 to find the healing value.

So for level 50 to heal 350 hp.. devide 350 by 50.. to get 7..
So change the healing value from 10 to 7.. in order to heal 350 at level 50
 
Back
Top