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

Programmer [Paid Job] New spell functionality

poe6man3

Member
Joined
Aug 6, 2020
Messages
87
Solutions
1
Reaction score
12
Im looking to create new functionality.
Here is the video with example:
Another one:
Additional info:
When spell is used/or called with a function inside spell the player is shown the area of the spell and is able to choose position where the spells damage/effect is dealth/shown
If player goes further then the area range the sprite of a spell area is changed into red color

Spell example:
Lua:
local animation = {
    cast = {
        start = 29,
        stop = 33
    },
    loopFirst = {
        start = 34,
        stop = 37
    },
    loopSecond = {
        start = 38,
        stop = 41
    },
    attack = {
        start = 42,
        stop = 50
    },
    fail = {
        start = 51,
        stop = 55
    }
}

local function loopAnimation(creature, lookType)
    if not creature or creature:isRemoved() then return end
   
    creature:setOutfit({lookType = lookType})

    if lookType == animation.loopFirst.stop then
        addEvent(loopAnimation, 100, creature, animation.loopSecond.start)
    elseif lookType == animation.loopSecond.stop then
        addEvent(loopAnimation, 100, creature, animation.loopFirst.start)
    else
        addEvent(loopAnimation, 100, creature, lookType + 1)
    end
end

local function castAnimation(creature, lookType)
    if not creature or creature:isRemoved() then return end
   
    creature:setOutfit({lookType = lookType})

    if lookType == animation.cast.stop then
        addEvent(loopAnimation, 100, creature, animation.loopFirst.start)
        AND THERE I WANT TO SHOW THE PLAYER THE AREA AND LET HIM CHOOSE THE POSITION WHERE TO THROW THE SPELL <--------------------------
    else
        addEvent(castAnimation, 100, creature, lookType + 1)
    end
end


local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, true)


local spell = Spell(SPELL_INSTANT)

function spell.onCastSpell(creature, variant)

    addEvent(castAnimation, 100, creature, animation.cast.start)
end

spell:name("genki dama")
spell:words("genki dama")
spell:group("attack")
spell:id(10)
spell:level(20)
spell:magiclevel(5)
spell:cooldown(10000) -- milliseconds, 10 seconds
spell:needTarget(false)
spell:isAggressive(true)
spell:allowFarUse(false)
spell:vocation("goku")
spell:register()
 
Back
Top