• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Manarune with Config

Marco96

Nevoria War Project
Joined
May 8, 2010
Messages
587
Reaction score
37
Location
Germany
Here is a very good Mana rune with a little Config to make it easier for Peoples they don´t Script:

Lua:

Code:
local config = {
[{"Sorcerer"}] = {min=250, max=500}, 
[{"Druid"}] = {min=250, max=500},  
[{"Paladin"}] = {min=150, max=350}, 
[{"Knight"}] = {min=100, max=250}, 
[{"Master Sorcerer"}] = {min=400, max=500},  
[{"Elder Druid"}] = {min=400, max=500}, 
[{"Royal Paladin"}] = {min=350, max=450}, 
[{"Elite Knight"}] = {min=150, max=250}
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)


function onCastSpell(cid, var)
for i, j in pairs(config) do
if isInArray(i, getPlayerVocationName(cid)) == TRUE then
doPlayerAddMana(cid,math.random(j.min,j.max))
end
end
return doCombat(cid, combat, var)
end

Add this into Spells.xml:

Code:
<rune name="Mana rune" id="2281" allowfaruse="1" charges="1" lvl="15" maglv="0" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/mana rune.lua"/>

If you like it please give me some Reps
 
Its easy with this Config :D Just edit and done :p

Rep me please if you use this :p
 
what if the player is like lvl 300.. and heals max 500? that sux
then play in that
Code:
doPlayerAddMana(cid, math.random(j.min,j.max) + ( getPlayerLevel(cid) * 2) + (getPlayerMagLevel(cid) * 4) )
 
Back
Top