• 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 Adding Spells

8408323

Hoster
Joined
Mar 6, 2009
Messages
432
Reaction score
26
Hi OtLand,

I'm trying to create a custom spell system for my server, however I've encountered a problem when I exceed to current number of spells in spells.xml (the spellid number). I'm using TFS 1.0 with Tibia client 10.41. The problem is that the client crashes when casting the spell as a ordinary vocation, but when casting as a higher group than a player the spells works fine. The spell just looks like this
Code:
<instant group="healing" spellid="169" name="Test" words="test" lvl="1" mana="10" aggressive="0" selftarget="1" exhaustion="6000" groupcooldown="1000" needlearn="0" script="test/test.lua">
                <vocation name="Knight"/>
                <vocation name="Elite Knight"/>
            </instant>
The client crash report says that
Code:
Spell < SPELL_BEYONDLAST
and it does mention the spellid as well (169). I interpret this as the spellid has exceeded the maximum number.

However, what makes me doubt on my interpretation is that it works to cast the spell as a god i.e.. Which I think should make a crash as well. Therefore I started to think that the problem is in the flags of different groups, or at lest that you can solve the problem there in any way.

Anyone who ha any ideas?
Thnaks in advice,
Kind Regards,
8408323
 
Have you tried removing the spellid line?
So it looks like this:
Code:
<instant group="HEALING" name="Test" words="test" lvl="1" mana="10" aggressive="0" selftarget="1" exhaustion="6000" groupcooldown="1000" needlearn="0" script="test/test.lua">
                <vocation name="Knight"/>
                <vocation name="Elite Knight"/>
            </instant>

It might work.
 
the spellid is there so it links itself to a spell icon, so you can use the same id multiple times without a problem, i am not too sure tho
 
Hello, just wanted to say thanks,
cause i was having the same problem,
i made a spell, and whenever a normal character would use it, the client would crash, but not with the higher access characters,
as previously said, its because the spellid links the spell to an icon so it crashes if it cant be found, and gamemasters don't use any icons so the spells would work.
removing the spellid fixes this,
thanks again.
 
Back
Top Bottom