• 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 text! [Simple]

Cheeze1

Banned User
Joined
Mar 7, 2012
Messages
54
Reaction score
0
Location
IM OTLAND BIGGEST GAY WHORE!!
Yo OTland Today i gonna show how to Make a Manarune with text [I know its a simple simple script] but for you guys who just dont know xD.....

First Go to data/Action/action.xml add
PHP:
<action itemid="2312" script="manarune.lua"/>
Then go to Data/Action/scripts and make a Lua File called "Manarune" Add this inside
PHP:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos,61)
doCreatureSay(cid,"Third Mana!",19)
doPlayerAddMana(cid, 1500)
if item.type > 1 then
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return 1
end
hope you enjoyd and cya next time :p
 
It's very simple, therefore you are including functions that are not even needed to make it simple... Like these:
Code:
function onUse(cid, item, frompos, item2, topos) 
[COLOR="#FF0000"]	mag = getPlayerMagLevel(cid) 
		if mag >= 0 then [/COLOR]
			doSendMagicEffect(topos,61) 
			doCreatureSay(cid,"Third Mana!",19) 
			doPlayerAddMana(cid, 1500) 
[COLOR="#FF0000"]			if item.type > 1 then 
			end [/COLOR]
		else 
			doSendMagicEffect(frompos,2) 
			doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.") 
		end 
	return 1 
end

Wait wat? The player can never have magic level anything than that... and item.type? wtf...

Make it more simple, like this:

Lua:
function onUse(cid, item, frompos, item2, topos) 
	local exH = 9494
	local exT = 2 -- sec
		
	local max, min = 1500, 1600
	local finalM = math.random(max, min)
	if(exhaustion.check(cid, exH) == false) then
		doSendMagicEffect(topos,61) 
		doCreatureSay(cid,"Third Mana!",19) 
		doPlayerAddMana(cid, finalM) 
		exhaustion.set(cid, exH, exT)
	else
		doPlayerSendCancel(cid, "You are exhausted in ".. exhaustion.get(cid, exH) .." seconds.")
	end
	return true
end

If it was your first action script, that is very good!
 
Last edited:
Back
Top Bottom