Feature - Implemented Add an outfit switcher pulldown menu to the Ferny Basement stat gain adventures

antimarty

Member
I like to wear stat gain booster equipment for the basement stat gain adventures (e.g. fake washboard and trench coat for muscle gains), and also mp regen stuff - it would be nice to be able to swap outfits from the relay browser when those adventures come up every fifth level. The pulldown menu is already available for the other levels.
 

ckb

Minion
Staff member
Another option (to automate this process for you) if you make a relay script that automatically switches your outfit when you hit those stat gain pages.
A proof-of-concept basement.ash might look like this:

PHP:
void main() {
	buffer page = visit_url();
	
	if ( contains_text(page,"Got Silk") || contains_text(page,"Save the Dolls") || contains_text(page,"Take the Red Pill") ) {
		outfit("statgain");
	}
	
}

The basement is a great place to take advantage of this type of relay script that runs commands based on the contents of a page, but does not necessarily modify the page itself.
 

Veracity

Developer
Staff member
Huh. I dove 409 levels in the Relay Browser, a couple of days ago, and I forgot to look into this.

It took me from level 13 to level 20. I'll go the rest of the way to 500 sometime in December, probably, when I have naturally leveled up enough to not need expensive consumables. I'll try to remember to look into this at that time.

ckb's idea is good. I haven't written any relay scripts, though. Do you need to "write" the page that you got with visit_url, even if you don't modify it?
 

ckb

Minion
Staff member
As far as I know, a relay script is at heart just an ash script run when a specific page is loaded. No need to actually modify or write() or even load the url. You can include any ash commands in this script that are valid to be run - this includes outfit changes, or maximize, or printing something to the CLI.

My basement relay script includes automatic outfit changing and some statistic output I decorate the page with.

I included my basement.ash relay script for reference (disclaimer: I wrote this long ago and have not used it lately).
 

Attachments

  • basement.ash
    5.3 KB · Views: 16

Veracity

Developer
Staff member
Easiest for me. I could split the helpers into individual functions and call only the one, but, whatever.
 
Top