• 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
Resource icon

Release Scribe.mac 7-3-2021

No permission to download
Joined
Sep 20, 2005
RedCents
1,793¢
This macro will scribe every spell/tome in your inventory that it is able to. Great for pl'd toons or just when you don't want to find which tomes you are missing or click and mem the 5 or 8 spells you got for your level. It will click yes when scribing rk. ii and rk. iii spells over top of existing ones also.

Any issues let me know.

Edit: Updated code. No longer need to edit to set number of inventory slots. Also now it will buy all available spells from current open merchant window before scribing.
Edit: Added support for melee tomes, and updated code to not buy deity specific spells you can't scribe.
Edit: Now supports level range for buying items, and won't buy rk. i items if you already have a rk.ii/iii.
Edit: It will now loop and keep buying/scribing if you run out of inventory space before you run out of spells to buy.
Edit: Now handles spells/tomes in top level inventory slots, and will use specified slot if you don't have VoA
Change HasVoA to 0 if you don't have VoA and set InvScribeSlot to the slot to use as the right click spot (defaults to 1st inv slot). This is where it will place tomes to right click them
Also fixed duplicate tome buying and sped up spell/tome memorization loops
Edit: Autodetection of HasVoA
Edit: Now uses right clicking scrolls to scribe

Rich (BB code):
| scribe.mac - Sym 9.4.2012
| Updated 12.22.2013
| Buys all available spells and tomes for specified level range (default is level 1 to current level) if a merchant window is open
| It will not buy lower rank spells than you already have. If you have a rk. ii spell it will not buy a rk. i of the same name, but would buy a rk. iii if it was available.
| when finished buying, or if no window open it scribes every available spell/tome found in inventory (regardless of level range given)
|
| It will now loop and keep buying/scribing if you run out of inventory space before you run out of spells to buy.
|
|
| Usage: /mac scribe minlevel maxlevel
|
| /mac scribe 10 20
| ^^ This will buy all spells/tomes from levels 10 to 20 from the current merchant
|
| /mac scribe
| ^^ This will buy all spells/tomes from level 1 to your current level from the current merchant
|
| /mac scribe 30
| ^^ This will buy all spells/tomes from level 30 to your current level from the current merchant
|

#event FullInventory "#*#Your inventory appears full!#*#"
#event NotGold "#*#you do not have at least a gold membership#*#"
#event WrongDiety "#*#You do not worship#*#"


Sub Main
    /declare HasVoA int outer 0
    /declare InvScribeSlot int outer 1


    /declare MyDeity string outer ${Me.Deity}
    /declare MaxInvSlots int outer 10
    /declare MinLevel int outer 1
    /declare MaxLevel int outer ${Me.Level}
    /declare DoLoop int outer 0
    /declare mName string outer
    /if (${Param0}) /varset MinLevel ${Param0}
    /if (${Param1}) /varset MaxLevel ${Param1}
    /if (${Me.HaveExpansion[Veil of Alaris]}) /varset HasVoA 1
    
    :Start
    /varset DoLoop 0
    /if (${Merchant.Open}) {
        /varset mName ${Merchant.Name}
        /echo Buying all ${Me.Class} spells/tomes for levels ${MinLevel} to ${MaxLevel}
        /if (!${Select[${Me.Class.ShortName},CLR,DRU,SHM,ENC,WIZ,MAG,NEC]}) /call BuyTomes
        /if (!${Select[${Me.Class.ShortName},WAR,BER,MNK,ROG]}) /call BuySpells
        /delay 2s
    }
    /if (${Merchant.Open}) {
        /notify MerchantWnd MW_Done_Button leftmouseup
        /delay 1s !${Merchant.Open}
    }
    /if (!${Select[${Me.Class.ShortName},CLR,DRU,SHM,ENC,WIZ,MAG,NEC]}) /call ScribeTomes
    /if (!${Select[${Me.Class.ShortName},WAR,BER,MNK,ROG]}) /call ScribeSpells
    /if (${DoLoop}) {
        /target ${mName}
        /delay 2s ${Target.ID}
        /click right target
        /delay 1s
        /goto :Start
    }
/return




Sub BuySpells
    /if (!${Merchant.Open}) /return
    /delay 2s
    /if (!${Merchant.Items}) /return

    /declare a int local
    /declare b int local
    /declare c int local
    /declare SpellName string local
    
    /for a 1 to ${Merchant.Items}
        /if (!${Me.FreeInventory}) /return
        /if (!${Merchant.Open}) /return
        /varset c 0
        /varset SpellName ${Merchant.Item[${a}].Spell.Name}
        /if (${SpellName.Find[ Rk. II ]}) /varset SpellName ${Merchant.Item[${a}].Spell.Name.Replace[ Rk. II ,]}
        /if (${SpellName.Find[ Rk. III ]}) /varset SpellName ${Merchant.Item[${a}].Spell.Name.Replace[ Rk. III ,]}
        
        /if (${Merchant.Item[${a}].Type.Equal[Scroll]} && ${Merchant.Item[${a}].Spell.Level} >= ${MinLevel} && ${Merchant.Item[${a}].Spell.Level} <= ${MaxLevel} && ${Math.Calc[${Merchant.Item[${a}].BuyPrice}\1000]} < ${Me.Platinum} && !${Me.Book[${Merchant.Item[${a}].Spell.Name}]} && !${FindItemCount[${Merchant.Item[${a}]}]}) {
            /if (${Me.CombatAbility[${SpellName}]}) {
                /e :: I already know ${SpellName}
                /next a
            }

             /if (${FindItemCount[${Merchant.Item[${a}]}]}) {
                /e :: I already have ${Merchant.Item[${a}]} in inventory
                /next a
            }

            /if (${Me.CombatAbility[${SpellName} Rk. II]} || ${FindItemCount[${Merchant.Item[${a}]} Rk. II]}) {
                /e :: Skipping lower rank of ${SpellName}
                /next a
            }
            
            /if (${Me.CombatAbility[${SpellName} Rk. III]} || ${FindItemCount[${Merchant.Item[${a}]} Rk. III]}) {
                /e :: Skipping lower rank of ${SpellName}
                /next a
            }            
            
            /if (${Merchant.Item[${a}].Deities} && ${MyDeity.NotEqual[${Merchant.Item[${a}].Deity[1]}]}) {
                /e Unable to use ${SpellName} because of deity
                /next a
            }
            /if (${Me.Book[${SpellName} Rk. II]} || ${FindItemCount[${SpellName} Rk. II]}) {
                /e Skipping lower rank of ${SpellName}
                /next a
            }
            /if (${Me.Book[${SpellName} Rk. III]} || ${FindItemCount[${SpellName} Rk. III]}) {
                /e Skipping lower rank of ${SpellName}
                /next a
            }            
                        
            | this loop is needed because the merchant item number doesn't match up to the interface line number
            /for b 1 to ${Window[MerchantWnd].Child[MW_ItemList].Items}
               /if (${Window[MerchantWnd].Child[MW_ItemList].List[${b},2].Equal[${Merchant.Item[${a}]}]}) /varset c ${b}
            /next b
            
            | merchant line number matches what we are looking to buy, buy 1 copy of it
            /if (${c}) {
                /echo Buying ${Window[MerchantWnd].Child[MW_ItemList].List[${c},2]}
                /notify MerchantWnd MW_ItemList listselect ${c}
                /nomodkey /ctrlkey /notify MerchantWnd MW_Buy_Button leftmouseup
                /delay 1s
                /doevents
            }
        }
    /next a
    
/return


Sub ScribeSpells
    /declare Bag int local
    /declare Slot int local   
    /if (${Cursor.ID}) /autoinv

    /for Bag 1 to ${MaxInvSlots}
        /if (${InvSlot[pack${Bag}].Item.Container}) {
            /if (!${Window[Pack${Bag}].Open}) /itemnotify pack${Bag} rightmouseup
            /delay 1s ${Window[Pack${Bag}].Open}

            /for Slot 1 to ${InvSlot[pack${Bag}].Item.Container}
                /if (${InvSlot[pack${Bag}].Item.Item[${Slot}].Type.Equal[Scroll]} && ${InvSlot[pack${Bag}].Item.Item[${Slot}].Spell.Level} <= ${Me.Level} && !${Me.Book[${InvSlot[pack${Bag}].Item.Item[${Slot}].Spell.Name}]}) {
                    /nomodkey /ctrlkey /itemnotify in pack${Bag} ${Slot} rightmouseup
                    /delay 1s ${Cursor.ID}
                    /if (${Cursor.ID}) /call doScribe
                }
            /next Slot

            /if (${Window[Pack${Bag}].Open}) /itemnotify pack${Bag} rightmouseup
        } else {
            /if (${InvSlot[pack${Bag}].Item.Type.Equal[Scroll]} && ${InvSlot[pack${Bag}].Item.Spell.Level} <= ${Me.Level} && !${Me.Book[${InvSlot[pack${Bag}].Item.Spell.Name}]}) {
                /nomodkey /ctrlkey /itemnotify ${InvSlot[pack${Bag}]} rightmouseup
                /delay 1s ${Cursor.ID}
                /if (${Cursor.ID}) /call doScribe
            }
        }
    /next Bag

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

Sub doScribe
    /declare tOut timer local 10s
    
    :WaitFinished
        /if (${Window[ConfirmationDialogBox].Open} && ${Window[ConfirmationDialogBox].Child[CD_TextOutput].Text.Find[${Cursor.Spell.Name} will replace]}) /notify ConfirmationDialogBox Yes_Button leftmouseup
        /if (!${tOut}) /autoinv
        /delay 2
        /doevents                        
    /if (${Cursor.ID}) /goto :WaitFinished
/return

Sub BuyTomes
    /if (!${Merchant.Open}) /return
    /delay 2s
    /if (!${Merchant.Items}) /return

    /declare a int local
    /declare b int local
    /declare c int local
    /declare SpellName string local
    
    /for a 1 to ${Merchant.Items}
        /if (!${Me.FreeInventory}) /return
        /varset c 0
        /varset SpellName ${Merchant.Item[${a}].Spell.Name}
        /if (${SpellName.Find[ Rk. II ]}) /varset SpellName ${Merchant.Item[${a}].Spell.Name.Replace[ Rk. II ,]}
        /if (${SpellName.Find[ Rk. III ]}) /varset SpellName ${Merchant.Item[${a}].Spell.Name.Replace[ Rk. III ,]}
        |/e Item ${a} is ${Merchant.Item[${a}].Spell.Name}
        
        /if (${Merchant.Item[${a}].Type.Equal[Scroll]} && ${Merchant.Item[${a}].Spell.Level} >= ${MinLevel} && ${Merchant.Item[${a}].Spell.Level} <= ${MaxLevel} && ${Math.Calc[${Merchant.Item[${a}].BuyPrice}\1000]} < ${Me.Platinum}) {
            
            /if (${Me.CombatAbility[${SpellName}]}) {
                /e :: I already know ${SpellName}
                /next a
            }

             /if (${FindItemCount[${Merchant.Item[${a}]}]}) {
                /e :: I already have ${Merchant.Item[${a}]} in inventory
                /next a
            }

            /if (${Me.CombatAbility[${SpellName} Rk. II]} || ${FindItemCount[${Merchant.Item[${a}]} Rk. II]}) {
                /e :: Skipping lower rank of ${SpellName}
                /next a
            }
            
            /if (${Me.CombatAbility[${SpellName} Rk. III]} || ${FindItemCount[${Merchant.Item[${a}]} Rk. III]}) {
                /e :: Skipping lower rank of ${SpellName}
                /next a
            }            
            
            | this loop is needed because the merchant item number doesn't match up to the interface line number
            /for b 1 to ${Window[MerchantWnd].Child[MW_ItemList].Items}
               /if (${Window[MerchantWnd].Child[MW_ItemList].List[${b},2].Equal[${Merchant.Item[${a}]}]}) /varset c ${b}
            /next b
            
            | merchant line number matches what we are looking to buy, buy 1 copy of it
            /if (${c}) {
                /echo Buying ${Window[MerchantWnd].Child[MW_ItemList].List[${c},2]}
                /notify MerchantWnd MW_ItemList listselect ${c}
                /nomodkey /ctrlkey /notify MerchantWnd MW_Buy_Button leftmouseup
                /delay 1s
                /doevents
            }
        }
    /next a
/return

Sub ScribeTomes
    /declare Bag int local
    /declare Slot int local

    /if (${Cursor.ID}) /autoinv

    /if (!${HasVoA} && ${InvSlot[pack${InvScribeSlot}].Item.Type.Equal[Scroll]} && ${InvSlot[pack${InvScribeSlot}].Item.Spell.Level} <= ${Me.Level} && !${Me.Book[${InvSlot[pack${InvScribeSlot}].Item.Spell.Name}]}) /nomodkey /ctrlkey /itemnotify ${InvSlot[pack${InvScribeSlot}]} rightmouseup

    /for Bag 1 to ${MaxInvSlots}
        /if (${InvSlot[pack${Bag}].Item.Container}) {
            /if (!${Window[Pack${Bag}].Open}) /itemnotify pack${Bag} rightmouseup
            /delay 1s ${Window[Pack${Bag}].Open}
            /for Slot 1 to ${InvSlot[pack${Bag}].Item.Container}
                /if (${InvSlot[pack${Bag}].Item.Item[${Slot}].Name.Find[Tome]} && ${InvSlot[pack${Bag}].Item.Item[${Slot}].Type.Equal[Scroll]} && ${InvSlot[pack${Bag}].Item.Item[${Slot}].Spell.Level} <= ${Me.Level} && !${Me.Book[${InvSlot[pack${Bag}].Item.Item[${Slot}].Spell.Name}]}) {
                    /if (${HasVoA}) {
                        /nomodkey /ctrlkey /itemnotify in pack${Bag} ${Slot} rightmouseup
                        /delay 1s !${InvSlot[pack${Bag}].Item.Item[${Slot}].ID}
                    } else {
                        /nomodkey /ctrlkey /itemnotify in pack${Bag} ${Slot} leftmouseup
                        /delay 1s ${Cursor.ID}
                        /nomodkey /ctrlkey /itemnotify ${InvSlot[pack${InvScribeSlot}]} leftmouseup
                        /delay 1s !${Cursor.ID}
                        /nomodkey /ctrlkey /itemnotify ${InvSlot[pack${InvScribeSlot}]} rightmouseup
                        /delay 1s !${InvSlot[pack${InvScribeSlot}].ID}
                    }
                }
            /next Slot

        }
        /if (${Window[Pack${Bag}].Open}) /itemnotify pack${Bag} rightmouseup
    /next Bag
    /if (${Cursor.ID}) /autoinv
/return

sub Event_NotGold
    /autoinv
/return

sub Event_WrongDiety
    /autoinv
/return

sub Event_FullInventory
    /if (${Merchant.Open}) {
        /notify MerchantWnd MW_Done_Button leftmouseup
        /delay 1s !${Merchant.Open}
    }
    /varset DoLoop 1
    
/return
 
Last edited:
Buying a crapton of spells got old fast lol. Never again :)

Updated code. No longer need to edit to set number of inventory slots. Also now it will buy all available spells from current open merchant window before scribing. Defaults to current level but you can change what level to buy for using

Rich (BB code):
/mac scribe 75
i.e this will buy spells level 75 and under. It buys spells you don't have in inventory or if you don't have it memorized. Can't search bank due to crashing under f2p/silver accounts (no shared bank access).
 
Awesome work.

If I am not mistaken this mac will search and buy any missing spells you don't have as well correct?

Stickied thread and will be included form now on in our compile if Sym oks it.
 
That's correct. It buys whatever spells you don't already have (either memorized or a copy in inventory) from the current merchant window that are under the buy level (defaults to your current level). It will also stop buying if you run out of plat or if you run out of inventory space.

It won't go merchant to merchant but given everything is in pok now and labeled by merchant it's really not needed.

Feel free to include it in the compile.
 
Edit: Added support for melee tomes, and updated code to not buy deity specific spells you can't scribe.
 
Very nice. Would it possible to add a lower limit to the spells automatically bought and scriped (question mark key is broke). EI scribe 53 to 60 or perhaps only buy current level spells. I skipped a lot of low level spells and don't really need or want them at this point.
 
Edit: Now supports level range for buying items, and won't buy rk. i items if you already have a rk.ii/iii.

Not able to test rkii+ tomes yes but spells work, should work as well. If not let me know.
 
Oh MY!!! Wonderful! "Did get SLOT IS NULL: Could not send notification to in pack1" "Scribing NULL to page 45" on two different druid vendors.
 
Did it buy and scribe correctly other than that error or did it end?
 
Can you provide the name of a tome or two it bought and tried to scribe that you already had?
 
Deity code fixed, but some spells don't report the deity correctly so it's not foolproof. Somehow between an edit and posting all of the diety specific code was removed. No idea how. Anyway, it's correct now.

Still looking at the tomes. May be a little bit until I have a melee I can test with.
 
It bought and scribed correctly except when it could not scribe a spell because of deity it went into an endless loop. This was before any edits you made after my last post. I can't remember which tomes were an issue, sorry.
 
The deity issue has been fixed. Just dropping the scroll back into inventory or destroying it will let it continue but it shouldn't happen again now.
 
Scribe macro After buying a spell didn't recognize the spell was in a top inventory slot and didn't write into my wizzies spell book
 
It currently only looks inside containers. I'll add a check for the top level inventory slots as well soon.
 
Had to level zerker a little to get more tome options. It should work correctly now. I tried it with tomes in inventory, skills I already knew, and a rk ii already known. Let me know if you see any issues.
 
Code updated

It will now loop and keep buying/scribing if you run out of inventory space before you run out of spells to buy.
 
Edit: Now handles spells/tomes in top level inventory slots, and will use specified slot if you don't have VoA
Change HasVoA to 0 if you don't have VoA and set InvScribeSlot to the slot to use as the right click spot (defaults to 1st inv slot). This is where it will place tomes to right click them
Also fixed duplicate tome buying and sped up spell/tome memorization loops
 
It does. It'll buy whatever spells are available/usable from whatever merchant window is open. I used it to pick up 96-100 spells once already. It's listed as pok in the description since that's where every 1-90 spell is, but it can be used on any merchant.
 
Release Scribe.mac

Users who are viewing this thread

Back
Top
Cart