@RedQueen found an interesting set of bugs in this one. The 61-70 spells have all been replaced so if you want to use the default ini for this someone needs to go through and fix all of the new spell names. Otherwise, for 61-70 you need to set your ini to the correct spell in the [Spells] section for any characters you want to actually cast the correct buffs. It doesn't error out because the spells still exist in the database, they're just not in the spell book. So it just silently continues on with trying to cast them, which should error out except...
If MQ2Cast_Spell_Routines.inc will set your ${spellName} to the ${Macro.Return} of /call SRFindBookName when it tries to find a spell in your spellbook. NOT finding the spell means that gets set to 0. A check should be added after the section modifying spellName to check to make sure you still have a valid spellName (or that code needs to be cleaned up to not let you settle on an invalid spellName). So, when this macro bombs out on those 61-70 spells right now, it does so silently because the spell exists, but it can't be found in your book.
Outside of that, most of the copy pasted code could be cleaned up and moved into subroutines to avoid all of the duplicate code, but in the latest version, pulling the gem from the ini will never work. because:
Code:
/Declare EncHighLvlBuff1 string outer ${Ini[BuffBot_${EverQuest.Server}_${Me.CleanName}.ini,Spells,61-70 Haste]}
/Declare EncHighLvlBuff1Gem string outer
/if (${Me.Class.Name.Equal[Enchanter]} && ${EncHighLvlBuff1.Find[|]}) {
/varset EncHighLvlBuff1 ${EncHighLvlBuff1.Arg[1,|]}
/varset EncHighLvlBuff1Gem ${EncHighLvlBuff1.Arg[2,|]}
}
At the point where it's trying to get the gem number, the place where it is trying to get the Gem number FROM has already been replaced with just the spell name. Swapping the order would resolve this:
Code:
/Declare EncHighLvlBuff1 string outer ${Ini[BuffBot_${EverQuest.Server}_${Me.CleanName}.ini,Spells,61-70 Haste]}
/Declare EncHighLvlBuff1Gem string outer
/if (${Me.Class.Name.Equal[Enchanter]} && ${EncHighLvlBuff1.Find[|]}) {
/varset EncHighLvlBuff1Gem ${EncHighLvlBuff1.Arg[2,|]}
/varset EncHighLvlBuff1 ${EncHighLvlBuff1.Arg[1,|]}
}
But a check should still be added to see if the data is valid (and, again, all of that moved to a sub so you're not just repeating the same code 1000 times).
Move the spells and buffs into an array and just do it by your class name, your own level, and your target's level range and you could save a ton of code. So, that's how you start if you want to fix this mac. Alternatively, bribe
@ChatWithThisName to turn it into a plugin.