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

Action Manarune

R3ignlasting

Well-Known Member
Joined
Nov 20, 2008
Messages
1,293
Reaction score
82
Okay, I know I'm not the best scripter and maybe not even one of the best... But I made a simple Manarune script.

Ok, use this rune : 2275 (You can change the ID if you want for this rune)

Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(topos,1)
doPlayerSay(cid,"Mana....",16)
doPlayerAddMana(cid, 1000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return 1
end

Add that into Data/Actions/Scripts as Manarune.lua

Code:
<action itemid="2275" script="quests/quests.lua"/>

Now, remember you can change the ID's for the rune that you want to use the manarune for... Just change the <Action itemid="2275" to <Action itemid="(You ID here)"

Any found bugs on this manarune, please report it to me.
 
Learn how to tab your scripts :D:

PHP:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
	if mag >= 3 then
		doSendMagicEffect(topos,1)
		doPlayerSay(cid,"Mana....",16)
		doPlayerAddMana(cid, 1000)
		if item.type > 1 then
			doChangeTypeItem(item.uid,item.type-1)
		else
			doRemoveItem(item.uid,1)
		end
	else
		doSendMagicEffect(frompos,2)
		doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
	end
return 1
end
 
lal manarune is the easly work ever ^.- manarune creat its not hard i make it in 10min~ my own 100% manarune ...
 
No he want choclate. You should add a formula, use math.random(xx, xx) and if you want, multip~ it with their level/maglevel and such. Also, dont use mag =, use local mag =, else u will fill up globals which can cause problems in functions later.. happened to me.
 
Back
Top