Skip to content

Commit

Permalink
* boolean L8_trapperGroar() fixes
Browse files Browse the repository at this point in the history
 * cleanup the code for checking for groar issues.
 * added potential catching of insufficient cold res causing inf loop
 * abort and inform player to finish it and report the issue.
 * added option to ignore it for rest of day and go do other stuff
  • Loading branch information
taltamir committed Sep 4, 2023
1 parent d0df789 commit aba2be3
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions RELEASE/scripts/autoscend/quests/level_08.ash
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,11 @@ boolean L8_trapperGroar()
{
return false; // peak not yet unlocked or we are done with groar
}
if(get_property("_auto_skip_L8_trapperGroar").to_boolean())
{
auto_log_warning("Skipping L8_trapperGroar() today as per _auto_skip_L8_trapperGroar");
return false;
}

// error catching for if we are actually on step5 and mafia did not notice.
if(item_amount($item[Groar\'s Fur]) > 0 || item_amount($item[Winged Yeti Fur]) > 0 || item_amount($item[Cursed Blanket]) > 0)
Expand Down Expand Up @@ -724,14 +729,40 @@ boolean L8_trapperGroar()
}
if(retval && initial_adv == my_session_adv())
{
// if mafia tracking failed to advance quest then it will get stuck in an inf loop of trying to adv in [Mist-shrouded Peak]
// which becomes an invalid zone after groar dies. being replaced with the new zone called [The Icy Peak]
//several inf loops can occur here
auto_log_debug("Adventured without spending an adv in [Mist-shrouded Peak]. Checking for problems", "blue");
int initial_step = internalQuestStatus("questL08Trapper");
auto_log_debug("Adventured without spending adv in [Mist-shrouded Peak]. checking quest status", "blue");
string initial_s = get_property("questL08Trapper");
cli_execute("refresh quests");
if(initial_step == internalQuestStatus("questL08Trapper"))
int current_step = internalQuestStatus("questL08Trapper");
string current_s = get_property("questL08Trapper");
boolean track_error = initial_step != current_step;
if(track_error) //quest tracking was wrong and fixed.
{
if(current_step > 4) //boss is actually dead now
{
// if boss is dead [Mist-shrouded Peak] becomes [The Icy Peak].
// common tracking issue which casue inf loop. already fixed by a the quest refresh.
auto_log_warning("questL08Trapper value was incorrect. Boss is already dead. This has been fixed to prevent inf loop", "blue");
}
else auto_log_warning("questL08Trapper value was incorrect. This has been fixed", "blue");
}
else auto_log_debug("questL08Trapper value was correct despite oddity with adv spent");
if(current_step == 3 || current_step == 4)
{
auto_log_warning("questL08Trapper value was incorrect. This has been fixed", "blue");
// boss is still alive yet no adv was spent. most likely scenario is that our cold res was too low. maybe free combat?
if(get_property("_auto_inf_counter").to_int() > 5)
{
print("We are stuck trying to adventure in [Mist-shrouded Peak] and failing repeatedly","red");
print("Probably a problem with cold res. Please report this issue.","red");
print("Finish the peak yourself then run autoscend again","red");
print("If you wish to have autoscend ignore this and go do other stuff then enter in gCLI:","red");
print("set _auto_skip_L8_trapperGroar = true","red");
abort();
}
}
}
return retval;
Expand Down

0 comments on commit aba2be3

Please sign in to comment.