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

Lua Avalanche no visual. [8.0] [TFS 1.2] - Server Global Full [Real Map]

bobby299

New Member
Joined
Nov 11, 2009
Messages
20
Reaction score
0
Hi, I have an issue with Avalanche rune not showing any effects. I got it in game and I can use the rune which does ice dmg but just nothing is showing visually.

Maybe someone know where I shall begin to look?

Spells.XML
LUA:
<rune group="attack" name="Avalanche" id="2274" allowfaruse="1" charges="2" lvl="30" maglv="4" exhaustion="2000" blocktype="solid" script="attack/avalanche.lua"/>

Avalanche.LUA
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
combat:setArea(createCombatArea(AREA_CIRCLE3X3))

function onGetFormulaValues(player, level, maglevel)
    local min = (level / 5) + (maglevel * 1.2) + 7
    local max = (level / 5) + (maglevel * 2.85) + 16
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
    return combat:execute(creature, variant)
end


Items.XML
Code:
    <item id="2274" article="an" name="avalanche rune">
        <attribute key="runeSpellName" value="adori mas frigo" />
        <attribute key="weight" value="52" />
        <attribute key="charges" value="4" />
    </item>

I have also looked inside Const.h and the effects are at least in there but I'm a bit on the new side when it comes to C++ still.

Any help is much appreciated!
 
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
Ice (CONST_ME_ICEAREA), Terra etc. effects were added in 8.1 (it was a biiiiig update: Updates/8.10 (https://tibia.fandom.com/wiki/Updates/8.10) ).
Before 8.1 there were just 4 kinds of damage: physical/energy/fire/poison (most of spells were 'physical').
If you are using downgraded TFS 1.x with 8.0 protocol, author probably did not remove spells added after 8.0, but variable CONST_ME_ICEAREA is probably not set (so it's nil in Lua/not set in C++) and it won't show any effect in client.
 
Ice (CONST_ME_ICEAREA), Terra etc. effects were added in 8.1 (it was a biiiiig update: Updates/8.10 (https://tibia.fandom.com/wiki/Updates/8.10) ).
Before 8.1 there were just 4 kinds of damage: physical/energy/fire/poison (most of spells were 'physical').
If you are using downgraded TFS 1.x with 8.0 protocol, author probably did not remove spells added after 8.0, but variable CONST_ME_ICEAREA is probably not set (so it's nil in Lua/not set in C++) and it won't show any effect in client.
Ohh ye that makes alot of sense.. I was just so convinced that the effects where there since I could find the effect in Const.h , Tools.cpp and luascript.cpp.

But the actual issue is that the sprite simply does not exist in 8.0, I didn't even bother to check the .spr file. Im at work atm but im 100% sure that the number that ICEAREA is pointing to simply does not exist in the .spr file im using for the client.

Thanks for the help! As I said Im quite new at this and learning more each day!
 
Just got home and with this new found info it was really easy to solve, now avalanches is working and I also got a better understanding of downgraded TFS, Thanks again Gesior! :D
 
Back
Top