• 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

Request - Who Needs this spell macro (can you help with the 2 part issue also)

Bogreaper

Member
Joined
Feb 8, 2017
RedCents
113¢
Good Evening.

I have written at the request of a friend ( Ergg from EzServer ) this macro that checks an open corpse window for spells, then asks everyone in the raid, within the zone, if they have the spell in their spell book or if they need it.

It checks the raid.member[].class and compares that to the class of the spell, then gets the spell id from spell[].id and passes that to the ones on the eqbc server that are in the zone and in the raid.
The second macro then takes $[Param0} (Spell id from spell file) and grabs the spell name and checks the characters spell book to see if it is scribed.

I would love to have this in ONE macro, but it does work as is in 2 macros.

But this is short and sweet and does the job for those of us with 18 to 24 characters on one computer, and multiple characters of the same class, trying to remember which character has what spell already.

Any and all clean up of the macro is greatly appreciated.

Usage: Open a corpse window ( loot window ). do NOT loot anything. run /macro whoneedsspell
It will check everything and send a /bct //macro gotdaspell spell.id to the characters that can use it, and wait for a response in /rsay if they need it.

Peace
BogReaper.
 

Attachments

I combined both macros for you into a single one, renamed checkspells.mac (easier to type out imo, change it to whatever you want but make sure you change the macro name in your /bct command line as well).

The only thing that I did was took the contents of gotdaspell.mac and made it it's own sub routine in the whoneedsspell.mac file. When you run the checkspells.mac on your looter, it will run through the main sub as normal, but when it finds a spell, it'll tell your bots to run the checkspells.mac with the spell ID parameter defined. The if statement at the start of the macro will then detect the defined parameter and skip to the other sub, which includes the code from what used to be the separate mac.

I can't get on EQ right now so I can't test the macros you had made, but if they worked before everything should be good.

Rich (BB code):
|CheckSpells.mac


Sub Main


    /if (${Defined[${Param0}]}) {
        /declare CheckSpellID int outer ${Param0}
        /call CheckSpell
    }
    
    /declare loottotal int outer 
    /declare lootslot int outer 
    /declare dateam int local
    /declare classcount int local
    /declare classy string local
    | ----------------- 
    | -- Count items -- 
    | ----------------- 
    
    /varset loottotal ${Math.Calc[${Corpse.Items}]} 
    
    | --------------------- 
    | -- Loot the corpse -- 
    | --------------------- 
    /for lootslot 1 to 40 
        /if (${Corpse.Item[${lootslot}].Spell.Name.NotEqual[NULL]} && ${Corpse.Item[${lootslot}].Type.Equal[Scroll]}) {
            /for dateam 1 to ${Raid.Members}
                /varset classy ${Spawn[pc ${Raid.Member[${dateam}]}].Class}
                /if (${classy.NotEqual[NULL]}) {
                    /for classcount 1 to 16
                        /if (${classy.Equal[${Corpse.Item[${lootslot}].Class[${classcount}]}]}) {
                            /bct ${Raid.Member[${dateam}]} //macro checkspells ${Spell[${Corpse.Item[${lootslot}].Spell.Name}].ID}
                        }
                    /next classcount
                }
            /next dateam
        }
    /next lootslot 


/return


Sub CheckSpell


/if (${Me.Book[${Spell[${CheckSpellID}].Name}]}<1) /rsay I dont have ${Spell[${CheckSpellID}].Name}
/endmac


/return
 

Attachments

See , now that is what I am talking about.

I never thought to make it the same macro just use a different sub routine. That is why I like to ask for suggestions, different people see something from different sides and approach it differently. I REALLY didn't like having 2 macros dependent on each other to run.

Thanks!

Peace
 
Happy to help!

You could take this further if you wanted, and after your bots report who needs the spell, you could add a command such as /givespell <name> that would further instruct that bot to move to the corpse and either loot the spell, or loot it and scribe it. It all depends on how much automation you like though.
 
Request - Who Needs this spell macro (can you help with the 2 part issue also)

Users who are viewing this thread

Back
Top
Cart