Hello, does anybody have idea what to use/how can i make this.
My goal is to make a spell which waits for player to choose position where to throw a spell (something like a rune but i want to show that area of the spell)
The spell:
Anybody have any idea would love to see it.
Using latest tfs and otcv8
My goal is to make a spell which waits for player to choose position where to throw a spell (something like a rune but i want to show that area of the spell)
The spell:
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()
Anybody have any idea would love to see it.
Using latest tfs and otcv8