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

Spells added to TFS 1.4 not working in OTClient

taytorTots1242

New Member
Joined
Apr 17, 2024
Messages
1
Reaction score
0
GitHub
Betapig1
I've added a spell to the spells.xml file

XML:
<instant group="attack" spellid="300" name="Test Icenado" words="frigo nado" level="1" mana="1" premium="0" selftarget="1" cooldown="40000" groupcooldown="4000" needlearn="0" script="attack/test_icenado.lua">
        <vocation name="Sorcerer" />
        <vocation name="Druid" />
        <vocation name="Paladin" />
        <vocation name="Knight" />
        <vocation name="Master Sorcerer" />
        <vocation name="Elder Druid" />
        <vocation name="Royal Paladin" />
        <vocation name="Elite Knight" />
    </instant>


Created the spell file

Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
combat:setArea(createCombatArea(AREA_CIRCLE6X6))

function onGetFormulaValues(player, level, magicLevel)
    local min = (level / 5) + (magicLevel * 5.5) + 25
    local max = (level / 5) + (magicLevel * 11) + 50
    return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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


Added the spell into the spells.lua file in OTClient

Lua:
    ['Test Icenado'] =           {id = 300, words = 'frigo nado',  exhaustion = 10, premium = false,  type = 'Instant', icon = 'eternalwinter',          mana = 1,   level = 1, soul = 0, group = {[1] = 2000},               vocations = {1, 2, 3, 4, 5, 6, 7, 8}},

And the spell icons object

Lua:
  ['testicenado']                = {300, 301},

The spell shows up in the spell book, however when I try casting the spell it seems like it just processes it as a normal chat message, and it doesn't attempt to cast the spell. There are also no errors in either the client or the server. I feel like I'm missing a file I need to update but everything I have found online only has mentioned the files above. I've also rebuilt both solutions just to be safe.

If anyone has any links or suggestions that would be amazing, thanks
 
Back
Top