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

Make this script

samih95

Member
Joined
Dec 11, 2011
Messages
95
Reaction score
6
So im working with my GSP to heal even more for higher levels, when u reach for example 400+

I have this script for UHP

Code:
local runes = {
    [8473] = {
        voc = {4, 8},
        min = 'level * 4 + maglv * 6 - 5',
        max = 'level * 4 + maglv * 7'
    }
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local i = runes[item.itemid]
    if isInArray(i.voc, getPlayerVocation(cid)) then
        if isPlayer(itemEx.uid) then
            level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
            doCreatureAddHealth(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
            doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
            doCreatureSay(itemEx.uid, "Aaaah..", 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

And this script for GMP
Code:
local runes = {
    [7590] = {
        voc = {1, 2, 5, 6},
        min = 'level * 2 + maglv * 3 - 3.5',
        max = 'level * 2 + maglv * 4'
    }
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local i = runes[item.itemid]
    if isInArray(i.voc, getPlayerVocation(cid)) then
        if isPlayer(itemEx.uid) then
            level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
            doCreatureAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
            doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
            doCreatureSay(itemEx.uid, "Aaaah..", 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


Now here comes the problem, ive made the script for gsp heal both HP/MP but it only shows how much mana it heals. How can i make it with this script to still show both hp/mp that the original GSP has?

GSP script

Code:
local runes = {
    [8472] = {
        voc = {3, 7},
        min = 'level * 2 + maglv * 3 - 3.5',
        max = 'level * 2 + maglv * 4'
    }
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local i = runes[item.itemid]
    if isInArray(i.voc, getPlayerVocation(cid)) then
        if isPlayer(itemEx.uid) then
            level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
            doCreatureAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
            doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
            doCreatureAddHealth(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
            doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
            doCreatureSay(itemEx.uid, "Aaaah..", 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

Thanks in advance!
Sami
 
In your Config.lua can you check if showHealingDamage is set to true? Here is how it should look like:
Code:
 [/COLOR][/FONT][/LEFT]

 showHealingDamage = true
 showHealingDamageForMonsters = true
 healthHealingColor = COLOR_GREEN
 manaHealingColor = COLOR_DARKPURPLE
 
It is. It works on all pots. Problem is with this updated GSP script. It doesnt show borh health and mana healed, i dont know how to add it.
 
Back
Top