First try at a farming script

AgnesM

New member
Hello all,

I have been using Kolmafia for quite a while now but have never tried to write a script. Today I looked over the documentation and attempted to write my first script for basic meat farming. I was hoping all you helpful people out there could provide me with some tips and criticism. (please be gentle) Thanks for all your help!

Code:
outfit farm
acquire 15 twinkly wad
use 15 twinkly wad
acquire 1 milk of magnesium 
use 1 milk of magnesium 
acquire 3 bat wing chow mein 
eat 3 bat wing chow mein 
acquire 4 roll in the hay 
drink 4 roll in the hay 
acquire 1 whiskey and cola 
drink 1 whiskey and cola 
set battleAction = custom 
cast 10 leash of linguini
adventure 20 Giant's Castle
cast 10 leash of linguini
adventure 20 Giant's Castle 
cast 10 leash of linguini
adventure * Giant's Castle
acquire 1 roll in the hay 
drink 1 roll in the hay 
autosell * Angry Farmer Candy
autosell * awful poetry journal 
autosell * chaos butterfly 
autosell * disturbing fanfic 
autosell * furry fur 
autosell * giant needle
autosell * heavy d
autosell * original g 
autosell * plot hole 
autosell * probability potion
autosell * procrastination potion 
autosell * thin black candle 
autosell * wolf mask 
autosell * Mick's IcyVapohotness Rub
use * Warm Subject gift certificate 
stash put * coconut shell 
stash put * little paper umbrella 
stash put * magical ice cubes 
stash put * scrumptious reagent
stash put * dry noodles
outfit sleep
 

macman104

Member
Curious why do you cast 10 leash and then only adventure for 20 turns in the castle? Why not just cast leash a whole bunch of times and then adventure? Alternatively, a better solution would be to just put leash as a mood.

Also, you should totally send me (as a donation of course) your letters and thin black candles instead of selling them (I collect them).
 

AgnesM

New member
my character does not have enough mp to cast leash 30 times without regaining mana points, I have a pith so the 20 turns recharge a good deal of mana. Couple things I was curious about:

Is there a simple way to check the BH for pacifiers and grab the quest if he does?

Also how do you shrug off a song?

Thanks for the advice I will look into sending you some candles.
 

macman104

Member
[quote author=AgnesM link=topic=1474.msg6855#msg6855 date=1201385672]
my character does not have enough mp to cast leash 30 times without regaining mana points, I have a pith so the 20 turns recharge a good deal of mana. Couple things I was curious about:

Is there a simple way to check the BH for pacifiers and grab the quest if he does?[/quote]There are some BH scripts out there. You could look for one of those. But there is no simple way using the CLI (which is what you are using) to do that.
Also how do you shrug off a song
the CLI command is "uneffect effect_name". Do note though, if you cannot shrug the effect mafia will purchase soft green echo eyedrops to remove the effect.
Thanks for the advice I will look into sending you some candles.
I was more joking, but I'm always happy to take donations :).

Just a point of clarification in case you aren't aware. There are two types of scripting available in mafia. There is "CLI" scripting which is using commands that are valid in for use in the CLI. These commands can be used in a script as well, which is what you are doing. There is also ASH which is powerful tool created by Veracity. It's grown into quite an impressive language, but is much more advanced that your basic CLI scripting.
 

charred

Member
i would definately add leash to your moods
that way when you lose the effect mafia will recast it.
then you could just delete the lines
Code:
cast 10 leash of linguini
adventure 20 Giant's Castle
cast 10 leash of linguini
adventure 20 Giant's Castle 
cast 10 leash of linguini
 

AgnesM

New member
Problem is I have had the moods go all wonky on me before and not work, so I decided this way would be more of a "sure thing".

I did however modify the script to add in a few more things.

Code:
csend 50 meat to 1061817
outfit gnob goblin elite
acquire 25 knob goblin nasal 
acquire 25 knob goblin pet 
use 25 gnob goblin nasal 
use 25 knob goblin pet 
outfit farm
acquire 15 twinkly wad
use 15 twinkly wad
acquire 1 milk of magnesium 
use 1 milk of magnesium 
acquire 3 bat wing chow mein 
eat 3 bat wing chow mein 
acquire 4 roll in the hay 
drink 4 roll in the hay 
acquire 1 whiskey and cola 
drink 1 whiskey and cola 
shrug ode 
csend 431 meat to 1061817
wait 200
set battleAction = custom 
cast 10 leash of linguini
adventure 20 Giant's Castle
cast 10 leash of linguini
adventure 20 Giant's Castle 
cast 10 leash of linguini
adventure * Giant's Castle
acquire 1 roll in the hay 
drink 1 roll in the hay 
autosell * Angry Farmer Candy
autosell * awful poetry journal 
autosell * chaos butterfly 
autosell * disturbing fanfic 
autosell * furry fur 
autosell * giant needle
autosell * heavy d
autosell * original g 
autosell * plot hole 
autosell * probability potion
autosell * procrastination potion 
autosell * thin black candle 
autosell * wolf mask 
autosell * Mick's IcyVapohotness Rub
use * Warm Subject gift certificate 
stash put * coconut shell 
stash put * little paper umbrella 
stash put * magical ice cubes 
stash put * scrumptious reagent
stash put * dry noodles
shrug carlw
outfit sleep 
exit

What else do you guys think I can do to improve it? (besides the leash issue)
 

T-Unit

New member
Its been a while but iirc then KolMafia changes your outfit to buy from the knob goblin store anyway.
 
Top