${Spell[blah].Slot[#]} sometimes crashes

PumpThump

Member
Joined
Jan 28, 2011
Messages
603
Reaction score
5
Points
18
Age
37
So I thought I'd try to compile a definitive list of every spell in game that enables invisibility (partially out of boredom and looking for a challenge, partially because I want to make a quick macro that will drop invis no matter what the invis is. Here's my code...

Code:
Sub Main

	/declare x int local 0
	/declare ctr int local 0
	/for x 1 to 50000
		/echo ${x}
		/if (${Spell[${x}].Slot[1].Find[Invisibility]} || ${Spell[${x}].Slot[2].Find[Invisibility]} || ${Spell[${x}].Slot[3].Find[Invisibility]} || ${Spell[${x}].Slot[4].Find[Invisibility]} || ${Spell[${x}].Slot[5].Find[Invisibility]}) {
			/echo ${Spell[${x}]}
			/ini "InvisSpells.ini" "Invis" "Spell${ctr}" "${Spell[${x}]}
			/varcalc ctr ${ctr}+1
		}
	/next x
	
/end

It works just fine until it occasionally crashes. I thought it was randomly crashing, but I put in the /echo ${x} and found exactly where it crashes (at least one spot). It crashes when trying to access...

${Spell[15931].Slot[3].Find[Invisibility]}

I found this out by just typing in each variable in the /if statement until it crashed manually, and it always does on that one. In lucy, that slot contains the following data...

Unknown #404 (100/-5/0)

Now, I can just work around the occasional crashes when it hangs up on a spell by restarting it and adjusting the X everytime, but I was wondering if there might be an issue with the Slot accessing the data if it's Unknown like that?
 
It is only unknown on lucy, and it is just wrong on ours. I used the example on raidloot and apparently that isnt accurate. It is trying to access the .Base on that as part of the info and it should be something else. As is, an /echo of Spell[15931].Slot[3] should be:
3: Limit Spell Subcategory: Exclude 5

But that 5 is obviously wrong, it should be .SPA or .Subcategory or .Category or .Attrib[3] but I dont know which yet. For now, just dont access that. We will have to remove or fix the unknown 404 case. I will mention it to htw.

EDIT: i see what it is doing, 5 should be the 5th case under Spell case Subcategory. i let htw know as I dont know how to fix it right now.
 
Last edited:
A list of all the SPAs in the game was posted on the eq forums about a week ago. Not sure if that helps you out.
 
Nah, we already had those and what they posted was the generic version.
 
SPA 404 looks to work exactly like SPA 403, only 404 limits by subcategory vs 403 limits by category.
 
Last edited:
Right, but 403 is jacked up too. I had commented it out so it doesnt crash the compile, but didnt comment out 404 at the same time. Also, for reference, Category and Subcategory are the same index returns so for what it is doing, it doesnt matter. ie. case 5 is the same on both of them.
 
That's good to know, I wasn't aware of that.
 
Gee whiz info: Category and Subcategory can be found in the dbstr_us.txt in your EQ folder. the categories are part of x^5, so a few random:
1^5^Aegolism^0
5^5^Antonica^0
8^5^Bane^0
14^5^Cold^0

Which now that I look at it, doesnt make any sense that it would be using the category for that spell he mentioned, because it obviously doesnt limit it to antonica group. I believe it is the spellgroup TLO member that we hadnt put in yet, because that is what i commented out for the 403 saying we had to wait until it was implemented.

ie:
Code:
    public enum SpellCategory
    {
        Cures = 2,
        Offensive_Damage = 3, // nukes, DoT, AA discs, and spells that cast nukes as a side effect
[COLOR=Yellow]        Heals = 5,[/COLOR]
        Lifetap = 6,
        Transport = 8
    }

My guess is it works on all spells that aren't tagged as heals, which makes sense for that spell and it follows what I previously had put for 403. It has been months since i messed with that 403 case so I just dont remember the specifics.
 
I changed it, will test in game shortly. Will be in next release.

htw