So, the CONST_ME_ICETORNADO effect isn't working unless im walking? don't know why, would appreciate some help on this, since it seems to work if i change the effect to CONST_ME_FIREAREA.
Im using tfs 1.4, edubart otclient, tibia 1098
Heres my code till now:
heres a video showing the problem im having. in order the actions i take are
1) cast the test spell that only appears while walking
2) cast the spell again but standing still and nothing happens
3) /reload spells with the firearea effect
4) cast the reloaded spell standing still and it appears
Thanks.
Im using tfs 1.4, edubart otclient, tibia 1098
Heres my code till now:
Lua:
local combats = {}
local areas = {
-- Area 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, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 0, 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}},
-- Area 2
{{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, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0}},
-- Area 3
{{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, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 1, 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, 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}},
}
for i = 1, #areas do
combats[i] = Combat()
combats[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combats[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
combats[i]:setArea(createCombatArea(areas[i]))
function onGetFormulaValues(player, level, magicLevel)
local min = 0
local max = 0
return -min, -max
end
combats[i]:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
end
local function castSpell(creatureId, variant, combatIndex)
local creature = Creature(creatureId)
if creature then
combats[combatIndex]:execute(creature, variant)
end
end
function onCastSpell(creature, variant)
for i = 2, #areas do
addEvent(castSpell, 200 * i, creature:getId(), variant, i)
end
return combats[1]:execute(creature, variant)
end
heres a video showing the problem im having. in order the actions i take are
1) cast the test spell that only appears while walking
2) cast the spell again but standing still and nothing happens
3) /reload spells with the firearea effect
4) cast the reloaded spell standing still and it appears
Thanks.
Last edited: