Pre-Hobo Boss Item Buffs (Alpha)

Kli1195

New member
Pre-Hobo Boss Item Buffs 1.0

Pre-Hobo Boss Item Buffs 1.0
The script works, release stage.

Extremely Important:
  • You must have zlib.ash in your script folder, a download can be found here.
  • You must have mallItemsData.ash in your script folder, the download can be found below.
  • You must have putItemGear.ash in your script folder, the download can be found below (thank slyz for it!)
  • The script will ask you if you want to kill all the bosses. Only say 'true' if all the bosses are up! Also, do not say true if you don't have funkslinging. You'll lose your buffs when you face Ol' Scratch.
  • You must have enough meat on hand! I suggest having at least 100k, but if you're also going to have the script auto-fight the bosses for you I'd suggest having up to 200k.
  • The script assumes your Jack-in-the-Box has no charge.
  • If you're going to get Thingfinder and Chorale from this script, you MUST have song slots available!
  • In order to have the script work, you need to have the noncombats set up like below:
    http://i39.tinypic.com/51bs6s.jpg

About:
Every time I prepare to kill a hobopolis boss, I find it extremely time consuming to get every single buff. Especially the ones gained from certain adventures, since I always forget which option to choose and which places to go.
So I made a script that automates things for you.
This still has quite a bit that can be improved, but I think it is pretty solid right now. Future updates are planned when I have time.
100% open to feedback and critique. I would love it actually.

Steps:
1. It automatically acquires a blue milk club card from Seaside Megapolis.
2. It then uses a llama lama gong to get the Bureaucratized effect (thanks to palpitations for providing the base of the script) while charging your Jack-in-the-Box at the same time (if you have one).
3. Then it uses another gong and gets the Extra-Sensory Perception effect.
4. Goes back to Seaside, automatically using another Agua de Vida if the first ran out, and gets the Dance Interpreter effect.
5. It then checks to see if you have the Bag o' Tricks on, and adventures once in the Farm if you do (since the farm is the only area with only combats) getting the buff.****
6. Gets the VIP pool table buffs.
7.a And then gets the rest of the no-adv buffs, checks if you want to use a black snowcone instead of a blue one, if you want to consume the bounty hunter food/drink, if you want to consume a Tempura Broccoli and Honey-Dew, and if you want to use the Thingfinder and Chorale recordings from the mall. It checks your spleen and uses mojo filters accordingly.
7.b An important reminder! The script automatically thinks you want to use adventures, and that you want to kill Zombo and Ol' Scratch! If you want to change this, you have to change these values manually in the script. If you want to change this, change the values in lines 47, 48, and 49 from 'true' to 'false'. I would recommend Notepad++ to edit the script.
8. Checks to see if you have the Moveable Feast. If so, it'll switch to your most optimal +item familiar and use the Moveable Feast buff on it. It'll check to see if you have the Bubblewarp turban (buying one if you don't have it), and get the +item buff from the Tea Party.
9. Optimizes your outfit, taking into consideration Hodgman's outfit.
10. This is an optional step that it will ask for in the beginning, whether you want to kill all the bosses or not. It'll check to see if you have a Jack-in-the-Box, if you do it will charge the Jack using BRICKO ooze in between the Hobo Bosses. If you don't, it will switch to a Hound Dog if you have one, or a Baby Gravy Fairy if you don't. It'll buy and use cheap muscle buffs along with scrolls of drastic healing (for in between fights), piddles + Colon Annihilation Hot Sauce + Possessed tomato (for Frosty), pufferfish spine (for Hodgman), gobs of wet hair and love songs of vague ambiguity (for various bosses). It'll then fight the bosses using funkslinging, and ta-da! Now you have a ton of boss drops!

****Be aware! If you DO have the bag o' tricks, you'll have to change the script manually!****
I set it to use entangling noodles and lasagna bandages.
If you don't have these skills, the script will screw up.
Change the skills manually (near the top of the script) to any myst based spells you do have. If you don't have any, delete the entire 'void bagT()' section.

Notes:
  • Doesn't get you Phat Loot. You'll have to get that from someone since it can only be cast upon.
    I recommend http://kol.obeliks.de/buffbot/buff for free buffs.
  • Doesn't use powdered toad horn since it's incredibly expensive.
  • Doesn't use 300 PlexiPips and 300 Pain Dips since it would be so incredibly expensive.
  • Doesn't give Phairly Pheromonal buff, since it's negligible and requires adventures.
  • Autochecks to see if you have the Jack-in-the-box. If you do, it'll use Icy Revenge Love Songs, if not, it'll use Disturbing Obsession Love Songs.
  • If your clan doesn't have a Pool Table, you'll have to get the effects from a clan that does. Same goes with Jukebox, except this script doesn't do the Jukebox right now.

Issues:
  • Doesn't detect if you can buy buffs from the clan (Bootyliciousness)
  • Doesn't detect the right DoD potion, so it skips that. This is because the DoD potion that gives the +item% effect is randomized every ascension. The same deal goes for the +item% Slime Potion. However, you can easily manually add that in if you do know the right potion. If you need help editing the script, just PM me.

Revisions, improvements, and comments are much appreciated!
This script should work, however a bug, oversight, or human error on my part could be likely. If you find one, please tell me the problem if you see it or give me the kolmafia log if you aren't sure exactly what is wrong. I will work on it as soon as I can.

Changelog:

v 1.0 - Oct. 2, 2012: Fixed many errors, made some things more optimal, added new updated effects from the past year. This script should work properly now.
////////// I was on a 1.5 year hiatus. After coming back, I fixed and changed a lot of things. //////////
v 0.996 - Bag o Tricks debugged.
v 0.995 - Debugged errors. Now it should really work this time!
v 0.994 - It should now get you the Mad Tea Party buff if you have the Bubblewrap bottlecap turtleban.
v 0.993 - It should now ask you questions in a much more friendly manner, and remember those answers if you choose that option.
v 0.992 - It now optimizes your +item outfit too (this takes into account Hodgman Gear), fixed some bugs, and cleaned up redundancies. Thanks slyz for the Item Gear script!
v 0.991 - Cut down on redundancies and added in Moveable Feast capabilities.
v 0.99 - Thanks to Thagorn's smexiness, the script should run more efficiently. Also added in the option of killing all the bosses at once (Obviously this only works out if all 6 bosses are up at the same time). If you have the Jack, it'll use BRICKO ooze to charge it up after each boss fight.
v 0.98 - It now charges the Jack-in-the-Box in the molehill. Note that this script thinks your Jack has no charge. I also added in more comments!
v 0.97 - Added in The Legendary Beat.
v 0.96 - Deleted a line that was causing problems for some people.
v 0.95 - Fixed the pool table bug, I accidentally switched the buffs with each other. Also, if you do choose to eat a food item, it will automatically get Got Milk of you don't have it. Also added in the option of whether to spend adventures or not.
v 0.9 - Added in a detector that detects if you have the Jack-in-the-Box. If you do, it will use Icy Revenge Love Songs, if not, it'll use Disturbing Obsession Love Songs. Fixed small bug.
v 0.8 - Added in a small thing that asks if you are going to kill Zombo or Ol' Scratch. If so, it detects if you have funkslinging, and if you don't it will exit for Ol' Scratch.
v 0.7 - Changed script so it buys the item if you don't have it. Also fixed a small bug.
v 0.6 - Fixed the Arena buffs, it should now do it for you. Also added in the option to purchase Thingfinder and Chorale from the mall.
v 0.51 - Kind of a step backwards, the arena script doesn't work, so it screws up the whole script. I'll try to work on this, but for the time being you'll have the get it manually.
v 0.5 - Changed the Bag o' Tricks script and cleaned up script some more.
v 0.4 - Slight script cleaning up.
v 0.3 - MAJOR debugging. There may still be a couple of errors, but for the most part, it works.
v 0.2 - Added in Bag o' Tricks, Arena, and Pool Table buffs as well as a spleen checker. Debugged some errors.
v 0.1 - Only basic scripts. Supports llama gong and agua de vida, and all potions (except for DoD).


mallItemsData and PutItemGear must be put in your scripts folder if you're going to be using the script.
 

Attachments

  • mallItemsData.ash
    1.2 KB · Views: 89
  • PutItemGear.ash
    5.6 KB · Views: 86
  • Hobo_Buffs_v1.0.ash
    22.8 KB · Views: 94
Last edited:

Kli1195

New member
Mood...
...oh yeah...
Shoot, why didn't I just mood my buffs?

But yeah, this is much more complex. And does the llama/agua buffs for you.
 

heeheehee

Developer
Staff member
Erm, I totally screwed up in my advice-giving earlier. <import zlib.ash> should be import <zlib.ash>.

Line 201 should have the double equals sign.

Some of these things are easier to just pass to the CLI via cli_execute. For instance, instead of setting all those options for roachform, you could just use cli_execute("gong roach mole");

And wow, that's a lot of main functions. As it stands, it skips all of them except for the last one.

You should use just one -- they can take more than one parameter. (e.g. void main(boolean use_black_snowcone, boolean use_Oreille_Divisée_brandy)).

Anything that isn't inside a function will be executed before the main function. This'll be a problem, as cyclops eyedrops will run out when you're getting your agua buff.

Other than that, nice job.
 
Last edited:

Bale

Minion
Does not detect how much spleen user already used, so it doesn't work if spleen is full (also doesn't auto use mojo filters).
if(spleen_limit() > my_spleen_use())

Doesn't do arena buffs, so you'll have to do those manually. If you know how to code this, please tell me :D
(This also applies to the VIP pool table)
get_property("sideDefeated")
get_property("warProgress")
get_property("sidequestArenaCompleted")
visit_url(postwarisland.php?action=concert&option=2&pwd")

pool mus, myst, moxie


Doesn't give the Weasels Underfoot buff since it doesn't detect if you have the BoT on.
if(have_equipped($item[Bag o' Tricks]))
 

Kli1195

New member
So heeheehee, would it look something like this? (the void mains)
Code:
void main( boolean use_black_snowcone, use_Oreille_Divisée_brandy, use_bowl_of_Bounty_Os, use_Honey_dew, use_tempura_broccoli )
{
	if (my_adventures() == 0)
	{
	print("Out of adventures.");
	exit;
	}
	else if((have_effect($effect[Bureaucratized]) > 0))
	{
		exit;
	}
	else
	{
		while (my_adventures() > 0)
		checkuse();
	}
	if( use_black_snowcone )
    {
        use( 1 , $item[black snowcone] );
    }
	else
	{
		use( 1 , $item[blue snowcone] );
	}
    if( use_Oreille_Divisée_brandy )
    {
        use( 1 , $item[Oreille Divisée brandy] );
    }
    if( use_bowl_of_Bounty_Os )
    {
        use( 1 , $item[bowl of Bounty-Os] );
    }
    if( use_Honey_dew )
    {
        use( 1 , $item[Honey-dew] );
    }
    if( use_tempura_broccoli )
    {
        use( 1 , $item[tempura broccoli] );
    }
}
Also, could you elaborate on the cli_execute("gong roach mole")
 
Last edited:

heeheehee

Developer
Staff member
You'd have to declare boolean for each of the parameters. So void main( boolean use_black_snowcone, boolean use_Oreille_Divisée_brandy, boolean use_bowl_of_Bounty_Os, boolean use_Honey_dew, boolean use_tempura_broccoli ).

cli_execute("gong roach mole") was me being retarded again. cli_execute("gong roach item") gets the item drop buff from the gong regardless of your settings. cli_execute("gong mole") gets you into moleform. Both work only if you have a gong, though.
 

heeheehee

Developer
Staff member
void mainvoid main should probably just be void main (line 185).

Also, parameters don't need to be related to the function they're in. So potions(), raven(), and egg() can all be tacked on to the end of main() without declaring additional functions. Basically, as a general rule of thumb, don't declare functions other than the main function unless you are going to call them. (Haven't tested it myself, but I don't think they'll even execute if you don't call them.)

Re: >pool mus. This is actually a CLI command to get the pool buff for playing aggressively. >pool myst gets the mysticality buff, and >pool mox gets the moxie buff. You'd execute these with cli_execute() (e.g. cli_execute("pool mus")).
 

slyz

Developer
  • I might separately add in another script that detects what equipment you have and auto-changes your equipment accordingly.

That can be taken care of with a simple cli_execute("maximize item drop, switch jack-in-the-box");, although I guess the maximizer doesn't take into account the the Hodg outfit's dancing hobo underling.

I can write you the code to check if the Hodg outfit is better when taking that into account (if the maximizer doesn't already make you use it of course, and if you actually summon the hobo in boss fights).
 

Kli1195

New member
Re: void mainvoid main
Ah that probably was copy/paste error, fixed.

Re: pool table
Fixed, sorry for the confusion.

Thanks slyz, that makes things so much more easier!
If you have time, it would be nice to have the code.

Also, can someone check my code?
I named my test file Junk_1.ash, it's in the first post.
For some reason, when it does main() it tries to do the boolean first before going to useagua()
And then when it does go to useagua(), I can't get it to get to seaside(), gCLI keeps saying "Function 'seaside( )' undefined (Junk_1.ash, line 24)"

Help?
 
Last edited:

slyz

Developer
Here you go.
You can add import "PutItemGear.ash"; at the top of your script, and you just have to call PutItemGear();.

It will:
  • maximize your +item% and switch to the Jack
  • if the Maximizer hasn't equipped the Hodg outfit, it will check if you have the outfit and a hamster/metal detector (and the sock), and equip them if they are worth it when considering the +100% item from the hobo underling.
  • it will check if you sticker sword has 3 unicorn stickers on it, if not equip them if they are worth using (it's just in case they fell off or you have other stickers equipped, since the maximizer won't tell you to change the stickers).

It's verified, but I haven't actually tested it (I'm in BM). The worst it can do is buy unicorn stickers and change your equipment, so it's pretty safe to test out.

It was fun to code, but I think it's pretty niche. When you have the outfit and a detector/hamster, does the Maximizer really tell you to use something else? If so, +100% item from the hobo underling might make the Hodg outfit worth it.

EDIT: fixed a 16 month old typo :D
 

Attachments

  • PutItemGear.ash
    5.6 KB · Views: 23
Last edited:

Kli1195

New member
Oh found something:
Code:
cli_execute("maximize item drop, switch jack-in-the-box");
should be
Code:
cli_execute("maximize item drop; familiar jack-in-the-box");
Also, could you help me out with my buff script?
 

slyz

Developer
EDIT: I was looking at Junk_1.ash

Also, can someone check my code?
I named my test file Junk_1.ash, it's in the first post.
For some reason, when it does main() it tries to do the boolean first before going to useagua()
And then when it does go to useagua(), I can't get it to get to seaside(), gCLI keeps saying "Function 'seaside( )' undefined (Junk_1.ash, line 24)"

Help?

You need to define a function before calling it, you just need to move seaside() before useagua().

Code:
while (my_adventures() > 0)
useagua();
The script will only go out of that loop once you have 0 adventures left, this doesn't sound right.

Code:
if (adventure(my_adventures(), $location[Seaside Megalopolis]))
{
     adventure(my_adventures(), $location[Seaside Megalopolis]);
     run_combat();
}
I don't really understand the logic here. Why the if? and if the if, why adventure again? And adventure() should take care of the combat.
I'm not sure this will work though... it will adventure for my_adventures() adventures (as long as you have empty agua bottles). Once it's done, it will go to the next iteration of the while loop and check if you got a blue milk club card. That sounds like a recipee for disaster! The check should be done between each adventure.

Next: you call seaside() from useagua() if you already had an empty agua de vida bottle, and then again inconditionnally from the main loop. If you got a blue milk club card the first time, the second call should result in nothing, but it's still poor logic.

In seaside2(), you adventure until your blue milk club card is consumed, and *then* you set the choiceAdventure?
Code:
int BoT = my_adventures();
This line will be executed before the main(), since it's outside any function. BoT will be equal to the number of advs you had before using aguas and gongs. You should put that line inside bagT().
Code:
while(BoT == my_adventures())
If you just set BoT equal to my_adventures(), this will always be true until you spend one adventure, it doesn't seem like a very usefull condition.

Oh, and like above, I think adventure() will run the combat for you, the use_skill() and run_combat() after it won't do anything.



Looks like you have some work to do =)

Go through it step by step, "what is my goal?" "what prerequisit is there?" "how do I get my goal?" "how do I check I reached my goal?"
 
Last edited:

Kli1195

New member
You need to define a function before calling it, you just need to move seaside() before useagua().
Ah that makes sense.
Code:
while (my_adventures() > 0)
useagua();
The script will only go out of that loop once you have 0 adventures left, this doesn't sound right.
Yeah fixed that, I don't know what I was thinking...

Code:
if (adventure(my_adventures(), $location[Seaside Megalopolis]))
{
     adventure(my_adventures(), $location[Seaside Megalopolis]);
     run_combat();
}
I don't really understand the logic here. Why the if? and if the if, why adventure again? And adventure() should take care of the combat.
I'm not sure this will work though... it will adventure for my_adventures() adventures (as long as you have empty agua bottles). Once it's done, it will go to the next iteration of the while loop and check if you got a blue milk club card. That sounds like a recipee for disaster! The check should be done between each adventure.
Well, how would I go about without the if?
I put it in there to see if the player can actually adventure in Seaside, if they can't, then it would use another agua.
And I fixed the adventure error.
Next: you call seaside() from useagua() if you already had an empty agua de vida bottle, and then again inconditionnally from the main loop. If you got a blue milk club card the first time, the second call should result in nothing, but it's still poor logic.
So does this fix it?
Code:
while((item_amount($item[blue milk club card]) < 1))
		{
			if (adventure($location[Seaside Megalopolis]))
			{
				adventure($location[Seaside Megalopolis]);
			}
			else
			{
				use(1, $item[agua de vida]);
			}
		}
In seaside2(), you adventure until your blue milk club card is consumed, and *then* you set the choiceAdventure?
Does this fix it:
Code:
if (adventure(my_adventures(), $location[Seaside Megalopolis]))
			{
				set_property("choiceAdventure358","2");
				adventure(my_adventures(), $location[Seaside Megalopolis]);
			}
Code:
int BoT = my_adventures();
This line will be executed before the main(), since it's outside any function. BoT will be equal to the number of advs you had before using aguas and gongs. You should put that line inside bagT().
Fixed
Code:
while(BoT == my_adventures())
If you just set BoT equal to my_adventures(), this will always be true until you spend one adventure, it doesn't seem like a very usefull condition.

Oh, and like above, I think adventure() will run the combat for you, the use_skill() and run_combat() after it won't do anything.
I'm not entirely sure how to go about this. How do I set it so it does use the spells in combat?
Also, I'm a bit confused. As soon as you use up 1 adventure, wouldn't the while condition be false and then end it?

Looks like you have some work to do =)

Go through it step by step, "what is my goal?" "what prerequisit is there?" "how do I get my goal?" "how do I check I reached my goal?"

Is there some 'beginner's guide to coding kolmafia scripts' that I could look at?
 

slyz

Developer
Code:
if (adventure(my_adventures(), $location[Seaside Megalopolis]))

I think you don't realize that writing this will cause mafia to adventure for my_adventures() adventures in Megalopolis. Let's look at this:
Code:
boolean consumeSpleen(item it, int spleenhit) {
    int spleenleft = spleen_limit() - my_spleen_use();
    int mojoAvailable = 3 - get_property("currentMojoFilters").to_int();
    
    if ( spleenleft + mojoAvailable >= spleenhit ) {
        if ( item_amount(it) == 0 ) buy(1, it);
        if ( spleenleft < spleenhit ) {
            int numMojoToUse = spleenhit - spleenleft;
            int numMojoInventory = item_amount($item[mojo filter]);
            if ( numMojoInventory < numMojoToUse )
                buy(numMojoToUse-numMojoInventory, $item[mojo filter]);
            use(numMojoToUse, $item[mojo filter]);
        }
        return use(1, it);
    }
    return false;
}

while( item_amount($item[blue milk club card]) == 0)
{
    if ( my_adventures == 0 ) abort("Out of adventures");
    if ( item_amount($item[empty agua de vida bottle]) > 0 || consumeSpleen($item[agua de vida], 4) ) {
        adventure(1,$location[Seaside Megalopolis]);
    }
    else abort("Not enough spleen left to get another empty agua");
}
boolean consumeSpleen(item it, int spleenhit) returns true if item it is consumed (it should be since everything is checked beforehand), and false if not. You can put it at the beginning of the script and use it for consuming other spleen items. I made you pass in the amount of spleen the item uses because I was too lazy to import spleenhit.txt, but it's possible to have mafia find out by itself.

Now look at this line:
Code:
if( item_amount($item[empty agua de vida bottle]) > 0 || consumeSpleen($item[agua de vida], 4) )
To check if this is true, Mafia will first check if you have an empty agua bottle. If you do, it will go on and adventure without bothering to check the rest of the condition (it's a double 'or' ||, not a simple one |).
If you don't have a bottle, it will evaluate consumeSpleen($item[agua de vida], 4), which returns a boolean (using an agua bottle in the process, so you know you now have an empty bottle). If it's true, it goes ahead and adventures. If not, then you probably don't have enough spleen (or enough meat to buy an agua/mojo filter): it goes to the else and aborts.

In this while loop, it will: check if you have blue milk club card then adventure once, and will keep doing it until you have one.

I learned ASH programming mainly by looking at other scripts. With a basic grasp of how to use control structures, variables etc, I got along fine: just keep at it =)

EDIT: the wiki is a nice place to learn: http://wiki.kolmafia.us/index.php?title=Main_Page
 
Last edited:

Kli1195

New member
I think you don't realize that writing this will cause mafia to adventure for my_adventures() adventures in Megalopolis. Let's look at this:
Gah! Sorry, it's just me being an idiot again. I know what you're talking about. I just forgot to change it. would:
Code:
if (adventure(1, $location[Seaside Megalopolis]))
work?
Alright, thanks. I did a LOT of testing with adventures today, and it should run smoothly now. I'll upload soon.

EDIT: Uploaded it. Though there may be errors in the script, when I ran it, it worked fine. Yay, successful script =D
 
Last edited:
Top