Advertisement
finaltidus

AutoBuyProfitable.ash

Feb 4th, 2018
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.18 KB | None | 0 0
  1. //VERY EARLY + SIMPLE VERSION. USE AT OWN RISK.
  2. //automatically buy meat profitable items from the mall
  3. //********************************************************
  4.  
  5. int mpaNeeded = 7; //MPA profit required to auto buy.
  6. int buyAmount = 200; //amount of each item to try and buy.
  7. int baseMeatDrop = 250; //avg base meat drop from enemies
  8. float combatFreq = 0.96; //what about forced noncombats tho. barf has forced non-combat every ~25 advs.
  9. float familiarWeight = 75; //familiar weight
  10. float lepPercent = 2.00; //1.00 for lep or 1.25 for hobo or 2.00 for robo with drink
  11. int averageTurnEst = 450; //amount of turns used.
  12. int limitedTurnCount = averageTurnEst; //amount of turns you can spend at the location per day. Used if a buff is longer than the time you can spend there.
  13.  
  14. //********************************************************
  15.  
  16. //get current Familiar bonus at weight, then get weight + 5 and take difference to get final bonus +meat increase.
  17. float famMeatBonus = (220.0 * (familiarWeight * lepPercent))** 0.5 + (2.0 * (familiarWeight * lepPercent)) - 6.0; //fam +meat
  18. float famMeatBonusBuff = (220.0 * ((familiarWeight + 5) * lepPercent))** 0.5 + (2.0 * ((familiarWeight + 5) * lepPercent)) - 6.0; //5 lb over
  19. float bonusMeatDrop = (famMeatBonusBuff - famMeatBonus);
  20.  
  21. //special case items.
  22. int greenspanTurns = limitedTurnCount; if(greenspanTurns > 100) {greenspanTurns = 100;}
  23. float polkaPower = my_level() * 5; if (polkaPower > 55.0) {polkaPower = 55.0;}
  24.  
  25. string[item][int][float] theItemList;
  26.  
  27. //bonusMeatDrop equal to 5 lbs (so for 10 lbs * it by 2)
  28. //I know this isn't EXACT but its close enough
  29. //Commenting out scaling items like songs/taffy because I don't want to do the math right now
  30. //and I don't want to accidentally buy things that are not profitable.
  31.  
  32. theItemList[$item[Meat-inflating powder]][20][50.0] = 0;
  33. theItemList[$item[frost flower ]][50][200.0] = 0;
  34. theItemList[$item[Mick's IcyVapoHotness Inhaler]][10][200.0] = 0;
  35. theItemList[$item[sorority brain]][20][150.0] = 0;
  36. theItemList[$item[resolution: be wealthier]][20][30.0] = 0;
  37. theItemList[$item[Baggie of powdered sugar]][10][10.0] = 0;
  38. theItemList[$item[disco horoscope (Leo)]][10][10.0] = 0;
  39. theItemList[$item[half-baked potion]][1][10.0] = 0;
  40. theItemList[$item[tin cup]][20][20.0] = 0;
  41. theItemList[$item[fudge-shaped hole in space-time]][10][20.0] = 0;
  42. theItemList[$item[shark cartilage]][15][20.0] = 0;
  43. theItemList[$item[bag of Cheat-Os]][10][20.0] = 0;
  44. theItemList[$item[Gene Tonic: Humanoid]][30][20.0] = 0;
  45. theItemList[$item[holly-flavored Hob-O]][1][20.0] = 0;
  46. theItemList[$item[pink candy heart]][10][20.0] = 0;
  47. theItemList[$item[blackberry polite]][5][20.0] = 0;
  48. theItemList[$item[pink-frosted astral cupcake]][20][30.0] = 0;
  49. theItemList[$item[begpwnia]][10][30.0] = 0;
  50. theItemList[$item[blue grass]][20][40.0] = 0;
  51. theItemList[$item[Recording of The Ballad of Richie Thingfinder]][20][50.0] = 0;
  52. theItemList[$item[red snowcone]][20][50.0] = 0;
  53. theItemList[$item[Gene Tonic: Constellation]][30][50.0] = 0;
  54. theItemList[$item[peppermint twist]][10][50.0] = 0;
  55. theItemList[$item[Polka Pop]][10][polkaPower] = 0;
  56. theItemList[$item[Daily Affirmation: Work For Hours a Week]][100][bonusMeatDrop] = 0;
  57. theItemList[$item[Daily Affirmation: Always be Collecting]][100][100.0] = 0;
  58. theItemList[$item[shoulder-warming lotion]][20][bonusMeatDrop] = 0;
  59. theItemList[$item[sugar bunny]][20][bonusMeatDrop] = 0;
  60. theItemList[$item[powdered toad horn]][10][bonusMeatDrop] = 0;
  61. theItemList[$item[Stephen's secret formula]][20][bonusMeatDrop * 2] = 0;
  62. theItemList[$item[shrimp cocktail]][20][bonusMeatDrop] = 0;
  63. theItemList[$item[Friendliness Beverage]][20][bonusMeatDrop] = 0;
  64. theItemList[$item[disintegrating spiky collar]][10][bonusMeatDrop] = 0;
  65. theItemList[$item[cuppa Loyal tea]][30][bonusMeatDrop] = 0;
  66. theItemList[$item[resolution: be kinder]][20][bonusMeatDrop] = 0;
  67. theItemList[$item[Gene Tonic: Construct]][30][bonusMeatDrop] = 0;
  68. theItemList[$item[green snowcone]][20][bonusMeatDrop] = 0;
  69. theItemList[$item[black snowcone]][20][50+bonusMeatDrop] = 0;
  70. theItemList[$item[gingerbread spice latte]][30][bonusMeatDrop * 2] = 0;
  71. theItemList[$item[dog ointment]][20][bonusMeatDrop * 2] = 0;
  72. theItemList[$item[Gene Tonic: Fish]][30][bonusMeatDrop * 2] = 0;
  73. theItemList[$item[irradiated pet snacks]][10][bonusMeatDrop * 2] = 0;
  74. theItemList[$item[Recording of Chorale of Companionship]][20][bonusMeatDrop * 2] = 0;
  75. theItemList[$item[silver face paint]][1][bonusMeatDrop * 4] = 0;
  76. theItemList[$item[Prunets]][5][bonusMeatDrop * 5] = 0; //this is scaling, should really calculate + move it.
  77. theItemList[$item[salt wages]][30][25.0] = 0;
  78. theItemList[$item[cranberry cordial]][5][10.0] = 0;
  79. theItemList[$item[resolution: be luckier]][20][10.0] = 0;
  80. theItemList[$item[vial of porquoise juice]][5][6.0] = 0;
  81. theItemList[$item[flask of porquoise juice]][10][6.0] = 0;
  82. theItemList[$item[jug of porquoise juice]][50][6.0] = 0;
  83. theItemList[$item[cursed wishbone]][30][50.0] = 0;
  84.  
  85.  
  86. //theItemList[$item[Knob Goblin nasal spray]][10][30.0] = 0; //always profitable and NPC buyable, no sense in buying over NPC cost
  87. //theItemList[$item[Knob Goblin pet-buffing spray]][10][bonusMeatDrop] = 0; //always profitable and NPC buyable, no sense in buying over NPC cost
  88. //theItemList[$item[love song of icy revenge]][5][bonusMeatDrop * 2] = 0; //assuming overcapping because fuck math. handled elsewhere now
  89. //theItemList[$item[love song of sugary cuteness]][5][40.0] = 0; //assuming overcapping because fuck math. handled elsewhere now
  90. //theItemList[$item[pulled blue taffy]][10][bonusMeatDrop] = 0; //assuming overcapping because fuck math. handled elsewhere now
  91. //theItemList[$item[pulled yellow taffy]][10][100.0] = 0; //assuming overcapping because fuck math. handled elsewhere now
  92. //theItemList[$item[Uncle Greenspan's Bathroom Finance Guide]][greenspanTurns][greenspanTurns+1.0] = 0; //handled elsewhere now
  93.  
  94. int var1 = 0;
  95. string buyString = "";
  96. foreach itemName, turns, meatBonus in theItemList {
  97. if(limitedTurnCount < turns){
  98. turns = limitedTurnCount;
  99. }
  100. var1 = (((baseMeatDrop * (meatBonus/100)) * combatFreq) - mpaNeeded) * turns;
  101. buyString = "mallbuy " + buyAmount + " " + itemName + " @" + var1;
  102. //print(buyString);
  103. cli_execute(buyString);
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement