ereinion

FreeFights

Sep 8th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. boolean fold(item doodad) {
  2.     if(available_amount(doodad) > 0) return true;
  3.     foreach other in get_related(doodad, "fold")
  4.         if(available_amount(other) > 0)
  5.             return cli_execute("fold "+doodad);
  6.     return false;
  7. }
  8.  
  9. boolean equip_stuff() {
  10.     equip($slot[hat], $item[training helmet]);
  11.     equip($slot[weapon], $item[bottle-rocket crossbow]);
  12.     equip($slot[off-hand], $item[kol con 13 snowglobe]);
  13.     equip($slot[back], $item[buddy bjorn]);
  14.     if (fold($item[makeshift garbage shirt])) {
  15.         equip($slot[shirt], $item[makeshift garbage shirt]);
  16.     } else {
  17.         print_html("<font color=008000>No suitable shirt creatable</font>");
  18.     }
  19.     equip($slot[pants], $item[pantsgiving]);
  20.     equip($slot[acc1], $item[mr. cheeng's spectacles]); // '
  21.     equip($slot[acc2], $item[time-twitching toolbelt]);
  22.     equip($slot[acc3], $item[mafia thumb ring]);
  23.     use_familiar($familiar[Ms. Puck Man]);
  24.     equip($slot[familiar], $item[mayflower bouquet]);
  25.     return true;
  26. }
  27.  
  28. familiar select_bjorn_familiar() {
  29.     string[familiar] property_of_familiar;
  30.     int[familiar] no_of_drops_familiar;
  31.    
  32.     property_of_familiar[$familiar[garbage fire]] = "_garbageFireDropsCrown";
  33.     property_of_familiar[$familiar[grim brother]] = "_grimFairyTaleDropsCrown";
  34.     property_of_familiar[$familiar[grimstone golem]] = "_grimstoneMaskDropsCrown";
  35.     property_of_familiar[$familiar[trick-or-treating tot]] = "_hoardedCandyDropsCrown";
  36.     property_of_familiar[$familiar[optimistic candle]] = "_optimisticCandleDropsCrown";
  37.     property_of_familiar[$familiar[adventurous spelunker]] = "_oreDropsCrown";
  38.     property_of_familiar[$familiar[twitching space critter]] = "_spaceFurDropsCrown";
  39.     property_of_familiar[$familiar[machine elf]] = "_abstractionDropsCrown";
  40.    
  41.     no_of_drops_familiar[$familiar[garbage fire]] = 3;
  42.     no_of_drops_familiar[$familiar[grim brother]] = 2;
  43.     no_of_drops_familiar[$familiar[grimstone golem]] = 1;
  44.     no_of_drops_familiar[$familiar[trick-or-treating tot]] = 3;
  45.     no_of_drops_familiar[$familiar[optimistic candle]] = 3;
  46.     no_of_drops_familiar[$familiar[adventurous spelunker]] = 6;
  47.     no_of_drops_familiar[$familiar[twitching space critter]] = 1;
  48.     no_of_drops_familiar[$familiar[machine elf]] = 25;
  49.    
  50.     foreach fam in property_of_familiar {
  51.         if (to_int(get_property(property_of_familiar[fam])) < no_of_drops_familiar[fam]) {
  52.             return fam;
  53.         }
  54.     }
  55.    
  56.     return $familiar[none];
  57. }
  58.  
  59. void equip_in_bjorn() {
  60.     familiar fam;
  61.     fam = select_bjorn_familiar();
  62.    
  63.     if (fam == $familiar[none]) {
  64.         equip($slot[back], $item[protonic accelerator pack]);
  65.     } else {
  66.         if (my_bjorned_familiar() != fam) {
  67.             bjornify_familiar(fam);
  68.         }
  69.     }
  70. }
  71.  
  72. boolean god_lobster_fights(int fights_to_run) {
  73.     # check which values to put in run_choice
  74.     familiar fam = my_familiar();
  75.     int i = 0;
  76.    
  77.     if (use_familiar($familiar[god lobster])) {
  78.         while (to_int(get_property("_godLobsterFights")) < 3 && i < fights_to_run) {
  79.             visit_url("main.php?fightgodlobster=1");
  80.             if (available_amount($item[god lobster's crown]) <= 0) { // '
  81.                 run_choice(0);
  82.             } else {
  83.                 run_choice(1);
  84.             }
  85.             i = i + 1;
  86.         }
  87.         use_familiar(fam);
  88.     }
  89.     return to_boolean(i != 0);
  90. }
  91.  
  92. boolean adventure_at_location(int fights_to_run) {
  93.     int i = 0;
  94.    
  95.     // Snojo
  96.     while (to_int(get_property("_snojoFreeFights")) < 10 && i < fights_to_run) {
  97.         adv1($location[The X-32-F Combat Training Snowman],-1,"");
  98.         i = i + 1;
  99.     }
  100.     // The Neverending Party
  101.     # Figure out how to deal with the noncombats
  102.     while (to_int(get_property("_neverendingPartyFreeTurns")) < 10 && i < fights_to_run) {
  103.         adv1($location[The Neverending Party],-1,"");
  104.         i = i + 1;
  105.     }
  106.     return to_boolean(i != 0);
  107. }
  108.  
  109. boolean adventure_in_tunnels(int fights_to_run) {
  110.     int i = 0;
  111.     familiar fam = my_familiar();
  112.    
  113.     cli_execute("checkpoint");
  114.     equip($slot[back], $item[protonic accelerator pack]);
  115.     equip($slot[acc2], $item[mr. screege's spectacles]); // '
  116.     equip($slot[familiar], $item[mayflower bouquet]);
  117.     if (available_amount($item[pantogram pants]) > 0) {
  118.         equip($slot[pants], $item[pantogram pants]);
  119.     } else {
  120.         equip($slot[pants], $item[greatest american pants]);
  121.     }
  122.     if (use_familiar($familiar[machine elf])) {
  123.         while (to_int(get_property("_machineTunnelsAdv")) < 5 && i < fights_to_run) {
  124.             adv1($location[The Deep Machine Tunnels],-1,"");
  125.             i = i + 1;
  126.         }
  127.         use_familiar(fam);
  128.         cli_execute("outfit checkpoint");
  129.     }
  130.     return to_boolean(i != 0);
  131. }
  132.  
  133. boolean eldritch_tentacles(int fights_to_run) {
  134.     int i = 0;
  135.     if (!to_boolean(get_property("_eldritchHorrorEvoked")) && i < fights_to_run) {
  136.         use_skill(1, $skill[evoke eldritch horror]);
  137.         i = i + 1;
  138.     }
  139.     if (!to_boolean(get_property("_eldritchTentacleFought")) && i < fights_to_run) {
  140.         visit_url("place.php?whichplace=forestvillage&action=fv_scientist");
  141.         run_choice(1);
  142.         i = i + 1;
  143.     }
  144.     return to_boolean(i != 0);
  145. }
  146.  
  147. boolean love_tunnel() {
  148.     if (!to_boolean(get_property("_loveTunnelUsed")) && to_boolean(get_property("loveTunnelAvailable"))) {
  149.         visit_url("place.php?whichplace=town_wrong&action=townwrong_tunnel");
  150.         run_choice(1);
  151.         run_choice(1);
  152.         visit_url("choice.php");
  153.         // 1 = Eardigan, 2 = Epaulettes, 3 = Earring
  154.         run_choice(3);
  155.         run_choice(1);
  156.         visit_url("choice.php");
  157.         // 1 = Lovebotamy, 2 = Open Heart Surgery, 3 = Wandering Eye Surgery
  158.         run_choice(2);
  159.         run_choice(1);
  160.         // 1 = Enamorang, 2 = Emotionizer, 3 = Extraterrestrial Chocolate, 4 = Echinacea Bouquet, 5 = Elephant, 6 = 2 pieces of toast
  161.         run_choice(1);
  162.     }
  163.     return true;
  164. }
  165.  
  166. boolean witchess_fights(int fights_to_run) {
  167.     int i = 0;
  168.     int choice_adv;
  169.    
  170.     if(to_int(get_property("_witchessFights")) < 5 && i < fights_to_run) {
  171.         // Witchess Knight or Ox?
  172.         choice_adv = to_int(get_property("_witchessFights")) != 4 ? 1936 : 1937;
  173.         if (choice_adv == 1937) {
  174.             use_skill(1, $skill[Frigidalmatian]);
  175.             if (my_primestat() == $stat[muscle]) {
  176.                 equip($slot[weapon], $item[stainless steel shillelagh]);
  177.             }
  178.         }
  179.         visit_url("campground.php?action=witchess");
  180.         run_choice(1);
  181.         visit_url("choice.php?option=1&pwd=" + my_hash() + "&whichchoice=1182&piece=" + to_string(choice_adv), false);
  182.         run_combat();
  183.         i = i + 1;
  184.         if (have_effect($effect[frigidalmatian]) > 0) {
  185.             cli_execute("shrug frigidalmatian");
  186.             equip($slot[weapon], $item[bottle-rocket crossbow]);
  187.         }
  188.     }
  189.     return to_boolean(i != 0);
  190. }
  191.  
  192. boolean infernal_seals(int fights_to_run) {
  193.     item item_to_use = $item[depleted uranium seal figurine];
  194.     int i = 0;
  195.     int max_summons = 5 + to_int(item_amount($item[claw of the infernal seal]) > 0)*5;
  196.     item prev_weapon = equipped_item($slot[weapon]);
  197.    
  198.     if(to_int(get_property("_sealsSummoned")) < max_summons && i < fights_to_run && my_class() == $class[seal clubber]) {
  199.         if (item_amount($item[imbued seal-blubber candle]) == 0) {
  200.             if (available_amount($item[powdered sealbone]) == 0) {
  201.                 if (item_amount($item[figurine of an ancient seal]) == 0) {
  202.                     hermit(1, $item[figurine of an ancient seal]);
  203.                 }
  204.                 item_to_use =  $item[figurine of an ancient seal];
  205.                 retrieve_item(3, $item[seal-blubber candle]);
  206.             } else {
  207.                 retrieve_item(1, $item[imbued seal-blubber candle]);
  208.             }
  209.         }
  210.         if (item_type(equipped_item($slot[weapon])) != "club") {
  211.             equip($slot[weapon], $item[stainless steel shillelagh]);
  212.         }
  213.         use(1, item_to_use);
  214.         equip($slot[weapon], prev_weapon);
  215.         i = i + 1;
  216.     }
  217.     return to_boolean(i != 0);
  218. }
  219.  
  220. void burn_free_fights() {
  221.     equip_stuff();
  222.     equip_in_bjorn();
  223.     #while (god_lobster_fights(1)) { equip_in_bjorn(); }
  224.     if (love_tunnel()) { equip_in_bjorn(); }
  225.     while (adventure_at_location(1)) { equip_in_bjorn(); }
  226.     while (eldritch_tentacles(1)) { equip_in_bjorn(); }
  227.     while (witchess_fights(1)) { equip_in_bjorn(); }
  228.     while (infernal_seals(1)) { equip_in_bjorn(); }
  229.     if (adventure_in_tunnels(6)) {}
  230. }
  231.  
  232. void main() {
  233.     burn_free_fights();
  234. }
Add Comment
Please, Sign In to add comment