• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Request - Help me fix a broken InvSlot/ItemSlot issue with macro (1 Viewer)

Joined
Jul 1, 2015
RedCents
9,002¢
I found posts talking about this issue but it isn't self evident to me how to fix it with my own macro because I am ignorant to this coding language.

Here is the macro in question:

INI:
#Event Sent "#*#tells you, 'I will deliver#*#"
#Event Sent "#*#told you, 'I will deliver#*#"

Sub Main
    /declare iniName string outer "ParcelBot_${Me.Name}_${EverQuest.Server}"
    /declare thisVersion string outer 0.9
    /if (!${Ini[${iniName},General,Version].Length} || ${Ini[${iniName},General,Version].NotEqual[${thisVersion}]}) {
        /echo Creating INI.
        /call CreateINI
        /echo Edit the INI and then run the macro again.
        /end
    }
    /call Initialize

    /declare i int local 0
    /declare j int local 0
    |** Target and open the parcel vendor named in INI **|
    /target ${ParcelVendor}
    /delay 2s ${Target.ID}
    /invoke ${Target.RightClick}

    |** Open inventory and all bags **|
    /keypress OPEN_INV_BAGS
    /if (!${Window[InventoryWindow].Open}) /windowstate InventoryWindow open

    |** Wait for the merchant window to open **|
    /delay 3s ${Window[MerchantWnd].Open}
    /notify MerchantWnd MW_MerchantSubWindows tabselect 3
    /delay 1s
    
    |** Send the items **|
    /for i 1 to ${RecipientCount}
        /for j 1 to ${Recipient${i}ItemCount}
            /if (${FindItemCount[=${Recipient${i}Item[${j}]}]} < ${Recipient${i}ItemQuantity[${j}]} || !${FindItemCount[=${Recipient${i}Item[${j}]}]}) {
                /echo \arYou do not have enough ${Recipient${i}Item[${j}]}s, Skipping this item!\n You have ${FindItemCount[=${Recipient${i}Item[${j}]}]} and you are trying to send ${Recipient${i}ItemQuantity[${j}]}
                /continue
            }
            /echo \agSending ${Recipient${i}Item[${j}]} x (${Recipient${i}ItemQuantity[${j}]}) to ${Recipient[${i}]}
            /itemnotify ${FindItem[=${Recipient${i}Item[${j}]}].ItemSlot} leftmouseup
            /notify MerchantWnd MW_Send_To_Edit leftmouseup
            /call ClearChat
            /call TypeIn ${Recipient[${i}]}
            /delay 5
            /notify MerchantWnd MW_Send_Button leftmouseup
            
            |** Only use the Quantity Slider if the item is stackable or I have more than one of them. **|
            /if (${FindItem[=${Recipient${i}Item[${j}]}].Stackable} && ${FindItemCount[=${Recipient${i}Item[${j}]}]} > 1) {
                /delay 2s ${Window[QuantityWnd].Open}
                /notify QuantityWnd QTYW_slider newvalue ${Recipient${i}ItemQuantity[${j}]}
                /delay 1s
                /notify QuantityWnd QTYW_Accept_Button leftmouseup
            }
            
        :waitTillSent
            /delay 5
            /doevents
            /if (!${Sent}) /goto :waitTillSent
            /varset Sent FALSE
            /delay 1s
        /next j
    /next i
    
    /cleanup
/return


|**Saar's Code **|
Sub ClearChat
    :Try1
        /ctrlkey /shiftkey /keypress home chat
        /delay 5
        /ctrlkey /shiftkey /keypress delete chat
        /delay 5
        /if (${Window[MerchantWnd].Child[MW_Send_To_Edit].Text.Length}>0) /goto :Try1
/return

|** Saar's Code **|
Sub TypeIn(InStr)
    |/echo Sending Parcel to ${InStr}
    /declare char string local
    /declare i int local
    /for i 1 to ${InStr.Length}
        /varset char ${InStr.Mid[${i},1]}
        /if (!${char.Length}) {
            /nomodkey /keypress Space chat
        } else {
            /if (${char.Left[1].Equal[(]}) /return
            /if (${char.Left[1].Equal[)]}) /return
            /nomodkey /keypress ${char} chat
        }
    /next i
/return

Sub CreateINI
    /if (!${Ini[${iniName},General,Version].Length} || ${Ini[${iniName},General,Version].NotEqual[${thisVersion}]}) {
        /ini ${iniName} General Version ${thisVersion}
    }
    /call CheckINI General ParcelVendor PutTheNameHere
    /declare i int local 0
    /declare j int local 0
    /for i 1 to 10
        /call CheckINI Recipient${i} Name -----
        /for j 1 to 20
            /call CheckINI Recipient${i} ----${j} ----
            /call CheckINI Recipient${i} ItemToSend${j} -----
            /call CheckINI Recipient${i} ItemToSend${j}Quantity 1
            /call CheckINI Recipient${i} ---------${j} ---------
        /next j
    /next i
/return

Sub Initialize
    /declare ParcelVendor string outer ${Ini[${iniName},General,ParcelVendor]}
    /echo Using ${ParcelVendor} to send Items
    /declare Sent bool outer FALSE
    /declare Recipient[20] string outer -1
    /declare i int local 0
    /declare j int local 0
    /declare NullCounterName int local 0
    /declare RecipientCount int outer 0
    /for i 1 to 20
        /if (${Ini[${iniName},Recipient${i},Name].Equal[-----]} || ${Ini[${iniName},Recipient${i},Name].Equal[NULL]}) {
            /varcalc NullCounterName ${NullCounterName} + 1
            /if (${NullCounterName} > 2) /break
            /continue
        }
        /varset Recipient[${i}] ${Ini[${iniName},Recipient${i},Name]}
        /varcalc RecipientCount ${RecipientCount} + 1
        /echo Recipient: ${Recipient[${i}]}
        /for j 1 to 20
            /if (!${Defined[Recipient${i}Item]}) {
                /declare Recipient${i}Item[20] string outer -1
                /declare Recipient${i}ItemQuantity[20] int outer 1
            }
            /if (!${Defined[Recipient${i}ItemCount]}) {
                /declare Recipient${i}ItemCount int outer 0
                /declare Recipient${i}NullCount int outer 0
            }
            /if (${Ini[${iniName},Recipient${i},ItemToSend${j}].Equal[-----]} || ${Ini[${iniName},Recipient${i},ItemToSend${j}].Equal[NULL]}) {
                /varcalc Recipient${i}NullCount ${Recipient${i}NullCount} + 1
                /if (${Recipient${i}NullCount} > 2) /break
                /continue
            }
            /varset Recipient${i}Item[${j}] ${Ini[${iniName},Recipient${i},ItemToSend${j}]}
            /varset Recipient${i}ItemQuantity[${j}] ${Ini[${iniName},Recipient${i},ItemToSend${j}Quantity]}
            /varcalc Recipient${i}ItemCount ${Recipient${i}ItemCount} + 1
            /echo Item: ${Recipient${i}Item[${j}]}
        /next j
    /next i
/return

Sub CheckINI(String Section,String Key,String Value)
    /if (!${Ini[${iniName},${Section},${Key}].Length}) {
        /ini ${iniName} ${Section} ${Key} ${Value}
    }
/return

Sub Event_Sent
    /varset Sent TRUE
/return

I found posts like: https://www.redguides.com/community/search/1012469/?q=ItemSlot&o=relevance

and https://www.redguides.com/community/threads/cleanbags-mac.31137/#post-472436

and https://www.redguides.com/community/threads/is-there-a-item-handling-issue.77893/#post-472536

But when I try these fixes they don't fix it (specifically they only really suggest you swap InvSlot to ItemSlot and that didnt fix it). Switching InvSlot to ItemSlot just made it try to parcel the entire container instead of an individual item. I'm not even sure if I am messing with the right line of code (Line #39) or if I need to change something elsewhere too in order to get it to work.

Thanks ahead of time for any help or assistance, it is appreciated
 
I found posts talking about this issue but it isn't self evident to me how to fix it with my own macro because I am ignorant to this coding language.

Here is the macro in question:

INI:
#Event Sent "#*#tells you, 'I will deliver#*#"
#Event Sent "#*#told you, 'I will deliver#*#"

Sub Main
    /declare iniName string outer "ParcelBot_${Me.Name}_${EverQuest.Server}"
    /declare thisVersion string outer 0.9
    /if (!${Ini[${iniName},General,Version].Length} || ${Ini[${iniName},General,Version].NotEqual[${thisVersion}]}) {
        /echo Creating INI.
        /call CreateINI
        /echo Edit the INI and then run the macro again.
        /end
    }
    /call Initialize

    /declare i int local 0
    /declare j int local 0
    |** Target and open the parcel vendor named in INI **|
    /target ${ParcelVendor}
    /delay 2s ${Target.ID}
    /invoke ${Target.RightClick}

    |** Open inventory and all bags **|
    /keypress OPEN_INV_BAGS
    /if (!${Window[InventoryWindow].Open}) /windowstate InventoryWindow open

    |** Wait for the merchant window to open **|
    /delay 3s ${Window[MerchantWnd].Open}
    /notify MerchantWnd MW_MerchantSubWindows tabselect 3
    /delay 1s
 
    |** Send the items **|
    /for i 1 to ${RecipientCount}
        /for j 1 to ${Recipient${i}ItemCount}
            /if (${FindItemCount[=${Recipient${i}Item[${j}]}]} < ${Recipient${i}ItemQuantity[${j}]} || !${FindItemCount[=${Recipient${i}Item[${j}]}]}) {
                /echo \arYou do not have enough ${Recipient${i}Item[${j}]}s, Skipping this item!\n You have ${FindItemCount[=${Recipient${i}Item[${j}]}]} and you are trying to send ${Recipient${i}ItemQuantity[${j}]}
                /continue
            }
            /echo \agSending ${Recipient${i}Item[${j}]} x (${Recipient${i}ItemQuantity[${j}]}) to ${Recipient[${i}]}
            /itemnotify ${FindItem[=${Recipient${i}Item[${j}]}].ItemSlot} leftmouseup
            /notify MerchantWnd MW_Send_To_Edit leftmouseup
            /call ClearChat
            /call TypeIn ${Recipient[${i}]}
            /delay 5
            /notify MerchantWnd MW_Send_Button leftmouseup
         
            |** Only use the Quantity Slider if the item is stackable or I have more than one of them. **|
            /if (${FindItem[=${Recipient${i}Item[${j}]}].Stackable} && ${FindItemCount[=${Recipient${i}Item[${j}]}]} > 1) {
                /delay 2s ${Window[QuantityWnd].Open}
                /notify QuantityWnd QTYW_slider newvalue ${Recipient${i}ItemQuantity[${j}]}
                /delay 1s
                /notify QuantityWnd QTYW_Accept_Button leftmouseup
            }
         
        :waitTillSent
            /delay 5
            /doevents
            /if (!${Sent}) /goto :waitTillSent
            /varset Sent FALSE
            /delay 1s
        /next j
    /next i
 
    /cleanup
/return


|**Saar's Code **|
Sub ClearChat
    :Try1
        /ctrlkey /shiftkey /keypress home chat
        /delay 5
        /ctrlkey /shiftkey /keypress delete chat
        /delay 5
        /if (${Window[MerchantWnd].Child[MW_Send_To_Edit].Text.Length}>0) /goto :Try1
/return

|** Saar's Code **|
Sub TypeIn(InStr)
    |/echo Sending Parcel to ${InStr}
    /declare char string local
    /declare i int local
    /for i 1 to ${InStr.Length}
        /varset char ${InStr.Mid[${i},1]}
        /if (!${char.Length}) {
            /nomodkey /keypress Space chat
        } else {
            /if (${char.Left[1].Equal[(]}) /return
            /if (${char.Left[1].Equal[)]}) /return
            /nomodkey /keypress ${char} chat
        }
    /next i
/return

Sub CreateINI
    /if (!${Ini[${iniName},General,Version].Length} || ${Ini[${iniName},General,Version].NotEqual[${thisVersion}]}) {
        /ini ${iniName} General Version ${thisVersion}
    }
    /call CheckINI General ParcelVendor PutTheNameHere
    /declare i int local 0
    /declare j int local 0
    /for i 1 to 10
        /call CheckINI Recipient${i} Name -----
        /for j 1 to 20
            /call CheckINI Recipient${i} ----${j} ----
            /call CheckINI Recipient${i} ItemToSend${j} -----
            /call CheckINI Recipient${i} ItemToSend${j}Quantity 1
            /call CheckINI Recipient${i} ---------${j} ---------
        /next j
    /next i
/return

Sub Initialize
    /declare ParcelVendor string outer ${Ini[${iniName},General,ParcelVendor]}
    /echo Using ${ParcelVendor} to send Items
    /declare Sent bool outer FALSE
    /declare Recipient[20] string outer -1
    /declare i int local 0
    /declare j int local 0
    /declare NullCounterName int local 0
    /declare RecipientCount int outer 0
    /for i 1 to 20
        /if (${Ini[${iniName},Recipient${i},Name].Equal[-----]} || ${Ini[${iniName},Recipient${i},Name].Equal[NULL]}) {
            /varcalc NullCounterName ${NullCounterName} + 1
            /if (${NullCounterName} > 2) /break
            /continue
        }
        /varset Recipient[${i}] ${Ini[${iniName},Recipient${i},Name]}
        /varcalc RecipientCount ${RecipientCount} + 1
        /echo Recipient: ${Recipient[${i}]}
        /for j 1 to 20
            /if (!${Defined[Recipient${i}Item]}) {
                /declare Recipient${i}Item[20] string outer -1
                /declare Recipient${i}ItemQuantity[20] int outer 1
            }
            /if (!${Defined[Recipient${i}ItemCount]}) {
                /declare Recipient${i}ItemCount int outer 0
                /declare Recipient${i}NullCount int outer 0
            }
            /if (${Ini[${iniName},Recipient${i},ItemToSend${j}].Equal[-----]} || ${Ini[${iniName},Recipient${i},ItemToSend${j}].Equal[NULL]}) {
                /varcalc Recipient${i}NullCount ${Recipient${i}NullCount} + 1
                /if (${Recipient${i}NullCount} > 2) /break
                /continue
            }
            /varset Recipient${i}Item[${j}] ${Ini[${iniName},Recipient${i},ItemToSend${j}]}
            /varset Recipient${i}ItemQuantity[${j}] ${Ini[${iniName},Recipient${i},ItemToSend${j}Quantity]}
            /varcalc Recipient${i}ItemCount ${Recipient${i}ItemCount} + 1
            /echo Item: ${Recipient${i}Item[${j}]}
        /next j
    /next i
/return

Sub CheckINI(String Section,String Key,String Value)
    /if (!${Ini[${iniName},${Section},${Key}].Length}) {
        /ini ${iniName} ${Section} ${Key} ${Value}
    }
/return

Sub Event_Sent
    /varset Sent TRUE
/return

I found posts like: https://www.redguides.com/community/search/1012469/?q=ItemSlot&o=relevance

and https://www.redguides.com/community/threads/cleanbags-mac.31137/#post-472436

and https://www.redguides.com/community/threads/is-there-a-item-handling-issue.77893/#post-472536

But when I try these fixes they don't fix it (specifically they only really suggest you swap InvSlot to ItemSlot and that didnt fix it). Switching InvSlot to ItemSlot just made it try to parcel the entire container instead of an individual item. I'm not even sure if I am messing with the right line of code (Line #39) or if I need to change something elsewhere too in order to get it to work.

Thanks ahead of time for any help or assistance, it is appreciated
/itemnotify ${FindItem[=${Recipient${i}Item[${j}]}].ItemSlot} leftmouseup
to
/itemnotify "${Recipient${i}Item[${j}]}" leftmouseup


tl;dr you want /itemnotify "cool item im picking up" leftmouseup

its in one of the links you posted > here <
you can either use itemslot with a bunch of math - or just slap your item in " " quotes
 
/itemnotify ${FindItem[=${Recipient${i}Item[${j}]}].ItemSlot} leftmouseup
to
/itemnotify "${Recipient${i}Item[${j}]}" leftmouseup


tl;dr you want /itemnotify "cool item im picking up" leftmouseup

its in one of the links you posted > here <
you can either use itemslot with a bunch of math - or just slap your item in " " quotes


Spank you, it seems to be working now <3

tl;dr you want /itemnotify "cool item im picking up" leftmouseup

This is one of the things that confused me most because reading this implies to me that you can only make the macro work for a single item OR you have to specify each individual item in the macro (but that isn't the case because cleanbags.mac was able to be fixed without adding tens of thousands of items individually). When I searched these forums I couldn't find a write up of exactly what was changed and how in a clear and well written way so that I could reverse engineer it and make it work for me. Every piece of information/post I found about the issue just confused me further =(

I'm still confused but appreciate the help none the less
 
/itemnotify ${FindItem[=${Recipient${i}Item[${j}]}].ItemSlot} leftmouseup
to
/itemnotify "${Recipient${i}Item[${j}]}" leftmouseup

tl;dr you want /itemnotify "cool item im picking up" leftmouseup

you can either use itemslot with a bunch of math - or just slap your item in " " quotes

Sic, thank you for all the help you've been providing everyone both on Discord and here in the forums with the /itemnotify issues! You rock!!

Are you able to help me figure out how to make the same work, but for bank bag slots?

/nomodkey /shiftkey /itemnotify ${FindItemBank[${ItemName}].InvSlot} leftmouseup

This is the way the line had been written and used to work. Now it returns "slot is null". I've tried removing .InvSlot without any success. I've tried various other attempts (even with MathCalc) but I couldn't get it working. Any ideas on how to make this line work again?

Thank you again for all you've been doing to help folks with this!
 
Sic, thank you for all the help you've been providing everyone both on Discord and here in the forums with the /itemnotify issues! You rock!!

Are you able to help me figure out how to make the same work, but for bank bag slots?

/nomodkey /shiftkey /itemnotify ${FindItemBank[${ItemName}].InvSlot} leftmouseup

This is the way the line had been written and used to work. Now it returns "slot is null". I've tried removing .InvSlot without any success. I've tried various other attempts (even with MathCalc) but I couldn't get it working. Any ideas on how to make this line work again?

Thank you again for all you've been doing to help folks with this!
think you have to do the ${Math stuff

/nomodkey /shiftkey /itemnotify in bank${Math.Calc[${FindItemBank[${ItemName}].ItemSlot}+1]} ${Math.Calc[${FindItemBank[${ItemName}].ItemSlot2}+1]} leftmouseup

this finds the rhenium ore in my bank and picks it up
/nomodkey /shiftkey /itemnotify in bank${Math.Calc[${FindItemBank[=Rhenium Ore].ItemSlot}+1]} ${Math.Calc[${FindItemBank[=Rhenium Ore].ItemSlot2}+1]} leftmouseup

There is also ${Me.Bank[slot number].Item[bag number]} that you could do some math with as well
 
think you have to do the ${Math stuff

/nomodkey /shiftkey /itemnotify in bank${Math.Calc[${FindItemBank[${ItemName}].ItemSlot}+1]} ${Math.Calc[${FindItemBank[${ItemName}].ItemSlot2}+1]} leftmouseup

this finds the rhenium ore in my bank and picks it up
/nomodkey /shiftkey /itemnotify in bank${Math.Calc[${FindItemBank[=Rhenium Ore].ItemSlot}+1]} ${Math.Calc[${FindItemBank[=Rhenium Ore].ItemSlot2}+1]} leftmouseup

There is also ${Me.Bank[slot number].Item[bag number]} that you could do some math with as well

@Sic Thank you, thank you, thank youuuu (times infinity lol)!!! I really can't thank you enough!!! I kept trying to figure it out and felt so stuck, I sincerely appreciate your time and help! 🤓🎉
 
Request - Help me fix a broken InvSlot/ItemSlot issue with macro

Users who are viewing this thread

Back
Top