loathers / autoscend

An ascension script for KoLMafia
Other
45 stars 67 forks source link

Exploathing tower door key crafting is different #107

Closed taltamir closed 4 years ago

taltamir commented 4 years ago

Context

Expected/Desired Behavior

When it comes time to open the sorceress tower door, acquire the 6 keys and open the door.

Current Behavior

After crafting the skeleton key and the richard's star key, it errors out. I have all the ingredients and if I click on "quests>tower door" then mafia will automatically craft the missing 4 keys and open the door.

The issue is that autoscend seems to not realize that in exploathing it needs to get these keys in Cosmic Ray's Bazaar, instead it tries to craft them either in the daily dungeon vending machine (for the 3 hero keys) or the crackpot mystic (the digital key) which fails because both of those zones are inaccessible in exploathing runs

Failure Logs

below is the error with which autoscend quits

You acquire an item: Richard's star key
That item cannot be created.
Stack trace:
  at doTasks (autoscend.ash:14987)
  at auto_begin (autoscend.ash:15128)
  at safe_preference_reset_wrapper (autoscend.ash:15200)
  at safe_preference_reset_wrapper (autoscend.ash:15207)
  at safe_preference_reset_wrapper (autoscend.ash:15207)
  at safe_preference_reset_wrapper (autoscend.ash:15207)
  at main (autoscend.ash:15235)

below is the result if using Quests>Tower Door in mafia

Visiting the Cosmic Ray's Bazaar...
You acquire an item: Boris's key
Cosmic Ray's Bazaar successfully looted!
Visiting the Cosmic Ray's Bazaar...
You acquire an item: Jarlsberg's key
Cosmic Ray's Bazaar successfully looted!
Visiting the Cosmic Ray's Bazaar...
You acquire an item: Sneaky Pete's key
Cosmic Ray's Bazaar successfully looted!
Visiting the Cosmic Ray's Bazaar...
You acquire an item: digital key
Cosmic Ray's Bazaar successfully looted!
Tower Door: Boris's lock
Tower Door: Jarlsberg's lock
Tower Door: Sneaky Pete's lock
Tower Door: star lock
Tower Door: digital lock
Tower Door: skeleton lock
Tower Door: doorknob
Tower Door open!
jeparo commented 4 years ago

the following snippet is not safe (needs "do you have loot tokens" checking and so on) but does 90% of the work:

if(item_amount($item[digital key]) == 0) {
    visit_url("shop.php?whichshop=exploathing&action=buyitem&quantity=1&whichrow=1090&pwd", true);
}
if(item_amount($item[Boris\'s key]) == 0) {
    visit_url("shop.php?whichshop=exploathing&action=buyitem&quantity=1&whichrow=1093&pwd", true);
}
if(item_amount($item[Jarlsberg\'s key]) == 0) {
    visit_url("shop.php?whichshop=exploathing&action=buyitem&quantity=1&whichrow=1094&pwd", true);
}
if(item_amount($item[Sneaky Pete\'s key]) == 0) {
    visit_url("shop.php?whichshop=exploathing&action=buyitem&quantity=1&whichrow=1095&pwd", true);
}
macgregor commented 4 years ago

Should have been autoclosed by #111