[8.1+] Sako's "soft" kitchen farming script - new recipe version

Sako

Member
[WORKING VERSION USING KOLMAFIA 8.1]

A script for farming the Knob's Kitchens, that goes easy on player's meat for eating/drinking. I used code and ideas from other scripts found here @ kolmafia... hope you're not feeling ripped.

NECESSARY conditions to run this script:
- Character must have access to the Wok of Ages. Therefore, has to be a Pastamancer level >= 15. (If character doesn't have Transcendental Noodlecraft, the script will only farm noodles and cook stir-fries)
- Character must have a farming outfit and a night outfit, called "kitchenfarm" and "rollover".

Not necessary conditions, but helpful:
- Character should have Pastamastery and Advanced Saucecrafting.
- Character should have ascended under a MUSCLE SIGN, and own a mushroom field in the Degrassi Knoll.
- Character should use a (20 pound) Baby Gravy Fairy.
- Character should have a decent amount of meat to buy stuff (read: MSG).
- Character should own a mall store.
- Character should have a decent moxie value (>30 IIRC) to never get hit in the kitchens, and/or the player must use some kind of HP restorer script.
- Character should have the Dingy Dinghy to buy herbs from the hippy store (this one tricked me a couple times).

The script has little eating and drinking (actually, cooks reagent pasta or pizzas, using items found in the kitchen, and buys 4-5 salty dogs a day). If you want some more effective (but more expensive) food/drink management, you should see Efil's Icy Peak farming script ( http://kolmafia.us/index.php/topic,52.0.html ).

This script also automatically cooks knob sausage chow meins when the dry noodles amount reaches 100, and places them in the mall with undercut price. With a fairly decent itemdrop outfit, this happens every 4-5 days.

Feel free to report bugs/possible optimizations, as this is my first KoLmafia script. Enjoy.

------------
Revision:
- Now the script cooks & eats the right reagent pasta for character's class.
- Creates a chef-in-the-box insterad of buying it... thanks Efilnikufecin.
- Checks & casts Leash if character has it.
- Performs checks and requires buffs only if they're really needed.
- Improved little tidbits everywhere to have the script run more smoothly.

Revision 2:
- Removed the check on the familiar, so it doesn't explode if you don't have a gravy fairy.
- Checks if you have Pastamastery and Saucecrafting, and only casts the owned one (or both)
- If you don't have pastamastery, cooks & eats pizzas instead of reagent pasta (both food that can be made with stuff found in the kitchen)
- Checks Stomach and Liver and eats/drinks the according quantity.
- Checks if you are Muscle sign to handle the mushrooms.

Revision 3:
- Fixed the chow mein recipe. If player has Noodlecraft, kicks stir-fries into chow meins using the wok of ages, and if some adventures remain, farms in the kitchen.
- Added control for level 15 skills to conjure up to 5 reagents and noodles per day.
 

Attachments

  • Kitchen.ash
    12.8 KB · Views: 142
Re: "Soft" kitchen farming

[quote author=Sako link=topic=81.msg263#msg263 date=1145097300]
A script for farming the Knob's Kitchens, that goes easy on player's meat for eating/drinking. I used code and ideas from other scripts found here @ kolmafia... hope you're not feeling ripped.[/quote]

I won't speak for anyone else, but I do not feel ripped. (I haven't checked the script, so I have no clue if anything I have written made its way into it.)

The main idea behind this repository is to share scripts - and ideas. So if I inspired you in any way, I feel privileged to do so.

I would like to think the others that post often here feel the same... But, again, I won't speak for them.
 
Re: "Soft" kitchen farming

[quote author=Sako link=topic=81.msg263#msg263 date=1145097300]
A script for farming the Knob's Kitchens, that goes easy on player's meat for eating/drinking. I used code and ideas from other scripts found here @ kolmafia... hope you're not feeling ripped.
[/quote]
Though you will see in some of my scripts a comment about where a snipet of code came from, it is not required. I just do it because I feal I should.

Another cheaper possible way to go for the chef in the box exploding would be:
Code:
void CheckChef()
  {
  if(have_chef() == false)
    {
    if(item_amount($item[chef-in-the-box]) < 1)
      {
      if(item_amount($item[E-Z Cook Oven™]) < 1)
        buy(1, $item[E-Z Cook Oven™]);
      if(item_amount($item[chef-skull-in-the-box]) < 1)
        {
        if(item_amount($item[nothing-in-the-box]) < 1)
          {
          if(item_amount($item[spring]) < 1)
            buy(1, $item[spring]);
          if(item_amount($item[box]) < 1)
            buy(1, $item[box]);
          create(1, $item[nothing-in-the-box]);
          }
        if(item_amount($item[chef skull]) < 1)
          {
          if(item_amount($item[chef's hat]) < 1)
            buy(1, $item[chef's hat]);
          if(item_amount($item[brainy skull]) < 1)
            {
            if(item_amount($item[disembodied brain]) < 1)
              buy(1, $item[disembodied brain]);
            if(item_amount($item[smart skull]) < 1)
              buy(1, $item[smart skull]);
            create(1, $item[brainy skull]);
            }
          create(1, $item[chef skull]);
          }
        create(1, $item[chef-skull-in-the-box]);
        }
      create(1, $item[chef-in-the-box]);
      }
    use(1, $item[chef-in-the-box]);
    }
  }

That's a clip from the newest version of my ICY peak meat farming script, and instead of buying the whole chef-in-the-box, it only buys whatever pieces are missing and builds one. I noticed you have written in the code for the mushroom fields. Creating items which require meat paste automatically go to the plunger instead of using meat paste in KOLMafia. That, and pieces left over from the explosion are used. Overall, this method will save you even more meat.

Should you decide you want to use this snippet, feal free to copy paste it to your script, and edit as you see fit.

edit: For that matter, all the create calls could be reduced down to create(1, $item[chef-in-the-box]); and let kolmafia do the rest. there really is no need to create the components 1 at a time other than the fact that I am a control freak.
 

Sako

Member
Re: "Soft" kitchen farming

Presto: thanks ^_^ sharing ideas FTW ;D

Efil: thanks a lot, I'll use it in my next revision of the script.
 

Sako

Member
Re: Sako's "soft" kitchen farming script - v3.0

Made another revision of the script, and changed the first post accordingly. Enjoy~
 

laird

New member
Re: "Soft" kitchen farming

Here's some logic that replaces the 'if I've drunk anything, don't drink' with 'if I can drink anything, drink as much as I can', which works better if you stop and re-run the script, or run the script after doing other things.

// If drunkness is 0, cooks & eats, buys booze & drinks
// if (my_inebriety() == 0)

if (have_skill($skill[liver of steel]))
{
drunkenTarget = 20;
}
else
{
drunkenTarget = 15;
}

int toDrink;

toDrink = drunkenTarget / 3;

needDogs = toDrink - item_amount($item[salty dog]);

if(needDogs > 0)
{
buy(needDogs, $item[salty dog]);
}

use(toDrink, $item[salty dog]);

As a second issue, I can't get this script to run ever since KoL changed the chow meins a week or two ago. Has this happened to anyone else?
 

macman104

Member
Re: "Soft" kitchen farming

[quote author=laird link=topic=81.msg1174#msg1174 date=1151149744]As a second issue, I can't get this script to run ever since KoL changed the chow meins a week or two ago. Has this happened to anyone else?[/quote]I would imagine this is because the recepie has changed.
 
Re: Sako's "soft" kitchen farming script - v3.0

[quote author=laird link=topic=81.msg1174#msg1174 date=1151149744]
Here's some logic that replaces the 'if I've drunk anything, don't drink' with 'if I can drink anything, drink as much as I can', which works better if you stop and re-run the script, or run the script after doing other things.[/quote]

Don't you run the risk of over drinking if you rerun the script? That was the whole point behind only having the script drink once, and only if you haven't drunk anything.

At least, that is my take on it....
 

Nightmist

Member
Re: Sako's "soft" kitchen farming script - v3.0

[quote author=Presto Ragu link=topic=81.msg1176#msg1176 date=1151171825]
Don't you run the risk of over drinking if you rerun the script? That was the whole point behind only having the script drink once, and only if you haven't drunk anything.
[/quote]

Assuming you only drink a specific drink and you know the drunkness that drinks and also if you know your maximum drinking you can script it to only drink if you have (In this case) atleast 4 more drunkness before going over (Since its a 3 drunkness booze). Which is what Laird has **done explained (Not done thought, man teach me to post while tired >>)**

Oh and efilnikufecin if your looking for more control over your scripts I would also add a command to check if you have enough meat to make meat paste and then make meat paste then do the create command (Since on default mafia pulls meat paste from closets to create objects unless you disable it). Or if one needs to go to a "paranoid" state then also add the creatable_amount( item) > 0 checks to it (Haha yes shouldnt really be a problem since you do previous checks to buy each part but ^^;; )

**Edit Starts//Ends Here.
 
Re: Sako's "soft" kitchen farming script - v3.0

[quote author=Nightmist link=topic=81.msg1180#msg1180 date=1151202964]
Assuming you only drink a specific drink and you know the drunkness that drinks and also if you know your maximum drinking you can script it to only drink if you have (In this case) atleast 4 more drunkness before going over (Since its a 3 drunkness booze). Which is what Laird has done [/quote]

Um no... According to the snippet of code in the post above, Laird never checks current inebriety. I will grant you the I haven't checked the actual script...

But I would rather not mislead less knowledgable readers into thinking that that snippet of code is worthwhile to prevent you from over drinking if you run the script multiple times.
 

Nightmist

Member
Re: Sako's "soft" kitchen farming script - v3.0

[quote author=Presto Ragu link=topic=81.msg1181#msg1181 date=1151221770]
Um no... According to the snippet of code in the post above, Laird never checks current inebriety. [/quote]

>> Point taken, and post edited. Human error on my part there :-[
 

Sako

Member
Re: Sako's "soft" kitchen farming script - v3.0

The script will be modified as I get to level 15 on this ascension. For now, just remove the cookChows() reference in the main method, and just farm the noodles.

EDIT: is there any way to use the Wok of Ages in mafia as for now?
 

Veracity

Developer
Staff member
Re: Sako's "soft" kitchen farming script - v3.0

[quote author=Sako link=topic=81.msg1183#msg1183 date=1151242692]EDIT: is there any way to use the Wok of Ages in mafia as for now?[/quote]

Version 8.1 (the current one) has all the Wok recipes and will use it if you have the correct ingredients (including dry noodles and MSG) and Wok access (Transcendental Noodlecraft and Mysticality + class). Look on the Create tab of the Item Manager or "create" as usual.
 

Sako

Member
Re: Sako's "soft" kitchen farming script - v3.0

Thanks Veracity ^_^

I finished the working version with the new chow mein recipe. Be sure to use mafia 8.1.
Some features are still untested, post here if you encounter weird behavior.

[EDIT] fixed some stupid mistakes in the script.
 

Sako

Member
Re: Sako's "soft" kitchen farming script - new recipe version

Code:
// Buys herbs from the hippies.
if (item_amount($item[herbs]) < blendNeeded)
{
 cli_execute("outfit filthy hippy disguise");
 buy(blendNeeded - item_amount($item[herbs]), $item[herbs]);
 cli_execute("outfit rollover");
}
Looks like there's a problem with this part, that was supposed to work with earlier versions... I keep getting a "purchase quantity not reached" error, even if I have plenty of meat. What am I doing wrong?
 
Re: Sako's "soft" kitchen farming script - new recipe version

Off hand I would guess that mafia doesn't realize that you are already wearing the filthy hippy disguise...

Do you have enough parts for two disguises? If not, then that is likely your problem.

Even if you do, mafia might balk when trying to put on an outfit while already wearing it....

You might try commenting out the outfit line and seeing if that works.
 

Bishy

New member
Re: Sako's "soft" kitchen farming script - new recipe version

does this help?

[quote author=holatuwol link=topic=246.msg1276#msg1276 date=1151744584]
If you buy herbs, KoLmafia automatically wears the hippy suit, buys the herbs, and switches back to your original outfit.
[/quote]
 
Re: Sako's "soft" kitchen farming script - new recipe version

[quote author=Sako link=topic=81.msg1300#msg1300 date=1151931625]
Code:
// Buys herbs from the hippies.
if (item_amount($item[herbs]) < blendNeeded)
{
  cli_execute("outfit filthy hippy disguise");
  buy(blendNeeded - item_amount($item[herbs]), $item[herbs]);
  cli_execute("outfit rollover");
}
Looks like there's a problem with this part, that was supposed to work with earlier versions... I keep getting a "purchase quantity not reached" error, even if I have plenty of meat. What am I doing wrong?
[/quote]

I know this may sound crazy, but check to see if you have a dingy dinghy.
 

Sako

Member
Re: Sako's "soft" kitchen farming script - new recipe version

[quote author=efilnikufecin link=topic=81.msg1311#msg1311 date=1151962530]
I know this may sound crazy, but check to see if you have a dingy dinghy.
[/quote]
Ok, I'm officially the worst. It was a newly ascended character. Stupid dinghy...

And yeah, works fine without the manual-hippy-equipping, so I'm removing those lines. Thanks everyone.
 
Re: Sako's "soft" kitchen farming script - new recipe version

[quote author=Sako link=topic=81.msg1313#msg1313 date=1152004183]
Ok, I'm officially the worst. It was a newly ascended character. Stupid dinghy...
[/quote]

I spent quite a bit of time thinking about it when the same thing happened to me. I finally decided to log on and manually buy the fruit needed, and that was how I found out. That dinghy is so easily forgotten. Definately doesn't make you the worst.
 
Top