Skip to content

Commit

Permalink
Merge branch 'main' into rollover-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alium58 authored Sep 13, 2023
2 parents b46781a + 76a420f commit 0bc6dc9
Show file tree
Hide file tree
Showing 17 changed files with 227 additions and 10 deletions.
2 changes: 2 additions & 0 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ boolean dailyEvents()
auto_LegacyOfLoathingDailies();
auto_buyFrom2002MrStore();
auto_useBlackMonolith();
auto_scepterSkills();
return true;
}
Expand Down Expand Up @@ -1857,6 +1858,7 @@ boolean doTasks()
if(LA_wildfire()) return true;
if(LA_robot()) return true;
if(auto_autumnatonQuest()) return true;
auto_lostStomach(false);

if (process_tasks()) return true;

Expand Down
9 changes: 9 additions & 0 deletions RELEASE/scripts/autoscend/auto_buff.ash
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
useSkill = $skill[Astral Shell];
} break;
case $effect[Attractive to Fire Ants]: useItem = $item[fire ant pheromones]; break;
case $effect[Aware of Bees]: useSkill = $skill[Aug. 19th: Honey Bee Awareness Day!];break;
case $effect[Baconstoned]:
if(item_amount($item[Vial of Baconstone Juice]) > 0)
{
Expand Down Expand Up @@ -268,6 +269,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Clear Ears, Can\'t Lose]: useItem = $item[Ear Candle]; break;
case $effect[Cletus\'s Canticle of Celerity]: useSkill = $skill[Cletus\'s Canticle of Celerity];break;
case $effect[Cloak of Shadows]: useSkill = $skill[Blood Cloak]; break;
case $effect[Cloud of Mosquitos]: useSkill = $skill[Aug. 20th: Mosquito Day!]; break;
case $effect[Clyde\'s Blessing]: useItem = $item[The Legendary Beat]; break;
case $effect[Chalky Hand]: useItem = $item[Handful of Hand Chalk]; break;
case $effect[Chocolatesphere]: useSkill = $skill[Chocolatesphere]; break;
Expand Down Expand Up @@ -377,6 +379,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Football Eyes]: useItem = $item[Black Facepaint]; break;
case $effect[Fortunate Resolve]: useItem = $item[Resolution: Be Luckier]; break;
case $effect[Frenzied, Bloody]: useSkill = $skill[Blood Frenzy]; break;
case $effect[Fresh Breath]: useSkill = $skill[Aug. 6th: Fresh Breath Day!]; break;
case $effect[Fresh Scent]: useItem = $item[deodorant]; break;
case $effect[Frigidalmatian]: useSkill = $skill[Frigidalmatian]; break;
case $effect[Frog in Your Throat]: useItem = $item[Frogade]; break;
Expand Down Expand Up @@ -418,6 +421,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Hardened Sweatshirt]: useSkill = $skill[Magic Sweat]; break;
case $effect[Hardly Poisoned At All]: useSkill = $skill[Disco Nap]; break;
case $effect[Healthy Blue Glow]: useItem = $item[gold star]; break;
case $effect[Hear Me Roar]: useSkill = $skill[Aug. 10th: World Lion Day!]; break;
case $effect[Heightened Senses]: useItem = $item[airborne mutagen]; break;
case $effect[Heart of Green]: useItem = $item[green candy heart]; break;
case $effect[Heart of Lavender]: useItem = $item[lavender candy heart]; break;
Expand Down Expand Up @@ -446,6 +450,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Impeccable Coiffure]: useSkill = $skill[Self-Combing Hair]; break;
case $effect[Inigo\'s Incantation of Inspiration]:useSkill = $skill[Inigo\'s Incantation of Inspiration];break;
case $effect[Incredibly Hulking]: useItem = $item[Ferrigno\'s Elixir of Power]; break;
case $effect[Incredibly Well Lit]: useSkill = $skill[Aug. 7th: Lighthouse Day!]; break;
case $effect[Industrial Strength Starch]: useItem = $item[Industrial Strength Starch]; break;
case $effect[Ink Cloud]: useSkill = $skill[Ink Gland]; break;
case $effect[Inked Well]: useSkill = $skill[Squid Glands]; break;
Expand Down Expand Up @@ -478,6 +483,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Living Fast]: useSkill = $skill[Live Fast]; break;
case $effect[Locks Like the Raven]: useItem = $item[Black No. 2]; break;
case $effect[Loded]: useItem = $item[lodestone]; break;
case $effect[Lost Stomach]: useSkill = $skill[Aug. 16th: Roller Coaster Day!];break;
case $effect[Loyal as a Rock]: useItem = $item[lump of loyal latite]; break;
case $effect[Loyal Tea]: useItem = $item[cuppa Loyal Tea]; break;
case $effect[Lucky Struck]: useItem = $item[Lucky Strikes Holo-Record]; break;
Expand Down Expand Up @@ -532,6 +538,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Oiled Skin]: useItem = $item[Skin Oil]; break;
case $effect[Oiled-Up]: useItem = $item[Pec Oil]; break;
case $effect[Oilsphere]: useSkill = $skill[Oilsphere]; break;
case $effect[Offhand Remarkable]: useSkill = $skill[Aug. 13th: Left\/Off Hander's Day!];break;
case $effect[OMG WTF]: useItem = $item[Confiscated Cell Phone]; break;
case $effect[One Very Clear Eye]: useItem = $item[Cyclops Eyedrops]; break;
case $effect[Orange Crusher]: useItem = $item[Pulled Orange Taffy]; break;
Expand Down Expand Up @@ -661,6 +668,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Seeing Colors]: useItem = $item[Funky Dried Mushroom]; break;
case $effect[Sepia Tan]: useItem = $item[Old Bronzer]; break;
case $effect[Serendipi Tea]: useItem = $item[cuppa Serendipi tea]; break;
case $effect[Serendipity]: useSkill =$skill[Aug. 18th: Serendipity Day!]; break;
case $effect[Seriously Mutated]: useItem = $item[Extra-Potent Gremlin Mutagen]; break;
case $effect[Shells of the Damned]: useItem = $item[cyan seashell]; break;
case $effect[Shield of the Pastalord]:
Expand Down Expand Up @@ -720,6 +728,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
{
useSkill = $skill[Spiky Shell];
} break;
case $effect[Spirit of the Mountains]: useSkill = $skill[Aug. 1st: Mountain Climbing Day!];break;
case $effect[Spiritually Awake]: useItem = $item[Holy Spring Water]; break;
case $effect[Spiritually Aware]: useItem = $item[Spirit Beer]; break;
case $effect[Spiritually Awash]: useItem = $item[Sacramental Wine]; break;
Expand Down
9 changes: 8 additions & 1 deletion RELEASE/scripts/autoscend/auto_choice_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,14 @@ boolean auto_run_choice(int choice, string page)
}
break;
case 1494:
run_choice(2); //Insectologist (S.I.T. Course)
if(my_level() < 8)
{
run_choice(3); //Cryptobotanist (S.I.T. Course)
}
else
{
run_choice(2); //Insectologist (S.I.T. Course)
}
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion RELEASE/scripts/autoscend/auto_consume.ash
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ boolean loadConsumables(string _type, ConsumeAction[int] actions)
boolean[item] blacklist;
boolean[item] craftable_blacklist;

foreach it in $items[Cursed Punch, Unidentified Drink, FantasyRealm turkey leg, FantasyRealm mead]
foreach it in $items[Cursed Punch, Unidentified Drink, FantasyRealm turkey leg, FantasyRealm mead, waffle]
{
blacklist[it] = true;
}
Expand Down
32 changes: 32 additions & 0 deletions RELEASE/scripts/autoscend/auto_post_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,38 @@ boolean auto_post_adventure()
remove_property("auto_combatDirective");
remove_property("auto_digitizeDirective");
//try to catch infinite loop where we repeatedly try to do the same thing.
//works with code found in auto_pre_adv.ash
if(my_session_adv() == get_property("_auto_inf_session_adv").to_int())
{
auto_log_debug("auto_post_adv.ash detected that no adventure was spent since last auto_pre_adv.ash");
//count how many times in a row we went with no adv spent
set_property("_auto_inf_counter", get_property("_auto_inf_counter").to_int()+1);
//if last monster changed it means we are doing free combats
if(get_property("_auto_inf_last_monster").to_monster() != last_monster())
{
remove_property("_auto_inf_counter"); //reset counter
}
set_property("_auto_inf_last_monster", last_monster());
if(get_property("_auto_inf_counter").to_int() >= 30)
{
auto_log_error("no adventure was spent " +get_property("_auto_inf_counter")+ " times in a row which suggests we are stuck in an infinite loop. Stopping autoscend");
remove_property("_auto_inf_counter");
set_property("auto_interrupt", true);
}
else if(get_property("_auto_inf_counter").to_int() > 10)
{
auto_log_warning("no adventure was spent " +get_property("_auto_inf_counter")+ " times in a row");
}
}
else //clear values
{
remove_property("_auto_inf_counter");
}
auto_log_info("Post Adventure done, beep.", "purple");
return true;
}
Expand Down
25 changes: 25 additions & 0 deletions RELEASE/scripts/autoscend/auto_powerlevel.ash
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,31 @@ boolean LX_attemptPowerLevel()
return true;
}
//August Scepter Power Levelling
if(auto_haveAugustScepter() && get_property("_augSkillsCast").to_int() < 5){
if(my_primestat() == $stat[Muscle])
{
if(canUse($skill[Aug. 12th: Elephant Day!]) && !get_property("_aug12Cast").to_boolean())
{
use_skill($skill[Aug. 12th: Elephant Day!]);
}
}
if(my_primestat() == $stat[Mysticality])
{
if(canUse($skill[Aug. 11th: Presidential Joke Day!]) && !get_property("_aug11Cast").to_boolean())
{
use_skill($skill[Aug. 11th: Presidential Joke Day!]);
}
}
if(my_primestat() == $stat[Moxie])
{
if(canUse($skill[Aug. 23rd: Ride the Wind Day!]) && !get_property("_aug23Cast").to_boolean())
{
use_skill($skill[Aug. 23rd: Ride the Wind Day!]);
}
}
}
//scaling damage zones
//all scaling zones have monster level = my_buffedstat($stat[moxie]) + monster_level_adjustment() + enemy_value. up to a cap
location scalezone = highestScalingZone();
Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,10 @@ boolean auto_pre_adventure()
set_property("auto_priorLocation", place);
auto_log_info("Pre Adventure at " + place + " done, beep.", "blue");

//try to catch infinite loop where we repeatedly try to do the same thing.
//works with code found in auto_post_adv.ash
set_property("_auto_inf_session_adv", my_session_adv());

//to avoid constant flipping on the MCD. change it right before adventuring
int mcd_target = get_property("auto_mcd_target").to_int();
if(current_mcd() != mcd_target)
Expand Down
2 changes: 2 additions & 0 deletions RELEASE/scripts/autoscend/auto_restore.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,8 @@ boolean acquireHP(int goal, int meat_reserve, boolean useFreeRests)
return true;
}

buffMaintain($effect[extra-green]);

if(my_class() == $class[Pig Skinner] && have_skill($skill[Second Wind]))
{
return auto_pigSkinnerAcquireHP(0.7 * goal);
Expand Down
11 changes: 11 additions & 0 deletions RELEASE/scripts/autoscend/auto_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,11 @@ int cloversAvailable()
pullXWhenHaveY($item[11-Leaf Clover], 1, item_amount($item[11-Leaf Clover]));
retval += item_amount($item[11-Leaf Clover]);
}
//Get from August Scepter
if(auto_haveAugustScepter() && get_property("_augSkillsCast").to_int() < 5 && !get_property("_aug2Cast").to_boolean())
{
retval += 1;
}
}
//count Astral Energy Drinks which we have room to chew. Must specify ID since there are now 2 items with this name
Expand Down Expand Up @@ -1423,6 +1428,12 @@ boolean cloverUsageInit()
auto_log_warning("Did not acquire Lucky! after using an 11-Leaf Clover");
}
}

//Use August Scepter skill if we can
if(auto_haveAugustScepter() && get_property("_augSkillsCast").to_int() < 5 && !get_property("_aug2Cast").to_boolean())
{
use_skill($skill[Aug. 2nd: Find an Eleven-Leaf Clover Day]);
}

//use Astral Energy Drinks if we have room
if(spleen_left() >= 5)
Expand Down
3 changes: 3 additions & 0 deletions RELEASE/scripts/autoscend/autoscend_header.ash
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ int remainingCatalogCredits();
boolean auto_haveIdolMicrophone();
void auto_buyFrom2002MrStore();
void auto_useBlackMonolith();
boolean auto_haveAugustScepter();
void auto_scepterSkills();
void auto_lostStomach();

########################################################################################################
//Defined in autoscend/paths/actually_ed_the_undying.ash
Expand Down
4 changes: 4 additions & 0 deletions RELEASE/scripts/autoscend/combat/auto_combat_util.ash
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,10 @@ string replaceMonsterCombatString(monster target, boolean inCombat)
{
return "skill " + $skill[CHEAT CODE: Replace Enemy];
}
if(item_amount($item[waffle]) > 0 && !haveUsed($item[waffle]) && auto_is_valid($item[waffle]))
{
return "item " + $item[waffle];
}
return "";
}

Expand Down
80 changes: 77 additions & 3 deletions RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ boolean auto_haveSITCourse()
void auto_SITCourse()
{
if (!auto_haveSITCourse()) return;
//Best choice seems to be insectologist
if (!have_skill($skill[insectologist])){
//Get cryptobotanist if under level 8 or switch to insectologist if possible
if (my_level() < 8 && !have_skill($skill[cryptobotanist]) || (!get_property("_sitCourseCompleted").to_boolean() && my_level() >= 8 && !have_skill($skill[insectologist]))){
use(1,$item[S.I.T. Course Completion Certificate]);
//auto_run_choice(1484);
//auto_run_choice(1494);
return;
}
}
Expand Down Expand Up @@ -399,3 +399,77 @@ void auto_useBlackMonolith()
// use monolith
visit_url("campground.php?action=monolith");
}

boolean auto_haveAugustScepter()
{
static item scepter = wrap_item($item[august scepter]);
if(auto_is_valid(scepter) && (item_amount(scepter) > 0 || have_equipped(scepter)))
{
return true;
}
return false;
}

void auto_scepterSkills()
{
if(!auto_haveAugustScepter())
{
return;
}
//Day 1 skills
if(my_daycount() == 1)
{
if(canUse($skill[Aug. 24th: Waffle Day!]) && !get_property("_aug24Cast").to_boolean())
{
use_skill($skill[Aug. 24th: Waffle Day!]); //get some waffles to hopefully change some bad monsters to better ones
}
if(canUse($skill[Aug. 30th: Beach Day!]) && !get_property("_aug30Cast").to_boolean())
{
use_skill($skill[Aug. 30th: Beach Day!]); //Rollover adventures
}
if(canUse($skill[Aug. 28th: Race Your Mouse Day!]) && !get_property("_aug28Cast").to_boolean() && pathHasFamiliar() && ((!auto_hasStillSuit() && item_amount($item[Astral pet sweater]) == 0) || in_small()))
{
if(!is100FamRun())
{
use_familiar($familiar[Mosquito]); //equipping Mosquito so we don't get a big rock
}
use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment
}
}
//Day 2+ skills
if(my_daycount() >= 2)
{
if(canUse($skill[Aug. 24th: Waffle Day!]) && !get_property("_aug24Cast").to_boolean())
{
use_skill($skill[Aug. 24th: Waffle Day!]); //get some waffles to hopefully change some bad monsters to better ones
}
if(canUse($skill[Aug. 28th: Race Your Mouse Day!]) && !get_property("_aug28Cast").to_boolean() && ((!auto_hasStillSuit() && item_amount($item[Astral pet sweater]) == 0) || in_small()))
{
if(!is100FamRun())
{
handleFamiliar("stat"); //get any familiar equipped if not in a 100% run
}
use_skill($skill[Aug. 28th: Race Your Mouse Day!]); //Fam equipment
}
}
}

void auto_lostStomach(boolean force)
{
if(!auto_haveAugustScepter() || in_small())
{
return;
}

//Cast Roller Coaster Day if forced to and fullness is greater than 0 and it's available to cast
if (force && my_fullness() > 0 && get_property("_augSkillsCast").to_int() < 5 && !get_property("_aug16Cast").to_boolean())
{
use_skill($skill[Aug. 16th: Roller Coaster Day!]);
}

//Otherwise leave Roller Coaster Day until near the end of the day and it's available to cast
if(fullness_left() == 0 && inebriety_left() == 0 && my_adventures() < 10 && get_property("_augSkillsCast").to_int() < 5 && !get_property("_aug16Cast").to_boolean() && !force)
{
use_skill($skill[Aug. 16th: Roller Coaster Day!]);
}
}
8 changes: 8 additions & 0 deletions RELEASE/scripts/autoscend/paths/legacy_of_loathing.ash
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ boolean lol_buyReplicas()
if(contains_text(page, "2002")) //2023
{
buy($coinmaster[Replica Mr. Store], 1, $item[Replica 2002 Mr. Store Catalog]);
auto_buyFrom2002MrStore();
}
if(contains_text(page, "patriotic eagle") && !is100FamRun()) //If this isn't a 100% familiar run, go ahead and get another familiar
{
buy($coinmaster[Replica Mr. Store], 1, $item[replica sleeping patriotic eagle]);
use(1, $item[replica sleeping patriotic eagle]); // put in terrarium
}
if(contains_text(page, "august scepter")) //2023
{
buy($coinmaster[Replica Mr. Store], 1, $item[replica August Scepter]);
auto_scepterSkills();
}

//End of 2023 "Always Available" IoTMs and starting legacy "one at a time" IoTMs
if(contains_text(page, "<b>2004</b>"))
Expand Down Expand Up @@ -422,6 +428,8 @@ item auto_ItemToReplica(item it)
return $item[replica Cincho de Mayo];
case $item[2002 Mr. Store Catalog]:
return $item[replica 2002 Mr. Store Catalog];
case $item[August Scepter]:
return $item[replica August Scepter];
}
return it;
}
Loading

0 comments on commit 0bc6dc9

Please sign in to comment.