guzzlr farming script

taltamir

Member
guzzlr.ash

This script is part of the script pack ttpack:
https://kolmafia.us/showthread.php?25048

this page is just for discussing this one script specifically. Check the pack link above for installing the pack. also please note that it will be installing multiple scripts at once and all their dependencies

Automate guzzlr deliveries and potentially starting and then immediately dropping a platinum delivery for the purpose of getting a daily cocktail set
https://kol.coldfront.net/thekolwiki/index.php/Guzzlr_cocktail_set

Script is configurable. Current settings:
Code:
Current settings for guzzlr:
guzzlr_deliverBronze = true
guzzlr_maxMeatCostBronze = 5000
guzzlr_deliverGold = true
guzzlr_maxMeatCostGold = 10000
guzzlr_deliverPlatinum = true
^Platinum will not be taken if you already used your 1 per day abandon
guzzlr_maxMeatCostPlatinum = 15000
^The maximum allowed price for drink crafting ingredient and if needed a dayticket or access items
guzzlr_abandonTooExpensive = true
^When true will automatically abandon deliveries that are too expensive. When false will abort instead
guzzlr_deliverInrun = true
^Set to false to disable doing deliveries during a run
guzzlr_treatCasualAsAftercore = false
guzzlr_treatPostroninAsAftercore = true
guzzlr_abandonPlatinumForcedAftercore = false
^Override all other settings for the purpose of starting the day by taking a platinum delivery and immediately aborting it
guzzlr_abandonPlatinumForcedInrun = false
^Override all other settings for the purpose of starting the day by taking a platinum delivery and immediately aborting it
guzzlr_autoFamiliar = true
^Automatically switch familiar using autoscend code to IOTM familiars that still have items to drop today and when out of that to +item drop familiars
guzzlr_manualFamiliar = false
^Automatically switch to a single manually specified familiar
guzzlr_manualFamiliarChoice = 
^The name of the familiar you want to manually switch to
guzzlr_autoSpade = true
^automatically spade guzzlr into the file /data/guzzlr_autospade.txt

Run from gCLI via:
Code:
guzzlr X
X = adv to spend

To just show the current settings and explanation on what the settings do:
Code:
guzzlr 0

Or you can click on it from the dropdown scripts menu to be asked how many adv you want to spend.

The script will then take guzzlr and perform guzzlr deliveries based on your configuration

Note: You are expected to have set an appropriate mood, ccs, and outfit ahead of time.
 
Last edited:

Magus_Prime

Active member
I ran the script, for the first time, today and got this:

Code:
Search complete.
The access item [one-day ticket to     The Glaciest] is too expensive. abandoning delivery
Encounter:     Guzzlr Client Selection
Submitting option 1 for choice 1412
Encounter:     Guzzlr Client Selection
The access item [one-day     ticket to The Glaciest] is too expensive
Stack trace:
  at     guzzlr_deliverLoop (guzzlr.ash:428)
  at guzzlr_deliver (guzzlr.ash:478)
  at     guzzlr_aftercore (guzzlr.ash:495)
  at main (guzzlr.ash:546)

I don't need a one day ticket as I have the charter.

I ran the script a second time and got this:

Code:
promptAboutCrafting => 0
breakableHandling => 4
choiceAdventureScript     => scripts/autoscend/auto_choice_adv.ash
printStackOnAbort => true
Could     not determine which access item matches the location [none]
Stack     trace:
  at accessItem (guzzlr.ash:202)
  at     guzzlr_deliverLoop (guzzlr.ash:409)
  at guzzlr_deliver (guzzlr.ash:478)
  at     guzzlr_aftercore (guzzlr.ash:495)
  at main (guzzlr.ash:546)
printStackOnAbort     => false
breakableHandling => 1
choiceAdventureScript =>     scripts\CounterChecker.ash
promptAboutCrafting => 1

Current     settings for guzzlr:
guzzlr_deliverBronze =     false
guzzlr_maxMeatCostBronze = 5000
guzzlr_deliverGold     = true
guzzlr_maxMeatCostGold = 10000
guzzlr_deliverPlatinum     = true
^Platinum will not be taken if you already used your 1     per day abandon
guzzlr_maxMeatCostPlatinum = 15000
^The     maximum allowed price for cold wad and if needed a dayticket or access     items
guzzlr_abandonTooExpensive = true
^When     true will automatically abandon deliveries that are too expensive. When     false will abort instead
guzzlr_deliverInrun = false
^Set     to false to disable doing deliveries during a run
guzzlr_treatCasualAsAftercore     = false
guzzlr_treatPostroninAsAftercore =     true
guzzlr_abandonPlatinumForcedAftercore =     false
^Override all other settings for the purpose of starting     the day by taking a platinum delivery and immediately aborting it
guzzlr_abandonPlatinumForcedInrun     = false
^Override all other settings for the purpose of starting     the day by taking a platinum delivery and immediately aborting it

You     can make changes to these settings by typing:
set     [setting_name] = [target]

I expected it to attempt a gold delivery but that didn't happen. There's no Guzzlr quest in the quest log.
 
Last edited:

Magus_Prime

Active member
I just took a look at the script and it assumes that a day pass is required for all platinum deliveries. Wouldn't it be straight-forward to check whether the following are set to "false" before trying to buy a day pass?

Code:
coldAirportAlways
hotAirportAlways
sleazeAirportAlways
spookyAirportAlways
stenchAirportAlways
 

HojoHominygrits

New member
I was delighted to see that someone had posted a Guzzlr script, as I am currently slogging my way through getting all my guzzlrbucks. However, when I attempt to run it this, I get:

Multiple matches for "Spookyraven library key"; using "[7302]Spookyraven library key". (canadv.ash, line 492) Clarify by using one of:
$item[[1764]Spookyraven library key]
$item[[7302]Spookyraven library key]
autoscend/paths/standard.ash could not be found (autoscend.ash, line 63)

I realize these are other scripts that are being called, but I'm clueless about how mafia scripts (or coding in general) work, so I really don't know how to troubleshoot this.
 
Last edited:

Veracity

Developer
It looks like there is a dependency on standard.ash from autoscend.

That needs to be listed in dependencies.txt so that "svn install" will automatically install it. I looked at dependencies.txt and it pulls in all of autoscend.
I don't know why autoscend can't find its own library file.

autoscend should also fix the "friendly warning" about the Spookyraven library key. It's harmless - in this case - but it is preventable via a simple code fix.

This package also pulls in a whole bunch of other scripts that I don't want (they are scripts that do fewer things than I already have, for example). Hard to understand why it needs Ezandora's Spacegate script, for example; why would any script in this pack want to call that? That makes this a non-starter for me; I'm curious about the guzzlr script, for example, but not if it will clutter up my scripts directory with stuff I don't want.

(it did alert me to an Ezandora scripts I didn't even know existed - Mummery. If there is a forum thread here describing it, I will add it to our script repository so people can find it.)

I also note that the first post on this thread says "to install, go here .... some github repository" is not how we do things here. If you go to that repository, it says "Run this command in the CLI:"

Code:
 svn checkout https://github.com/taltamir/ttpack/trunk/RELEASE/

The main thread for ttpack correctly tells you that. The thread for individual scripts should also do that, rather than sending you to github to find the command.
 
Last edited:

Veracity

Developer
Mummery is a relay script. It decorates the choice adventure for the Mummery trunk.
That improves/changes the experience in the Relay Browser.
Why would an executable script (like this package) force that to be installed?
 

Landamus

New member
Hi taltamir, you've done way more work than I did and it looks awesome. I threw together a fairly naive and still buggy script for my own use, but if anything I did can be of use to you feel free to it.
Code:
import <canadv.ash>

string platinum_booze();

void main() {
	int guzzles = get_property("guzzles").to_int();
	string date = today_to_string();
	int choice;

	// Track guzzling between days. Allows us to know when to go for platinum, gold, and bronze.
	if (get_property("guzzling_started").to_int() < date.to_int()) {
		set_property("guzzles", 0);
		guzzles = 0;
		set_property("guzzling_started", date);
	}

	while (my_adventures() > 26) {
		if (guzzles == 0) {
			choice = 4;
		}
		else if (guzzles < 4) {
			choice = 3;
		}
		else if (guzzles > 3) {
			choice = 2;
		}
		#choice = 5;

		set_property("choiceAdventure1412", choice);
		use($item[Guzzlr Tablet]);

		outfit("Guzzlr");
		string booze = get_property("guzzlrQuestBooze");
		location loc = to_location(get_property("guzzlrQuestLocation"));

		if (booze == "special personalized cocktail") {
			booze = platinum_booze();
		}

		if (retrieve_item(booze.to_item()) && can_adv(loc, true)) {
			#equip($slot[acc1], $item[Guzzlr shoes]);
			add_item_condition(1, $item[Guzzlrbuck]);
			adventure(my_adventures(), loc);

			guzzles += 1;
			set_property("guzzles", guzzles);
			#remove_item_condition(1, $item[Guzzlrbuck]);
		}
		else {
			abort("Could not acquire or make " + booze);
		}
	}
}

string platinum_booze() {
	item [5] booze = {$item[Ghiaccio Colada], $item[Sourfinger], $item[Nog-on-the-Cob], $item[Steamboat], $item[Buttery Boy]};
	item [5] mixer = {$item[cold wad], $item[mangled finger], $item[robin's egg], $item[miniature boiler], $item[Dish of Clarified Butter]};
	int [5] pricelist;
	int max_price = 999999999;
	int cheapest_price = max_price;
	int cheapest_idx;

	foreach idx in pricelist {
		pricelist[idx] = mall_price(mixer[idx]);

		if (pricelist[idx] < cheapest_price) {
			cheapest_idx = idx;
			cheapest_price = pricelist[idx];
		}
	}
	
	if (!retrieve_item(booze[cheapest_idx])) {
		buy(1, mixer[cheapest_idx]);
		retrieve_item(booze[cheapest_idx]);
	}

	return booze[cheapest_idx];
}

/*
Issues:
	Make a loop to use canadv()
		not working: tiny absinthe->Windmill
	ultra-rare broke it too

KoLmafia Preferences:
	_guzzlrGoldDeliveries=2			# If we've hit daily limits
	_guzzlrPlatinumDeliveries=1		# If we've hit daily limits
	_guzzlrQuestAbandoned=true		# If abandon was used today
	guzzlrBronzeDeliveries=35		# Useful for what?
	guzzlrGoldDeliveries=17			# Useful for what?
	guzzlrPlatinumDeliveries=5		# Useful for what?
	guzzlrQuestBooze
	guzzlrQuestLocation
	guzzlrQuestTier

choices:
	choice 2: Bronze Tier
	choice 3: Gold Tier
	choice 4: Platinum Tier
	choice 5: Don't take a client right now
	https://wiki.kolmafia.us/index.php?title=Run_choice

items:
	"Guzzlr tablet":					$item[10533]
	"Guzzlr cocktail set":				$item[10534]
	"Guzzlrbuck":						$item[10535]
	"Guzzlr hat":						$item[10536]
	"Guzzlr shoes":						$item[10537]
	"Guzzlr pants":						$item[10538]
	"Guzzlr souvenir stein":			$item[10539]
	"Guzzlr tattoo kit":				$item[10540]
	"Ghiaccio Colada":					$item[10541]
		"cold wad":						$item[1452]
	"Sourfinger":						$item[10542]
		"mangled finger":				$item[7369]
	"Nog-on-the-Cob":					$item[10543]
		"robin's egg":					$item[8833]
	"Steamboat":						$item[10544]
		"miniature boiler":				$item[5370]
	"Buttery Boy":						$item[10545]
		"Dish of Clarified Butter":		$item[9908]
	"Never Don't Stop Not Striving":	$item[10546]
*/
 

zarqon

Active member
Multiple matches for "Spookyraven library key"; using "[7302]Spookyraven library key". (canadv.ash, line 492) Clarify by using one of:
$item[[1764]Spookyraven library key]
$item[[7302]Spookyraven library key]

Also FWIW the current line 492 of CanAdv is:

Code:
   case $location[The Enormous Greater-Than Sign]: return my_basestat(my_primestat()) > 44 && (get_property("lastPlusSignUnlock").to_int() < my_ascensions() || contains_text(visit_url("da.php"),"Greater"));

The key check is on line 588 and uses the correct key. So it looks like perhaps that should also be in dependencies:

https://svn.code.sf.net/p/therazekolmafia/canadv/code
 

taltamir

Member
Sorry for delayed response everyone. I forgot to check this thread. instead checking the primary ttpack thread, github issues, and discord channel.

Mummery is a relay script. It decorates the choice adventure for the Mummery trunk.
That improves/changes the experience in the Relay Browser.
Why would an executable script (like this package) force that to be installed?
This package also pulls in a whole bunch of other scripts that I don't want (they are scripts that do fewer things than I already have, for example). Hard to understand why it needs Ezandora's Spacegate script, for example; why would any script in this pack want to call that? That makes this a non-starter for me; I'm curious about the guzzlr script, for example, but not if it will clutter up my scripts directory with stuff I don't want.
Aren't those scripts required for the CLI commands? I use them in the login script. Such as grabbing the spacegate outfit pieces (trying to wear spacegate outfit without them gives error instead of mafia automatically grabbing them).

That said... I can look into just copying the commands in question over to my script. It would certainly be better than using CLI commands

Sorry about that. I am planning to significantly reduce this requirement list over time.

====

I added automatic spading for the purpose of populating the spreadsheet and figuring out the formula for maxing out the bonuses the tablet gives
Just cut all the contents of /data/guzzlr_autospade.txt
and then paste it into the google sheet https://docs.google.com/spreadsheet...iy_khGYcw8efdgYwVVSgM7_Mkw/edit#gid=103744064

Big thank you to Icon and Picktator for helping me with that bit of code. and probably a few other people too whom I talked to on discord earlier.

====

I was delighted to see that someone had posted a Guzzlr script, as I am currently slogging my way through getting all my guzzlrbucks. However, when I attempt to run it this, I get:

I realize these are other scripts that are being called, but I'm clueless about how mafia scripts (or coding in general) work, so I really don't know how to troubleshoot this.
I have an idea here... are you perhaps using the master version of autoscend instead of the beta version?

I put the beta address for autoscend but mafia considers them to be the same script. Master is very outdated compared to beta, and does not contain a bunch of file such as this standard.ash

I am not entirely sure how to resolve this automatically.
But you can fix this via
Code:
svn delete autoscend
Code:
svn checkout https://github.com/Loathing-Associates-Scripting-Society/autoscend/branches/beta/RELEASE/
which will uninstall master autoscend and replace it with beta.

Beta is a lot more stable anyways since it contains far more bugfixes. And also contains timely support for current path

=======

I don't need a one day ticket as I have the charter.
Fixed. sorry about that.

======

I also note that the first post on this thread says "to install, go here .... some github repository" is not how we do things here. If you go to that repository, it says "Run this command in the CLI:"

Code:
 svn checkout https://github.com/taltamir/ttpack/trunk/RELEASE/

The main thread for ttpack correctly tells you that. The thread for individual scripts should also do that, rather than sending you to github to find the command.
Alright. change made
 
Last edited:

taltamir

Member
added automatic quest based unlock for the old landfill, madness bakery, skeleton store, the overgrown lot.
added iotm item based unlock for the red queen garden

tested it today with the recent changes in mafia tracking and the removal of my workarounds for the mafia issues and it works well.
Also autospading is a smashing success.
 

HojoHominygrits

New member
Great!

Unfortunately, I've gotten all the guzzlrstore items, and will likely not touch this thing again except for claiming the daily cocktail kit.

(well, actually, not so unfortunately, but you get what I mean...)
 

taltamir

Member
Great!

Unfortunately, I've gotten all the guzzlrstore items, and will likely not touch this thing again except for claiming the daily cocktail kit.

(well, actually, not so unfortunately, but you get what I mean...)
I got you covered :)
use
Code:
set guzzlr_abandonPlatinumForcedAftercore = true
set guzzlr_abandonPlatinumForcedInrun = true
then add the following to your login script
Code:
cli_execute("guzzlr.ash");
and it will now automatically take a platinum delivery daily then auto abort it for the cocktail kit
 

taltamir

Member
@veracity I removed ezandora spacegate and mummery from the dependencies for this script. in case you are still interested
 

taltamir

Member
@HojoHominygrits
thinking about your issue some more, I am pretty sure it is not caused by you using master instead of beta. instead it should be caused by clicking no when the scary popup asked if you trust some script.


You might have been warned by fellow users to not yet update autoscend because of an issue where it crashes immediately saying it cannot find some files.


this sometimes happens when we move, rename, or add new files (which we have recently done).
When such a thing occurs mafia (or maybe java) gives a popup asking for new permissions and warns you to only say yes if you trust the source, it sounds scary and people often say no because of it.
It is also very easy to accidentally say no (IIRC if you are typing in discord when the popup comes, it will become centered on the popup so when you hit enter it hits no).
This issue can also occur if you had previously used a test version you received through discord instead of mafia


Just letting everyone know that there is no reason to wait for a fix (because there is nothing broken on our side, your local installation is corrupted). You should go ahead and let it update.
If you do get this particular issue, there is a very easy fix. in CLI type
Code:
svn delete autoscend
then (assuming you want beta with all the newest updates)
Code:
svn checkout https://github.com/Loathing-Associates-Scripting-Society/autoscend/branches/beta/RELEASE/
this will reinstall autoscend and fix this problem.


Do not worry, all your settings will be retained. you will not lose anything
 

Veracity

Developer
@HojoHominygrits
thinking about your issue some more, I am pretty sure it is not caused by you using master instead of beta. instead it should be caused by clicking no when the scary popup asked if you trust some script.
Well, except the whole part where it pulls in all sorts of other stuff - including Relay Scripts which have nothing whatsoever to do with the operation of this script.

I completely get it. You don't get to modify my Relay Browser experience in order to provide some random script which provides nothing to the Relay Browser..
 

taltamir

Member
Well, except the whole part where it pulls in all sorts of other stuff - including Relay Scripts which have nothing whatsoever to do with the operation of this script.
hojohominygrits could not run guzzlr script receiving the error of
autoscend/paths/standard.ash could not be found (autoscend.ash, line 63)
this came about because in May 8th 2020 this PR was merged into autoscend
https://github.com/Loathing-Associates-Scripting-Society/autoscend/pull/366
which redesigned the directory structure of autoscend. and was later pushed to master as well.

the file `autoscend/auto_standard.ash` became `autoscend/paths/standard.ash` with many similar changes.
This is not a dependency of autoscend, but an internal component file of autoscend script.
autoscend is a dependency for guzzlr script though

when mafia did SVN update for hojohominygrits it noticed their autoscend version is outdated and auto updated it.
It then gave a scary looking prompt about "only say yes if you trust the author" because of the changes to directory structure and hojohominygrits clicked no.
This resulted in their autoscend installation being corrupted. The solution to which is to uninstall and then reinstall autoscend.
I completely get it. You don't get to modify my Relay Browser experience in order to provide some random script which provides nothing to the Relay Browser..
1. I removed both dependencies you complained about.

2. Only one of all the dependencies was a rely only script. and that was an error caused by me thinking it was the source of certain CLI commands and thus a functional requirement.

3. The dependencies are actually used. And I am working on reducing them by copying over individual functions as needed. Although most said dependencies are used in other pack scripts (primarily in tt_login which is in beta right now and needs a lot of work) rather than the guzzlr script. If there is demand for it I will spinoff guzzlr out of the pack so people can get it without dependencies (other than autoscend on which it is really dependent).

4. I didn't think anyone would be bothered by it. Lesson learned, I will list dependencies in the first post to warn people and try to minimize their amount
 
Last edited:

Magus_Prime

Active member
I tried the new functionality to open the Pirate zones today and it failed. I added details to the closed issue on Github.
 
Last edited:
Top