- Joined
- Oct 7, 2018
- Messages
- 137
- Solutions
- 4
- Reaction score
- 94
Is the problem in casterTargetOrDirection or is there another type of spell?
Script:
Image:
Script:
Code:
local combat = Combat()
local spell = Spell {
type = SPELL_INSTANT,
words = "Exori San",
name = "exori san",
level = 40,
mana = 20,
range = 4,
casterTargetOrDirection = 1,
blockWalls = 1,
cooldown = 2000,
vocation = {"Paladin", "Royal Paladin"}
}
function onGetFormulaValues(player, level, magicLevel)
local min = (level / 5) + (magicLevel * 1.9) + 8
local max = (level / 5) + (magicLevel * 3) + 18
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
function spell.onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
spell:register()
Image: