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

Spell Mana Rune, Intense Mana Rune, and Ultimate Mana Rune

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
change the ids: 2298, 2270, and 2307 in your items.xml to this

2298
XML:
    <item id="2298" article="a" name="mana rune">
        <attribute key="runeSpellName" value="adura magica" />
        <attribute key="weight" value="120" />
    </item>

2270
XML:
    <item id="2270" article="an" name="intense mana rune">
		<attribute key="runeSpellName" value="adura gran magica" />
        <attribute key="weight" value="120" />
    </item>

2307 -- this one might come grouped as "spell rune" from 2306-2307, so heres the code to replace both
XML:
	<item id="2306" article="a" name="spell rune">
		<attribute key="weight" value="120" />
	</item>
    <item id="2307" article="an" name="ultimate mana rune">
		<attribute key="runeSpellName" value="adura magna magica" />
        <attribute key="weight" value="120" />
    </item>

Now go to spells.xml

and add these lines of code at the top

XML:
	<!-- Custom Runes -->
	
	<rune name="Mana Rune" id="2298" allowfaruse="0" charges="1" lvl="12" maglv="2" exhaustion="2000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="custom spells/mana rune.lua"/>
	<rune name="Intense Mana Rune" id="2270" allowfaruse="0" charges="1" lvl="27" maglv="10" exhaustion="2000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="custom spells/intense mana rune.lua">
		<vocation id="5" showInDescription="0"/>
		<vocation id="6" showInDescription="0"/>
		<vocation id="7" showInDescription="0"/>
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="3"/>	
</rune>		
	<rune name="Ultimate Mana Rune" id="2307" allowfaruse="0" charges="1" lvl="54" maglv="40" exhaustion="2000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="custom spells/ultimate mana rune.lua">	
		<vocation id="5" showInDescription="0"/>
		<vocation id="6" showInDescription="0"/>
		<vocation id="1"/>
		<vocation id="2"/>
</rune>

and do a CTRL+F to find where the intense and ultimate healing runes are, and put these lines of code below the last line of the ultimate healing rune

XML:
	<conjure name="Mana Rune" words="adura magica" lvl="12" mana="120" soul="4" reagentId="2260" conjureId="2298" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="3"/>
		<vocation id="5"/>
		<vocation id="6"/>
		<vocation id="7"/>
	</conjure>
	<conjure name="Intense Mana Rune" words="adura gran magica" lvl="27" mana="310" soul="8" reagentId="2260" conjureId="2270" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>
	</conjure>	
	<conjure name="Ultimate Mana Rune" words="adura magna magica" lvl="54" mana="740" soul="12" reagentId="2260" conjureId="2307" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
		<vocation id="1"/>
		<vocation id="2"/>
		<vocation id="5"/>
		<vocation id="6"/>
	</conjure>

Now, in data/spells, add a folder called "custom spells" and make 3 files in there, they are:

mana rune.lua
Lua:
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 onGetFormulaValues(cid)
	local min = 55 
        local max = 95
	return doPlayerAddMana(cid, math.random(min, max))
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

intense mana rune.lua
Lua:
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 onGetFormulaValues(cid)
	local min = 120 
        local max = 180
	return doPlayerAddMana(cid, math.random(min, max))
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

ultimate mana rune.lua
Lua:
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 onGetFormulaValues(cid)
	local min = 235 
        local max = 365
	return doPlayerAddMana(cid, math.random(min, max))
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

THE INFO
So you might be asking, so okay, but what are the details behind how these runes work? Well if you cant read the code, then I will explain them all right here

All runes act as if they are healing runes (as in you CAN use them on other players) and they have a 2 second exhaust
They all weigh the same as a normal rune
They all conjure as 1 charge
They decrease in efficiency as they go up (but high levels must conserve cap, so they will be willing to waste some mana efficiency (ill explain in each rune)

Mana Rune
words = "adura magica"
Level to make/use = 12
Magic Level to use = 2 (so knights can make them too!)
Vocations = all
Mana to make = 120
Mana received on average = 75 (efficiency is 63%)
Soul: 4
Recommended Price: 40
shopModule:addBuyableItem({'mana rune'}, 2298, 40, 1, 'mana rune')

Intense Mana Rune
words = "adura gran magica"
Level to make/use = 27
Magic Level to use = 10 (since paladins can make them too, it has to be lowered)
Vocations = all but knight
Mana to make = 310
Mana received on average = 150 (efficiency is 48%)
Soul: 8
Recommended Price:120
shopModule:addBuyableItem({'intense mana rune'}, 2270, 120, 1, 'intense mana rune')


Ultimate Mana Rune

words = "adura magna magica"
Level to make/use = 54
Magic Level to use = 40 (only mages can make so must have a high magic level)
Vocations = mages
Mana to Make = 740
Mana received on average = 300 (efficiency is 40%)
Soul: 12
Recommended Price: 300
shopModule:addBuyableItem({'ultimate mana rune'}, 2307, 300, 1, 'ultimate mana rune')

See what I mean by efficiency? Level 100+'s need all the cap they can get, so even though you dont get as much mana back from the higher runes, you get more mana per weight, so you can "carry more mana" on you for a longer hunt.

That's about all there is too it. This is not just a quick action script that is unlimited where mages are tanks, all of the numbers have been calculated out so that they make sense and you can NOT cheat mana from them. The intense and ultimate mana runes can not be abused by knights either because they require magic level 10 and 40, which a knight would not get to.

I picked 3 runes that seemed like "light colored", "medium colored", and "dark colored" for the 3 runes and they all look about the same, they all have the little pentacle on them which I thought kind of meant "mana" in a way anyway.

Tell me if you like it or not, I would really appreciate some feedback as it took awhile to get this to work and all the numbers to make sense.

Thanks to:
Acubens - shortened the min and max so it is only 2 variables instead of 4 now for each rune
 
Last edited:
Try use the min, max variables like this

Lua:
function onGetFormulaValues(cid)
	local min = 235 
        local max = 365
	return doPlayerAddMana(cid, math.random(min, max))
end
 
Thanks Acubens, I edited the post to add a "thanks to" section to anyone who improves this script. I would rep you but I already have and can't again this early lol.

- - - Updated - - -

Added a "recommended price" to each rune, based on how light they are compared to potions and how much they recover, I think the prices are pretty fair, it kind of kicks potions to the curb (so does my UH and IH rune formulas as well haha) but I don't like potions, they aren't traded! I like runes because mages can make them and use them or SELL them creating a market.
 
Well it's nice but i have a problem, All vocations can use the rune i dont know by what, so there is the codes xd
Code:
	<rune name="Intense Mana Rune" id="2270" allowfaruse="0" charges="1" lvl="27" maglv="10" exhaustion="956" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/intense manarune.lua">
		<vocation id="5" showInDescription="0"/>
		<vocation id="6" showInDescription="0"/>
		<vocation id="1"/>
		<vocation id="2"/>	
</rune>

Why all vocations can use it if i put only Sorc and druid can use ?. My ot server is 8.60 thanks !
 
If you want it so only sorc's and druids can use it, just raise the maglv="10" to like maglv="20" so pallies would have to be REALLY high level to get to magic level 20 to use it, but that would be easy to get by level 27 for a sorc or druid
I don't know why all vocations can use the rune, it works fine in my server though so I really have no idea.
Just use the workaround of magic level 20, that should work, or magic level 25 or something.
 
For me it says "Cannot use this object." I've done all the instructions and it doesn't work, may you help me please?
 
are you putting it in spells or actions, because if you edit the item as a type=rune and make the spell so that the id is correct it should all be in order, post your full console error and maybe I can help you more
 
There are no console errors, as it just says "You cannot use this object.", I have placed all the scripts in the instructed areas (items.xml, spells.xml, custom spells/) and it still doesn't work.
 
Try conjuring the rune's ID with a GOD character and make sure it's a rune and not another item (since I made this in 9.6, things could have changed item number wise in lower protocols)

Also check your path on "mana rune.lua" it should, under properties, be this:

/data/spells/scripts/custom spells/mana rune.lua

Also make sure your character is the required level/magic level/vocation to use the rune (I'm not sure but I think GOD characters might count toward that so your GOD character might not be high enough level or be the right vocation.)

I'm not really sure what the problem could be if its not any of these, I'll try my best to help you though but it coming up as "this item can not be used" is very strange especially if theres no other things like type=container or anything under the item id (which I know there isn't though)

Just review all of the different things you have done to items.xml and the spells file and all the other files and mana rune.lua and such and make sure nothing is wrong.
 
I don't have rune 2298 in my Item list somehow (Using 8.6) so I changed it to 2296 wich I do have. If I start my server it crashes. Couldn't load items.xml. I putted this in my Items.xml

XML:
 <item id="2296" article="a" name="Mana Rune">
    <attribute key="runeSpellName" value="adura magica" />
    <attribute key="weight" value="120" />
    </item>

cuz I only wanted the first one. I putted this in my custom spell map. a .lua file I copied and changed from another rune. I changed the name to Mana Rune.

mana rune.lua
[code=lua]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 onGetFormulaValues(cid)
local min = 55
local max = 95
return doPlayerAddMana(cid, math.random(min, max))
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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


Any ideas guys why I doesn't work?! Already thx :) btw I'm quite new to server making :D
 
Look at the items.xml for 8.6 protocol in RME and there should be a rune for item id 2298, 2296 may just not exist and may be why your server can not load items.xml

Just try this

<item id="2298" article="a" name="Mana Rune">
<attribute key="runeSpellName" value="adura magica" />
<attribute key="weight" value="120" />
</item>

Even if your items.xml in your server's folder doesn't have it, it should exist in the items of 8.6 so putting it into your items.xml when it previously wasn't there will probably work. Like I said, the item id 2296 may just not exist or can't have rune item type attributes be put on it for some reason, causing your server to not be able to load items.xml
 
Idk if someone posted already but you can use COMBAT_MANADRAIN to make manarunes in spells folder.

Manadrain will only remove mana if you use negative values, so you can use it to heal mana by using positive values I guess

eg.
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)

function onGetFormulaValues(player, level, maglevel)
    local min = 1000
    local max = 1500
    return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, var, isHotkey)
    return combat:execute(creature, var)
end
 
Back
Top