gemelli
Member
I recently entered Bad Moon hell, and to be honest the thing that I find most unsettling is that I can't keep track of how my lucre collection is growing. (Since you can't get to Hagnk's from the relay browser, and Mafia disables storage checking when you're in Bad Moon, this wasn't information I could get to from Mafia.)
Because I'm obsessive-compulsive about the BHH, I wrote a simple ASH script to peek into your inventory and storage, and add up the number of lucre you've currently collected. There are almost certainly more efficient ways to do this, but my time is tight today. Comments welcome!
Because I'm obsessive-compulsive about the BHH, I wrote a simple ASH script to peek into your inventory and storage, and add up the number of lucre you've currently collected. There are almost certainly more efficient ways to do this, but my time is tight today. Comments welcome!
Code:
void main()
{
string storage=visit_url("storage.php");
item lucre=$item["filthy lucre"];
int held_lucre=item_amount(lucre);
int stored_lucre=0;
if(contains_text(storage,"filthy lucre")) {
int startpoint=index_of(storage,"filthy lucre");
string smallstorage=substring(storage,startpoint);
startpoint=index_of(smallstorage,"(");
int endpoint=index_of(smallstorage,")");
string amt_string=substring(smallstorage,startpoint+1,endpoint);
stored_lucre=to_int(amt_string);
}
int total_lucre=stored_lucre+held_lucre;
print("You have "+stored_lucre+" lucre in storage.");
print("You have "+held_lucre+" lucre on hand.");
print("TOTAL: "+total_lucre+" lucre.");
}