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

dj_d

Member
The newest version of Ascend.ash is in the discussion thread; per that thread, it's awaiting feedback before being "promoted" to a new version.
 

caphector

Member
I'm seeing an issue similar to ammy55's; I'm running the ascend.ash version of the script with some low-meat characters and it'll loop when attempting to buy stuff it can't afford.

Also, you say I can set valueOfAdventure in my vars_* file, but I don't see that variable. Looking at the eatdrink.ash code, I don't see a setvar() for valueOfAdventure. Am I overlooking a way to set this in the vars file?
 

lostcalpolydude

Developer
Staff member
Also, you say I can set valueOfAdventure in my vars_* file, but I don't see that variable. Looking at the eatdrink.ash code, I don't see a setvar() for valueOfAdventure. Am I overlooking a way to set this in the vars file?

valueOfAdventure is a mafia setting. "set valueOfAdventure=X" (filling in your own value for X) will change it.
 

ammy55

New member
the thing is for me its not an item i cant afford its something cheap that i have more money than enough meat for
 

Yousirname

New member
I noticed someone else mention a problem I'm having:
Server www5.kingdomofloathing.com returned a blank page from lair2.php. Complain to Jick, not us.

But I didn't understand the scripting discussion so I don't know if someone mentioned a solution.. I don't think they did. I just started using the script this ascension, and it worked up until today - level 13, 0/15 full, 0/19 drunk, 0/15 spleen.
 

caphector

Member
valueOfAdventure is a mafia setting. "set valueOfAdventure=X" (filling in your own value for X) will change it.

Huh, I thought it was in the vars_ file, like VALUE_OF_PRIME_STAT and VALUE_OF_NONPRIME_STAT, as per the dj_d:

Edit the config file for your character (see zlib for details on how the config file works) and try modifying VALUE_OF_ADVENTURE, VALUE_OF_PRIME_STAT, and VALUE_OF_NONPRIME_STAT.

Was the script changed since that post was made to pull valueOfAdventure from Mafia rather than vars_?
 

tgetgel

Member
Huh, I thought it was in the vars_ file, like VALUE_OF_PRIME_STAT and VALUE_OF_NONPRIME_STAT, as per the dj_d:

Was the script changed since that post was made to pull valueOfAdventure from Mafia rather than vars_?

It was changed a while back. Somewhere in this thread dj_d replied to me that this setting moved from the vars file to the settings. It should be fine to delete valueOfAdventure in the vars file.

edit: Ninja'd by That FN Ninja
 
The way i dealt with it when i had that problem (which i'm sure is not as nice as the way most people on this forum could do it) was:

Code:
boolean needakey = !can_interact() || my_level() < 13 ||!contains_text(visit_url("questlog.php?which=1&pwd"),
"The Final Ultimate Epic Final Conflict") ||  !contains_text(visit_url("lair2.php"),"cave22done.gif");
 

Doctor Rockster

New member
Code:
Starting EatDrink.ash (version 3.0).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from . Per-item budget cap is 12500.0.
Price will not be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 700 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
Pass 1: food.
food: At 0, consuming to 15.
Loading food map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing food to consume.
No food available that's good enough. Moving on.
Pass 2: drink.
drink: At 0, consuming to 19.
Loading drink map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing drink to consume.
No drink available that's good enough. Moving on.
Pass 3: spleen.
spleen: At 0, consuming to 15.
Loading spleen map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing spleen to consume.
No spleen available that's good enough. Moving on.
Pass 4: drink.
Skipping drink.
choc: Checking non-filling crimbo chocolates - all 3 kinds
simulating consumption of one fancy chocolate car.
1: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
simulating consumption of one fancy chocolate car.
2: fancy chocolate car lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:2100
simulating consumption of one fancy chocolate car.
3: fancy chocolate car lev:0 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:700
simulating consumption of one vitachoconutriment capsule.
4: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
simulating consumption of one vitachoconutriment capsule.
5: vitachoconutriment capsule lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:2100
simulating consumption of one vitachoconutriment capsule.
6: vitachoconutriment capsule lev:0 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:700
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 0 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0. Adventures: 18. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.0).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from . Per-item budget cap is 12500.0.
Price will not be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 700 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Simulating only; no purchases or food/drink/spleen consumption.
food: At 0, consuming to 15.
drink: At 0, consuming to 19.
spleen: At 0, consuming to 15.
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
2: fancy chocolate car lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:2100
3: fancy chocolate car lev:0 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:700
4: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
5: vitachoconutriment capsule lev:0 gain:1.0 adv:3.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:2100
6: vitachoconutriment capsule lev:0 gain:1.0 adv:1.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:700
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 0 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0. Adventures: 18. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).


> call scripts\EatDrink.ash

Refreshing stash contents...
Stash list retrieved.
Internal checkpoint created.
Skipping favorites.
Starting EatDrink.ash (version 3.0).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from . Per-item budget cap is 12500.0.
Price will not be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 700 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
Pass 1: food.
food: At 0, consuming to 15.
Loading food map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing food to consume.
No food available that's good enough. Moving on.
Pass 2: drink.
drink: At 0, consuming to 19.
Loading drink map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing drink to consume.
No drink available that's good enough. Moving on.
Pass 3: spleen.
spleen: At 0, consuming to 15.
Loading spleen map from Mafia's datafiles
Filtering by type
Filtering by level
Finding prices
Setting values
Choosing spleen to consume.
No spleen available that's good enough. Moving on.
Pass 4: drink.
Skipping drink.
choc: Checking non-filling crimbo chocolates - all 3 kinds
You have at least one fancy chocolate car in inventory.
Using 1 fancy chocolate car...
You lose 8 hit points
You gain 5 Adventures
Finished using 1 fancy chocolate car.
1: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
You have at least one fancy chocolate car in inventory.
Using 1 fancy chocolate car...
You lose 8 hit points
You gain 3 Adventures
Finished using 1 fancy chocolate car.
2: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
You have at least one fancy chocolate car in inventory.
Using 1 fancy chocolate car...
You lose 8 hit points
You gain 1 Adventure
Finished using 1 fancy chocolate car.
3: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
EatDrink encountered an error: You don't have a vitachoconutriment capsule and you're not able to shop.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and it has a null price, so you can't buy it.
FAIL: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
EatDrink encountered an error: You don't have a vitachoconutriment capsule and you're not able to shop.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and it has a null price, so you can't buy it.
FAIL: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
EatDrink encountered an error: You don't have a vitachoconutriment capsule and you're not able to shop.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and it has a null price, so you can't buy it.
FAIL: vitachoconutriment capsule lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 0 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0. Adventures: 9. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).
******************************************
Now, to recap...
******************************************
Starting EatDrink.ash (version 3.0).
Consuming up to 15 food, 19 booze, and 15 spleen
Considering food from . Per-item budget cap is 12500.0.
Price will not be a factor if you own it already. Hagnk's pulls (if enabled) will cost 3000 meat each.
An adventure has the value of 700 meat. Muscle subpoint is 10.0. Nonprime stat subpoint is 2.0.
food: At 0, consuming to 15.
drink: At 0, consuming to 19.
spleen: At 0, consuming to 15.
choc: Checking non-filling crimbo chocolates - all 3 kinds
1: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
2: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
3: fancy chocolate car lev:0 gain:1.0 adv:5.0 musc:0.0 myst:0.0 mox:0.0 meat:0 own:0 value:3500
EatDrink encountered an error: You don't have a vitachoconutriment capsule and you're not able to shop.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and it has a null price, so you can't buy it.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and you're not able to shop.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and it has a null price, so you can't buy it.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and you're not able to shop.
EatDrink encountered an error: You don't have a vitachoconutriment capsule and it has a null price, so you can't buy it.
Finished. You had -Ode to Booze in effect. Adventures listed above does not reflect that, but this does:
Spent 0 meat. Gained Fullness: 0. Inebriety: 0. Spleen: 0. Adventures: 9. Muscle: 0. Moxie: 0. Mysticality: 0.
Eating, drinking, and spleening complete. Commence merrymaking (at your own discretion).

Any thougts?

This only happens on my multi, who has the same preferences as my main. (I forgot to closet my fancy chocolate cars before running non-sim version to show the null price error :S ... ah well)
 

Bazaaretw

Member
I love this script btw.

One thing I would love even more to see tho, is instead of just a per item budget, is to have a total diet budget. Can we make this happen?
 

dj_d

Member
Bazaaretw: Not in the near future, no, since you would have to model the entire diet to make it fit optimally within budget. And while that's useful to do for a number of reasons, it's also a fair bit of work that probably won't happen for a long time (not least of which is because I personally don't particularly need it).
 

shazbot

Member
So, annoying bug I noticed is that if you have insufficient current MP (but sufficient max mp) to cast ode, it just won't cast it. I would rather it break out or prompt or something so I don't waste a whole bunch of adventures bercuse I only had 47MP. I know that this is the regular behavior of mafia, so it may be out of your control.
 
How do you get it to not go to mall on hardcore? I know it is probably somewhere in this chain but couldn't find it. It was throwing up errors trying to eat creamsicles that I couldn't buy.
 

dj_d

Member
It should avoid the mall automatically if you're in HC. There's a pesky bug here I can't repro since I'm in aftercore, but rerunning the script usually solves it.
 
Top