local combats = {}
local areas = {
-- Area 1
{ arr = {{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 3, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1}},
effect = CONST_ME_TUTORIALSQUARE
},
-- Area 2
{ arr = {{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 3, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1}},
type = COMBAT_FIREDAMAGE,
effect = CONST_ME_FIREAREA
},
-- Area 3
{ arr = {{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 3, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0}},
effect = CONST_ME_TUTORIALSQUARE
},
-- Area 4
{ arr = {{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 3, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 1, 0, 1, 0, 1},
{0, 1, 0, 1, 0, 1, 0}},
type = COMBAT_FIREDAMAGE,
effect = CONST_ME_FIREAREA
}
}
for i, arr in pairs(areas) do
combats[i] = Combat()
if arr.effect then combats[i]:setParameter(COMBAT_PARAM_EFFECT, arr.effect) end
combats[i]:setArea(createCombatArea(arr.arr))
if arr.type then
combats[i]:setParameter(COMBAT_PARAM_TYPE, arr.type)
function onGetFormulaValues(player, level, magicLevel)
local min = (level / 5) + (magicLevel * 8) + 50
local max = (level / 5) + (magicLevel * 12) + 75
return -min, -max
end
combats[i]:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
end
end
local function castSpell(creatureId, variant, combatIndex)
local creature = Creature(creatureId)
if creature then
combats[combatIndex]:execute(creature, variant)
end
end
local spell = Spell("instant")
function spell.onCastSpell(creature, variant)
for i = 2, #areas do
addEvent(castSpell, 500 * i, creature:getId(), variant, i)
end
return combats[1]:execute(creature, variant)
end
spell:name("Hell's Core 2")
spell:words("exevo gran flam")
spell:group("attack")
spell:vocation("sorcerer", "master sorcerer")
spell:id(24)
spell:cooldown(40 * 1000)
spell:groupCooldown(4 * 1000)
spell:level(60)
spell:mana(1100)
spell:isSelfTarget(true)
spell:isPremium(true)
spell:register()