Advertisement
thedictator

mpBurn.ash

Apr 28th, 2019 (edited)
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.77 KB | None | 0 0
  1. script mpBurn
  2. notify the dictator;
  3. import DicsLibrary.ash
  4. import Librams.ash
  5.  
  6. string MPMaximizerString = "mp, -mana cost, -buddybjorn, -crownofthrones, -equip hewn moon-rune spoon, switch tot, switch disembodied hand, switch left-hand man";
  7. boolean maximizedMP = false;
  8. int mpRestored;
  9.  
  10. stat highestBaseStat() {
  11. stat highestStat = $stat[mysticality];
  12. foreach st in $stats[muscle,moxie]
  13. if ( my_basestat(st) > my_basestat(highestStat) )
  14. highestStat = st;
  15. return highestStat;
  16. }
  17.  
  18. boolean GetSphygmayomanometer() {
  19. if (!get_property_bool("_mayoDeviceRented") && get_property_int("mayoLevel") >= 80 ) {
  20. if ( MayoClinicAvailable() )
  21. buy(1,$item[sphygmayomanometer]);
  22. }
  23. return retrieve_item(1,$item[sphygmayomanometer]);
  24. }
  25.  
  26. void MPPrep() {
  27. if ( my_basestat(highestBaseStat()) - my_basestat($stat[mysticality]) > 100 && !(string_modifier("Equalize") == "High" || string_modifier("Equalize") == highestBaseStat().to_string()) ) {
  28. if ( highestBaseStat() == $stat[moxie] ) {
  29. MPMaximizerString = MPMaximizerString+", equip moxie magnet";
  30. equip($item[moxie magnet]);
  31. if ( !has_effect($effect[Ten out of Ten]) && (get_property_bool("daycareOpen") || get_property_bool("_daycareToday")) && !get_property_bool("_daycareSpa") )
  32. cli_execute("daycare moxie");
  33. }
  34. else if ( highestBaseStat() == $stat[muscle] && StockUp(1,$item[oil of stability],654,987)
  35. && to_float(my_basestat($stat[muscle])-my_basestat($stat[mysticality]))*(100.0+numeric_modifier("mysticality percent"))*(100.0+numeric_modifier("maximum mp percent"))/100/100 > 1000 )
  36. {
  37. use(1,$item[oil of stability]);
  38. }
  39. }
  40. if ( !has_effect($effect[Uncucumbered]) && (get_property_bool("daycareOpen") || get_property_bool("_daycareToday")) && !get_property_bool("_daycareSpa") )
  41. cli_execute("daycare mysticality");
  42. StockUp(1,$item[green mana],5432,7654);
  43.  
  44. if ( !get_property_bool("telescopeLookedHigh") && !has_effect($effect[Starry-Eyed]) )
  45. cli_execute("telescope high;");
  46. if ( !get_property_bool("_lyleFavored") && !has_effect($effect[Favored by Lyle]) ) {
  47. cli_execute("monorail buff;");
  48. visit_url("main.php");
  49. }
  50. if ( !get_property_bool("_streamsCrossed") && !has_effect($effect[Total Protonic Reversal]) && available_amount($item[protonic accelerator pack])>0 )
  51. cli_execute("crossstreams;");
  52. if ( !get_property_bool("_ballpit") && !has_effect($effect[Having a Ball!]) && (get_clan_rumpus()["Awesome Ball Pit"] >= 10000 || switchClan(84165)) ) // AfHeck
  53. cli_execute("ballpit;");
  54. if ( !has_effect($effect[Stevedave's Shanty of Superiority]) && have_skill($skill[Stevedave's Shanty of Superiority]) && makeRoomSong() )
  55. use_skill(1,$skill[Stevedave's Shanty of Superiority]);
  56. if ( !has_effect($effect[Song of Bravado]) && have_skill($skill[Song of Bravado]) )
  57. use_skill(1,$skill[Song of Bravado]);
  58. if ( !has_effect($effect[Triple-Sized]) && available_amount($item[Powerful Glove])>0 && $skill[CHEAT CODE: Triple Size].dailylimit > 0 && equip($item[Powerful Glove]) )
  59. use_skill(1,$skill[CHEAT CODE: Triple Size]);
  60. if ( !has_effect($effect[[1457]Blood Sugar Sauce Magic]) && !has_effect($effect[[1458]Blood Sugar Sauce Magic]) && have_skill($skill[Blood Sugar Sauce Magic]) )
  61. use_skill(1,$skill[Blood Sugar Sauce Magic]);
  62. if ( !get_property_bool("_spacegateVaccine") && !has_effect($effect[Broad-Spectrum Vaccine]) && get_property_bool("spacegateVaccine2") && (get_property_bool("spacegateAlways") || get_property_bool("_spacegateToday")) )
  63. cli_execute("spacegate vaccine 2");
  64. GetSphygmayomanometer();
  65. }
  66.  
  67. void MaybeMaximizeMP( int mpRestored ) {
  68. if ( !maximizedMP && (mpRestored < 0 || mpRestored > my_maxmp()-my_mp() || my_maxmp() < mp_cost($skill[Summon BRICKOs])) ) {
  69. MPPrep();
  70. maximize(MPMaximizerString,false);
  71. maximizedMP = true;
  72. }
  73. }
  74.  
  75. void LicenseToChill() {
  76. if ( !get_property_bool("_licenseToChillUsed") && available_amount($item[License to Chill])>0 ) {
  77. MaybeMaximizeMP(-1);
  78. LibramBurn(true);
  79. use(1,$item[license to chill]);
  80. LibramBurn(false);
  81. }
  82. }
  83.  
  84. void PYEC() {
  85. if ( !get_property_bool("expressCardUsed") && available_amount($item[Platinum Yendorian Express Card])>0 ) {
  86. MaybeMaximizeMP(-1);
  87. LibramBurn(true);
  88. use(1,$item[Platinum Yendorian Express Card]);
  89. LibramBurn(false);
  90. }
  91. }
  92.  
  93. void MakeSausages() {
  94. if ( !get_property_bool("_Dic.sausagesCreated") ) {
  95. int createSausages = 0;
  96. createSausages = min(available_amount($item[magical sausage casing]),max(11,min(30,(available_amount($item[magical sausage casing])+get_property_int("_sausagesMade"))/5))-get_property_int("_sausagesMade"));
  97. if ( createSausages > 0 ) {
  98. create(createSausages,$item[magical sausage]);
  99. }
  100. set_property("_Dic.sausagesCreated","true");
  101. }
  102. }
  103.  
  104. void EatSausages( int amount ) {
  105. if ( bossKilling ) {
  106. print("Bosskilling mode, skipping kramco sausage eating","blue");
  107. return;
  108. }
  109. amount = max(amount,0);
  110. amount = min(amount,23-get_property_int("_sausagesEaten"));
  111. tryNumberology();
  112. while ( amount > 0 ) {
  113. MaybeMaximizeMP(999);
  114. if ( eat($item[magical sausage]) )
  115. amount -= 1;
  116. LibramBurn();
  117. tryNumberology();
  118. }
  119. }
  120.  
  121. void FratNuns() {
  122. while ( get_property("sidequestNunsCompleted")=="fratboy" && get_property_int("nunsVisits") < 3) {
  123. mpRestored = 1000;
  124. MaybeMaximizeMP(mpRestored);
  125. if ( mpRestored < my_maxmp()-my_mp() ) {
  126. cli_execute("nuns");
  127. LibramBurn();
  128. }
  129. else
  130. break;
  131. }
  132. }
  133.  
  134. void ClanShower() {
  135. if ( !get_property_bool("_aprilShower") && switchClan(84165) ) { //AfHeck
  136. mpRestored = 1000;
  137. MaybeMaximizeMP(mpRestored);
  138. if ( mpRestored < my_maxmp()-my_mp() ) {
  139. cli_execute("shower hot");
  140. LibramBurn();
  141. }
  142. }
  143. }
  144.  
  145. void FreeRests() {
  146. item previousPants;
  147.  
  148. if ( get_property_int("timesRested") < total_free_rests() ) {
  149. try {
  150. int mpRestored = numeric_modifier(get_dwelling(),"Base Resting MP")*(100+numeric_modifier("Resting MP Percent"))/100;
  151. mpRestored += numeric_modifier("Bonus Resting MP");
  152. if ( equipped_amount($item[pantsgiving])==0 && available_amount($item[pantsgiving])>0 )
  153. mpRestored += numeric_modifier($item[pantsgiving],"Bonus Resting MP");
  154. print("mpRestored: "+mpRestored);
  155. if ( mpRestored > 125 ) {
  156. set_property("restUsingChateau","false");
  157. set_property("restUsingCampAwayTent","false");
  158. if ( equipped_item($slot[pants]) != $item[pantsgiving] && my_fullness()>0 ) {
  159. previousPants = equipped_item($slot[pants]);
  160. equip($slot[pants],$item[pantsgiving]);
  161. }
  162. }
  163. else
  164. mpRestored = 126;
  165. while ( get_property_int("timesRested") < total_free_rests() ) {
  166. MaybeMaximizeMP(mpRestored);
  167. if ( mpRestored < my_maxmp()-my_mp() ) {
  168. cli_execute("rest free");
  169. LibramBurn();
  170. }
  171. else
  172. break;
  173. }
  174. }
  175. finally {
  176. set_property("restUsingChateau","true");
  177. set_property("restUsingCampAwayTent","true");
  178. if ( previousPants != $item[none] && equipped_item($slot[pants]) == $item[pantsgiving] )
  179. equip($slot[pants],previousPants);
  180. }
  181. }
  182. }
  183.  
  184. void NeverendingSoda() {
  185. if ( !get_property_bool("oscusSodaUsed") && item_amount($item[Oscus's neverending soda]) > 0 ) {
  186. mpRestored = 300;
  187. MaybeMaximizeMP(mpRestored);
  188. if ( mpRestored < my_maxmp()-my_mp() ) {
  189. use(1,$item[Oscus's neverending soda]);
  190. LibramBurn();
  191. }
  192. }
  193. }
  194.  
  195. void EternalCarBattery() {
  196. if ( !get_property_bool("_eternalCarBatteryUsed") && item_amount($item[eternal car battery]) > 0 ) {
  197. mpRestored = 55;
  198. MaybeMaximizeMP(mpRestored);
  199. if ( mpRestored < my_maxmp()-my_mp() ) {
  200. use(1,$item[eternal car battery]);
  201. LibramBurn();
  202. }
  203. }
  204. }
  205.  
  206. void mpBurn() {
  207. LibramBurn(false);
  208. LicenseToChill();
  209. PYEC();
  210. MakeSausages();
  211. EatSausages(available_amount($item[magical sausage])-23*11);
  212. FratNuns();
  213. ClanShower();
  214. FreeRests();
  215. NeverendingSoda();
  216. EternalCarBattery();
  217. }
  218.  
  219. void main() {
  220. mpBurn();
  221. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement