• 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 level based rep++ for help

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
I've been looking for a script to make my manarunes better for every level that you advance..

For example, it heals 10 mana more for every level that you reach.. I know that these scripts are out there but I cant simply find them.

If somebody could give me a hand with this I would be very greatful.

Rep ++ for anybody that can help me!!!

( i need help with a full working script ) rep+
 
LUA:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(isPlayer(itemEx.uid) == true) then
	local level = getPlayerLevel(cid) 
	local mlevel = getPlayerMagLevel(cid)
	local heal = level * 9 + mlevel * 1 - 100
	local maxheal = level * 8 + mlevel * 1
		doPlayerAddMana(cid, math.abs(heal, maxheal))
		doSendMagicEffect(getThingPos(itemEx.uid), 12)
	else
		doPlayerSendCancel(cid,"Can Only Use On Creatures")
	end
	return true
end
a mana rune like this?
 
i have this one check if you want you can config it as you want
PHP:
local config = 
{ 
    healthMultiplier = 1.4, 
    manaMultiplier = 1.0
}
local RUNES = { 
    [0] = {hpMin = 500, hpMax = 10000, HPmultiLvl = 6.0, HPmultiMaglvl = 1.0, HPplus = 1000, hpValues = {0.8, 1.2}, -- HP RUNE 
              reqLevel = 250}, 
    [0] = {hpMin = 2000, hpMax = 25000, HPmultiLvl = 7.0, HPmultiMaglvl = 1.0, HPplus = 8000, hpValues = {0.8, 1.2}, -- SUPER HP RUNE 
              reqLevel = 1000}, 
    [2307] = {hpMin = 0, hpMax = 700000, HPmultiLvl = 2.0, HPmultiMaglvl = 1.2, HPplus = 100, hpValues = {1.2, 1.3}, -- DONATOR HP RUNE 
              reqLevel = 1}, 
    [0] = {-- MANA RUNE 
              mpMin = 1000, mpMax = 7000, MPmultiLvl = 4.0, MPmultiMaglvl = 5.0, MPplus = 300, manaValues = {0.8, 1.2}, 
              reqLevel = 250}, 
    [2282] = {-- SUPER MANA RUNE 
              mpMin = 0, mpMax = 20005550, MPmultiLvl = 1.2, MPmultiMaglvl = 1.3, MPplus = 100, manaValues = {0.8, 0.9}, 
              reqLevel = 8}, 
    [2270] = {-- SUPER MANA RUNE 
              mpMin = 0, mpMax = 150000000, MPmultiLvl = 1.2, MPmultiMaglvl = 1.3, MPplus = 100, manaValues = {1.3, 1.4}, 
              reqLevel = 100}, 
    [2276] = {-- DONATOR MANA RUNE 
              mpMin = 0, mpMax = 200000000, MPmultiLvl = 1.3, MPmultiMaglvl = 1.4, MPplus = 100, manaValues = {1.4, 1.5},
              reqLevel = 8} 
} 

local exhaust = createConditionObject(CONDITION_EXHAUST) 
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 5000)) 
setConditionParam(exhaust, CONDITION_PARAM_SUBID, EXHAUST_HEALING)     

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local rune = RUNES[item.itemid] 
    if not isPlayer(itemEx.uid) then
        return false 
    end 

    if(((rune.reqLevel and getPlayerLevel(cid) < rune.reqLevel) or (rune.vocations and not isInArray(rune.vocations, getPlayerVocation(cid)))) and 
        not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) 
    then 
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Only players " .. (rune.reqLevel and (" of level " .. rune.reqLevel) or "") .. " or above may use this rune.") 
        return true 
    end 

    if(rune.hpMin) then 
        local health = getPlayerLevel(cid) * rune.HPmultiLvl + getPlayerMagLevel(cid) * rune.HPmultiMaglvl + rune.HPplus 
        if(not doCreatureAddHealth(itemEx.uid, math.ceil(math.min(rune.hpMax, math.max(rune.hpMin, math.random(health * rune.hpValues[1], health * rune.hpValues[2]))) * config.healthMultiplier))) then 
            return false 
        end 
    end 

    if(rune.mpMin) then 
        local mana = getPlayerLevel(cid) * rune.MPmultiLvl + getPlayerMagLevel(cid) * rune.MPmultiMaglvl + rune.MPplus 
        if(not doCreatureAddMana(itemEx.uid, math.ceil(math.min(rune.mpMax, math.max(rune.mpMin, math.random(mana * rune.manaValues[1], mana * rune.manaValues[2]))) * config.manaMultiplier))) then 
            return false 
        end 
    end  

    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_RED) 
    for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do 
        if(isPlayer(tid)) then 
            doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) 
        end 
    end 
 
    return true 
end
 
i have this one check if you want you can config it as you want
PHP:
local config = 
{ 
    healthMultiplier = 1.4, 
    manaMultiplier = 1.0
}
local RUNES = { 
    [0] = {hpMin = 500, hpMax = 10000, HPmultiLvl = 6.0, HPmultiMaglvl = 1.0, HPplus = 1000, hpValues = {0.8, 1.2}, -- HP RUNE 
              reqLevel = 250}, 
    [0] = {hpMin = 2000, hpMax = 25000, HPmultiLvl = 7.0, HPmultiMaglvl = 1.0, HPplus = 8000, hpValues = {0.8, 1.2}, -- SUPER HP RUNE 
              reqLevel = 1000}, 
    [2307] = {hpMin = 0, hpMax = 700000, HPmultiLvl = 2.0, HPmultiMaglvl = 1.2, HPplus = 100, hpValues = {1.2, 1.3}, -- DONATOR HP RUNE 
              reqLevel = 1}, 
    [0] = {-- MANA RUNE 
              mpMin = 1000, mpMax = 7000, MPmultiLvl = 4.0, MPmultiMaglvl = 5.0, MPplus = 300, manaValues = {0.8, 1.2}, 
              reqLevel = 250}, 
    [2282] = {-- SUPER MANA RUNE 
              mpMin = 0, mpMax = 20005550, MPmultiLvl = 1.2, MPmultiMaglvl = 1.3, MPplus = 100, manaValues = {0.8, 0.9}, 
              reqLevel = 8}, 
    [2270] = {-- SUPER MANA RUNE 
              mpMin = 0, mpMax = 150000000, MPmultiLvl = 1.2, MPmultiMaglvl = 1.3, MPplus = 100, manaValues = {1.3, 1.4}, 
              reqLevel = 100}, 
    [2276] = {-- DONATOR MANA RUNE 
              mpMin = 0, mpMax = 200000000, MPmultiLvl = 1.3, MPmultiMaglvl = 1.4, MPplus = 100, manaValues = {1.4, 1.5},
              reqLevel = 8} 
} 

local exhaust = createConditionObject(CONDITION_EXHAUST) 
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 5000)) 
setConditionParam(exhaust, CONDITION_PARAM_SUBID, EXHAUST_HEALING)     

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local rune = RUNES[item.itemid] 
    if not isPlayer(itemEx.uid) then
        return false 
    end 

    if(((rune.reqLevel and getPlayerLevel(cid) < rune.reqLevel) or (rune.vocations and not isInArray(rune.vocations, getPlayerVocation(cid)))) and 
        not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) 
    then 
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Only players " .. (rune.reqLevel and (" of level " .. rune.reqLevel) or "") .. " or above may use this rune.") 
        return true 
    end 

    if(rune.hpMin) then 
        local health = getPlayerLevel(cid) * rune.HPmultiLvl + getPlayerMagLevel(cid) * rune.HPmultiMaglvl + rune.HPplus 
        if(not doCreatureAddHealth(itemEx.uid, math.ceil(math.min(rune.hpMax, math.max(rune.hpMin, math.random(health * rune.hpValues[1], health * rune.hpValues[2]))) * config.healthMultiplier))) then 
            return false 
        end 
    end 

    if(rune.mpMin) then 
        local mana = getPlayerLevel(cid) * rune.MPmultiLvl + getPlayerMagLevel(cid) * rune.MPmultiMaglvl + rune.MPplus 
        if(not doCreatureAddMana(itemEx.uid, math.ceil(math.min(rune.mpMax, math.max(rune.mpMin, math.random(mana * rune.manaValues[1], mana * rune.manaValues[2]))) * config.manaMultiplier))) then 
            return false 
        end 
    end  

    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_RED) 
    for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do 
        if(isPlayer(tid)) then 
            doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) 
        end 
    end 
 
    return true 
end

actions script?
spell script?
 
Back
Top