Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Sept-Ember Censer #1516

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,7 @@ boolean dailyEvents()
auto_useBlackMonolith();
auto_scepterSkills();
auto_getAprilingBandItems();
auto_buyFromSeptEmberStore();

return true;
}
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 @@ -571,6 +571,9 @@ boolean auto_MayamClaimAll();
boolean auto_haveRoman();
boolean auto_haveBatWings();
boolean auto_canLeapBridge();
boolean auto_haveSeptEmberCenser();
int remainingEmbers();
void auto_buyFromSeptEmberStore();

########################################################################################################
//Defined in autoscend/paths/actually_ed_the_undying.ash
Expand Down
67 changes: 67 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2024.ash
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,70 @@ boolean auto_canLeapBridge()
}
return true;
}

boolean auto_haveSeptEmberCenser()
{
if(auto_is_valid($item[Sept-Ember Censer]) && available_amount($item[Sept-Ember Censer]) > 0 )
{
return true;
}
return false;
}

int remainingEmbers()
{
if(!auto_haveSeptEmberCenser())
{
return 0;
}
if(!get_property("_septEmberBalanceChecked").to_boolean())
{
// go to ember shop to check our balance
use($item[Sept-Ember Censer]);
}
return get_property("availableSeptEmbers").to_int();
}

void auto_buyFromSeptEmberStore()
{
if(remainingEmbers() == 0)
{
return;
}
auto_log_debug("Have " + remainingEmbers() + " embers(s) to buy from Sept-Ember Censer. Let's spend them!");
// get structural ember if can't cross bridge
item itemConsidering = $item[Structural ember];
if(remainingEmbers() >= 4 && get_property("chasmBridgeProgress").to_int() < bridgeGoal() &&
!get_property("_structuralEmberUsed").to_boolean() && auto_is_valid(itemConsidering))
{
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
use(itemConsidering);
}
// get 1 bembershoot to support mouthwash leveling or general quest help
itemConsidering = $item[bembershoot];
if(remainingEmbers() >= 1 && !possessEquipment(itemConsidering) && auto_is_valid(itemConsidering))
{
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
}
// mouthwash for leveling
itemConsidering = $item[Mmm-brr! brand mouthwash];
if(remainingEmbers() >= 2 && (my_level() < 13 || get_property("auto_disregardInstantKarma").to_boolean()) && auto_is_valid(itemConsidering))
{
// get as much cold res as possible
int [element] resGoal;
resGoal[$element[cold]] = 100;
// get cold res. Use noob cave as generic place holder
provideResistances(resGoal, $location[noob cave], true);
equipMaximizedGear();
// buy mouthwash and use it
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
use(itemConsidering);
}
// if still have embers, get hat for mp regen
itemConsidering = $item[Hat of remembering];
if(remainingEmbers() >= 1 && !possessEquipment(itemConsidering) && auto_is_valid(itemConsidering))
{
buy($coinmaster[Sept-Ember Censer], 1, itemConsidering);
}
// consider throwin' ember for banish or summoning charm for pickpocket in future PR
}
Loading