EatDrink.ash: Optimize your daily diet (and see how your old diet stacks up).

Theraze

Active member
I wasn't complaining, just stating the fact that I know nothing about the new challenge path and can't implement accurately until I have more information. The M_P info was all mafia based, but your info suggested that there was an actual change to the script needed. You didn't state that it was unspaded, just that it existed for one of the classes.

Anyways, we'll implement it whenever the skill is spaded. At that point we can, as I suggested and you confirmed, simply use have_skill to detect it. We just need to know what exactly that means.
 

Cool12309

Member
I'm not sure if this has been mentioned, but fleetwood mac 'n' cheese (and maybe others) need to be added to the nonoodles blacklist in order to get the Spaghettiose trophy (10 days of Carboloading).
 

Theraze

Active member
Mmm... no. But if fleetwood macaroni are also a bad ingredient, we can skip them.

We block ingredients, not specific recipes. If you have specific bad ingredients, let us know.
 

Cool12309

Member
On line 1892:

Code:
if ($items[carob chunk noodles, dry noodles, evil noodles, savory dry noodles, spaghetti breakfast, fleetwood mac 'n' cheese] contains it) badnoodles = true;

Notice the spaghetti breakfast, which is a specific food. I added fleetwood mac 'n' cheese and it skipped over it just fine.
 

Theraze

Active member
Fine. You do it your way. I'll do it the way that's consistent with everything else. Items that either are ingredients or do not have any ingredients belong on that list. Items that have ingredients belong on the list I requested information about.

I'll add it to the SVN once someone gives me the information I requested. Otherwise, it's apparently fine because nobody's giving me the consistent requested info. Yay.
 
If it's that important that the list contain only items that have no ingredients, adding fleetwood macaroni will solve the issue. The only use it has is for creating fleetwood mac 'n' cheese, and it is not edible by itself. It is created by pulverizing the fleetwood chain, which I assume does not count as being an ingredient.
 

Theraze

Active member
As the macaroni is not consumable, it won't end up on the first line, only the second. Okay then. Should be committed in the next few minutes.

Edit: To make things clearer, I've removed the inedible noodles from the first line.
Code:
           if ($items[carob chunk noodles, spaghetti breakfast] contains it) badnoodles = true;
           foreach ing in get_ingredients(it) if ($items[dry noodles, evil noodles, savory dry noodles, fleetwood macaroni] contains ing) badnoodles = true;

Edit2: Well, whenever SF stops being a jerk and lets me commit.
 
Last edited:

edgy

Member
FYI The special pricing rules for tiny plastic sword drinks will fail to recognize skewered fruit as the source of a TPS. I order to fix, a check for skewered fruit needs to be added to the following code in special_prices() (line 626-662):
Code:
  boolean checked = false;
  if (it == $item[bodyslam] && (TPS || (item_amount(it) > 0)[B] || (item_amount($item[skewered lime]) > 0)[/B]))
  {
    price1 = mall_price($item[bottle of tequila]);
    price2 = mall_price($item[lime]); 
    checked = true;
  }
  if (it == $item[cherry bomb] && (TPS || (item_amount(it) > 0)[B] || (item_amount($item[skewered cherry]) > 0)[/B]))
  {
    price1 = mall_price($item[bottle of whiskey]);
    price2 = mall_price($item[cherry]);
    checked = true;
  }
  if (it == $item[dirty martini] && (TPS || (item_amount(it) > 0)[B] || (item_amount($item[skewered jumbo olive]) > 0)[/B]))
  {
    price1 = mall_price($item[bottle of gin]);
    price2 = mall_price($item[jumbo olive]); 
    checked = true;
  }
  if (it == $item[grogtini] && (TPS || (item_amount(it) > 0)[B] || (item_amount($item[skewered lime]) > 0)[/B]))
  {
    price1 = mall_price($item[bottle of rum]);
    price2 = mall_price($item[lime]);
    checked = true;
  }
  if (it == $item[sangria del diablo] && (TPS || (item_amount(it) > 0)[B] || (item_amount($item[skewered cherry]) > 0)[/B]))
  {
    price1 = mall_price($item[boxed wine]);
    price2 = mall_price($item[cherry]);
    checked = true;
  }
  if (it == $item[vesper] && (TPS || (item_amount(it) > 0)[B] || (item_amount($item[skewered jumbo olive]) > 0)[/B]))
  {
    price1 = mall_price($item[bottle of vodka]);
    price2 = mall_price($item[jumbo olive]);
    checked = true;
  }
 

Theraze

Active member
Kind of (regarding that being the best fix)? That does run the risk of possibly buying a TPS from the mall if you've modified the script for faster execution, but I suppose when people take out safeguards, they run those risks...
 

stumpsmcgee

New member
Is there any chance you would add ancestral recall to this script.
I was also wondering if this script properly took into account the foods/booze that removes fullness/drunkeness/spleen?

At the beginning of last month when bacon farming was hugely profitable I am pretty sure that extra greasy sliders and such would have been profitable for me, and I know that even now ancestral recall is profitable for me as long as bacon stays near 1k.
 

Theraze

Active member
Ancestral recall isn't ingestion of any sort, though an item is used.

If you can defend why it's eating/drinking/chewing, I'll add it though. If it's just "but I don't want to have a wrapper script, after adventure script, before battle script, or login script" then... your chances aren't great. :)
 

Bale

Minion
Feature creep is scary. It was a while until chocolates were accepted as a form of consumption for this script to handle. (I posted the original code that prompted its inclusion here.)

There are two notable differences between ancestral recall and chocolates.
  • There are multiple types of chocolates for this script to compare the mall prices. There is only one blue mana so it would be fairly trivial to make a separate script for its use.
  • Blue mana can only be used if the player has the skill ancestral recall.

I can understand why someone might think that these two differences might put this feature creep beyond the scope of this script. I'm personally not sure if it belongs here or not, so I'm content to let the script maintainer make that decision.
 
Last edited:

Theraze

Active member
There are lots of forms of limited/day turngen which you can put into your login script.

As Bale says, feature creep. Arguments for and against.
As I said, convince me that it's somehow eating/drinking/chewing and should be in the script. I don't object to adding code I'll never use or be able to debug or test. I do object to feature creep for laziness sake.
 

xKiv

Active member
I also suspect that the script would 99% of the time find out that spending a blue mana on +3 adventures is a net loss, because most people don't set VoA > 3300.
 

Bale

Minion
RotfLol!

Every now and then I do the Nemesis quest, just for fun and memories. I wasn't expecting this:

Nemesis Quest
Fight your nemesis in the nemesis cave.
Do nemesis caves just get rented out on a time-share nemesis basis?
For the month of june, you'll be rueing the day! What? I paid how much?

In part that was funny because it was so unexpected, but it's still great.
 

Theraze

Active member
EatDrink should hopefully now handle NA properly. If I understand how it works, it's just smaller organs (which we get from mafia directly, so no changes required), bonus adventures applying to all food/drink when you have the skill (which we will probably get from mafia, but if they aren't taken into account, let me know and I'll add an override), and nothing larger than 1 allowed. That final item should be set, and hopefully that concludes changes required for NA. Hopefully. :)
 

ArlonCarol

New member
Hey, sorry if this has been asked before but I couldn't find anything about it in the comments and I can't seem to find it in searches.

Is there a way to include EatDrink.ash in my own script but suppress the foodMax, drinkMax, etc. prompts?
 

fronobulax

Developer
Staff member
You mean like this?

import <EatDrink.ash>
SIM_CONSUME = false;
eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), FALSE);

It suppresses the prompts, by providing values. It does not simulate and consumes to the respective maximums without overdrinking. You may get prompts about without milk or without ode depending on KoLmafia settings.
 
Top