Rollover Adventures

Catch-22

Active member
Hi Guys,

I've written a function that will hopefully return the amount of rollover adventures you'd expect to receive at the next rollover.

PHP:
int rollover_adventures(boolean simOutfit, boolean checkLabor) {
	int adv = 40;
	if (to_boolean(get_property("_borrowedTimeUsed"))) adv -= 20;
	
	string rumpus = visit_url("clan_rumpus.php");
	if (contains_text(rumpus, "rump1_1")) adv += 3;
	if (contains_text(rumpus, "rump2_3")) adv += 5;
	if (contains_text(rumpus, "rump4_3")) adv += 1;
	
	int [item] campground = get_campground();
	if (campground contains $item[Clockwork Maid]) adv += 8;
	if (campground contains $item[Meat Maid]) adv += 4;
	if (campground contains $item[Pagoda]) adv += 3;
	
	if (have_skill($skill[Fashionably Late])) adv += 1;
	
	adv += to_int(get_property("extraRolloverAdventures"));
	
	if (simOutfit) {
		maximize("Adventures", 0, 0, true);
		adv += numeric_modifier("_spec", "Adventures");
	}
	else {
		adv += numeric_modifier("Adventures");
	}
	
	if (checkLabor && gameday_to_string() == "Carlvember 5") adv += 10;
	return adv;
}

Hopefully it's fairly self-explanatory. Script writers, please feel free to use this function in your scripts/libraries. Please credit me if you feel like it.

I've also attached an ASH script which just uses this function and prints out how many adventures you'd be expected to receive, for anyone who feels like testing it.

Things this will account for:
  • Extra adventures earned by familiars.
  • Extra adventures from the clan rumpus room.
  • Extra adventures from campground items (Pagoda, Clockwork Maid, Meat Maid)
  • Extra adventure from Fashionably Late
  • Labór Day if checkLabor is true (I made this optional, because free Labór Day adventures can go above 200, so you might want to ignore them).
  • If simOutfit is true, it will simulate you wearing the best available combination of adventure earning gear at rollover, otherwise it will calculate adventures earned based on your current outfit.
  • Support for borrowed time debt, as of r9840.

Feedback is welcome, let me know if you think I have forgotten to account for something.
 

Attachments

  • rollover_adventures.ash
    1.1 KB · Views: 100
Last edited:

Theraze

Active member
Just a quick point of simplicity... anytime you're modifying a saved int, you can just += or -= the number. So on the Carlvember line, for example,
Code:
adv += 10;
 

Catch-22

Active member
Just a quick point of simplicity... anytime you're modifying a saved int, you can just += or -= the number. So on the Carlvember line, for example,
Code:
adv += 10;

Thanks Theraze :) I forget these things as I'm normally working with far less robust programming languages, haha.
 
Last edited:

Bale

Minion
This is a cute little toy. I like it. Now I just have to make a farming script so that I can use this to optimize the number of turns spent farming so that I always have 200 after rollover.
 
Top