OCD Inventory control

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.
 
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.
 
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.
 
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?
 
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.
 
Last edited:
Daily hardcore cleanup

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");
}
 
Code:
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.
 
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 and here.

Code:
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"));
 
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?
 
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?
 
Edge HC Daily Inventory Control

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
 
Last edited:
Oh my. That's a lot more than I expected. Just a minor point, but it would be easier to...
Code:
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.
 
jasonharper pretty much created the necessary functionality at my request once.

Code:
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!
 
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.
 
Back
Top