myLittleConsumer.ash 1.3
Hello everyone! Now, I don't mean any disrespect to eatdrink.ash by posting this script. I'm learning the art of programming, and I made this to hammer in some concepts. I'm only posting it to practice debugging and working with end users.
So... about the script itself:
myLittleConsumer.ash is a consumption script. It will eat, drink, spleen, and overdrink. It will cast ode if you can, and drink milk if you have it, or can make it.
To run, the simplest way is to run the script like any other. To change how much you eat, drink, and spleen, search for the word "Google". Below that line is the line that you edit (press ctrl + f to find something).
You can also run myLittleConsumer (mLC) from a script. Just import myLittleConsumer into your script, and consume stuff by adding the following line:
Code:
consume( EatUpToThisFullness, DrinkUpToThisInebriety, SpleenUpToThisSpleen, OverDrinkTrueOrFalse, SimulateDontConsumeTrueOrFalse) ;
The script will go through every consumable in the game, from best to worst, and will consume the best thing. The "best" thing being the item that gives you the most adventures per meat spent, while still staying under how much you are willing to spend per adventure. Change this property by typing into the Graphical CLI:
Code:
zlib myLittleConsumerValueOfAdventure = HowMuchYoureWillingToSpendGoesHere
You can use this script in Hardcore... but beware! This script will only pick consumables if the meat per adventure cost of a consumable is less than your myLittleConsumerValueOfAdventure property. This means that it will rarely eat/drink/spleen the best foods/drinks/spleenItems in hardcore. You will not gain as many adventures, but you will spend as little meat as possible. When you can buy from the mall, this script works like you would think it would. This is more of a meat-saving script, and not get-max-adventures script. This script was intended for farmers.
To save on server hits, this script will not check all consumables every day. Long story short, if something is ridiculously expensive, it will rarely do a price check. If something is moderately expensive, it waits a few days for the price to drop before checking again. In hardcore, it only checks items that you could possibly consume.
myLittleConsumer.ash goes into your scripts directory.
Update 0.6 - Minor update to make it do less frivolous mall searches
Update 0.7 - Fixed minor bug introduced in last update
Update 0.8 - Fixed bug where it wasn't over-drinking correctly
Update 0.9 - Fixed bug where the script gave an error if you were already drunk beyound your limits. The script no longer tries to overdrink if you are a teetotaler or an oxygenarian.
Update 1.0 - If you stop the script, it sets "autoBuyPriceLimit" back to normal. mLC no longer needs or uses the "StopCheckingForAShortWhile.txt"
Update 1.1 - mLC now considers the fact that Tiny Plastic Sword drinks give you back the TPS when you drink the drink, making it more likely that mLC will consume TPS drinks
Update 1.15 - If you own a Tiny Plastic Sword, but the TPS is currently skewering something, mLC will now recognize that you own a TPS. However, it will only recognize the TPS if it's in your best interest.
Update 1.2 - Script broke with mafia update 11387. Script fixed.
Update 1.3 - I live! Also, fixed bug that caused the script to do WAYYYYYYYY too many mall searches for food items
Attachments
Last edited: