I had completely forgot about this, but here is my version of the script. I took Bale's version from post 16, and the script now prints in the gCLI a CLI command for you to copy/paste, like this:
I found it was a convenient way for the script to help with consumption without fully automating the process (with those prices, I think most users would want a little bit of control).
Here it is:
Code:
(...)
Have NOT consumed Extra-slimy Slimosa, which you can purchase for 39000 meat.
Have NOT consumed Candicaine, which you can purchase for 55000 meat.
Have NOT consumed Sazuruk-hai, which you can purchase for 77776 meat.
You have yet to drink 3 of the drinks the spirit medium can produce.
buy 1 Extra-slimy Slimosa; drink 1 Extra-slimy Slimosa; buy 1 Candicaine; drink 1 Candicaine; buy 1 Sazuruk-hai; drink 1 Sazuruk-hai;
Here it is:
PHP:
#
# Happy Medium Drink Checker
#
# V 0.01 4/25/2012 by Ethelred. Modified by ereinion and Bale
#
void main() {
item it;
boolean [item] consumed;
item [int] missing;
boolean [item] possess;
string exec;
int drunk_left = inebriety_limit() - my_inebriety();
string consumables = visit_url("showconsumption.php");
for i from 5573 to 5638 {
it = to_item( i );
if( !contains_text(consumables, ">" + to_string( it ) + "<" )) {
if(item_amount( it ) > 0)
possess [it] = true;
else
missing [count(missing)] = it;
} else consumed [it] = true;
}
if (count(consumed) == 66) {
print( "You have drunk all the drinks the spirit medium can produce!", "blue");
} else {
foreach i in consumed
{
print("Already drunk: "+i, "green");
}
foreach i in possess
{
if ( drunk_left >= i.inebriety )
{
drunk_left -= i.inebriety;
exec += "drink 1 " + i + "; ";
}
print( "Have NOT consumed " + i + ", of which you have " + item_amount( i ) + " in your inventory.", "#FBB117");
}
sort missing by mall_price(value);
foreach n,i in missing
{
if ( drunk_left >= i.inebriety )
{
drunk_left -= i.inebriety;
exec += "buy 1 " + i + "; drink 1 " + i + "; ";
}
print( "Have NOT consumed " + i + ", which you can purchase for "+ mall_price(i) +" meat.", "red");
}
print(" ");
print("You have yet to drink " + to_string(66 - count(consumed)) + " of the drinks the spirit medium can produce.", "blue");
print(" ");
print( exec );
}
}