• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

looking for a custom uh and mr script

ManaRune
Code:
local exhausted = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhausted, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 500))

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if hasCondition(cid, CONDITION_EXHAUST_HEAL) then
        return doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
    end
   
    return doPlayerAddMana(itemEx.uid, 500000) and doAddCondition(cid, exhausted) and doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE) and doSendAnimatedText(getThingPos(cid), "Donator Mr", TEXTCOLOR_BLUE)
end

UltimateHealingRune
Code:
local exhausted = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhausted, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)
setConditionParam(exhausted, CONDITION_PARAM_SUBID, EXHAUST_HEALING)
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if hasCondition(cid, CONDITION_EXHAUST, EXHAUST_HEALING) then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
    elseif not isPlayer(itemEx.uid) then
        doPlayerSendCancel(cid, 'You can only use this rune on players.')
    elseif getCreatureHealth(itemEx.uid) == getCreatureMaxHealth(itemEx.uid) then
        doPlayerSendCancel(cid, (itemEx.uid == cid and 'You already have' or getCreatureName(itemEx.uid) .. ' already has') .. ' full health.')
    else
        local lvl, mag, min, max = getPlayerLevel(cid), getPlayerMagLevel(cid)
        if isSorcerer(cid) or isDruid(cid) then
            min = lvl * 1.0 + mag * 1.0
            max = lvl * 1.0 + mag * 1.0
        elseif isPaladin(cid) then
            min = lvl * 1.0 + mag * 1.0
            max = lvl * 1.0 + mag * 1.0
        elseif isKnight(cid) then
            min = lvl * 0.5 + mag * 0.5
            max = lvl * 1.0 + mag * 1.0
        end
        local rand = math.random(min, max)
        rand = math.min(400000, rand)
        rand = math.max(1000000, rand)
        doCreatureAddHealth(itemEx.uid, rand)
        doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
        doAddCondition(cid, exhausted)
        doCreatureSay(itemEx.uid, "Donator UH", TALKTYPE_ORANGE_1)
    end
    return true
end
 
ManaRune
Code:
local exhausted = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhausted, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 500))

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if hasCondition(cid, CONDITION_EXHAUST_HEAL) then
        return doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
    end
  
    return doPlayerAddMana(itemEx.uid, 500000) and doAddCondition(cid, exhausted) and doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE) and doSendAnimatedText(getThingPos(cid), "Donator Mr", TEXTCOLOR_BLUE)
end

UltimateHealingRune
Code:
local exhausted = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhausted, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions') - 100)
setConditionParam(exhausted, CONDITION_PARAM_SUBID, EXHAUST_HEALING)
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if hasCondition(cid, CONDITION_EXHAUST, EXHAUST_HEALING) then
        doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
    elseif not isPlayer(itemEx.uid) then
        doPlayerSendCancel(cid, 'You can only use this rune on players.')
    elseif getCreatureHealth(itemEx.uid) == getCreatureMaxHealth(itemEx.uid) then
        doPlayerSendCancel(cid, (itemEx.uid == cid and 'You already have' or getCreatureName(itemEx.uid) .. ' already has') .. ' full health.')
    else
        local lvl, mag, min, max = getPlayerLevel(cid), getPlayerMagLevel(cid)
        if isSorcerer(cid) or isDruid(cid) then
            min = lvl * 1.0 + mag * 1.0
            max = lvl * 1.0 + mag * 1.0
        elseif isPaladin(cid) then
            min = lvl * 1.0 + mag * 1.0
            max = lvl * 1.0 + mag * 1.0
        elseif isKnight(cid) then
            min = lvl * 0.5 + mag * 0.5
            max = lvl * 1.0 + mag * 1.0
        end
        local rand = math.random(min, max)
        rand = math.min(400000, rand)
        rand = math.max(1000000, rand)
        doCreatureAddHealth(itemEx.uid, rand)
        doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
        doAddCondition(cid, exhausted)
        doCreatureSay(itemEx.uid, "Donator UH", TALKTYPE_ORANGE_1)
    end
    return true
end
Sorry But Can you give me one level based? ill rep++
 
Back
Top