From c5c13a0601dcc8aebd8a4f65484c9733a25621ab Mon Sep 17 00:00:00 2001 From: Alium58 Date: Sat, 11 Nov 2023 08:00:48 -0600 Subject: [PATCH] build smut orc bridge as soon as able --- RELEASE/scripts/autoscend.ash | 1 + .../scripts/autoscend/autoscend_header.ash | 1 + RELEASE/scripts/autoscend/quests/level_09.ash | 50 ++++++++++++------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/RELEASE/scripts/autoscend.ash b/RELEASE/scripts/autoscend.ash index 77788a32f..210ee7940 100644 --- a/RELEASE/scripts/autoscend.ash +++ b/RELEASE/scripts/autoscend.ash @@ -1771,6 +1771,7 @@ boolean doTasks() basicAdjustML(); + finishBuildingSmutOrcBridge(); councilMaintenance(); auto_buySkills(); // formerly picky_buyskills() now moved here awol_buySkills(); diff --git a/RELEASE/scripts/autoscend/autoscend_header.ash b/RELEASE/scripts/autoscend/autoscend_header.ash index f5b8975df..2f3cc396e 100644 --- a/RELEASE/scripts/autoscend/autoscend_header.ash +++ b/RELEASE/scripts/autoscend/autoscend_header.ash @@ -1019,6 +1019,7 @@ boolean L9_leafletQuest(); void L9_chasmMaximizeForNoncombat(); int fastenerCount(); int lumberCount(); +boolean finishBuildingSmutOrcBridge(); void prepareForSmutOrcs(); boolean L9_chasmBuild(); boolean L9_aBooPeak(); diff --git a/RELEASE/scripts/autoscend/quests/level_09.ash b/RELEASE/scripts/autoscend/quests/level_09.ash index 00bdcde9d..42add8edc 100644 --- a/RELEASE/scripts/autoscend/quests/level_09.ash +++ b/RELEASE/scripts/autoscend/quests/level_09.ash @@ -142,6 +142,34 @@ int lumberCount() return base; } +boolean finishBuildingSmutOrcBridge() +{ + if (internalQuestStatus("questL09Topping") != 0 || get_property("chasmBridgeProgress").to_int() >= 30) + { + return false; + } + + // use any keepsake boxes we have + item keepsakeBox = $item[Smut Orc Keepsake Box]; + if(item_amount(keepsakeBox) > 0 && auto_is_valid(keepsakeBox)) + { + use(item_amount(keepsakeBox), keepsakeBox); + } + + // make sure our progress count is correct before we do anything. + visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress")))); + + // finish chasm if we can + if(get_property("chasmBridgeProgress").to_int() >= 30) + { + visit_url("place.php?whichplace=highlands&action=highlands_dude"); + return true; + } + + return false; +} + + void prepareForSmutOrcs() { @@ -287,6 +315,11 @@ boolean L9_chasmBuild() return false; } + if(finishBuildingSmutOrcBridge()) + { + return true; + } + if (shenShouldDelayZone($location[The Smut Orc Logging Camp])) { auto_log_debug("Delaying Logging Camp in case of Shen."); @@ -308,23 +341,6 @@ boolean L9_chasmBuild() auto_log_info("Chasm time", "blue"); - // use any keepsake boxes we have - item keepsakeBox = $item[Smut Orc Keepsake Box]; - if(item_amount(keepsakeBox) > 0 && auto_is_valid(keepsakeBox)) - { - use(item_amount(keepsakeBox), keepsakeBox); - } - - // make sure our progress count is correct before we do anything. - visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress")))); - - // finish chasm if we can - if(get_property("chasmBridgeProgress").to_int() >= 30) - { - visit_url("place.php?whichplace=highlands&action=highlands_dude"); - return true; - } - // prepareForSmutOrcs() called in pre-adv autoAdv(1, $location[The Smut Orc Logging Camp]);