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

Mana Rune

Jesper_Kladden

Donator
Joined
May 16, 2008
Messages
458
Reaction score
1
Location
Sweden
PHP:
local MagicLevel = 10 -- Needed magic level to use the rune
local Level = 0 -- Needed level to use the rune, set to 0 if you want no level
local ID = 2281
local Mana = math.random(500, 700)

function onUse(cid, item, frompos, item2, topos)
	if getPlayerLevel(cid) >= Level and getPlayerMagLevel >= MagicLevel and  then
		doSendAnimatedText(getPlayerPosition(cid), "Mana!", TEXTCOLOR_BLUE)
			doPlayerAddMana(cid, Mana)
	elseif getPlayerLevel(cid) <= Level then
		doPlayerSendCancel(cid, "Your level must be " ..Level.. " or higher to use this rune")
	elseif getPlayerMagLevel <= MagicLevel then
		doPlayerSendCancel(cid, "Your magic level must be " ..MagicLevel.. " or higher to use this rune")
	end
	return TRUE 
end

I'm wondering, will this code work for 8.1 OTs ? I don't have one ATM. and I need to know :p
 
PHP:
local MagicLevel = 10 -- Needed magic level to use the rune
local Level = 0 -- Needed level to use the rune, set to 0 if you want no level
local ID = 2281
local Mana = math.random(500, 700)

function onUse(cid, item, frompos, item2, topos)
    if getPlayerLevel(cid) >= Level and getPlayerMagLevel >= MagicLevel and  then
        doSendAnimatedText(getPlayerPosition(cid), "Mana!", TEXTCOLOR_BLUE)
            doPlayerAddMana(cid, Mana)
    elseif getPlayerLevel(cid) <= Level then
        doPlayerSendCancel(cid, "Your level must be " ..Level.. " or higher to use this rune")
    elseif getPlayerMagLevel <= MagicLevel then
        doPlayerSendCancel(cid, "Your magic level must be " ..MagicLevel.. " or higher to use this rune")
    end
    return TRUE 
end


PHP:
    if getPlayerLevel(cid) >= Level and getPlayerMagLevel >= MagicLevel and  then

"and" what?

PHP:
getPlayerMagLevel
2x

of who? (cid)

PHP:
local ID = 2281

:mad:
 
Last edited:
Back
Top