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

Solved Mana rune to healing rune

iMesmerize

New Member
Joined
Feb 13, 2015
Messages
2
Reaction score
0
Ok so i found a manarune script wich i really liked since it was so easy to set different managain for each vocation and so on, and then i decided to try and make a healing rune out of it. wich failed epicly, so now i'd like to know why this didn't work (i'm a complete noob when it comes to any sort of coding)

here's the Lua


Code:
local config = {
[{"Sorcerer"}] = {min=250, max=500},
[{"Druid"}] = {min=250, max=500},
[{"Paladin"}] = {min=150, max=350},
[{"Knight"}] = {min=100, max=250},
[{"Master Sorcerer"}] = {min=400, max=500},
[{"Elder Druid"}] = {min=400, max=500},
[{"Royal Paladin"}] = {min=350, max=450},
[{"Elite Knight"}] = {min=150, max=250}
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)


function onCastSpell(cid, var)
for i, j in pairs(config) do
if isInArray(i, getPlayerVocationName(cid)) == TRUE then
doPlayerAddMana(cid,math.random(j.min,j.max))
end
end
return doCombat(cid, combat, var)
end


I tried changing "doPlayerAddMana(cid,math.random(j.min,j.max))" to doPlayerAddHealth .. this did not work, would it work if i added that creature event in Creaturescript/login.lua?

Would also appreciate if someone made it into a healing rune for me! thanks in advance.
 
Ooh, yeah now it works! and thanks, that's good to know :D i'd rep but i don't know how Hahaha
Click on the Like link -------------------------------------------------------------------------------------------------------------------------------------------------------V-------^
 
Back
Top