Download
(11 Kb)
Download
Updated: 07-14-09 04:41 AM
Pictures
File Info
Updated:07-14-09 04:41 AM
Created:06-23-09 06:53 AM
Downloads:2,462
Favorites:26
MD5:
GetReagents
Version: r217
by: recluse [More]
Click here to lend your support!
GetReagents will no longer be updated by me. I have created a "Lite" version which can be found here. GetReagents will likely continue to work fine for quite some time, so there is no need to panic right away. I do apologize for the migration to a lite version, but I no longer have enough time to work on my more in-depth addons. Thank you all for enjoying this, and I hope that my lite version can serve the purpose that this one did for you.

GetReagents is a simple reagent restocking utility.

It can auto-stock any item which can be bought at a vendor. While it does come pre-loaded with known reagents for each class (initially set to a stock of 0 for safety), you can add any item you like to the list.

/reagents or /getreagents will open the configuration GUI.* From it, you can change each reagent's stock amount, add new reagents, or remove reagents you will no longer use (see screenshots).

Add Stuff
To add an item, you can either use a slash command with an item link, or the itemID if you know it. To use the slash command simply type /reagents and then shift-click the item you wish to add to the list: /reagents [itemlink] . If you know the itemID, you can open the GUI and enter it in the appropriate box.

Items added to the list do not have to be reagents, specifically. You can add food, water, arrows... Anything a vendor sells can be stocked.

Remove Stuff
To remove an item, open the GUI and select the item you wish to no longer purchase. If you might like to purchase it again in the future, you can simply set the quantity to zero. If you have no intention of ever buying it again, and just want it gone from your list, click the delete button.

Purchase Confirmation
If you do not enable the Confirm purchase option, GetReagents will silently restock your purchase list when the items are available at the vendor. If you would like to decide if the purchases should be made, you can enable this option. GetReagents will open a dialog asking for permission to buy the items.

Confirmation Details
If you would like even more control over what GetReagents purchases, or are simply curious how many of what are being stocked, you can also enable confirmation details. If enabled, the confirmation window will list each reagent it wants to purchase, and allow you to buy them individually, or simply buy them all.

Overstock
GetReagents will not stock more than you specify, so if purchasing more will put you over the stock you set, GetReagents will not buy more. For example, vendors sell [Ice Cold Milk] in stacks of 5. If you have a stock of 20 set, and there are 18 in your bags, GetReagents will not make a purchase. However, if you had 13 in your bags, GetReagents would only purchase one stack of 5, for a total of 18.

------------

* While GetReagents and GetReagents_Options both have little memory footprint, if you choose to do so you may disable GetReagents_Options. GetReagents will stock the amount of reagents you have previously set even without the GUI loaded. You will not be able to access the GUI or change reagent values without it, but it is not necessary to be loaded at all times. Many users will have no need to access the GUI after initial setup, and this allows them to free up the memory used by it.
11/25/09: GetReagents will no longer be updated by me. I have created a "Lite" version which can be found here: http://www.wowinterface.com/downloads/info15233-GetReagents-Lite.html GetReagents will likely continue to work fine for quite some time, so there is no need to panic right away. I do apologize for the migration to a lite version, but I no longer have enough time to work on my more in-depth addons. Thank you all for enjoying this, and I hope that my lite version can serve the purpose that this one did for you.

r217:
- Moved bad itemid sanity check to an earlier occurrence to prevent them from slipping through and erroring.

r216:
- Fixed nil value error when deleting a reagent.
- Introduced an option to change the background color of the confirmation window.
- New option to show detail on the confirmation dialog, which will list a breakdown of each reagent to be purchased, with the ability to purchase them individually.
- Removed slider for setting quantity, replaced with an edit box, allowing the user to enter any number they wish (cap removal).
- Enlarged the delete button.
- Inset confirmation options, so they hopefully appear to be more like suboptions of the parent checkbox.
- Added several tooltips for various components to help further explain their functionality in-game.
- Eliminated redundant tables with frames in them for quantity editing. I'm not sure why they were a good idea to begin with...
- Fixed (now) redundant hiding of reagent editing controls.
- Added visual feedback for each menu item, displaying the quantity currently set.
- Removed the Add button for itemid-based adding of reagents. You can simply press the enter button to add the item.
- Simplified the text in the itemid-based reagent adding edit box, as the new tooltips provide the extra information.
- Cleaned up addon description page.

r202:
- Add /reagents [itemlink] to add an item to the purchase list without need for obtaining the itemID.
- Modified add reagent text to indicate reagents can be added with a slash command.
- Moved reagent delete button to a more intuitive location.
- Removed current stock display from slider caption.
- Added dynamically updated edit box with which exact stock can be set.
- Ensured edit boxes can only be submitted with proper values (I think I caught them all).
- Force edit box hint text to return after focus leaves the control.
- Shortened a few variable names.

r199:
- Removed erroring poison itemid's from pre-loaded reagent list.
- Added a check so as not to error from a bad itemid, and remove it from the reagent list as well. If this occurs, you will receive a chat message informing you of the item's removal.
- Fixed pre-loaded reagent persistance. Pre-loaded items will remain deleted after you delete them now.

r198:
- Fix for confirmation math. *makes more coffee* >.>

r197:
- Added purchase confirmation option.

r196:
- Initial upload.
Optional Files (0)


Archived Files (6)
File Name
Version
Size
Author
Date
r216
11kB
recluse
07-14-09 03:53 AM
r202
8kB
recluse
06-25-09 10:02 AM
r199
8kB
recluse
06-24-09 12:44 AM
r198
8kB
recluse
06-23-09 05:21 PM
r197
8kB
recluse
06-23-09 04:15 PM
r196
7kB
recluse
06-23-09 06:53 AM


Post A Reply Comment Options
Unread 10-03-10, 02:58 PM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1049
Uploads: 0
Thanks for the code; used it, has fixed the ammo issue.

Something else that may (or may not) be insignificant as Cataclysm/4.x fast approaches. The confirmation box quantity math is off a fair bit in various circumstances.

Started leveling the hunter (that had the previous ammo problem) as well as a Paladin in the past couple of months. On the hunter, added the following item to buy with GetReagents at vendors: Pungent Seal Whey x60.

Have it set to bring up the confirmation box (as always). Every time the box comes up, it states that its going to buy "200" of those items. The cost of the 60 (or however many needed to stack) items is shown correctly, but the quantity never is. It always shows "200" in the confirm box.

Regardless of that, it still buys the proper quantity, as reflected in the given cost in the confirm box. But its a somewhat distracting seeing a quantity its not buying (and you haven't set it to) displayed.

Similar problem on the Paladin. Have it set to buy (with conformation) Symbol of Kings x300. Any time the existing quantity on the character is 200 or more and you open a vendor window, the confirm box displays both the proper quantity & the cost.

But drop below 200 Symbol of Kings on the character when opening a vendor, the quantity in the confirm box switches strangely to "2000". The cost shown is appropriate, but not the quantity. Like the Hunter water above, though, it always buys the correct amount. It just displays the wrong quantity when dropping below 200 on the character when opening the vendor.

This behavior is consistent on both characters on vendor window openings. Hope its a simple fix
Zidomo is offline Report comment to moderator  
Reply With Quote
Unread 03-21-10, 12:59 PM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
Originally posted by Zidomo
Open the vendor, an error is thrown up. Also get a chat warning that I "don't have enough money"
Change GetReagents\GetReagents.lua line 95
from
Code:
if (itemprice * amounttobuy) > GetMoney() then print("Not enough money."); return "oom" end
to
Code:
if (itemprice * amounttobuy/merchantstack) > GetMoney() then print("Not enough money."); return "oom" end
The error is actually caused by the return "oom" (out of money) in that line, but the return value is needed for other parts of the code. To prevent the error from happening if you really do not have enough money...

change GetReagents\GetReagents.lua line 194
from
Code:
if cost < 1 then return end
to
Code:
if cost == "oom" or cost < 1 then return end
Both should be done to get everything working again. The problem was that it was multiplying the cost of the bullets (14.5 silver or so) by the quantity needed (2000), and thus was getting a _huge_ number and thinks you don't have enough money because it's so large. after dividing by the merchant's stack (200), the ~14.5 silver only gets multiplied by 10, which is correct.

This only affected the CHECK for how much it cost. It was still going to purchase the proper amount. It just thought you didn't have enough money is all.

I guess I never unearthed the bug because I always had too much gold on hand for it to error on me.
__________________
We'd be together, but only diamonds last forever...
Recluse is offline Report comment to moderator  
Reply With Quote
Unread 03-21-10, 01:44 AM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1049
Uploads: 0
Sorry to see that you won't be updating/fixing this anymore in conjunction with your new, limited feature GetReagents-Lite. Purchase confirmation (unavailable in GetReagents-Lite) is the main reason I have been using it.

Anyway, sorry to see it abandoned. It does have a bug in a certain scenario, if you ever want to pick it up again.

On a mid-level hunter, WoW 3.3.2.11403 live, USEnglish client/server. Set 2000 Impact Shots to be bought. Head to Thurman Mullby, an Alliance "General Goods" vendor who carries those bullets (on page 3 of 4 of his items). Open the vendor, an error is thrown up. Also get a chat warning that I "don't have enough money" (which is false, there is 80+ gold on that test character) and nothing is bought (and the confirm box does not appear):

Code:
["message"] = "GetReagents\\GetReagents.lua:194: attempt to compare string with number\nGetReagents\\GetReagents.lua:24: in function `?'\nGetReagents\\GetReagents.lua:27: in function <Interface\\AddOns\\GetReagents\\GetReagents.lua:27>\n\nLocals:|r\nself = GetReagents {\n VARIABLES_LOADED = <function> defined @Interface\\AddOns\\GetReagents\\GetReagents.lua:26\n 0 = <userdata>\n UpdateSettings = <function> defined @Interface\\AddOns\\GetReagents\\GetReagents.lua:225\n MERCHANT_SHOW = <function> defined @Interface\\AddOns\\GetReagents\\GetReagents.lua:24\n MERCHANT_CLOSED = <function> defined @Interface\\AddOns\\GetReagents\\GetReagents.lua:25\n}\nHasReagents = <function> defined @Interface\\AddOns\\GetReagents\\GetReagents.lua:37\nConfirmPurchase = <function> defined @Interface\\AddOns\\GetReagents\\GetReagents.lua:191\n\n  ---",
            ["type"] = "error",
           ["session"] = 1399,
            ["counter"] = 5,
        }, -- [477]
The error repeats every time you open the vendor. No other auto-buy/sell mods are being run. This problem only occurs with hunter bullets. Setting GetReagents to buy Priest candles, vendor water refills & Mage reagents works fine.
Zidomo is offline Report comment to moderator  
Reply With Quote
Unread 10-21-09, 06:43 AM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1049
Uploads: 0
r217 has been working reliably for months without issues, so haven't really thought about it too much again. But more guild members here I have recommended it to and they brought up the issue I described to you earlier. The confirmation box is still too dark & transparent.

I assume that the color & transparency are set by lines 167 & so on in the GetReagents.lua file. By default, if you could change the transparency (first) to completely go away and the color (second) to not be so dark for users other than me who don't edit LUA files, it would improve this mod from being great to being perfect .
Zidomo is offline Report comment to moderator  
Reply With Quote
Unread 07-14-09, 05:11 AM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view AddOns

Forum posts: 268
File comments: 942
Uploads: 5
Re: Login Spam, Load On Event

Originally posted by recluse
just not perform the initialization until the frame gets the event
Exactly. No but that's maybe pushing a bit
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Last edited by Caellian : 07-14-09 at 05:12 AM.
Caellian is offline Report comment to moderator  
Reply With Quote
Unread 07-14-09, 05:02 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
Login Spam, Load On Event

Originally posted by Caellian
1. not have the slash commands message every login
*nod* I've been wondering about the login spam myself for a very long time, as I use it for most of my addons to guide the user and all. There really isn't any great reason why it's there really, aside from preventing several users from coming and asking how to get the options open (I can see it now! lol). It wouldn't be too difficult to add some sort of isFirstLoad saved var or something to prevent it from re-spamming, or to just not have the message at all.

Originally posted by Caellian
2. have the addon only load OnEvent, for example with MERCHANT_SHOW so that the addon isn't loaded unless you visit a vendor.
Do you mean like, support for AddonLoader? Or just not perform the initialization until the frame gets the event?

I do plan on moving the creation of the confirmation dialog to a more proper place, which will prevent it from using the few kb the dialog eats until it wants to buy stuff, but haven't gotten around to it yet. The options dialog however, doesn't truly load until you open the GUI currently.

Originally posted by Caellian
OH and, damn nice addon
Thanks!
__________________
We'd be together, but only diamonds last forever...
Last edited by Recluse : 07-14-09 at 05:04 AM.
Recluse is offline Report comment to moderator  
Reply With Quote
Unread 07-14-09, 04:44 AM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view AddOns

Forum posts: 268
File comments: 942
Uploads: 5
Few suggestions:

1. not have the slash commands message every login
2. have the addon only load OnEvent, for example with MERCHANT_SHOW so that the addon isn't loaded unless you visit a vendor.

OH and, damn nice addon
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Last edited by Caellian : 07-14-09 at 04:46 AM.
Caellian is offline Report comment to moderator  
Reply With Quote
Unread 07-14-09, 04:39 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
Naughty itemIDs

Originally posted by Caellian
Code:
12:31 GetReagents_Options\Options.lua:76: attempt to concatenate a nil value
Hmm, I can see how that might be an issue now that I'm looking at the source again. I had made a couple of changes there, and I'll move the sanity check a bit earlier, which should allow it to bail on a bad item properly.

EDIT: r217 should fix this issue.
__________________
We'd be together, but only diamonds last forever...
Last edited by Recluse : 07-14-09 at 04:44 AM.
Recluse is offline Report comment to moderator  
Reply With Quote
Unread 07-14-09, 04:33 AM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view AddOns

Forum posts: 268
File comments: 942
Uploads: 5
Until now StealYourCarbon did a fine job but i'll give this one a try.

One bug:

If you misstype an ItemID and add it, from that point you can't use tha addon anymore, everything you do trigger this error:

Code:
12:31 GetReagents_Options\Options.lua:76: attempt to concatenate a nil value
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Last edited by Caellian : 07-14-09 at 04:44 AM.
Caellian is offline Report comment to moderator  
Reply With Quote
Unread 07-14-09, 04:01 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
r216 Release

Alright, I submitted the new revision. I hope you all enjoy it.

The changes are a bit extensive, and I did cover most of it in my last post (just before this one ). Have a look over the Change Log if you are interested in all of the changes. I've also updated the description page, as well as the screenshots here on WoWInterface, so that will probably shed a lot of light on the changes as well.

Briefly (notably):
- Option for detailed confirmation box.
- Option for changing confirmation box background color/alpha.
- Purchase list drop-down shows current quantities.
- No cap on quantities entered by users.
__________________
We'd be together, but only diamonds last forever...
Recluse is offline Report comment to moderator  
Reply With Quote
Unread 07-11-09, 12:06 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
Preview Screens of Next Release

These are just previews of where I'm at with everything at the moment. These are not in the released version just yet, but will be soon if all goes as planned.

- I've added a color picker box which you can click on to set the color of the confirmation box's background color, as well as it's opacity.
- There is also a new option for adding detail to the confirmation box, which you can see in action in the second screenshot below.
- Both of these options are hidden from view if you have the purchase confirmation unselected, since there is no reason to change their values in that state.

- The top confirmation box is the current one, and is the one you will continue to see if you have confirmation detail UNchecked.
- In the second frame, you can see how the confirmation detail option modifies the purchase confirmation frame. It adds each reagent's name, how many it wants to purchase, and the cost of doing so. Think of it as a receipt, in a sense .
- I've also decided to include individual buttons for each reagent, so that they may be purchased individually (in case you did not want to restock everything). There is still a button to just buy everything, however.
- In the third frame, you can see how the frame changes if you buy an individual reagent. The button will disable itself, and the text will dim, indicating that the reagent has been purchased. The total purchase value at the top will also change to reflect the new total cost if you were to push the Buy All button.
- Clicking Buy All after buying an individual reagent will NOT buy that reagent a second time.
- If you purchase all of the reagents individually, the frame will close, signifying that everything has been purchased, and GetReagents has no more work to do. The frame still closes as before if you click the Buy All button.


I have yet to implement any sort of cap removal/increase on reagent purchases, but I hope to get around to them soon. I should have enough time this weekend, I think.

Hopefully, this will address some of the requests or concerns anyone has had since the last release.
__________________
We'd be together, but only diamonds last forever...
Recluse is offline Report comment to moderator  
Reply With Quote
Unread 07-09-09, 02:57 PM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1049
Uploads: 0
Thanks very much for your reply .

Originally posted by recluse
I'll add the alpha to my next update, I can understand how it might be inconspicuous as it is.
Great! I look forward to the next revision.

Originally posted by recluse
One of the things that I wanted to put in these caps in for was just so someone did not accidently type in some insane number like 200, when they meant to only type 20. ...

In some ways I'd like to leave the cap in place, and simply raise the caps as needed, which will protect those who do not use the purchase confirmation dialog. Perhaps even let the user define the maximum amount of stacks for each item as a safety mechanism. For now, I believe this opttion may be the best course of action until a future time when I feel better about allowing it to be freely edited, or get more requests for it.
Its the principle of it which I find offputting. If I want to buy an entire backpack full of hunter arrows regularly (despite the fact they stack to 1000 now), why can't I? Why is the mod author deciding what is "best for me"? If you really want self-help protection for those who may input erroneous amounts due to a typo, there are ways to do it other than arbitrary limits.

One is yet another confirmation dialogue once someone enters numbers/the slider past the point the author (you) feels comfortable letting people buy. For example, pop up a confirmation box (i.e. "Do you really want to buy 700?, Yes/No") once someone enters a number past 200 for Devout Candles. Or hunter bullets past 5000, etc..

Another way is to do it exactly how BuyDropper did it. Instead of just accepting a number when the user presses ENTER as it is now (which has a chance of typos), have the quantity selection--whether a white space entry or a slider--in a "yes"/"no" frame. The user has to click a "Yes" button after entering a selected amount in order for it to be set. That way, the user has to choose & confirm that they want to keep that amount in stock and there is much less chance of typos.

And then there is your suggestion of "...let the user define the maximum amount of stacks for each item as a safety mechanism." As long as you don't limit those stacks.

Basically, with other ways to prevent mistakes, please do not arbitrarily limit a person's wanted, confirmed choice.

Originally posted by recluse
As for the overstocking, I ensured that it does not happen, and while some addons offered the option to toggle overstocking, I wasn't really sure if it was even really a desired option.
I was actually talking about a poorly coded mod seriously overbuying past what the user has set, not an "overstocking" option. Such as when you have set to mod to restock 100 total reagents, but the mod instead decides to completely fill up 3+ empty 20-slot backpacks...oops! Which, of course, could have been prevented with code safeguards.

Allowing "overstocking" (completely different from the above), though, can add flexibility. Bringing up BuyDropper again with how it gave an overstock option: "Toggles whether to overstock items that come in preset stacks like food or water. For example, say you are tracking Ice Cold Milk 20 and you have 17 in your inventory and you open a vendor who sells Ice Cold Milk. With overstock enabled, you will buy a bundle of 5 to bring your total to 22." Not something I ever used, but I know a few people using that mod that have.
Last edited by Zidomo : 07-10-09 at 06:43 AM.
Zidomo is offline Report comment to moderator  
Reply With Quote
Unread 07-08-09, 04:26 PM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
Confirm alpha, Restock limit

Originally posted by Zidomo
confiirmation popup box's frame alpha

Should allow people to enter any amount they want for any reagent
I'll add the alpha to my next update, I can understand how it might be inconspicuous as it is.

With the restocking limits, I felt they were well higher than anyone would desire, and I mentioned that its presence is fairly loose on the description page (there in the red footnote). It does make a bit of sense that those candles might be needing a higher cap on them, as they are used for multiple spells, whereas most are only used for a single spell.

One of the things that I wanted to put in these caps in for was just so someone did not accidently type in some insane number like 200, when they meant to only type 20. Now, since adding in the purchase confirmation dialog, it isn't quite as important to have the cap in place, as I'm sure they'll wonder why GetReagents is asking for permission to spend 20g or something.

In some ways I'd like to leave the cap in place, and simply raise the caps as needed, which will protect those who do not use the purchase confirmation dialog. Perhaps even let the user define the maximum amount of stacks for each item as a safety mechanism. For now, I believe this opttion may be the best course of action until a future time when I feel better about allowing it to be freely edited, or get more requests for it.

It will likely be another week or two before I push the next release revision, so things may change between now and then.

As for the overstocking, I ensured that it does not happen, and while some addons offered the option to toggle overstocking, I wasn't really sure if it was even really a desired option.
__________________
We'd be together, but only diamonds last forever...
Last edited by Recluse : 07-08-09 at 06:40 PM.
Recluse is offline Report comment to moderator  
Reply With Quote
Unread 07-08-09, 10:29 AM  
Zidomo
A Cliff Giant
 
Zidomo's Avatar

Forum posts: 76
File comments: 1049
Uploads: 0
r202 is very nice. Reliable (so far) & lightweight. Except for two things .

--The confiirmation popup box's frame alpha is set way too low. Its quite difficult to see at a glance when it pops up. Something like BuyDropper provides (a frame set to a "full" alpha/1.0) would work better for many people.

--The arbitratry limits you have set for buying certain reagents (tested so far) are not good. The limit on Devout Candles--for both the slider and the input box--is 80. Well, what if I want to restock 100? Have to manually go in and buy an extra 20, defeating the point of the mod.

Should allow people to enter any amount they want for any reagent. With protection, of course, against the mod mistakenly overbuying more than what someone has set (a serious problem the new FactionDiscount AutoStock had when I tried it). Don't even really need a slider as you have now, a plain text entry box works fine.
Zidomo is offline Report comment to moderator  
Reply With Quote
Unread 06-30-09, 11:55 AM  
Recluse
A Cliff Giant
 
Recluse's Avatar
AddOn Author - Click to view AddOns

Forum posts: 70
File comments: 112
Uploads: 14
Restock Listing

Originally posted by PingHansen Could you make the confirmation show what is being bought?
I was actually thinking about this the other day. My thought was to just have a tooltip with the list show if you moused over the amount in the confirmation dialog. Definitely something I'd like to add once I decide on a method to provide the data to the user, though.
__________________
We'd be together, but only diamonds last forever...
Last edited by Recluse : 07-02-09 at 03:19 AM.
Recluse is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.