efilnikufecin
Member
This script is based on farming the Icy Peak for meat, however very little code in it is directly related to the Icy Peak. Most of it is eating and drinking, and it tries to eat the best possible food for each character class, and drink appropriately too. The script handles TPS drinks, bartender explosion (on each crafting cycle), and nightcaps.
The script will not eat if you are 1 point below falling down drunk. This allows the script to be ran again in the event of an error like running out of elemental. I may have over did my double checking drunkenness, but I always say better safe than sorry.
This script does not yet make foods. That is a future upgrade. It does purchase items from the mall as needed. It has one definite glitch. That being that if you are wearing your filthy hippy disguise, and you don't have a spare set, it will buy a second set.
I still need to do a lot of code cleaning, and optimizing, but it does get the job done.
Edit: Updated eating part. If the character has the pastamastery skill, then this script now makes the needed chow mien instead of buying it. The script will buy the components if needed.
Bartenders and chefs are now made instead of bought if you don't have an extra. Any components you don't have will be bought.
After replacing a chef or bartender, a currently do nothing function is called which in the future will put an items left in inventory from the explosion into the mall at maximum price. It currently contains a bunch of comments as a build a list of explosion items.
Edit2:
*added MP testing for casting of ODE to Booze,
*ported the SkillCost function (written by myself, renamed and finished by Nightmist) into the script for use while casting Ode To Booze, and later implementation of self buffing.
*Ported a shortened down version of Presto Ragu's RestorerSelector into the script to help scrounge inventory for unused mp restorers. The shortened down version is split into 3 separate functions 2 of which only mimic an array of items the actual RestorerSelector Function now uses a loop/array combination. This is currently used for casting Ode, and will be used later for other self buffing.
*if enough MP restorers cannot be found to cast Ode, 1 Phonics Down is bought and used. On my todo list is including magical mystery juice when possible to the list of items.
Edit3:
*The script now places items which appear in inventory after a chef or bartender explodes into the mall. a few are set for min price, but most are at maximum price.
*A GetKnobBuffs() function has been added to obtain the effects wasabi sinuses, and heavy petting for the duration of adventures. A GoElite() function has been added as a helper function.
*Casting of Leash of Linguini is now handled by the script.
*Another conversion function has been added. effect SkillToEffect(skill buff) Logic will tell you what it does.
*The DoDaily function has been revamped to prevent purchasing and using of knob goblin items if the script needs to be ran a second time. It also prevents changing to the "meatfarm" outfit if all you are running the script for is rollover preparation.
*The very last command in the script is now print("Script Finished"); so that you know that it is done. For some reason this script does not display "script returned value 0" like other scripts do. Before it ended with "putting on outfit custom rollover" No indication of success or fail.
Edit 4:
*Added Mushroom fields to the script for those who are a muscle sign. Currently set to farm knoll mushrooms. Can easily be changed to any first generation mushroom. If after harvesting the field it finds that it has not gained any of the type of mushroom it is farming it will not plant the field. This is so that the script can be ran over again as needed. If it finds it has gained 1, Then it will plant all of the locations. Harvesting the field only picks full grown mushrooms. The fields farming can be turned off in void main() by commenting out the line:
*Now Creates a file in the same directory as KOLMafia is in which contains some data about what the script accomplished today. There is still more to be added to this part. The filename is based on the characters name. For my character it would be efilnikufecin_data.inf Each time the script is run it will append the new info to the end of the file from the previous day unless it has been deleted. Before going to much further with that I am going to write in an easy way to stop it from writing this file. This script will probably soon have a sister script called settings.ash which will be used to set things like the use of clockwork chef or bartender, what mushrooms to plant, and so on.
Edit 5
*fixed booze drinking errors listed below and 1 that wasn't. The one that wasn't listed was tps drinks when having a drunkenness level of 1 when the script starts (same issue, wrong drinks drunk). I believe drinking is handled properly now.
I just watched the script go through and build a bartender on a character that didn't have advanced cocktailcrafting so I know it works now
*added the settings() function at the top of the script. Some settings have been added. Change DoFields = true; to DoFields = false; and the script will not handle the mushroom fields. if someone wanted, they could use a my_name test for using this script in different ways on different characters.
*I noticed some clutter appearing in the kolmafia folder. The .inf files. They are now going into a folder called chardata which will be created in the kolmafia folder. Hopefully that will be helpfull on multi user computers.
*added the function "Boolean IsZodiacStat(stat Test)" for use in determining wether or not you are a muscle sign for the mushroom fields, and determining if you are moxie for the supertinker
*added optional use of clockwork bartender and/or chef. This option can be changed in settings() also added a function to create a clockwork sphere if you are a moxie sign and want to use a clockwork servant. If not a moxie sign, and you don't have a sphere, 1 is bought. This option can be very expensive, and risky. Clockwork spheres seem to spike in price quite often.
Edit6:
Another update:
Made a slight change to the way Ode to Booze purchasing is handled, and added purchasing of empathy, phat loot, polka and elemental.
Based on present settings, it will buy 6000 turns of a buff except ode when that buff drops below 1000 adventures remaining. Prices, buffbot names, and minimum before purchasing more of a buff are stored in a variable so that other users can set buff purchasing up according to their own preferences. Prices are also a variable for quick fixing price changes.
More options:
//ode1 is the amount to send before adventuring
//ode2 is sent after adventuring.
int ode1 = 1;
int ode2 = 11;
//how low the buffs will get before triggering auto purchase.
int minbuff = 1000;
//the amount to send to the buff bot for each buff
int Elemental = 12995;
int Empathy = 7581;
int loot = 6497;
int polka = 2887;
//the preferred sauceror buffer
string SCBuffer = "testudinata";
//preferred Turtle tamer buffer
string TTBuffer = "testudinata";
//preferred accordian thief buffer
string ATBuffer = "testudinata";
The script will not eat if you are 1 point below falling down drunk. This allows the script to be ran again in the event of an error like running out of elemental. I may have over did my double checking drunkenness, but I always say better safe than sorry.
This script does not yet make foods. That is a future upgrade. It does purchase items from the mall as needed. It has one definite glitch. That being that if you are wearing your filthy hippy disguise, and you don't have a spare set, it will buy a second set.
I still need to do a lot of code cleaning, and optimizing, but it does get the job done.
Edit: Updated eating part. If the character has the pastamastery skill, then this script now makes the needed chow mien instead of buying it. The script will buy the components if needed.
Bartenders and chefs are now made instead of bought if you don't have an extra. Any components you don't have will be bought.
After replacing a chef or bartender, a currently do nothing function is called which in the future will put an items left in inventory from the explosion into the mall at maximum price. It currently contains a bunch of comments as a build a list of explosion items.
Edit2:
*added MP testing for casting of ODE to Booze,
*ported the SkillCost function (written by myself, renamed and finished by Nightmist) into the script for use while casting Ode To Booze, and later implementation of self buffing.
*Ported a shortened down version of Presto Ragu's RestorerSelector into the script to help scrounge inventory for unused mp restorers. The shortened down version is split into 3 separate functions 2 of which only mimic an array of items the actual RestorerSelector Function now uses a loop/array combination. This is currently used for casting Ode, and will be used later for other self buffing.
*if enough MP restorers cannot be found to cast Ode, 1 Phonics Down is bought and used. On my todo list is including magical mystery juice when possible to the list of items.
Edit3:
*The script now places items which appear in inventory after a chef or bartender explodes into the mall. a few are set for min price, but most are at maximum price.
*A GetKnobBuffs() function has been added to obtain the effects wasabi sinuses, and heavy petting for the duration of adventures. A GoElite() function has been added as a helper function.
*Casting of Leash of Linguini is now handled by the script.
*Another conversion function has been added. effect SkillToEffect(skill buff) Logic will tell you what it does.
*The DoDaily function has been revamped to prevent purchasing and using of knob goblin items if the script needs to be ran a second time. It also prevents changing to the "meatfarm" outfit if all you are running the script for is rollover preparation.
*The very last command in the script is now print("Script Finished"); so that you know that it is done. For some reason this script does not display "script returned value 0" like other scripts do. Before it ended with "putting on outfit custom rollover" No indication of success or fail.
Edit 4:
*Added Mushroom fields to the script for those who are a muscle sign. Currently set to farm knoll mushrooms. Can easily be changed to any first generation mushroom. If after harvesting the field it finds that it has not gained any of the type of mushroom it is farming it will not plant the field. This is so that the script can be ran over again as needed. If it finds it has gained 1, Then it will plant all of the locations. Harvesting the field only picks full grown mushrooms. The fields farming can be turned off in void main() by commenting out the line:
Code:
if(my_zodiac() == $zodiac[wallaby] || my_zodiac() == $zodiac[vole] || my_zodiac() == $zodiac[mongoose]){DoMushroomFields();}
Edit 5
*fixed booze drinking errors listed below and 1 that wasn't. The one that wasn't listed was tps drinks when having a drunkenness level of 1 when the script starts (same issue, wrong drinks drunk). I believe drinking is handled properly now.
I just watched the script go through and build a bartender on a character that didn't have advanced cocktailcrafting so I know it works now

*added the settings() function at the top of the script. Some settings have been added. Change DoFields = true; to DoFields = false; and the script will not handle the mushroom fields. if someone wanted, they could use a my_name test for using this script in different ways on different characters.
*I noticed some clutter appearing in the kolmafia folder. The .inf files. They are now going into a folder called chardata which will be created in the kolmafia folder. Hopefully that will be helpfull on multi user computers.
*added the function "Boolean IsZodiacStat(stat Test)" for use in determining wether or not you are a muscle sign for the mushroom fields, and determining if you are moxie for the supertinker
*added optional use of clockwork bartender and/or chef. This option can be changed in settings() also added a function to create a clockwork sphere if you are a moxie sign and want to use a clockwork servant. If not a moxie sign, and you don't have a sphere, 1 is bought. This option can be very expensive, and risky. Clockwork spheres seem to spike in price quite often.
Edit6:
Another update:
Made a slight change to the way Ode to Booze purchasing is handled, and added purchasing of empathy, phat loot, polka and elemental.
Based on present settings, it will buy 6000 turns of a buff except ode when that buff drops below 1000 adventures remaining. Prices, buffbot names, and minimum before purchasing more of a buff are stored in a variable so that other users can set buff purchasing up according to their own preferences. Prices are also a variable for quick fixing price changes.
More options:
//ode1 is the amount to send before adventuring
//ode2 is sent after adventuring.
int ode1 = 1;
int ode2 = 11;
//how low the buffs will get before triggering auto purchase.
int minbuff = 1000;
//the amount to send to the buff bot for each buff
int Elemental = 12995;
int Empathy = 7581;
int loot = 6497;
int polka = 2887;
//the preferred sauceror buffer
string SCBuffer = "testudinata";
//preferred Turtle tamer buffer
string TTBuffer = "testudinata";
//preferred accordian thief buffer
string ATBuffer = "testudinata";