• 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
DumpsterDive.mac

Release DumpsterDive.mac 1.82

No permission to download
Joined
Sep 20, 2005
RedCents
1,793¢
As suggested by Sicprofundus

Rich (BB code):
| dumpsterdive.mac - Sym 8.18.2017 exclusively for RedGuides.com
|
| Runs around checking merchants for items others have sold
| Requires MQ2Nav
| This macro will buy all items listed in your ini. This may be expensive. 
| It can also buy every tradeskill tagged item it sees. This may be VERY expensive.
| ******************************************************************************************
| ******************************************************************************************
| ****                                                                                  ****
| **** If you try to buy an infinite default stock item it will fill up your inventory. ****
| ****                                                                                  ****
| ******************************************************************************************
| ******************************************************************************************
|
| To use partial name matching you will need to add the entry to the ini file manually.
|
| Usage: /mac dumpsterdive
|
| Once running the following commands are available.
|
|/dive merchant
|   Add targeted merchant to ini under the [Zone.ShortName-Merchants] heading
|
|/dive item
|   Add item on cursor to ini then autoinventory the item
|
|/dive start    
|   Starts buying loop
|
|/dive buyall XX
|   Starts buying loop and will buy ALL non default stock tradeskill items under XXp


#bind DiveCommand     /dive


sub Main
    /declare IniFile string outer dumpsterdive.ini
    /declare BuyType int outer 0
    /declare MaxBuyPrice int outer 0
    
    /echo \atDumpsterDive.mac :: v1.1 :: by Sym for RedGuides.com
    /echo \atCheck all listed merchants for items you want to buy
    /echo \at
    /echo \ag/dive merchant\ay - Add target to merchant list
    /echo \ag/dive item\ay - Add item on cursor to buy list
    /echo \ag/dive start\ay - Start buying
    /echo \ag/dive buyall #\ay - Start buying and buy \ar**ALL**\ay items tagged as tradeskill that are less than # plat each

    :WaitForCommand
        /doevents
        /delay 1
    /goto :WaitForCommand
    

/return


Sub Bind_DiveCommand
	
    /if (${Param0.Equal[start]}) /call BuyLoop
    /if (${Param0.Equal[merchant]}) /call AddMerchant
    /if (${Param0.Equal[item]}) /call AddItem
    /if (${Param0.Equal[buyall]}) {
    	/varset BuyType 1
    	/varset MaxBuyPrice ${Param1}
    	/call BuyLoop
    }
/return

sub AddMerchant
    /if (!${Target.ID}) {
        /echo \arTarget the merchant first!
        /return
    }
    
    /ini ${IniFile} ${Zone.ShortName}-Merchants "${Target.CleanName}" 1
    /echo \atAdded \ag${Target.CleanName}\at to ini file.
    
/return

sub AddItem
    /if (!${Cursor.ID}) {
        /echo \arPut an item on your cursor first!
        /return
    }
    
    /ini ${IniFile} Items "${Cursor.Name}" 1
    /echo \atAdded \ag${Cursor.Name}\at to ini file.
    /autoinv
    
/return


sub BuyLoop
    /declare MerchantCount int local ${Ini[${IniFile},${Zone.ShortName}-Merchants].Count[|]}
    /if (!${MerchantCount}) {
        /echo \arYou need to add a merchant to the ini file!
        /endmac
    }
    /varcalc MerchantCount ${MerchantCount}-1
    
    /declare a int local
    /for a 1 to ${MerchantCount}
        /echo \atBuying from \ag${Ini[${IniFile},${Zone.ShortName}-Merchants].Token[${a},|]}
        /call NavToMerchant "${Ini[${IniFile},${Zone.ShortName}-Merchants].Token[${a},|]}"
    /next a
/return


sub NavToMerchant(string MerchantName)
    /echo \atNavigating to \ag${MerchantName}
    /target npc ${MerchantName}
    /delay 1s
    /if (!${Target.ID}) /return
    :WaitTarget
        /if (!${Me.Speed}) /nav target
        /if (!${Target.ID}) /return
        /delay 3
    /if (${Target.Distance}>15) /goto :WaitTarget
    /nav stop
    
    /delay 1s
    /nomodkey /click right target
    /delay 5s ${Merchant.Open}
    
    /e \atWaiting for merchant to populate
    :WaitPopulate
    	/if (!${Merchant.Open}) /return
        /delay 5
    /if (!${Merchant.Items}) /goto :WaitPopulate
    /delay 5
    /if (${BuyType}) {
    	/call BuyAllTradeskillItems
    } else {
    	/call BuyItems
    }
/return

sub BuyItems

    /echo \atStarting buy from \ag${Target.CleanName}
    /declare a int local
    /declare b int local
    /declare c int local
    /declare ItemName string local
    /declare ListID string local
    /declare IsDefaultItem int local
    

    /declare ItemCount int local ${Ini[${IniFile},Items].Count[|]}
    /if (!${ItemCount}) {
        /echo \arYou need to add an item to the ini file!
        /endmac
    }
    /varcalc ItemCount ${ItemCount}-1
    
    :StartBuy
    /for a 1 to ${ItemCount}
    
        /if (!${Me.FreeInventory}) /return
        /if (!${Merchant.Open}) /return
        /varset IsDefaultItem 0
        /varset ItemName ${Ini[${IniFile},Items].Token[${a},|]}
		/varset ListID ${Window[MerchantWnd].Child[ItemList].List[${ItemName},2]}        
		/if (${Window[MerchantWnd].Child[ItemList].List[${ListID},3].Equal[--]}) /varset IsDefaultItem 1

       	/if (!${IsDefaultItem} && ${ListID}) {
           	/echo \atBuying \ag${Window[MerchantWnd].Child[ItemList].List[${ListID},2]}
       		/delay 5
           	/notify MerchantWnd ItemList listselect ${ListID}
           	/nomodkey /shiftkey /notify MerchantWnd MW_Buy_Button leftmouseup
           	/delay 1s
           	/goto :StartBuy
        }

    /next a
    /if (${Window[MerchantWnd].Open}) /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp
    /delay 1s

/return


sub BuyAllTradeskillItems

    /echo \atStarting buy of \ar**ALL**\at tradeskill items under ${MaxBuyPrice}p from \ag${Target.CleanName}
    /declare a int local
    /declare ListID string local
    /declare ItemPrice string local
    /declare IsDefaultItem int local

    :StartBuy
    /for a 1 to ${Merchant.Items}
        /if (!${Me.FreeInventory}) /return
        /if (!${Merchant.Open}) /return
        /varset IsDefaultItem 0
        /varset ListID ${Window[MerchantWnd].Child[ItemList].List[=${Merchant.Item[${a}]},2]}
        /varset ItemPrice ${Int[${Window[MerchantWnd].Child[ItemList].List[${ListID},4]}]}
        /if (${Window[MerchantWnd].Child[ItemList].List[${ListID},3].Equal[--]}) /varset IsDefaultItem 1
        
       	/if (!${IsDefaultItem} && ${Merchant.Item[${a}].Tradeskills} && ${ItemPrice} < ${MaxBuyPrice}) {
           	/echo \atBuying \ag${Merchant.Item[${a}]}
       		/delay 5
           	/notify MerchantWnd ItemList listselect ${ListID}
           	/nomodkey /shiftkey /notify MerchantWnd MW_Buy_Button leftmouseup
           	/delay 1s
           	/goto :StartBuy
        }
    /next a
    /if (${Window[MerchantWnd].Open}) /nomodkey /notify MerchantWnd MW_Done_Button LeftMouseUp
    /delay 1s

/return

Any issues let me know.

Added /dive buyall # option to buy all tradeskill items under # plat.
Added zonename to merchant list heading. If you already have entries in your ini you will need to edit to add the zone shortname manually, such as [poknowledge-Merchants]
Added Partial matching for item names. You will need to add the entry to the ini file manually, such as
[Items]
Immaculate=1
To stop buying an item you need to manually remove the entry. Setting it to 0 does not disable it.
 
Last edited:
I love this name.

Also, very helpful for diamonds / blue diamonds for JC skilling. Remember you're going to get a large chunk of that money back.

- - - Updated - - -

I wonder if this can be altered to dumpster dive for all tradeskill items under X platinum cost. Basically getting some of the skins and runes and poisoncraft stuff, etc.
 
I love this name.

Also, very helpful for diamonds / blue diamonds for JC skilling. Remember you're going to get a large chunk of that money back.

- - - Updated - - -

I wonder if this can be altered to dumpster dive for all tradeskill items under X platinum cost. Basically getting some of the skins and runes and poisoncraft stuff, etc.

As requested

|/dive buyall XX
| Starts buying loop and will buy ALL non default stock tradeskill items under XXp

This ignores the item ini settings and buys any item that is tagged as tradeskills that is also not a default stock item for the merchant. Tested, but let me know if any issues.
 
Does this work with partial item names? Another person mentioned it, but it'd be neat to set it to buy all the runes and parchments and words (to just focus on reaearch) without also buying all the other cheap TS stuff.
 
Does this work with partial item names? Another person mentioned it, but it'd be neat to set it to buy all the runes and parchments and words (to just focus on reaearch) without also buying all the other cheap TS stuff.

It currently does an exact match. Let me see what I can do.
 
Does this work with partial item names? Another person mentioned it, but it'd be neat to set it to buy all the runes and parchments and words (to just focus on reaearch) without also buying all the other cheap TS stuff.

Partial matching supported now. I tested with

[Items]
Immaculate=1

and I got a few matching buys
 
Partial matching supported now. I tested with

[Items]
Immaculate=1

and I got a few matching buys

I just creamed my pants a little ... this is going to be INSANELY fantastic for scooping up JC and Research and other drop-intensive TS items. Thank you!!!
 
Wow. I'm actually a bit stunned. I had this same idea a few weeks ago, but stumbled on the ${Merchant.Item[${a}].Tradeskills} part, as well as the (!${IsDefaultItem}. I gave it up as being too hard. Obviously, not too hard for you. This is purely an awesome macro, and it should be listed in the macro list. I suspect I will use it daily. Geeze, I'm going to go try it during my lunch break before somebody else scours the POK vendors. :sweat:

Now that you mention it, there is a macro that I would use multiple times per day if I had it. Start with targeting a banker (or another character, for bonus points). It would then scour my toon inventory for tradeskill items and autobank/give everything. I know one issue would be handling a mish-mash of bag sizes and types (or just assume every bag is the maximum size, I dunno). Others would be detecting when an item failed to autobank because of no room, and stopping/pausing at 8 stacks when the target is not a banker . The final feature would be an exclude list. I don't know how many times I've accidentally banked my stat food or a stone of marking because they are stored in a tradeskill bag.

Right now, I manually Ctrl-Click all my bags on top of a tradeskill-only bag as a way to collect and combine items together. Then I review what's there to make sure I'm not accidentally banking something I want to keep. Then I put those bags into the last few bank slots. THEN I run the bank sort macro posted by dreamflux Here:
HTML:
https://www.redguides.com/community/threads/55962-Bank-Sorting-Macro
My final step is to swap my empty TS bags back into my inventory from the bank. Yes, it's bit of a pain, even considering the macro assistance.

I did manage to get a couple of utility macros working that automatically transfer specific items between characters. I suppose I should post those for others to use. I wouldn't call them lame, but they're a bit simplistic compared to DumpsterDive. Awesome!
 
Now that you mention it, there is a macro that I would use multiple times per day if I had it. Start with targeting a banker (or another character, for bonus points). It would then scour my toon inventory for tradeskill items and autobank/give everything. I know one issue would be handling a mish-mash of bag sizes and types (or just assume every bag is the maximum size, I dunno). Others would be detecting when an item failed to autobank because of no room, and stopping/pausing at 8 stacks when the target is not a banker . The final feature would be an exclude list. I don't know how many times I've accidentally banked my stat food or a stone of marking because they are stored in a tradeskill bag.

Try it out
https://www.redguides.com/community...adeskill-items-or-one-of-each-collection-item
 
Last edited:
Is there a way to change the code to do partial searches only on certain items? I'm getting a lot of junk being purchased. i.e "shaped prestidigitase" gems being purchased when i want to buy just the prestidigitase. Another example, "crude silk xxx template" purchased when looking for crude silk.
 
I'm either an idiot, or trying this on 2 hours of sleep was the wrong thing to be doing. (leaning towards the 2nd) I just downloaded this plugin to try it in PoK. I don't have an dumpsterdive.ini file, have the PoK navmesh. Started the macro and notta.
 
For starters it's a macro :-) Secondly the code above shows the follow

| To use partial name matching you will need to add the entry to the ini file manually.
|
| Usage: /mac dumpsterdive
|
| Once running the following commands are available.
|
|/dive merchant
| Add targeted merchant to ini under the [Zone.ShortName-Merchants] heading
|
|/dive item
| Add item on cursor to ini then autoinventory the item
|
|/dive start
| Starts buying loop
|
|/dive buyall XX
| Starts buying loop and will buy ALL non default stock tradeskill items under XXp

Have you tried using any commands?
 
Hi Chat, yeah I know it's a macro I do run a few of them ;)

It was a lack of sleep, soon as I got a few more wink and re-read. I got it working. I love it!
 
Glad you got it sorted! Be sure to ask moar questions as needed. I've been known to make my share of errors due to lack of sleep. I just wanted to make sure you understood the difference in a plugin and a macro. That can cause confusion later down the line if you call one the other.
 
toadwart updated DumpsterDive.mac with a new update entry:

Long vendor lists, and functionality addition

Sym no longer plays he says, so I took it upon myself to do some tweaking:

  • Added functionality for longer vendor lists. PoK has 202 vendors currently, and the list is longer than the mac could handle. I've added an alteration to the ini that allows you to break the list into 2 pieces which the mac can now sequence through as it checks the vendors in the list, and an error drop out if you make your list too long.
  • Included a somewhat path optimized vendor list for PoK, that...

Read the rest of this update entry...
 
toadwart updated DumpsterDive.mac with a new update entry:

Version 1.6 Update - Minor tweaks and adjustments

A Few adjustments:

Added a few tweaks to fix some unintended actions
Streamlined a couple of functions to work better, and send fewer unnecessary messages
Added a stand off distance based on Brainiac's changes to MQ2Nav so that you won't stand in the middle of the merchant when trying to buy
-This will require that you're using the newest version of MQ2Nav (1.3.0 or newer, included in VV as of this posting) and a valid mesh

Re-defined the sort order of the PoK merchants to...

Read the rest of this update entry...
 
If I use in zones other than POK I see I need to add the zone shortname in the ini file. How do I determine what the correct zone shortname so that it finds it later when I start the macro?
 
Last edited:
I think there's a TLO for that.

Something like:

/echo ${Zone.ShortName}
 
In my version of this, in order for the toon to open the merchant window, I had to change the following line:

Line #260:
Code:
        /squelch /nav spawn npc ${MerchantName} | dist=22

to this:
Code:
        /squelch /nav spawn npc ${MerchantName} | dist=12

It looked like the original distance of 22 was too far from the merchant to begin the buying process.
 
I also need to do some testing to see if its even properly looking at the items... it opens and closes the merchant window pretty quickly. I'm trying to buy something that's got a low-ish chance of being on the merchant, so i'll need to add something to the list that's got a good shot of being there (or that I know is there).
 
the distance was what I tested for my character, I don't know if character height has an influence on that or not, but closer certainly would help make it work if you're getting spotty use. The open/close thing I've wondered about too, I've considered putting a small delay in there after it opens the vendor, though I've not noticed it missing a buy to date, but it's possible if it's going too fast.
 
the distance was what I tested for my character, I don't know if character height has an influence on that or not, but closer certainly would help make it work if you're getting spotty use. The open/close thing I've wondered about too, I've considered putting a small delay in there after it opens the vendor, though I've not noticed it missing a buy to date, but it's possible if it's going too fast.

with it set to delay moving onto the next vendor now, I think a delay during the purchasing won’t impact performance much.
 
Does anyone know if this still works? I tried to add a merchant this morning and the mac crashed.

1577746045890.png

Tried to add an item macro didn't crash but didn't create the ini file.
 
toadwart updated DumpsterDive.mac with a new update entry:

v1.8 repaired /buyall, fixed some vendor itemlist parsing issues

1. Drawthow pointed out some issues with the buyall function, which I'd never touched since Sym wrote it. DBG added a new column to the vendors at some point and it was pulling information from the wrong column. I fixed that, and through a bunch of testing by myself and Drawthow I think that I managed to track down a few hiccups in the vendor buy routine for both functions, which now appear to be reading and purchasing correctly. I also streamlined, repaired, and accelerated a few subs with...

Read the rest of this update entry...
 
Partially populated ini file to get you started. This has the PoK vendors already listed, with a placeholder currently to search all of them for bone chips, but of course you can populate that list with whatever specific TS item you're looking to dive for. The vendor list is mostly optimized to search PoK in a reasonably linear fashion, with a few jogs to minimize geometry hangup concerns, but without criss-crossing the zone like an idiot all day. Vendors in stalls can still be an issue, the four I know of being Perago, Vuli, Darius, and the chick I can't recall next to him, all give me heartache most times I run this. There are two vendors that are skipped as they never have an inventory, that I've seen, though they are vendors, and it causes the script to hang. If you see nav stop issues with no feedback, it's probably a distance issue, look at who the last merchant it was running to was named, and run there manually, you probably need to fix your nav mesh otherwise. I'll see about putting some feedback loop in there that isn't insane spam to better inform the user in the future.
 

Attachments

@toadwart is it possible to exclude something from the buyall? I like to gather all tradeskill items from the vendors but buying all diamonds kinda drains my wallet.
 
The way the routine is written, the buyall command literally does "buy all". Having said that I suppose it's possible to write an exclusion clause. I'd have to give that some thought. I'll see if I can devote some time to it, I've been pretty tied up for the past 4 months. It's like Covid makes *everything* take more time and effort.
 
Toadwart,

I think there maybe a limitation issue with the /dive item command like the PoK merchants, as I have an extensive list and it does not buy everything on that list even though it is there correctly. This macro is awesome BTW and I hope I can get it working.
 
There is a limitation which lists that exceed 2048 characters, and it will truncate after that point. I don't know if that's what you're encountering though, but it's going to take your list of buy items and append them all together in a comma delimited string until it hits that character limit.
 
That seems to be my problem. Can this be adjusted to use multiple items lists like the merchant names? I tried manually adding them to the ini file but it did not work.
 
Release DumpsterDive.mac

Users who are viewing this thread

Back
Top
Cart