Morgoth1145
Member
So, it's not giving the correct options for bejeweled cufflinks. According to The Well-Tempered Anvil (http://anvil.bewarethefgc.com/), it can be pulverized, but I don't have any pulverize option.
Ah. Thanks!
int count_ingredient(item source, item into) {
int total = 0;
foreach key, qty in get_ingredients(into)
if(key == source) total += qty;
else {
if(key == $item[flat dough]) return 0;
total += count_ingredient(source, key);
}
return total;
}
boolean[item] currently_considering; // prevent infinite recursion
// return all the 'to keep' items (and associated quantities) used to craft item itm
int[item] items_to_keep_used( item itm ) {
int[item] to_keep_used;
int[item] ingreds = get_ingredients(itm);
currently_considering[itm] = true ;
foreach ingred in ingreds {
if ( currently_considering[ingred] ) continue ;
if ( keep[ingred] != 0 ) to_keep_used[ingred] += ingreds[ingred];
currently_considering[ingred] = true ;
foreach it,q in items_to_keep_used(ingred) {
if ( currently_considering[it] ) continue ;
to_keep_used[it] += q;
}
remove currently_considering[ingred] ;
}
remove currently_considering[itm] ;
return to_keep_used ;
}
cocoa egg MAKE 0 lucky surprise egg
boolean[item] under_consideration; // prevent infinite recursion
int count_ingredient(item source, item into) {
int total = 0;
under_consideration[into] = true;
foreach key, qty in get_ingredients(into)
if(key == source) total += qty;
else {
if(under_consideration contains key) continue;
under_consideration[key] = true;
total += count_ingredient(source, key);
remove under_consideration[key]
}
remove under_consideration[into]
return total;
}
If you add a key in under_consideration before checking if under_consideration contains that key, the check won't mean much
I may have to upgrade and start running this again. Normally I run this daily in aftercore, but I am now on my 3rd SC run and I have not run it in 10 days or so specifically because I don't want it to sell or dispose of things I need to keep in Hagnk's.After you inform the dB manager in the relay script what items to stock, OCD will keep those items in inventory, even if it would otherwise sell off those items. This means you can keep a stock list separate from OCD's item dispersal information and OCD will integrate the two lists for you.
Whoah. Does this mean this script will now buy things to stock up, rather than simply not selling them? Sweet! I definitely do need to start using this...I'm also adding a feature to deal with expensive items in case someone wants to buy things over the item price limit.
I may have to upgrade and start running this again. Normally I run this daily in aftercore, but I am now on my 3rd SC run and I have not run it in 10 days or so specifically because I don't want it to sell or dispose of things I need to keep in Hagnk's.
Whoah. Does this mean this script will now buy things to stock up, rather than simply not selling them? Sweet! I definitely do need to start using this...
New Version of Bale's OCD Inventory Control Available: 3.44
Upgrade from 3.5 to 3.44 here!
Also Quick question about the stock feature. Lets say I have my OCD currently set to mall after 5 of an item, but since I have hundreds of items under the mall tab I missed fixing it. So missing this one item, lets say I setup stock to acquire 25 of said item. If I run OCD, will stocking said item override the mallsell feature, or will I mall my surplus before/after buying the number I desire, or would I happen to mall sell after making sure I have the requisite number of items?
Hey Bale where in the script can you set StopForMissingItems to be false since its currently stopping my daily scripts. You mention it in the comments but there's no place where's its set.
ashq import <OCD Inventory Control.ash>; ocd_control(false);