Hobo monkey consult script version 0.4

I'd much prefer to have mafia start attacking right after the hobo monkey steals meat, because it's less
server hits and I know the monkey will only steal once.

Version 0.4 will attempt the pick pocket if you are the right class. Also, if you have a script that uses transcendent
olfaction as a first action turn, the script will no longer abort. So you can now do something like this:
[default]
1: consult hobomonkey.ash
2: attack

[cubist bull]
1: skill transcendent olfaction
2: default

Version 0.3 figures out if you are in the Orc Chasm or not and picks a better throw item.
Version 0.2 quit at round 27 anyway even if the monkey didn't steal the meat (to prevent infinite looping)
 
Re: Help with hobo monkey script

Ok, here is my first pass at a consult script...
First of all the ccs script should be set up like this:

[default]
1: consult hobomonkey.ash
2: attack

(Really you can put whatever finishing move is best for your class in 2).
consult hobomonkey.ash will only use up rounds until the monkey steals the meat, and then dump
you back into the ccs script.

By using up rounds it tries to use in order: facsimile dictionary, dictionary, spices, turtle totem, seal tooth,
spectre scepter

If you don't have any of these things, are you aren't using the hobo monkey familiar the script will abort.
Please let me know if anyone has any idea for what else if anything this script should do:

Code:
# hobomonkey.ash (version 0.4)
# written by Captain Kirk 7/20/2008

// This script assumes you can survive on your own with moods. All it does
// is use an item that won't kill the monster until the monkey steals, then it
// dumps you back to the ccs script to do whatever finishing moves are designed there.

item itemToUse;
boolean itemFound;
boolean didSomething;

void PickItem()
{
	boolean inValley;

	//Pick the best items to use to do no damage for a while
	inValley = (my_location() == $location[Orc Chasm]);

	itemFound=true;

	if (! inValley ) {
		if (item_amount($item[facsimile dictionary])>0) {
			itemToUse = $item[facsimile dictionary];
		} else if (item_amount($item[dictionary])>0) {
			itemToUse = $item[dictionary];
		} else {
			itemFound=false;
		}
	}
	if ( inValley || (! inValley && itemFound == false) ) {
		itemFound = true;
		if (item_amount($item[spices])>0) {
			itemToUse = $item[spices];
		} else if (item_amount($item[turtle totem])>0) {
			itemToUse = $item[turtle totem];
		} else if (item_amount($item[seal tooth])>0 ) {
			itemToUse = $item[seal tooth];
		} else if (item_amount($item[spectre scepter])>0) {
			itemToUse = $item[spectre scepter];
		} else {
			itemFound=false;
		}
	}
}


void main (int theRound, monster theEncounter, string pageString)
{
    PickItem();
	if(my_familiar() != $familiar[hobo monkey]) {
		// print a warning, and use item and exit
		abort("You need to switch to using a hobo monkey");
	}
	didSomething = false;
	if (contains_text(pageString,"You get the jump")) {
		if (my_class() == $class[accordion thief] || my_class() == $class[disco bandit]) {
			pageString = steal();
			theRound = theRound + 1;
			didSomething = true;
		}
	}
	// climbs up and sits is part of the string that shows up when monkey steals
    while ( ! contains_text(pageString, "climbs up and sits") && theRound < 27 ) {
			
		if (itemFound) {
			pageString = throw_item(itemToUse);
			theRound = theRound + 1;
			didSomething = true;
		} else {
			abort("You don't have any applicable items to use");
		}
	}
	// hack to prevent ccs from aborting if script is not called in round 1
	if (! didSomething ) {
		if (itemFound) {
			throw_item(itemToUse);
		}
	}
}
 

Sponge

New member
Re: Hobo monkey consult script version 0.3

Thanks for this script- it worked perfectly when I tried it out earlier. The only thing I would suggest is checking to see if auto attack is on, and disable it if need be. I'm not even sure if that's possible in an ash script (I'm not getting anything on the wiki or through ashref) but it would be a nice feature if it's doable.
 

dangerpin

Member
Re: Hobo monkey consult script version 0.3

It is possible...

set_property("defaultAutoAttack", 0);
OR
cli_execute("set defaultAutoAttack=disabled");

...if I'm remembering correctly.
 

Muhandes

Member
Re: Hobo monkey consult script version 0.3

Thanks for the script.

There is one problem which I encounter. Since I want to pickpocket first, my CSS looks like this:
[ default ]
1: steal
2: consult hobomonkey.ash
3: attack with weapon

The problem happens when the monkey steals on the first round. I think I get an abort in this case.
 

MacGregor

New member
Re: Hobo monkey consult script version 0.3

ok so if i want to do what Muhandes is doing (steal, consult then attack) but use olfaction on goth giants my CSS would look like this right:

Code:
[ default ]
1: steal
2: consult hobomonkey.ash
3: attack with weapon

[ Goth Giant ]
1: skill olfaction
2: default

i dont have olfaction yet so i cant try it...also how would i set my css with the cli...i have a simple .txt farming script to farm the castle and i was hoping to change the css with the script then change it back to default when im done

thanks for the help
 

MacGregor

New member
Re: Hobo monkey consult script version 0.3

[quote author=Muhandes link=topic=1808.msg8656#msg8656 date=1218099159]
Thanks for the script.

There is one problem which I encounter. Since I want to pickpocket first, my CSS looks like this:
[ default ]
1: steal
2: consult hobomonkey.ash
3: attack with weapon

The problem happens when the monkey steals on the first round. I think I get an abort in this case.
[/quote]

this happens for me too, can you just add to your ccs like this:
Code:
1: steal
2: item spices
3: item spices
.
.
27: item spices
28: attack with weapon

EDIT this works, but isnt as efficient, since it keeps using spices even if the monkey has stolen

its probably breaking because we steal on the first round then consult the script so it freaks out if the message is already there, i dont know ash so i dont know how to fix it...hopefully the writer can fix it
 

Alhifar

Member
You don't need to have pickpocket in your CCS, the consult script already takes care of that., so just use it as was said in the first post.
 

Muhandes

Member
[quote author=Alhifar link=topic=1808.msg8692#msg8692 date=1218771766]
You don't need to have pickpocket in your CCS, the consult script already takes care of that., so just use it as was said in the first post.
[/quote]
Hmm, indeed it does. That should solve the problem neatly.
 

Banana Lord

Member
I'm new to using ash scripts, previously I've been using CCS's but your monkey script is exactly what I've been trying to (unsuccessfully) do with CCS. I'm having trouble loading the script into mafia. So far I've used Textedit (I'm running Mac OSX 10.4.11) to save the script as a .ash (I used the make plain text command before I saved it). I saved the script to library > application support > KoLmafia. I started up mafia and clicked on scripts > load scripts... and found it. Next it opened a window asking for a value for "int theRound" so I entered a random number then it asked for a value for "monster theEncounter" and again I tried a random number. When I used the CCS you suggested mafia auto aborted "bad monster value".

Any help would be greatly appreciated.
 

Muhandes

Member
[quote author=Banana Lord link=topic=1808.msg9580#msg9580 date=1226044267]
I'm having trouble loading the script into mafia....
[/quote]
The instructions on how to load this script are right there on the same post where the script is. You need to add it to your CCS script, something like:

[default]
1: consult hobomonkey.ash
2: attack
 

Banana Lord

Member
Yeah, as I said, I can handle the CCS side of things but when I run the suggested CCS mafia aborts because it can't find the script. I quadruple checked the file name and that checks out. I just font know what numbers to enter when the two boxes pop up afteri load the ash script.
 

jasonharper

Developer
It needs to be in a folder called "scripts", inside the KoLmafia folder. Create that folder if necessary.

"Load script" is for running a script now - this isn't the kind of script that's usable that way. In other words, there are no meaningful values you could have supplied for those two prompts.
 

linguinelad

Member
The hobomonkey script works fine except for when I use this as my ccs.

1: skill disco dance of doom
2: skill boogaloo
3: consult hobomonkey.ash
4: attack

And here is an example of what happens if the monkey gives me meat before or during steps 1 & 2 in my ccs. Is there any way to get it to work and still use my db combo?

[56351] Giant's Castle
Encounter: Alphabet Giant
Strategy: C:\Users\Mike\Desktop\kingdom of loathing\ccs\default.ccs [default]
Round 0: chefbob27 wins initiative!
Round 1: chefbob27 tries to steal an item! (auto-attack)
Round 2: chefbob27 casts DISCO DANCE OF DOOM!
Round 3: Diddy climbs up and sits on your shoulder, and hands you some Meat. Huh, where did he find that?
You gain 84 Meat
Round 3: chefbob27 casts DISCO DANCE II: ELECTRIC BOOGALOO!
You acquire an effect: Disco Nirvana (duration: 1 Adventure)
Round 4: chefbob27 uses the facsimile dictionary!
Round 5: chefbob27 uses the facsimile dictionary!
Round 6: chefbob27 uses the facsimile dictionary!
Round 7: chefbob27 uses the facsimile dictionary!
Round 8: chefbob27 uses the facsimile dictionary!
Round 9: chefbob27 uses the facsimile dictionary!
Round 10: chefbob27 uses the facsimile dictionary!
Round 11: chefbob27 uses the facsimile dictionary!
Round 12: chefbob27 uses the facsimile dictionary!
Round 13: chefbob27 uses the facsimile dictionary!
Round 14: chefbob27 uses the facsimile dictionary!
Round 15: chefbob27 uses the facsimile dictionary!
Round 16: chefbob27 uses the facsimile dictionary!
Round 17: chefbob27 uses the facsimile dictionary!
Round 18: chefbob27 uses the facsimile dictionary!
Round 19: chefbob27 uses the facsimile dictionary!
Round 20: chefbob27 uses the facsimile dictionary!
Round 21: chefbob27 uses the facsimile dictionary!
Round 22: chefbob27 uses the facsimile dictionary!
Round 23: chefbob27 uses the facsimile dictionary!
Round 24: chefbob27 uses the facsimile dictionary!
Round 25: chefbob27 uses the facsimile dictionary!
Round 26: chefbob27 uses the facsimile dictionary!
Round 27: chefbob27 attacks!
Round 28: Diddy sits on your fallen opponent's body, blows a smoke ring, and winks at you.
You gain 1017 Meat
You acquire an item: original G
You gain 9 Strengthliness
You gain 13 Magicalness
You gain 15 Sarcasm
 

Sandiman

Member
If I remember correctly, consult scripts should be the first item in your ccs. In your case, you have the consult script third. Try it in the first action slot and see if it works.
 

Muhandes

Member
If you want it to use disco dance and boogaloo before starting to use other things you's need to put it into the script.
Here's how I did it, might not be optimal

Code:
# hobomonkey.ash (version 0.41)
# written by Captain Kirk 7/20/2008
# Changes by Muhandes 8/26/2008

// This script assumes you can survive on your own with moods. All it does
// is use an item that won't kill the monster until the monkey steals, then it
// dumps you back to the ccs script to do whatever finishing moves are designed there.

item itemToUse;
boolean itemFound;
boolean didSomething;

void PickItem()
{
	boolean inValley;

	//Pick the best items to use to do no damage for a while
	inValley = (my_location() == $location[Orc Chasm]);

	itemFound=true;

	if (! inValley ) {
		if (item_amount($item[facsimile dictionary])>0) {
			itemToUse = $item[facsimile dictionary];
		} else if (item_amount($item[dictionary])>0) {
			itemToUse = $item[dictionary];
		} else {
			itemFound=false;
		}
	}
	if ( inValley || (! inValley && itemFound == false) ) {
		itemFound = true;
		if (item_amount($item[spices])>0) {
			itemToUse = $item[spices];
		} else if (item_amount($item[turtle totem])>0) {
			itemToUse = $item[turtle totem];
		} else if (item_amount($item[seal tooth])>0 ) {
			itemToUse = $item[seal tooth];
		} else if (item_amount($item[spectre scepter])>0) {
			itemToUse = $item[spectre scepter];
		} else {
			itemFound=false;
		}
	}
}


void main (int theRound, monster theEncounter, string pageString)
{
	boolean stolen;

	stolen=false;
    PickItem();
	if(my_familiar() != $familiar[hobo monkey]) {
		// print a warning, and use item and exit
		abort("You need to switch to using a hobo monkey");
	}
	didSomething = false;
	if (contains_text(pageString,"You get the jump")) {
		if (my_class() == $class[accordion thief] || my_class() == $class[disco bandit]) {
			pageString = steal();
			theRound = theRound + 1;
			didSomething = true;
		}
	}

	if (contains_text(pageString, "climbs up and sits")) {
		stolen = true;
	}
	pageString = use_skill($skill[Disco Dance of Doom]);
	if (contains_text(pageString, "climbs up and sits")) {
		stolen = true;
	}
	pageString = use_skill($skill[Disco Dance II: Electric Boogaloo]);
	theRound = theRound + 2;

	// climbs up and sits is part of the string that shows up when monkey steals
    while ( !stolen && ! contains_text(pageString, "climbs up and sits") && theRound < 27 ) {
			
		if (itemFound) {
			pageString = throw_item(itemToUse);
			theRound = theRound + 1;
			didSomething = true;
		} else {
			abort("You don't have any applicable items to use");
		}
	}
	// hack to prevent ccs from aborting if script is not called in round 1
	if (! didSomething ) {
		if (itemFound) {
			throw_item(itemToUse);
		}
	}
}
 
Top