Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17

Thread: guzzlr farming script

  1. #1
    Senior Member
    Join Date
    Oct 2017
    Posts
    596

    Default guzzlr farming script

    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...r_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 by taltamir; 06-12-2020 at 06:39 PM.
    ttpack = a collection of scripts by taltamir

  2. #2
    Senior Member
    Join Date
    Feb 2010
    Posts
    1,155

    Default

    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 by Magus_Prime; 05-28-2020 at 12:13 PM.

  3. #3
    Senior Member
    Join Date
    Feb 2010
    Posts
    1,155

    Default

    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

  4. #4
    Junior Member
    Join Date
    Jul 2008
    Location
    Texas, yep!
    Posts
    5

    Default

    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 by HojoHominygrits; 05-30-2020 at 02:03 PM.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,311

    Default

    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 by Veracity; 05-30-2020 at 02:58 PM.

  6. #6
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,311

    Default

    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?

  7. #7
    Junior Member landamus's Avatar
    Join Date
    Aug 2008
    Location
    MN
    Posts
    14

    Default

    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]
    */
    Life before Death
    Strength before Weakness
    Journey before Destination

  8. #8
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,798

    Default

    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]
    Originally Posted by HojoHominygrits View Post
    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
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Woss | Om****est (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  9. #9
    Senior Member
    Join Date
    Oct 2017
    Posts
    596

    Default

    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?
    Originally Posted by Veracity View Post
    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.
    Originally Posted by Veracity View Post
    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/spreadsheets...#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.
    Originally Posted by HojoHominygrits View Post
    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.
    Originally Posted by Magus_Prime View Post
    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.
    Originally Posted by Veracity View Post
    Alright. change made
    Last edited by taltamir; 06-02-2020 at 10:10 PM.
    ttpack = a collection of scripts by taltamir

  10. #10
    Senior Member
    Join Date
    Oct 2017
    Posts
    596

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •