local mana = 500
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) < 400 then
doPlayerSendCancel(cid, "Only players above level 400 can use this manarune.")
elseif getPlayerLevel > 400 then
doPlayerAddMana(cid, mana)
end
return true
end
local t = {
min = 1400,
max = 1500,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
local t = {
min = 1400,
max = 1500,
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) < 400 then
doPlayerSendCancel(cid, "Only players above level 400 can use this manarune.")
elseif getPlayerLevel(cid) > 400 then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
doSendMagicEffect(topos, t.effect)
end
return true
end
local t = {
min = 1400,
max = 1500,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE,
level = 400
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
if getPlayerLevel(cid) >= t.level then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You need atleast level " .. t.level .. " to use this rune.")
end
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
Also, you didn't make it (http://otland.net/748484-post5.html)Code:local t = { min = 1400, max = 1500, text = "Aaaah...", effect = CONST_ME_MAGIC_BLUE, level = 400 } function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) then if getPlayerLevel(cid) >= t.level then doPlayerAddMana(itemEx.uid, math.random(t.min, t.max)) doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1) doSendMagicEffect(toPosition, t.effect) else doPlayerSendCancel(cid, "Your level is too low.") end else doPlayerSendCancel(cid, "You can only use this rune on players.") end return true end
Also, you didn't make it (http://otland.net/748484-post5.html)Code:local t = { min = 1400, max = 1500, text = "Aaaah...", effect = CONST_ME_MAGIC_BLUE, level = 400 } function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) then if getPlayerLevel(cid) >= t.level then doPlayerAddMana(itemEx.uid, math.random(t.min, t.max)) doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1) doSendMagicEffect(toPosition, t.effect) else doPlayerSendCancel(cid, "Your level is too low.") end else doPlayerSendCancel(cid, "You can only use this rune on players.") end return true end