• IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->
  • You've been invited to attend the 2nd annual "EverQuest Software Awards"

Question - Need help with a basic auto-combine/auto-inventory macro

Joined
Dec 2, 2019
RedCents
339¢
I used to use a macro to hit the combine and auto-inventory buttons on the tradeskill window. These days it still works, but there are two problems I have with it. First, when it gets to the "Auto-inventory" part it will spam that button about 10 times instantly. I know this because we get to problem number 2, which is when it is out of inventory space and the "There are no open spaces" message pops up about 10 times in rapid succession, the macro does not end although an event is to trigger it ending upon my inventory being full.

Any input/advice where this macro is going wrong? Specifically, how to slow it down and how to get it to actually register the "no open slots" message?

Code:
#event CombineError "#*#no open slots#*#"
#event CombineError "#*#You cannot combine these items in this container type!#*#"
#event CombineError "#*#did not accept these items#*#"
#event CombineError "#*#You are missing#*#"



|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub DoCombine
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub Main

   /declare EndingVar
   /varset EndingVar 1



        /call ClearCursor
    :Loop
   /nomodkey /notify TradeskillWnd CombineButton leftmouseup
        /delay 1${Cursor.ID}
        /call ClearCursor
         /doevents
      /if (${EndingVar}==1) /goto :Loop
      /varset EndingVar 1

    /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Clear Cursor
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub ClearCursor
/declare x int local
:auto_inv
/if (${Cursor.ID}) {
  /if (${Cursor.Container}) {
    /for x 1 to 8
    /if (!${InvSlot[pack${x}].Item.Container}) /nomodkey /itemnotify pack${x} leftmouseup
    /next x
  } else {
    /autoinventory
  }
  /goto :auto_inv
}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Combine error
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_CombineError
    /end
/return
 
Joined
Dec 2, 2019
RedCents
339¢
I dont know if this matters at all but on another character using another macro, the macro is not registering the "You are missing some required components" event that is defined. Did something change in VV or EQ recently to where system messages like that are not read for #Event purposes?

I remember it working a week or so ago?
 
Joined
Apr 30, 2019
RedCents
3,193¢
Code:
        /delay 1${Cursor.ID}
should be
Code:
        /delay 1 ${Cursor.ID}
actually works better to account for eq/network lag
Code:
        /delay 2
        /delay 10 ${Cursor.ID}
Also not sure what you want to accomplish by that clearcursor loop. if you have a container on your cursor it will check slots 1-8 then exchange it for an item if possible, now what happens if there is nothing to swap it with e.g 1-8 is conatiners and cursor has a container = endless loop

Then your message you are checking is wrong, should be (I think, haven't tested a full inventory myself on combining)
Code:
#event CombineError  "#*#Your inventory appears full!#*#"
If the message is really "There are no open spaces" then will not ever work
Code:
#event CombineError "#*#no open slots#*#"
should be
Code:
#event CombineError "#*#There are no open spaces#*#"


Lastly I do not know if you can have multiple event's going to the came function

Could do this in your main/inventory loop
Code:
/if (${Me.FreeInventory}==0) {
   /endm
}
 
Last edited:
Joined
Oct 22, 2010
RedCents
3,803¢
You can have multiple events call the same function but they are read from bottom to top so have to prioritize them in the correct order.

Fish.mac in macros directory is an example of one that has two events call the same function.
 
Joined
Dec 2, 2019
RedCents
339¢
Code:
        /delay 1${Cursor.ID}
should be
Code:
        /delay 1 ${Cursor.ID}
actually works better to account for eq/network lag
Code:
        /delay 2
        /delay 10 ${Cursor.ID}
Also not sure what you want to accomplish by that clearcursor loop. if you have a container on your cursor it will check slots 1-8 then exchange it for an item if possible, now what happens if there is nothing to swap it with e.g 1-8 is conatiners and cursor has a container = endless loop

Then your message you are checking is wrong, should be (I think, haven't tested a full inventory myself on combining)
Code:
#event CombineError  "#*#Your inventory appears full!#*#"
If the message is really "There are no open spaces" then will not ever work
Code:
#event CombineError "#*#no open slots#*#"
should be
Code:
#event CombineError "#*#There are no open spaces#*#"


Lastly I do not know if you can have multiple event's going to the came function

Could do this in your main/inventory loop
Code:
/if (${Me.FreeInventory}==0) {
   /endm
}
Thank you for the input and helping me clean up the code! I think you were right.. I had slots and the message isnt that.
 
Joined
Dec 2, 2019
RedCents
339¢
Also not sure what you want to accomplish by that clearcursor loop. if you have a container on your cursor it will check slots 1-8 then exchange it for an item if possible, now what happens if there is nothing to swap it with e.g 1-8 is conatiners and cursor has a container = endless loop
This is such an old code that I think I used it back when bags could not fit in bags. Going to change it up to where it just auto-inventories whatever is on its cursor until nothing left.
 
Joined
Apr 30, 2019
RedCents
3,193¢
Code:
#event CombineError "#*#You cannot combine these items in this container type!#*#"
#event CombineError "#*#There are no open slots for the held item in your inventory.#*#"
#event CombineError "#*#You are missing#*#"
#event CombineSkill "#*#You can no longer advance#*#"

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub DoCombine
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub Main
    /declare doCombine bool outer TRUE
    /declare doSkill bool outer TRUE
    /declare debug int outer 0

    /while (${doCombine}) {
   
        /doevents      
        /if (${Me.FreeInventory}==0) {
            /beep
            /endm
        }
        /if (!${doSkill}) {  
            /if (!${Defined[Param0]}) {
                /bc Skill stop .... ${Me.Name}
                /beep
                /endm
            }
        }
        /delay 2s
        /if (${Cursor.ID}) {
            /delay 3s ${Cursor.ID}
            /autoinv
            /continue
        }
        /nomodkey /notify TradeskillWnd CombineButton leftmouseup
    }
/return

Sub Event_CombineSkill
    /varset doSkill FALSE
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Combine error
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_CombineError
    /bc Combine stop .... ${Me.Name}
    /beep
    /endm
/return
Just for fun I reworked the code a bit, haven't tested the inventory full but did pull the message from a logfile.

To level up and check that you dont waste material on trivial combines
/mac scriptname

To make it regardless of trivial
/mac scriptname all
 
Top