• 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!
 
Data\actions\scripts\liquids Name it like first_manarune.lua
Code:
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)
            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

In actions.xml put
Code:
    <action itemid="2298" event="script" value="liquids/First_manarune.lua"/>

Please rep+++ :) if i helped u
 
I'm using cryingdamson 0.3.6
Client: 8.60
Map: It's not really a map, just a quickly made temple so we could log in and create items and test things for the server, then we will add our actual server maps.
 
hey
if you wanna it appear like
you healed your self by xx mana
you healed xxx player by xx mana :D
this is source edit I think

and this manarune heal depend on level and magLevel :p
 
Config.lua :p
OR
Code:
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
 
Last edited:
Probably like tetra20 said Config.lua:
Code:
showHealingDamage = false
To:
Code:
showHealingDamage = true
 
Config.lua :p
OR
Code:
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
This script doesn't work :(
 
Back
Top