Request for a script or some help :P

Mazzzy

New member
Ello all I'm a wee bit new to scripting with KolMafia so looking for a little bit of help. (Probably quite a lot of help)

I'm going on holiday to Thailand for 3 weeks so internet access could be a bit sketchy.
I'm wanting to automate my characters eating/drinking, bounty hunting, then finally grinding in the ballroom till I hit 30.
I'm currently using a script to automate the ballroom bit, but have'nt seen one for eating/drinking/bounty hunting.

void hunt_dances(){
if(item_amount($item[dance card]) <1) {
add_item_condition(1, $item[dance card]);
adventure(my_adventures(), $location[Haunted Ballroom]);
} else {
use (1, $item[dance card]);
adventure(4, $location[Haunted Ballroom]);
}
}

void main() {
while(my_adventures() > 0) {
hunt_dances();
}
}



How should I go about writing one, or joining 2 or 3 scripts together?

I'd also like to make it go to a different zone but to be honest thats not as important as making sure I get my lucre's.

All help will be most gratefully received.
 

mredge73

Member
You can join a few together but I am sure there is at least one out there that already does this.

What you can do is call Eat/Drink followed by calling bounty.ash and finish up with the dance card script.

Eat/Drink
http://kolmafia.us/showthread.php?t=1519&highlight=drink

Bounty.ash
http://kolmafia.us/attachment.php?attachmentid=1805&d=1248581282

Dance card script:
http://kolmafia.us/showthread.php?t=495&highlight=dance+cards

Better: You could also use Bale's counter script to handle Dance Cards and adventure elsewhere. This way you can use dance cards while running bounty.ash, etc...
http://kolmafia.us/showthread.php?t=2519
 
Last edited:

Mazzzy

New member
Thank you very much, utter noob that I am how do I join a script to another one?

Also how do i get the scripts to run automatically similarly to the breakfast script kolmafia uses?

My plan is to just schedule a task to run kolmafia, have it auto log me in, burn through my turns, eat, then wait for the next time...

Although if im doing this stupidly and there is a better way please correct me :p

Thanks mredge73.

I'll post whatever script I piece together in the hopes it helps others
 

mredge73

Member
well first of all others have probably done this better than me, I am currently working on something universal that would serve your purposes but it is still buggy and not worthy of posting.

So first you need to decided exactly what you want your script to do, not a generalization of what you want it to do.

You will be creating a breakfast script to do the task that you desire.
The simplest way to do this is to call the other scripts from your breakfest script.

for example my_breakfest.ash would contain something like this:
Code:
//bounty.ash needs a set number of adventures inserted, use the * to let it use all adventures available
cli_execute("call bounty.ash *");

//eat drink needs several parameters passed to it, you can find out what they are by running it the first time and take note what you put and replace the somethings with them, don't overdrink at this time
cli_execute("call EatDrink.ash something something something something etc");

//then call your turn burn script
cli_execute("call dance.ash"); // or whatever it is called

//then overdrink
cli_execute("drink something");

//closes mafia
cli_execute("exit");
note this is just a quick example on how to run multiple scripts from one. you would set your character up to auto-login and then run the breakfast script. You will need to familiarize yourself with whatever scripts you decide to use beforehand to see their benefits and limitations. They are often written by different authors and some are better than others as you would imagine.

At this time you may also want to consider trying either of these:
http://kolmafia.us/showthread.php?t=2589
http://kolmafia.us/showthread.php?t=2444
They are very similar and I think they can be configured to do what you like. I haven't personally used them yet but you can petition their authors for more info on how to set them up as a breakfast script.
 
Last edited:

Bale

Minion
You can't run a CLI script for breakfast? Anyway, it would be both simpler and easier to read like this:

Code:
cli_execute {
	//bounty.ash needs a set number of adventures inserted, use the * to let it use all adventures available
	call bounty.ash *

	//eat drink needs several parameters passed to it, you can find out what they are by running it the first time and take note what you put and replace the somethings with them, don't overdrink at this time
	call EatDrink.ash something something something something etc

	//then call your turn burn script
	call dance.ash 
	// or whatever it is called

	//then overdrink
	drink something

	//closes mafia
	exit
}

Yes, that honestly works. (According to something Veracity recently wrote.)
 

Mazzzy

New member
Thanks bale, what file would I edit/create to enable the execution of the scripts in the manner you've suggested?
 

Bale

Minion
save that as break.ash in your /scripts directory. Make sure you use a plaintext editor like notepad, not wordpad.

Then in breakfast options you'll notice a convenient spot at the top of the preferences.
 
Top