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

LoL dailies & enabling Deck #1303

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
23 changes: 22 additions & 1 deletion RELEASE/scripts/autoscend.ash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
since r27374; // track noncombat forcers
since r27402; // Coinmaster support for Mr. Replica
/***
autoscend_header.ash must be first import
All non-accessory scripts must be imported here
Expand Down Expand Up @@ -1107,6 +1107,27 @@ boolean dailyEvents()
}
}

if(!isActuallyEd() && my_daycount() > 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also check canChew(...) to make sure it can be consumed. Doesn't check spleen left but that is fine. For example this would make it so breath doesn't get pulled in BHY

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to add canChew check for breath before pulling it

{
pullXWhenHaveY($item[Breathitin™], 1, 0);
if (item_amount($item[Breathitin™]) > 0)
{
use(1, $item[Breathitin™]); // get free outdoor fight charges
auto_log_info("Huffing some Breathitin before adventuring for the day. That's the stuff!","blue");
}
}

if(freeCrafts() == 0 && canChew($item[Homebodyl™]) && spleen_left() >= $item[Homebodyl™].spleen)
{
pullXWhenHaveY($item[Homebodyl™], 1, 0);
if (item_amount($item[Homebodyl™]) > 0)
{
use(1, $item[Homebodyl™]); // get free craft charges
auto_log_info("Huffing some Homebodyl and hyperfocusing on kitchen-grade demolitions.","blue");
}
}


auto_getGuzzlrCocktailSet();
auto_latheAppropriateWeapon();
auto_harvestBatteries();
Expand Down
26 changes: 23 additions & 3 deletions RELEASE/scripts/autoscend/iotms/mr2015.ash
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ boolean chateauPainting()

boolean deck_available()
{
return ((item_amount($item[Deck of Every Card]) > 0) && is_unrestricted($item[Deck of Every Card]) && auto_is_valid($item[Deck of Every Card]));
return (((item_amount($item[Deck of Every Card]) > 0) && is_unrestricted($item[Deck of Every Card]) && auto_is_valid($item[Deck of Every Card])) || ((item_amount($item[Replica Deck of Every Card]) > 0) && (in_lol())));
}

int deck_draws_left()
Expand Down Expand Up @@ -644,7 +644,17 @@ boolean deck_draw()
{
return false;
}
string page = visit_url("inv_use.php?pwd=&which=3&whichitem=8382");

string deckItemId = "";
if(in_lol())
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment that this is the replica version specifically for LoL so folks know why we have this if statement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the same comment here that you did for deck_cheat

//replica Deck id for when in Legacy of Loathing

deckItemId = "11230";
}
else
{
deckItemId = "8382";
}
string page = visit_url("inv_use.php?cheat=1&pwd=&whichitem=" + deckItemId);
page = visit_url("choice.php?pwd=&whichchoice=1085&option=1", true);
return true;
}
Expand Down Expand Up @@ -779,8 +789,18 @@ boolean deck_cheat(string cheat)
}
}

string deckItemId = "";

string page = visit_url("inv_use.php?cheat=1&pwd=&whichitem=8382");
if(in_lol())
{
Alium58 marked this conversation as resolved.
Show resolved Hide resolved
//replica Deck id for when in Legacy of Loathing
deckItemId = "11230";
}
else
{
deckItemId = "8382";
}
string page = visit_url("inv_use.php?cheat=1&pwd=&whichitem=" + deckItemId);

// Check that a valid card was selected, otherwise this wastes 5 draws.
if(card != 0)
Expand Down
15 changes: 15 additions & 0 deletions RELEASE/scripts/autoscend/iotms/mr2023.ash
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,18 @@ boolean shouldCinchoConfetti()
// canSurvive checked in calling location. This function is only available to combat files
return true;
}

boolean auto_haveCatalog()
{
// check for normal version
static item catalog = $item[2002 Mr. Store Catalog];
if(auto_is_valid(catalog) && (item_amount(catalog) > 0))
{
return true;
}

// check for replica in LoL path
static item replicaCatalog = $item[replica 2002 Mr. Store Catalog];
return auto_is_valid(replicaCatalog) && (item_amount(replicaCatalog) > 0);

}
15 changes: 12 additions & 3 deletions RELEASE/scripts/autoscend/paths/legacy_of_loathing.ash
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ boolean lol_buyReplicas()
// attempt to buy 2023 IOTM first as if you one them, they are immediately available
// then attempt to buy sequentially year by year starting with 2004
// note with enough progress, can a second option up to year 2012
if(contains_text(page, "cincho")) //2023
if(contains_text(page, "cincho")) //May 2023
{
buy($coinmaster[Replica Mr. Store], 1, $item[replica Cincho de Mayo]);
}
//else if(contains_text(page,"2002")) //June 2023
Alium58 marked this conversation as resolved.
Show resolved Hide resolved
//{
// buy($coinmaster[Replica Mr. Store], 1, $item[Replica 2002 Mr. Store Catalog]); //no mafia support yet, but at least buy it
//}
else if(contains_text(page, "<b>2004</b>"))
{
if(!contains_text(page, "replica dark jill-o-lantern") || !contains_text(page, "replica hand turkey outline"))
Expand Down Expand Up @@ -206,13 +210,18 @@ boolean lol_buyReplicas()

void auto_LegacyOfLoathingDailies()
{
if(item_amount($item[replica Libram of Resolutions]) > 0)
if(item_amount($item[replica Libram of Resolutions]) > 0 && get_property("_replicaResolutionsLibramUsed") == "false")
{
use(1, $item[replica Libram of Resolutions]); // get items
}

if(item_amount($item[replica Smith\'s Tome]) > 0)
if(item_amount($item[replica Smith\'s Tome]) > 0 && get_property("_replicaSmithsTomeUsed") == "false")
{
use(1, $item[replica Smith\'s Tome]); // get items
}

if(item_amount($item[Replica 2002 Mr. Store Catalog]) > 0 && get_property("_2002MrStoreCreditsCollected") == "false")
{
use(1, $item[Replica 2002 Mr. Store Catalog]); //get catalog credits
}
}
14 changes: 14 additions & 0 deletions RELEASE/scripts/autoscend/quests/level_05.ash
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ boolean L5_getEncryptionKey()
}
}

if(!isActuallyEd() && canChew($item[Breathitin&trade;]) && spleen_left() >= $item[Breathitin&trade;].spleen))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra paren at the very end causing checks to fail

{
pullXWhenHaveY($item[Breathitin&trade;], 1, 0);
if (item_amount($item[Breathitin&trade;]) > 0)
{
use(1, $item[Breathitin&trade;]); // get free outdoor fight charges
auto_log_info("Huffing some Breathitin before looking for the encryption key. That's the stuff!","blue");
}
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for else

{
auto_log_info("Couldn't pull a Breathitin. Be a lot cooler if we could.","red");
}
}

auto_log_info("Looking for the knob.", "blue");
return autoAdv($location[The Outskirts of Cobb\'s Knob]);
}
Expand Down
9 changes: 9 additions & 0 deletions RELEASE/scripts/autoscend/quests/level_09.ash
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,16 @@ boolean L9_chasmBuild()
// 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"))));

// pull a keepsake box if we can
pullXWhenHaveY($item[smut orc keepsake box], 1, 0);
if (item_amount($item[smut orc keepsake box]) > 0)
{
use(1, $item[smut orc keepsake box]); // get bridge parts
auto_log_info("Pulled a smut orc keepsake box and opened it. Ew.","blue");
}

// use any keepsake boxes we have

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah you must have been thinking about putting it here already. This is the spot attempting to pull should go

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty for moving it to here. Also delete your if statement. It is duplicate of the next line after it

if(item_amount($item[Smut Orc Keepsake Box]) > 0 && auto_is_valid($item[Smut Orc Keepsake Box]))
{
use(1, $item[Smut Orc Keepsake Box]);
Expand Down