ereinion

Breakfast-script

Feb 6th, 2017
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import <clanhop.ash>;
  2. import <DinseyQuests.ash>;
  3. import <manaburn.ash>;
  4. import <pvploot.ash>;
  5. import <Detective Solver.ash>;
  6.  
  7. void get_gene_tonics() {
  8.     string campground; int no_to_make;
  9.     campground = visit_url("campground.php?action=workshed");
  10.     no_to_make = 3 - to_int(get_property("_dnaPotionsMade"));
  11.    
  12.     if (campground.contains_text("genelab.gif") && no_to_make > 0 && length(get_property("dnaSyringe")) > 0) {
  13.         while (no_to_make > 0) {
  14.             visit_url("campground.php?action=dnapotion");
  15.             no_to_make = no_to_make - 1;
  16.         }
  17.     }
  18. }
  19.  
  20. void use_papier_mache() {
  21.     item it;
  22.     it = $item[papier-m&acirc;ch&eacute; glob];
  23.    
  24.     if (item_amount($item[papier-m&acirc;ch&eacute; glob]) >= 277) {
  25.         create(item_amount($item[papier-m&acirc;ch&eacute; glob]) / 277, $item[papier-m&acirc;ch&eacute; trophy pi&ntilde;ata]);
  26.         use(item_amount($item[papier-m&acirc;ch&eacute; trophy pi&ntilde;ata]), $item[papier-m&acirc;ch&eacute; trophy pi&ntilde;ata]);
  27.     }
  28. }
  29.  
  30. void checkForGoodies() {
  31.     buffer warroom = visit_url("clan_war.php");
  32.     string pattern = "Bags of Goodies:<\\/td><td align=left><b>(\\d+?)<\\/b><\\/td><\\/tr>";
  33.     matcher goodie_bags = create_matcher(pattern, warroom);
  34.    
  35.     if (find(goodie_bags)) {
  36.         if (group(goodie_bags, 1) == 0) {
  37.             // Get new goodiebag
  38.             print("No goodie bags left, purchasing goodie bag.", "green");
  39.             visit_url("clan_war.php?action=Yep.&goodies=1&oatmeal=&cinderblocks=&grunts=&flyers=&recliners=&archers=");
  40.         }
  41.     }
  42. }
  43.  
  44. void check_clan() {
  45.     string current_clan; string vip_lounge;
  46.  
  47.     // Chips
  48.     if (visit_url("clan_rumpus.php").contains_text("A Snack Machine") && to_int(get_property("_chipBags")) < 3) {
  49.         for i from 1 to 3 - to_int(get_property("_chipBags")) {
  50.             switch (i) {
  51.                 case 1:
  52.                     cli_execute("chips ennui");
  53.                     break;
  54.                 case 2:
  55.                     cli_execute("chips wintergreen");
  56.                     break;
  57.                 case 3:
  58.                     cli_execute("chips radium");
  59.                     break;
  60.                 default:
  61.             }
  62.         }
  63.     }
  64.    
  65.     // VIP Room actions
  66.     if (item_amount($item[Clan VIP Lounge Key]) > 0 && (!to_boolean(get_property("_olympicSwimmingPool")) || !to_boolean(get_property("_lookingGlass")))) {
  67.         vip_lounge = visit_url("clan_viplounge.php?whichfloor=2");
  68.         // No need to clanjump if the items are in the current clan
  69.         current_clan = get_clan_name();
  70.         if (!vip_lounge.contains_text("vippool.gif") || !vip_lounge.contains_text("lookingglass.gif")) {
  71.             clanhop("Bonus Adventures from Hell");
  72.         }
  73.         // Swimming pool
  74.         if (!to_boolean(get_property("_olympicSwimmingPool"))) {
  75.             cli_execute("swim laps");
  76.         }
  77.         // Drink me potion
  78.         if (!to_boolean(get_property("_lookingGlass"))) {
  79.             visit_url("clan_viplounge.php?action=lookingglass&whichfloor=2");
  80.         }
  81.         // Go home
  82.         if (current_clan != get_clan_name()) {
  83.             clanhop(current_clan);
  84.         }
  85.     }
  86. }
  87.  
  88. void check_chateau() {
  89.     string chateau;
  90.     if (!to_boolean(get_property("_chateauDeskHarvested")) && to_boolean(get_property("chateauAvailable"))) {
  91.         chateau = visit_url("place.php?whichplace=chateau");
  92.         if (chateau.contains_text("chateau_desk1")) {
  93.             visit_url("place.php?whichplace=chateau&action=chateau_desk1");
  94.         }
  95.         else if (chateau.contains_text("chateau_desk2")) {
  96.             visit_url("place.php?whichplace=chateau&action=chateau_desk2");
  97.         }
  98.         else if (chateau.contains_text("chateau_desk3")) {
  99.             visit_url("place.php?whichplace=chateau&action=chateau_desk3");
  100.         }
  101.     }
  102. }
  103.  
  104. void check_elemental_planes() {
  105.     item[slot] velvet_items;
  106.     velvet_items[$slot[hat]] = $item[smooth velvet hat];
  107.     velvet_items[$slot[shirt]] = $item[smooth velvet shirt];
  108.     velvet_items[$slot[pants]] = $item[smooth velvet pants];
  109.     velvet_items[$slot[acc1]] = $item[smooth velvet hanky];
  110.     velvet_items[$slot[acc2]] = $item[smooth velvet socks];
  111.     velvet_items[$slot[acc3]] = $item[smooth velvet pocket square];
  112.    
  113.     boolean have_all_velvet; have_all_velvet = true;
  114.     slot slt;
  115.    
  116.     if (to_boolean((get_property("stenchAirportAlways"))) || to_boolean((get_property("_stenchAirportToday")))) {
  117.         get_garbage();
  118.     }
  119.     if (to_boolean((get_property("hotAirportAlways"))) || to_boolean((get_property("_hotAirportToday")))) {
  120.         if (!to_boolean(get_property("_infernoDiscoVisited"))) {
  121.             foreach slt in velvet_items {
  122.                 if (!(can_equip(velvet_items[slt]) && available_amount(velvet_items[slt]) > 0)) {
  123.                     have_all_velvet = false;
  124.                     break;
  125.                 }
  126.             }
  127.             if (have_all_velvet) {
  128.                 cli_execute("checkpoint");
  129.                 foreach slt in velvet_items {
  130.                     if (!have_equipped(velvet_items[slt])) {
  131.                         equip(slt, velvet_items[slt]);
  132.                     }
  133.                 }
  134.                 visit_url("place.php?whichplace=airport_hot&action=airport4_zone1");
  135.                 run_choice(7);
  136.                 cli_execute("outfit checkpoint");
  137.             }
  138.         }
  139.     }
  140. }
  141.  
  142. // mallcuppa by darkcodelagsniper
  143. void harvest_teatree(boolean silent) {
  144.     #int[item] campground = get_campground();
  145.     item [int] cuppas;
  146.     float pricetotal;
  147.     int shaketree;
  148.     item tea;
  149.     string cuppacmd; string cuppaconfirm;
  150.    
  151.     if (!to_boolean(get_property("_pottedTeaTreeUsed")) && get_campground() contains $item[potted tea tree]) {
  152.         for i from 8601 to 8637 {
  153.             tea = to_item(i);
  154.             cuppas[count (cuppas)] = tea;
  155.             pricetotal += get_price(tea, 0.5);
  156.         }
  157.        
  158.         sort cuppas by -get_price(value, 0.5);
  159.         shaketree = pricetotal * 3 / 37;
  160.        
  161.         #if (!silent) {
  162.             print("Avg value from shaking the tree is " + shaketree + " meat","blue");
  163.             print("Best tea is " + cuppas[0] + " at " + historical_price(cuppas[0]) + " meat","blue");
  164.         #}
  165.        
  166.         if (shaketree > historical_price(cuppas[0])) {
  167.             cuppacmd = "shake";
  168.             cuppaconfirm = "Shake teatree?";
  169.         } else {
  170.             cuppacmd = cuppas[0].to_string().substring(6);
  171.             cuppaconfirm = "Pick " + cuppacmd + " from teatree?";
  172.         }
  173.        
  174.         if (silent || user_confirm(cuppaconfirm)) {
  175.             cli_execute("teatree " + cuppacmd);
  176.         }
  177.     }
  178. }
  179.  
  180. void use_fire_starting_kit() {
  181.     // Fire-starting kit
  182.     if (item_amount($item[CSA fire-starting kit]) >= 1 && !to_boolean(get_property("_fireStartingKitUsed"))) {
  183.         if (hippy_stone_broken()) {
  184.             set_property("choiceAdventure595", 1);
  185.         } else {
  186.             set_property("choiceAdventure595", 2);
  187.         }
  188.         use(1, $item[CSA fire-starting kit]);
  189.         set_property("choiceAdventure595", 0);
  190.     }
  191. }
  192.  
  193. void pull_stuff() {
  194.     int[item] max_to_pull; string current_clan;
  195.    
  196.     if (my_name() == "ereinion") {
  197.         current_clan = get_clan_name();
  198.         max_to_pull[$item[jekyllin hide belt]] = 3;
  199.         max_to_pull[$item[hypnodisk]] = 1;
  200.        
  201.         if (current_clan != "Hardcore Oxygenation") {
  202.             clanhop("Hardcore Oxygenation");
  203.         }
  204.         batch_open();
  205.         foreach it in max_to_pull {
  206.             if (stash_amount(it) > 0) {
  207.                 take_stash(min(max_to_pull[it], stash_amount(it)), it);
  208.             }
  209.         }
  210.         batch_close();
  211.         // Go home
  212.         if (current_clan != get_clan_name()) {
  213.             clanhop(current_clan);
  214.         }
  215.     }
  216. }
  217.  
  218. void main() {
  219.     // Stuff we always do
  220.     if (item_amount($item[personal massager]) > 0) {
  221.         print ("Putting " + item_amount($item[personal massager]) + " " + ((item_amount($item[personal massager]) > 1)? to_plural($item[personal massager]) : to_string($item[personal massager])) + ".", "blue");
  222.         put_display(item_amount($item[personal massager]), $item[personal massager]);
  223.     }
  224.     set_property("allowNonMoodBurning", "true");
  225.     if (my_name() == "ereinion" && can_interact()) {
  226.         set_property("allowNonMoodBurning", "false");
  227.     }
  228.    
  229.     // Stuff to do when out of ronin
  230.     if (can_interact()) {// && !to_boolean(get_property("breakfastCompleted"))) {
  231.         // BittyCar
  232.         if (item_amount($item[BittyCar MeatCar]) >= 1 && get_property("_bittycar") != "meatcar") {
  233.             use(1, $item[BittyCar MeatCar]);
  234.         } else if (item_amount($item[BittyCar SoulCar]) >= 1 && get_property("_bittycar") == "") {
  235.             use(1, $item[BittyCar SoulCar]);
  236.         }
  237.        
  238.         // Deck of Every Card
  239.         if (item_amount($item[Deck of Every Card]) > 0) {  // && my_name() != "ereinion") {
  240.             switch (to_int(get_property("_deckCardsDrawn"))) {
  241.                 // Kan trekke tre kort
  242.                 case 0:
  243.                     cli_execute("play 1952 mickey mantle");
  244.                 // Kan trekke to
  245.                 case 1: case 2: case 3: case 4:  case 5:
  246.                   cli_execute("play ancestral recall");
  247.                 // Kan trekke eittcase 6:
  248.                 case 7: case 8: case 9: case 10:
  249.                   cli_execute("play island");
  250.                 default:
  251.             }
  252.         }
  253.        
  254.         // Trade yeti skins
  255.         if (is_accessible($coinmaster[The Trapper])  && item_amount($item[yeti fur]) >  0) {
  256.             buy ($coinmaster[The Trapper], item_amount($item[yeti fur]), $item[yak skin]);
  257.         }
  258.        
  259.         use_fire_starting_kit();
  260.         check_chateau();
  261.         check_clan();
  262.        
  263.         // Summoning
  264.         if (have_skill($skill[Summon Annoyance])) {
  265.             use_skill(1, $skill[Summon Annoyance]);
  266.         }
  267.        
  268.         // Rainbow Gravitation & Summon Clip Art
  269.         if (my_name() == "ereinion" || my_name() == "algen" || my_name() == "the conqueror worm") {
  270.             cli_execute("call Profitable summons.ash");
  271.             if (my_name() == "ereinion") {
  272.                 cli_execute("call Rainbow Gravitation.ash");
  273.             }
  274.         }
  275.        
  276.         if (to_boolean(get_property("hasDetectiveSchool"))) {
  277.             solveAllCases(false);
  278.         }
  279.         // Harvest teatree
  280.         harvest_teatree(false);
  281.        
  282.         // Restock goodie bags
  283.         if (get_clan_name() == "'); drop table clans;--") {
  284.             checkForGoodies();
  285.         }
  286.        
  287.         // Pull stuff
  288.         pull_stuff();
  289.        
  290.         check_elemental_planes();
  291.         get_gene_tonics();
  292.        
  293.         // Demand sandwich
  294.         if (my_path() == "Avatar of Boris") {
  295.             use_skill(3, $skill[Demand Sandwich]);
  296.         }
  297.        
  298.         // Restock stolen items
  299.         main@pvploot();
  300.     }
  301. }
Advertisement
Add Comment
Please, Sign In to add comment