• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Question - Spell handling in Macro

Crystane

Well-known member
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
/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