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

Lua Rescripted 8.54 Manarune

PureDarkSlayer

New Member
Joined
Apr 10, 2009
Messages
62
Reaction score
3
I need this script:
PHP:
local MIN_MANA_GAIN = 200 
local MIN_MANA_RAND = 500 
local MAX_MANA_RAND = 1000 
local ACCEPT_LUCK = true 
local MAG_LEVEL_MULTI = 2 
local LEVEL_MULTI = 2 
local MAGIC_EFFECT = CONST_ME_MAGIC_BLUE
local ANIMATION_COLOR = 41 
local HEAL_TIMES = 1 
local FIRST_HEAL_DELAY = 0 
local HEAL_DELAY = 1000 


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, HEAL_TIMES * HEAL_DELAY + FIRST_HEAL_DELAY)
    
function onCastSpell(cid, var)
    doAddCondition(cid, exhaust)
    local function doHealMana(parameters)
        local random = math.random(MIN_MANA_RAND, MAX_MANA_RAND)
        if ACCEPT_LUCK == true then
        local luck = math.random(1, 100)
            if luck >= 90 then
                random = random * 2
            elseif luck == 50 then
                random = random * 3
            end
        end
        local formula = (getPlayerLevel(cid) * LEVEL_MULTI) + (getPlayerMagLevel(cid) * MAG_LEVEL_MULTI) + random
        local manaGain = math.max(MIN_MANA_GAIN, formula)
        doPlayerAddMana(cid, manaGain)
        doSendAnimatedText(getPlayerPosition(cid), manaGain, ANIMATION_COLOR)
        doSendMagicEffect(getPlayerPosition(cid), MAGIC_EFFECT)
        doCombat(parameters.cid, parameters.combat, parameters.var)
    end

    local times = HEAL_TIMES
    local parameters = {cid = cid, combat = combat, var = var}
    while times > 0 do
        if times == HEAL_TIMES then
            addEvent(doHealMana, FIRST_HEAL_DELAY, parameters)
        else
            addEvent(doHealMana, HEAL_DELAY * times, parameters) 
        end
        times = times - 1
    end
end

Rescripted for 8.54. The reason I ask for this is because when I use it a error that
Code:
setConditionParam
is not found
 
should be fine, yours is bloated
LUA:
function onCastSpell(cid, var)
	doPlayerAddMana(cid, math.max(200, getPlayerLevel(cid) * 2 + getPlayerMagLevel(cid) * 2 + math.random(500, 1000)))
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
	return true
end
 
Back
Top