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

Need help with this manarune script!!

grogan

New Member
Joined
Dec 6, 2007
Messages
133
Reaction score
0
i want this script so only people with magic level 20 can use, if better if you could only make sorcerers and druids use thanks heaps if you can. its a action scripts so wasnt sure where to put it ;s


heres the script


local t = {
min = 500,
max = 590,
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
 
LUA:
local t = {
min = 500,
max = 590,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
   if isInArray({1,2},getPlayerVocation(cid)) then
      if getPlayerMagLevel(cid) >= 20 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 dont have the required magic level to use this rune.")
      end
   else
       doPlayerSendCancel(cid, "You dont have the required vocation to use this rune.")
   end
else
    doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
 
Thanks mate reall appreciate it just a quick question for elder, master mages to usee just change if isInArray({1,2,5,6},getPlayerVocation(cid)) then

thanks again.
 
Back
Top