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

Manarune

Onizuka

Member
Joined
Jul 5, 2008
Messages
2,291
Reaction score
14
How can i make this manarune work by lvl/mlvl changing?

i don't want 1.2k all the time it sucks



LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 1200) ---- how much it heal
return doCombat(cid, combat, var)
end

Cheers..
 
Try this, I don't know if it will work but its supposed to recover more,
the more you grow.
LUA:
local combat =  createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
local formula = ((getPlayerMagLevel(cid)*0.15)+(getPlayerLevel(cid)*0.15))
doPlayerAddMana(cid, math.ceil(250*formula)) ---- how much it heal
return doCombat(cid, combat, var)
end
Example:
At level 8 with 0 ml he will recover 300 mana.
 
this will work for you 100%.
its easy to understand and edit the formula aswell :)

Manarune.lua
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)

function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*2 + maglv*3) * 1.3)
	local formula_max = ((lv*2 + maglv*5) * 1.6)

	if(formula_max < formula_min) then
		local tmp = formula_max
		formula_max = formula_min
		formula_min = tmp
	end
	return formula_min, formula_max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")

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