Jesper_Kladden
Donator
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