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

Help with manarune script

stato11

New Member
Joined
Dec 25, 2008
Messages
133
Reaction score
1
Hello, im trying to make a manarune for my server but each time i use it, it just adds magic level on, does anyone have a clue why it does this??

the script is:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local addMana = 1000

doPlayerAddMana(cid, addMana)


end
 
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') + 1600))

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local level = getPlayerLevel(cid)
    local mlevel = getPlayerMagLevel(cid)
	local mana_minimum = (level * 3.6) + (mlevel * 1.7) - 50
	local mana_maximum = (level * 4.5) + (mlevel * 2.2)
    local mana_add = math.random(mana_minimum, mana_maximum)
    
    doPlayerAddMana(cid, mana_add)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doSendAnimatedText(cid, mana_add, TEXTCOLOR_PURPLE)
    doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
    doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
    return TRUE
end

Credits: No idea, Sorry.
 
Try with this script
Lua:
 local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) ---- what the color of the effect. you can do like RED/BLUE
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
doPlayerAddMana(cid, 1000) ---- how much it heal .
return doCombat(cid, combat, var)
end
 
Back
Top