bumcheekcity and hippoking's Rollover Management Script

bumcheekcity

Active member
bumcheekcity and hippoking's Rollover Management Script 0.63

What does this do?
This script will optimize your equipment for maximum rollover adventures, taking into account the time outfit, DFSS, a disembodied hand and grimacite strength. It will check whether the rollover MP you gain from your dwelling will be wasted, and it will check whether you've used:
  • Still Upgrades
  • Softcore Pulls
  • Skills (ACC, ASC, Pasta, Stickers/Snowcones, Rainbow's Gravity and Librams)
  • Drunk/Full/Spleen
  • Pool Table in VIP Room
  • Zap Wand
Special thanks to hippoking, who wrote most of it.

How do I use it?
Make sure you have Zlib.
That's it. Just run it. It'll change your equipment, and print out some stuff.

What does it look like?
rollover.jpg


Changelog
v0.5 - Released it.
v0.55 - Fixed bug in maximiser code and wand code. Various extra checks.
v0.56 - Fixed bug in hot tub check
v0.6 - Uses inbuilt maximiser. Oscus soda.
v0.61 - Maximizer now uses -tie
v0.62 - Checks brickos, sugar, carboloading
v0.63 - Ooh, I dunno. Other stuff.
 

Attachments

  • rollover.ash
    9.1 KB · Views: 798
Last edited:

Bale

Minion
Bravo. I particularly like the part that optimizes rollover equipment. I've been wanting to write something like that for a while.

Just thought I'd share something with you. Feel free to make any use of this that you might desire. Or ignore it if you've got no use for it.

Code:
// This will burn mp down to min_mp by using up libram casts.
void libram(int min_mp) {
	// choose a libram to use. It can be "heart", "song", "favor" or "random". 
	// Unfortunately It does not check to see if you have the libram.
	string choice = "song";
	
	// start summoning!!
	skill libram = $skill[Summon Party Favor];
	if(choice == "heart")
		libram = $skill[Summon Candy Heart];
	else if(choice == "song")
		libram = $skill[Summon Love Song];
	if(have_skill(libram)) {
		int mptotal = mp_cost(libram);
		if(my_mp() - mptotal > min_mp) {
			int x = (square_root(8 * mptotal -7)+1) /2;
			int y = x;
			while (my_mp() - mptotal > min_mp) {
				y = y +1;
				mptotal = mptotal + y * (y - 1) /2 +1;
			}
			y = y - x;
			if(choice == "random") {
				int rand = random(2);
				if (rand ==0) {
					use_skill(ceil(y/3.0), $skill[Summon Candy Heart]);
					use_skill(floor((y+1)/3.0), $skill[Summon Party Favor]);
					use_skill(floor(y/3.0), $skill[Summon Love Song]);
				} else if (rand == 1) {
					use_skill(ceil(y/3.0), $skill[Summon Party Favor]);
					use_skill(floor((y+1)/3.0), $skill[Summon Love Song]);
					use_skill(floor(y/3.0), $skill[Summon Candy Heart]);
				} else {
					use_skill(ceil(y/3.0), $skill[Summon Love Song]);
					use_skill(floor((y+1)/3.0), $skill[Summon Candy Heart]);
					use_skill(floor(y/3.0), $skill[Summon Party Favor]);
				}
			} else use_skill(y, libram);
		}
	}
	print("You have used your librams to summon "+ int_to_string( to_int(square_root(8 * mp_cost(libram) -7)/2 + 0.5))+ " items today.", "blue");
}

void burnoff_mp() {
	boolean fratnuns = get_property("sidequestNunsCompleted") == "fratboy";
	int mpAutoRecoveryTarget = ceil(my_maxmp() * to_float(get_property("mpAutoRecovery")) +1 );
	if(fratnuns && to_int(get_property("nunsVisits")) < 3) {
		if(have_effect($effect[Leash of Linguini]) < 1000)
			use_skill( (my_mp() - mpAutoRecoveryTarget)/ mp_cost($skill[Leash of Linguini]), $skill[Leash of Linguini]);
		else libram(mpAutoRecoveryTarget);
	}
	int disco = to_int(have_skill($skill[Disco Nap])) + 2* to_int(have_skill($skill[Disco Power Nap]));
	while(to_int(get_property("timesRested")) < disco)
		cli_execute("rest");
	while( fratnuns && to_int(get_property("nunsVisits")) < 3 ) {
		if(have_effect($effect[Leash of Linguini]) < 1000)
			use_skill( my_mp()/ mp_cost($skill[Leash of Linguini]), $skill[Leash of Linguini]);
		else libram(mpAutoRecoveryTarget);
		cli_execute("nuns");
	}
}

Dang. I ought to fix that up for more general use some day. Though it works well enough for my purpose that I have little incentive.
 
Last edited:

mredge73

Member
Hey, you should add a check to see if the summoning chamber has been used yet

Here is my function to summon drinks from my Hardcore Daily Inventory Control script, it could easily be modified to be used as information only:
Code:
//Summon Ak'gyxoth
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
string SummonDrinks()
{    
    if(    possessItem($item[scroll of ancient forbidden unspeakable evil]) &&
        item_amount($item[thin black candle])>=3 &&
        my_level()>10 &&
        possessItem($item[your father's macguffin diary]) &&
        visit_url("manor.php").contains_text("sm8b.gif") &&
        visit_url("manor3.php").contains_text("chamber.gif") )
    {
        if (get_property("demonSummoned")=="true")
        {    
            print("You've already summoned a demon today!","blue");
            return "";
        }
        else
        if(user_confirm("Summon Ak'gyxoth?"))
        {
            cli_execute("summon Ak'gyxoth");
            print("Summoned Ak'gyxoth!","blue");
            //visit_url("manor3.php?place=chamber&demonname=Ak'gyxoth&action=summon");    
            return "You Summoned Ak'gyxoth! <br />";
        }
    }
    return "";
}
 

kain

Member
I summon drinks on logout, too, but only in aftercore ... so as to not inadvertently burn scrolls or candles that I might need later.

Also, doesn't "equipt.ash Adventures" essentially duplicate the functionality for rollover adventures? I don't have any time stuff anymore, so I don't know how it works, or how well it works with time gear, but it doesn't have any problem figuring out when the depleted grimacite stuff is better or worse than my various watches.
 

Bale

Minion
equipt Adventures certainly does duplicate that functionality. The only problem is that it takes a while to run. Sometimes I'd rather have something fast, yet more limited.
 

mredge73

Member
For some reason it is not detecting that I used my wand for the day, it is printing "wand is cold" but I have used it.

you can borrow a couple of my wand functions from my inventory script if you like:
Code:
//Find Wand
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
int FindWand()
{
    int wand=0;
    for i from 1268 to 1272
    { 
        if (haveItem(to_item(i)))
            wand = i;
    }
    return wand;
}

//checks if the wand was used today
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
boolean WandUseable(int wand)
{
    if (wand==0)
        return false;
    if (contains_text(visit_url("wand.php?whichwand="+wand),"feels warm")) 
        return false;
    else
        return true;
}

To use:

if(WandUseable(FindWand()))
print("Your Wand is cold");
else
print("You have Zapped once Today");
 
Last edited:

bumcheekcity

Active member
Thanks for the advice, I'll fix the wand thing (and do the summoning chamber), but surely the above code wouldn't check if you'd used the wand TWICE in a given day (because then it doesn't tell you it's warm, and does tell you to be careful).
 

mredge73

Member
yea
I have been meaning to fix that...

Code:
//checks if the wand was used today
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
boolean WandUseable(int wand)
{
    if (wand==0)
        return false;
    string cachepage=visit_url("wand.php?whichwand="+wand);
    if (contains_text(cachepage, "feels warm") || contains_text(cachepage, "be careful")) 
        return false;
    else
        return true;
}
 

Marcyroni

New member
It looks like if you only have access to sword behind + depleted grimacite gear, the script aborts after equipping the sword because "you can't equip an offhand item while wielding a 2-handed weapon." It would be great if the script continued and picked the one with highest adventures, or just skipped the offhand equip.

I have issues equipping a gravy boat when I have time gear as well (offhand is left blank). Disembodied hands aren't switched to either, if one is available (+ time sword). In the situation with time gear + depleted grimacite stuff, my offhand ends up empty as well. Otherwise, great script! I like the reminders of things to do (most of which I never remember).
 

zarqon

Well-known member
Nice script! A few suggestions for thoroughness:

1. I don't know if it's possible to figure out if the clan jukebox buff is still available, but if so, that could be included as well.

2. You could also check Summon Burrowgrub casts (accessible in mafia settings). Otherwise, that's free HP/MP gone to waste. The HP doesn't do much good if you're already topped off, but there are plenty of uses for MP.

Speaking of, I've been intending for a while to write something into my logout script that checks Nuns and Burrowgrub, and if there are MP restores available, switch to a +maxMP outfit (possibly also with -MPcost) and use those restores to full advantage, casting daily skills and available buffs (at the very least, the trivial skill, but I would write the script to hierarchically prefer bookshelf skills, summoning skills, and other available buffs), repeating the cast/restore process as necessary until finally leaving me with just enough MP that rollover will top me back off.

I'll probably borrow significantly from this script whenever I get around to that, so thanks in advance for saving me a good bit of work! I'll try to remember to post that bit of my logout script here whenever I get it written.

EDIT: Yeah... you already check the friars/arena/nuns. Nice.

ANOTHER EDIT: In the section where you check restore from your housing, you may want to auto-use the frobozz house if for some reason it's still sitting in inventory. It's a quest item, there's no reason someone shouldn't use it.
 
Last edited:

HippoKing

Member
I'll put some time into this tomorrow. I'm pretty sure I can't check jukebox buffs (in the same way that Snack Machine drops and Telescope buffs can't be checked).

I'll have a look at adding the Burrowgrub stuff and fixing the wand code. There is also at least one bug in the adventure maximizer (situation where Sword behind is best in hands, but Gravy Boat is owned), which I'll look at fixing.

As for the Frobozz house, I won't auto-use it (I prefer this script as not doing anything non-reversible except visiting the BHH), but I'll certainly add the information (it already tells you if you forgot to buy a tent day 1, no reason it shouldn't tell you you forgot to use your house).

Most importantly, if anyone finds any bugs with the adventure maximizer, tell us. Neither me nor BCC own the Time Outfit, which means that testing it is somewhat tricky.

edit: Actually I can probably check most of that stuff using properties. I've written fixes for the known bugs and added the suggested demon, house and burrowgrub reminders. v0.55 will probably come out tomorrow with that stuff and hopefully a few more checks (clan hall stuff and telescope).
 
Last edited:

Sputnik1

Member
Wielding sword behind inappropriate prepositions...
Equipment changed.
You can't equip an off-hand item while wielding a 2-handed weapon.

For some odd reason, the script wont ignore either the sword or the offhand grimacite item I have based off of which would be better, it wants to somehow use both.
 

HippoKing

Member
Wielding sword behind inappropriate prepositions...
Equipment changed.
You can't equip an off-hand item while wielding a 2-handed weapon.

For some odd reason, the script wont ignore either the sword or the offhand grimacite item I have based off of which would be better, it wants to somehow use both.

I fixed that last night, I'll post the update later today.

edit: OK, 0.55 released. The bug mentioned has been fixed, as has the problem with the wand code. It now additionally checks:
  • Burrowgrubs
  • Demons
  • Telescope buff
  • If you have an instant house in inventory and a worse one at campground.
  • If you can still use your hot tub today

I couldn't work out how to check the Jukebox and Snack Machine. I can't see properties for them in Mafia (I may just not have found them) or see how to check them without.

As always, if you find any issues, please tell us.

edit again: And 0.56 because it would tell you to soak when you had no VIP key.
 
Last edited:

Sputnik1

Member
Checking for updates (running bumcheekcity and hippoking's Rollover Management Script ver. 0.56)...
_version_bumcheekcityroll => 0.56
Wielding sword behind inappropriate prepositions...
Equipment changed.
Verifying ingredients for time sword (1)...
You need 1 more petrified time to continue.
Desired purchase quantity not reached (wanted 1, got 0)
Purchasing sword hilt (1 @ 100)...
You acquire an item: sword hilt
Purchases complete.
You need 1 more time sword to continue.

Why would the script try to buy the ingredients for the time sword?
 

Sputnik1

Member
i should be wearing...

sword or gravy boat
dead guy's memento
weightlifting belt
grappling hook

dont know if the debug log gonna help
 

Attachments

  • DEBUG_20090811.txt
    159.4 KB · Views: 614

zarqon

Well-known member
Actually, with the advent of the Modifier Maximizer, I think you can probably reduce the entire outfit-switching section of this script to a simple

cli_execute("maximize adv");

It looks like it takes the time outfit bonus into consideration. I don't know about the variable stuff like grimacite.
 

Bale

Minion
Maximize does take the time outfit bonus and depleted grimacite into consideration. It's one failing is that it won't take the possibility of a disembodied hand into account, so a little bit of fine-tuning is still needed.
 

zarqon

Well-known member
Then, other than weapons, the rest of the outfit could still be handled by maximize. There may be some additional switching needed if the time outfit bonus is lost when giving the time sword to your Hand (assuming you have a sword between and only one time sword), but it would still save quite a lot of steps (in particular, all the data fiddling this script does with accessories) to start from a maximized outfit.

I'd actually overlooked using my Hand for additional adventures. Doh! Putting that in my logout script right now. And dang it -- I need another friggin time sword!

EDIT: I just scraped up a function for my purposes (I don't have any grimacite items), meant to be called after maximizing. If you have both a time sword and a sword behind, it will swap your time sword to your Hand, and equip the sword behind on you. It will not swap if you are dual-wielding time swords. The good news is that I think Maximize won't unequip your time sword from your Hand so if you only use your Hand for rollover adventures you will only suboptimally switch things around the first time.

EDIT 2: Took care of the first issue I mentioned below. Still doesn't consider gravy boats.

Code:
boolean time_on_hand() {
   if (!have_familiar($familiar[disembodied hand])) return true;
   if (familiar_equipped_equipment($familiar[disembodied hand]) == $item[time sword]) {
      use_familiar($familiar[disembodied hand]);
      if (familiar_equipped_equipment($familiar[disembodied hand]) == $item[time sword])
         return true;
   }
   if (item_amount($item[time sword]) == 0 && item_amount($item[sword behind inappropriate prepositions]) > 0 && equipped_amount($item[time sword]) == 1)
      equip($item[sword behind inappropriate prepositions]);
   if (item_amount($item[time sword]) > 0) {
      use_familiar($familiar[disembodied hand]);
      return equip($slot[familiar],$item[time sword]);
   } else return true;
}
 
Last edited:
Top