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

Mana and healing runes

nystrom

New Member
Joined
Nov 17, 2009
Messages
269
Reaction score
0
Hello my players are getting sick of the old mana/healing runes that gives the same mana/health amount all the time....
so i wounder if someone have a 100% working / bug free script for a mana and healing rune that works on TFS 0.3.6
I want it to work for a player in any level so what i mean is that the mana/health gianed when using the rune gets higher when the player gets higher.
i hope you understod what i meant, maybe the rune can give some kind of message like aaahh or manarune. when used? idk :p

rep+ ofc :D
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(isPlayer(itemEx.uid) == true) then
	local level = getPlayerLevel(cid) 
	local mlevel = getPlayerMagLevel(cid)
	local heal = level * 9 + mlevel * 1 - 100
	local maxheal = level * 8 + mlevel * 1
		doPlayerAddMana(cid, math.abs(heal, maxheal)) and doSendAnimatedText(getThingPos(cid), "MANARUNE!", 181, player)
		doSendMagicEffect(getThingPos(itemEx.uid), 12)
	else
		doPlayerSendCancel(cid,"Can Only Use On Creatures") 
	end
	return true
end
 
I got this error:

PHP:
[07/02/2012 18:35:32] [Error - LuaScriptInterface::loadFile] data/actions/scripts/ultramanarune.lua:7: unexpected symbol near 'and'
[07/02/2012 18:35:32] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/ultramanarune.lua)
[07/02/2012 18:35:32] data/actions/scripts/ultramanarune.lua:7: unexpected symbol near 'and'

btw man how do i so the rune heal more mana, and how do i make it add health instead of mana, shoud i change this:
PHP:
doPlayerAddMana(cid, math.abs(heal, maxheal)) and doSendAnimatedText(getThingPos(cid), "MANARUNE!", 181, player)
to this:
PHP:
doCreatureAddHealth(cid, math.abs(heal, maxheal)) and doSendAnimatedText(getThingPos(cid), "MANARUNE!", 181, player)

my server relly needs this scripts. :/
 
Why not modify the UH to give HP depending on the lvl of the character? Between a set interval of X and X for X lvl?

i made my Donate Healing Rune like this:
PHP:
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)

function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*2.25 + maglv*3) * 1.4)
	local formula_max = ((lv*2.25 + maglv*3) * 1.7)

	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

but the problem is that i can't find out how i make it add mana instead of health :p
anyone knows how i can change that?
 
From what I understand within the .lua rune scripts there isn't even anything in that script that heals... Just the math to allow it to heal X, you need to add the line that will target the players mana and add it. Kinda like the UH... I think the line should be like so: doCreatureAddMana(cid, math.floor(getCreatureMaxMana(cid)*0.20)), or close to that.
 
<_< okay , i will give you good mr and healing script , hope you like it

Mr Script :
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
	doPlayerAddMana(cid, [COLOR="#FF0000"]100[/COLOR])
	return doCombat(cid, combat, var)
end

Healing Script :
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
--setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1.3, -30, 1.7, 0)

function onGetFormulaValues(cid, level, maglevel)
	min = (level * 2 + maglevel * 3) * 2.3 - 25
	max = (level * 2 + maglevel * 3) * 2.6
	
	if min < 250 then
		min = 250
	end

	return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

Change script heal as you like!
 
I know it's weird, but it works, test it ;)

omg mate the scripts works great now!

here is the healing rune:
PHP:
--Calculed by ta4e--
--For tibia 8.22--
--Made in 12/09/08--
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)

function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*2.25 + maglv*3) * 1.4)
	local formula_max = ((lv*2.25 + maglv*3) * 1.7)

	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

and here is the manarune:
PHP:
--Calculed by ta4e--
--For tibia 8.22--
--Made in 12/09/08--
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
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)

function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*1.75 + maglv*3) * 1.0)
	local formula_max = ((lv*1.75 + maglv*3) * 1.0)

	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

the only problem i have is that the manarune exhaust with the healing spells so paladins and mages, gets very mad when they cant use there healing spells after they used the manarune... is it posible to make the rune to now exhaust with the healing spells?... it shoud help me alot more!
btw rep+ to you Zyntax for the help :D
 
Back
Top