• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Manarune

Majeski20

New Member
Joined
Apr 21, 2008
Messages
602
Reaction score
4
Location
Sweden
Hello!

Can someone post a manarune in Actions, not spells cuz it makes alot of exhaust. I want it to be runned like pots.
It should be based on magic level and level, not a noobish manarune that heals 1000 everytime or so. <_<

Thanks! ^_^

REP+
 
Only for mage
Code:
	<action itemid="2284" event="script" value="runes/mana rune.lua" allowfaruse="1"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isPlayer(itemEx.uid) then
		return false
	elseif((not(isSorcerer(cid) or isDruid(cid)) or getPlayerLevel(itemEx.uid) < 40) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
		doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 40 or above may use this rune.", TALKTYPE_ORANGE_1)
		return true
	else
		local l = getPlayerLevel(cid)
		doCreatureAddMana(itemEx.uid, math.random(l >= 350 and 450 or l >= 200 and 350 or 210, l >= 350 and 600 or l >= 200 and 430 or 310))
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
		doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
		return true
	end
end
for pally
Code:
	<action itemid="2298" event="script" value="pally mana rune.lua" allowfaruse="1"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isPlayer(itemEx.uid) then
		return false
	elseif((not(isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 40) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
		doCreatureSay(itemEx.uid, "Only paladins of level 40 or above may use this rune.", TALKTYPE_ORANGE_1)
		return true
	else
		local l = getPlayerLevel(cid)
		doCreatureAddMana(itemEx.uid, math.random(l >= 350 and 450 or l >= 200 and 350 or 250, l >= 350 and 650 or l >= 200 and 450 or 350))
		doCreatureAddHealth(itemEx.uid, math.random(l >= 350 and 220 or l >= 200 and 150 or 100, l >= 350 and 325 or l >= 200 and 210 or 150))
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
		doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
		return true
	end
end
 
Only for mage
Code:
	<action itemid="2284" event="script" value="runes/mana rune.lua" allowfaruse="1"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isPlayer(itemEx.uid) then
		return false
	elseif((not(isSorcerer(cid) or isDruid(cid)) or getPlayerLevel(itemEx.uid) < 40) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
		doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 40 or above may use this rune.", TALKTYPE_ORANGE_1)
		return true
	else
		local l = getPlayerLevel(cid)
		doCreatureAddMana(itemEx.uid, math.random(l >= 350 and 450 or l >= 200 and 350 or 210, l >= 350 and 600 or l >= 200 and 430 or 310))
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
		doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
		return true
	end
end
for pally
Code:
	<action itemid="2298" event="script" value="pally mana rune.lua" allowfaruse="1"/>
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isPlayer(itemEx.uid) then
		return false
	elseif((not(isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 40) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
		doCreatureSay(itemEx.uid, "Only paladins of level 40 or above may use this rune.", TALKTYPE_ORANGE_1)
		return true
	else
		local l = getPlayerLevel(cid)
		doCreatureAddMana(itemEx.uid, math.random(l >= 350 and 450 or l >= 200 and 350 or 250, l >= 350 and 650 or l >= 200 and 450 or 350))
		doCreatureAddHealth(itemEx.uid, math.random(l >= 350 and 220 or l >= 200 and 150 or 100, l >= 350 and 325 or l >= 200 and 210 or 150))
		doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
		doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
		return true
	end
end

I edited the first script and made all vocs enabe.
Thanks for script! rep
 
Back
Top