OCD Inventory control

Sputnik1

Member
Code:
import <OCD Inventory Control.ash>
ocd_control(false);
cli_execute("OCD Inventory Control.ash");
This doesn't seem to work either.
 

Winterbay

Active member
You do not need to use cli_execute() at all. What that does is call the script (the entire one, not just the function you want) which will most likely call ocd_control(true) and not do what you want. Remove that line alltogether and it will work much better.

You either import a script or you run it. Doing both really makes no sense at all.
 

Bale

Minion
NM, I want it to be false, so the StopForMissingItems is always false and never stops the script. I run it daily, without my presence.

You could just do it the way that Winterbay and I are trying to explain...
Or if you really want to edit the script, then... down at the very bottom in main() you'll see this line: int todaysFarming = ocd_control(true);

Change true to false and then you can run it with cli_execute() like you prefer.
 

Bale

Minion
OCD Inventory Control Updated!



I fixed two bugs related to item stocking. If you didn't use the stock part of the script, then it wouldn't effect you.

These bugs caused extra items to accumulate in the closet and in inventory. I'd recommend clearing your stock items out of the closet before running this so it can recheck their quantities. (Just clear out the entire closet and OCD should put everything where it belongs, right.)
 

Bale

Minion
OCD Inventory Control Updated!



Another bug reconciling the OCD portion of the script with the item stock portion of the script. If you didn't use the stock part of the script, then it wouldn't effect you.
 

Jar of Jam

Member
Say, Bale, any chance the relay part of the script will get a sorting function in the foreseeable future ? It would be really great if we could see what are the top items we have an abundance of and such.
 

Bale

Minion
It's not likely to get a sorting function. My html and java skills are poor so that would be tricky for me to implement. Also I don't have a personal interest in the feature so I'm not eager to do something as time consuming as learning how to implement it.
 
I could help with the sorting, if you wanted it. For a site I made a few months ago the tables needed to be sortable, so I looked into the feature and found a free to use javascript file that implemented sorting. I'll go look for the site right now, actually.

Edit: Well, that didn't take long to find. It's a fairly easy to use resource, the only issue that I could see is getting the javascript passed to the browser. I'm not sure how easy KoLMafia makes it to pass .js files, if it's even possible, and if it's not then the entire .js library would need passed in the html, which is ugly. Anyway, here's the site: http://www.kryogenix.org/code/browser/sorttable/

Edit again: Oh, and for anybody interested in my javascript alert issue, turns out that \' works perfectly well for the apostrophe. Turns out I never tried escaping it -_-. I'm still curious as to whether it's possible to get customizable pop-up pages for individual items in the relay browser, though.
 
Last edited:
So I've been using your OCD script for a while now with nothing but praise, but now I can't seem to change a setting. I set malldangerously to true, but it still provides me with the user confirm dialog asking if I would like to abort to categorize the items. Any thoughts?
 
Last edited:

Bale

Minion
My thought is that I do nothing to prevent the pop-up if you set that to true. That setting will cause the script to sell off all uncategorized items, but you'll still get the warning to let you know.

I'm very interested to know that the setting is being used. Can you tell me why you use it and do you really think I should remove the warning when you use it.
 
I just find it easier to keep away the clutter and purchase what I need from the mall as I need it. It's one of the great benefits of softcore after all.
 

Bale

Minion
RealBurgerKing, I'm not doing a full release at the moment, but the attached version should do what you want.

The "thank you" was for telling me clearly why it is good that I still have that option in this script.
 
Last edited:

fronobulax

Developer
Staff member
AFAIK, latest version. It fails to attach the Tailsman o' Nam to the message it sends to wadbot to pulverize. No big deal. There are a few things that don't get pulverized or sent to kbay for me and I'm just making note of them "in case".

Thanks.
 
Top