• 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 Manarune bug?

jeppsonskate

Member
Joined
Apr 3, 2012
Messages
117
Reaction score
18
Location
Sweden
14odfp.jpg


Hope you guys see the picture.

i just fixed Donate manarune to my OT. And when i use the rune i get that black square around the character and yellow skull.

Whats wrong, and how do i fix this?

Im using this

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
 
function onGetFormulaValues(cid, level, maglevel)
    local min = 1200 
        local max = 1300
    return doPlayerAddMana(cid, math.random(min, max))
end
 
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end
 
Last edited by a moderator:
I fixed the image and added lua tag for you. Have you checked so the rune is not aggressive?

If it's enabled (1) then change it to (0).
Code:
aggressive="[COLOR=#ff0000]0[/COLOR]"
 
Try this.

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
 
function onGetFormulaValues(cid, level, maglevel)
    local min = 1200 
        local max = 1300
    return doPlayerAddMana(cid, math.random(min, max))
end
 
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

Although I'm pretty sure that won't work, but I need you to give it a try. Otherwise, It's probably an onCastSpell() bug.
 
Try removing the line that has TARGETCASTERORTOPMOST, if that doesn't fix it then just make it an action script and add exhaust to it
 
Back
Top