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

Lua HP/Mana rune (Level based)

butrocker

New Life
Joined
Aug 17, 2008
Messages
92
Reaction score
4
So im looking for a level based rune that heals health and mana at the same time,
by saying level based I mean the rune gets better as that player levels up, ex:

player level 20 heals 240-250 hp and 300-325 mana

player level 21 heals 250-260 hp and 310-335 mana

The script could be either action or spell, It doesnt matter to me to be honest.

so on and so fourth, i've looked up a few other mana/hp runes although none of them are what I need
so before trolling and saying "go search it" i'll have you know i've already searched it.

anyways, hopefully someone can help me thanks!

Butrocker,

also, Rep++ to whoever can help me.

Edit: I also have my regular manarune script that is in the same format im looking for.
 
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	local mana_minimum = (level * 7) + (mlevel * 1) - 50
	local mana_maximum = (level * 12) + (mlevel * 1)
	local mana_add = math.random(mana_minimum, mana_maximum)
	
	doPlayerAddMana(cid, mana_add)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	return TRUE
end

The rune is actually an action script rather then a spell script,
so if you could change it to heal mana and health at the same time
letting me use the same script would be pretty cool
 
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	local mana_minimum = (level * 7) + (mlevel * 1) - 50
	local mana_maximum = (level * 12) + (mlevel * 1)
	local mana_add = math.random(mana_minimum, mana_maximum)
	local health_minimum = (level * 5) + (mlevel * 1) - 50
	local health_maximum = (level * 10) + (mlevel * 1)
	local health_add = math.random(health_minimum, health_maximum)
	
	doPlayerAddMana(cid, mana_add)
        doCreatureAddHealth(cid, health_add)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	return TRUE
end

Try that, of course, you can change the formula around.
 
get
Code:
Event onCastSpell not found
error..


used that spells.xml
Code:
<rune group="support" spellid="70" name="Manarune" id="2314" allowfaruse="1" charges="1" lvl="100" maglv="50" exhaustion="1000" groupcooldown="1000" aggressive="0" needtarget="1" blocktype="solid" script="custom/manarune.lua"/>
 
The script should be in actions. With a function in the script that removes the rune when being used it's already working the same as runes that are added to spells, so you can just use the script like Ninja posted.
Mana runes or potions shouldn't be in spells because they need a different exhaustion condition.
 
Back
Top