• 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

Request - A tradeskill bag clean up macro

Joined
Aug 5, 2013
RedCents
396¢
to move extra items to bagslot 1 from slots 23456789

is there something out there or does anyone want to help me start brainstorming ideas on how to accomplish this?

would be greatly appreciated. :D

my understanding of macroquest and commands it would be something to the relation of me triyng to call each and every bag interior slot to my cursor and /autoinv after each call of said slot
 
Simple idea would be to start from the last item in last bag and just /autoinv everything.

Some pointers on how to do this can be found in parcelbot.mac (found here: http://www.redguides.com/community/showthread.php/31382-Parcel-Bot?highlight=parcelbot)

Rich (BB code):
   /for i 1 to 10
      /if (${Me.Inventory[Pack${i}].Container} && ${Me.Inventory[Pack${i}].Items}) {
         /for j 1 to ${Me.Inventory[Pack${i}].Container}
            /if (${Me.Inventory[Pack${i}].Item[${j}].Name.NotEqual[null]})
                /nomodkey /itemnotify in Pack${i} ${j} leftmouseup
                /autoinv

This is just a snippet and you would have to add actual variable declarations and check for syntax errors

I am not sure if mq2 loops can count down instead of up, so you would actually want
Rich (BB code):
/for i 10 to 1
  /for j ${Me.Inventory[Pack${i}].Container} to 1
if that is not possible, there are workarounds for that

EDIT2:
Syntax for counting down is /for var start downto end optionalstep

so simple test macro that works:
Rich (BB code):
Sub Main
	 /declare i     int     local     0
	 /for i 10 downto 1 {
		/echo oh ${i}
	 }
	 /next i
	   
	 
	 /echo ended with ${i}

/return
 
Rich (BB code):
Sub main
/declare Pitem              string      outer 
/echo starting!
/delay 5s
/echo sorting 
/call FindItem
/delay 6s
/echo maybe?
/end

/return




Sub FindItem
   /declare i     int     local     0
   /declare j     int     local     0
   /declare tim1  timer   local     0
   
   /for i 10 downto 2  
      /if (!${Me.Inventory[Pack${i}].Container} && ${Me.Inventory[Pack${i}].Name.NotEqual[null]}) {
         /varset Pitem ${Me.Inventory[Pack${i}].Name}
		 }
|	     /echo InvSlots: ${who} ${Pitem} ${who.NotEqual[null]}
	     /if (${who.NotEqual[null]}) {
		    /Autoinv
}
isnt exactly working yet unsure, but i have to work in the am so im calling it a night. cheers.
 
Last edited:
Okay, got a working version.
Not terribly efficient but worked for me. :)

Rich (BB code):
|orginv.mac 2015
|playj's quick and dirty inventory cleanup
|simply goes through all items in inventory and uses /autoinv to place them towards the first bags
|TODO optimize for time and possibly more efficient commands for selecting items
Sub Main
	/echo starting orginv
	/call OrgInv
	
	/echo all done with inventory organization
	

/return

Sub OrgInv
	/declare i     int     local     0
	/declare j    int     local     0
	/keypress OPEN_INV_BAGS
	/for i 1 to 10
      /if (${Me.Inventory[Pack${i}].Container} && ${Me.Inventory[Pack${i}].Items}) {		
			/for j 1 to ${Me.Inventory[Pack${i}].Container}
				/if (${Me.Inventory[Pack${i}].Item[${j}].Name.NotEqual[null]}) {
					/nomodkey /itemnotify in Pack${i} ${j} leftmouseup
					/delay 5
					|TODO emulate control left click so dont have to enter quantity
					/if (${Window[QuantityWnd].Open}) {
						/nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
						/delay 3s ( !${Window[QuantityWnd].Open} )
					}
					/delay 5
					/autoinv
					/delay 5
				}
			/next j
		}
	/next i
	/keypress CLOSE_INV_BAGS

/return


I realized that it makes more sense to start with 1st item in 1st bag this way all the items get moved to the first bags and empty slots filled. If one starts at the end it is possible that some slots open up and you have to do a 2nd pass.

You could play around with delays and lower those until macro stops working.

EDIT2: also did not test it with what happens when there are some no bag slots, probably some error message appears in mq2 window then
 
Playj

Rich (BB code):
					|TODO emulate control left click so dont have to enter quantity
					/if (${Window[QuantityWnd].Open}) {
						/nomodkey /notify QuantityWnd QTYW_Accept_Button leftmouseup
						/delay 3s ( !${Window[QuantityWnd].Open} )
					}

could be changed to:

Rich (BB code):
/shiftkey /itemnotify in Pack${i} ${j} leftmouseup

I think that would pick up a whole stack.

Oh something else you could do is swap each pack to pack slot 1 before cleaning the pack, that way each pack has the same items in it, but just moved to the front of the pack. Just a thought
 
Last edited:
CTaylor, thank you for the improvement!

This makes the macro run faster.

Makes sense /nomodkey and /shift refer to /notify either with no mod or with shift :)

I've attached the improved orginv.mac
 

Attachments

dude yall are great!
i thank you for your efforts :)

just ran it on my toon. this is EXACTLY what i needed is there any way i can repay yall in form of redcent/krono if you play on live just send me a message with your server and ill give you one for your effort.
 
Last edited:
CTaylor, thank you for the improvement!

This makes the macro run faster.

Makes sense /nomodkey and /shift refer to /notify either with no mod or with shift :)

I've attached the improved orginv.mac

playj
Please post this in its own thread with a quick description and instructions. So we can add to the the Macropedia.

Thanks
 
Request - A tradeskill bag clean up macro

Users who are viewing this thread

Back
Top
Cart