Fluxxdog
Active member
Superdrinks for Fun and Profit!
Superdrinks 717
I've got a little script here for whipping up Superhuman drinks. Couldn't find another one I liked. This one requires ZLib and is listed as a dependency. This is intended to be run as part of a beforeBattleScript. If you have a custom one, or use someone else's, you can basically add to the bBS:
When run as part of a beforeBattleScript, if you don't have all the ingredients right away but pick them up later, it'll start making drinks right away.
It can also be run as a standalone script. Just type "superdrinks" in the CLI.
There are several zlib settings that should be set to properly make drinks how you like. Without setting variables, it will make drinks by making what you have the least of. However, for a more personal selection, set these zlib vars:
superdrink_preferred:
none: default behavior, makes drinks that you have the least of
drink: Only make that specified drink, such as Mae West
garnish: makes drinks using only that kind of garnish, such as coconut shells
most: makes drinks using the garnish you have the most of
stat: makes drinks that give only the single stat you specify, such as moxie
single: only makes drinks that provide one kind of stat bonus
day: if today is a stat bonus day, make those single stat drinks, otherwise, treat as 'single' setting
refine: only makes single stat drinks using the garnish you have the most of <=excellent one to use
sake: only makes infused sake drinks
salty: makes as many salacious cocktails as it can before switching to the 'single' setting
ooze-o: only makes bottles of ooze-o
superdrink_only_preferred:
true/false: When true, the script will stop when you cannot make any more of your preferred drink, otherwise it will loosen restrictions to make more drinks until you're out of still uses.
superdrink_use_sake:
superdrink_use_salty:
superdrink_use_ooze-o:
true/false: if true, include these kinds of drinks in calculation. If your preferred drink is either of these, these will register as true.
superdrink_tempmall:
true/false: If true, will temporarily override your setting "autoSatisfyWithMall" to purchase ingredients from the mall and will set it back to false at the end. If you already have it as true, it will leave it alone.
superdrink_accuracy:
float: Determines the accuracy of prices used. The lower the number, the higher the accuracy, but this will require more frequent server hits. As SHC drinks tend to be somewhat stable, this shouldn't need to be changed.
superdrink_profit:
yes/true: Makes drinks that you can make the most profit off of.
no/false: doesn't factor in costs and just makes drinks
auto/mall: Makes most profitable drinks, puts them in your mall store**, and sets a competitive price (95% as reported by historical value). If you use this feature, it is advised that you use either 'single', 'refine', or 'none' as your preferred drink setting. If you have no shop, it will simply act as if you had set this to 'true'.
clan/stash: Makes drinks and puts them in your clan's stash**, you altruistic person you! If you are not currently part of a clan, it will simply act as if you had set this to 'false'.
**In the case of mall selling or clan stashing, if you are in Ronin or Hardcore, it will not transfer drinks. This way, you don't have to worry about forgetting to change the value and accidentally lose all your drinks for the day.
v706: Added check_version, flag check to keep Supershake() from false positives, added zLib var for preferred drink
v707: Fixed bug that would cause nothing to ever be made if you didn't have 0 of a drink.
v708: Fixed a bug that mixed up drink recipes. (Not so much a bug as a misunderstanding of the sort explanation.) Added ability to buy from mall. Reworked recipe records (ha!) into a datafile.
v709: Eliminated data file and now uses a more dynamic recipe system. Laid groundwork for making profitable drinks.
v710: Refined recipe creation, can now be used to calculate how profitable drinks are to make AND make them accordingly. Set your zlib verbosity to 6 to get heavy details. This has been tested on 3 accounts and seems to be working well. However, none of the accounts have easy access to sea items and no access to Salacious Cocktailcrafting. Please read through the script to understand the settings. All error reporting would be appreciated.
v711: Fixed 'return' error that was causing recipes to be made at Mafia's whim and expanded creation plans.
v712: Tidied up some code and added make_superdrinks() for importing. Fixed error where having a preferred drink and mall buying enabled couldn't properly execute the script.
v713: Tidied up the code and added debug info (verbosity 10) should it be needed as well as a host of improvements, including vastly simplifying mall selling. And let me tell ya, mall selling works great! Safety is gone!
v714: Added Ooze-O processing, fixed bug where suddenly being unable to make drinks would not mall/stash your drinks.
v715: Cleaned and tweaked code.
v716: Reworked code to not need separate library. You still need zlib, but that shouldn't be much of an issue.
v717: Moved to SVN. Reformat code. Added try..finally to allow drinks made to always show.
Superdrinks 717
Code:
svn checkout https://svn.code.sf.net/p/fluxxdog-coding/code/trunk/superdrinks
Code:
import <superdrinks.ash>;
if(stills_available()>0) make_superdrinks();
It can also be run as a standalone script. Just type "superdrinks" in the CLI.
There are several zlib settings that should be set to properly make drinks how you like. Without setting variables, it will make drinks by making what you have the least of. However, for a more personal selection, set these zlib vars:
superdrink_preferred:
none: default behavior, makes drinks that you have the least of
drink: Only make that specified drink, such as Mae West
garnish: makes drinks using only that kind of garnish, such as coconut shells
most: makes drinks using the garnish you have the most of
stat: makes drinks that give only the single stat you specify, such as moxie
single: only makes drinks that provide one kind of stat bonus
day: if today is a stat bonus day, make those single stat drinks, otherwise, treat as 'single' setting
refine: only makes single stat drinks using the garnish you have the most of <=excellent one to use
sake: only makes infused sake drinks
salty: makes as many salacious cocktails as it can before switching to the 'single' setting
ooze-o: only makes bottles of ooze-o
superdrink_only_preferred:
true/false: When true, the script will stop when you cannot make any more of your preferred drink, otherwise it will loosen restrictions to make more drinks until you're out of still uses.
superdrink_use_sake:
superdrink_use_salty:
superdrink_use_ooze-o:
true/false: if true, include these kinds of drinks in calculation. If your preferred drink is either of these, these will register as true.
superdrink_tempmall:
true/false: If true, will temporarily override your setting "autoSatisfyWithMall" to purchase ingredients from the mall and will set it back to false at the end. If you already have it as true, it will leave it alone.
superdrink_accuracy:
float: Determines the accuracy of prices used. The lower the number, the higher the accuracy, but this will require more frequent server hits. As SHC drinks tend to be somewhat stable, this shouldn't need to be changed.
superdrink_profit:
yes/true: Makes drinks that you can make the most profit off of.
no/false: doesn't factor in costs and just makes drinks
auto/mall: Makes most profitable drinks, puts them in your mall store**, and sets a competitive price (95% as reported by historical value). If you use this feature, it is advised that you use either 'single', 'refine', or 'none' as your preferred drink setting. If you have no shop, it will simply act as if you had set this to 'true'.
clan/stash: Makes drinks and puts them in your clan's stash**, you altruistic person you! If you are not currently part of a clan, it will simply act as if you had set this to 'false'.
**In the case of mall selling or clan stashing, if you are in Ronin or Hardcore, it will not transfer drinks. This way, you don't have to worry about forgetting to change the value and accidentally lose all your drinks for the day.
v706: Added check_version, flag check to keep Supershake() from false positives, added zLib var for preferred drink
v707: Fixed bug that would cause nothing to ever be made if you didn't have 0 of a drink.
v708: Fixed a bug that mixed up drink recipes. (Not so much a bug as a misunderstanding of the sort explanation.) Added ability to buy from mall. Reworked recipe records (ha!) into a datafile.
v709: Eliminated data file and now uses a more dynamic recipe system. Laid groundwork for making profitable drinks.
v710: Refined recipe creation, can now be used to calculate how profitable drinks are to make AND make them accordingly. Set your zlib verbosity to 6 to get heavy details. This has been tested on 3 accounts and seems to be working well. However, none of the accounts have easy access to sea items and no access to Salacious Cocktailcrafting. Please read through the script to understand the settings. All error reporting would be appreciated.
v711: Fixed 'return' error that was causing recipes to be made at Mafia's whim and expanded creation plans.
v712: Tidied up some code and added make_superdrinks() for importing. Fixed error where having a preferred drink and mall buying enabled couldn't properly execute the script.
v713: Tidied up the code and added debug info (verbosity 10) should it be needed as well as a host of improvements, including vastly simplifying mall selling. And let me tell ya, mall selling works great! Safety is gone!
v714: Added Ooze-O processing, fixed bug where suddenly being unable to make drinks would not mall/stash your drinks.
v715: Cleaned and tweaked code.
v716: Reworked code to not need separate library. You still need zlib, but that shouldn't be much of an issue.
v717: Moved to SVN. Reformat code. Added try..finally to allow drinks made to always show.
Last edited: