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

[TFS 1.3] [RevScript] Simple cool looking aura spell

Marko999x

999x era
Premium User
Joined
Dec 14, 2017
Messages
2,847
Solutions
82
Reaction score
1,955
Location
Germany
YOU NEED:

Preview:

You can change everything on the config part :D

add the spell to

data/scripts/CallItHowEverYouWant
Lua:
local config = {
    type = COMBAT_DEATHDAMAGE,
    effect = 18, --
    distance = 32, -- Distance effect
    rounds = 5, -- How many rounds
    time = 250 -- How fast it should be
}

local combat = Combat()
local combat2 = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, config.type)
combat2:setParameter(COMBAT_PARAM_TYPE, config.type)
combat:setParameter(COMBAT_PARAM_EFFECT, 0)
combat2:setParameter(COMBAT_PARAM_EFFECT, config.effect)

local area = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0 },
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
}

local area2 = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
}

combat:setArea(createCombatArea(area))
combat2:setArea(createCombatArea(area2))

function onGetFormulaValues(player, level, magicLevel) -- DISTANCE EFFECT FORMULAS
    local min = (level / 5) + (magicLevel * 5) + 25
    local max = (level / 5) + (magicLevel * 6.2) + 45
    return -min, -max
end

function onGetFormulaValues2(player, level, magicLevel) -- INSIDE OF AURA EFFECT FORMULAS
    local min = (level / 5) + (magicLevel * 5) + 25
    local max = (level / 5) + (magicLevel * 6.2) + 45
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat2:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues2")

local function castSpellTo(cid, variant)
    local player = Player(cid)
    if player then
        local pos = player:getPosition()
        Position(pos.x+2, pos.y+2, pos.z):sendDistanceEffect(Position(pos.x+3, pos.y, pos.z), config.distance)
        Position(pos.x+3, pos.y, pos.z):sendDistanceEffect(Position(pos.x+2, pos.y-2, pos.z), config.distance)
        Position(pos.x+2, pos.y-2, pos.z):sendDistanceEffect(Position(pos.x, pos.y-3, pos.z), config.distance)
        Position(pos.x, pos.y-3, pos.z):sendDistanceEffect(Position(pos.x-2, pos.y-2, pos.z), config.distance)
        Position(pos.x-2, pos.y-2, pos.z):sendDistanceEffect(Position(pos.x-3, pos.y, pos.z), config.distance)
        Position(pos.x-3, pos.y, pos.z):sendDistanceEffect(Position(pos.x-2, pos.y+2, pos.z), config.distance)
        Position(pos.x-2, pos.y+2, pos.z):sendDistanceEffect(Position(pos.x, pos.y+3, pos.z), config.distance)
        Position(pos.x, pos.y+3, pos.z):sendDistanceEffect(Position(pos.x+2, pos.y+2, pos.z), config.distance)
        combat:execute(player, variant)
        combat2:execute(player, variant)
    end
end

local spell = Spell(SPELL_INSTANT)

function spell.onCastSpell(creature, variant)
    local cid = creature:getId()
    for i = 1, config.rounds do
        addEvent(castSpellTo, config.time * (i -1), cid, variant)
    end
    return true
end

spell:name("aura")
spell:words("exura aura")
spell:group("attack")
spell:vocation("sorcerer", "master sorecerer")
spell:id(1)
spell:cooldown(1000)
spell:level(200)
spell:manaPercent(1)
spell:blockWalls(true)
spell:register()
 
Last edited:
i like it, thanks for sharing. Definitely going to play with it :)
 

Attachments

  • Screen Recording 2021-03-18 at 10.17.25 PM.mp4
    3.4 MB
if you want to use it for your monster then use this version:

Lua:
local config = {
    type = COMBAT_DEATHDAMAGE,
    effect = 18, --
    distance = 32, -- Distance effect
    rounds = 5, -- How many rounds
    time = 250, -- How fast it should be
    minDamage = -250,
    maxDamage = -350
}

local combat = Combat()
local combat2 = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, config.type)
combat:setFormula(COMBAT_FORMULA_DAMAGE, config.minDamage, -0, config.maxDamage, -0)
combat2:setParameter(COMBAT_PARAM_TYPE, config.type)
combat:setParameter(COMBAT_PARAM_EFFECT, 0)
combat2:setFormula(COMBAT_FORMULA_DAMAGE, config.minDamage, -0, config.maxDamage, -0)
combat2:setParameter(COMBAT_PARAM_EFFECT, config.effect)

local area = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0 },
{ 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
}

local area2 = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
{ 0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
}

combat:setArea(createCombatArea(area))
combat2:setArea(createCombatArea(area2))

local function castSpellTo(cid, variant)
    local creature = Creature(cid)
    if creature then
        local pos = creature:getPosition()
        Position(pos.x+2, pos.y+2, pos.z):sendDistanceEffect(Position(pos.x+3, pos.y, pos.z), config.distance)
        Position(pos.x+3, pos.y, pos.z):sendDistanceEffect(Position(pos.x+2, pos.y-2, pos.z), config.distance)
        Position(pos.x+2, pos.y-2, pos.z):sendDistanceEffect(Position(pos.x, pos.y-3, pos.z), config.distance)
        Position(pos.x, pos.y-3, pos.z):sendDistanceEffect(Position(pos.x-2, pos.y-2, pos.z), config.distance)
        Position(pos.x-2, pos.y-2, pos.z):sendDistanceEffect(Position(pos.x-3, pos.y, pos.z), config.distance)
        Position(pos.x-3, pos.y, pos.z):sendDistanceEffect(Position(pos.x-2, pos.y+2, pos.z), config.distance)
        Position(pos.x-2, pos.y+2, pos.z):sendDistanceEffect(Position(pos.x, pos.y+3, pos.z), config.distance)
        Position(pos.x, pos.y+3, pos.z):sendDistanceEffect(Position(pos.x+2, pos.y+2, pos.z), config.distance)
        combat:execute(creature, variant)
        combat2:execute(creature, variant)
    end
end

function spell.onCastSpell(creature, variant)
    local cid = creature:getId()
    for i = 1, config.rounds do
        addEvent(castSpellTo, config.time * (i -1), cid, variant)
    end
    return true
end
 
Hmm, i noticed that the Damage effect doesn't follow the aura, any chance you could implement this? <3
 
Hmm, i noticed that the Damage effect doesn't follow the aura, any chance you could implement this? <3
Make the spell faster or decrease how many rounds it has, i know it's not a proper fix but it's a very easy way to make the damage 'follow' you like the projectiles do.
 
I believe that many people will benefit from using your contribution. It looks great! And I guess this a bump. Ima using it rn ;).
 

Similar threads

Back
Top