View Full Version : OCD Inventory control
Bale's OCD Inventory Control 3.8
relay OCD dB Manager 1.8
I know that KoL attacts a lot of borderline OCD personalities that want to ensure that their inventory is never cluttered, so I figured I'd post this for their sake.
This is a script that will allow you to list the proper dispensation for absolutely every item that may be in your inventory. You can tell it exactly how many to keep of any given item, or tell it to keep all of them. You can tell it to put items in the mall, send items as gifts, mix keys into pies, use gift certificates, stock your display case or autosell trash items. It can either stock your own mall store, or send mall items to your mall multi.
Okay, the script is honestly a bit insane. I admit I'm somewhat nuts for listing a method of dealing with every single item I may own. I actually use this because I want to cleanse my inventory before every hardcore ascension. It takes a bit of effort to make the list of everything, but now my inventory can be malled in a flash. If anyone else wants to make the trouble of making their own list it would do the same for them.
If it's too much trouble to categorize your entire inventory because you only want to automate handling of a few items, that's fine. The script will operate on the items you specify and ignore the rest. It'll just warn you so that you know you've got uncategorized items.
To bring some sanity to the process of maintaining the OCD list, there is a relay script. This relay script will give you a quick and easy method of categorizing everything currently in your inventory. It will also allow you to edit items currently in your OCD database. Separate OCD databases are maintained for every character. Check it out and be amazed.
If you want to send mall items to a mall multi, there's an option for that in the relay scripts configuration tab. Just leave it blank to use your own mall store.
Note about stocking your mall store: When it malls an item in your store, you can choose to automatically price items or price them at maximum. On automatic pricing it will set the price to the 5th purchasable item in the mall. Hopefully that will enable it to skip a lot of 1/day limit stores.
How to use:
Get zlib (http://kolmafia.us/showthread.php?2072-ZLib-Zarqon-s-useful-function-library) if you don't already have it. If you're running any other scripts, odds are that you already have it.
Download OCD Inventory Control to your /scripts directory.
Download relay_OCD_dB_Manager to your /relay directory.
Invoke OCD dB Manager from your relay browser's top menu. Use it to create a map file with a list of how you want to treat every item. This map file can also be edited in a plain text editor if you're careful.
Run OCD Inventory Control from your script menu to make all your excess items go away.
Once you've set it up, your inventory will be disposed of, fast!
http://b.imagehost.org/0359/OCD02.png
jayleesummers
03-21-2009, 05:40 PM
I'm going to try this. I can't stand for my inventory to be junky. I wish I could mark things in my inventory different colors. Green is already used for memento's. I wish that junk and singleton items were not both gray. And I wish I could color the stuff that is sellable in the mall a different color. That would be sweet.
Anyways, I'll let you know how I like this.
Ok, I tried it and I got this message
"bad item value: fishy wand"
Ok, I tried it and I got this message
"bad item value: fishy wand"
You'll need to either delete that item or else download a recent build. Your build simply predates the existence of the fishy wand.
I'd like to emphasize that this script is not to be used by someone who doesn't understand it since you may find yourself with a lot of meat, but lacking some item that you really liked. My list is not likely to be the same as yours. Make sure everything you want to keep is included in the list.
zarqon
03-23-2009, 12:40 PM
This is my new second favorite script name. I'm not sure if I'm OCD enough to use this script, but it looks like fun, and thanks for sharing.
Second favorite? What is your favorite script name?
Glad you like it since you gave me the inspiration to write it. I've got just a couple more things on my personal version, like display casing any of my hobo gear that I removed to play around with in aftercore and a few wand zaps. Now I can just set this as my ascension script and I'll never again need to remember what to before ascending. It takes obsession out of OCD.
By the way, what sort of bats do you like? batblades and bat wings? What about hot wings? (They look like bat wings...)
zarqon
03-24-2009, 05:19 AM
My favorite script name is still this one. The font also helps.
I like anything that is a bat, is part of a bat, or has bat in the name (but not things like "battered hubcap"). My DC has at least one of pretty much all the bat-related items I enjoy. If you can think of another though I'd be excited to hear about it.
Lol! Okay, that's a funny script name. Particularly with that font. :D
Thanks for the info. I'll have to add you to my personal OCD script for a couple of those items.
Shiverwarp
03-29-2009, 12:16 AM
Interesting... wish there were some easy way to integrate this into mafia so I could just select all the things I wanted to save/auto/mall and add them to a list, or a way to add all the new Mr. Store stuff automatically.
Anyways, great stuff, I'll have to spend a lot of time configuring it for my own use though
Alhifar
03-29-2009, 01:10 AM
What exactly is the point of these lines?
auto_sell [$item[vial of Gnomochloric acid]] = -1;
auto_sell [$item[flask of Gnomochloric acid]] = -1;
auto_sell [$item[jug of Gnomochloric acid]] = -1;
Unless I'm misreading something, a negative value in the auto_sell map will simply be ignored. Am I mistaken?
You're right. Such items won't be sold, but I wanted them to be listed anyway in case I changed my mind. Perhaps that was a weird design choice.
Alhifar
03-29-2009, 06:18 AM
For the autosell map, wouldn't you get the same effect by simply not putting them in the map? I understand the negative values in save[], but not auto_sell[].
Sorry. Misread your post. Realized what you'd written. Then edited my post mere moments before you posted a follow-up reply. Here's what my edited post says:
You're right. Such items won't be sold, but I wanted them to be listed anyway in case I changed my mind. Perhaps that was a weird design choice.
It would have the same effect if I hadn't put them in the map at all. I just wanted it to be easy to alter if I change my mind.
[quote=zarqon;11187]My favorite script name is still this one. The font also helps.
:)
one of my most useful/least used by others scripts...
Bale, I'm sorely tempted, but I've made too much meat off random crap that suddenly became valuable due to a special event or game mechanic change (100 briefcases during Crimbo, anyone?). Cool script though!
Shiverwarp
03-29-2009, 10:59 PM
Seems to have worked great, except for a couple little hickups with pricing it seems...
03/28/09 20:04:46 Bubblies bought 1 (Hodgman's journal #4: View From The Big Top) for 100 Meat.
03/28/09 20:04:41 Bubblies bought 4 (Hodgman's journal #2: Entrepreneurythmics) for 400 Meat.
So I got outted about 1 mil meat, that's all I noticed. Maybe a problem with the "#" or something else in the item name?
gullebrand
04-04-2009, 03:10 PM
Great script!
Is there any way to include the option of sending stuff to wadbot?
Yes. I'm not going to add it to the script, but if you want to do it, you'd just need to add something similar to this:
cli_execute("send "+ to_string(item_amount(it)-save[it])+ " " +to_string(it) + " to wadbot");
Shiverwarp
04-04-2009, 11:29 PM
Any thoughts as to the mispricing of Hodg journals?
Mispricing? My thought is that someone was selling some of those for a surprisingly cheap price.
When you tell a script to simply price according to current mall prices you take your luck. You could argue that is a serious design flaw and if you want to figure a way of making sure everything is priced in a way guaranteed to make you money, then go ahead and do it.
My recommendation is to manually mall anything whose price you're concerned about, or write in an exception for that item. I'm not really concerned enough to do so myself.
Shiverwarp
04-05-2009, 01:51 AM
The first 5 items of both journals minpriced? Completely improbable.
I think I've found the problem, when actually searching for "hodgman's journal #4: view from the big top" It returns no results, same with "hodgman's journal #2: entrepreneurythmics"
So apparently the search just doesn't like those items, I'm guessing the colon.
Anyways, the problem is this makes the script minprice them, rather than leave it as the max price. This could be a problem for any such item that returns no results for some reason.
Well, I want them minpriced. If you want them maxpriced, it's a simple change. I assume you can do that?
If search doesn't like the colon, then that is a mafia bug. Please report the bug (http://kolmafia.us/project.php?do=issuelist&projectid=1&issuetypeid=bug) or else I'll play with it a bit once I'm out of Bad Moon and then report it myself.
Shiverwarp
04-05-2009, 07:17 AM
When your script finds no items it minprices them?
I haven't even looked into ash at all yet, mind pointing me in the right direction so I could change it myself?
When your script finds no items it minprices them?
I haven't even looked into ash at all yet, mind pointing me in the right direction so I could change it myself?
Actually it will minprice items even if they are already in your store. (To be more specific it prices them equal to the 5th purchasable item in order to hopefully skip over a few 1/day items.) I do that because I prefer selling items to not selling items. Obviously your mileage differs.
Here are references for ash.
http://kolmafia.sourceforge.net/advanced.html
http://wiki.kolmafia.us/index.php?title=Main_Page
And of course examining scripts in these forums are another great way to learn its tricks. I've learned a lot from the scripts here.
Shiverwarp
04-05-2009, 08:40 AM
I'm kind of confused, why exactly is it minpricing when no items at all are found in the search?
I understand the 5th purchasable item thing, that's great and one of the reasons I liked the look of this, it protects rather well against accidental minpricings of valuable items.
I'm kind of confused, why exactly is it minpricing when no items at all are found in the search?
I have no idea why mall_price() would do that.
gullebrand
04-06-2009, 06:10 PM
Yes. I'm not going to add it to the script, but if you want to do it, you'd just need to add something similar to this:
cli_execute("send "+ to_string(item_amount(it)-save[it])+ " " +to_string(it) + " to wadbot");
Ok, thanks, but I'm not sure how to implement this, I'm not good enough with ASH. I don't know any ASH, as a matter of fact, but I could probably figure it out with some help.
I want to make a list of things to send to wadbot, same as the "auto_sell" and "save"-portions of your script, how would I go about that?
I'm guessing I could write
waddify [$item[giant needle]] = 0;
waddify [$item[wolf mask]] = 0;
and so on, but the executive part of the script i have no idea how to do. If you or anyone would give me a hint, I'd really appreciate it.
If you want to make it simple, you could just copy the autosell part of the script. Change auto_sell to waddify, then replace the autosell part of the routine with "send "+tosell+ " to wadbot | wads". Also, make sure that you reset the variables queue and tosell, but you don't define them again.
Shiverwarp
04-10-2009, 02:54 AM
Another strange thing happened with pricing today, the script did this:
mallsell * green smoke bomb @ 3100, * bottle opener belt buckle @ 325, * beaten-up Chucks @ 2200, * gauze garter @ 199, * Mick's IcyVapoHotness Inhaler @ 7770, * bottle of Mystic Shell @ 3000, * scented massage oil @ 8000, * demon skin @ 110, * round green sunglasses @ 1400, * McMillicancuddy's Special Lager @ 1095, * melted Jell-o shot @ 290
I then checked my mall store immediately after the script finished running...
04/09/09 19:48:11 xanth bought 1 (Mick's IcyVapoHotness Inhaler) for 199 Meat.
04/09/09 19:46:53 MidnightBlue bought 2 (scented massage oil) for 6000 Meat.
So apparently it's giving the price of the previous item sometimes?
jasonharper
04-10-2009, 04:58 AM
Mallselling multiple items, with individual prices or limits specified, seems to be fundamentally broken at the moment. The prices and limits aren't really attached to a particular item, they are in parallel arrays that are used sequentially. So, if a particular item can't be sold for some reason (nontradable item, zero quantity, on the memento list, etc.), its price & limit get used for the following item, and all remaining items are shifted over. <s>Worse yet, it appears that attempting to sell more than 11 items at once will reuse the price and limit values from the beginning, for each batch of 11 items.</s> EDIT: splitting into batches was being done OK, the problem is only within an individual batch.
I'm working on a fix now. Short term: do NOT use mallsell if both of the following conditions are true.
1. More than one item is sold with the same command (a single item should always work fine).
2. Any of the items have prices or limits specified (using the existing or default values should work).
EDIT: should be fixed in r7146.
mredge73
04-16-2009, 03:46 PM
I am a big fan of you guys and I am new at scripting
I am building a script based off of OCD control and Hardcore Checklist to do a similar cleanup, but can be run everyday during a hardcore run. I have a quick question from you guys on a small part early in the run.
Do any of you guys know how to autosell rat whiskers?
This is what I wrote but it does not work:
if (item_amount ($item[rat whisker]) > 0)
{
print("Trading Whiskers for Meat...", "blue");
visit_url("town_wrong.php?place=artist");
//##### next line does not do anything, I want to sell the whiskers
visit_url("town_wrong.php?action=Sellwhiskers");
}
Veracity
04-16-2009, 03:53 PM
visit_url("town_wrong.php?place=artist&action=whisker");
...should do it. We do have an ArtistRequest built in, in case we want to add a CLI command or something to do this, but it's not implemented yet.
mredge73
04-17-2009, 04:21 PM
Thanks for the quick response; it worked perfectly!!
Another question if I may:
Is there a way to check the campground to see what is there?
On the documentation site I saw that you have:
have_chef()
have_bartender()
Can I also check for a meat maid and to see what kind of tent/house/lodging that I have?
PS
If I should be posting questions like this elsewhere please point me in the right direction. I am building on top of Bale's ODC inventory control so that is why I am here (the cleanup inventory thread looked like a lot of incomplete code).
jasonharper pretty much created the necessary functionality at my request once. :D As far as I know it is only documented here (http://kolmafia.svn.sourceforge.net/viewvc/kolmafia?view=rev&revision=6502) and here (http://kolmafia.us/showthread.php?p=8409#post8409).
int [item] camp = get_campground();
if(camp[$item[meat maid]] > 0)
print("Have meat maid!");
foreach key in camp {
print(key + "=" + camp[key]);
}
print("");
print("Minimum HP restored:");
print((numeric_modifier("Base Resting HP")-1) * (numeric_modifier("Resting HP Percent")+100) / 100 + numeric_modifier("Bonus Resting HP"));
print("Maximum HP restored:");
print((numeric_modifier("Base Resting HP")+1) * (numeric_modifier("Resting HP Percent")+100) / 100 + numeric_modifier("Bonus Resting HP"));
print("Exact MP restored:");
print(numeric_modifier("Base Resting MP") * (numeric_modifier("Resting MP Percent")+100) / 100 + numeric_modifier("Bonus Resting MP"));
mredge73
04-24-2009, 04:11 PM
Worked perfectly again!
Another question:
How do I defeat the "singleton" items?
I want my script to be able to auto sell the "gray items" while in hardcore but it gives the command to sell them and they are not sold.
Here is my output for example on a random run:
You are running MrEdge73's Hardcore Inventory Control version 20090424
Refreshing closet...
Updating consumable items...
Updating miscellaneous items...
Refreshing stickers...
AutoSelling items to NPCS...
Autoselling items to NPCs...
Items sold.
Presenting the CleanUp Log for Today (20090424) using script version: 20090424
These Items Were AutoSold to NPCS: 4 Knob Goblin elite pants, 3 Knob Goblin elite polearm, 2 Orcish baseball cap, 1 Orcish cargo shorts,
Total Items AutoSold: 10
Total Meat Harvested from Items: 695 meat.
Daily Hardcore Cleanup Complete
KoLmafia declares world peace.
My script thinks that these items are sold but mafia did not sell them, I don't know how to make mafia sell them because they are "gray". Any one have any ideas?
mredge73
04-24-2009, 04:23 PM
I think I figured it out, is there a way to have the script delete everything out of the KEEP ONE folder? Thanks in advance.
After deleting everything out of KEEP ONE:
You are running MrEdge73's Hardcore Inventory Control version 20090424
Refreshing closet...
Updating consumable items...
Updating miscellaneous items...
Refreshing stickers...
AutoSelling items to NPCS...
Autoselling items to NPCs (request 1 of 4)...
You gain 260 Meat
Items sold.
Autoselling items to NPCs (request 2 of 4)...
You gain 195 Meat
Items sold.
Autoselling items to NPCs (request 3 of 4)...
You gain 160 Meat
Items sold.
Autoselling items to NPCs (request 4 of 4)...
You gain 80 Meat
Items sold.
Presenting the CleanUp Log for Today (20090424) using script version: 20090424
These Items Were AutoSold to NPCS: 4 Knob Goblin elite pants, 3 Knob Goblin elite polearm, 2 Orcish baseball cap, 1 Orcish cargo shorts,
Total Items AutoSold: 10
Total Meat Harvested from Items: 695 meat.
Daily Hardcore Cleanup Complete
KoLmafia declares world peace.
As far as I know there's no way to get the script to modify or deal with singleton or memento items. If I'm wrong I'll be cheerful to hear that.
Looks like you made a few changes to the autosell portion of the script. Could you post the code here?
mredge73
04-25-2009, 03:43 AM
I hate to post it this early in creation but maybe you can help on a few subroutines:
The objective is to make an item handling script that can be used everyday during a hardcore run.
version 20090502JE
fixed lots of errors and made a few changes
So this is an updated beta release, if you can call it a release.
EDIT:
This version is no longer supported
See http://kolmafia.us/showthread.php?t=2113 for updates
Oh my. That's a lot more than I expected. Just a minor point, but it would be easier to...
boolean MuscleClass = my_primestat() == $stat[muscle];
boolean MoxieClass = my_primestat() == $stat[moxie];
boolean MysticalityClass = my_primestat() == $stat[mysticality];
Assuming that you don't just want one variable for class and test to see if it is equal to muscle, moxie and mysticality.
Beyond that it would take a good bit of time and effort to figure out everything. You're doing a LOT more than this script would attempt.
zarqon
04-25-2009, 07:01 AM
jasonharper pretty much created the necessary functionality at my request once.
int [item] camp = get_campground();
if(camp[$item[meat maid]] > 0)
print("Have meat maid!");
I very much did not know about this... that's great! Looks like I can remove another server hit from Hardcore Checklist. Yay!
mredge73
04-26-2009, 02:01 AM
Bale you said it, I am trying to do a lot more than the original OCD script. I wanted you script to function for me everyday and not just at the end of the run so everything has to be considered and it will take me a while. I will try to have it auto complete quests that do not require adventuring as well. The only time this script will burn adventures is if I am not careful when creating certain items that burn adventures like meatsmithing.
And since I would be running it everyday I decided to add in a bunch of bonus functionality like using the zap wand from a prioritized list (thanks zarqon). This is untested but I am sure it will eventually work. Adding blow up chef and bartender will take some work because I don't want to produce a bunch of non-profitable junk. I don't know if there exist a script out there that already does this.
Shiverwarp
04-26-2009, 02:57 AM
Wow that's really interesting mredge, will be cool to see the finished product!
mredge73
04-27-2009, 01:33 AM
Updated script above
I will try to keep it updated every couple days. I will leave it here until all beta testing is complete and I can release a solid version. Any feedback will be helpful.
Originally I was just going to build onto Bale's script.
This script has grown much larger than I set out to do but I cannot stop now.
mredge73
04-27-2009, 04:30 PM
Hey
I looked up the cli command list today and found something interesting.
automall - dump all profitable, non-memento items into the Mall.
So will issuing the command:
cli_execute("automall");
cli_execute("reprice");
Does anyone know if this can be a direct replacement to the last section of Bale's OCD inventory control?
I am in no position to test this, I will add it to my script at the end on the next beta release with a user confirm option.
StormCrow42
04-27-2009, 06:27 PM
The reprice command will price everything in your mall store that is at max price to at or slightly below the lowest price in the mall. This will often run you afowl of limit stores in the mall. IIRC, Bale's script uses commands that price based on the 5th store in the mall, drastically reducing the likelihood that you'll (for instance) sell all your dry noodles or reagents at 100 (to a mallbot).
mredge73
04-27-2009, 08:32 PM
So if I leave that out what exactly does AutoMall do?
Will it just dump everything to mall and price them at max price?
automall will put everything into the mall, except for memento objects. All of them, so you cannot define a specific number to keep. And it will keep the entire stock of everything that is a memento. Basically it is all or nothing, quite unlike the precise control that this allows.
And StormCrow42 is exactly correct about the perils of reprice. I've never used that since I found myself selling a few hundred reagents at 100 meat once. I glanced at my store log right after repricing and found that they were already snatched up by a purchaser (probably a mallbot) in about 5 seconds. A couple of other things were sold horrendously cheap also, but that was the most blatant so it is the one that sticks in my mind. This was back in the days when hi meins were the best food and reagents easily sold for 2000 each.
mredge73
04-29-2009, 04:48 AM
I understand
Your script subroutine works great so I will just implement that on the last day of a hardcore run.
Thanks
My OCD Inventory Control has gone through a few revisions since I posted it. Meanwhile it's gone out of date if only because item numbers now exceed 4000. The current version is leaner, more featured and most importantly it now reads inventory handling instructions from a mapfile. That makes it notably faster.
I've got a OCD Data Creator script that I used to convert the maps from the original script. If you want, you can just delete my data from the OCD Data Creator, copy/paste in your own data from your version of the old OCD script. Then when you run the OCD Data Creator, it will create a mapfile that will be read by the new version of OCD Inventory Control.
Once your "OCD Data.txt" you can run OCD Inventory Control at any time to clear out your inventory.
New Features:
- Provides a gift granting function to automatically give collectible items to various people. (disabled by default)
- Has support for pulverization.
- Separation of program and data makes it a lot easier to peruse.
matt.chugg
06-07-2009, 10:46 AM
other stuff similar to gift certificates that can be 'used' , yanked straight out of my own cleanup script
void use_stuff()
{
useitem($item[Warm Subject Gift Certificate], 0);
useitem($item[Evil Golden Arches],0);
useitem($item[Penultimate Fantasy Chest], 0);
useitem($item[pile of candy], 0);
useitem($item[black picnic basket],0);
useitem($item[old leather wallet], 0);
useitem($item[old coin purse], 0);
useitem($item[Gnollish toolbox], 0);
useitem($item[Knob Goblin lunchbox],0);
useitem($item[Hippy Army MPE], 0);
useitem($item[Frat Army FGF], 0);
useitem($item[pack of KWE trading card], 0);
useitem($item[canopic jar], 0);
useitem($item[ice-cold six-pack], 0);
useitem($item[Orcish meat locker],0);
useitem($item[pork elf goodies sack], 0);
useitem($item[six pack of Mountain Stream],0);
useitem($item[scroll of pasta summoning], 0);
useitem($item[frozen Mob Penguin], 0);
useitem($item[pack of chewing gum], 0);
useitem($item[large box], 0);
useitem($item[small box],0);
useitem($item[ancient vinyl coin purse], 0);
useitem($item[black pension check], 0);
useitem($item[fruit basket], 0);
useitem($item[fruit bowl], 0);
useitem($item[briefcase], 0);
// Change outfit to use drinks tickets
// get round to this later :P
//useitem($item[roll of drink tickets], 0);
// Crimbo 08 crates
//useitem($item[battered Crimbo Crate], 0);
//useitem($item[dusty Crimbo crate], 0);
//useitem($item[sturdy Crimbo crate], 0);
// Crimbo doll hives / doll houses
//useitem($item[Dollhive], 0);
//useitem($item[Doll house], 0);
}
fuzzyevil
06-11-2009, 08:39 PM
Is there any way to get the new version of the script without overwriting our old changes? I went through my entire inventory to make sure it kept what I wanted kept, I'd rather not do that again.
Yes. Copy/paste your list of inventory to replace the inventory in this script: OCD Data Creator (http://kolmafia.us/attachment.php?attachmentid=1625&d=1244361474). It will then create the mapfile that is read by the new version.
fuzzyevil
06-13-2009, 03:48 AM
Yes. Copy/paste your list of inventory to replace the inventory in this script: OCD Data Creator (http://kolmafia.us/attachment.php?attachmentid=1625&d=1244361474). It will then create the mapfile that is read by the new version.
Cool, thanks!
Shiverwarp
07-12-2009, 05:39 PM
Do IOTM's have a flag in Mafia or anything like that?
IE: Would it be possible to have an option to never sell them, even when newer ones were implemented?
As far as I know, there is no such flag that mafia can be aware of. New IotM have to be added to the list or else this will eagerly pop them in your store at minimal price. The script is not just named OCD, it requires OCD to use it properly. ;)
Updated OCD Inventory Control
Now it takes advantage of mall pricelist sharing to reduce runtime. This is very helpful because clearing out an entire run's inventory can take like 5-10 minutes of checking prices in the mall. Now it is much faster since many of the necessary prices won't need to be checked during run time.
Oh, and I fixed a meaningless bug which kept it from properly reporting autosale price. No biggie.
Tarko
08-23-2009, 08:13 PM
Cheers (again) for another great script (possibly, havent try it yet).
I have 3 question linked to hit, if you dont mind:
1)When you use "visit_url("storage.php?action=takeall&pwd");" to empty the storage, could I use something simillar (visit_url("clanstash.php?action=takeall&pwd");) to empty my clan stash?
2)I looked at the code to see where it says you were pricing the object at the 5th value in Mall; couldnt find it. But my real question is: what(and where) piece of code would you add to: If 5th place== minimum_Mall_Value THEN AUTO_Sell. Since I dont spend any money on advertisement, I auto-sell everything that 'sells' for the minimum Mall-price (except Pixels in fact..)
3)In data creator, what does "save [$item[agua de vida]] = Y" actually do?
*edit*
4)What happens when the script encounter an item not specified in Data_Cretator? Leave it? Sell it? Mall it?
*/edit*
I would like to thank you again and Zarchon and everyone out there coding for Mafia, for the time you are putting in that! I learned VB a few years back and I'm having a hard time understanding your codes, but hopefully some day I will
Keep up the good work
1) That would only work if KoL supported the command. It's done by KoL, not KolMafia.
2) mall_price() and historical_price() return the 5th purchasable item. To answer your question, check to see if historical_price() == autosell_price(), then autosell it.
3) It will put information into a data file that the inventory control script accesses. That information says to save Y quantity of agua da vida and put any additional such items into the mall.
4) Everything that isn't listed in Data_Creator is sold, if it can possibly be put in the mall. :D I'm very glad you asked if that wasn't clear to you. This script is designed to make inventory vanish into the mall.
Shouldn't you check for historical_price() == 2*autosell_price()? I believe mall minimum is 2x autosell.
zarqon
08-24-2009, 03:38 AM
Even closer:
historical_price() == max(2*autosell_price(),100)
Ichaz_keel
08-25-2009, 02:11 PM
Hi! Great script.
I was wondering how can I change the script so that it will not sell items that are not in the list.
Thanks,
I was wondering how can I change the script so that it will not sell items that are not in the list.
Where it says foreach it in $items[] you'd want to foreach ocd instead. There are a few other places where you'd want to change things also, but they all follow naturally from that first change.
Tarko
08-28-2009, 09:33 AM
Am sorry to ask that, but I really dont trust myself with something that could make my inventory go away for ever...
Would anyone mind hinting me toward the right direction with Zarcon's historical_price() == max(2*autosell_price(),100) ?
I know it would go in there somewhere:
case "mall":
if(item_amount(it) <= ocd[it].q)
break;
if(mall_q != 0)
mall[mall_line]= mall[mall_line] + ", ";
if(historical_age(it) > 2) price = historical_price(it);
else price = mall_price(it);
mall_total = price * (item_amount(it)-ocd[it].q) + mall_total;
mall[mall_line]= mall[mall_line] + to_string(item_amount(it)-ocd[it].q)+ " "+to_string(it)+ " @ "+to_string(price);
mall_q = mall_q + 1;
if(mall_q == 11) {
mall_line = mall_line +1;
mall_q = 0;
}
break;
But Im not too sure where or how.
My guess is something like:
if(historical_age(it) > 2) price = historical_price(it) && historical_price(it) == !max(2*autosell_price(),100)
else auto[it];
or something along those lines... See why I ask?
Any help would be appreciated.
Well, you only want items that are NOT specifically slated to be autosold, pulverized or malled to be tested like that right? (Please correct me if I'm wrong.) If you want anything outside of your lists to be autosold instead of malled under that criteria, then you're looking in the wrong section.
lines 195-207:
} else {
if(historical_age(it) > 2) price = historical_price(it);
else price = mall_price(it);
if(mall_q != 0)
mall[mall_line]= mall[mall_line] + ", ";
mall_total = price * item_amount(it) + mall_total;
mall[mall_line]= mall[mall_line] + to_string(item_amount(it))+ " "+to_string(it)+ " @ "+to_string(price);
mall_q = mall_q + 1;
if(mall_q == 11) {
mall_line = mall_line +1;
mall_q = 0;
}
}
Change to:
} else {
if(historical_age(it) > 2) price = historical_price(it);
else price = mall_price(it);
if(historical_price(it) == max(2* autosell_price(),100)) {
if(auto_q != 0)
auto[auto_line]= auto[auto_line] + ", ";
auto_total = autosell_price(it) * (item_amount(it)-ocd[it].q) + auto_total;
auto[auto_line]= auto[auto_line] + to_string(item_amount(it)-ocd[it].q)+ " "+to_string(it);
auto_q = auto_q + 1;
if(auto_q == 11) {
auto_line = auto_line +1;
auto_q = 0;
}
} else {
if(mall_q != 0)
mall[mall_line]= mall[mall_line] + ", ";
mall_total = price * item_amount(it) + mall_total;
mall[mall_line]= mall[mall_line] + to_string(item_amount(it))+ " "+to_string(it)+ " @ "+to_string(price);
mall_q = mall_q + 1;
if(mall_q == 11) {
mall_line = mall_line +1;
mall_q = 0;
}
}
}
Since max() is not a function of ash, you'd need to define it by including zlib, or adding the function to this script:
int max(int a, int b) {
if (a > b) return a;
return b;
}
I haven't actually tested any of that, but it looks good to me. Note that everything that isn't marked to be saved, will either be mallsold or autosold.
Tarko
08-30-2009, 03:40 PM
Brilliant! it's working marvelously!
2 little point I'd like to point out:
1- Data creator crashed when it encountered jabaņero-flavored chewing gum
2- In your fix above you forgot the second 'it' in:
if(historical_price(it) == max(2* autosell_price(it),100)) {
Appart from that (which a 5sec fix as fixed) it's perfect!
Any gifts you would like?
Thanks for fixing my typo.
For the data creator, try inputting that as jabañero-flavored chewing gum or even just jaba chewing gum would do the job. (The second one works because of kolMafia's fuzzy matcher.)
As for gifts... Well, I am a collector of stuffed Hodgmen. (See my signature!) So if you have or could acquire a stuffed Hodgman I'd be grateful for it. However if that's a bit too much trouble/expense, then I quite understand.
seamer
10-20-2009, 06:01 AM
I'm starting to get an itch for collecting as many outfits as I can...Does OCD account for that or is it a case of modifying ocd data.txt?
It's all about modifying OCD Data. That holds the list of what you keep. The only assumption the script makes is that it wants to mall everything that isn't in that file.
Rahmuss
10-29-2009, 06:27 PM
You know how you can sell items in your inventory and just check the box on all items you want to sell? Is there a way to do the same thing, only instead of selling them from inventory, send them to your mall store? I don't care about pricing or anything, the default 9999999 is fine. I just hate the 11 item limit and was wondering if there was a way to mass send all desired items to the mall store. Even if you have a checklist that creates a data file and then after the file is created (gone through all the items) then it will send them (11 at a time) to the mall store. Any thoughts? Does something like this already exist?
KolMafia can do that straight out of the box. In the item manager highlight everything you want to mall, then on the right side click the button that says "place in mall".
Rahmuss
10-29-2009, 09:32 PM
Nice! How did I miss that? Thanks Bale
Banana Lord
11-02-2009, 07:25 AM
As of one of the more recent builds (I'm not sure exactly which one sorry) the script will no longer equip my gear once it's finished running. Not a huge problem as I can fix it with a single CLI command stuck at the end of the script, but I thought you might like to know if you don't already.
As a sidenote, when the script was re-equipping everything properly it was doing so one piece at a time, rather than as a whole outfit, which could be acheived via the existing backup outfit or "your previous outfit" could it not?
You're using an old version of this script. I switched over from checkpoint to using the backup outfit some time ago. I suspect that the other problem you report will be taken care of also.
Banana Lord
11-02-2009, 08:47 AM
Thanks! I'll try it out tomorrow.
Updated my script. Only notable change is that it alphabetizes the list of items to be malled and autosold.
dindon
03-13-2010, 10:16 PM
I just have to say, this script is awesome, and exactly what I needed. I had gotten to the point where I dreaded opening my inventory because it was so huge. After 2 runs of the script (the first one ended in an OOM error - an indicator of the enormity of my stockpile of junk?) and 12 hours, my inventory was tiny, I had made about 5 mil (off of junk - almost nothing in there was worth more than 20k), and I had discovered an IoTM I didn't even know I had. So thank you.
(I feel like someone in one of those "gold for cash" commercials. "I made 10,000 dollars selling my old and broken jewelery! Thanks gold4cash!!" *fans out bills*)
Lol! Glad it helped you so much! 5 million meat from junk is a very nice thing to find.
halfvoid
05-26-2010, 05:51 AM
Feature request: An input script that searches my inventory for items not already listed in OCD Data Creator.ash and exports them to a .txt file in the $item() format.
Or is there a simple way to export ALL of my items into a .txt file like that and just dump that into the top of OCD Data Creator?
Banana Lord
05-26-2010, 05:59 AM
You might be able to get mafia to output a list of all the items in your inventory, but I'll let one of the experts comment on that. When you say "dump into the top", just make sure you include the save [$item[ prefix and the ]] = -1; prefix for each. A speedier way of doing this than copy/pasting is a program like Text Wrangler (Notepad probably can too, but I don't know) which can add a given prefix and suffix to selected lines at a click.
EDIT: The get_inventory() (http://wiki.kolmafia.us/index.php?title=Get_inventory) command looks like your friend here. I'm not sure how to supress the integer associated with each item, or even if you can. But either way, typing "ash get_inventory()" without the quotes'll get you a map of your inventory which you can copy/paste from mafia's gCLI into an appropriate editor.
halfvoid
05-26-2010, 06:20 AM
get_inventory() gives me the item list, but i was looking for the $item format they are displayed in the Data Creator.
looks like my best option so far though.
i've been trying to weigh whether i want to use this or Mr.Edge's HC inventory control.
Banana Lord
05-26-2010, 06:28 AM
I don't believe there is a way to have them outputted pre-prefixed, but I could be wrong. The way I add items to OCD is just as I said above (if en-masse, otherwise I just copy/paste).
zarqon
05-26-2010, 09:06 AM
Didn't check out the data format for OCD's data file, but I think this is basically what you want:
cli_execute("mirror non_ocd_items.txt"); // start logging CLI output
foreach i,num in get_inventory()
if (!(ocddatafile contains i)) // make this check actually do something
print("$item["+i+"]");
cli_execute("mirror"); // stop logging
Note that if you run this script again, contents will be appended, not overwritten.
Also note that if you're more ambitious, you could also use this to actually add new content to OCD's actual datafiles.
Or mazbe somthing like (typed completely out of my head, without consulting anything, so buggy as hell)
creatorRecordType [item] itemlList;
file_to_map("OCDcreatorFileName.txt",itemList);
foreach i,num in get_inventory() {
item it = to_item(i);
if (!itemList contains it) {
// populate the record with proper values here
itemList[it].xxxx = yyyy;
...
}
}
// write completed map back to the mapfile
map_to_file(itemList,"OCDcreatorFileName.txt");
(or use a different map for the new items, then map_to_file them to another file, edit that file, append by hand ...)
tgetgel
09-11-2010, 11:45 PM
Just wondering if this could integrate with PriceAdvisor.ash and get the best bang for the buck (mallsell, autosell or smash).
That would be a very different script. What you want is a script to automate PriceAdvisor. It wouldn't really have much in common with this script.
Incidentally, OCD Inventory Control is in the process of getting a massive rewrite/upgrade. It should be much improved soon.
philmasterplus
09-13-2010, 07:11 AM
That would be a very different script. What you want is a script to automate PriceAdvisor. It wouldn't really have much in common with this script.
Incidentally, OCD Inventory Control is in the process of getting a massive rewrite/upgrade. It should be much improved soon.
I've actually been working on a script that uses PriceAdvisor, although only for autosell/mallsell/opening containers/smash/malus/multi-use crafting. The alpha stage is here, and I plan to incorporate an improved version of item_search.ash instead of having to list every item, as well as obeying singleton settings.
Too ambitious? Does it overlap with your plans? Could you please tell us what you are planning in detail without getting overwhelmed by my questions? :)
Here is my alpha script if you'd like to peek (https://sites.google.com/site/philmasterplus/kol/liquidate.ash?attredirects=0&d=1). It uses another library and a data file, so it won't work right now.
Your seems to be a wonderful (although modest) front-end for PriceAdvisor. I applaud it.
Does it overlap with your plans? Could you please tell us what you are planning in detail without getting overwhelmed by my questions? :)
It does not overlap with my plans at all. The next version of this script is basically the same, but hungrier to categorize the user's plans for every item that might enter inventory and with a few more options. OCD Inventory Control doesn't allow the script to make any decisions, that's why it is OCD.
zarqon
09-13-2010, 08:47 AM
I should add a plug for StashBot here -- which automates PriceAdvisor to manage the "stash"'s inventory -- but I won't. ;)
tgetgel
09-13-2010, 02:49 PM
OCD Inventory Control is in the process of getting a massive rewrite/upgrade. It should be much improved soon.
I look forward to the update. I know that the default OCD is set to your style of gameplay. Is there a listing of the items in KoL that segregates them into what you must keep x of, what you should keep, what is nice to keep, what you don't really need, etc? Or maybe, these give bonuses, these are ingredients you make the most money using, etc. It might help me adjust OCD to my style.
Thanks
I don't know of any such listing. That's why many people prefer PriceAdvisor.
Theraze
09-13-2010, 09:59 PM
In KoL itself, probably nothing.
In the KoLwiki, possibly something, but likely horrifically out of date.
Using the KoL source files, you could generate something specific to your desires...
The biggest issue is, what you're asking about is something VERY specific. Whether or not keeping one or more rave whistles is a good idea depends on if you're a moxie class or otherwise using moxie weapons, as well as if you need a one handed moxie weapon that raises ML, as well as if you have something that better meets your needs, as well as how much cash you need RIGHT now and if you're planning on farming the giant castle some more...
Ultimately, each decision comes to the individual user and item... Unless you decide you're all about the credits and anything that can sell, should be...
tgetgel
09-14-2010, 01:56 AM
Bale and Theraze, thanks. I guess I will have to figure all of that out.
philmasterplus
09-14-2010, 09:47 AM
There is a classification of items called "singletons", which work similiarly to mementos. However, these work only from the Item Manager, and will (probably) not affect the CLI/ASH. These singletons follow special settings adjustable from the Item Manager, which look like "usable2HWeapons", "usablePants", "usableHats", etc. which you can modify. For example, if you want to keep enough Stainless Steel Skullcaps to be usable and smash the rest, you can make it a singleton, adjust the usableHats setting to 2, and check "all but usable" in the Pulverize interface.
I really, really wish they'd do something about the whole mememto-singleton mess. From my limited experience browsing into KoLmafia source code, it seems that singletons are handled in a weird and inconsistent manner.
As promised, I am releasing a major upgrade to this script. The biggest difference is the relay script. That relay script brings some sanity to the process of categorizing every single item in your inventory. Check it out and be amazed. Screenshot below:
http://c.imagehost.org/0804/gifts.png
Now OCD Inventory Control will not do anything to an uncategorized item. That makes this script a thousand percent safer to use. I feel much better about other people using it now. There are also many more options for what you can do with your inventory. If you run OCD Inventory Control with uncategorized items in your inventory, the script will prompt you, asking if you want to abort and use the relay script. If you say no, then it will keep all uncategorized items. That means it is safe to run with incomplete data. (You might even prefer to run it that way.)
A feature of particular note is that it will now send items to your mall multi if you set it at the relay script's configuration tab. Just leave that blank to use your own mall store.
Note that the OCD data file is now in a completely different format. For the sake of old users, I am attaching a script to convert your old data file into the proper format for version 3.0. You'll find that utility at the bottom of this post.
Thanks to Cieka who actually commissioned me to rewrite OCD Inventory and provided some of those new ideas. Without him I probably would have left this script as the half-complete thing it used to be. I probably surprised him with what I did to his ideas, but I know that the seed was his.
bumcheekcity
09-28-2010, 10:39 AM
That looks fantastic, Bale. I've always been a bit OCD myself about my inventory but afraid to use the heavy-handed approach of the original script, so I made a crappy version myself, but I'll be getting home and trying out yours soon.
I'm very glad that you find it less scary now. It's much more useable.
Incidentally if someone wants to call this script from another script of their own, but dislike the idea of getting a pop-up for uncategorized inventory, it is possible to suppress the pop-up.
import <OCD Inventory Control.ash>;
ocd_control(false);
The parameter "false" tells the script to keep running without prompting the user. This way you can use it to sell just a few items that you expect to get without bothering to categorize your entire inventory. How's that for a useability feature?
Banana Lord
09-28-2010, 10:59 AM
JAWDROP. Absolutely love the addition of display case management. It was the biggest hole in my OCD life, which, as you may or may not remember, I was attempting to fill with an additional script which integrated with OCD. This is much simpler. And ten times better. Thanks once again for making my life easier!
JAWDROP. Absolutely love the addition of display case management. It was the biggest hole in my OCD life, which, as you may or may not remember, I was attempting to fill with an additional script which integrated with OCD. This is much simpler. And ten times better. Thanks once again for making my life easier!
Glad it helps. Oh, and that screenshot doesn't show it, but the script allows you to pulverize items as well. (The sub-tabs only show up if they won't be empty and I didn't have any pulverization in my OCD database.)
zarqon
09-28-2010, 11:10 AM
This looks beautiful, Bale. I too was afraid of running the previous version on my rather packratty inventory, but I will definitely give this one a whirl.
Is there a PriceAdvisor option (do what PA says is most profitable)? If not, there should be (and I could send you some code you could adapt for it).
Also, link to your scripts in your sig, you fool! I just spent like 5 minutes thinking I knew where to find the CounterChecker thread. >.< Speaking of your sig, congrats on the balloon trophy! I also think it's cool that the trophy will have so much meaning for you now. I feel the same about my bat collection (which recently grew by an item -- the fossilized bat skull!).
Winterbay
09-28-2010, 11:25 AM
Is there a PriceAdvisor option (do what PA says is most profitable)? If not, there should be (and I could send you some code you could adapt for it).
No there isn't, but that would be brilliant. Especially for someone like me who have no idea about the worth of almost any of the thing in my inventory...
Even something as simple as autosell price VS mall price VS pulverize & autosell would be great.
Banana Lord
09-28-2010, 11:40 AM
I found that thanks Bale. Just then :D Love it! Any way of having OCD auto-wad via wadbot? I've got my own, somewhat inefficient, code in my logout script to do it, but still... I feel bad asking for more, but PA would be sweet. And is there a way to remove items from the database? Or, more specifically, not items, but the pesky entry described as "none". I was tempted to just delete that line from OCD_Banana_Lord_Data.txt, but then I thought no... Maybe I'll wait to see what Bale has to say before I do something horrible to myself :P
Oh, and just for clarification. Under the mall tab, setting "Keep" to 1 mallsells all but one of that item. What does it do under "Display"? Display only one, or display all but one, keeping the other in inventory? Both of those would be handy functions, but I'd like to know which, if either, the script does.
Is there a PriceAdvisor option (do what PA says is most profitable)? If not, there should be (and I could send you some code you could adapt for it).
I was thinking about writing a secondary script that will create a OCD data file based on PA. Then you could look over the data file and see if you agree with PA's choices before running inventory control with those options. If you want to write any code for that I'd be rather grateful. I've never actually used PA for anything and I'd love to see your code using it.
Perhaps the best way to do it would be to add a "categorize unknown items with PA" button to the relay browser. Along with a button on each category to "remove all these items from the database" so that they can be removed and quickly recategorized. Or maybe it should be one button to remove all pulverize, autosell, mall items and re-categorize them with PA? Feedback on this would be helpful. If anyone wants to describe the most helpful way to integrate this into the script and its user interface, I am listening eagerly.
I found that thanks Bale. Just then :D Love it! Any way of having OCD auto-wad via wadbot?
Thanks. I've had pulverize so long that I forget about the simple things like this. I ought to put that into this script. How is wadbot used? Do you need some special format to the message? Please advise me.
And is there a way to remove items from the database? Or, more specifically, not items, but the pesky entry described as "none". I was tempted to just delete that line from OCD_Banana_Lord_Data.txt, but then I thought no... Maybe I'll wait to see what Bale has to say before I do something horrible to myself :P Huh? I don't have any entry called "none" in my data file. I don't know anything about that bug. Could you copy-paste that here?
BTW, the way to remove normal items is to set their action to unknown. That'll remove them.
Oh, and just for clarification. Under the mall tab, setting "Keep" to 1 mallsells all but one of that item. What does it do under "Display"? Display only one, or display all but one, keeping the other in inventory? Both of those would be handy functions, but I'd like to know which, if either, the script does.
It does the same thing for display. It will keep 1 in inventory and display the rest.
Banana Lord
09-28-2010, 09:46 PM
Wadbot's used via kmails. This's (http://clanprolific.com/?q=node/9#commands) probably the best way of me explaining it to you ;-) The most awkward thing I found when trying to code it was how to avoid sending non-multiples of 5 powders and wads (since they just get returned anyway), without resorting to sending more than one kmail. I sort of compromised by only allowing the script to send one kmail a day to wadbot. I'll be interested to see what no doubt elegant and annoyingly simple solution you pull out of the box :-)
From the data file:
none KEEP 0
I assumed there was a bad entry in OCD data creator, but I couldn't see anything obvious.
EDIT: Oh and I've got pulverise too, so the main utility of wadbot (apart from speed) for me is wadding when I haven't got access to the malus.
So, I should just send a blank kMail to wadbot with all the items and what-not appended? Sounds easy to use. Here's my simple solution to your problem:
boolean wadbot(int [item] pulverize) {
foreach thing, quant in pulverize
if(thing.to_int() > 1437 && thing.to_int() < 1450) {
quant -= quant %5;
if(quant < 1) remove pulverize[thing];
}
kmail("wadbot", "", 0, pulv);
}
You should be able to remove that none entry without ill effect. I think I know how it got there although it isn't in my data, so I'll add a check for it in the update. (I think saving data when there's nothing in data might do that.)
Banana Lord
09-28-2010, 11:56 PM
Hah, just like that xD Cheers Bale!
philmasterplus
09-29-2010, 01:33 PM
First, let me relocate my lower jaw. Twice. What a lovely UI, Bale.
@zarqon
The major problem I found with PriceAdvisor while writing a cleanup script of my own is that determining the best method of liquidating a set of items using various methods available is very, very difficult. Item A may be best liquidated after being cooked with Item B, but Item B would be better off being mallsold as it is. Also, the best method of liquidating Item C involves acquiring Items D through G, two of which are cooking ingredients and one is untinkerable and meatsmith-able. Oh, did I tell you that using Item C has a fractional chance of yielding 4-5 items? And that Item G can be pulverized, but that it is untradeable and thus requires buying a tenderizing hammer?
Even if we had a recursive algorithm that could find the best method, it would simply take too long to compute and possibly not work at all; from my experiences, KoLmafia doesn't like recursions above ~250 levels. (I really should attend more CS classes though.)
In the end I had to be satisfied with a comparison between autosell, mallsell, pulverize, multi-use crafting, and single-use "package opening." And had to implement it myself, because parsing PriceAdvisor output in ASH scripts is rather difficult.
Updated with new version of both OCD Inventory Control and the relay dB Manager.
I changed relay script's name to "OCD dB Manager" because it describes the relay script better and removes the confusion of having two scripts with the same name.
There's a bunch of little changes to fix bugs I found and I added version checking to the relay script.
First, let me relocate my lower jaw. Twice. What a lovely UI, Bale.
Thank you very much. I'm quite proud of it. :D I spent a good bit of time on it and learning enough CSS to create that UI was a major undertaking for me. I just knew that I wanted the UI to use tabs, then I googled for it started dissecting a lot of CSS until I figured out how to do it with lists and buttons.
If anyone figures out a good way to use PA here, please let me know. So far, it sounds like your solution would be to parse PA personally and copying it into the OCD database.
Winterbay
09-30-2010, 05:12 AM
Would it be possible to just add autosell vs. mallsell to give a rough guideline of what would be best? Even historical_price() might be enough (in order to avoid doing a server hit for each item). If the minimum price in the mall is very close to the autosell value that indicates that one might as well autosell it.
zarqon
09-30-2010, 05:29 AM
I use this to automatically upgrade all powders and nuggets to wads. It sends a single kmail to wadbot with only multiples of 5.
void do_wads() {
int[item] bits;
void add_it(item hmm) { if (item_amount(hmm) > 4) bits[hmm] = floor(item_amount(hmm)/5)*5; }
for i from 1438 to 1449 add_it(to_item(i));
add_it($item[sewer nugget]);
add_it($item[floaty pebbles]);
add_it($item[floaty gravel]);
if (count(bits) > 0) {
vprint("Upgrading all powders/nuggets...","blue",2);
kmail("wadbot","wads",0,bits);
}
}
I also use PA like this (roughly, I took out some parts) for StashBot's inventory maintenance. This code comes from inside a function where which is the item being considered. Note that for items where there's a series of actions, it only performs the first action, since the later actions (on the resultant items) will be handled in the next iteration (StashBot runs every 2 minutes).
price_advice course = best_advice(which,true);
print(course);
if (index_of(course,":") == 0) return;
switch (excise(course.action,""," ")) {
case "": vprint("No profitable actions for "+to_plural(which)+"! Skipping.",3); return;
case "smash": cli_execute("send "+howmany+" "+which+" to wadbot||wads"); break;
case "use": cli_execute("use "+howmany+" "+which); break;
case "autosell": vprint("Autoselling "+howmany+" "+which+" @ "+course.price+"...",3);
cli_execute("autosell "+howmany+" "+which); break;
case "mallsell": vprint("Selling "+howmany+" "+which+" @ "+ip+"...",3);
cli_execute("mallsell "+howmany+" "+which+" @ "+ip+" limit 0"); break;
case "untinker": vprint("Untinkering "+howmany+" "+which+"...",3);
cli_execute("untinker "+howmany+" "+which); break;
case "make":
case "acquire": if (contains_text(course.action,"make ")) {
item tomake = to_item(excise(course.action,"make ",";"));
if (tomake == $item[none]) vprint("Unable to determine item to be created.",0);
int[item] ings = get_ingredients(tomake);
if (count(ings) == 0) { vprint("You cannot currently create any "+to_plural(tomake)+".",-2); break; }
if (!(ings contains which)) vprint(which+" is not an ingredient of "+tomake+".",0);
if (create(floor(howmany/ings[which]),tomake)) {}
break;
}
default: vprint("No programmed course of action for this command.",0);
}
I was not thinking of anything very "integrated", as far as adding PA to the OCD dB (decibel??) script. I was simply thinking of making that one of the options. In other words, the action dropdown would contain "autosell, mallsell, smash, send as gift to..., PriceAdvisor" and so forth. Users would probably select this for items that they don't care too much about, but which may have varying results depending on the state of the market.
I use this to automatically upgrade all powders and nuggets to wads. It sends a single kmail to wadbot with only multiples of 5.
void do_wads() {
int[item] bits;
void add_it(item hmm) { if (item_amount(hmm) > 4) bits[hmm] = floor(item_amount(hmm)/5)*5; }
for i from 1438 to 1449 add_it(to_item(i));
add_it($item[sewer nugget]);
add_it($item[floaty pebbles]);
add_it($item[floaty gravel]);
if (count(bits) > 0) {
vprint("Upgrading all powders/nuggets...","blue",2);
kmail("wadbot","wads",0,bits);
}
}
The just released v3.1 uses wadbot for wadding, if you lack malus access, as Banana Lord requested. However I forgot about sewer wads and floaty stuff. I'll have to add that in for v3.2
Banana Lord
09-30-2010, 09:52 AM
Have I stuffed up, or is there a bug in the latest version? I'm not sure why it's trying to send things to my mall multi, as I haven't asked it to do so (and that beautiful new UI doesn't show anything as being amiss).
pulverize 6 Bonerdagon necklace, 1 Boss Bat britches, 11 Drowsy Sword, 12 Lord Spookyraven's ear trumpet, 4 badass belt, 1 easter egg balloon, 3 giant needle, 1 glowing red eye, 11 obsidian dagger, 3 rusty chain necklace, 3 sawblade shield
pulverize 3 wrench bracelet
Unable to invoke 6
send to mallmulti Monkey Lord: 5 "DRINK ME" potion, 2 1337 7r0uZ0RZ, 6 30669 scroll, 5 33398 scroll, 1 7-Foot Dwarven mattock, 1 8-ball, 1 ASCII shirt, 39 BRICKO brick, 3 BRICKO eye brick, 1 Black No. 2, 1 Hippy Army MPE
send to mallmulti Monkey Lord: 9 Imp Ale, 1 Knob Goblin elite helm, 1 Knob Goblin elite pants, 1 Knob Goblin elite polearm, 3 Knob Goblin firecracker, 1 Knob Goblin harem pants, 1 Knob Goblin harem veil, 1 Knob Goblin perfume, 1 Maxwell's Silver Hammer, 2 NG, 1 PADL Phone
send to mallmulti Monkey Lord: 14 Spam Witch sammich, 1 Swabbie™ swab, 5 Tasty Fun Good rice candy, 1 Tom's of the Spanish Main Toothpaste, 3 Trollhouse cookies, 1 Typical Tavern swill, 2 Wand of Nagamar, 1 Zim Merman's guitar, 1 acoustic guitarrr, 2 all-purpose cleaner, 1 anti-anti-antidote
send to mallmulti Monkey Lord: 1 ballroom blintz, 1 barbed-wire fence, 1 barrrnacle, 1 baseball, 2 bat wing, 4 beer bomb, 1 beer helmet, 1 black kettle drum, 1 black pepper, 1 black picnic basket, 1 bone rattle
send to mallmulti Monkey Lord: 1 bottle of Monsieur Bubble, 1 bottle of alcohol, 8 bottle of rum, 2 bottle of vodka, 3 bottle of whiskey, 2 bowl of cottage cheese, 2 briefcase, 2 broken skull, 1 bronzed locust, 1 bubbly potion, 2 canopic jar
send to mallmulti Monkey Lord: 1 chef's hat, 2 chrome ore, 2 cloudy potion, 4 cocktail napkin, 4 cocoa eggshell fragment, 5 coconut shell, 1 cool whip, 1 corpse on the beach, 1 costume sword, 1 cracker, 7 cranberries
send to mallmulti Monkey Lord: 1 curmudgel, 1 dark potion, 1 dead guy's watch, 1 demon skin, 1 digital key lime pie, 2 disease, 1 disintegrating quill pen, 1 distressed denim pants, 1 dope wheels, 2 drum machine, 2 dry noodles
send to mallmulti Monkey Lord: 1 drywall axe, 2 dusty bottle of Merlot, 3 dusty bottle of Pinot Noir, 1 dusty bottle of Zinfandel, 2 effervescent potion, 1 enormous hoop earring, 1 evil golden arch, 1 eyepatch, 1 f3d0r4, 2 fancy bath salts, 1 fancy but probably evil chocolate
send to mallmulti Monkey Lord: 1 ferret bait, 1 fizzy potion, 2 flaming talons, 1 flute of flat champagne, 1 frigid ninja stars, 1 funky dried mushroom, 1 gas balloon, 15 gauze garter, 5 ghuol ears, 1 ghuol egg, 1 ghuol guolash
send to mallmulti Monkey Lord: 1 giant cactus quill, 1 giant discarded plastic fork, 1 giant pinky ring, 1 glass of goat's milk, 3 glimmering roc feather, 1 goat beard, 3 goat cheese pizza, 6 gob of wet hair, 1 gremlin juice, 2 grouchy restless spirit, 1 handful of hand chalk
send to mallmulti Monkey Lord: 2 handful of sand, 2 handful of sawdust, 1 handsomeness potion, 1 headhunter necktie, 1 heavy metal thunderrr guitarrr, 1 hellion cube, 3 hot katana blade, 1 hot plate, 4 hot wing, 1 hypodermic needle, 1 imp unity ring
send to mallmulti Monkey Lord: 1 inkwell, 2 ketchup hound, 1 knob bugle, 8 large box, 1 leathery cat skin, 1 leftovers of indeterminate origin, 4 lihc eye, 2 line, 3 linoleum ore, 2 little paper umbrella, 4 loose teeth
send to mallmulti Monkey Lord: 1 lowercase N, 5 magical ice cubes, 1 magilaser blastercannon, 1 many-eyed glasses, 1 mariachi G-string, 8 meat vortex, 1 metallic A, 1 milky potion, 1 miner's helmet, 1 miner's pants, 2 molotov cocktail cocktail
send to mallmulti Monkey Lord: 1 mummy wrapping, 1 murky potion, 1 orange peel hat, 3 oversized pizza cutter, 1 pack of KWE trading card, 1 palm frond, 3 papaya, 1 pasta spoon, 1 perforated battle paddle, 4 photoprotoneutron torpedo, 3 plastic guitar
send to mallmulti Monkey Lord: 1 pointed stick, 1 powdered organs, 5 pr0n legs, 3 prismatic wad, 1 prosthetic forehead, 1 pygmy blowgun, 1 pygmy pygment, 1 rat appendix, 4 razor-sharp can lid, 3 red pixel, 10 red pixel potion
send to mallmulti Monkey Lord: 1 ridiculously huge sword, 1 rocky raccoon, 1 saucepan, 2 scorpion whip, 6 scratch 'n' sniff UPC sticker, 8 scratch 'n' sniff apple sticker, 11 scratch 'n' sniff dragon sticker, 4 scratch 'n' sniff rock band sticker, 4 scratch 'n' sniff unicorn sticker, 3 scratch 'n' sniff wrestler sticker, 1 scrumptious reagent
send to mallmulti Monkey Lord: 1 shiny ring, 1 skeleton bone, 1 skeleton key, 5 smart skull, 1 smoky potion, 1 sonar-in-a-biscuit, 1 spider web, 1 spooky hi mein, 2 stalk of asparagus, 1 star, 1 star hat
send to mallmulti Monkey Lord: 2 star key lime pie, 1 star staff, 2 stick of dynamite, 1 stolen accordion, 1 sucky decal, 1 super-spiky hair gel, 1 swashbuckling pants, 1 swirly potion, 1 tarrrnish charrrm, 4 tequila grenade, 1 tiny shaker of salt
send to mallmulti Monkey Lord: 1 towel, 1 tropical orchid, 1 tropical swill, 4 water pipe bomb, 5 white pixel, 1 wussiness potion, 1 yellow brick road, 5 yeti fur
The message didn't send for some reason.
autosell 5 Angry Farmer candy, 1 Mae West with a fly in it, 1 Meleegra™ pills, 1 Mick's IcyVapoHotness Rub, 1 The Big Book of Pirate Insults, 1 awful poetry journal, 10 chaos butterfly, 1 dusty animal skull, 1 enchanted barbell, 2 ennui-flavored potato chips, 1 frilly skirt
autosell 1 furry fur, 2 hair spray, 25 handful of confetti, 2 heavy D, 1 jabaņero-flavored chewing gum, 1 lime-and-chile-flavored chewing gum, 2 magicalness-in-a-can, 12 meat paste, 2 original G, 2 paranormal ricotta, 1 pickle-flavored chewing gum
autosell 10 plot hole, 2 probability potion, 1 procrastination potion, 2 quasi-ethereal macaroni fragments, 2 radium-flavored potato chips, 2 strongness elixir, 1 tamarind-flavored chewing gum, 5 thin black candle, 3 valuable trinket, 2 wine-soaked bone chips
Total autosale price = 34,400
Autoselling items to NPCs (request 1 of 2)...
You gain 720 Meat
Items sold.
Autoselling items to NPCs (request 2 of 2)...
You gain 33,680 Meat
Items sold.
display 1 Crown of Thrones, 1 Greatest American Pants, 1 Instant Karma, 1 Iron Beta of Industry, 1 Juju Mojo Mask, 1 Spooky Putty sheet, 1 chamoisole, 1 glow-in-the-dark wristwatch, 1 haiku katana, 1 pilgrim shield
Placing items in display case...
This inventory is clean.
EDIT: Would I be able to beg for a mini-script to send the entire contents of my mall multi's inventory back to my main? It would save a lot of time :-)
Ah heck. I see there's a bug in the pulverize code. I think it should be pretty obvious and easy to fix though.
Have I stuffed up, or is there a bug in the latest version? I'm not sure why it's trying to send things to my mall multi, as I haven't asked it to do so (and that beautiful new UI doesn't show anything as being amiss).
Take a look at the configuration tab. If you tell it the name of your mall-multi, it will use it. It's as simple as that. (Read the small print under the text box where you entered your mall multi's name.) Should that be changed? It seemed to me that if someone enters a mall-multi, they want to use it.
As for sending it all back to your main. It's only 2 lines, so let's just do that from the CLI.
ashq import <zlib.ash>; kmail("Banana Lord", "Returned from mall-multi", 0, get_inventory());
Check the name of the character you want to send stuff to. I was just guessing that it was "Banana Lord".
Banana Lord
09-30-2010, 10:19 AM
Ah! OK. Well, from my point of view it should be changed, or made clearer somehow (just a check-box would be plenty). I automatically filled it in the way I fill in all forms. I assumed it would be retained there until I updated some items to be sent to my mall multi via the standard interface. Yes, you're right, your way of thinking about it makes perfect sense, but the question now is, does it only make perfect sense if you already know what's going on? :P
Thanks!
EDIT: Fun fact: That code you sent me only sends the kmails when I logout. Strange. Works though :D
Updated both Inventory Control and relay dB Manager.
I added a check-box to use your mall-multi. If you un-check that, it won't use your multi, even if you put in a name.
I also fixed the pulverize function to deal with the bug that stopped your pulverization. Also, now it will recognize sewer wads, floaty pebbles and floaty gravel as items you want to send to wadbot if you don't have access to the malus.
And the relay dB Manager will now list the quantity of items that you possess in places where that info might be useful.
EDIT: Fun fact: That code you sent me only sends the kmails when I logout. Strange. Works though :D
I doubt that. Mafia just doesn't recognize incoming kMails all the time when your chat window is closed.
IceColdFever
09-30-2010, 01:12 PM
Bale, this is beautiful! I can't wait to start using it!
Currently I use my own inventory cleanup scripts and they require me to keep a spreadsheet of all the items and what I want to do with them. This new relay OCD script is going to save me a lot of time going back and forth between my spreadsheets and my scripts.
I have an idea for your script, just wondering if you think it makes sense to add it. I love having OCD control over my inventory, but i'm also a packrat, so what I do is mallsell, autosell, display, smash all my items, then I closet everything I want to keep, but don't want in my inventory. I'm thinking just a checkbox next to each item that says closet, that will do what you have it categorized as (including keep) and then put the rest in the closet. This allows people like me to keep everything I think I might need some day, but not have to put it in a displaycase or sort through it on the inventory screen.
That may sound like a small thing to you, but it is really a major deal. I don't foresee adding a feature like that soon. It's a bit tough for me to get motivated about a difficult feature that I'd never use. Perhaps I'll get to it someday.
Banana Lord
10-01-2010, 02:19 AM
Fantastic!
Oh and my chat window was open. And I double checked my messages on my main and my multi before logging out (my multi). Immediately after doing that the kmails appeared on my main's chat window. It doesn't matter, it's just seems strange :-)
oztrich
10-01-2010, 11:59 AM
I'm getting a problem with the pulverize function, seems to be doing the same as Banana Lord reported although I did notice the reply saying it was fixed. I'm using v3.12.
pulverize 16 bat-ass leather jacket, 18 giant needle
Unable to invoke 16
This inventory is clean.
Winterbay
10-01-2010, 12:11 PM
Make sure you don't have any aliases that can interfere. I know that sort of error have happened to me in that case...
oztrich
10-01-2010, 12:29 PM
Make sure you don't have any aliases that can interfere. I know that sort of error have happened to me in that case...
Hmmm, I'm not quite sure what you mean? Where would I have an alias that could interfere with the script?
Winterbay
10-01-2010, 01:06 PM
Hmmm, I'm not quite sure what you mean? Where would I have an alias that could interfere with the script?
The script executes "pulverize " together with whatever it has been decided it shall pulverize in the CLI. If there is an alias called pulverize or even perhaps 16 I guess that could be a problem.
That said I think that there are spelling errors in the script. Lines 231 and 238 refers to "PLUV" instead of "PULV" which is the command setup at the start of the script. Test what happens if you change those two lines?
oztrich
10-01-2010, 01:10 PM
That said I think that there are spelling errors in the script. Lines 231 and 238 refers to "PLUV" instead of "PULV" which is the command setup at the start of the script. Test what happens if you change those two lines?
Yes, that did the trick!
After replacing "PLUV" with "PULV" it works fine:
pulverize 18 giant needle
Pulverizing giant needle (18)...
You acquire twinkly nuggets (48)
You acquire twinkly wad (6)
giant needle (18) smashed.
This inventory is clean.
Thanks! :)
Thank you for spotting my typo. I updated the first post with the fixed version.
(Darnit, I found the wrong potential bug in the pulverize code earlier. Ah well, at least nobody will ever spot the problem I fixed then.)
tgetgel
10-01-2010, 06:59 PM
Bale,
How do you handle stuff that you want to send to the clan stash on a routine basis? Could that be added to the action drop list in the relay inventory manager if the character was in a clan? I know you have the send as gift to ... already. Can that be to the clan stash?
Bale,
How do you handle stuff that you want to send to the clan stash on a routine basis? Could that be added to the action drop list in the relay inventory manager if the character was in a clan? I know you have the send as gift to ... already. Can that be to the clan stash?
Clan stash would have to be an entirely different action. It works nothing like sending gifts. I could add it to the script though. I'll take a look at adding that tonight.
tgetgel
10-01-2010, 07:58 PM
Can you add a "Do you really want to leave this page" when adding to the inventory and you have not yet saved all of the changes?
(banging head on desk)
Sorry, I don't have any good ideas for how to do that. You'll just have to remember to click the save button before switching tabs.
How do you handle stuff that you want to send to the clan stash on a routine basis? Could that be added to the action drop list in the relay inventory manager if the character was in a clan?
I added the Clan Stash as a new feature.
You can now do this in OCD Control v3.2 and db Manager v1.2. I hope that this meets with your approval. Please test it out and let me know if it works.
bumcheekcity
10-02-2010, 10:32 AM
This is one of the best scripts ever :D
One tiny request: Pagination. I have about 2,000 items and Firefox has a massive spaz every time I load a page - perhaps 50/100/200 per page?
Edit: I thought it would just do nothing with Uncategorised items, but I tested it by categorising 10-20 of them, then I ran the script and got this:
> call scripts\OCD Inventory Control.ash
Saving outfit Backup...
Outfit saved
Taking off everything...
Everything removed.
transform 1 Jarlsberg's key into Jarlsberg's key lime pie, 1 Richard's star key into star key lime pie, 1 Sneaky Pete's key into Sneaky Pete's key lime pie, 1 digital key into digital key lime pie
use 24 Warm Subject gift certificate
pulverize 1 Angelhair Culottes, 1 Bandolier of the Spaghetti Elemental
Searching for ""drink me" potion"...
Searching for "'will work for booze' sign"...
Searching for "30669 scroll"...
Searching for "334 scroll"...
Searching for "6-ball"...
Searching for "668 scroll"...
Searching for "angry farmer candy"...
Searching for "bricko eye brick"...
Searching for "bittersweettarts"...
mallsell 57 "DRINK ME" potion @ 395, 9 'WILL WORK FOR BOOZE' sign @ 900, 13 30669 scroll @ 1700, 16 334 scroll @ 1695, 1 6-ball @ 100, 5 668 scroll @ 3565, 16 Angry Farmer candy @ 274, 4 BRICKO eye brick @ 100, 1 BitterSweetTarts @ 700
Total sale price = 103,244
autosell 1 1337 7r0uZ0RZ, 1 3-ball, 23 33398 scroll, 3 7-Foot Dwarven mattock, 2 8-ball, 1 ASCII shirt
Total autosale price = 1896
This was only a test. Had this been an actual OCD incident your inventory would be clean right now.
I assumed it would only affect the items above, and would ignore the others. Am I misunderstanding?
This is one of the best scripts ever :D
One tiny request: Pagination. I have about 2,000 items and Firefox has a massive spaz every time I load a page - perhaps 50/100/200 per page?That's a good idea. I'll have to figure out a good way to do that.
Edit: I thought it would just do nothing with Uncategorised items, but I tested it by categorising 10-20 of them, then I ran the script and got this:
> call scripts\OCD Inventory Control.ash
Saving outfit Backup...
Outfit saved
Taking off everything...
Everything removed.
transform 1 Jarlsberg's key into Jarlsberg's key lime pie, 1 Richard's star key into star key lime pie, 1 Sneaky Pete's key into Sneaky Pete's key lime pie, 1 digital key into digital key lime pie
use 24 Warm Subject gift certificate
pulverize 1 Angelhair Culottes, 1 Bandolier of the Spaghetti Elemental
Searching for ""drink me" potion"...
Searching for "'will work for booze' sign"...
Searching for "30669 scroll"...
Searching for "334 scroll"...
Searching for "6-ball"...
Searching for "668 scroll"...
Searching for "angry farmer candy"...
Searching for "bricko eye brick"...
Searching for "bittersweettarts"...
mallsell 57 "DRINK ME" potion @ 395, 9 'WILL WORK FOR BOOZE' sign @ 900, 13 30669 scroll @ 1700, 16 334 scroll @ 1695, 1 6-ball @ 100, 5 668 scroll @ 3565, 16 Angry Farmer candy @ 274, 4 BRICKO eye brick @ 100, 1 BitterSweetTarts @ 700
Total sale price = 103,244
autosell 1 1337 7r0uZ0RZ, 1 3-ball, 23 33398 scroll, 3 7-Foot Dwarven mattock, 2 8-ball, 1 ASCII shirt
Total autosale price = 1896
This was only a test. Had this been an actual OCD incident your inventory would be clean right now.
I assumed it would only affect the items above, and would ignore the others. Am I misunderstanding?
Yes, I believe it can not effect any items other than the items you specify. You'll have to be clearer about the problem. What happened that you didn't expect? Is any of that contrary to your expectation? Are those the 10-20 items that you categorized? The bit about "This was only a test..." is because you turned on simulation mode. Did it do something different from your expectation?
I don't understand clearly if there was a problem or what the problem was.
Theraze
10-03-2010, 01:53 AM
Probably the fact that the simulation message said that your inventory would be clean, though it's not, because he didn't do his whole inventory. :D But it would be 'clean' in terms of those are the items that HE said were junk...
bumcheekcity
10-03-2010, 11:39 AM
Theraze is correct. I ran it WITHOUT the simulation option and it did exactly as I expected (i.e. only affected the items I had actions set for). It's just that the message could probably be clarified a little. Other than a slight misunderstanding, the script worked absolutely perfectly.
oztrich
10-03-2010, 06:34 PM
I added the Clan Stash as a new feature.
You can now do this in OCD Control v3.2 and db Manager v1.2. I hope that this meets with your approval. Please test it out and let me know if it works.
I've tested this out with v3.21 and it doesn't seem to be working. The script reports it has done what I asked:
stash 1 stuffed Baron von Ratsworth, 1 stuffed frozen gravy fairy, 1 stuffed hand turkey, 1 stuffed key, 1 stuffed undead elbow macaroni
This inventory is clean.
But all of these the items still show in my inventory. I checked my inventory prior to and after running the script, then used the mafia clan stash option to move them successfully.
I think the CLI command should be:
stash put 1 stuffed Baron von Ratsworth, ...
I think the CLI command should be:
I'm not using the CLI command.I'm using put_stash(). Since that command doesn't give a nice CLI output I put one together with print().
But all of these the items still show in my inventory. I checked my inventory prior to and after running the script, then used the mafia clan stash option to move them successfully.
Did you refresh inventory?
I'm not using the CLI command.
Right. I'll take a look in the script before posting next time. Sorry!
apenny
10-03-2010, 11:40 PM
Hi -
One feature that would be really nice to have would be to a "send to kbay" type of option. Could have options set to have default price, if desired.
Thanks so much for this great script.
apenny
One feature that would be really nice to have would be to a "send to kbay" type of option. Could have options set to have default price, if desired.
I'd considered that, but of course it would be bad to send each item to kBay individually. (kBay won't even allow that many auctions for a single person anymore.) So, should I simply lump each 11 items together regardless of there being any connection? Or should I link all stuffies together (in groups of 11) and then all non-stuffies? I haven't figured out a good choice for this. What sort of minimum price should I set? I have questions.
What do you think?
halfvoid
10-04-2010, 12:07 AM
I would say with the sheer volume of items that would be filtered through with OCD that it would be better to just use the kbay.ash that was posted a couple months ago. I've customized mine to only send sets of 10 of each stuffed item, 1 for crimbo tree items, and a couple other special item auctions once i acquire 100 of them, i.e. sugar shards, toast, robogoose eggs. With the sets of 10 for the stuffed items I tend to have 2 or 3 sets a week to send out. Bulk stuffies likely go for more, but i feel the collectors who are really the ones who frequent it the most would prefer to just get whatever they are looking for.
Perhaps a way to send out sets of 10 for up to 15 auctions and then exit out of the kbay function?
Or a way to scan kbay with a visit_url to see how many auctions are currently running for the character before determining the way to send out gift items.
oztrich
10-04-2010, 03:40 PM
Did you refresh inventory?
I wasn't sure, so I've re-tested by:
retrieving an item from the clan stash, checking for it's presence via mafia and the relay browser, running the script, confirming the item did not disappear in mafia and can still be found via relay browser, then logging out and back in again.
The result is that the item is still in my inventory, even though the script reported:
> call scripts\OCD Inventory Control.ash
Checking for updates (running Bale's OCD Inventory Control ver. 3.21)...
_version_BaleOCD => 3.21
You have a current version of Bale's OCD Inventory Control.
stash 1 stuffed can of asparagus
This inventory is clean.
I can re-run the script multiple times and it will report that it has stashed the same item every time, but it won't actually go until I use the stash button in mafia.
I'm as sure as I can be that this feature is not working correctly. I can run more tests if you can see anything that seems to be a loophole in my thinking?
I finally had some time to play with this... Bale: it is a thing of beauty ;)
@oztrich: I did also open it - line 346 of OCD Inventory Control.ash
if(act == "MALL" || act == "AUTO" || act == "DISP") batch_close();
should be:
if(act == "MALL" || act == "AUTO" || act == "DISP" || act == "CLAN") batch_close();
I think there is a typo on line 340 too, the "165" should be "15", if I'm reading the commentary correctly.
Oh heck. And since the clan stash was done last, there was never a batch_close().
Thanks for finding my bug slyz. I'm glad you're so impressed with my script despite that.
I've released a new version of OCD Inventory Control that should fix the problem courtesy of slyz.
I think there is a typo on line 340 too, the "165" should be "15", if I'm reading the commentary correctly.
Not a bug. 11 items per transfer * 15 transfers = 165 items.
oztrich
10-04-2010, 10:13 PM
I finally had some time to play with this... Bale: it is a thing of beauty ;)
Seconded, it's fantastic! :)
@oztrich: I did also open it - line 346 of OCD Inventory Control.ash
Yes, that did the trick. After making the change to line 346 the clan stash function works perfectly, I've tested it and confirmed success. Thanks for the pointer slyz!
Yes, that did the trick. After making the change to line 346 the clan stash function works perfectly, I've tested it and confirmed success. Thanks for the pointer slyz!
It seems I ninja'ed you. I'm glad that fixed it.
apenny
10-04-2010, 11:48 PM
Hi - regarding the kbay subthread here. Personally I would plan on running this script maybe once an ascension at most (I spent most of my time in hardcore). I would suggest sending maybe only if there more than 10 per item and just leaving them in inventory otherwise? If someone uses your script they are bound to run it again! Then you could group them by type. Maybe allow the user to choose a different option that would permit random grouping if they are just desperate to get rid of the darn things. Personally I also love the option to send some to people as gifts (I know some people who collect) as well. I have been sending some gifts to sellbot but sellbot is a bit overstocked on some things. Personally I'd be happy with a very low minimum price because I want things to sell. I really love your script, keep up the great work.
apenny
Thank you.
I'll consider you suggestion. It certainly adds a concept that I hadn't though about. Like most ideas I come up with, I realize that the method for dealing with kBay is rather different from the way that every other item in the OCD database is dealt with.
jwylot
10-05-2010, 01:48 PM
Thanks for the update Bale. This excellent script just got even better :)
EdFox
10-06-2010, 05:32 AM
Holy smokes. This is amazing. One pass through all my junk instead of after every ascension.
Requests:
1. Add the message at the top of mall multi emails as a variable editable in the relay settings script. The line "Mall Multi Dump" caused some issues with a bot. I changed it in the script but would be even better if changeable via the relay.
2. Add a way to auto use multi use items. Example: duct tape. I have all the items you can make with it and it can't be sold so the best way to use it is to multi use 4 and make a wallet, which a subsequent pass of OCD will then use and get me my meat.
Thanks. :)
Veracity
10-06-2010, 06:12 AM
I decided to check this out, finally, since I currently spend WAY too long manually doing this-or-that with my inventory before ascending.
Use relay_OCD_Inventory to create a map file with a list of how you want to treat ever item.
This map file can also be edited in a plain text editor if you're careful.
OK. I have never used a relay script - other than one which replaces a KoL page, and this does not seem to be one.
How, exactly, do I "use" this relay script? I tried turning on quick scripts and adding the script to it, but all it did was check my versions of zlib and the script.
Winterbay
10-06-2010, 06:18 AM
I decided to check this out, finally, since I currently spend WAY too long manually doing this-or-that with my inventory before ascending.
OK. I have never used a relay script - other than one which replaces a KoL page, and this does not seem to be one.
How, exactly, do I "use" this relay script? I tried turning on quick scripts and adding the script to it, but all it did was check my versions of zlib and the script.
If you put the scirpt in your relay folder there should be a drop down at the top right corner of the game where you can choose the script from. It will thenrun and create whatever page that the scriptmaker had in mind.
Does that help?
1. Add the message at the top of mall multi emails as a variable editable in the relay settings script. The line "Mall Multi Dump" caused some issues with a bot. I changed it in the script but would be even better if changeable via the relay.
This is kinda edge case and I doubt many people really care what the text reads. I'd rather not do this since I don't want to clutter the configuration section. The more stuff there, the harder it is to pick out the important things. However I may be able to accommodate you. I think I'd rather just change the message in the script since I cannot imagine it would cause a problem for others.
Tell me what you think the message should read to avoid troubling bots, while being slightly informative.
2. Add a way to auto use multi use items. Example: duct tape. I have all the items you can make with it and it can't be sold so the best way to use it is to multi use 4 and make a wallet, which a subsequent pass of OCD will then use and get me my meat.
No need. This feature already exists. Just tell OCD that the action for duct tape is "craft into a..." duct tape wallet
OCD will figure out that it needs 4 duct tape to do that and only fire off if there are enough. It will then use items AFTER creating items because I already figured out that people might do this. :D So you won't have to run OCD a second time to use your wallets. :D
How, exactly, do I "use" this relay script? I tried turning on quick scripts and adding the script to it, but all it did was check my versions of zlib and the script.
Eeek. I added better directions to my first post. You've already been helped by Winterbay of course. Thanks Winterbay.
Veracity
10-06-2010, 07:02 AM
OK, got it. Thanks. For some reason, I thought I needed to add it to the list of "quick scripts" or whatever. That did not work.
I went and configured some basic things and saved. I then went to my list of items - all of which were "uncategorized", configured all the ones that began with capital letters, saved, and tried the script. It told me "Corrupted data file! Oops! Hope you didn't lose too much!"
I lost all the configuration I had done.
I then poked around and saw that I had the option to mark every uncategorized thing as "Keep All" I did that, saved, and then I was able to configure things to be something else.
This will be useful. Thanks.
I'm very happy you'll find it useful.
I went and configured some basic things and saved. I then went to my list of items - all of which were "uncategorized", configured all the ones that began with capital letters, saved, and tried the script. It told me "Corrupted data file! Oops! Hope you didn't lose too much!"
That's... disturbing. I wish you'd saved that file so I could have seen what was wrong with it.
Theraze
10-06-2010, 07:17 AM
Maybe an effect of leaving items uncategorized and telling it to save? Does it default the data file to save as keep for (or have an allowed save state leaving it as) uncategorized?
Maybe an effect of leaving items uncategorized and telling it to save? Does it default the data file to save as keep for (or have an allowed save state leaving it as) uncategorized?
Nope I already accounted for that by removing all uncategorized items before saving. (lines 611-613)
Veracity
10-06-2010, 07:27 AM
Well, sorry! I just have high expectations of you and your scripts, so it never occurred to me that I needed to save things other than via your "save" button.
OK, I have a suggestion.
Here's how I currently tend to deal with items immediately after I free the king.
- I pull various items from my display case that I will need in aftercore.
- I pull various items from storage that I will need in aftercore.
- I pull and closet various items from storage that I specifically do NOT want to use in aftercore without special effort. For example, tempura stuff, breathtastic air, instant karma, and so on. I just don't want to see those things offered in the food/booze/spleen sections of the item manager.
With this script, I can envision a different post-prism routine:
- Immediately empty storage, so that I can immediately autosell excess Knob Goblin elite stuff, for example.
- Run a script (which I will write) to pull aftercore items from my display case
- Run the script to immediately dispose of excess stuff I accumulated in-run
After I've done aftercore for however long and am ready to ascend
- Run a script (which I will write) to put aftercore items back in my display case
- Run your script to dispose of anything I've farmed in aftercore and didn't already dispose of
The only thing I am missing is the ability to auto-closet items to keep the Item Manager from seeing them. I could do that either with a personal script - or, with your script, the first time I run it, if you add a "closet" disposition option.
This script will save me a lot of time, once I get it set up right, whether or not you do closeting for me. Thanks!
Well, sorry! I just have high expectations of you and your scripts, so it never occurred to me that I needed to save things other than via your "save" button.
I didn't mean that. By "save" mean mean that I mean that I wish you'd kept the original buggy file instead of over-writing it. So that you could show me the problem. I am happy that you've got high expectations for my scripts. Unfortunately I'm not always as clearly spoken as I could hope.
With this script, I can envision a different post-prism routine:
- Immediately empty storage, so that I can immediately autosell excess Knob Goblin elite stuff, for example.
- Run a script (which I will write) to pull aftercore items from my display case
- Run the script to immediately dispose of excess stuff I accumulated in-run
Actually, my script will empty storage for you. (It checks lastEmptiedStorage to see if it should.) It can also autosell stuff like excess KGE gear. You can reduce that to a two stage process:
- Run the script to empty storage and immediately dispose of excess stuff accumulated in-run, including autoselling excess Knob Goblin elite stuff, for example.
- Run a script (written by Veracity) to pull aftercore items from the display case.
The only thing I am missing is the ability to auto-closet items to keep the Item Manager from seeing them. I could do that either with a personal script - or, with your script, the first time I run it, if you add a "closet" disposition option.
This script will save me a lot of time, once I get it set up right, whether or not you do closeting for me. Thanks!
Okay, I can do that for you. Closeting is the next feature for me to add to this script.
I just want to be clear: You want to be able to choose "Closet" from the action drop-down. Then if it encounters more than X items of that type (most likely X == 0) it will stick all the extras into your closet. That's what you want, right?
The thing about needing another script to remove things to&from the display case bothers me since I also have one of those scripts! It bugs me I haven't thought of a good way to fold that into OCD Inventory. Unfortunately to do that the script would need to know if you're starting or ending an ascension... I suppose that it could remove stuff from the DC when it empties Hangk since that is only at the beginning, but I often want to run this during aftercore so I need a good way to telling it to DC that stuff when I'm done... Also, I'd need a proper UI for adding that information. Well, it's not really important and I already have my DC script written.
Veracity
10-06-2010, 08:00 AM
I just want to be clear: You want to be able to choose "Closet" from the action drop-down. Then if it encounters more than X items of that type (most likely X == 0) it will stick all the extras into your closet. That's what you want, right?
Exactly. Once it has emptied storage, I want it to put all (extra) particular items into the closet.
The thing about needing another script to remove things to&from the display case bothers me since I also have one of those scripts! It bugs me I haven't thought of a good way to fold that into OCD Inventory. Unfortunately to do that the script would need to know if you're starting or ending an ascension... I suppose that it could remove stuff from the DC when it empties Hangk since that is only at the beginning, but I often want to run this during aftercore so I need a good way to telling it to DC that stuff when I'm done... Also, I'd need a proper UI for adding that information. Well, it's not really important and I already have my DC script written.
Yeah. I think you should be able to run this script as often as you want during aftercore and it always does The Right Thing. I don't want to be forced to run it exactly twice - once after freeing the king and once just before ascending.
Veracity, for you I just uploaded a new version that should support closeting.
Please let me know if this works and works well.
Winterbay
10-06-2010, 08:40 AM
Any chance of getting the option to check the (5th) mallprice of an item vs the autosell value? I think I would like to have it presented as a ratio between the 5th mallprice and the min mallprice (for easy use of just one number). If it is close to 1 I know that it is probably just as well to autosell it instead of dumping it into the mall.
I would add it myself but I suck at layout :)
Veracity
10-06-2010, 08:47 AM
Hmm.
> call scripts/OCD Inventory Control.ash
Unknown variable 'OCD' (OCD Inventory Control.ash, line 54)
The relay script works well for adding "closet" items. And, having done so, a "Closet" tab is available. Good!
Please download OCD Inventory Control again. And pretend that I'd been smart enough to use verify the first time. :o
Any chance of getting the option to check the (5th) mallprice of an item vs the autosell value? I think I would like to have it presented as a ratio between the 5th mallprice and the min mallprice (for easy use of just one number). If it is close to 1 I know that it is probably just as well to autosell it instead of dumping it into the mall.
It's actually impossible for the ratio to ever be less than 2. (Minimum mall price is twice autosell.)
I'm not likely to add that since the layout is getting tight on my monitor.
Winterbay
10-06-2010, 09:17 AM
Please download OCD Inventory Control again. And pretend that I'd been smart enough to use verify the first time. :o
It's actually impossible for the ratio to ever be less than 2. (Minimum mall price is twice autosell.)
I'm not likely to add that since the layout is getting tight on my monitor.
I can understand that. I'll have to make do some other way then. Also, I wanted to compare min mall price with mall price, not autosell value. Thus 1 and up.
I could've said 2 times autosell and mall price but that would've meant hat I had to remember how many times higher the min mall price was than the autosell value :)
I failed reading comprehension again. :(
If you really are willing to add this yourself, change lines 394-406 to
write("<th>Price Ratio</th><th>Keep</th><th>Action</th>");
if(act == "Crafting")
write("<th>Craft into a</th>");
else if(act == "Gift List")
write("<th>Send to</th><th>Message with Gift</th>");
writeln("</tr>");
foreach doodad in cat {
write("<tr><td><a href=\"javascript:descitem('" +desc[doodad.to_int()]+ "');\">"+doodad+"</a></td>");
if(act == "Keep")
write("<td align=center>"+item_amount(doodad)+"</td>");
write("<td>");
OCD[doodad].q = write_field(OCD[doodad].q, "q_"+doodad.to_int());
write("</td><td>"+to_string(mall_price(doodad)/ autosell_price(doodad)/2)+"</td><td>");
Then change line 337 to
writeln("<tr><th>Item</th><th>Have</th><th>Price Ratio</th><th>Keep</th><th>Action</th><th>... information</th></tr>");
Finally change line 315 to
write("</td><td>"+to_string(mall_price(doodad)/ autosell_price(doodad)/2)+"</td><td>");
That should probably do it. Note: Extremely untested.
Winterbay
10-06-2010, 10:55 AM
Seems to be working. Needed to change line 315 to take into account items with an aotusell of 0 but it is now going through my inventory and finding the ratio. Let's see where that ends up :)
Veracity
10-06-2010, 04:04 PM
Hmm.
display 2 cyclops eyedrops, 1 depleted uranium seal figurine, 5 goth kid t-shirt, 1 sawblade shield, 1 solid gold bowling ball, 1 wholeberd
closet 2 cyclops eyedrops, 1 depleted uranium seal figurine, 5 goth kid t-shirt, 1 sawblade shield, 1 solid gold bowling ball, 1 wholeberd
In ocd_inventory,
act_cat(disp, "CLST", ""); should be
act_cat(clst, "CLST", "");
Having done so, I don't actually see anything that moves items from the clst list to the closet. Adding
case "CLST":
put_closet(quant, it);
break;
to the switch statement in act_cat fixes that.
Having made those changes, the script worked flawlessly. Thanks!
Well, other than the startup message:
New Version of Bale's OCD Inventory Control Available: 3.22
Upgrade Bale's OCD Inventory Control from 3.23 to 3.22 here: http://kolmafia.us/showthread.php?t=1818
Countdown: 1 second...
Waiting completed.
;)
Well, other than the startup message
;)
That is an issue with ZLib: it only checks for new versions in the forum threads once a day, and compares it to the string supplied by the local copy of the script. Since you had run it today before the thread was updated, "3.22" was stored as the latest version, and since it doesn't match the "3.23" in the current version of the script, ZLib issues a warning.
oztrich
10-06-2010, 05:13 PM
A couple of feature requests:
transform 105 broken skull into bone rattle
Verifying ingredients for bone rattle (105)...
You need 14 more skeleton bone to continue.
Is it possible for the script to make up to the number available and maybe output that it could have made more with extra ingredients? Similar to the "Make as many as possible" tick box?
You cannot transform a salty dog into a slap and tickle. There's a problem with your data file.
I didn't understand this at first, I had the right ingredients to do the creation. But I'm thinking it could be because my box servant had blown up and I've got mafia set to only craft when one is present? If that's the case then I'm very happy with how it works! :) But can the error message be made more obvious?
You cannot transform a salty dog into a slap and tickle. There's a problem with your data file.
This shouldn't happen:
> ash import "OCD Inventory Control.ash"; count_ingredient($item[salty dog], to_item("slap and tickle"));
Returned: 1
fronobulax
10-06-2010, 06:42 PM
- Run a script (which I will write) to pull aftercore items from my display case
Feel free to use these. I run them daily because I want the items in my DC when JickenWings gets their dump, but also want to use things daily.
The data file is sample.
EdFox
10-06-2010, 08:56 PM
This is kinda edge case and I doubt many people really care what the text reads. I'd rather not do this since I don't want to clutter the configuration section. The more stuff there, the harder it is to pick out the important things. However I may be able to accommodate you. I think I'd rather just change the message in the script since I cannot imagine it would cause a problem for others.
Tell me what you think the message should read to avoid troubling bots, while being slightly informative.
The bot wants "deposit" or nothing. This is not terribly descriptive so if you'd rather just leave it as is, I'll just edit the script myself. Not a big issue at all.
As for the duct tape wallet thing, I am impressed! :)
EDIT: I'm still impressed, however there seems to be a small problem. The "Craft into..." option isn't available for duct tape. Perhaps because it's not mallable and they go together?
Re: the price ratio edits in post 164:
I have a few changes. "Keep" and "Price Ratio" were transposed in line 394 and 337. And lines 315 and 406 have a divide by zero problem with items with zero autosell cost. My really terrible solution is to add 1 to all autosell prices. :p I'm sure somebody can do better, but at least this generates some amusing price ratios for Mr Store items.
If you really are willing to add this yourself, change lines 394-406 to
write("<th>Keep</th><th>Price Ratio</th><th>Action</th>");
if(act == "Crafting")
write("<th>Craft into a</th>");
else if(act == "Gift List")
write("<th>Send to</th><th>Message with Gift</th>");
writeln("</tr>");
foreach doodad in cat {
write("<tr><td><a href=\"javascript:descitem('" +desc[doodad.to_int()]+ "');\">"+doodad+"</a></td>");
if(act == "Keep")
write("<td align=center>"+item_amount(doodad)+"</td>");
write("<td>");
OCD[doodad].q = write_field(OCD[doodad].q, "q_"+doodad.to_int());
write("</td><td>"+to_string(mall_price(doodad)/ (autosell_price(doodad)+1) /2)+"</td><td>");
Then change line 337 to
writeln("<tr><th>Item</th><th>Have</th><th>Keep</th><th>Price Ratio</th><th>Action</th><th>... information</th></tr>");
Finally change line 315 to
write("</td><td>"+to_string(mall_price(doodad)/ (autosell_price(doodad)+1) /2)+"</td><td>");
heeheehee
10-06-2010, 11:29 PM
Price ratio:
to_string( mall_price(doodad) / max(2*autosell_price(doodad),100) )
:D
That should technically fix some issues you'd have with stuff with low autosell value. (Just, y'know, insert it into the above code snippets)
Released a new update.
I found the duct tape problem. It was an interesting issue and had nothing to do with mallability. Should be fixed now, though it's a bit less elegant that I'd prefer. I'll have to try tidying it up later. If anyone wants to give me some help with the regexp on line 262 of the db Manager, I'd be grateful. Right now it only works because of the previous line.
Veracity, thanks for unraveling my closet mess. Fixed.
A couple of feature requests:
transform 105 broken skull into bone rattle
Verifying ingredients for bone rattle (105)...
You need 14 more skeleton bone to continue.
Is it possible for the script to make up to the number available and maybe output that it could have made more with extra ingredients? Similar to the "Make as many as possible" tick box?
I gather you've turned off mall purchasing. I'll take care of this fix next.
You cannot transform a salty dog into a slap and tickle. There's a problem with your data file.
This shouldn't happen:
> ash import "OCD Inventory Control.ash"; count_ingredient($item[salty dog], to_item("slap and tickle"));
Returned: 1
This is still puzzling me.
Winterbay
10-07-2010, 05:16 AM
I'm sure somebody can do better, but at least this generates some amusing price ratios for Mr Store items.
I did the following:
if(autosell_price(doodad) == 0 && historical_price(doodad) != 0)
write("</td><td>"+ to_string(historical_price(doodad) + " (mallprice)</td><td>"));
else if(autosell_price(doodad) != 0 && historical_price(doodad) != 0)
write("</td><td>"+to_string(historical_price(doodad)/ autosell_price(doodad)/2)+"</td><td>");
else
write("</td><td>"+"Cannot be sold"+"</td><td>");
Ahh yes, I also changed to historical_price to not do a bazillion of server hits every time I save the datafile...
EdFox
10-07-2010, 07:24 PM
Price Ratio Version
I've incorporated Bale's changes to add the "Price Ratio" column to the relay script. I've also added my fix to the transposed column headers and Winterbay's more elegant solution to zero autosell price items. All of this in relay 1.24 which has different line numbers than the ones referenced in previous posts.
This should make it easier for others to try the Price Ratio version. Please be aware this fork has not been tested that much and has been fiddled with by rank amateurs such as myself, so use caution.
fronobulax
10-07-2010, 08:32 PM
so use caution.
I'm having trouble finding caution. Where can I download it? Does it go in relay or scripts?
:-)
Does it go in relay or scripts?
Any script that starts with "relay_" goes in the /relay folder.
Then we can deduce that caution must go in the /scripts directory.
Cieka
10-07-2010, 11:55 PM
This might be just as good a place to post this as any, maybe not. Let me know if you'd prefer this in a PM or whatnot.
I just did the most recent update and now when I run the script, I get nothing. I run it and the CLI shows:
> call scripts\OCD Inventory Control.ash
Then nothing else, and it doesn't do anything. It (obviously) was working just fine before.
Thanks
That doesn't really make sense to me, so I'd like to ask that you run a version that I'm attaching to this post. It's got a bunch of extra debugging lines to help me find out when things go awry. Please copy-paste the CLI output here.
Isvarka
10-08-2010, 04:43 AM
I'm having the same issue where it would just countdown and then say "Waiting completed." So I tried your version with extra debugging lines and got absolutely zero output.
So I looked through the script to see if I could find why I was getting nothing and realized that it won't do anything if you're in hardcore/ronin. So now I feel sheepish. ;)
Wait. If you're in hardcore/ronin it is supposed to print "Whoa! Don't run this until you break the prism!" That's right there in main!
I'm also puzzled because there is nothing in the script that should countdown or say "Waiting completed."
Cieka
10-08-2010, 04:46 AM
Oh, then that would be it...
You're in hardcore also?
Oh I get it. You must have turned down your zlib verbosity. That's why you don't get the error message.
Isvarka
10-08-2010, 06:04 AM
Yeah, I certainly don't remember turning down the verbosity, but apparently I must have at some point since when I checked the settings file, the value for verbosity was blank. That explains a few things.
And I was confused as well by the countdown and "waiting completed" messages since I couldn't find anything either that mentioned that. I'll try updating all the scripts I use to see if something might be causing conflicts.
Edit: And now that I've set verbosity correctly and updated scripts, I correctly get the error message telling me to not run it until I break the prism.
Whew good news.
Incidentally, default zlib verbosity is 3. Just in case you want to know what it should be.
Winterbay
10-08-2010, 06:56 AM
Yeah, I certainly don't remember turning down the verbosity, but apparently I must have at some point since when I checked the settings file, the value for verbosity was blank. That explains a few things.
And I was confused as well by the countdown and "waiting completed" messages since I couldn't find anything either that mentioned that. I'll try updating all the scripts I use to see if something might be causing conflicts.
Edit: And now that I've set verbosity correctly and updated scripts, I correctly get the error message telling me to not run it until I break the prism.
There is a known bug with the verbosity setting where it sometimes gets blanked out for no obvious reason. I've had that happen as well and it can be really annoying :)
Banana Lord
10-08-2010, 09:37 AM
Running the latest versions of both scripts OCD thinks I've got uncategorised items, despite the relay script showing that I have none. I hit save again anyway and reran the script. Same problem. Ignoring the option to abort still lets me use the script obviously.
Really? Try running this and it should shed some light on what items aren't categorized:
string OCDfile = "OCD_"+my_name()+"_Data.txt";
record item_disposal {
string action;
int q;
string info;
string message;
};
item_disposal [item] OCD;
file_to_map(OCDfile, OCD);
foreach doodad in get_inventory()
if(!(OCD contains doodad))
print(doodad);
Edit: Actually you could run that from the CLI like this:
ash record item_disposal {string action; int q; string info; string message;}; item_disposal [item] OCD; file_to_map("OCD_"+my_name()+"_Data.txt", OCD); foreach doodad in get_inventory() if(!(OCD contains doodad)) print(doodad);
Banana Lord
10-08-2010, 09:48 AM
You forgot a semi colon ;) I get this:
Cobb's Knob lab key
Degrassi Knoll shopping list
Frobozz Real-Estate Company Instant House (TM)
Lord Spookyraven's spectacles
Mega Gem
S.O.C.K.
Spookyraven ballroom key
Spookyraven library key
Staff of Ed
Talisman o' Nam
archaeologist's notebook
continuum transfunctioner
detuned radio
dingy dinghy
fraudwort
giant castle map
half of a memo
hedge maze key
hedge maze puzzle
huge mirror shard
makeshift SCUBA gear
pirate fledges
rat whisker
shysterweed
strange leaflet
your father's MacGuffin diary
Winterbay
10-08-2010, 09:50 AM
That looks like a list of quest items to me...
Banana Lord
10-08-2010, 09:52 AM
It does seem suspiciously like it doesn't it?
Yeah, I forgot the filter I use to remove quest items from the list:
string OCDfile = "OCD_"+my_name()+"_Data.txt";
record item_disposal {
string action;
int q;
string info;
string message;
};
item_disposal [item] OCD;
file_to_map(OCDfile, OCD);
boolean is_OCDable(item it) {
if(is_displayable(it)) return true;
switch(it) {
case $item[Boris's key]:
case $item[Jarlsberg's key]:
case $item[Richard's star key]:
case $item[Sneaky Pete's key]:
case $item[digital key]:
case $item[the Slug Lord's map]:
case $item[Dr. Hobo's map]:
case $item[Dolphin King's map]:
return true;
}
return false;
}
foreach doodad in get_inventory()
if(!(OCD contains doodad) && is_OCDable(doodad))
print(doodad);
Banana Lord
10-08-2010, 09:55 AM
Now I get nothing, as we could have guessed.
If you get nothing, then why is it asking if you want to abort?!
I'm uploading a troubleshooting version. Tell me what the CLI output is after it asks if you want to abort.
Banana Lord
10-08-2010, 10:05 AM
Weirdness. I have no problem now. It doesn't ask me to abort. Haven't so much as looked at mafia/KoL since posting initially besides running the code you posted. *Confusion*
Well, I'm happy my script is working at least.
Banana Lord
10-08-2010, 10:15 AM
You're not the only one!
EdFox
10-08-2010, 10:26 PM
I found the duct tape problem. It was an interesting issue and had nothing to do with mallability. Should be fixed now, though it's a bit less elegant that I'd prefer. I'll have to try tidying it up later. If anyone wants to give me some help with the regexp on line 262 of the db Manager, I'd be grateful. Right now it only works because of the previous line.
It pains me to report that with relay DB 1.24, there is still no craft choice for duct tape. I show Keep, Autosell, Use, Closet, and Display. I'd be happy to help but I don't even know what 'regexp' even means! :confused:
I'm also getting the "You cannot transform.... There's a problem with your data file." error for crafting nuggets to wads, which makes sense as I have no malus access but what about wadbot. After a little digging I thought "ah-ha, it's not crafted, it should be set to pulverize the nuggets!" Sadly, pulverize isn't an available choice for either powders or nuggets.
It's very informative what happens when other people use my scripts because they invariably use them in ways that I do not.
It pains me to report that with relay DB 1.24, there is still no craft choice for duct tape. I show Keep, Autosell, Use, Closet, and Display. I'd be happy to help but I don't even know what 'regexp' even means! :confused:
This is a bit tough for me to test out now. I'll work on it once I have access to duct tape and can check it. (In hardcore now.) This isn't a solution to the problem, but until I can fix it I believe it will work if you edit a line into your data file. (Use notepad or other plaintext editor -- back it up before editing just in case you make a mistake. It'd suck to lose the whole database...) Add this line to the end of your OCD_EdFox_Data.txt file:
duct tape MAKE 0 duct tape wallet
I'm also getting the "You cannot transform.... There's a problem with your data file." error for crafting nuggets to wads, which makes sense as I have no malus access but what about wadbot. After a little digging I thought "ah-ha, it's not crafted, it should be set to pulverize the nuggets!" Sadly, pulverize isn't an available choice for either powders or nuggets.
This was much easier to fix. OCD dB Manager version 1.25 should recognize your ability to pulverize powders and nuggets.
Winterbay
10-09-2010, 03:53 PM
I look forward to actually using the script once I've managed to get through listing all the 1700 items I have left to set actions for...
tgetgel
10-09-2010, 08:37 PM
I look forward to actually using the script once I've managed to get through listing all the 1700 items I have left to set actions for...
It would be interesting to see the different lists (how folks set up their selections) and to know the reasons why they did it in a certain way. I mean the differences could be a useful instructional aid to the less experienced, to those that might want to change their style of play, or to ascend under a different class. What do you think about posting the OCD_name_data.txt file for a few of the experienced users? I could go through them and find the differences, then have a discussion on the merits of the various items and their uses as it relates to ascending under various classes in a separate thread.
Cieka
10-13-2010, 05:48 PM
I look forward to actually using the script once I've managed to get through listing all the 1700 items I have left to set actions for...
I've been using the script since, well, before it was posted and I'll give you my advice if you want it.
Go throught and set actions for any ultra rates, iotms, ascension rewards, etc first. The most valuable stuff that is very obvious to pick out of the list.
Then, ascend. Categorized your items at the end of every day, there really aren't many and you'll knock out a ton of items this way. Easily a couple hundred by the end of your ascension. Then, in aftercore do as many as you can stand, I was able to pick out about 100 before my eyes started to go crazy wicked tired. Ascend again and repeat. That's what I did at least, and I knocked it out after 3-4 ascensions. Forced breakup is the way to go. :)
--Cieka
As far as tgetgel's request, I'll post mine. It may not be the best list, but as Bale said earlier, I actually commissioned him for this script and paid him to write it. He did, of course, add a TON of ideas and made it something to be really as impressive as it is. So have a lot of other people (the reason I asked him to go ahead and make it public, although I didn't know at the time it would overwrite the old OCD Inventory Control). So, for whatever that's worth, I have a lot invested in the script and have put a lot of work into my database file, and just like the script itself, sharing only makes it a better resource for me too since I'm likely to get comments. :)
3616
Cieka
10-13-2010, 05:58 PM
The only feature that doesn't exist because I didn't think to ask for it at the time is a BUY or ALERT action that will make sure you have said items once the script is done running.
I currently have another script that I also run that makes sure I have everything I could possibly want to pull for a SC ascension. Tower items, gate, quest items, food, booze, etc.
My original idea for this script was something quite different from what it became (ok, actually it's very, very different), so having two scripts for the same thing is sort of annoying.
Say for example I want to mall sell any sonar-in-a-biscuits I have over 3. Then, I'm going along and I update my buy script to make sure I have 3. Later, during review I realize, oh wait, I might need 4 technically (not that I'd ever pull them, but there's no reason not to have every quest item in hagnk's) because I could also need one for the tower. So I go back and change my script to buy 4, then re-run OCD inventory control and it sells the 4th one.
While that example is easy, stuff like this happens when I'm trying to reconcile my two scripts all the time. I'm not even sure the best way to do it, to be honest. However, I assume the easiest way technically would be to have a checkbox to the right of every item that says ensure keep value.
Then, if you have sonar-in-a-biscuit marked as MALL 4, the secondary thing would MALL any that you had over 4, but would also throw an alert and warn you if you didn't have at LEAST 4. It would eliminate the need for that second script completely. An option is setup could also tell it to buy those items from the mall, but overall I think that's a very bad idea. I have the ability to do that in my other script, but I also had to modify it to make two passes and have items it would mall buy and items it wouldn't automatically mall buy. Tower items and cheap things I have no problem with a script mall purchasing. Some things, you don't ever want mafia buying for you automatically (Speaking of which, anyone need an extra zombie pineal gland? Anyone? Bueller?)
--Cieka
Despite all our discussion about what the script to do, you never did ask for that. I'll think about adding it here for you, as an option.
Or maybe I should just make a buy script for you that can read the same data file. :D
AlbinoRhino
10-15-2010, 10:54 AM
So I decided to give this a try. However, when I select the OCD_dB_Manager from the scripts menu in the relay browser; nothing happens. This appears in the gCLI :
Function 'updatevars( )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (relay_OCD_dB_Manager.ash, line 655)
Using the most recent .jar (r8683).
Any ideas about what's wrong ?
Theraze
10-15-2010, 01:32 PM
You skipped step one of how to make this work, and don't have zlib. :) Put this in your scripts folder:
http://kolmafia.us/showthread.php?2072-ZLib-Zarqon-s-useful-function-library
AlbinoRhino
10-15-2010, 01:59 PM
You skipped step one of how to make this work, and don't have zlib. :) Put this in your scripts folder:
http://kolmafia.us/showthread.php?2072-ZLib-Zarqon-s-useful-function-library
I skipped no steps. I do have zlib.
Theraze
10-15-2010, 02:04 PM
But updatevars() is a part of zlib, hence the message you reported getting comes from either not having zlib, or not having it in the right folder...
AlbinoRhino
10-15-2010, 02:25 PM
But updatevars() is a part of zlib, hence the message you reported getting comes from either not having zlib, or not having it in the right folder...
It's in the scripts folder. Has been for a long time. The error from the gCLI refers to a line in the relay portion of the script. Does that have any significance ? I will try a fresh download of zlib anyway and see what happens. Thanks for your help.
Edit:
That fixed it. It appears my copy of zlib was way out of date ... r17. Perhaps I'm mistaken, but I seem to recall, in the past, getting some kind of notice when it needed updated. Is that correct ? Or do I just have to monitor the zlib thread to know when ? It seems strange that I could miss several versions and never have any problems until now. Thanks again for your help, Theraze.
Perhaps I'm mistaken, but I seem to recall, in the past, getting some kind of notice when it needed updated. Is that correct ? Or do I just have to monitor the zlib thread to know when ?
You're not mistaken. Unfortunately zlib's update function won't work if a script uses a function from a new version that isn't in the version you have. Unfortunate, but there's no way around that.
tgetgel
10-16-2010, 07:13 PM
Off topic, but is there a way to have a batch file or something check the versions of the local scripts all at once?
Well, there's a way to do so... it's just annoying.
You'd need to create a script that checks the update functions of all scripts whose status you want to check.
tgetgel
10-18-2010, 02:28 PM
As far as tgetgel's request, I'll post mine.
--Cieka
Thanks, Cieka. I compared db files and found that the ultra rates, iotms, ascension rewards, etc (the most valuable stuff) is generally the same. There are hundreds of other items that are distinct between the inventories. One of my characters has 376 items that are not in Cieka's db; as yet they are uncategorized, so they must not be 'valuable stuff'. ;) Looks like I have more work to do on my list before I post it.
Banana Lord
11-12-2010, 04:34 AM
When calling OCD from another script (via cli_execute) the script doesn't seem to have been autoselling any of my items (despite showing "132 items to autosell") lately (though my daily profit records indicate that it may have done so sporadically, and it certainly has done in previous versions). It gets to mallselling, then stops. Calling the script manually seems to work perfectly (though that could be because it only works on a second running?) Running the latest daily build etcetera etcetera.
Total sale price = 55,611
Transferring items to store (request 1 of 3)...
Items offered up for sale.
Transferring items to store (request 2 of 3)...
_version_BaleOCDrelay => 1.25
Items offered up for sale.
Transferring items to store (request 3 of 3)...
Items offered up for sale.
Unexpected error, debug log printed.
EDIT: Oh and if the debug log'd help let me know.
I wouldn't know how to read the debug log, but maybe someone else could decipher it for me if you posted it here.
I've never called it from another script using cli_execute. I call it from another script using import. That's a much saner way to do things. Please check main() for how to call it. The boolean parameter informs the script if it should stop execution if it finds unknown items. (Sometimes it's nice to know that there won't be any prompts to halt execution.)
Banana Lord
11-12-2010, 04:43 AM
A quick tutorial (or a helpful link) on using import properly would be like an early Christmas present :D
Remind me, is there some dire warning about not posting debug logs publicly because it contains your password hash? Or is that something else? I just get a weird tickling at the back of my skull when I go to upload one.
Veracity
11-12-2010, 04:46 AM
Your password hash is only valid for a particular session; it is different every time you log in. It cannot be back-engineered to find your password.
In other words, it's not a problem if your log contains it.
Banana Lord
11-12-2010, 04:50 AM
Thanks Veracity! :-)
3764
A quick tutorial (or a helpful link) on using import properly would be like an early Christmas present :D
As always I am glad to refer people to the KoLmafia wiki: import (http://wiki.kolmafia.us/index.php?title=Import)
Here's some information specific to using it with this script. At the top of your script you use the line
import "OCD Inventory Control.ash";
Where you want to use the script, you invoke it with
ocd_control(true);
Or if you want to ensure that it will execute without a troublesome confirmation prompt upon finding unknown inventory:
ocd_control(false);
Banana Lord
11-12-2010, 04:58 AM
Brilliant! Thanks!
Incidentally, one other question. What app do you use to script in? I use TextWrangler (Mac), but I don't know of any way of getting it to colourise code the way yours is.
heeheehee
11-12-2010, 05:06 AM
I recall this (http://kolmafia.us/showthread.php?4185-syntax-highlighting-for-TextWrangler) being around for TextWrangler. I've never personally used it, though.
Brilliant! Thanks!
Incidentally, one other question. What app do you use to script in? I use TextWrangler (Mac), but I don't know of any way of getting it to colourise code the way yours is.
Your comment seems to be a non-sequitor since I never showed you a screenshot of my application, but FYI I use notepad++
Theraze
11-12-2010, 05:18 AM
In your post above (#220), the import segment is colourized. I think that's what is being referred to...
Banana Lord
11-12-2010, 05:21 AM
Hmm. Downloaded that plist, and put it in the relevant folder, but I'm not seeing any changes to how my scripts look. Do I need to enable anything? I've hunted through preferences and the menus for anything that might apply it, but the closest thing I found was a "check syntax" option which was already checked.
@Bale: Oh sorry for the confusion, I just meant that when you (and others) post in the forums its always in helpful colours. Since you post that way so consistently I assumed your app had something to do with it. Aside from that, I figured that if your app wasn't responsible, then the colourisation must be performed automatically by the forums. If the forums are capable of displaying code in that way then it didn't seem too unreasonable to assume that at least some of the various apps used for coding would have similar functionality.
Winterbay
11-12-2010, 05:23 AM
Hmm. Downloaded that plist, and put it in the relevant folder, but I'm not seeing any changes to how my scripts look. Do I need to enable anything? I've hunted through preferences and the menus for anything that might apply it, but the closest thing I found was a "check syntax" option which was already checked.
@Bale: Oh sorry for the confusion, I just meant that when you (and others) post in the forums its always in helpful colours. Since you post that way so consistently I assumed your app had something to do with it. Aside from that, I figured that if your app wasn't responsible, then the colourisation must be performed automatically by the forums. If the forums are capable of displaying code in that way then it didn't seem too unreasonable to assume that at least some of the various apps used for coding would have similar functionality.
Instead of CODE-blocks use PHP-blocks and you'll get the nice colours. I found this out by doing a quote on a post with such code in it :)
Banana Lord
11-12-2010, 05:27 AM
if(have_equipped($item[time helmet]) == FALSE) print("You need a hat!");
Sorry, I just had to try that out :D
coaster3000
11-13-2010, 11:51 PM
I would just love to say that this is the best script i have ever seen... So far. I love it 100% completely!!! took a while to set up though for my database XD but its awesome! Thanks Bale!!!
Banana Lord
11-14-2010, 12:03 AM
I was thinking about this the other day and it seemed to me to be the number one 'complaint' people have with this script. Perhaps you could include an option to load a default database? There are a huge number of items that 95% of people will want to do the same thing with and that in 99% of cases would be no great loss to anyone if they were mishandled, and it might speed things up to have suitable actions preconfigured for those (a simple cmd+F search in the relay display would allow users to remove items they collect etc. before running the script). More advanced logic could be added to check for items which seem low in intrinsic value, but which are probably valuable to a specific user (ie: 10,000 bottles of gin probably indicates a collection).
Theraze
11-14-2010, 12:11 AM
That's not very OCD of you...
coaster3000
11-14-2010, 12:12 AM
yike i hit something i don't like and it hit me hard. The mall sell on my clovers went at least 500 meats below price. Which i really did not like there... Checking out code and it seems to be just a historical data out of date. Can you implement a zlib variable for using historical and regular price?? i use it on my price script.. sort of well its not for prices though its for doing 2 different ways of doing things. instead of one way. It should be easy to implement...
for a first launch of script checks for a zlib variable that of your choice...
and have it as a boolean variable. Do the .to_boolean() thing when checking. variable can be like
if(ocd_hystiricalcheck){
//Do some hystirical pricing instead
else
//do some regular mall get pricing...
Its fairly simple if you check out my outfit script it should have it. and you should see it right away at the top for default set.. and you may see the variable get checked throughout the script.. its just i never knew about the .to_boolean() sooo. my script should get updated now to a simpler code but it still will work the same exact. Thanks again this is a great script...
BRB i will get back to that later something is going on in my house that i have to check
Banana Lord
11-14-2010, 12:16 AM
@Theraze: Haha. Depends how you look at it... ;-)
I was thinking about this the other day and it seemed to me to be the number one 'complaint' people have with this script. Perhaps you could include an option to load a default database? There are a huge number of items that 95% of people will want to do the same thing with and that in 99% of cases would be no great loss to anyone if they were mishandled, and it might speed things up to have suitable actions preconfigured for those (a simple cmd+F search in the relay display would allow users to remove items they collect etc. before running the script). More advanced logic could be added to check for items which seem low in intrinsic value, but which are probably valuable to a specific user (ie: 10,000 bottles of gin probably indicates a collection).
I think that it might be nice for you to post such a database here for other users to copy, but I don't think I should do that. Would you like to write a script that checks someone's inventory and display case to configure OCD? It might be an interesting script, but it offends my OCD to think that such a solution would be satisfying so I don't intend to do that.
yike i hit something i don't like and it hit me hard. The mall sell on my clovers went at least 500 meats below price. Which i really did not like there... Checking out code and it seems to be just a historical data out of date. Can you implement a zlib variable for using historical and regular price?? i use it on my price script.. sort of well its not for prices though its for doing 2 different ways of doing things. instead of one way. It should be easy to implement...
Right now, the script checks the age of the historical price. If it is over 1 day old it will check for a current mall price. Considering the inherent inaccuracy of mall_price() that seems plenty good enough for me. This is just the sort of problem you're likely to have with a script that automatically prices for you. A better solution would be for me to add an option to add items to your store at max price and let you manually reprice them.
coaster3000
11-14-2010, 01:31 PM
I think that it might be nice for you to post such a database here for other users to copy, but I don't think I should do that. Would you like to write a script that checks someone's inventory and display case to configure OCD? It might be an interesting script, but it offends my OCD to think that such a solution would be satisfying so I don't intend to do that.
Right now, the script checks the age of the historical price. If it is over 1 day old it will check for a current mall price. Considering the inherent inaccuracy of mall_price() that seems plenty good enough for me. This is just the sort of problem you're likely to have with a script that automatically prices for you. A better solution would be for me to add an option to add items to your store at max price and let you manually reprice them.
Yes that might be a lot better. Thanks. You are right about repricing scripts. It would be a problem there. Another idea would be that it prices above it slightly but ehh not needed. Just an option for max pricing ;) Thanks again bale happy scripting.
Just an option for max pricing ;)
Granted. You'll want to update both the OCD Control and the relay db Manager. The new option is on the configuration tab of the relay's db Manager.
coaster3000
11-15-2010, 11:03 PM
The latest version of the scripts fails to save the option for max price :| don't know why
This is the relay script. It does not adjust the save properly can you check it i have no leads on the cause... i dont know relay scripting...
write("</td></tr><tr><td align=right>Empty Closet First: </td><td>");
vars["BaleOCD_EmptyCloset"] = write_radio(vars["BaleOCD_EmptyCloset"], "EmptyCloset", "Never,", -1);
write_radio(vars["BaleOCD_EmptyCloset"], "EmptyCloset", "Only once per ascension,", 0);
write_radio(vars["BaleOCD_EmptyCloset"], "EmptyCloset", "Every time.", 1);
write("</td></tr><tr><td align=right>Automatic Pricing: </td><td>");
vars["BaleOCD_EmptyCloset"] = write_radio(vars["BaleOCD_EmptyCloset"], "Pricing", "Automatic,", "auto");
write_radio(vars["BaleOCD_EmptyCloset"], "Pricing", "999,999,999 meat.", "max");
Its got a duplicate entry that means your empty closet variable is messed upt oo....
lines
491 - 497
I fixed it and i made a patch. using turtoise SVN thing.. here is the .patch file.
THIS PATCH FILE IS FOR BALE ONLY... it is not meant for anyone to use without his permission. I am just providing a fix for him.. ITS NOT IN ANY WAY OFFICIAL
Sorry. I made a copy-paste error. Fixed it and updated first post.
If you compare versions I'm sure you'll understand how I messed it up.
Edit: It seems that coaster3000 didn't need any help figuring it out. He edited his post just as I was posting this.
coaster3000
11-15-2010, 11:22 PM
Wow a tie for the fix we both fixed it as a tie haha... :D
Morgoth1145
11-17-2010, 04:17 PM
Glancing at this thread, it looks like this script will be incredibly useful. However, without actually reading the entire thread (it is 24 pages long), I'm not 100% sure of what the features are.
Now, I did download it and plan to use it, and in said use I'm sure that I'll find out what the features are, but it might be useful to have, in the first post, a list of the features that is edited as the features are edited.
Also, does the script check for updates automatically? 'cause people (like me) who probably won't be obsessively checking this thread could very well miss an update (or two or ten). If it does, awesome, but that'd be one of the benefits of the feature list in the first post, I'd not have to dig through 24 pages of thread to find the answer.
Yes it checks for updates.
The best way to see its features is just to take a look at what the relay script is asking you. It will enable you to go through all your inventory and tell the script how much to keep in inventory of each item plus how to dispose of the extra.
If you run the Inventory Control script with unknown items in your inventory, it will prompt you to continue or abort so that you can run the relay script to tell it what to do with those unknowns.
Here are some screenshots of the relay script. They should pretty clearly spell out a lot of the features. The first screenshot indicates all features. The following screenshots merely show how a few of them are used.
http://b.imagehost.org/0307/OCD01.png (http://b.imagehost.org/view/0307/OCD01)
Note that anything in the above image with 0 items do not even have a tab in the screenshots below. That's a feature to reduce clutter. There will be a tab if I add any items to those categories.
http://d.imagehost.org/0866/OCD02.png (http://d.imagehost.org/view/0866/OCD02)
(information continued in the next post since this forum limits the number of images in a single post.)
http://b.imagehost.org/0730/OCD03.png (http://b.imagehost.org/view/0730/OCD03)
http://d.imagehost.org/0773/OCD04.png (http://d.imagehost.org/view/0773/OCD04)
http://d.imagehost.org/0319/OCD05.png (http://d.imagehost.org/view/0319/OCD05)
Morgoth1145
11-17-2010, 11:23 PM
Aye, that is the best way to see what it does, I was just suggesting that that be added to the first post. (I would have seen that screen already, but it glitched when I tried to run the script on my laptop, so I'll do some troubleshooting later.)
Edit: Or, since there's an image limit per post, links to those two posts. That'd work too.
coaster3000
11-17-2010, 11:28 PM
Glancing at this thread, it looks like this script will be incredibly useful. However, without actually reading the entire thread (it is 24 pages long), I'm not 100% sure of what the features are.
Now, I did download it and plan to use it, and in said use I'm sure that I'll find out what the features are, but it might be useful to have, in the first post, a list of the features that is edited as the features are edited.
Also, does the script check for updates automatically? 'cause people (like me) who probably won't be obsessively checking this thread could very well miss an update (or two or ten). If it does, awesome, but that'd be one of the benefits of the feature list in the first post, I'd not have to dig through 24 pages of thread to find the answer.
It is impossible for a script file to auto update its own script file but it can check for updates. Other then that not being able to auto update. there is one part of the script that is always possible to auto update and that would be its data files. the databases like structured files on all info about game and such or even just settings...
Auto Update Data topic (http://kolmafia.us/showthread.php?1515-Make-your-scripts-automatically-update-their-data-files!)
It may be possible and i don't know so don't just take my word on it... I am not entirely 100% sure
That would be interesting for you to look at if you want auto update files..
Morgoth1145
11-18-2010, 12:34 AM
Okay, so, I got it working. Kinda. As in, I'm not getting errors, not as in actually working.
So the inventory control says "Don't run this until you break the prism", like it should. And zlib is working now (I'm not getting an annoying error about a desert bus pass), but the relay script doesn't do anything. Not a single sole "Hi!" or anything.
Now, since I've never run the script before, is it looking for something that hasn't been created? That's my only guess, but something's obviously not quite working. I'd look at the .ash, but I've never done anything with .ash files ever before, so that probably wouldn't help much.
I suspect your problem is one of these two steps:
Download relay_OCD_dB_Manager to your /relay directory.
Invoke OCD dB Manager from your relay browser's top menu.
A relay script is called from within the relay browser and needs to be in the /relay directory.
Morgoth1145
11-18-2010, 02:47 AM
I suspect your problem is one of these two steps:
A relay script is called from within the relay browser and needs to be in the /relay directory.
Oh, wow. I'm blind, sorry. And normally I'm one of the *good* people when it comes to reading instructions...
It can happen to anyone when they already think they know how something works. No big deal.
lostcalpolydude
11-20-2010, 11:05 AM
I just grabbed this script and decided to start categorizing some stuff that's in my inventory mid-run. I got to yeti fur, which I would normally convert to hippopotamus skins before autoselling (to go from 92 to 98 meat each). I realize it's a special case that might not fit in well with everything else, but hopefully someone has an elegant idea for how to add it.
I spend a few hours classifying things in my inventory yesterday, using a mix of personal preferences and PriceAdvisor advices. I'll finally be using this script regularly - and I wanted to join the chorus of grateful users.
My store is now loaded with items (some of which I never even heard about - damn you, Heap diving), and I was generally satisfied with OCD using mall_price() for pricing items.
To help out people who, like me, have 1000+ unclassified items in their inventory, I'm posting the result of my classification. I'll let people find the best way to merge my data with theirs, and advise them to carefully go over every entry to check for things they would have done differently.
I think there were a couple of special cases, specifically items that have to be multi-used to yield something useful (duct tape, mummy wrappings...). I'll leave it up to Bale if he wants to play around with the script some more to account for those.
EDIT: updated 4/4/11
I think there were a couple of special cases, specifically items that have to be multi-used to yield something useful (duct tape, mummy wrappings...). I'll leave it up to Bale if he wants to play around with the script some more to account for those.
Multi-use items have already been dealt with. Put those on the create tab and say what you want the item to be turned into. Not the use tab.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.