Hello! I'm trying to make my regen spell scale with lvl and ml, but failing hard!
This is the crap i made, but it wont work... I managed to make it work once using a script i found that used potions to scale with lvl and adjusting with this one, but it was glitchy and only worked 50% of the time lol.
Any help is apreciated <3
This is the crap i made, but it wont work... I managed to make it work once using a script i found that used potions to scale with lvl and adjusting with this one, but it was glitchy and only worked 50% of the time lol.
Any help is apreciated <3
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_SUBID, 1)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1)
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 1000)
combat:addCondition(condition)
function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 18.5)
local max = (level / 5) + (maglevel * 25)
return min, max
end
function onCastSpell(creature, var)
return combat:execute(creature, var)
end