2CRS Catsup/Ketchup eating script

2CRS Catsup/Ketchup eating script (now drinks tea too)

Nobody asked for it, nobody wanted it. I just got bored and decided to try something to aid me in learning to script in ash while aiding me in one of the more tedious parts of my day.

I made a silly little script that determines if you have Catsup or Ketchup of EPIC quality in the Hermit (based on the data spaded so far) and fills up the remainder of your fullness with them. Other things it does:
- Buys, unclosets, or (if you have the option enabled (Default: OFF)) pulls a hermit permit if you don't have one
- Estimates the cost to get enough worthless items to fill you up, quits if you are too poor (Can be set to Ignore Estimate and eat until poor (Default: OFF))
- "smart" fishes to get enough worthless items
- Wishes for Got Milk (if you have this set in script (Default: ON))
- Quits if it can not maintain Got Milk (if this is set in the script (Default: ON))
- If you are in a path that has the cheaper "cup of lukewarm tea" it will forgo all hermit and worthless item interaction and eat that instead.



DISCLAIMER: All Catsup/Ketchup eaten by this script is Heinz.

Path/class combos:
CATSUP or KETCHUP:
Accordion Thief / Packrat
Disco Bandit / Blender
Disco Bandit / Marmot
Pastamancer / Blender
Sauceror / Mongoose
Seal Clubber / Marmot
Seal Clubber / Opossum
Seal Clubber / Platypus
Seal Clubber / Packrat
Seal Clubber / Wallaby
Turtle Tamer / Marmot
Turtle Tamer / Mongoose
Turtle Tamer / Opossum

Turtle Tamer / Packrat

TEA DRINKERS:
Accordion Thief / Blender
Accordion Thief / Opossum
Pastamancer / Wombat
Sauceror / Platypus
Turtle Tamer / Platypus
 

Attachments

  • CatsupDining.ash
    9.5 KB · Views: 75
Last edited:

heeheehee

Developer
Staff member
A few observations:

1) Your configurable variables could just as easily be booleans (true / false), which would mean that you don't need fancy switch statements. e.g.
Code:
        switch (PullPermit) {
                case 1:         print ("-  Pulling permit from Hagnk's as a last resort", 'green');             break;
                case 0:         print ("-  Never pull permit from Hagnk's", 'green');                           break;
                default:        print ("-  I have no idea what "+PullPermit+" is. Defaulting to not pulling permit from Hagnk.", 'orange');     int PullPermit = 0;
        }
could be rewritten as
Code:
if (PullPermit) {
  print ("-  Pulling permit from Hagnk's as a last resort", 'green');
} else {
  print ("-  Never pull permit from Hagnk's", 'green');
}

2) Mafia has fairly robust support baked into retrieve_item() for automatically acquiring worthless items, as part of purchasing hermit items. Just "acquire 10 ketchup" (or, since you're using ASH, retrieve_item(10, $item[ketchup])) will automatically do the right thing, closeting worthless items and all.
2a) On that note, you don't need to closet extra copies of non-worthless items.

3) This is a pretty funny script, thanks for sharing. I wonder how many other 2CRS epics are cheaply NPC-acquireable. General store has pickled egg, lukewarm tea, fortune cookie; hermitage also has hot buttered roll; mugcake, urinal cake from gift shop -- heck, all-purpose flower means soda bread is also an option, if you're willing to use that much meat up front.
 
A few observations:
1) Your configurable variables could just as easily be booleans (true / false), which would mean that you don't need fancy switch statements. e.g.
You are right for the script as it is this would be more straight forward. This is one of my personal foibles, there are 2 reasons why I did it this way.

1) It is expandable. If I were to add a WishForMilk=2 option that will use all but your last wish, it takes less of a rewrite.

2) I've been writing command line tool scripts for our implementation, service, and helpdesk departments for nearly a decade in Bash and Tcl (both different from ash), over this time I have developed a severe aversion to multi-character user inputs where absolutely not required. I've spend to much time fixing "problems" and "bugs" caused by fat fingering, wrong inputs, pluralization, illegal characters, etc. While I know most users aren't stupid, I've found it best for my sanity to assume that they are. Single digit numbers are nearly the simplest you can get. I know that sounds bad, but I'm just being honest.

2) Mafia has fairly robust support baked into retrieve_item() for automatically acquiring worthless items, as part of purchasing hermit items. Just "acquire 10 ketchup" (or, since you're using ASH, retrieve_item(10, $item[ketchup])) will automatically do the right thing, closeting worthless items and all.


Q_Q but I spent so long getting it just right....lol.
I do have one thing up on it though. This morning I'd reordered my checks so that if I can not maintain Got Milk (and you require it) the script does not keep buying. (The one attached to the main post will buy 1 before quitting)

2a) On that note, you don't need to closet extra copies of non-worthless items.

Thank you! It seems I misread this (though rereading it now it seems as clear as day!). I commented out the closeting checks in the newest version, so that should streamline it more.

3) This is a pretty funny script, thanks for sharing. I wonder how many other 2CRS epics are cheaply NPC-acquireable. General store has pickled egg, lukewarm tea, fortune cookie; hermitage also has hot buttered roll; mugcake, urinal cake from gift shop -- heck, all-purpose flower means soda bread is also an option, if you're willing to use that much meat up front.

Thank You! It was a fun exercise. I fell well short of the mark that I wanted to get it to, I wanted to read in all the spaded data and select from there, but I settled for doing just this small piece of it.

I looked into the Buttered roll, fortune cookie, and pickled eggs (because they are instantly available), and the soda bread (because I use it anyway for my Asdon). Unfortunately none of these are EPIC quality food in the current spaded data. I didn't consider the gift items though....it is a lot of money if meatcar is not available....
 

heeheehee

Developer
Staff member
I didn't consider the gift items though....it is a lot of money if meatcar is not available....

You can just /go gift, even without meatcar... Mafia also recognizes that you can just buy the stuff without having access to the beach.

(just confirmed on a level 1 multi; `acquire mugcake` purchased one from the gift shop for < 20 meat.)
 

heeheehee

Developer
Staff member
also, fwiw, the latest update of ketchup|catsup:
Code:
$ rg '^10[67]\t.*\tEPIC\t' | sort
TCRS_Accordion_Thief_Opossum.txt:106	upside-down ketchup	1	EPIC	
TCRS_Accordion_Thief_Opossum.txt:107	gray mirror catsup	1	EPIC	
TCRS_Accordion_Thief_Packrat.txt:106	fancy ketchup	1	EPIC	Effect: "Rosewater Mark", Effect Duration: 35
[B]TCRS_Disco_Bandit_Blender.txt:106	fancy narrow ketchup	1	EPIC	Effect: "Coldfinger", Effect Duration: 25[/B]
TCRS_Disco_Bandit_Marmot.txt:106	twirling ketchup	1	EPIC	
TCRS_Pastamancer_Blender.txt:106	ketchup	1	EPIC	
TCRS_Pastamancer_Wombat.txt:107	narrow catsup	1	EPIC	
TCRS_Sauceror_Mongoose.txt:106	ketchup	1	EPIC	
TCRS_Seal_Clubber_Opossum.txt:107	catsup	1	EPIC	
TCRS_Seal_Clubber_Packrat.txt:106	jittery ketchup	1	EPIC	
TCRS_Seal_Clubber_Platypus.txt:107	yellow catsup	1	EPIC	
TCRS_Turtle_Tamer_Mongoose.txt:106	ketchup	1	EPIC	
[B]TCRS_Turtle_Tamer_Opossum.txt:107	purple blurry catsup	1	EPIC	[/B]
TCRS_Turtle_Tamer_Packrat.txt:107	catsup	1	EPIC

(similar query yielded nothing for any of the other items.)
 
You can just /go gift, even without meatcar... Mafia also recognizes that you can just buy the stuff without having access to the beach.

(just confirmed on a level 1 multi; `acquire mugcake` purchased one from the gift shop for < 20 meat.)

Interesting. Thanks for this info.


also, fwiw, the latest update of ketchup|catsup:
Code:
...

(similar query yielded nothing for any of the other items.)

Oh neat. Ok I added them to my script. I will try to keep an eye out for changes.



I didn't see any for the mugcakes sadly.
 

heeheehee

Developer
Staff member
With more data in svn, and the addition of lukewarm tea, we also have:
Code:
$ rg '^(47|61|106|107|1200|1201|7032|7033|8195)\t.*\tEPIC\t' | sort
[B]TCRS_Accordion_Thief_Blender.txt:7033	cup of lukewarm tea	1	EPIC	[/B]
TCRS_Accordion_Thief_Opossum.txt:106	upside-down ketchup	1	EPIC	
TCRS_Accordion_Thief_Opossum.txt:107	gray mirror catsup	1	EPIC	
TCRS_Accordion_Thief_Opossum.txt:7033	cup of lukewarm tea	1	EPIC	
TCRS_Accordion_Thief_Packrat.txt:106	fancy ketchup	1	EPIC	Effect: "Rosewater Mark", Effect Duration: 35
TCRS_Disco_Bandit_Blender.txt:106	fancy narrow ketchup	1	EPIC	Effect: "Coldfinger", Effect Duration: 25
TCRS_Disco_Bandit_Marmot.txt:106	twirling ketchup	1	EPIC	
TCRS_Pastamancer_Blender.txt:106	ketchup	1	EPIC	
TCRS_Pastamancer_Wombat.txt:107	narrow catsup	1	EPIC	
TCRS_Pastamancer_Wombat.txt:7033	cup of lukewarm tea	1	EPIC	
TCRS_Sauceror_Mongoose.txt:106	ketchup	1	EPIC	
[B]TCRS_Sauceror_Platypus.txt:7033	mirror lime green spinning cup of lukewarm tea	1	EPIC	[/B]
TCRS_Seal_Clubber_Opossum.txt:107	catsup	1	EPIC	
TCRS_Seal_Clubber_Packrat.txt:106	jittery ketchup	1	EPIC	
TCRS_Seal_Clubber_Platypus.txt:107	yellow catsup	1	EPIC	
TCRS_Turtle_Tamer_Mongoose.txt:106	ketchup	1	EPIC	
TCRS_Turtle_Tamer_Opossum.txt:107	purple blurry catsup	1	EPIC	
TCRS_Turtle_Tamer_Packrat.txt:107	catsup	1	EPIC	
[B]TCRS_Turtle_Tamer_Platypus.txt:107	catsup	1	EPIC	
TCRS_Turtle_Tamer_Platypus.txt:7033	tumbling cup of lukewarm tea	1	EPIC[/B]
(Veracity pointed out the last two. And of course AT Opossum gets a third epic 1-full food...)
 
Ah, You are right!

Code:
TCRS_Accordion_Thief_Blender.txt:7033	cup of lukewarm tea	1	EPIC	
TCRS_Accordion_Thief_Opossum.txt:7033	cup of lukewarm tea	1	EPIC	
TCRS_Pastamancer_Wombat.txt:7033	cup of lukewarm tea	1	EPIC	
TCRS_Sauceror_Platypus.txt:7033	mirror lime green spinning cup of lukewarm tea	1	EPIC

Challenge accepted and complete! Updating main thread now!
 
Added Support for a few more recently spaded paths.

Also added a new user settable feature that will ignore the estimate and eat until you are full or out of money.
 
Top