pyramid.ash -- Disable links in the pyramid that might be bad

heeheehee

Developer
Staff member
So yeah, I felt like whipping this one up mid-run, since I thought "hey, why not?". Basically, it disables the links to the lower chambers unless it'll advance the quest (similarly, it disables the link to the middle chambers if you've already used the bomb but haven't defeated Ed yet. I ran into this one run, and it sucked -- your progress literally gets reset.)

Note that in order for this to work after choice adventures, you must save an additional copy of this script in your relay folder as "choice.ash". I don't know why, but I can't seem to add a second attachment.
NOTE: If you do so, please add the following line after "results.append(visit_url());":
PHP:
if(results.index_of("pyramid.php")==-1) exit;

Final update: Link for Turn Ratchet is now working and automatically refreshes the page. Note that it doesn't have some visual notification that this has happened. Also, since it directly visits the URL, it does not refresh your inventory.

20100603: Okay, I lied. Here's another (now, hopefully final) update that prompts if you want to fight Ed iff you have a counter that would expire within the next six turns (and therefore occur up to seven turns from now). Untested, so please don't yell at me if it doesn't work. I'd like someone to test this (easiest test would be use a dance card, then try to fight Ed. Refresh the page beforehand, of course.)

Also bundled with this update is the crude table comparing ratchets to available noncombat rate (fixed an unreported bug where it would double-count NC-modifying skills if you had them active).

20100617: Okay, I promise, here's the last update, unless someone finds a bug. Fixed the "Turn Ratchet" link.
 

Attachments

  • pyramid.ash
    2.8 KB · Views: 180
Last edited:

StDoodle

Minion
My big one is accidentally clicking the upper chamber when I'm scrolling and / or trying to go back to the beach so I can refresh the lower chamber picture.
 

heeheehee

Developer
Staff member
Ehh, but some people actually use the upper chambers (read: ratchet farming). The only way I'd implement this would be with a toggle (i.e. when you click it, it switches between "Disable Upper" and "Disable Middle" or something like that). But that's too much work for now, IMO.
 

slyz

Developer
I didn't try this out, but I agree that only clicking on the lower chamber should be disabled when appropriate.
 

heeheehee

Developer
Staff member
At the moment, it disables the upper and middle chamber links if there's something to be done in the lower chamber. All other times, lower chamber is disabled. I suppose the only time it wouldn't help would be if you're spamming "Adventure Again" with complete disregard for the pyramid images (or perhaps clicking the last adventure link), but that'd be your problem, not mine.
 

StDoodle

Minion
Oh, I wasn't trying to say that it should be changed for me. Just pointing out that I tend to screw up in unique ways. :p
 

heeheehee

Developer
Staff member
Just for you, I added a "Refresh page" link at the bottom of the page in the new version. Yay for lazy fixes!
 

Muhandes

Member
Love this one. I just arrived at the pyramid and not worrying so much about making a mistake really helps. Thanks!
 

xKiv

Active member
Suggestions from http://kolmafia.us/showthread.php?4068-Pyramid-Awareness-of-Wheel-State-in-Relay :
bale said:
Makes me nervous also. It might be nice if there was a [turn ratchet] link on that page which updates the image of the chamber when you click it.
xKiv said:
Yes, please.
Also, only show that link if
1) the current wheel position isn't "nice"
OR
2) you already have this position's result

(i.e. don't let me turn a ratchet when I should be going into the lower chamber instead)
 

xKiv

Active member
Bug! This script prevents me from (relay) adventuring in the upper/middle chambers after defeating Ed ... blocking the ability to get powdered organs for the NS tower.
 

heeheehee

Developer
Staff member
Huh. Will fix ASAP.

Edit: Since it's the same image, what's the best way to check for Ed completion? (I was thinking inventory -- confetti, perhaps, but that could return a false positive if it's pulled from storage)
 
Last edited:

icon315

Member
check the council maybe?

EDIT: Check the quest log for

"The mighty Ed the Undying has fallen! You recovered the Holy MacGuffin! Jolly good show, mate! "

EDIT2:do something like this
PHP:
 buffer QuestLog = visit_url("questlog.php?which=2");

      if (!contains_text(QuestLog, "The mighty Ed the Undying has fallen!"))
(Yada Yada Yada)
 
Last edited:

heeheehee

Developer
Staff member
Mmft, but that requires server hits -- every single time that page is loaded (after Ed comes up), that's an extra, unneeded server hit. I think I'll go with the confetti, but add a note that it doesn't work for that corner case (who the heck plays softcore anyway?).
 

icon315

Member
maybe you can save the info of Ed being completed in a .txt file, and have it be deleted after ascension. that way it checks the file before it checks the questlog
 

heeheehee

Developer
Staff member
Okay, temporary fix for the relay adventuring after defeating Ed. Link for "Turn Ratchet" is added, but it doesn't redirect you to the pyramid page, yet. That'll take a little longer.
 

heeheehee

Developer
Staff member
Okay, the Turn Ratchet link should be fully functional (automatically refreshes the page). Note that it doesn't have some visual notification that this has happened, so pay attention when you're clicking the link. Also, it doesn't refresh your inventory because it directly visits inv_use.php. (The first problem isn't too worrisome, but the second one is why this might be better as a low-priority feature for the Mafia devs to implement.)
 

lostcalpolydude

Developer
Staff member
Checking for confetti will return a false negative if the person autosells it, which is possibly fairly common.
 
Last edited:

heeheehee

Developer
Staff member
That too. Heck, I don't know how to check without generating a bunch of extra server hits or adding a new preference. Actually, adding a new preference would possibly be the best way, but it'd be a bunch of server hits until the new preference is set.
 
Top