Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import <EatDrink.ash>;
  2. import <manual_buffs.ash>
  3. import <pvpbestgear.ash>
  4. import <pvploot.ash>
  5. import <zlib.ash>
  6. import <AT_song_support.ash>
  7.  
  8. void get_ode() {
  9.     // Get ode from some other source
  10.     int[string] otherBuffbotsPrices;
  11.     otherBuffbotsPrices["kolabuff"] = 2;
  12.     otherBuffbotsPrices["testudinata"] = 11;
  13.     otherBuffbotsPrices["noblesse oblige"] = 16;
  14.     otherBuffbotsPrices["iocainebot"] = 23;
  15.     otherBuffbotsPrices["notbot"] = 40;
  16.     otherBuffbotsPrices["tinkerballa"] = 67;
  17.  
  18.     if (!have_equipped($item[plexiglass pendant]) && available_amount($item[plexiglass pendant]) > 0) {
  19.         equip($slot[acc3], $item[plexiglass pendant]);
  20.     }
  21.    
  22.     while (available_song_slots() <= 0) {
  23.         open_song_spot();
  24.     }
  25.    
  26.     cli_execute("refresh effects");
  27.     if (!(have_effect($effect[Ode to Booze]) > 15)) {
  28.         if (is_online("buffy")) {
  29.             chat_private("buffy", "ode");
  30.             wait(30);
  31.         }
  32.         foreach buffbot in otherBuffbotsPrices {
  33.             cli_execute("refresh effects");
  34.             if (have_effect($effect[Ode to Booze]) > 0) {
  35.                 return;
  36.             }
  37.             if (is_online(buffbot) && !(have_effect($effect[Ode to Booze]) > 0)) {
  38.                 kmail(buffbot, "", otherBuffbotsPrices[buffbot]);
  39.                 wait(20);
  40.             }
  41.         }
  42.     }
  43. }
  44.  
  45. // Consumption
  46. void consumption() {
  47.     SIM_CONSUME = false;
  48.    
  49.     if (my_inebriety() < inebriety_limit() || my_fullness() < fullness_limit() || my_spleen_use() < spleen_limit()) {
  50.         if (!(have_effect($effect[Ode to Booze]) > 0)) {
  51.             get_ode();
  52.         }
  53.         eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
  54.     }
  55.     // Increase fullness/drunkenness limits.
  56.     if (!to_boolean(get_property("_syntheticDogHairPillUsed")) && item_amount($item[synthetic dog hair pill]) >= 1) {
  57.         use(1, $item[synthetic dog hair pill]);
  58.     }
  59.     if (!to_boolean(get_property("_distentionPillUsed")) && item_amount($item[distention pill]) >= 1) {
  60.         // If pantsgiving is available, delay using distention pill.
  61.         if ((item_amount($item[pantsgiving]) == 0 && !have_equipped($item[pantsgiving])) || to_int(get_property("_pantsgivingFullness")) >= 2) {
  62.             use(1, $item[distention pill]);
  63.         }
  64.     }
  65.     if (my_inebriety() < inebriety_limit() || my_fullness() < fullness_limit()) {
  66.         print("test", "red");
  67.         eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
  68.     }
  69. }
  70.  
  71. // Adventuring
  72. boolean changePantsAfterAdventuringFor1(location whereToAdv) {
  73.     if (have_equipped($item[pantsgiving])) {
  74.         int pantsFullness;
  75.         pantsFullness = to_int(get_property("_pantsgivingFullness"));
  76.         adventure(1, whereToAdv);
  77.         if (to_int(get_property("_pantsgivingCount")) >= 49) {
  78.             consumption();
  79.         }
  80.         if (to_int(get_property("_pantsgivingFullness")) >= 2) {
  81.             return true;
  82.         }
  83.     }
  84.     return false;
  85. }
  86.  
  87. void farm(string modifier_string) {
  88.     // No need to run this if out of adventures
  89.     if (my_adventures() == 0) {
  90.         return;
  91.     }
  92.     // What familiar you use once you've got all the drops, and where to farm
  93.     familiar defaultFamiliar;
  94.     location whereToAdv;   
  95.     if (modifier_string == "Meat Drop") {
  96.         defaultFamiliar = $familiar[hobo monkey];
  97.         whereToAdv = $location[Sloppy Seconds Diner];
  98.     } else if (modifier_string == "Item Drop") {
  99.         defaultFamiliar = $familiar[jumpsuited hound dog];
  100.         whereToAdv = $location[The Haunted Library];
  101.     }
  102.    
  103.     // Initial maximizer string
  104.     buffer maximizer_string;
  105.     maximizer_string.append(modifier_string + ", -tie, -current");
  106.     if (item_amount($item[pantsgiving]) >= 1 || have_equipped($item[pantsgiving])) {
  107.         if (get_property("_pantsgivingFullness") < 2) {
  108.             equip($slot[pants], $item[pantsgiving]);
  109.             maximizer_string.append(", -pants");
  110.         }
  111.     }
  112.     string preserved_max_string;
  113.    
  114.     // Concerning familiars
  115.     string[familiar] dropperProperty;
  116.     dropperProperty[$familiar[Angry Jung Man]] = "_jungDrops";                          // Item, meat
  117.     dropperProperty[$familiar[Blavious Kloop]] = "_kloopDrops";                         // Item, meat
  118.     dropperProperty[$familiar[Bloovian Groose]] = "_grooseDrops";                       // Meat
  119.     dropperProperty[$familiar[Green Pixie]] = "_absintheDrops";                         // Item
  120.     dropperProperty[$familiar[Grim Brother]] = "_grimFairyTaleDrops";               // Meat
  121.     dropperProperty[$familiar[Grimstone Golem]] = "_grimstoneMaskDrops";        // Item, meat
  122.     dropperProperty[$familiar[Li'l Xenomorph]] = "_transponderDrops";               // Item, meat
  123.     dropperProperty[$familiar[Pair of Stomping Boots]] = "_bootStomps";         // Item
  124.     dropperProperty[$familiar[Unconscious Collective]] = "_dreamJarDrops";  // Meat
  125.    
  126.     int[familiar] otherThan5;
  127.     otherThan5[$familiar[Angry Jung Man]] = 1;
  128.     otherThan5[$familiar[Grimstone Golem]] = 1;
  129.     otherThan5[$familiar[Pair of Stomping Boots]] = 7;
  130.     int goal;
  131.    
  132.     // Equip hamster, in case the maximizer tries to use the garbage detector (!)
  133.     if (item_amount($item[Hodgman\'s imaginary hamster]) > 0 && my_path() != "Avatar of Boris" && my_path() != "Way of the Surprising Fist") {
  134.         if (weapon_hands(equipped_item($slot[weapon])) > 1) {
  135.             equip($slot[weapon], $item[none]);
  136.         }
  137.         equip($slot[off-hand], $item[Hodgman\'s imaginary hamster]);
  138.     }
  139.    
  140.     // Special cases
  141.     switch (my_path()) {
  142.         case "Avatar of Boris":
  143.             if (item_amount($item[Clancy's lute]) > 0) {
  144.                 use(1, $item[Clancy's lute]);
  145.             }
  146.             equip($slot[weapon], $item[Trusty]);
  147.             maximize(maximizer_string, false);
  148.             while (my_adventures() > 0) {
  149.                 if (have_equipped($item[pantsgiving])) {
  150.                     if (changePantsAfterAdventuringFor1(whereToAdv)) {
  151.                         maximizer_string.replace_string(", -pants", "");
  152.                         maximize(maximizer_string, false);
  153.                     }
  154.                 } else {
  155.                     adventure(my_adventures(), whereToAdv);
  156.                 }
  157.             }
  158.             break;
  159.         case "Avatar of Sneaky Pete":
  160.             maximize(maximizer_string, false);
  161.             while (my_adventures() > 0) {
  162.                 if (have_equipped($item[pantsgiving])) {
  163.                     if (changePantsAfterAdventuringFor1(whereToAdv)) {
  164.                         maximizer_string.replace_string(", -pants", "");
  165.                         maximize(maximizer_string, false);
  166.                     }
  167.                 } else {
  168.                     adventure(my_adventures(), whereToAdv);
  169.                 }
  170.             }
  171.             break;
  172.         case "Avatar of Jarlsberg":
  173.             if (my_companion() != "Eggman" && have_skill($skill[Egg Man]) && item_amount($item[Cosmic Egg]) > 0) {
  174.                 use_skill(1, $skill[Egg Man]);
  175.             }
  176.             maximize(maximizer_string, false);
  177.             while (my_adventures() > 0) {
  178.                 if (have_equipped($item[pantsgiving])) {
  179.                     if (changePantsAfterAdventuringFor1(whereToAdv)) {
  180.                         maximizer_string.replace_string(", -pants", "");
  181.                         maximize(maximizer_string, false);
  182.                     }
  183.                 } else {
  184.                     adventure(my_adventures(), whereToAdv);
  185.                 }
  186.             }
  187.             break;
  188.         default:
  189.             // Use all item-dropping familiars which also buffs what you are trying to farm (item/meat)
  190.             foreach fam in dropperProperty {
  191.                 // Have it, correct drop modifier, adventures left
  192.                 if(have_familiar(fam) && numeric_modifier(fam, modifier_string, 20, familiar_equipment(fam)) > 0 && my_adventures() > 0) {
  193.                     use_familiar(fam);
  194.                     if (fam == $familiar[Li'l Xenomorph] && dropperProperty[fam] < 5) {
  195.                         maximizer_string.append(", equip tiny top hat and cane");
  196.                     }
  197.                     if (otherThan5 contains fam) {
  198.                         goal = otherThan5[fam];
  199.                     } else {
  200.                         goal = 5;
  201.                     }
  202.                     // Not at max drops
  203.                     if (to_int(get_property(dropperProperty[fam])) < goal) {
  204.                         // Change gear
  205.                         maximize(maximizer_string, false);
  206.                         // Adventure
  207.                         while(get_property(dropperProperty[fam]) < goal && my_adventures() > 0) {
  208.                             if (have_equipped($item[pantsgiving])) {
  209.                                 if(changePantsAfterAdventuringFor1(whereToAdv)) {
  210.                                     maximizer_string.replace_string(", -pants", "");
  211.                                     maximize(maximizer_string, false);
  212.                                 }
  213.                             } else {
  214.                                 adventure(1, whereToAdv);
  215.                             }
  216.                         }
  217.                     }
  218.                     // If tiny top hat and cane added to maximizer string, remove it.
  219.                     maximizer_string.replace_string(", equip tiny top hat and cane", "");
  220.                 }
  221.             }
  222.             // Burn the rest of your adventures using the default familiar.
  223.             if (my_adventures() > 0) {
  224.                 use_familiar(defaultFamiliar);
  225.                 maximize(maximizer_string, false);
  226.                 adventure(my_adventures(), whereToAdv);
  227.             }
  228.             // End of switch
  229.     }
  230. }
  231.  
  232. void main(string what_to_farm) {
  233.     // Exit on invalid input
  234.     string modifier_string;
  235.     if (to_lower_case(what_to_farm).contains_text("meat")) {
  236.         modifier_string = "Meat Drop";
  237.     } else if (to_lower_case(what_to_farm).contains_text("item")) {
  238.         modifier_string = "Item Drop";
  239.     } else {
  240.         print("Error in input; \'" + what_to_farm + "\'. The string given to the script should be either \'meat\' or \'item'. Try again.", "red");
  241.         exit;
  242.     }
  243.    
  244.     // Consume
  245.     if (!have_equipped($item[plexiglass pendant]) && item_amount($item[plexiglass pendant]) >= 1) {
  246.         equip($slot[acc3], $item[plexiglass pendant]);
  247.     }
  248.     if (my_inebriety() < inebriety_limit()) {
  249.         manual_buffs(true);
  250.         wait(30);
  251.     }
  252.     consumption();
  253.    
  254.     // Farm
  255.     farm(modifier_string);
  256.    
  257.     // Overdrink
  258.     get_ode();
  259.     eatdrink(0, inebriety_limit(), 0, true);
  260.    
  261.     // Rollover-outfit
  262.     if (hippy_stone_broken()) {
  263.         cli_execute("refresh inv");
  264.         main@pvploot();
  265.         main@pvpbestgear();
  266.         cli_execute("flowers");
  267.         maximize("0.1 adv, pvp fights, -current", false);
  268.     } else {
  269.         maximize("adv, -current", false);
  270.     }
  271. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement