Spells in spellbook

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Spells in spellbook

Post by wassup » Sat May 01, 2004 1:49 am

Nothing major, but maybe useful to people.

This will make a log of all your spells in your spellbook by level. The log will be in your logs folder.

Code: Select all

#turbo 20
Sub Main
   /declare spells[400,2] string outer UNDEFINED-ELEMENT
   /declare slot int local
   /declare thisLevel int local
   /declare dots string local
   /varset dots ........................................
   /varset thisLevel 1
   /mqlog Spells in ${Me.Name}'s spellbook
   /mqlog

   :Top
   /if (${thisLevel}<=${Me.Level}) {
      /for slot 1 to 400
         /if (${Me.Book[${slot}].Level}==${thisLevel}) {
            /mqlog ${Me.Book[${slot}].Name}${dots.Left[${Math.Calc[40-${Me.Book[${slot}].Name.Length}].Int}]}Level: ${Me.Book[${slot}].Level}
         }
      /next slot
      /varcalc thisLevel ${thisLevel}+1
      /goto :Top
   }
   /echo Completed Search... log is in your logs folder
/endmacro
Edit: Changed Competed to Completed
Edit: Fixed the < problem
Edit: Fixed a missing bracket (thanks fearless)
Last edited by wassup on Wed Mar 30, 2005 10:05 pm, edited 6 times in total.

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Sat May 01, 2004 4:01 am

it makes the log..the log just says the time and SonSos spell book..nothing else

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sat May 01, 2004 4:28 am

bzt wrote:it makes the log..the log just says the time and SonSos spell book..nothing else
Odd, works fine here.

Are you letting it complete?

I suppose I could do it a different way that would probably be faster now that I think about it...

I just did this on the spur of the moment.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sat May 01, 2004 2:18 pm

I redid the macro to make it faster...

Shouldn't take nearly as long as it did before, but realize it searches each slot of your spellbook for each level of your character.

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Sat May 01, 2004 2:30 pm

that worked great!

rasor
orc pawn
orc pawn
Posts: 15
Joined: Fri May 14, 2004 12:46 am

Post by rasor » Mon May 17, 2004 9:50 am

I saved the macro as spellbook.mac

I ran the macro as /macro spellbook.mac

it says "completed search..log is in your logs folder"

when i go to log folder.... nothing no log to be found. any idea?

don'tdoit
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 12:24 pm

Post by don'tdoit » Mon May 17, 2004 9:58 am

are you looking in your EQ logs folder or your MQ logs folder?

Some Guy
a ghoul
a ghoul
Posts: 119
Joined: Thu Apr 29, 2004 5:32 pm

Post by Some Guy » Mon Feb 14, 2005 11:53 pm

You are missing a } here:

Code: Select all

   /if (${thisLevel[color=red]}[/color]<=${Me.Level}) {