From 71dbe17b702be2449b431caa6c59ee1bffceeaa4 Mon Sep 17 00:00:00 2001 From: Daniel Simich <21962115+dsimich@users.noreply.github.com> Date: Mon, 4 Nov 2024 16:24:34 -0500 Subject: [PATCH] autoscend turbo --- RELEASE/scripts/autoscend.ash | 26 +++++-- RELEASE/scripts/autoscend/auto_acquire.ash | 26 +++++++ RELEASE/scripts/autoscend/auto_consume.ash | 48 ++++++++++++ RELEASE/scripts/autoscend/auto_util.ash | 5 ++ .../scripts/autoscend/autoscend_header.ash | 2 + .../scripts/autoscend/paths/avant_guard.ash | 11 ++- RELEASE/scripts/autoscend/quests/level_07.ash | 76 +++++++++++++++++-- RELEASE/scripts/autoscend/quests/level_12.ash | 4 +- .../scripts/autoscend/quests/level_any.ash | 4 +- 9 files changed, 179 insertions(+), 23 deletions(-) diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 4b80c77d0..8b59671f3 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -252,6 +252,7 @@ void initializeSettings() { remove_property("auto_saveSausage"); remove_property("auto_saveVintage"); set_property("auto_dontUseCookBookBat", false); + set_property("auto_turbo", false); set_property("auto_dietpills", 0); beehiveConsider(); @@ -1956,6 +1957,7 @@ boolean doTasks() if(auto_autumnatonQuest()) return true; if(auto_smallCampgroundGear()) return true; auto_lostStomach(false); + autoCleanse(); //running turbo only if(auto_doPhoneQuest()) return true; if(auto_doTempleSummit()) return true; @@ -2132,11 +2134,25 @@ void main(string... input) backupSetting("printStackOnAbort", true); // parse input - if(count(input) > 0 && input[0] == "sim") - { - // display useful items/skills/perms/etc and if the user has them - printSim(); - return; + switch(input[0]) + { + case "sim": + // display useful items/skills/perms/etc and if the user has them + printSim(); + return; + case "turbo": + // gotta go faaaaaast. Doing a double confirm because of the nature of this parameter. + user_confirm("This will get expensive for you. This should only be used if you are trying to go for a 1-day and don't care about expenses. Do you really want to do this? Will default to 'No' in 15 seconds.", 15000, false); + { + user_confirm("This will use UMSBs and Spice Melanges if you have them. If you are ok with this, you have 15 seconds to hit 'Yes'", 15000, false); + { + set_property("auto_turbo", true); + auto_log_info("Ka-chow! Gotta go fast."); + break; + } + } + default: + auto_log_info("Running normal autoscend because you didn't enter in a valid parameter"); } print_help_text(); diff --git a/RELEASE/scripts/autoscend/auto_acquire.ash b/RELEASE/scripts/autoscend/auto_acquire.ash index ec3017aa4..3c66b4224 100644 --- a/RELEASE/scripts/autoscend/auto_acquire.ash +++ b/RELEASE/scripts/autoscend/auto_acquire.ash @@ -620,6 +620,32 @@ int handlePulls(int day) auto_log_info("I assume you've handled your pulls yourself... who knows."); return 0; } + if(auto_turbo()) + { + //Pull expensive organ cleansers first if you are running turbo and you own them + foreach it in $items[Spice Melange, Ultra Mega Sour Ball, Alien plant pod, Alien animal milk] + { + if(storage_amount(it) > 0 && auto_is_valid(it) && !pulledToday(it)) + { + user_confirm("Pulling a " + it + ". If you are ok with this, you have 15 seconds to hit 'Yes'", 15000, false); + { + pullXWhenHaveY(it, 1, 0); + } + } + } + pullXWhenHaveY($item[Dieting Pill], 1, 0); + //Make sure we have the legendary pizzas if we want to/can consume them so we take full advantage of the dieting pills + if(!get_property("auto_dontConsumeLegendPizzas").to_boolean()) + { + foreach it in $items[Pizza of Legend, Calzone of Legend, Deep Dish of Legend] + { + if(auto_is_valid(it) && !pulledToday(it)) + { + pullXWhenHaveY(it, 1, 0); + } + } + } + } // pulls for small path auto_SmallPulls(); diff --git a/RELEASE/scripts/autoscend/auto_consume.ash b/RELEASE/scripts/autoscend/auto_consume.ash index af7ebd8d6..48ad1ee2f 100644 --- a/RELEASE/scripts/autoscend/auto_consume.ash +++ b/RELEASE/scripts/autoscend/auto_consume.ash @@ -86,6 +86,54 @@ boolean canOde(item toDrink) return true; } +boolean autoCleanse() +{ + if(!(auto_turbo())) + { + return false; + } + + boolean wantToCleanseStomach = false; + boolean wantToCleanseLiver = false; + + if(my_fullness() > 3 && fullness_left() < 4) + { + wantToCleanseStomach = true; + } + if(my_inebriety() > 3 && inebriety_left() < 4) + { + wantToCleanseLiver = true; + } + + boolean wantToCleanse = wantToCleanseLiver && wantToCleanseStomach; //want to cleanse both + + if(wantToCleanse && item_amount($item[Spice Melange]) > 0 && !(get_property("spiceMelangeUsed").to_boolean())) + { + handleTracker("Cleansed with " + $item[Spice Melange], "auto_otherstuff"); + return use(1, $item[Spice Melange]); + } + + if(wantToCleanse && item_amount($item[Ultra Mega Sour Ball]) > 0 && !(get_property("_ultraMegaSourBallUsed").to_boolean())) + { + handleTracker("Cleansed with " + $item[Ultra Mega Sour Ball], "auto_otherstuff"); + return use(1, $item[Ultra Mega Sour Ball]); + } + + if(wantToCleanseLiver && item_amount($item[Alien plant pod]) > 0 && !(get_property("_alienPlantPodUsed").to_boolean())) + { + handleTracker("Cleansed with " + $item[Alien plant pod], "auto_otherstuff"); + return use(1, $item[Alien plant pod]); + } + + if(wantToCleanseStomach && item_amount($item[Alien animal milk]) > 0 && !(get_property("_alienAnimalMilkUsed").to_boolean())) + { + handleTracker("Cleansed with " + $item[Alien animal milk], "auto_otherstuff"); + return use(1, $item[Alien animal milk]); + } + + return false; +} + boolean autoDrink(int howMany, item toDrink) { return autoDrink(howMany, toDrink, false); diff --git a/RELEASE/scripts/autoscend/auto_util.ash b/RELEASE/scripts/autoscend/auto_util.ash index 958451166..d5965908e 100644 --- a/RELEASE/scripts/autoscend/auto_util.ash +++ b/RELEASE/scripts/autoscend/auto_util.ash @@ -3166,6 +3166,11 @@ void auto_log_debug(string s) auto_log(s, "black", 3); } +boolean auto_turbo() +{ + return get_property("auto_turbo").to_boolean(); +} + boolean auto_can_equip(item it) { return auto_can_equip(it, it.to_slot()); diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index ac6df5f44..f46b16ad1 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -1361,6 +1361,7 @@ int inebriety_left(); boolean saucemavenApplies(item it); float expectedAdventuresFrom(item it); boolean canOde(item toDrink); +boolean autoCleanse(); boolean autoDrink(int howMany, item toDrink); boolean autoDrink(int howMany, item toDrink, boolean silent); boolean autoOverdrink(int howMany, item toOverdrink); @@ -1845,6 +1846,7 @@ void auto_log_info(string s, string color); void auto_log_info(string s); void auto_log_debug(string s, string color); void auto_log_debug(string s); +boolean auto_turbo(); boolean auto_can_equip(item it); boolean auto_can_equip(item it, slot s); boolean auto_check_conditions(string conds); diff --git a/RELEASE/scripts/autoscend/paths/avant_guard.ash b/RELEASE/scripts/autoscend/paths/avant_guard.ash index d518ea6d9..db83e114d 100644 --- a/RELEASE/scripts/autoscend/paths/avant_guard.ash +++ b/RELEASE/scripts/autoscend/paths/avant_guard.ash @@ -15,6 +15,10 @@ void ag_initializeSettings() //set_property("auto_100familiar", "Burly Bodyguard"); set_property("auto_skipUnlockGuild", true); set_property("auto_nonAdvLoc", false); + if(auto_turbo()) + { + set_property("auto_skipNuns", "true"); + } } } @@ -22,12 +26,7 @@ void ag_pulls() { if (in_avantGuard()) { - //SUPER helpful for gremlins - if(auto_is_valid($item[mini kiwi invisible dirigible])) - { - pullXWhenHaveY($item[mini kiwi invisible dirigible], 1, 0); - } - if(auto_is_valid($item[waffle]) && auto_haveAugustScepter()) //Only want waffles if we can summon them + if(auto_is_valid($item[waffle]) && auto_haveAugustScepter() && !(auto_turbo())) //Only want waffles if we can summon them and not going for a 1 day { pullXWhenHaveY($item[waffle],1,(my_daycount() - 1) * (3 + (my_daycount() > 1 ? 1 : 0))); //pull waffles everyday } diff --git a/RELEASE/scripts/autoscend/quests/level_07.ash b/RELEASE/scripts/autoscend/quests/level_07.ash index e3635f985..5f7d62ae7 100644 --- a/RELEASE/scripts/autoscend/quests/level_07.ash +++ b/RELEASE/scripts/autoscend/quests/level_07.ash @@ -21,19 +21,45 @@ void cyrptChoiceHandler(int choice) } else if(choice == 523) // Death Rattlin' (The Defiled Cranny) { - if(in_darkGyffte() && have_skill($skill[Flock of Bats Form]) && have_skill($skill[Sharp Eyes])) + if((in_darkGyffte() && have_skill($skill[Flock of Bats Form]) && have_skill($skill[Sharp Eyes])) || auto_turbo()) { - int desired_pills = in_hardcore() ? 6 : 4; - desired_pills -= my_fullness()/2; - auto_log_info("We want " + desired_pills + " dieting pills and have " + item_amount($item[dieting pill]), "blue"); - if(item_amount($item[dieting pill]) < desired_pills) + int desiredPills = in_hardcore() ? 6 : (auto_turbo() ? 3 : 4); + int dietingPillsUsed; + if(get_property("auto_chewed") == "") { - if(!bat_wantHowl($location[The Defiled Cranny])) + dietingPillsUsed = 0; + } + else + { + foreach str in split_string(get_property("auto_chewed"), ",") { - bat_formBats(); + if(contains_text(str.to_lower_case(), "dieting pill")) + { + dietingPillsUsed += 1; + } } } - run_choice(6); // if meets thresholds, skip to farm more dieting pills in DG + if(!(auto_turbo())) + { + desiredPills -= my_fullness()/2; + } + else + { + desiredPills -= dietingPillsUsed; + } + auto_log_info("We want " + desiredPills + " dieting pills and have " + item_amount($item[dieting pill]), "blue"); + if(item_amount($item[dieting pill]) < desiredPills) + { + run_choice(6); // if meets thresholds, skip to farm more dieting pills in DG + } + else if(available_choice_options() contains 5) + { + run_choice(5); // -11 evil, +50 each substat with Candy Cane Sword Cane + } + else + { + run_choice(4); // fight swarm of ghuol whelps + } } else if(available_choice_options() contains 5) { @@ -299,6 +325,40 @@ boolean L7_defiledCranny() useNightmareFuelIfPossible(); } + if((in_darkGyffte() && have_skill($skill[Flock of Bats Form]) && have_skill($skill[Sharp Eyes])) || auto_turbo()) + { + int desiredPills = in_hardcore() ? 6 : (auto_turbo() ? 3 : 4); + int dietingPillsUsed; + if(get_property("auto_chewed") == "") + { + dietingPillsUsed = 0; + } + else + { + foreach str in split_string(get_property("auto_chewed"), ",") + { + if(contains_text(str.to_lower_case(), "dieting pill")) + { + dietingPillsUsed += 1; + } + } + } + if(!(auto_turbo())) + { + desiredPills -= my_fullness()/2; + } + else + { + desiredPills -= dietingPillsUsed; + } + auto_log_info("We want " + desiredPills + " dieting pills and have " + item_amount($item[dieting pill]), "blue"); + if(item_amount($item[dieting pill]) < desiredPills) + { + //dieting pills have 10% drop rate + provideItem(900, $location[The Defiled Cranny], false); + } + } + auto_MaxMLToCap(auto_convertDesiredML(149), true); addToMaximize("200ml " + auto_convertDesiredML(149) + "max"); diff --git a/RELEASE/scripts/autoscend/quests/level_12.ash b/RELEASE/scripts/autoscend/quests/level_12.ash index 54950945c..5ca6a725e 100644 --- a/RELEASE/scripts/autoscend/quests/level_12.ash +++ b/RELEASE/scripts/autoscend/quests/level_12.ash @@ -1723,9 +1723,9 @@ boolean L12_themtharHills() auto_log_info("Themthar Nuns!", "blue"); } - //can only do this in Avant Guard in 6 turns in HC or 8 turns in Normal. Need the August Scepter + //can only do this in Avant Guard in 6 turns in HC or 8 turns in Normal. Need the August Scepter. If going turbo, can't get enough waffles so don't even bother with this set_property("auto_delayWar", false); - if(in_avantGuard() && auto_haveAugustScepter()) + if(in_avantGuard() && auto_haveAugustScepter() && !(auto_turbo())) { auto_log_info("Checking how much meat drop we can get"); if((in_hardcore() && item_amount($item[waffle]) <= 6 && $location[The Themthar Hills].turns_spent + item_amount($item[waffle]) > 6) || diff --git a/RELEASE/scripts/autoscend/quests/level_any.ash b/RELEASE/scripts/autoscend/quests/level_any.ash index 06b09db9d..6753cfeec 100644 --- a/RELEASE/scripts/autoscend/quests/level_any.ash +++ b/RELEASE/scripts/autoscend/quests/level_any.ash @@ -541,9 +541,9 @@ boolean LX_fatLootToken() //wait until daily dungeon is done before considering doing fantasy realm if(fantasyRealmToken()) return true; } - if(internalQuestStatus("questL13Final") == 5) + if(internalQuestStatus("questL13Final") == 5 || auto_turbo()) { - // at NS tower door and still need hero keys + // at NS tower door and still need hero keys or going for turbo // summon and copy fantasy realm bandit. Allows for getting fantasy realm token without having FR available if(!acquiredFantasyRealmToken() && ((auto_haveBackupCamera() && auto_backupUsesLeft() >= (4 - fantasyBanditsFought())) || auto_canHabitat()) && canSummonMonster($monster[fantasy bandit]))