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

Runes? Help!

Fittan1

Banned User
Joined
Oct 2, 2008
Messages
49
Reaction score
0
Hiho again. I don't know how to create runes, like manarune so it works. Can someone send a nice tutorial or help me here?

Regards / Karting
 
Code:
  local effect =  12 --the id of the effect you want

function onUse (cid, item, fromPosition, itemEx, toPosition)
if getPlayerMagLevel(cid) >= 0 then
doSendMagicEffect(getCreaturePosition(cid), effect)
doCreatureAddMana(cid, [COLOR="lime"]500[/COLOR])
doCreatureAddHealth(cid, [COLOR="lime"]500[/COLOR])
doCreatureSay(cid, "Manarune!", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, "You don't have enough magic level.")
end
return true
end

Change the numbers highlighted green to change the amount they heal
This is for a fixed amount of healing mana and health

Code:
local effect =  14 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
function onGetFormulaValues(cid, level, maglevel)
[COLOR="lime"]local min = (level * 2 + maglevel * 1) * 3.1
local max = (level * 2 + maglevel * 1) * 3.3[/COLOR]
return math.max(900, min), math.max(1400, max)
end
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")


function onCastSpell(cid, var)
doCreatureSay(cid, "Health Rune!", TALKTYPE_ORANGE_1)
return doCombat(cid, combat, var)
end

Highlighted green= Healing formulas (For Health)
I hope you can figure it out from here
This is a health rune which heals more as you levelup

Nightmare,
 
Back
Top