• 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 with maglevel rec

rilleman

New Member
Joined
Feb 14, 2010
Messages
269
Reaction score
0
Hi, ive been seacrhing for a long time now for a manarune that depends on you magiclevel.

So im asking you masters if you can give me a script that heals around

I want the max heal around 900 - 1100 and the magic level is around 120-150 for that.

So a person with mag level 60 will heal the half of it?

I will rep you everyday for a year if you help me with this script!!
 
Credits to Cykotitan, btw you posted in the wrong section
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if isPlayer(itemEx.uid) then
                local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
                local min = lvl * 2 + mag * 120
                local max = lvl * 2.5 + mag * 150
                local rand = math.random(min, max)
                doPlayerAddMana(itemEx.uid, rand)
                doCreatureAddHealth(itemEx.uid, rand)
                doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
        else
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "You can only use this rune on players.")
        end
        return true
end
 
Credits to Cykotitan, btw you posted in the wrong section
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if isPlayer(itemEx.uid) then
                local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
                local min = lvl * 2 + mag * 120
                local max = lvl * 2.5 + mag * 150
                local rand = math.random(min, max)
                doPlayerAddMana(itemEx.uid, rand)
                doCreatureAddHealth(itemEx.uid, rand)
                doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
        else
                doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
                doPlayerSendCancel(cid, "You can only use this rune on players.")
        end
        return true
end



it says; [08/03/2010 13:45:05] [Warning - Event::loadScript] Event onCastSpell not found (data/spells/scripts/custom/manarune.lua)
 
its not a spell, put it in actions and then in actions.xml
Code:
<action itemid="6119" script="manarune.lua"/>
<- edit your id
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local lvl, mag, storage, exhausted = getPlayerLevel(cid), getPlayerMagLevel(cid), 1337, 1 -- [ 1 ] = Exhaust
	if exhaustion.check(cid, storage) == true then
		doPlayerSendCancel(cid, "You are exhausted.")
	elseif not isPlayer(itemEx.uid) then
		doPlayerSendCancel(cid, "Sorry, not possible.")
	else
		local min = lvl * 2 + mag * 110
		local max = lvl * 2.5 + mag * 120
		doPlayerAddMana(itemEx.uid, math.random(min, max))
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
		exhaustion.set(cid, storage, exhausted)
	end
	return true
end

Thanks you very much! Just one problem :S the rune gives both health and mana ;s
 
Thank you! ( I repped u )

just one more question, Do you know how I can display the ammout of mana i get in the game? In like blue text or something
etc; 66 mana , 67 mana, 73 mana
 
Kaboom

Here you go. :thumbup:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local lvl, mag, storage, exhausted = getPlayerLevel(cid), getPlayerMagLevel(cid), 1337, 1 -- [ 1 ] = Exhaust
	if exhaustion.check(cid, storage) == true then
		doPlayerSendCancel(cid, "You are exhausted.")
	elseif not isPlayer(itemEx.uid) then
		doPlayerSendCancel(cid, "Sorry, not possible.")
	else
		local min = lvl * 2 + mag * 110
		local max = lvl * 2.5 + mag * 120
		local rand = math.random(min, max)
		doPlayerAddMana(itemEx.uid, rand)
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
		exhaustion.set(cid, storage, exhausted)
		doSendAnimatedText(getCreaturePosition(itemEx.uid), "+" .. rand .. "", TEXTCOLOR_LIGHTBLUE)
	end
	return true
end
 
Here you go. :thumbup:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local lvl, mag, storage, exhausted = getPlayerLevel(cid), getPlayerMagLevel(cid), 1337, 1 -- [ 1 ] = Exhaust
	if exhaustion.check(cid, storage) == true then
		doPlayerSendCancel(cid, "You are exhausted.")
	elseif not isPlayer(itemEx.uid) then
		doPlayerSendCancel(cid, "Sorry, not possible.")
	else
		local min = lvl * 2 + mag * 110
		local max = lvl * 2.5 + mag * 120
		local rand = math.random(min, max)
		doPlayerAddMana(itemEx.uid, rand)
		doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED)
		exhaustion.set(cid, storage, exhausted)
		doSendAnimatedText(getCreaturePosition(itemEx.uid), "+" .. rand .. "", TEXTCOLOR_LIGHTBLUE)
	end
	return true
end

Thanks so much :) Will rep you again tomorrow :)
 
Back
Top