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

Manarune

Headmaster Neil

New Member
Joined
Sep 4, 2013
Messages
30
Reaction score
2
Location
Ontario, Canada
Hello! I just created a manarune and have been trying to add a certain effect but I just couldn't get it to work.


I was just wondering HOW I can make the manarune show how much it's healing.

For example:

When the mana rune is used it shows on on top of your character

+543

and it repeatedly shows the amount when you use the rune.

If someone has the script line for that would be amazing, thanks!
 
local runes = {
[2298] = {
voc = {1, 2, 3, 4, 5, 6, 7, 8},
min = 'level * 1 + maglv * 7',
max = 'level * 1 + maglv * 9'
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local i = runes[item.itemid]
if isInArray(i.voc, getPlayerVocation(cid)) then
if isPlayer(itemEx.uid) == TRUE then
level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
doPlayerAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
local added = math.random(loadstring('return '..i.min)() + loadstring('return '..i.max)()))
doSendAnimatedText(getThingPos(cid), ""..added.."",COLOR_BLUE)
doCreatureSay(itemEx.uid, "First Manarune", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
else
doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
end
return true
end

Will this script make the rune heal more as we level/gain magic level?
 
Will this script make the rune heal more as we level/gain magic level?

PHP:
min = 'level * 1 + maglv * 7',
max = 'level * 1 + maglv * 9'

Code:
min = level times 1 plus magic level times 7
level 20 x 1 =  20
magic level 40 x 7 = 280
20 + 280 = 300
min = 300
max = level times 1 plus magic level times 9
level 20 x 1 =  20
magic level 40 x 9 = 360
20 + 360 = 380
max = 380

So if my math is right (I doubt it) with level 20 and magic level 40 it will heal 300 - 380.

Short answer, YES.
 
Back
Top