A script that runs through all the basic farming procedures from eating to turns?

pekan

New member
EDIT: I didn't notice the general rules, if this is in violation, please delete it.


So, here's what I'm curious about.
(Please note, I have no scripting experience, aside from the occasional glancing around.)

Is there a way to make a script that:

picks and plants 16 mushrooms;
goes into clan to Klaw and the drink me mirror;
stops at the hippy market (where it gives you 4k-ish);
uses the max amount of pastamancery, saucecraft, and cocktailcraft;
buys two of the cheapest hi meins in the mall, a pr0n chow mein, a fortune cookie, and a milk of mag;
uses the milk;
eats the food;
begins adventuring and stops when it gets to a SR counter;
adventures in either the outskirts or alley, depending on the previous SR;
returns to adventure after the SR;
acquires ode to booze from a buffbot;
buys and drinks 5 fuzzbumps and a supernova champagne;
and gets the farming buffs from a bot when they run out?

<_<
 
Last edited:

icon315

Member
THis can easily be made, the best thing to do is look at other scripts and take things from those i will post my script and take what you need from there. i also recommend you look here, and also look around the Forums
 

Attachments

  • IconFarming.ash
    8.9 KB · Views: 72

Bale

Minion

pekan

New member
THis can easily be made, the best thing to do is look at other scripts and take things from those i will post my script and take what you need from there. i also recommend you look here, and also look around the Forums

What does the "CHEAP!" mean?
 

heeheehee

Developer
Staff member
It means that you're too cheap to buy whatever item for eating/drinking/spleening, apparently.

Although I don't know why it's recommending hi meins for fullness but only twinklies for spleen...
 

icon315

Member
That is just a message i added for myself, i recommend you customize that script to fit YOUR needs.
If you need any help with customizing it, just message me here or in-game
 

Grotfang

Developer
I would add to that -- work out simple routines that you follow daily and try translating them into ASH code to run.

For example, you mentioned the following:

buys two of the cheapest hi meins in the mall, a pr0n chow mein, a fortune cookie, and a milk of mag;
uses the milk;
eats the food;

This is easily turned into ASH using functions on this page. Bale's links are immensely useful for getting to grips with how ASH works, but ultimately it is using ASH that will help you to learn. Also, bear in mind that each wiki page not only tells you the function parameters, but also gives you a code snippet to show you how you could implement it. As an example, buy() is one function that you might use in the above sequence, and the linked page uses a broken skull as its example. From that example, you should be able to see how the ASH-specific datatypes linked to by Bale above can be used.

Also, don't be worried about posting on the forums. If you are trying out some code and are having difficulties, simply post it up here (in code tags) and you will invariably get useful feedback. However, do make the effort to try it yourself and show us what you have done. It is nicer to get constructive help than simply be provided with the script.
 
Last edited:

pekan

New member
I have a question about ASH -- is it used in many programs? Because, before KoL scripts, I've never heard of it.

And also, has anyone ever attempted to make a scripting programs? For instance, it allows you to enter what items to buy, where to adventure, etc? 'It does the work for you if you enter the info' sort of thing.
 

Bale

Minion
I have a question about ASH -- is it used in many programs? Because, before KoL scripts, I've never heard of it.

ASH is a language created by Veracity specifically for automating adventuring in mafia. It's structure owes a lot to other languages, but it is basically a KolMafia-only language.
 

Veracity

Developer
Staff member
I have to make a (number of) corrections: ASH was first invented by Xylpher. It was a perfectly good (compiler) class project from a smart undergraduate, but for it to be suitable for production usage, it needed a bit of work - which I, mostly, provided. Well, a lot of work. Quite a lot of work. And holatuwol and jason have also made significant contributions.

I added maps and records and recursion and switch and for and a bunch of other little things, and made lots and lots of internal efficiency/robustness improvements, so, I'll agree that ASH as you know it is greatly a result of my work, but I will not take credit for "inventing" it.
 

fronobulax

Developer
Staff member
And also, has anyone ever attempted to make a scripting programs? For instance, it allows you to enter what items to buy, where to adventure, etc? 'It does the work for you if you enter the info' sort of thing.
At some level that describes KoLmafia so I'm not sure what you are looking for. Zarqon's MacGuffin and Wossname scripts are a step in that direction. You configure them to do what you want, selecting from options that have been implemented. There has been some discussion about a framework that might support "uber scripting" but it is still in the brainstorming phase.

What is your purpose and what "level" might this operate at? If you want to buy x and then adventure y in z that is so effortless in mafia that it hardly seems worth the effort to try and build something where all you have to do is enter x, y and z. If you want something like a mail merge where you have a template and a tool that replaces fields in the template with values to produce a script then, again, why? Copy, paste and replace come pretty close and I can't imagine needing it often enough to spend the effort to build it. If you are interested in a bot or even an ascending bot then you are probably best off assembling something that does exactly what you want, and trust me, what you think you want will not be as simple as you think.
 

slyz

Developer
And also, has anyone ever attempted to make a scripting programs? For instance, it allows you to enter what items to buy, where to adventure, etc? 'It does the work for you if you enter the info' sort of thing.

I know someone who started working on something like this: a website where you have some options to choose from, and that generates an ASH farming script for you. I don't think it has an ETA though, but you might hear of it on these forums one day.
 

pekan

New member
I know someone who started working on something like this: a website where you have some options to choose from, and that generates an ASH farming script for you. I don't think it has an ETA though, but you might hear of it on these forums one day.

Sorry if it wasn't that clear, but I meant something like this.
 
Top