Spell Book Macro

hoppy96pgtbs

( o Y o )
Joined
Nov 21, 2006
Messages
1,081
Reaction score
13
Points
38
Location
Wikki Wikki Wichita Ks
Anyone have a macro that scribes spells from inventory to spell book? If so, please do share :D

If not, I'd donate 20$ for someone to write one. I would donate even more if it would go from vendor to vendor in PoK and purchase/scribe all spells from 1-81+

I'm not lazy, it's too time consuming when dealing with new toons with no spells @ lvl 100.
 
Last edited:
Here is an old one I used, it seems to work on bags with 10 slots or less (my newbie character) but would have to be modified for the bigger bags:

Code:
Sub Main
   /echo scribe all macro by gimp started

   /declare i int local
   /declare j int local
   
   /if (${Cursor.ID}) /inventory

   /if (!${Window[SpellBookWnd].Open}) /squelch /windowstate SpellBookWnd open

   /for i 1 to 10
      /if (${InvSlot[pack${i}].Item.Container}) {

         /if (!${Window[Pack${i}].Open}) /itemnotify pack${i} rightmouseup
         | need a small delay so bag content can load
         /delay 1

         /for j 1 to ${InvSlot[pack${i}].Item.Container}
            /if (${InvSlot[pack${i}].Item.Item[${j}].Type.Equal["Scroll"]} && ${InvSlot[pack${i}].Item.Item[${j}].Spell.Level} <= ${Me.Level} && !${Me.Book[${InvSlot[pack${i}].Item.Item[${j}].Spell.Name}]}) {

               /echo Please scribe ${InvSlot[pack${i}].Item.Item[${j}].Spell.Name} on cursor
               /itemnotify in pack${i} ${j} leftmouseup
               
               | Need a small delay so pickup event can happen
               /delay 1

               | Loop while user scribes the spell
               :WaitForScribe
               /if (${Cursor.ID}) /goto :WaitForScribe
            }
         /next j

         /if (${Window[Pack${i}].Open}) /itemnotify pack${i} rightmouseup
      }
   /next i

   /if (${Window[SpellBookWnd].Open}) /squelch /windowstate SpellBookWnd close
/return
 
I use that macro along with the SCAPurchase to check what I am missing, and then buy them from the vendors. It takes a long time to run, but then all you have to do is go up to each vendor, open their window, and then do Shift+Y to buy the spells.
 
ive lvld casters to 100 and had nothing but the spell they got at the beginning, shielding and a dd

even now at max lvl max aa they use current spells and misc spells that werent upgraded, I didnt waste time w getting every spell for every lvl
 
Anyone have a macro that scribes spells from inventory to spell book? If so, please do share :D

If not, I'd donate 20$ for someone to write one. I would donate even more if it would go from vendor to vendor in PoK and purchase/scribe all spells from 1-81+

I'm not lazy, it's too time consuming when dealing with new toons with no spells @ lvl 100.

There is a scribing macro in the VIP forums over at MQ2. Can donate to them and track down that macro. I had to modify the macro a bit (it would not click tomes to learn them).

I use a personal macro I wrote to buy all needed spells/tomes/songs from a targeted merchant, then I use the scribe macro to scribe them all. It is definitely a time saver when you are primarily PLing characters.
 
Anyone have a macro that scribes spells from inventory to spell book? If so, please do share :D

If not, I'd donate 20$ for someone to write one. I would donate even more if it would go from vendor to vendor in PoK and purchase/scribe all spells from 1-81+

I'm not lazy, it's too time consuming when dealing with new toons with no spells @ lvl 100.

There is a scribing macro in the VIP forums over at MQ2. Can donate to them and track down that macro. I had to modify the macro a bit (it would not click tomes to learn them).

I use a personal macro I wrote to buy all needed spells/tomes/songs from a targeted merchant, then I use the scribe macro to scribe them all. It is definitely a time saver when you are primarily PLing characters.

Thanks for the tip. A quick search over at Mq2 dot com revealed a modified version of the macro posted above, that automatically picks up the spell and scribes it in the spell book. Win.
 
Anyone have a macro that scribes spells from inventory to spell book? If so, please do share :D

If not, I'd donate 20$ for someone to write one. I would donate even more if it would go from vendor to vendor in PoK and purchase/scribe all spells from 1-81+

I'm not lazy, it's too time consuming when dealing with new toons with no spells @ lvl 100.

There is a scribing macro in the VIP forums over at MQ2. Can donate to them and track down that macro. I had to modify the macro a bit (it would not click tomes to learn them).

I use a personal macro I wrote to buy all needed spells/tomes/songs from a targeted merchant, then I use the scribe macro to scribe them all. It is definitely a time saver when you are primarily PLing characters.

Thanks for the tip. A quick search over at Mq2 dot com revealed a modified version of the macro posted above, that automatically picks up the spell and scribes it in the spell book. Win.

The macro you found (unless it's been updated in the last 5 months or so) will stall if it picks up a tome for a melee class. It will sit with it on cursor until you do something with it. It wasn't hard for me to modify the code to handle the tomes.
 
Here is what I use. The buy one is a little spammy and should be rewritten.

Code:
|| Macro ScribeAll.mac
||
|| Originally coded by gimp 
|| Modified 2012-12-03 by Dewey2461 to add autoclicking of spell book slot. 

Sub Main
   /echo scribe all macro by gimp started

   /declare i int local
   /declare j int local
   /declare b int local 0
   /declare p int local 1
   /declare s int local -1
   
   
   /if (${Cursor.ID}) /inventory

   /if (!${Window[SpellBookWnd].Open}) /squelch /windowstate SpellBookWnd open
  

   /for i 1 to 10
      /if (${InvSlot[pack${i}].Item.Container}) {

         /if (!${Window[Pack${i}].Open}) /itemnotify pack${i} rightmouseup
         | need a small delay so bag content can load
         /delay 1

         /for j 1 to ${InvSlot[pack${i}].Item.Container}
            /if (${InvSlot[pack${i}].Item.Item[${j}].Type.Equal["Scroll"]} && ${InvSlot[pack${i}].Item.Item[${j}].Spell.Level} <= ${Me.Level} && !${Me.Book[${InvSlot[pack${i}].Item.Item[${j}].Spell.Name}]}) {

				/echo Please scribe ${InvSlot[pack${i}].Item.Item[${j}].Spell.Name} on cursor
				/itemnotify in pack${i} ${j} leftmouseup

				| Need a small delay so pickup event can happen
				/delay 1

				| Logic for finding which spell book page and slot next spell should go. 
				:FindNextBlankSpot
				/varcalc b ${b}+1
				/varcalc s ${s}+1
				/if (${s}>15) {
					/varset s 0
					/varcalc p ${p}+2
				}

				|/echo Me.Book[${b}] = page ${p} , slot ${s} = ${Me.Book[${b}]}
				/if (${Me.Book[${b}].Name.NotEqual[NULL]}) /goto :FindNextBlankSpot

				/book ${p}
				/delay 2
				/notify SpellBookWnd SBW_Spell${s} leftmouseup
			   
				| Loop while user scribes the spell
				:WaitForScribe
				/if (${Cursor.ID}) /goto :WaitForScribe
            }
         /next j

         /if (${Window[Pack${i}].Open}) /itemnotify pack${i} rightmouseup
      }
   /next i

   /if (${Window[SpellBookWnd].Open}) /squelch /windowstate SpellBookWnd close
/return

Buyspells
Code:
Sub Main
	/echo STARTING: BuySpells  - will check merchant for spells your missing and buy them.
	/if ( !${Merchant} ) {
		/popup Browse merchant window and rerun
		/end
	}

	/declare b int local 
	/declare x int local 
	/declare i int local 
	/declare v string
	/declare s string
	/declare l2 int 

	/varset x 1

	:loop
		/varset b 0
		/varset v ${Window[MerchantWnd].Child[ItemList].List[${x},2]} 

|		/echo ${v} ${v.Length} b = ${b}

		/if ( !${v.Length} ) /goto :done

		/if ( ${v.Mid[1,5].Equal[Song:]})	/varset b 1
		/if ( ${v.Mid[1,6].Equal[Spell:]}) 	/varset b 1
		/if ( ${v.Mid[1,7].Equal[Scroll:]}) 	/varset b 1

		/if ( ${v.Mid[1,5].Equal[Song:]})	/varset v ${v.Mid[6,30]}
		/if ( ${v.Mid[1,6].Equal[Spell:]}) 	/varset v ${v.Mid[7,31]}
		/if ( ${v.Mid[1,7].Equal[Scroll:]}) 	/varset v ${v.Mid[8,32]}


		/if ( ${b} && !${Me.Book[${v}]} ) {
			/varset b 0
			/echo ${v}

			/notify MerchantWnd ItemList listselect ${x} 
			/delay 3
			/notify MerchantWnd ItemList rightmouse ${x}
			/delay 3

			/echo testing popup name ${v} -> ${DisplayItem.Name}
			
			/for i 1 to ${DisplayItem.Classes}
				/varset s ${DisplayItem.Class[${i}]}
				/if ( ${s.Equal[${Me.Class}]} ) /varset b 1
			/next i

			/if (${b}) {
				/echo BUY: ${v} -> ${DisplayItem.Name} = ${DisplayItem.Class[1]}

				/notify MerchantWnd ItemList leftmouse ${x} 
				/ctrlkey /notify MerchantWnd MW_Buy_Button leftmouseup
				/delay 5
			}
		}

		/varcalc x ${x}+1
		/goto :loop
	:done


/end
 
question

Does this .mac buy spells from the merchant that the merchant doesn't actually sell? I saw on redguides a mac that bought spells from merchant you need... Even if the merchant doesn't sell the spell... Let me know please! Thanks.
 
Updated the buyspells.mac Dewey had posted before.

| 2013-09-26 Dewey2461 - Original posted
| 2016-01-17 Flatlined - Updated to remove the pop up inspects, reduce spam output, and only purchase if not already in inventory

Also to answer above post (although it is old), the script does not buy things from the merchant that the merchant does not sell ... you open the merchant, run the script, it buys any spells that merchant has, that you do not have in inventory or spell book.

Then use the previous scribeall.mac,back in Dewey's post, at any time, to scribe any spell scrolll in inventory, that you can scribe due to level and so on.

Maybe they would be worth including in the macro folder supplied with the build.


Code:
| Buyspells.mac
| 2013-09-26 Dewey2461 - Original posted 
| 2016-01-17 Flatlined - Updated to remove the pop up inspects, reduce spam output, and only purchase if not already in inventory

Sub Main
	/echo STARTING: BuySpells  - will check merchant for spells you are missing and buy them if you don't have them in inventory already.
	/if ( !${Merchant} ) {
		/popup Browse merchant window and rerun
		/end
	}

	/declare b int local 
	/declare x int local 
	/declare i int local 
	/declare v string
	/declare o string
	/declare s string
	/declare l2 int 

	/varset x 1

	:loop
		/varset b 0
		/varset v ${Window[MerchantWnd].Child[ItemList].List[${x},2]} 
		/varset o ${v}

		|/echo ${v} ${v.Length} b = ${b}

		/if ( !${v.Length} ) /goto :done

		/if ( ${v.Mid[1,5].Equal[Song:]})	/varset b 1
		/if ( ${v.Mid[1,6].Equal[Spell:]}) 	/varset b 1
		/if ( ${v.Mid[1,7].Equal[Scroll:]}) 	/varset b 1

		/if ( ${v.Mid[1,5].Equal[Song:]})	/varset v ${v.Mid[6,30]}
		/if ( ${v.Mid[1,6].Equal[Spell:]}) 	/varset v ${v.Mid[7,31]}
		/if ( ${v.Mid[1,7].Equal[Scroll:]}) 	/varset v ${v.Mid[8,32]}

		/if ( ${b} && !${Me.Book[${v}]} && !${Bool[${FindItem[${o}]}]} ) {
			/varset b 0

			/notify MerchantWnd ItemList listselect ${x} 
			/delay 3

			/for i 1 to ${DisplayItem.Classes}
				/varset s ${DisplayItem.Classes[${i}]}
				/if ( ${s.Equal[${Me.Class}]} ) /varset b 1
			/next i
			/varset b 1

			/if (${b}) {

    			/if (!${Me.FreeInventory}) {
    			    /beep
    			    /echo INVENTORY FULL !
    			    /echo Wanted to BUY: ${o} 
    			    /return
    			}			
				
				/echo BUY: ${o} 
				/notify MerchantWnd ItemList leftmouse ${x} 
				/ctrlkey /notify MerchantWnd MW_Buy_Button leftmouseup
				/delay 5
			}
		}


		/varcalc x ${x}+1
		/goto :loop
	:done


/end
 
Last edited: