OTcreator
Well-Known Member
- Joined
- Feb 14, 2022
- Messages
- 482
- Solutions
- 1
- Reaction score
- 53
Hello!
I try create rune for vocations (others min, max) but not working.
I can use rune, but still hit to low (not found proffession?)
I try create rune for vocations (others min, max) but not working.
I can use rune, but still hit to low (not found proffession?)
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
function onGetFormulaValues(player, level, magicLevel)
local levelTotal = level / 5
local isKnight = (player:getVocation() == 4) or (player:getVocation() == 8)
local isPaladin = (player:getVocation() == 3) or (player:getVocation() == 7)
if isKnight then
local min = (level * 1 + magicLevel * 4) * 1.85 * 1.5
local max = (level * 1 + magicLevel * 4) * 2.2 * 1.5
return min, max
elseif isPaladin then
local min = (level * 1 + magicLevel * 4) * 1.80
local max = (level * 1 + magicLevel * 4) * 2.2
return min, max
else
local min = levelTotal + (magicLevel * 10) + 9
local max = levelTotal + (magicLevel * 12) + 19
return min, max
end
return min, max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end