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

Target spell in data/script problem in "casterTargetOrDirection", this exist?

Status
Not open for further replies.

Ramon Bernardo

Well-Known Member
TFS Developer
Joined
Oct 7, 2018
Messages
137
Solutions
4
Reaction score
94
Is the problem in casterTargetOrDirection or is there another type of spell?

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:
1577451303833.png
 
Yes it exists, you should be using true/false, not 1/0, and the method is needCasterTargetOrDirection.
 
Solution
Status
Not open for further replies.
Back
Top