• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Spell handling in Macro

Crystane

Well-known member
Joined
Oct 9, 2005
RedCents
756¢
Heya All,

am back after years and updating my macro's. This includes memming spells.
For this I made a Sub to check for spells in certain order.

Now my problem. For my Wizard in the concussion line there are 2 spells with the exact same name.
They got different lvl and ID. I used to check my SpellBook with Spellnames wich runs into trouble here.
Any help on syntax to convert my macro to use Spell ID s here instead of Names would help.

I need this converted

Rich (BB code):
/if (${Me.Book[Concussive Burst]}>0) {
}


Am sure its pretty easy, if I would know the syntax.

Thx Crystane.
 
You may have to hard code that exception. EQ has a bunch of annoying duplicate things like that in IDs too. I don't recall Book supporting IDs.
 

Attachments

  • crystane.jpg
    crystane.jpg
    142.3 KB · Views: 76
Me.Book[#].ID works fine. Book inherits SpellType and you can use all the same variables as Spell[].blah
 
/echo ${Me.Book[Ethereal Blaze]}
[2014/05/01 19:33:42] [MQ2] 128
/echo ${Me.Book[Ethereal Blaze].ID}
[2014/05/01 19:32:16] No such 'int' member 'ID'
[2014/05/01 19:32:16] [MQ2] NULL

lol
 
# isnt the same as name.

${Me.Book[1].ID} for example.
I skipped a step in the explanation as I thought it was implied:
First you get the book slot.
${Me.Book[Ethereal Blaze]}

Then you use the int from the book slot to get the spell info.
so:
${Me.Book[${Me.Book[Ethereal Blaze]}].ID}
 
What plugin is the Book TLO from?
standard mq2main core.
mq2datatypes.h/.cpp

EDIT:
The only stuff I have enhanced Me.Book related stuff with was: Me.FirstBook/.LastBook
Rich (BB code):
int iBook;

    case FirstBook:
		for (DWORD nSpell=0 ; nSpell < NUM_BOOK_SLOTS ; nSpell++)
			if (GetCharInfo2()->SpellBook[nSpell] != 0xFFFFFFFF)
			{
				Dest.DWord=nSpell+1;
				Dest.Type=pIntType;
				return true;
			}
			return false;
    case LastBook:
		for (DWORD nSpell=0 ; nSpell < NUM_BOOK_SLOTS ; nSpell++)
		{
			if (GetCharInfo2()->SpellBook[nSpell] != 0xFFFFFFFF)
			{
				iBook=nSpell+1;
			}
		}
		if (iBook>0) 
		{
			Dest.DWord=iBook;
			Dest.Type=pIntType;
			return true;
		}
        return false;

Just so when I run spell parse I know where to start and stop.

EDIT2: technically not entirely true, i also have it search for rank2/3 for spell related searches because exact matches cause more headaches than they are worth.
 
Heya all, thx for the replies and examples. I think I can code a workaround with it. Am building a spelldatabase for my toons macros so everyone else may use em without editing any ini files cause the macro will look for the available stuff and use whats best for the macro.

Also, does anyone of you folks have a good contact to an MQ2 Dev? I figured my macros would still run fine as writen 5 years ago, just there is a TLO which doesnt work anymore.

Rich (BB code):
${Group.Member["NAME"]}

used to give back a number and is the way I used it in my stuff. Now it just gives back the "NAME", which is in most cases (ok all) a non-numeric value.
And therefor I had to wrap all uses into
Rich (BB code):
${Bool[]}

Well I got it fixed, still it was like wasted time. And since I have only the windows editor avail atm, ....

Gets me to my next question:

Any suggestions on a good free program for writing macros with?


Thx again Crystane.
 
eqmule is on boards here and main site. Group.Member was changed to match how everything else was set up (for the better). it is an easy fix to change what you are doing, depending on situation.

I use crimson editor for macros. ultra edit, and notepad++ are also widely supported and have some custom specs available around the boards for fancy color highlighting.
 
Question - Spell handling in Macro

Users who are viewing this thread

Back
Top
Cart