ManageStore is not working. I am aware of that and will fix, although not necessarily in the next three days. The code needs to adjust to the changes in the Store/Mall interface.
record mall_item {
item thing;
int price;
int qty;
};
int store_value() {
int value = 0;
int i = 0;
int k;
int l;
mall_item [int] my_mallstore;
string start = "<td valign=\"center\"><b>";
int ss = length(start);
string s2 = "<td align=\"center\"><span class=\"tohide\">";
int ss2 = length(s2);
string page = visit_url("backoffice.php?which=1");
//Skip over a whole bunch of stuff that won't yield, item, price pairs
int j = index_of(page, ">Actions<");
if (j > 0) {
page = substring(page, j);
k = index_of(page, start);
//As long as we think there is one pair, process it without
//checking to see of both parts are there.
while (k > 0) {
l = index_of(page, "</b></td>", k);
my_mallstore[i].thing = to_item(substring(page,k+ss,l));
page = substring(page, l);
k = index_of(page, s2);
l = index_of(page, "</span><input", k);
my_mallstore[i].price = to_int(substring(page,k+ss2,l));
page = substring(page, l);
k = index_of(page, start);
my_mallstore[i].qty = shop_amount(my_mallstore[i].thing);
//print("Item " + my_mallstore[i].thing + " is in the store for " + my_mallstore[i].price + " (" + my_mallstore[i].qty + ")");
i = i + 1;
}
}
for m from 0 to count(my_mallstore)-1
value = value + my_mallstore[m].price * my_mallstore[m].qty;
return value;
}
I'll certainly consider it, but at some point what we really need is to let OCD handle the disposition and use the "is languishing" status to trigger a reminder for the user to reconsider what OCD does.