taytorTots1242
New Member
I've added a spell to the spells.xml file
Created the spell file
Added the spell into the spells.lua file in OTClient
And the spell icons object
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
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