Rollover Management

Pazleysox

Member
I've been working on this script for quite some time. I think I finally have all the qwerks worked out of it.

This script does a LOT of stuff for you. It will check all of mafia's daily deeds, all once a day skills, use-able items, free fights, etc, and give you a print out of what you have available to do. It is also setup to maximize your rollover turns.

It will pull upto 3 cards from your deck, it will get you a spacegate vaccine of your choice, it will check all free drops from all of your familiars, it will tell you how your source terminal is doing, if it's not fully upgraded, it will tell you what you need to make it so. The script will also burn most of your MP to re-buff your character. It will NOT use any meat during this process, UNLESS YOU WANT IT TO (beware this is EXTREMELY dangerous). The script will also make sure all of your daily deeds have been completed.

This script can be run in Hardcore, Softcore, or Aftercore. Since it looks at what you currently have available. It will spend 0 turns, and 0 meat, so feel free to try it out!

Below is a list of properties that are user configurable. If you wish to change any of the properties of the script, to change what it does, or the final output, you can!

set_property ("ps_cheatdeckcard1", "ancestral recall"); // Three turns is great!
set_property ("ps_cheatdeckcard2", "island"); // 6 turns is even better!
set_property ("ps_cheatdeckcard3", "1952 Mickey Mantle"); // 10k meat is ALWAYS a nice bonus. :)
set_property ("ps_spacegateVaccine", "3"); // 1 rainbow +3 each element resist, 2 +50% each stat, or 3 +30 monster level
set_property ("ps_manaburn", "true"); // set this to false if you don't want to burn your free MP restorers - TRUE SETTING WILL NOT USE MEAT!
set_property ("ps_geniewish1", "more wishes");
set_property ("ps_geniewish2", "more wishes");
set_property ("ps_geniewish3", "more wishes");
set_property("ps_checkfamiliar", "true"); // set this to false if you don't want to know about familiar free drops, and free runaways
set_property("ps_checksource", "false"); // set this to false if you don't want to know about your Source Terminal
set_property("ps_dailydeeds", "true"); // set this to false if you don't want to do all daily deeds
set_property("ps_rollover", "turns"); // set this to turns for rollover turns or pvp for pvp fights
set_property("ps_preferences_set", "true");


I must say the following:
This script was originally written by bumcheekcity and hippoking
Designed to optimise rollover adventure amounts and remind you to do daily stuff.
With great thanks to hippoking.
...who actually wrote most of it.
Also, thanks to TH3Y who added some stuff.

I did a major overhaul of the script, but there's still (some) original code.
Code:
svn checkout  https://svn.code.sf.net/p/rollover-management/code/

There are 3 support scripts that are included. First is miner.ash, which I updated, Second is snojo.ash, and Third is witchess_solver.ash. Miner.ash is used if you have the "Unaccompanied Miner" skill, and an outfit to mine with. Snojo.ash will any free fights you have available, and witchess_solver will solve your witchess puzzles, if you have it.

Please let me know if you have any errors with this script, or if you happen to find something I might have missed.


VERSION:
1.00 - 9/2/17 MAJOR re-write, and update, to speed up script, and reduce server hits (PazSox)
1.01 - 9/3/17 added dependencies.txt to include zlib.ash
1.02 - 9/3/17 Fixed License to Chill use bug, and updated error with dependencies.txt
1.03 - 9/7/17 Minor bug fixes with tomes castings, and airports not working properly
1.04 - 9/9/17 Fixed bug where script always said DMT were available, and some issues with checking inebriety
1.05 - 9/13/17 Added support for Genie Wishes
1.06 - 1/7/18 Fixed MP burning bug, and trying to fight chateau monster, without access
1.07 - 3/29/18 Fixed bug with fax machine in an Avatar run, and bugs where it always thought you had genie wishes, and would never get spacegate vaccine. Also added support for Madame Zatara
1.08 - 4/10/18 Will now use genie wishes, if available. Fixed issue with miner.ash script, few small things
1.09 - 4/17/18 Fixed bugs with the scripts properties being looked at wrong, added ability to maximize PVP fights now, instead of adventures.
1.10 - 4/18/18 Added rollover turns to +PVP fights if you don't have enough gear to fill all slots with +PVP. Fixed some wording.
1.11 - 4/24/18 Changed how maximizing PVP fights is looked at. Also script will no longer tell you about PVP if you're not maximizing fights. Fixed another Avatar Fax bug (hopefully)
1.12 - 6/21/18 Updated Bounty Hunters text, so script now says what bounties you still have available, if any, instead of saying you always have them (even if you didn't)
1.13 - 12/31/19 Script now checks for turns before running witchess. No turns, no fights.
1.14 - 2/27/20 Script no longer forces you to buy a raffle ticket every day.
1.15 - 3/4/20 Added support for beach combing, fixed issue with deck of every card.
1.16 - 3/6/20 Fixed bug with Deck of Every Card, and Snojo locking script in Standard runs & some other little things
 
Last edited:

lostcalpolydude

Developer
Staff member
One of those scripts requires zlib. You should add dependencies.txt listing zlib, for anyone that doesn't already have it.

Snojo.ash has
Code:
use_familiar($familiar[Galloping Grill]);
That won't work so well for someone that doesn't have that familiar. I also don't know why you would pick that familiar, but for a general script it seems sensible to not worry about the familiar used.

The supplemental script is called Snojo.ash, but the main script calls snojo.ash, and that will cause problems on case-sensitive operating systems.
 

Pazleysox

Member
One of those scripts requires zlib. You should add dependencies.txt listing zlib, for anyone that doesn't already have it.

Snojo.ash has
Code:
use_familiar($familiar[Galloping Grill]);
That won't work so well for someone that doesn't have that familiar. I also don't know why you would pick that familiar, but for a general script it seems sensible to not worry about the familiar used.

The supplemental script is called Snojo.ash, but the main script calls snojo.ash, and that will cause problems on case-sensitive operating systems.

Thanks for the info. I didn't write the Snojo.ash script. I believe that it is Bale's script.

I added the dependencies.txt, removed the line "use_familiar($familiar[Galloping Grill]);" from the Snojo.ash, and changed snojo.ash to Snojo.ash
 

Terrabull

Member
When I run the script it says "No match attempted or previous match failed (Witchess_solver.ash, line 104)" and fails. I have witches solver installed.
 

Sistercoyote

New member
Confirming what Terrabull said: No match attempted or previous match failed (Witchess_solver.ash, line 104)

Also, I noticed I did not change back into my regular duds when the Volcoino was collected. Would it be possible to adapt something like the Gingerbread City script for the Volcoino/Adventures, where instead of calling to see if we have the pieces of the outfit, instead having us establish what outfit we want to use? (e.g., I have a "velvet five" and "velvet six" outfit, depending on what I want on any given day.)
 

Pazleysox

Member
When I run the script it says "No match attempted or previous match failed (Witchess_solver.ash, line 104)" and fails. I have witches solver installed.

Check this post, for the solution.

Also, I noticed I did not change back into my regular duds when the Volcoino was collected. Would it be possible to adapt something like the Gingerbread City script for the Volcoino/Adventures

I will work on this soon. I have very limited access to internet at the moment, but I think this is a great idea.

-Paz
 

taltamir

Member
Thank you for this script.

For some reason it burns my MP down to 0 where the setting says it would only use free restorers. It should calculate how much MP you will recover overnight and only burn enough to avoid wasted rollover recovery (eg, if you recover 50 overnight and your current is 40/80 then burn 10 only to reduce you to 30/80 where the 50 recovered overnight is not wasted), as well as using up my free MP restorers if I have any and burning them too.
Burning all of MP without regards to free restorers is just wasting meat. (since I will need to restore it using meat tomorrow before i adventure)

Also, for some reason it was healing my HP (this really shouldn't fall under the scope of this script) and worse it was using doc galactics to do so wasting some more meat. The damage I had would partially recover overnight and the rest would be recovered via the mafia integrated healing script next time i do an adventure.

So it was somewhat wasteful on both of these counts.

Setting proprty to save your meat
autoManaRestore => false
Using 1 Doc Galaktik's Homeopathic Elixir...
You gain 20 hit points
Finished using 1 Doc Galaktik's Homeopathic Elixir.
Purchasing Doc Galaktik's Homeopathic Elixir (3 @ 80)...
You spent 240 Meat
You acquire Doc Galaktik's Homeopathic Elixir (3)
Purchases complete.
Using 3 Doc Galaktik's Homeopathic Elixir...
You gain 58 hit points
Finished using 3 Doc Galaktik's Homeopathic Elixir.
Casting Ghostly Shell 1 times...
You acquire an effect: Ghostly Shell (20)
Ghostly Shell was successfully cast.
Casting Patience of the Tortoise 3 times...
You acquire an effect: Patience of the Tortoise (15)
Patience of the Tortoise was successfully cast.
Casting Patience of the Tortoise 1 times...
You acquire an effect: Patience of the Tortoise (5)
Patience of the Tortoise was successfully cast.
autoManaRestore => true

The aove left me with barely any MP, which was burned down to 0 next time I ran it.

Setting proprty to save your meat
autoManaRestore => false
Casting Patience of the Tortoise 1 times...
You acquire an effect: Patience of the Tortoise (5)
Patience of the Tortoise was successfully cast.
autoManaRestore => true
-----
Oddly it asked me if I want to fight some monster (which I never heard about and don't think I had access to in bad moon and also overdrunk).
But it didn't ask again and I forgot what it was. I will try again tomorrow and see if I can find out what it was and look further into it.

edit: it is "chateau monster", and today I clicked yes and nothing happened. (I was not overdrunk today, and I had just finished bad moon, breaking the crystal, recalling my memories, and emptying hangk).
Is it referring to the copied monster in Chateau Mantegna? because I don't have access to that.

-----
>You will have 58 turns, after rollover. 40 turns for rollover, 5 turns from gear, 13 from left over adventures.
5 turns from gear should actually say "2 from gear and 3 from skills". I have the turtle tamer passive that gives +3 a day. Or it can say 5 turns from bonus sources if you don't want to split them. But gear is misleading since it is apparently all bonus sources.
 
Last edited:

Pazleysox

Member
Thank you for this script.

For some reason it burns my MP down to 0 where the setting says it would only use free restorers. It should calculate how much MP you will recover overnight and only burn enough to avoid wasted rollover recovery (eg, if you recover 50 overnight and your current is 40/80 then burn 10 only to reduce you to 30/80 where the 50 recovered overnight is not wasted), as well as using up my free MP restorers if I have any and burning them too.
Burning all of MP without regards to free restorers is just wasting meat. (since I will need to restore it using meat tomorrow before i adventure)

Also, for some reason it was healing my HP (this really shouldn't fall under the scope of this script) and worse it was using doc galactics to do so wasting some more meat. The damage I had would partially recover overnight and the rest would be recovered via the mafia integrated healing script next time i do an adventure.

So it was somewhat wasteful on both of these counts.



The aove left me with barely any MP, which was burned down to 0 next time I ran it.

I looked into this. I thought I had it set to save 50% of your MP, but apparently I had it set to BURN 50% of your MP (regardless). I'll have it fixed today.

Setting proprty to save your meat
autoManaRestore => false
Using 1 Doc Galaktik's Homeopathic Elixir...
You gain 20 hit points
Finished using 1 Doc Galaktik's Homeopathic Elixir.

This has nothing to do with the settings of my script. You must have mafia set to auto recover, and you lost a fight somewhere.

-----
Oddly it asked me if I want to fight some monster (which I never heard about and don't think I had access to in bad moon and also overdrunk).
But it didn't ask again and I forgot what it was. I will try again tomorrow and see if I can find out what it was and look further into it.

edit: it is "chateau monster", and today I clicked yes and nothing happened. (I was not overdrunk today, and I had just finished bad moon, breaking the crystal, recalling my memories, and emptying hangk).
Is it referring to the copied monster in Chateau Mantegna? because I don't have access to that.

I didn't have it look to see if players even HAD the Chateau before it looks to see if the monster was fought. This is fixed.

-----
>You will have 58 turns, after rollover. 40 turns for rollover, 5 turns from gear, 13 from left over adventures.
5 turns from gear should actually say "2 from gear and 3 from skills". I have the turtle tamer passive that gives +3 a day. Or it can say 5 turns from bonus sources if you don't want to split them. But gear is misleading since it is apparently all bonus sources.

The script looks at the maximizer's output, I changed the wording so it's easier to understand now.

Thanks for the input! It's people like you that help me debug the script!
 
Last edited:

taltamir

Member
Thank you for fixing those issues.

I do have auto restore on, although it shouldn't have come up at that point in time... maybe it was because i clicked yes to go after the chateau monster so it triggered the precombat scripts and ran it? that was probably it... which is actually desirable so no issue there.
Or maybe I just got confused and copy pasted the wrong thing and your script wasn't involved at all. I will let you know if I see it again (although if it really was the chateau monster then I wouldn't see it again anyways).

Oh, according to the timestamp you said you fixed it 2 days ago. But I just go prompted to fight the chateau monster again even though I don't have access to it, has the SVN been updated with the fixed version?
I just ran a forced SVN check (showing the script is at r15), and then tested my MP and it still burns my MP below 50% remaining too.
 
Last edited:

Pazleysox

Member
Thank you for fixing those issues.
Oh, according to the timestamp you said you fixed it 2 days ago. But I just go prompted to fight the chateau monster again even though I don't have access to it, has the SVN been updated with the fixed version?
I just ran a forced SVN check (showing the script is at r15), and then tested my MP and it still burns my MP below 50% remaining too.

Heh, I clicked the wrong button. It's at revision 16 now, the update has been updated.
 

taltamir

Member
Heh, I clicked the wrong button. It's at revision 16 now, the update has been updated.
cool, it updated.
what is this new "Ezandora-Briefcase-branches-Release" dependency it installed? It's description, author, and category in the script management window are all blank.
 

taltamir

Member
latest version is again wasting all my MP. which is quite detrimental very early in a run when it is expensive to restore it.
 

Pazleysox

Member
latest version is again wasting all my MP. which is quite detrimental very early in a run when it is expensive to restore it.

Edit line 26:
PHP:
	if(get_property("ps_manaburn") == "");	{set_property ("ps_manaburn", "true");	}				// set this to false if you don't want to burn your free MP restorers - TRUE SETTING WILL NOT USE MEAT!
and change true to false. That should stop the script from burning your MP, and will allow you to do it manually.
 

taltamir

Member
Edit line 26:
PHP:
    if(get_property("ps_manaburn") == "");    {set_property ("ps_manaburn", "true");    }                // set this to false if you don't want to burn your free MP restorers - TRUE SETTING WILL NOT USE MEAT!
and change true to false. That should stop the script from burning your MP, and will allow you to do it manually.
just to clarify, that line will stop all MP spending? because it says burn free MP restorers. Ideally it would use those up. but last time it just repeatedly cast that 1 MP buff until I was at 0/65 MP while stating it expect me to gain 25 MP overnight.
 

Pazleysox

Member
just to clarify, that line will stop all MP spending? because it says burn free MP restorers. Ideally it would use those up. but last time it just repeatedly cast that 1 MP buff until I was at 0/65 MP while stating it expect me to gain 25 MP overnight.

That is correct. It will set that part of the script to stop using MP to restore buffs.
 

taltamir

Member
That is correct. It will set that part of the script to stop using MP to restore buffs.
alright, thank you. I have done so.

Also, I noticed latest build of mafia is giving me these warnings for rollover management script:
Code:
Changing "Miniature Sword & Martini Guy" to "Miniature Sword & Martini Guy" would get rid of this message. (Rollover Management.ash, line 44)
WARNING: Unreachable code (Rollover Management.ash, line 355)
 
Top