Advertisement
Guest User

cc_ascend.ash

a guest
Jul 14th, 2015
863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 278.80 KB | None | 0 0
  1. script "cc_ascend.ash";
  2. //notify cheesecookie;
  3. since r15930;
  4.  
  5. /***    svn checkout https://svn.code.sf.net/p/ccascend/code/cc_ascend
  6.         Killing is wrong, and bad. There should be a new, stronger word for killing like badwrong or badong. YES, killing is badong. From this moment, I will stand for the opposite of killing, gnodab.
  7. ***/
  8.  
  9. import <cc_combat.ash>
  10. import <cc_util.ash>
  11. import <cc_ascend/heavyrains.ash>
  12. import <cc_ascend/picky.ash>
  13. import <cc_ascend/standard.ash>
  14. import <cc_ascend/floristfriar.ash>
  15. import <cc_ascend/chateaumantegna.ash>
  16. import <cc_ascend/cc_equipment.ash>
  17. import <cc_ascend/cc_edTheUndying.ash>
  18. import <cc_ascend/cc_eudora.ash>
  19. import <cc_ascend/cc_summerfun.ash>
  20. import <cc_ascend/cc_elementalPlanes.ash>
  21.  
  22.  
  23. boolean LX_handleSpookyravenNecklace();
  24. boolean LX_handleSpookyravenFirstFloor();
  25. boolean LX_phatLootToken();
  26. boolean LX_islandAccess();
  27. boolean LX_fancyOilPainting();
  28. boolean LX_setBallroomSong();
  29. boolean LX_pirateOutfit();
  30. boolean LX_pirateInsults();
  31. boolean LX_pirateBlueprint();
  32. boolean LX_pirateBeerPong();
  33. boolean LX_fcle();
  34. boolean LX_ornateDowsingRod();
  35. boolean LX_getDictionary();
  36. boolean LX_dictionary();
  37. boolean LX_dinseylandfillFunbucks();
  38. boolean LX_nastyBooty();
  39. boolean LX_spookyravenSecond();
  40. boolean LX_spookyBedroomCombat();
  41. boolean LX_getDigitalKey();
  42.  
  43. boolean Lsc_flyerSeals();
  44.  
  45. boolean L0_handleRainDoh();
  46.  
  47. boolean L1_edIsland();
  48. boolean L1_edDinsey();
  49. boolean L1_edIsland(int dickstabOverride);
  50. boolean L1_edIslandFallback();
  51. boolean L2_mosquito();
  52. boolean L2_treeCoin();
  53. boolean L2_spookyMap();
  54. boolean L2_spookyFertilizer();
  55. boolean L2_spookySapling();
  56.  
  57. boolean L3_tavern();
  58.  
  59. boolean L4_batCave();
  60. boolean L5_haremOutfit();
  61. boolean L5_goblinKing();
  62. boolean L5_getEncryptionKey();
  63. boolean L6_friarsGetParts();
  64. boolean L6_friarsHotWing();
  65. boolean L8_trapperStart();
  66. boolean L7_crypt();
  67. boolean L8_trapperGround();
  68. boolean L8_trapperYeti();
  69. boolean L9_chasmStart();
  70. boolean L9_chasmBuild();
  71. boolean L9_highLandlord();
  72. boolean L9_aBooPeak();
  73. boolean L9_twinPeak();
  74. boolean L9_oilPeak();
  75. boolean L9_leafletQuest();
  76.  
  77. boolean L10_plantThatBean();
  78. boolean L10_airship();
  79. boolean L10_basement();
  80. boolean L10_ground();
  81. boolean L10_topFloor();
  82. boolean L10_holeInTheSky();
  83. boolean L11_holeInTheSky();
  84. boolean L11_blackMarket();
  85. boolean L11_forgedDocuments();
  86. boolean L11_mcmuffinDiary();
  87. boolean L11_unlockHiddenCity();
  88. boolean L11_hiddenCityZones();
  89. boolean L11_talismanOfNam();
  90. boolean L11_mauriceSpookyraven();
  91. boolean L11_nostrilOfTheSerpent();
  92. boolean L11_unlockPyramid();
  93. boolean L11_unlockEd();
  94. boolean L11_defeatEd();
  95. boolean L11_getBeehive();
  96. boolean L12_flyerFinish();
  97. boolean L12_preOutfit();
  98. boolean L12_getOutfit();
  99. boolean L12_startWar();
  100. boolean L12_filthworms();
  101. boolean L12_sonofaBeach();
  102. boolean L12_sonofaFinish();
  103. boolean L12_gremlins();
  104. boolean L12_gremlinStart();
  105. boolean L12_orchardFinalize();
  106. boolean L12_orchardStart();
  107. boolean L12_finalizeWar();
  108. boolean L12_nunsTrickGlandGet();
  109. boolean L13_sorceressDoor();
  110. boolean questOverride();
  111.  
  112. boolean ccEat(int howMany, item toEat)
  113. {
  114.     boolean retval = false;
  115.     while(howMany > 0)
  116.     {
  117.         if((get_campground() contains $item[Portable Mayo Clinic]) && (my_meat() > 11000))
  118.         {
  119.             buy(1, $item[Mayoflex]);
  120.             use(1, $item[Mayoflex]);
  121.         }
  122.         retval = eat(1, toEat);
  123.         howMany = howMany - 1;
  124.     }
  125.     return retval;
  126. }
  127.  
  128. boolean trackingSplitterFixer(string oldSetting, int day, string newSetting)
  129. {
  130.     /***
  131.         This will be removed at some point once a reasonable amount of time has
  132.         passed such that anyone who used the script before a conversion in here
  133.         should have had it fix them.
  134.     ***/
  135.  
  136.     string setting = get_property(oldSetting);
  137.     if(setting == "")
  138.     {
  139.         return false;
  140.     }
  141.  
  142.     matcher cleanSpaces = create_matcher(", ", setting);
  143.     setting = replace_all(cleanSpaces, ",");
  144.     string[int] retval = split_string(setting, ",");
  145.     foreach x in retval
  146.     {
  147.         if(retval[x] == "")
  148.         {
  149.             continue;
  150.         }
  151.         matcher dayAdder = create_matcher("[(]", retval[x]);
  152.         retval[x] = replace_all(dayAdder, "(" + day + ":");
  153.         if(get_property(newSetting) != "")
  154.         {
  155.             set_property(newSetting, get_property(newSetting) + "," + retval[x]);
  156.         }
  157.         else
  158.         {
  159.             set_property(newSetting, retval[x]);
  160.         }
  161.     }
  162.     set_property(oldSetting, "");
  163.     return true;
  164. }
  165.  
  166.  
  167. boolean settingFixer()
  168. {
  169.     /***
  170.         This will be removed at some point once a reasonable amount of time has
  171.         passed such that anyone who used the script before a conversion in here
  172.         should have had it fix them.
  173.     ***/
  174.     trackingSplitterFixer("cc_banishes_day1", 1, "cc_banishes");
  175.     trackingSplitterFixer("cc_banishes_day2", 2, "cc_banishes");
  176.     trackingSplitterFixer("cc_banishes_day3", 3, "cc_banishes");
  177.     trackingSplitterFixer("cc_banishes_day4", 4, "cc_banishes");
  178.     trackingSplitterFixer("cc_yellowRay_day1", 1, "cc_yellowRays");
  179.     trackingSplitterFixer("cc_yellowRay_day2", 2, "cc_yellowRays");
  180.     trackingSplitterFixer("cc_yellowRay_day3", 3, "cc_yellowRays");
  181.     trackingSplitterFixer("cc_yellowRay_day4", 4, "cc_yellowRays");
  182.     trackingSplitterFixer("cc_lashes_day1", 1, "cc_lashes");
  183.     trackingSplitterFixer("cc_lashes_day2", 2, "cc_lashes");
  184.     trackingSplitterFixer("cc_lashes_day3", 3, "cc_lashes");
  185.     trackingSplitterFixer("cc_lashes_day4", 4, "cc_lashes");
  186.     trackingSplitterFixer("cc_renenutet_day1", 1, "cc_renenutet");
  187.     trackingSplitterFixer("cc_renenutet_day2", 2, "cc_renenutet");
  188.     trackingSplitterFixer("cc_renenutet_day3", 3, "cc_renenutet");
  189.     trackingSplitterFixer("cc_renenutet_day4", 4, "cc_renenutet");
  190.  
  191.     if(get_property("cc_delayTimer") == "")
  192.     {
  193.         set_property("cc_delayTimer", 1);
  194.     }
  195.     if(get_property("cc_100familiar") == "yes")
  196.     {
  197.         set_property("cc_100familiar", true);
  198.     }
  199.     if(get_property("cc_100familiar") == "no")
  200.     {
  201.         set_property("cc_100familiar", false);
  202.     }
  203.     if(get_property("cc_useCubeling") == "yes")
  204.     {
  205.         set_property("cc_useCubeling", true);
  206.     }
  207.     if(get_property("cc_useCubeling") == "no")
  208.     {
  209.         set_property("cc_useCubeling", false);
  210.     }
  211.     if(get_property("cc_wandOfNagamar") == "yes")
  212.     {
  213.         set_property("cc_wandOfNagamar", true);
  214.     }
  215.     if(get_property("cc_wandOfNagamar") == "no")
  216.     {
  217.         set_property("cc_wandOfNagamar", false);
  218.     }
  219.     if(get_property("cc_chasmBusted") == "yes")
  220.     {
  221.         set_property("cc_chasmBusted", true);
  222.     }
  223.     if(get_property("cc_chasmBusted") == "no")
  224.     {
  225.         set_property("cc_chasmBusted", false);
  226.     }
  227.     if(get_property("cc_edDelayTimer") != "")
  228.     {
  229.         set_property("cc_delayTimer", get_property("cc_edDelayTimer"));
  230.         set_property("cc_edDelayTimer", "");
  231.     }
  232.     if(get_property("cc_grimstoneFancyOilPainting") == "need")
  233.     {
  234.         set_property("cc_grimstoneFancyOilPainting", true);
  235.     }
  236.     if(get_property("cc_grimstoneFancyOilPainting") == "no")
  237.     {
  238.         set_property("cc_grimstoneFancyOilPainting", false);
  239.     }
  240.     if(get_property("cc_grimstoneOrnateDowsingRod") == "need")
  241.     {
  242.         set_property("cc_grimstoneOrnateDowsingRod", true);
  243.     }
  244.     if(get_property("cc_grimstoneOrnateDowsingRod") == "no")
  245.     {
  246.         set_property("cc_grimstoneOrnateDowsingRod", false);
  247.     }
  248.  
  249.     if(get_property("kingLiberatedScript") == "scripts/kingLiberated.ash")
  250.     {
  251.         set_property("kingLiberatedScript", "kingcheese.ash");
  252.     }
  253.     if(get_property("afterAdventureScript") == "scripts/postadventure.ash")
  254.     {
  255.         set_property("afterAdventureScript", "postcheese.ash");
  256.     }
  257.     if(get_property("betweenAdventureScript") == "scripts/preadventure.ash")
  258.     {
  259.         set_property("betweenAdventureScript", "precheese.ash");
  260.     }
  261.     if(get_property("betweenBattleScript") == "scripts/preadventure.ash")
  262.     {
  263.         set_property("betweenBattleScript", "precheese.ash");
  264.     }
  265.     return true;
  266. }
  267.  
  268.  
  269. void initializeSettings()
  270. {
  271.     if(my_ascensions() <= get_property("cc_doneInitialize").to_int())
  272.     {
  273.         return;
  274.     }
  275.     set_property("cc_doneInitialize", my_ascensions());
  276.  
  277. #   cli_execute("ccs cc_default");
  278.  
  279.     if(my_familiar() != $familiar[none])
  280.     {
  281.         set_property("cc_100familiar", true);
  282.         set_property("cc_useCubeling", false);
  283.     }
  284.     else
  285.     {
  286.         set_property("cc_useCubeling", true);
  287.         set_property("cc_100familiar", false);
  288.     }
  289.  
  290.     set_property("chasmBridgeProgress", 0);
  291.  
  292.     set_property("cc_abooclover", "");
  293.     set_property("cc_aboocount", "0");
  294.     set_property("cc_aftercore", "");
  295.     set_property("cc_airship", "");
  296.     set_property("cc_ballroom", "");
  297.     set_property("cc_ballroomflat", "");
  298.     set_property("cc_ballroomopen", "");
  299.     set_property("cc_ballroomsong", "");
  300.     set_property("cc_banishes", "");
  301.     set_property("cc_bat", "");
  302.     set_property("cc_bean", "");
  303.     set_property("cc_getBeehive", false);
  304.     set_property("cc_blackfam", true);
  305.     set_property("cc_blackmap", "");
  306.     set_property("cc_boopeak", "");
  307.     set_property("cc_breakstone", get_property("cc_pvpEnable").to_boolean());
  308.     set_property("cc_castlebasement", "");
  309.     set_property("cc_castleground", "");
  310.     set_property("cc_castletop", "");
  311.     set_property("cc_chasmBusted", true);
  312.     set_property("cc_clanstuff", "0");
  313.     set_property("cc_crackpotjar", "");
  314.     set_property("cc_crypt", "");
  315.     set_property("cc_cubeItems", "");
  316.     set_property("cc_day1_cobb", "");
  317.     set_property("cc_day1_dna", "");
  318.     set_property("cc_day1_init", "");
  319.     set_property("cc_day2_init", "");
  320.     set_property("cc_day3_init", "");
  321.     set_property("cc_day4_init", "");
  322.     set_property("cc_disableAdventureHandling", "no");
  323.     set_property("cc_doCombatCopy", "no");
  324.     set_property("cc_fcle", "");
  325.     set_property("cc_friars", "");
  326.     set_property("cc_funTracker", "");
  327.     set_property("cc_gaudy", "");
  328.     set_property("cc_gaudypiratecount", "");
  329.     set_property("cc_getStarKey", false);
  330.     set_property("cc_goblinking", "");
  331.     set_property("cc_gremlins", "");
  332.     set_property("cc_gremlinclap", "");
  333.     set_property("cc_gremlinbatter", "");
  334.     set_property("cc_gremlinpants", "");
  335.     set_property("cc_gremlinlouder", "");
  336.     set_property("cc_grimfairytale", "");
  337.     set_property("cc_grimstoneFancyOilPainting", true);
  338.     set_property("cc_grimstoneOrnateDowsingRod", true);
  339.     set_property("cc_guildmeat", "");
  340.     set_property("cc_gunpowder", "");
  341.     set_property("cc_hasrainman", "");
  342.     set_property("cc_haslightningbolt", "");
  343.     set_property("cc_haveoven", false);
  344.     set_property("cc_hedge", "fast");
  345.     set_property("cc_hiddenapartment", "0");
  346.     set_property("cc_hiddenbowling", "");
  347.     set_property("cc_hiddencity", "");
  348.     set_property("cc_hiddenhospital", "");
  349.     set_property("cc_hiddenoffice", "0");
  350.     set_property("cc_hiddenunlock", "");
  351.     set_property("cc_hiddenzones", "");
  352.     set_property("cc_highlandlord", "");
  353.     set_property("cc_hippyInstead", false);
  354.     set_property("cc_holeinthesky", false);
  355.     set_property("cc_hugeghuol", "");
  356.     set_property("cc_ignoreFlyer", false);
  357.     set_property("cc_killingjar", "");
  358.     set_property("cc_mcmuffin", "");
  359.     set_property("cc_mistypeak", "");
  360.     set_property("cc_modernzmobiecount", "");
  361.     set_property("cc_mosquito", "");
  362.     set_property("cc_nuns", "");
  363.  
  364.     if((my_name() == "Cheesecookie") && (my_path() != "Actually Ed the Undying"))
  365.     {
  366.         set_property("cc_nunsTrick", true);
  367.     }
  368.     else
  369.     {
  370.         set_property("cc_nunsTrick", "no");
  371.     }
  372.     set_property("cc_nunsTrickActive", "no");
  373.     set_property("cc_nunsTrickGland", "");
  374.     set_property("cc_nunsTrickCount", "0");
  375.     set_property("cc_nunsTrickReady", "");
  376.     set_property("cc_oilpeak", "");
  377.     set_property("cc_orchard", "");
  378.     set_property("cc_palindome", "");
  379.     set_property("cc_phatloot", "");
  380.     set_property("cc_prewar", "");
  381.     set_property("cc_prehippy", "");
  382.     set_property("cc_pirateoutfit", "");
  383.     set_property("cc_priorCharpaneMode", "0");
  384.     set_property("cc_semirare", "");
  385.     set_property("cc_semisub", "");
  386.     set_property("cc_snapshot", "");
  387.     set_property("cc_sniffs", "");
  388.     set_property("cc_spookyfertilizer", "finished");
  389.     set_property("cc_spookymap", "");
  390.     set_property("cc_spookyravennecklace", "");
  391.     set_property("cc_spookyravensecond", "");
  392.     set_property("cc_spookysapling", "");
  393.     set_property("cc_sonata", "");
  394.     set_property("cc_sorceress", "");
  395.     set_property("cc_swordfish", "");
  396.     set_property("cc_tavern", "");
  397.     set_property("cc_trytower", "");
  398.     set_property("cc_trapper", "");
  399.     set_property("cc_treecoin", "");
  400.     set_property("cc_twinpeak", "");
  401.     set_property("cc_twinpeakprogress", "");
  402.     set_property("cc_waitingArrowAlcove", "50");
  403.     set_property("cc_wandOfNagamar", false);
  404.     set_property("cc_war", "");
  405.     set_property("cc_winebomb", "");
  406.     set_property("cc_writingDeskSummon", false);
  407.     set_property("cc_yellowRay_day1", "");
  408.     set_property("cc_yellowRay_day2", "");
  409.     set_property("cc_yellowRay_day3", "");
  410.     set_property("cc_yellowRay_day4", "");
  411.     set_property("cc_yellowRays", "");
  412.  
  413.     if(in_hardcore())
  414.     {
  415.         set_property("cc_spookyfertilizer", "");
  416.     }
  417.  
  418.     elementalPlanes_initializeSettings();
  419.     eudora_initializeSettings();
  420.     hr_initializeSettings();
  421.     picky_initializeSettings();
  422.     standard_initializeSettings();
  423.     florist_initializeSettings();
  424.     chateaumantegna_initializeSettings();
  425.     ocrs_initializeSettings();
  426.     ed_initializeSettings();
  427.  
  428. }
  429.  
  430.  
  431. boolean ccAdv(int num, location loc, string option)
  432. {
  433.     if(option == "")
  434.     {
  435.         option = "cc_combatHandler";
  436.     }
  437.     if(my_path() == "Actually Ed the Undying")
  438.     {
  439.         return ed_ccAdv(num, loc, option);
  440.     }
  441.  
  442.     boolean retval = adv1(loc, num, option);
  443.     if(my_path() == "One Crazy Random Summer")
  444.     {
  445.         if((contains_text(get_property("cc_funPrefix"), "clingy")) || last_monster().random_modifiers["clingy"])
  446.         {
  447.             int oldDesert = get_property("desertExploration").to_int();
  448.             retval = ccAdv(num, loc, option);
  449.             if(my_location() == $location[The Arid\, Extra-Dry Desert])
  450.             {
  451.                 set_property("desertExploration", oldDesert);
  452.             }
  453.         }
  454.     }
  455.     return retval;
  456. }
  457.  
  458. boolean ccAdv(int num, location loc)
  459. {
  460.     return ccAdv(num, loc, "");
  461. }
  462.  
  463.  
  464. boolean ccAdvBypass(string url, location loc)
  465. {
  466.     if(my_class() == $class[Ed])
  467.     {
  468.         ed_preAdv(1, loc, "");
  469.     }
  470.  
  471.     print("About to start a combat indirectly at " + loc + "...", "blue");
  472.     string page = visit_url(url);
  473.     if((my_hp() == 0) || (get_property("_edDefeats").to_int() == 1))
  474.     {
  475.         print("Uh oh! Died when starting a combat indirectly.", "red");
  476.         if(my_class() == $class[Ed])
  477.         {
  478.             return ed_ccAdv(1, loc, "", true);
  479.         }
  480.         abort("ccAdvBypass override abort");
  481.     }
  482.     if(contains_text(page, "Combat"))
  483.     {
  484.         return ccAdv(1, loc);
  485.     }
  486.     return false;
  487. }
  488. boolean ccAdvBypass(int snarfblat, location loc)
  489. {
  490.     string page = "adventure.php?snarfblat=" + snarfblat + "&confirm=on";
  491.     return ccAdvBypass(page, loc);
  492. }
  493.  
  494. boolean ccAdvBypass(int snarfblat)
  495. {
  496.     return ccAdvBypass(snarfblat, $location[Noob Cave]);
  497. }
  498. boolean ccAdvBypass(string url)
  499. {
  500.     return ccAdvBypass(url, $location[Noob Cave]);
  501. }
  502. #This is an override so we can add locations while they are not part of a daily mafia build.
  503. #This can now be merged into ccAdvBypass
  504. boolean tryAdventure(string loc, int snarfblat)
  505. {
  506.     if(contains_text(visit_url("adventure.php?snarfblat=" + snarfblat), "Combat"))
  507.     {
  508.         print("Overriding unknown location: " + loc + " + at: " + snarfblat, "red");
  509.         return ccAdv(1, $location[Noob Cave]);
  510.     }
  511.     return false;
  512. }
  513.  
  514. boolean handleFamiliar(familiar fam)
  515. {
  516.     if(get_property("cc_100familiar").to_boolean())
  517.     {
  518.         return true;
  519.     }
  520.  
  521.     familiar toEquip = $familiar[none];
  522.     if(have_familiar(fam))
  523.     {
  524.         toEquip = fam;
  525.     }
  526.     else
  527.     {
  528.         boolean[familiar] poss = $familiars[Mosquito, Leprechaun, Baby Gravy Fairy, Hobo Monkey, Crimbo Shrub, Galloping Grill, Fist Turkey, Piano Cat, Angry Jung Man, Grimstone Golem, Adventurous Spelunker];
  529.  
  530.         foreach thing in poss
  531.         {
  532.             if((have_familiar(thing)) && (my_bjorned_familiar() != thing))
  533.             {
  534.                 toEquip = thing;
  535.             }
  536.         }
  537.     }
  538.  
  539.     if(dreamJarDrops() < 1 && have_familiar($familiar[Unconscious Collective])){
  540.         toEquip=$familiar[Unconscious Collective];
  541.     }else if(to_int(get_property('_turkeyBooze')) < 5 && my_level() > 5 && have_familiar($familiar[Fist Turkey]) && (my_bjorned_familiar() != $familiar[Fist Turkey])){
  542.         toEquip=$familiar[Fist Turkey];
  543.     }
  544.  
  545.     if((toEquip != $familiar[none]) && (toEquip != my_familiar()) && (my_bjorned_familiar() != toEquip))
  546.     {
  547.         use_familiar(toEquip);
  548.     }
  549.  
  550.     if(hr_handleFamiliar(fam))
  551.     {
  552.         return true;
  553.     }
  554.     return false;
  555. }
  556.  
  557.  
  558. void maximize_hedge()
  559. {
  560.     string data = visit_url("campground.php?action=telescopelow");
  561.  
  562.     element first = ns_hedge1(data);
  563.     element second = ns_hedge2(data);
  564.     element third = ns_hedge3(data);
  565.     if((first == $element[none]) || (second == $element[none]) || (third == $element[none]))
  566.     {
  567.         maximize("all res", 2500, 0, false);
  568.     }
  569.     else
  570.     {
  571.         maximize(to_string(first) + " res, " + to_string(second) + " res, " + to_string(third) + " res", 2500, 0, false);
  572.     }
  573. }
  574.  
  575. int pullsNeeded(string data)
  576. {
  577.     if(get_property("kingLiberated").to_boolean())
  578.     {
  579.         return 0;
  580.     }
  581.     if(my_class() == $class[Ed])
  582.     {
  583.         return 0;
  584.     }
  585.  
  586.     int count = 0;
  587.     int adv = 0;
  588.  
  589.     int progress = 0;
  590.     if(get_property("cc_sorceress") == "hedge")
  591.     {
  592.         progress = 1;
  593.     }
  594.     if(get_property("cc_sorceress") == "door")
  595.     {
  596.         progress = 2;
  597.     }
  598.     if(get_property("cc_sorceress") == "tower")
  599.     {
  600.         progress = 3;
  601.     }
  602.     if(get_property("cc_sorceress") == "top")
  603.     {
  604.         progress = 4;
  605.     }
  606.     data = visit_url("campground.php?action=telescopelow");
  607.  
  608.     if(progress < 1)
  609.     {
  610.         int crowd1score = 0;
  611.         int crowd2score = 0;
  612.         int crowd3score = 0;
  613.  
  614. /***
  615.             Skill:              Benefit     (350/85/550)?
  616.             416% init           9       1 ahead
  617.             402% init           9       1 ahead
  618.             390% init           9       1 ahead
  619.             348% init           8       2 ahead
  620.             346% init           8       2 ahead
  621.             208% init           4       6 ahead
  622.  
  623.             Sleaze + 88         9
  624.             Spooky + 86         9       1 ahead
  625.             Spooky + 86         8       2 ahead
  626.             Sleaze + 83         8       2 ahead
  627.             Stench + 80         9       1 ahead
  628.             Cold + 33           3       7 ahead
  629.             560 Moxie           9
  630.             544 Moxie           8       2 ahead
  631.             564 Myst            8       2 ahead
  632.             537 Myst            8       2 ahead
  633.             488 Myst            7       3 ahead
  634.             479 Moxie           7       3 ahead
  635.  
  636. Note: Maximizer gives concert White-boy angst, instead of concert 3 (consequently, it doesn\'t work).
  637.  
  638. ***/
  639.  
  640.         switch(ns_crowd1(data))
  641.         {
  642.         case 1:                 crowd1score = initiative_modifier()/40;                         break;
  643.         }
  644.  
  645.         switch(ns_crowd2(data))
  646.         {
  647.         case $stat[Moxie]:      crowd2score = (my_buffedstat($stat[Moxie]) - 150) / 40;         break;
  648.         case $stat[Muscle]:     crowd2score = (my_buffedstat($stat[Muscle]) - 150) / 40;        break;
  649.         case $stat[Mysticality]:crowd2score = (my_buffedstat($stat[Mysticality]) - 150) / 40;   break;
  650.         }
  651.  
  652.         switch(ns_crowd3(data))
  653.         {
  654.         case $element[cold]:    crowd3score = numeric_modifier("cold damage") / 9;              break;
  655.         case $element[hot]:     crowd3score = numeric_modifier("hot damage") / 9;               break;
  656.         case $element[sleaze]:  crowd3score = numeric_modifier("sleaze damage") / 9;            break;
  657.         case $element[spooky]:  crowd3score = numeric_modifier("spooky damage") / 9;            break;
  658.         case $element[stench]:  crowd3score = numeric_modifier("stench damage") / 9;            break;
  659.         }
  660.  
  661.         if(crowd1score < 0)
  662.         {
  663.             crowd1score = 0;
  664.         }
  665.         if(crowd1score > 9)
  666.         {
  667.             crowd1score = 9;
  668.         }
  669.         if(crowd2score < 0)
  670.         {
  671.             crowd2score = 0;
  672.         }
  673.         if(crowd2score > 9)
  674.         {
  675.             crowd2score = 9;
  676.         }
  677.         if(crowd3score < 0)
  678.         {
  679.             crowd3score = 0;
  680.         }
  681.         if(crowd3score > 9)
  682.         {
  683.             crowd3score = 9;
  684.         }
  685.         adv = adv + (10 - crowd1score) + (10 - crowd2score) + (10 - crowd3score);
  686.     }
  687.  
  688.     if(progress < 2)
  689.     {
  690.         ns_hedge1(data);
  691.         ns_hedge2(data);
  692.         ns_hedge3(data);
  693.  
  694.         print("Hedge time of 4 adventures. (Up to 10 without Elemental Resistances)", "red");
  695.         adv = adv + 4;
  696.     }
  697.  
  698.     if(progress < 3)
  699.     {
  700.         if((item_amount($item[Richard\'s Star Key]) == 0) && (item_amount($item[Star Chart]) == 0))
  701.         {
  702.             print("Need star chart", "red");
  703.             if((my_path() == "Heavy Rains") && (my_rain() >= 50))
  704.             {
  705.                 print("You should rain man a star chart", "blue");
  706.             }
  707.             else
  708.             {
  709.                 count = count + 1;
  710.             }
  711.         }
  712.  
  713.         if(item_amount($item[Richard\'s Star Key]) == 0)
  714.         {
  715.             int stars = item_amount($item[star]);
  716.             int lines = item_amount($item[line]);
  717.  
  718.             if(stars < 8)
  719.             {
  720.                 print("Need " + (8-stars) + " stars.", "red");
  721.                 count = count + (8-stars);
  722.             }
  723.             if(lines < 7)
  724.             {
  725.                 print("Need " + (7-lines) + " lines.", "red");
  726.                 count = count + (7-lines);
  727.             }
  728.         }
  729.  
  730.         if((item_amount($item[Digital Key]) == 0) && (item_amount($item[White Pixel]) < 30))
  731.         {
  732.             print("Need " + (30-item_amount($item[white pixel])) + " white pixels.", "red");
  733.             count = count + (30 - item_amount($item[white pixel]));
  734.         }
  735.  
  736.         if(item_amount($item[skeleton key]) == 0)
  737.         {
  738.             if((item_amount($item[skeleton bone]) > 0) && (item_amount($item[loose teeth]) > 0))
  739.             {
  740.                 cli_execute("make skeleton key");
  741.             }
  742.         }
  743.         if(item_amount($item[skeleton key]) == 0)
  744.         {
  745.             print("Need a skeleton key or the ingredients (skeleton bone, loose teeth) for it.");
  746.         }
  747.     }
  748.  
  749.  
  750.  
  751.     if(progress < 4)
  752.     {
  753.         adv = adv + 6;
  754.         if(get_property("cc_wandOfNagamar").to_boolean() && (item_amount($item[wand of nagamar]) == 0) && (item_amount($item[disassembled clover]) == 0))
  755.         {
  756.             print("Need a wand of nagamar (can be clovered).", "red");
  757.             count = count + 1;
  758.         }
  759.     }
  760.  
  761.     print("Estimated adventure need is: " + adv + ".", "orange");
  762.     print("You need " + count + " pulls.", "orange");
  763.     print("You have " + pulls_remaining() + " pulls.", "orange");
  764.     return count;
  765. }
  766.  
  767. void warOutfit()
  768. {
  769.     if(!get_property("cc_hippyInstead").to_boolean())
  770.     {
  771.         outfit("frat warrior fatigues");
  772.     }
  773.     else
  774.     {
  775.         outfit("war hippy fatigues");
  776.     }
  777. }
  778.  
  779. void warAdventure()
  780. {
  781.     if(!get_property("cc_hippyInstead").to_boolean())
  782.     {
  783.         ccAdv(1, $location[The Battlefield (Frat Uniform)]);
  784.     }
  785.     else
  786.     {
  787.         ccAdv(1, $location[The Battlefield (Hippy Uniform)]);
  788.     }
  789. }
  790.  
  791. //Return false if you should continue, true if it did something
  792. boolean doThemtharHills(boolean trickMode)
  793. {
  794.     if((get_property("currentNunneryMeat").to_int() >= 100000) || (get_property("sidequestNunsCompleted") != "none"))
  795.     {
  796.         handleBjornify($familiar[el vibrato megadrone]);
  797.         set_property("cc_nunsTrickReady", "done");
  798.         set_property("cc_nuns", "done");
  799.         set_property("cc_nunsTrick", "finished");
  800.         return false;
  801.     }
  802.  
  803.     if(get_property("cc_hippyInstead").to_boolean() || (get_property("hippiesDefeated").to_int() >= 192))
  804.     {
  805.         print("Themthar Nuns!", "blue");
  806.         trickMode = false;
  807.     }
  808.     else
  809.     {
  810.         print("Themthar Nuns! Trick Mode Bitches!", "blue");
  811.     }
  812.  
  813.     int copyAvailable = 0;
  814.     boolean copyPossible = false;
  815.     boolean fightCopy = false;
  816.     if(trickMode && (get_property("cc_nunsTrickReady") == "yes") && (get_property("hippiesDefeated").to_int() < 192))
  817.     {
  818.         if((my_rain() >= 60) && (have_skill($skill[Rain Man])))
  819.         {
  820.             copyAvailable = 1;
  821.         }
  822.         if(have_skill($skill[Rain Man]))
  823.         {
  824.             copyPossible = true;
  825.         }
  826.  
  827. #       Sample for allowed Rain-Doh usage.
  828. #       if((item_amount($item[Rain-doh Black Box]) > 0) && (get_property("_raindohCopiesMade").to_int() < 5))
  829. #       {
  830. #           copyAvailable = 2;
  831. #           copyPossible = true;
  832. #       }
  833.  
  834.         if((item_amount($item[shaking 4-d camera]) > 0) && (get_property("_cameraUsed").to_boolean() != true))
  835.         {
  836.             copyAvailable = 3;
  837.             copyPossible = true;
  838.         }
  839.  
  840.  
  841.         if(copyAvailable == 0)
  842.         {
  843.             return false;
  844. #           if(!copyPossible)
  845. #           {
  846. #               set_property("cc_nunsTrickReady", "done");
  847. #               set_property("cc_nunsTrick", "finished");
  848. #           }
  849.         }
  850.         fightCopy = true;
  851.     }
  852.  
  853.     if((get_property("sidequestArenaCompleted") == "fratboy") && (get_property("concertVisited") == "false") && (have_effect($effect[Winklered]) == 0))
  854.     {
  855.         outfit("frat warrior fatigues");
  856.         cli_execute("concert 2");
  857. #       outfit("war hippy fatigues");
  858.     }
  859.  
  860.     handleBjornify($familiar[Hobo Monkey]);
  861.     if((equipped_item($slot[off-hand]) != $item[Half a Purse]) && (item_amount($item[Half a Purse]) == 0) && (item_amount($item[Lump of Brituminous Coal]) > 0))
  862.     {
  863.         buyUpTo(1, $item[Loose Purse Strings]);
  864.         craft("smith", 1, $item[Lump of Brituminous Coal], $item[Loose purse strings]);
  865.     }
  866.  
  867.     if(possessEquipment($item[Half a Purse]))
  868.     {
  869.         equip($item[Half a Purse]);
  870.     }
  871.     if(possessEquipment($item[Miracle Whip]))
  872.     {
  873.         equip($item[Miracle Whip]);
  874.     }
  875.     if((my_path() == "Heavy Rains") && (item_amount($item[Thor\'s Pliers]) > 0))
  876.     {
  877.         equip($item[Thor\'s Pliers]);
  878.     }
  879.  
  880.     shrugAT();
  881.  
  882.  
  883.  
  884.     if(my_class() == $class[Ed])
  885.     {
  886.         visit_url("charsheet.php");
  887.         adjustEdHat("meat");
  888.         handleServant($servant[maid]);
  889.     }
  890.     buffMaintain($effect[Purr of the Feline], 10, 1, 1);
  891.     float meatDropHave = meat_drop_modifier();
  892.  
  893. #   if((my_class() == $class[Ed]) && (meatDropHave > 350.0))
  894. #   {
  895. #       buffMaintain($effect[Sinuses For Miles], 0, 1, 1);
  896. #   }
  897.     #if((item_amount($item[Resolution: Be Wealthier]) > 0) && (have_effect($effect[Greedy Resolve]) == 0))
  898.     #{
  899.     #   meatDropHave = meatDropHave + 30.0;
  900.     #}
  901.     #if((item_amount($item[Resolution: Be Luckier]) > 0) && (have_effect($effect[Fortunate Resolve]) == 0))
  902.     #{
  903.     #   meatDropHave = meatDropHave + 5.0;
  904.     #}
  905.     buffMaintain($effect[Greedy Resolve], 0, 1, 1);
  906.     buffMaintain($effect[Disco Leer], 10, 1, 1);
  907.     buffMaintain($effect[Polka of Plenty], 8, 1, 1);
  908.     #Handle for familiar weight change.
  909.     buffMaintain($effect[Kindly Resolve], 0, 1, 1);
  910.     buffMaintain($effect[Heightened Senses], 0, 1, 1);
  911.     buffMaintain($effect[Big Meat Big Prizes], 0, 1, 1);
  912.     buffMaintain($effect[Human-Machine Hybrid], 0, 1, 1);
  913.     buffMaintain($effect[Human-Constellation Hybrid], 0, 1, 1);
  914.     buffMaintain($effect[Human-Humanoid Hybrid], 0, 1, 1);
  915.     buffMaintain($effect[Human-Fish Hybrid], 0, 1, 1);
  916.     buffMaintain($effect[Cranberry Cordiality], 0, 1, 1);
  917.  
  918.     if(my_path() == "Heavy Rains")
  919.     {
  920.         buffMaintain($effect[Sinuses For Miles], 0, 1, 1);
  921.     }
  922.     else if((get_property("cc_nunsTrickCount").to_int() > 2) || (meat_drop_modifier() > 600.0))
  923.     {
  924.         buffMaintain($effect[Sinuses For Miles], 0, 1, 1);
  925.     }
  926.     // Target 1000 + 400% = 5000 meat per brigand. Of course we want more, but don\'t bother unless we can get this.
  927.     float meat_need = 400.00;
  928. #   if(my_path() == "Standard")
  929. #   {
  930. #       meat_need = meat_need - 100.00;
  931. #   }
  932. #   if(get_property("cc_dickstab").to_boolean())
  933. #   {
  934. #       meat_need = meat_need + 200.00;
  935. #   }
  936.     if(item_amount($item[Mick\'s IcyVapoHotness Inhaler]) > 0)
  937.     {
  938.         meat_need = meat_need - 200;
  939.     }
  940.     if(trickMode)
  941.     {
  942.         // Trick Mode should probably target more than 7000 meat per brigand.
  943.         meat_need = meat_need + 200.00;
  944.     }
  945.  
  946.     meatDropHave = meat_drop_modifier();
  947.  
  948.     if((my_class() == $class[Ed]) && have_skill($skill[Curse of Fortune]) && (item_amount($item[Ka Coin]) > 0))
  949.     {
  950.         meatDropHave = meatDropHave + 200;
  951.     }
  952.     if(meatDropHave < meat_need)
  953.     {
  954.         print("Meat drop (" + meatDropHave+ ") is pretty low, (we want: " + meat_need + ") probably not worth it to try this.", "red");
  955.  
  956.         float minget = 800.00 * (meatDropHave / 100.0);
  957.         int meatneed = 100000 - get_property("currentNunneryMeat").to_int();
  958.         print("The min we expect is: " + minget + " and we need: " + meatneed, "blue");
  959.         if(trickMode)
  960.         {
  961.             if(!user_confirm("About to cancel nuns trick (click yes to continue, no to abort), still need testing on the parameters here."))
  962.             {
  963.                 abort("User aborted nuns trick. We do not turn off the nuns flags (cc_nunsTrick->finished to abort). Beep.");
  964.             }
  965.         }
  966.  
  967.         if(minget < meatneed)
  968.         {
  969.             int curMeat = get_property("currentNunneryMeat").to_int();
  970.             int advs = get_property("cc_nunsTrickCount").to_int();
  971.             int needMeat = 100000 - curMeat;
  972.  
  973.             boolean failNuns = true;
  974.             if(advs < 22)
  975.             {
  976.                 int advLeft = 22 - advs;
  977.                 float needPerAdv = needMeat / advLeft;
  978.                 if(minget > needPerAdv)
  979.                 {
  980.                     print("We don't have the desired +meat but should be able to complete the nuns to our advantage", "green");
  981.                     failNuns = false;
  982.                 }
  983.             }
  984.  
  985.             if(failNuns)
  986.             {
  987.                 set_property("cc_nuns", "done");
  988.                 set_property("cc_nunsTrick", "no");
  989.                 set_property("cc_nunsTrickReady", "done");
  990.                 return true;
  991.             }
  992.         }
  993.         else
  994.         {
  995.             print("The min should be enough! Doing it!!", "purple");
  996.         }
  997.     }
  998.  
  999.  
  1000.     buffMaintain($effect[Disco Leer], 10, 1, 1);
  1001.     buffMaintain($effect[Polka of Plenty], 8, 1, 1);
  1002.     buffMaintain($effect[Sinuses For Miles], 0, 1, 1);
  1003.     buffMaintain($effect[Greedy Resolve], 0, 1, 1);
  1004.     buffMaintain($effect[Kindly Resolve], 0, 1, 1);
  1005.     buffMaintain($effect[Heightened Senses], 0, 1, 1);
  1006.     buffMaintain($effect[Big Meat Big Prizes], 0, 1, 1);
  1007.     buffMaintain($effect[Fortunate Resolve], 0, 1, 1);
  1008.     buffMaintain($effect[Human-Machine Hybrid], 0, 1, 1);
  1009.     buffMaintain($effect[Human-Constellation Hybrid], 0, 1, 1);
  1010.     buffMaintain($effect[Human-Humanoid Hybrid], 0, 1, 1);
  1011.     buffMaintain($effect[Human-Fish Hybrid], 0, 1, 1);
  1012.     buffMaintain($effect[Cranberry Cordiality], 0, 1, 1);
  1013.  
  1014.     if(fightCopy)
  1015.     {
  1016.         print("Themthar Nuns Trick attempt to finish: " + copyAvailable, "blue");
  1017.         print("Meat drop to start: " + meat_drop_modifier(), "blue");
  1018.         useCocoon();
  1019.         if(equipped_item($slot[hat]) == $item[Reinforced Beaded Headband])
  1020.         {
  1021.             abort("Trying to nuns trick and might be wearing the Hippy Outfit");
  1022.         }
  1023.  
  1024.         switch(copyAvailable)
  1025.         {
  1026.         case 1:
  1027.             rainManSummon("dirty thieving brigand", false, false);
  1028.             set_property("cc_nunsTrickGland", "done");
  1029.             break;
  1030.         case 2:     //Rain-doh box
  1031.             break;
  1032.         case 3:
  1033.             handle4dCamera();
  1034.             break;
  1035.         default:
  1036.             abort("Trying nuns trick but unhandled copy case");
  1037.             break;
  1038.         }
  1039.     }
  1040.     else
  1041.     {
  1042.         if(trickMode)
  1043.         {
  1044.             if((get_property("_cameraUsed").to_boolean() != true) && (item_amount($item[shaking 4-d camera]) == 0))
  1045.             {
  1046.                 pullXWhenHaveY($item[4-d camera], 1, 0);
  1047.             }
  1048.             outfit("war hippy fatigues");
  1049.             if(get_property("cc_nunsTrickCount").to_int() == 0)
  1050.             {
  1051.                 visit_url("bigisland.php?place=nunnery");
  1052.             }
  1053.         }
  1054.         else
  1055.         {
  1056.             warOutfit();
  1057.         }
  1058.  
  1059.         int lastMeat = get_property("currentNunneryMeat").to_int();
  1060.         int myLastMeat = my_meat();
  1061.         print("Meat drop to start: " + meat_drop_modifier(), "blue");
  1062.         ccAdv(1, $location[The Themthar Hills]);
  1063.         if(last_monster() != $monster[dirty thieving brigand])
  1064.         {
  1065.             return true;
  1066.         }
  1067.         if(get_property("lastEncounter") == "Don't Be Alarmed, Now")
  1068.         {
  1069.             return true;
  1070.         }
  1071.         int curMeat = get_property("currentNunneryMeat").to_int();
  1072.         if(lastMeat == curMeat)
  1073.         {
  1074.             int diffMeat = my_meat() - myLastMeat;
  1075.             set_property("currentNunneryMeat", diffMeat);
  1076.         }
  1077.  
  1078.         int advs = get_property("cc_nunsTrickCount").to_int() + 1;
  1079.         set_property("cc_nunsTrickCount", advs);
  1080.  
  1081.         int diffMeat = curMeat - lastMeat;
  1082.         int needMeat = 100000 - curMeat;
  1083.         int average = curMeat / advs;
  1084.         print("Cur Meat: " + curMeat + " Average: " + average, "blue");
  1085.  
  1086.         diffMeat = diffMeat * 1.2;
  1087.         average = average * 1.2;
  1088.         if(trickMode && ((needMeat < diffMeat) || (needMeat < average)))
  1089.         {
  1090.             set_property("cc_nunsTrickReady", "yes");
  1091.             print("Attempting nuns trick, beep boop!! No more auto-aborting!");
  1092.         }
  1093.         if((item_amount($item[stone wool]) > 0) && (get_property("cc_nunsTrickCount").to_int() > 2) && !get_property("_templeHiddenPower").to_boolean())
  1094.         {
  1095.             use(1, $item[stone wool]);
  1096.             put_closet(item_amount($item[stone wool]), $item[stone wool]);
  1097.             ccAdv(1, $location[The Hidden Temple]);
  1098.         }
  1099.     }
  1100.     return true;
  1101. }
  1102.  
  1103. boolean dealWithMilkOfMagnesium(boolean useAdv)
  1104. {
  1105.     if(item_amount($item[milk of magnesium]) > 0)
  1106.     {
  1107.         return true;
  1108.     }
  1109.  
  1110.     ovenHandle();
  1111.     if((item_amount($item[glass of goat\'s milk]) > 0) && have_skill($skill[Advanced Saucecrafting]))
  1112.     {
  1113.         if(useAdv)
  1114.         {
  1115.             cli_execute("make milk of magnesium");
  1116.         }
  1117.         else if(have_skill($skill[Rapid Prototyping]) && (get_property("_rapidPrototypingUsed").to_int() < 5) && have_skill($skill[Rapid Prototyping]))
  1118.         {
  1119.             cli_execute("make milk of magnesium");
  1120.         }
  1121.     }
  1122.     pullXWhenHaveY($item[Milk of Magnesium], 1, 0);
  1123.     return true;
  1124. }
  1125.  
  1126.  
  1127. int handlePulls(int day)
  1128. {
  1129.     if(item_amount($item[Carton of Astral Energy Drinks]) > 0)
  1130.     {
  1131.         use(1, $item[carton of astral energy drinks]);
  1132.     }
  1133.     if(item_amount($item[Astral Six-Pack]) > 0)
  1134.     {
  1135.         use(1, $item[Astral Six-Pack]);
  1136.     }
  1137.     if(item_amount($item[Astral Hot Dog Dinner]) > 0)
  1138.     {
  1139.         use(1, $item[Astral Hot Dog Dinner]);
  1140.     }
  1141.  
  1142.     initializeSettings();
  1143.  
  1144.     if(in_hardcore())
  1145.     {
  1146.         return 0;
  1147.     }
  1148.  
  1149.     if(day == 1)
  1150.     {
  1151.         set_property("lightsOutAutomation", "1");
  1152.         # Do starting pulls:
  1153.         if((pulls_remaining() != 20) && !in_hardcore())
  1154.         {
  1155.             print("I assume you've handled your pulls yourself... who knows.");
  1156.             return 0;
  1157.         }
  1158.  
  1159.         if((storage_amount($item[can of rain-doh]) > 0) && (pullXWhenHaveY($item[can of Rain-doh], 1, 0)))
  1160.         {
  1161.             if(item_amount($item[Can of Rain-doh]) > 0)
  1162.             {
  1163.                 use(1, $item[can of Rain-doh]);
  1164.                 put_closet(1, $item[empty rain-doh can]);
  1165.             }
  1166.         }
  1167.         if(storage_amount($item[buddy bjorn]) > 0)
  1168.         {
  1169.             pullXWhenHaveY($item[buddy bjorn], 1, 0);
  1170.         }
  1171.         if(storage_amount($item[Xiblaxian Stealth Cowl]) > 0)
  1172.         {
  1173.             pullXWhenHaveY($item[xiblaxian stealth cowl], 1, 0);
  1174.         }
  1175.         pullXWhenHaveY($item[pantsgiving], 1, 0);
  1176.         pullXWhenHaveY($item[spooky-gro fertilizer], 1, 0);
  1177.  
  1178.         if(!have_familiar($familiar[Fist Turkey]))
  1179.         {
  1180.             pullXWhenHaveY($item[crystal skeleton vodka], 2, 0);
  1181.         }
  1182.  
  1183. #       pullXWhenHaveY(whatHiMein(), 2, 0);
  1184. #       pullXWhenHaveY($item[digital key lime pie], 1, 0);
  1185.  
  1186.         if((my_path() == "Picky") || get_property("cc_100familiar").to_boolean())
  1187.         {
  1188.             pullXWhenHaveY($item[Boris\'s Key Lime Pie], 1, 0);
  1189.             pullXWhenHaveY($item[Sneaky Pete\'s Key Lime Pie], 1, 0);
  1190.             pullXWhenHaveY($item[Jarlsberg\'s Key Lime Pie], 1, 0);
  1191.         }
  1192.         else if(my_path() == "Standard")
  1193.         {
  1194.             pullXWhenHaveY(whatHiMein(), 3, 0);
  1195.         }
  1196.  
  1197.         pullXWhenHaveY($item[over-the-shoulder folder holder], 1, 0);
  1198.         if((my_primestat() == $stat[Muscle]) && (my_path() != "Heavy Rains"))
  1199.         {
  1200.             pullXWhenHaveY($item[Fake Washboard], 1, 0);
  1201.             if(item_amount($item[Fake Washboard]) == 0)
  1202.             {
  1203.                 pullXWhenHaveY($item[numberwang], 1, 0);
  1204.             }
  1205.         }
  1206.         else
  1207.         {
  1208.             pullXWhenHaveY($item[numberwang], 1, 0);
  1209.         }
  1210. #       pullXWhenHaveY($item[milk of magnesium], 1, 0);
  1211.         pullXWhenHaveY($item[stuffed shoulder parrot], 1, 0);
  1212.         pullXWhenHaveY($item[eyepatch], 1, 0);
  1213.         pullXWhenHaveY($item[swashbuckling pants], 1, 0);
  1214.         #pullXWhenHaveY($item[Boris\'s Key Lime Pie], 1, 0);
  1215. #       pullXWhenHaveY($item[thor\'s pliers], 1, 0);
  1216.         #pullXWhenHaveY($item[the big book of pirate insults], 1, 0);
  1217. #       pullXWhenHaveY($item[mojo filter], 1, 0);
  1218.         #pullXWhenHaveY($item[camp scout backpack], 1, 0);
  1219.         #pullXWhenHaveY($item[caveman dan\'s favorite rock], 1, 0);
  1220.  
  1221.         if(my_path() == "Picky")
  1222.         {
  1223.             pullXWhenHaveY($item[gumshoes], 1, 0);
  1224.         }
  1225.         pullXWhenHaveY($item[hand in glove], 1, 0);
  1226.  
  1227.         if(my_path() != "Heavy Rains")
  1228.         {
  1229.             pullXWhenHaveY($item[snow suit], 1, 0);
  1230.         }
  1231.  
  1232.         if(get_property("cc_dickstab").to_boolean())
  1233.         {
  1234.             pullXWhenHaveY($item[Shore Inc. Ship Trip Scrip], 3, 0);
  1235.         }
  1236.  
  1237.         if((!have_familiar($familiar[Grim Brother])) && (my_class() != $class[Ed]))
  1238.         {
  1239.             pullXWhenHaveY($item[Unconscious Collective Dream Jar], 1, 0);
  1240.             chew(1, $item[Unconscious Collective Dream Jar]);
  1241.         }
  1242.     }
  1243.     return pulls_remaining();
  1244. }
  1245.  
  1246. boolean fortuneCookieEvent()
  1247. {
  1248.     if((my_path() == "Heavy Rains") && (get_property("cc_orchard") == "finished"))
  1249.     {
  1250.         cli_execute("counters");
  1251.         if(get_counters("Fortune Cookie", 0, 200) != "")
  1252.         {
  1253.             cli_execute("counters clear");
  1254.             print("We don't care about the semirares anymore, we are past the orchard. Cancelling.");
  1255.         }
  1256.         return false;
  1257.     }
  1258.     if((my_class() == $class[Ed]) && ((get_property("cc_orchard") == "finished") || (get_property("cc_semirare").to_int() >= 2)))
  1259.     {
  1260.         if(get_counters("Fortune Cookie", 0, 200) != "")
  1261.         {
  1262.             cli_execute("counters clear");
  1263.             print("We don't care about the semirares anymore, we are past the orchard. Cancelling.");
  1264.         }
  1265.         return false;
  1266.     }
  1267.  
  1268.     if(get_counters("Fortune Cookie", 0, 0) == "Fortune Cookie")
  1269.     {
  1270.         print("Semi rare time!", "blue");
  1271.         cli_execute("counters");
  1272.         cli_execute("counters clear");
  1273.         print("Removed all the counters, can we just remove the cookie?");
  1274.         if((get_property("cc_semirare") == "") && (get_property("cc_spookysapling") == "finished"))
  1275.         {
  1276.             ccAdv(1, $location[The Hidden Temple]);
  1277.             if(item_amount($item[stone wool]) > 0)
  1278.             {
  1279.                 set_property("cc_semirare", "1");
  1280.                 set_property("cc_semisub", "wool");
  1281.             }
  1282.         }
  1283.         else if((get_property("cc_semirare") == "1") && (get_property("cc_castleground") == "finished") && (get_property("cc_nuns") != "done"))
  1284.         {
  1285.             ccAdv(1, $location[The Castle in the Clouds in the Sky (Top Floor)]);
  1286.             if(item_amount($item[Mick\'s IcyVapoHotness Inhaler]) > 0)
  1287.             {
  1288.                 set_property("cc_castleground", "done");
  1289.                 set_property("cc_semisub", "inhaler");
  1290.                 set_property("cc_semirare", "2");
  1291.             }
  1292.         }
  1293.         else if(get_property("cc_semisub") != "limerick")
  1294.         {
  1295.             ccAdv(1, $location[The Limerick Dungeon]);
  1296.             set_property("cc_semisub", "limerick");
  1297.         }
  1298.         else if(get_property("cc_semisub") != "pantry")
  1299.         {
  1300.             ccAdv(1, $location[The Haunted Pantry]);
  1301.             set_property("cc_semisub", "pantry");
  1302.         }
  1303.         else
  1304.         {
  1305.             ccAdv(1, $location[The Sleazy Back Alley]);
  1306.             set_property("cc_semisub", "alley");
  1307.         }
  1308.         if(get_counters("Semirare window begin", 0, 200) == "Semirare window begin")
  1309.         {
  1310.             print("Semirare window not rebuilt due to 'fun' monster names. Attempting to workaround.", "red");
  1311.             cli_execute("counters add 160 Semirare window begin lparen.gif");
  1312.             cli_execute("counters add 200 Semirare window end rparen.gif");
  1313.         }
  1314.         return true;
  1315.     }
  1316.     return false;
  1317. }
  1318.  
  1319.  
  1320. void initializeDay(int day)
  1321. {
  1322.     if(get_property("kingLiberated").to_boolean())
  1323.     {
  1324.         return;
  1325.     }
  1326.  
  1327.     cli_execute("ccs null");
  1328.     if((item_amount($item[cursed microwave]) >= 1) && (get_property("_cursedMicrowaveUsed") == "false"))
  1329.     {
  1330.         use(1, $item[cursed microwave]);
  1331.     }
  1332.     if((item_amount($item[cursed pony keg]) >= 1) && (get_property("_cursedKegUsed") == "false"))
  1333.     {
  1334.         use(1, $item[cursed pony keg]);
  1335.     }
  1336.  
  1337.     if(item_amount($item[Mick\'s IcyVapoHotness Inhaler]) > 0)
  1338.     {
  1339.         set_property("cc_castleground", "done");
  1340.         set_property("cc_semisub", "inhaler");
  1341.     }
  1342.  
  1343.     if(item_amount($item[GameInformPowerDailyPro Magazine]) > 0)
  1344.     {
  1345.  
  1346.     }
  1347.  
  1348.     chateaumantegna_useDesk();
  1349.     ed_initializeDay(day);
  1350.  
  1351.     if(day == 1)
  1352.     {
  1353.         if(get_property("cc_day1_init") != "finished")
  1354.         {
  1355.             if(item_amount($item[transmission from planet Xi]) > 0)
  1356.             {
  1357.                 use(1, $item[transmission from planet xi]);
  1358.             }
  1359.             if(item_amount($item[Xiblaxian holo-wrist-puter simcode]) > 0)
  1360.             {
  1361.                 use(1, $item[Xiblaxian holo-wrist-puter simcode]);
  1362.             }
  1363.  
  1364.             if(have_skill($skill[Spirit of Peppermint]))
  1365.             {
  1366.                 use_skill(1, $skill[Spirit of Peppermint]);
  1367.             }
  1368.  
  1369.             if(have_skill($skill[Iron Palm Technique]) && (have_effect($effect[Iron Palms]) == 0) && (my_class() == $class[Seal Clubber]))
  1370.             {
  1371.                 use_skill(1, $skill[Iron Palm Technique]);
  1372.             }
  1373.  
  1374.             visit_url("tutorial.php?action=toot");
  1375.             use(item_amount($item[Letter From King Ralph XI]), $item[Letter From King Ralph XI]);
  1376.             use(item_amount($item[Pork Elf Goodies Sack]), $item[Pork Elf Goodies Sack]);
  1377.             tootGetMeat();
  1378.  
  1379.             hr_initializeDay(day);
  1380.  
  1381.             buyUpTo(1, $item[toy accordion]);
  1382.  
  1383.             while((item_amount($item[turtle totem]) == 0) || (item_amount($item[saucepan]) == 0))
  1384.             {
  1385.                 buyUpTo(1, $item[chewing gum on a string]);
  1386.                 use(1, $item[chewing gum on a string]);
  1387.             }
  1388.  
  1389.             makeStartingSmiths();
  1390.  
  1391.             handleFamiliar($familiar[Angry Jung Man]);
  1392.             equipBaseline();
  1393.             if(equipped_item($slot[familiar]) != $item[none])
  1394.             {
  1395.                 lock_familiar_equipment(true);
  1396.             }
  1397.             handleBjornify($familiar[none]);
  1398.             handleBjornify($familiar[El Vibrato Megadrone]);
  1399.  
  1400.             visit_url("guild.php?place=challenge");
  1401.  
  1402.             if(get_property("cc_breakstone").to_boolean())
  1403.             {
  1404.                 visit_url("campground.php?action=stone&smashstone=Yep.&pwd&confirm=on", true);
  1405.                 set_property("cc_breakstone", false);
  1406.             }
  1407.             set_property("cc_day1_init", "finished");
  1408.         }
  1409.  
  1410.         if(get_property("cc_day1_dna") != "finished")
  1411.         {
  1412.             if(elementalPlanes_access($element[sleaze]) && (item_amount($item[DNA Extraction Syringe]) > 0))
  1413.             {
  1414.                 ccAdv(1, $location[Sloppy Seconds Diner]);
  1415.                 ccAdv(1, $location[Sloppy Seconds Diner]);
  1416.                 cli_execute("camp dnainject");
  1417.             }
  1418.             set_property("cc_day1_dna", "finished");
  1419.         }
  1420.  
  1421.         if((my_path() == "Heavy Rains") && (get_property("cc_day1_desk") != "finished") && (my_rain() > 50))
  1422.         {
  1423.             if(my_hp() < my_maxhp())
  1424.             {
  1425.                 cli_execute("hottub");
  1426.             }
  1427.             rainManSummon("writing desk", true, true);
  1428.             if((my_hp() * 2) < my_maxhp())
  1429.             {
  1430.                 cli_execute("hottub");
  1431.             }
  1432.             hr_dnaPotions();
  1433.             set_property("cc_day1_desk", "finished");
  1434.         }
  1435.         if(get_property("lastCouncilVisit").to_int() < my_level())
  1436.         {
  1437.             cli_execute("counters");
  1438.             council();
  1439.         }
  1440.     }
  1441.     else if(day == 2)
  1442.     {
  1443.         equipBaseline();
  1444.         fortuneCookieEvent();
  1445.  
  1446.         if(get_property("cc_day2_init") == "")
  1447.         {
  1448.             if(item_amount($item[tonic djinn]) > 0)
  1449.             {
  1450.                 set_property("choiceAdventure778", "2");
  1451.                 use(1, $item[tonic djinn]);
  1452.             }
  1453.             if(item_amount($item[gym membership card]) > 0)
  1454.             {
  1455.                 use(1, $item[gym membership card]);
  1456.             }
  1457.  
  1458.             hr_initializeDay(day);
  1459.  
  1460.             pulverizeThing($item[hairpiece on fire]);
  1461.             pulverizeThing($item[vicar\'s tutu]);
  1462.             hermit(10, $item[ten-leaf clover]);
  1463.             if(item_amount($item[antique accordion]) == 0)
  1464.             {
  1465.                 buyUpTo(1, $item[antique accordion]);
  1466.             }
  1467.             if(have_skill($skill[summon smithsness]))
  1468.             {
  1469.                 use_skill(3, $skill[summon smithsness]);
  1470.             }
  1471.  
  1472.             if(item_amount($item[handful of smithereens]) >= 2)
  1473.             {
  1474.                 buy(2, $item[Ben-Gal&trade; Balm]);
  1475.                 cli_execute("make 2 louder than bomb");
  1476.             }
  1477.  
  1478.             if(get_property("cc_dickstab").to_boolean())
  1479.             {
  1480.                 pullXWhenHaveY($item[frost flower], 1, 0);
  1481.             }
  1482.             pullXWhenHaveY($item[hand in glove], 1, 0);
  1483.             pullXWhenHaveY($item[wet stew], 1, 0);
  1484.             pullXWhenHaveY($item[blackberry galoshes], 1, 0);
  1485.             pullXWhenHaveY($item[mojo filter], 1, 0);
  1486.  
  1487.             if(!get_property("cc_useCubeling").to_boolean() && (towerKeyCount() == 0))
  1488.             {
  1489.                 pullXWhenHaveY($item[Boris\'s Key Lime Pie], 1, 0);
  1490.                 pullXWhenHaveY($item[Sneaky Pete\'s Key Lime Pie], 1, 0);
  1491.                 pullXWhenHaveY($item[Jarlsberg\'s Key Lime Pie], 1, 0);
  1492.             }
  1493.             else
  1494.             {
  1495.                 pullXWhenHaveY(whatHiMein(), 3, 0);
  1496.             }
  1497.  
  1498. #           if((item_amount($item[glass of goat\'s milk]) == 0) || (my_path() == "Picky"))
  1499. #           {
  1500. #               pullXWhenHaveY($item[milk of magnesium], 1, 0);
  1501. #           }
  1502.  
  1503.             set_property("cc_day2_init", "finished");
  1504.         }
  1505.         if(chateaumantegna_havePainting() && (my_class() != $class[Ed]))
  1506.         {
  1507.             handleFamiliar($familiar[Reanimated Reanimator]);
  1508.             if(chateaumantegna_usePainting())
  1509.             {
  1510.                 ccAdv(1, $location[Noob Cave]);
  1511.             }
  1512.             handleFamiliar($familiar[Angry Jung Man]);
  1513.         }
  1514.     }
  1515.     else if(day == 3)
  1516.     {
  1517.         if(get_property("cc_day3_init") == "")
  1518.         {
  1519.             hermit(10, $item[ten-leaf clover]);
  1520.  
  1521.             picky_pulls();
  1522.             standard_pulls();
  1523.  
  1524.             set_property("cc_day3_init", "finished");
  1525.         }
  1526.     }
  1527.     if(day >= 2)
  1528.     {
  1529.         if(get_property("cc_guildmeat") == "")
  1530.         {
  1531.             if(my_class() == $class[seal clubber])
  1532.             {
  1533.                 visit_url("guild.php?place=scg");
  1534.                 visit_url("guild.php?place=scg");
  1535.             }
  1536.             if(my_class() == $class[turtle tamer])
  1537.             {
  1538.                 visit_url("guild.php?place=scg");
  1539.                 visit_url("guild.php?place=scg");
  1540.             }
  1541.             set_property("cc_guildmeat", "got");
  1542.             ovenHandle();
  1543.         }
  1544.     }
  1545.     if(get_property("kingLiberated") == "false")
  1546.     {
  1547.         cli_execute("garden pick");
  1548.     }
  1549.     string campground = visit_url("campground.php");
  1550.     if(contains_text(campground, "beergarden7.gif"))
  1551.     {
  1552.         cli_execute("garden pick");
  1553.     }
  1554.     if(contains_text(campground, "wintergarden3.gif"))
  1555.     {
  1556.         cli_execute("garden pick");
  1557.     }
  1558. }
  1559.  
  1560.  
  1561.  
  1562. void doBedtime()
  1563. {
  1564.     print("Starting bedtime: Pulls Left: " + pulls_remaining(), "blue");
  1565.  
  1566.     if(get_property("lastEncounter") == "Like a Bat Into Hell")
  1567.     {
  1568.         abort("Our last encounter was UNDYING and we ended up trying to bedtime and failed.");
  1569.     }
  1570.  
  1571.     process_kmail("cc_deleteMail");
  1572.  
  1573.     if(my_adventures() > 4)
  1574.     {
  1575.         if(my_inebriety() <= inebriety_limit())
  1576.         {
  1577.             return;
  1578.         }
  1579.     }
  1580.     if(my_fullness() < fullness_limit())
  1581.     {
  1582.         return;
  1583.     }
  1584.     if(my_inebriety() < inebriety_limit())
  1585.     {
  1586.         return;
  1587.     }
  1588.     int spleenlimit = spleen_limit();
  1589.     if(get_property("cc_100familiar").to_boolean())
  1590.     {
  1591.         spleenlimit -= 3;
  1592.     }
  1593.     if(my_spleen_use() < spleenlimit)
  1594.     {
  1595.         return;
  1596.     }
  1597.  
  1598.     if(get_property("cc_priorCoinmasters").to_boolean())
  1599.     {
  1600.         set_property("cc_priorCoinmasters", false);
  1601.         set_property("autoSatisfyWithCoinmasters", false);
  1602.     }
  1603.  
  1604.     if(get_property("cc_priorCharpaneMode").to_int() == 1)
  1605.     {
  1606.         print("Resuming Compact Character Mode.");
  1607.         set_property("cc_priorCharpaneMode", 0);
  1608.         visit_url("account.php?am=1&pwd=&action=flag_compactchar&value=1&ajax=0", true);
  1609.     }
  1610.  
  1611.     if(get_property("cc_priorXiblaxianMode").to_int() == 1)
  1612.     {
  1613.         set_property("cc_priorXiblaxianMode", 0);
  1614.         setvar("chit.helpers.xiblaxian", true);
  1615.     }
  1616.  
  1617.     if(my_class() == $class[Ed])
  1618.     {
  1619.         if(get_property("hpAutoRecoveryItems") == "linen bandages")
  1620.         {
  1621.             set_property("hpAutoRecoveryItems", get_property("cc_hpAutoRecoveryItems"));
  1622.             set_property("hpAutoRecovery", get_property("cc_hpAutoRecovery"));
  1623.             set_property("hpAutoRecoveryTarget", get_property("cc_hpAutoRecoveryTarget"));
  1624.             set_property("cc_hpAutoRecoveryItems", "");
  1625.             set_property("cc_hpAutoRecovery", 0.0);
  1626.             set_property("cc_hpAutoRecoveryTarget", 0.0);
  1627.         }
  1628.     }
  1629.  
  1630.  
  1631.     if(my_class() == $class[seal clubber])
  1632.     {
  1633.         int oldSeals = get_property("_sealsSummoned").to_int();
  1634.         while((get_property("_sealsSummoned").to_int() < 5) && (!get_property("kingLiberated").to_boolean()) && (my_meat() > 4500))
  1635.         {
  1636.             if(my_daycount() == 1)
  1637.             {
  1638.                 cli_execute("make figurine of an ancient seal");
  1639.     #           buyUpTo(1, $item[figurine of an ancient seal]);
  1640.                 buyUpTo(3, $item[seal-blubber candle]);
  1641.                 handleSealAncient();
  1642.             }
  1643.             else
  1644.             {
  1645.                 buyUpTo(1, $item[figurine of an armored seal]);
  1646.                 buyUpTo(10, $item[seal-blubber candle]);
  1647.                 handleSealArmored();
  1648.             }
  1649.             int newSeals = get_property("_sealsSummoned").to_int();
  1650.             if(newSeals == oldSeals)
  1651.             {
  1652.                 abort("Unable to summon seals.");
  1653.             }
  1654.             oldSeals = newSeals;
  1655.         }
  1656.     }
  1657.  
  1658.     if((my_inebriety() <= inebriety_limit()) && (my_rain() >= 50) && (my_adventures() >= 1))
  1659.     {
  1660.         if(my_daycount() == 1)
  1661.         {
  1662.             if(item_amount($item[Rain-Doh Indigo Cup]) > 0)
  1663.             {
  1664.                 print("Copies left: " + (5 - get_property("_raindohCopiesMade").to_int()), "olive");
  1665.             }
  1666.             if(!in_hardcore())
  1667.             {
  1668.                 print("Pulls remaining: " + pulls_remaining(), "olive");
  1669.             }
  1670.             if(item_amount($item[beer helmet]) == 0)
  1671.             {
  1672.                 print("Please consider an orcish frat boy spy (You want Frat Warrior Fatigues).", "blue");
  1673.                 if((have_effect($effect[Everything Looks Yellow]) == 0) && (my_lightning() >= 5))
  1674.                 {
  1675.                     print("Make sure to Ball Lightning the spy!!", "red");
  1676.                 }
  1677.             }
  1678.             else
  1679.             {
  1680.                 print("If you have the Frat Warrior Fatigues, rain man an Astronomer? Skinflute?", "blue");
  1681.             }
  1682.         }
  1683.         abort("You have a rain man to cast, please do so before overdrinking and run me again.");
  1684.     }
  1685.  
  1686.     hermit(10, $item[ten-leaf clover]);
  1687.  
  1688.     if((friars_available()) && (!get_property("friarsBlessingReceived").to_boolean()))
  1689.     {
  1690.         cli_execute("friars familiar");
  1691.     }
  1692.     if((my_hp() < (0.9 * my_maxhp())) && (get_property("_hotTubSoaks").to_int() < 5))
  1693.     {
  1694.         cli_execute("hottub");
  1695.     }
  1696.  
  1697.     if(!get_property("_mayoTankSoaked").to_boolean())
  1698.     {
  1699.         visit_url("shop.php?action=bacta&whichshop=mayoclinic");
  1700.     }
  1701.  
  1702.     //  Also use "nunsVisits", as long as they were won by the Frat (sidequestNunsCompleted="fratboy").
  1703.     ed_doResting();
  1704.     skill libram = preferredLibram();
  1705.     if(libram != $skill[none])
  1706.     {
  1707.         while((get_property("timesRested").to_int() < total_free_rests()) && (mp_cost(libram) <= my_maxmp()))
  1708.         {
  1709.             doRest();
  1710.             while(my_mp() > mp_cost(libram))
  1711.             {
  1712.                 use_skill(1, libram);
  1713.             }
  1714.         }
  1715.     }
  1716.  
  1717.     if(is_unrestricted("Clan Pool Table"))
  1718.     {
  1719.         visit_url("clan_viplounge.php?preaction=poolgame&stance=1");
  1720.         visit_url("clan_viplounge.php?preaction=poolgame&stance=1");
  1721.         visit_url("clan_viplounge.php?preaction=poolgame&stance=3");
  1722.     }
  1723.     if(is_unrestricted("Colorful Plastic Ball"))
  1724.     {
  1725.         cli_execute("ballpit");
  1726.     }
  1727.     if(get_property("telescopeUpgrades").to_int() > 0)
  1728.     {
  1729.         if(get_property("telescopeLookedHigh") == "false")
  1730.         {
  1731.             cli_execute("telescope high");
  1732.         }
  1733.     }
  1734.  
  1735.     if(!possessEquipment($item[Vicar\'s Tutu]) && (my_daycount() == 1) && (item_amount($item[lump of Brituminous coal]) > 0))
  1736.     {
  1737.         if(item_amount($item[frilly skirt]) < 1)
  1738.         {
  1739.             buyUpTo(1, $item[frilly skirt]);
  1740.         }
  1741.         craft("smith", 1, $item[lump of Brituminous coal], $item[frilly skirt]);
  1742.     }
  1743.  
  1744.     if((my_daycount() == 1) && ((item_amount($item[thor\'s pliers]) == 1) || (equipped_item($slot[weapon]) == $item[Thor\'s Pliers]) || (equipped_item($slot[off-hand]) == $item[Thor\'s Pliers]) || (get_property("_rapidPrototypingUsed").to_int() < 5)) && have_skill($skill[Rapid Prototyping]))
  1745.     {
  1746.         item oreGoal = to_item(get_property("trapperOre"));
  1747.         int need = 1;
  1748.         if(oreGoal == $item[chrome ore])
  1749.         {
  1750.             need = 4;
  1751.         }
  1752.         if((item_amount($item[chrome ore]) >= need) && !possessEquipment($item[chrome sword]))
  1753.         {
  1754.             cli_execute("make chrome sword");
  1755.         }
  1756.     }
  1757.  
  1758.     equipRollover();
  1759.     hr_doBedtime();
  1760.  
  1761.     while((my_daycount() == 1) && (item_amount($item[resolution: be more adventurous]) > 0) && (get_property("_resolutionAdv").to_int() < 10))
  1762.     {
  1763.         use(1, $item[resolution: be more adventurous]);
  1764.     }
  1765.  
  1766.     if(my_daycount() <= 2)
  1767.     {
  1768.         // Check for rapid prototyping
  1769.         while((get_property("_rapidPrototypingUsed").to_int() < 5) && (item_amount($item[Scrumptious reagent]) > 0) && (item_amount($item[cranberries]) > 0) && (item_amount($item[cranberry cordial]) < 2) && have_skill($skill[Advanced Saucecrafting]) && have_skill($skill[Rapid Prototyping]))
  1770.         {
  1771.             cli_execute("make cranberry cordial");
  1772.         }
  1773.         put_closet(item_amount($item[cranberries]), $item[cranberries]);
  1774.         while((get_property("_rapidPrototypingUsed").to_int() < 5) && (item_amount($item[Scrumptious reagent]) > 0) && (item_amount($item[glass of goat\'s milk]) > 0) && (item_amount($item[milk of magnesium]) < 2) && have_skill($skill[Advanced Saucecrafting]) && have_skill($skill[Rapid Prototyping]))
  1775.         {
  1776.             cli_execute("make milk of magnesium");
  1777.         }
  1778.     }
  1779.  
  1780.     //We can also use int[item] get_campground()
  1781.     int lastDNA = get_property("_dnaPotionsMade").to_int();
  1782.     while((get_property("_dnaPotionsMade") != "3") && (get_property("dnaSyringe") != ""))
  1783.     {
  1784.         cli_execute("camp dnapotion");
  1785.         int thisDNA = get_property("_dnaPotionsMade").to_int();
  1786.         if(thisDNA == lastDNA)
  1787.         {
  1788.             break;
  1789.         }
  1790.     }
  1791.  
  1792.     if((get_property("_grimBuff") == "false") && have_familiar($familiar[Grim Brother]))
  1793.     {
  1794.         visit_url("choice.php?pwd=&whichchoice=835&option=1", true);
  1795.     }
  1796.  
  1797.     if(get_property("cc_clanstuff").to_int() < my_daycount())
  1798.     {
  1799.         if(!get_property("_olympicSwimmingPool").to_boolean())
  1800.         {
  1801.             cli_execute("swim noncombat");
  1802.         }
  1803.         if(!get_property("_olympicSwimmingPoolItemFound").to_boolean())
  1804.         {
  1805.             cli_execute("swim item");
  1806.         }
  1807.         if(get_property("_klawSummons").to_int() == 0)
  1808.         {
  1809.             cli_execute("clan_rumpus.php?action=click&spot=3&furni=3");
  1810.             cli_execute("clan_rumpus.php?action=click&spot=3&furni=3");
  1811.             cli_execute("clan_rumpus.php?action=click&spot=3&furni=3");
  1812.         }
  1813.         if(!get_property("_lookingGlass").to_boolean())
  1814.         {
  1815.             cli_execute("clan_viplounge.php?action=lookingglass");
  1816.         }
  1817.         if(get_property("_deluxeKlawSummons").to_int() == 0)
  1818.         {
  1819.             cli_execute("clan_viplounge.php?action=klaw");
  1820.             cli_execute("clan_viplounge.php?action=klaw");
  1821.             cli_execute("clan_viplounge.php?action=klaw");
  1822.         }
  1823.         if(!get_property("_aprilShower").to_boolean())
  1824.         {
  1825.             cli_execute("shower ice");
  1826.         }
  1827.         if(!get_property("_crimboTree").to_boolean())
  1828.         {
  1829.             cli_execute("crimbotree get");
  1830.         }
  1831.         set_property("cc_clanstuff", ""+my_daycount());
  1832.     }
  1833.  
  1834.     if((get_property("sidequestOrchardCompleted") != "none") && !get_property("_hippyMeatCollected").to_boolean())
  1835.     {
  1836.         visit_url("shop.php?whichshop=hippy");
  1837.     }
  1838.  
  1839.     if((get_property("sidequestArenaCompleted") != "none") && !get_property("concertVisited").to_boolean())
  1840.     {
  1841.         cli_execute("concert 2");
  1842.     }
  1843.     if(get_property("kingLiberated").to_boolean())
  1844.     {
  1845.         if((item_amount($item[The Legendary Beat]) > 0) && !get_property("_legendaryBeat").to_boolean())
  1846.         {
  1847.             use(1, $item[The Legendary Beat]);
  1848.         }
  1849.         if(have_skill($skill[Summon Clip Art]) && get_property("_clipartSummons").to_int() == 0)
  1850.         {
  1851.             cli_execute("make unbearable light");
  1852.         }
  1853.         if(have_skill($skill[Summon Clip Art]) && get_property("_clipartSummons").to_int() == 1)
  1854.         {
  1855.             cli_execute("make cold-filtered water");
  1856.         }
  1857.         if(have_skill($skill[Summon Clip Art]) && get_property("_clipartSummons").to_int() == 2)
  1858.         {
  1859.             cli_execute("make bucket of wine");
  1860.         }
  1861.         if((item_amount($item[Handmade Hobby Horse]) > 0) && !get_property("_hobbyHorseUsed").to_boolean())
  1862.         {
  1863.             use(1, $item[Handmade Hobby Horse]);
  1864.         }
  1865.         if((item_amount($item[ball-in-a-cup]) > 0) && !get_property("_ballInACupUsed").to_boolean())
  1866.         {
  1867.             use(1, $item[ball-in-a-cup]);
  1868.         }
  1869.         if((item_amount($item[set of jacks]) > 0) && !get_property("_setOfJacksUsed").to_boolean())
  1870.         {
  1871.             use(1, $item[set of jacks]);
  1872.         }
  1873.     }
  1874.  
  1875.     if(my_daycount() == 1)
  1876.     {
  1877.         if((pulls_remaining() > 1) && !possessEquipment($item[antique machete]))
  1878.         {
  1879.             if(item_amount($item[antique machete]) == 0)
  1880.             {
  1881.                 pullXWhenHaveY($item[antique machete], 1, 0);
  1882.             }
  1883.         }
  1884.         if((pulls_remaining() > 1) && (get_property("cc_palindome") != "finished") )
  1885.         {
  1886.             if(item_amount($item[wet stew]) == 0)
  1887.             {
  1888.                 pullXWhenHaveY($item[wet stew], 1, 0);
  1889.             }
  1890.         }
  1891.     }
  1892.  
  1893.     if((my_daycount() % 5) == 1)
  1894.     {
  1895.         visit_url("place.php?whichplace=desertbeach&action=db_nukehouse");
  1896.     }
  1897.  
  1898.     if(item_amount($item[rain-doh indigo cup]) > 0)
  1899.     {
  1900.         print("Copies left: " + (5 - get_property("_raindohCopiesMade").to_int()), "olive");
  1901.     }
  1902.     if(!in_hardcore())
  1903.     {
  1904.         print("Pulls remaining: " + pulls_remaining(), "olive");
  1905.     }
  1906.     if(have_skill($skill[Inigo\'s Incantation of Inspiration]))
  1907.     {
  1908.         int craftingLeft = 5 - get_property("_inigosCasts").to_int();
  1909.         print("Free Inigo\'s craftings left: " + craftingLeft, "blue");
  1910.     }
  1911.     if(item_amount($item[Thor\'s Pliers]) > 0)
  1912.     {
  1913.         int craftingLeft = 10 - get_property("_thorsPliersCrafting").to_int();
  1914.         print("Free Thor's Pliers craftings left: " + craftingLeft, "blue");
  1915.     }
  1916.     if(have_skill($skill[Rapid Prototyping]))
  1917.     {
  1918.         int craftingLeft = 5 - get_property("_rapidPrototypingUsed").to_int();
  1919.         print("Free Rapid Prototyping craftings left: " + craftingLeft, "blue");
  1920.     }
  1921.  
  1922.     if(get_property("libramSummons").to_int() > 0)
  1923.     {
  1924.         print("Total Libram Summoms: " + get_property("libramSummons"), "blue");
  1925.     }
  1926.  
  1927.     int smiles = (5 * (item_amount($item[Golden Mr. Accessory]) + storage_amount($item[Golden Mr. Accessory]) + closet_amount($item[Golden Mr. Accessory]))) - get_property("_smilesOfMrA").to_int();
  1928.     if(smiles > 0)
  1929.     {
  1930.         print("You have " + smiles + " smiles of Mr. A remaining.", "blue");
  1931.     }
  1932.  
  1933.     if((item_amount($item[CSA Fire-Starting Kit]) > 0) && (!get_property("_fireStartingKitUsed").to_boolean()))
  1934.     {
  1935.         print("Still have a CSA Fire-Starting Kit you can use!", "blue");
  1936.     }
  1937.     if((get_property("spookyAirportAlways").to_boolean()) && (my_class() != $class[Ed]))
  1938.     {
  1939.         visit_url("place.php?whichplace=airport_spooky_bunker&action=si_controlpanel");
  1940.         visit_url("choice.php?pwd=&whichchoice=986&option=8",true);
  1941.         visit_url("choice.php?pwd=&whichchoice=986&option=10",true);
  1942.     }
  1943.  
  1944.     if(my_daycount() == 2)
  1945.     {
  1946.         elementalPlanes_takeJob($element[spooky]);
  1947.         elementalPlanes_takeJob($element[stench]);
  1948.     }
  1949.  
  1950.     if((get_property("cc_dickstab").to_boolean()) && chateaumantegna_available() && (my_daycount() == 1))
  1951.     {
  1952.         boolean[item] furniture = chateaumantegna_decorations();
  1953.         if(!furniture[$item[Artificial Skylight]])
  1954.         {
  1955.             chateaumantegna_buyStuff($item[Artificial Skylight]);
  1956.         }
  1957.     }
  1958.  
  1959.     if(my_inebriety() <= inebriety_limit())
  1960.     {
  1961.         print("Goodnight done, please make sure to handle your overdrinking, then you can run me again.", "blue");
  1962.         if((my_inebriety() <= inebriety_limit()) && (my_rain() >= 50) && (my_adventures() >= 1))
  1963.         {
  1964.             if(item_amount($item[beer helmet]) == 0)
  1965.             {
  1966.                 print("Please consider an orcish frat boy spy (You want Frat Warrior Fatigues).", "blue");
  1967.                 if((have_effect($effect[Everything Looks Yellow]) == 0) && (my_lightning() >= 5))
  1968.                 {
  1969.                     print("Make sure to Ball Lightning the spy!!", "red");
  1970.                 }
  1971.             }
  1972.             else
  1973.             {
  1974.                 print("If you have the Frat Warrior Fatigues, rain man an Astronomer? Skinflute?", "blue");
  1975.             }
  1976.             abort("You have a rain man to cast, please do so before overdrinking and then run me again.");
  1977.         }
  1978.         if((item_amount($item[ye olde meade]) > 0) && (my_daycount() == 1))
  1979.         {
  1980.             print("You can drink a Ye Olde Meade as your nightcap! Yay!", "blue");
  1981.         }
  1982.         abort("You need to overdrink and then run me again. Beep.");
  1983.     }
  1984.     else
  1985.     {
  1986.  
  1987.  
  1988.  
  1989.         if(get_property("kingLiberated") == "false")
  1990.         {
  1991.             print(get_property("cc_banishes_day" + my_daycount()));
  1992.             print(get_property("cc_yellowRay_day" + my_daycount()));
  1993.             pullsNeeded("evaluate");
  1994.             if((get_property("_photocopyUsed") == "false") && (is_unrestricted("Deluxe Fax Machine")) && (my_adventures() > 0))
  1995.             {
  1996.                 print("You may have a fax that you can use. Check it out!", "blue");
  1997.             }
  1998.             if((pulls_remaining() > 0) && (my_daycount() == 1))
  1999.             {
  2000.                 print("You still have pulls, consider: Wet Stew, Antique Machete, Blackberry Galoshes, Drum Machine, Killing Jar?", "red");
  2001.             }
  2002.         }
  2003.         print("You are probably done for today, beep.", "blue");
  2004.     }
  2005. }
  2006.  
  2007. void handleInitFamiliar()
  2008. {
  2009.     if(familiar_weight(my_familiar()) == 20)
  2010.     {
  2011.         if((my_familiar() == $familiar[Angry Jung Man]) || (my_familiar() == $familiar[Adventurous Spelunker]))
  2012.         {
  2013.             if(have_familiar($familiar[Xiblaxian Holo-Companion]))
  2014.             {
  2015.                 handleFamiliar($familiar[Xiblaxian Holo-Companion]);
  2016.             }
  2017.             else if(have_familiar($familiar[Oily Woim]))
  2018.             {
  2019.                 handleFamiliar($familiar[Oily Woim]);
  2020.             }
  2021.         }
  2022.     }
  2023. }
  2024.  
  2025.  
  2026. boolean questOverride()
  2027. {
  2028.     // At the start of an ascension, get_campground() displays the wrong info.
  2029.     // Visiting the campground doesn\'t work.... grrr...
  2030.     //  visit_url("campground.php");
  2031.  
  2032. #   if(!get_property("cc_haveoven").to_boolean())
  2033. #   {
  2034. #       if(get_campground() contains $item[Dramatic&trade; range])
  2035. #       {
  2036. #           set_property("cc_haveoven", true);
  2037. #       }
  2038. #   }
  2039.     if((get_property("questL02Larva") == "finished") && (get_property("cc_mosquito") != "finished"))
  2040.     {
  2041.         print("Found completed Mosquito Larva (2)");
  2042.         set_property("cc_mosquito", "finished");
  2043.     }
  2044.     if((get_property("questL03Rat") == "finished") && (get_property("cc_tavern") != "finished"))
  2045.     {
  2046.         print("Found completed Tavern (3)");
  2047.         set_property("cc_tavern", "finished");
  2048.     }
  2049.     if((get_property("questL04Bat") == "finished") && (get_property("cc_bat") != "finished"))
  2050.     {
  2051.         print("Found completed Bat Cave (4)");
  2052.         set_property("cc_bat", "finished");
  2053.     }
  2054.     if((get_property("questL05Goblin") == "finished") && (get_property("cc_goblinking") != "finished"))
  2055.     {
  2056.         print("Found completed Goblin King (5)");
  2057.         set_property("cc_day1_cobb", "finished");
  2058.         set_property("cc_goblinking", "finished");
  2059.     }
  2060.     if((get_property("questL06Friar") == "finished") && (get_property("cc_friars") != "done") && (get_property("cc_friars") != "finished"))
  2061.     {
  2062.         print("Found completed Friars (6)");
  2063.         set_property("cc_friars", "done");
  2064.     }
  2065.     if((get_property("questL07Cyrptic") == "finished") && (get_property("cc_crypt") != "finished"))
  2066.     {
  2067.         print("Found completed Cyrpt (7)");
  2068.         set_property("cc_crypt", "finished");
  2069.     }
  2070.     if((get_property("questL08Trapper") == "step2") && (get_property("cc_trapper") != "yeti"))
  2071.     {
  2072.         print("Found Trapper partially completed (8: Ores/Cheese)");
  2073.         set_property("cc_trapper", "yeti");
  2074.     }
  2075.     if((get_property("questL08Trapper") == "finished") && (get_property("cc_trapper") != "finished"))
  2076.     {
  2077.         print("Found completed Trapper (8)");
  2078.         set_property("cc_trapper", "finished");
  2079.     }
  2080.     if((get_property("questL09Topping") == "finished") && (get_property("cc_highlandlord") != "finished"))
  2081.     {
  2082.         print("Found completed Highland Lord (9)");
  2083.         set_property("cc_highlandlord", "finished");
  2084.     }
  2085.     if((get_property("questL10Garbage") == "finished") && (get_property("cc_castletop") != "finished"))
  2086.     {
  2087.         print("Found completed Castle in the Clouds in the Sky with some Pie (10)");
  2088.         set_property("cc_castletop", "finished");
  2089.         set_property("cc_castleground", "finished");
  2090.         set_property("cc_castlebasement", "finished");
  2091.         set_property("cc_airship", "finished");
  2092.         set_property("cc_bean", "plant");
  2093.     }
  2094.     if((internalQuestStatus("questL10Garbage") >= 9) && (get_property("cc_castleground") != "finished"))
  2095.     {
  2096.         print("Found completed Castle Ground Floor (10)");
  2097.         set_property("cc_castleground", "finished");
  2098.     }
  2099.     if((internalQuestStatus("questL10Garbage") >= 8) && (get_property("cc_castlebasement") != "finished"))
  2100.     {
  2101.         print("Found completed Castle Basement (10)");
  2102.         set_property("cc_castlebasement", "finished");
  2103.     }
  2104.     if((internalQuestStatus("questL10Garbage") >= 7) && (get_property("cc_airship") != "finished"))
  2105.     {
  2106.         print("Found completed Airship (10)");
  2107.         set_property("cc_airship", "finished");
  2108.     }
  2109.     if((internalQuestStatus("questL10Garbage") >= 2) && (get_property("cc_bean") != "plant"))
  2110.     {
  2111.         print("Found completed Planted Beanstalk (10)");
  2112.         set_property("cc_bean", "plant");
  2113.     }
  2114.  
  2115.  
  2116.     if((internalQuestStatus("questL11Manor") >= 11) && (get_property("cc_ballroom") != "finished"))
  2117.     {
  2118.         print("Found completed Spookyraven Manor (11)");
  2119.         set_property("cc_ballroom", "finished");
  2120.         set_property("cc_winebomb", "finished");
  2121.     }
  2122.  
  2123.     if((get_property("questL11Black") == "finished") && (get_property("cc_blackmap") != "finished"))
  2124.     {
  2125.         print("Found completed Black Market (11)");
  2126.         set_property("cc_blackmap", "finished");
  2127.     }
  2128.     if((get_property("questL11Palindome") == "finished") && (get_property("cc_palindome") != "finished"))
  2129.     {
  2130.         print("Found completed Palindome (11)");
  2131.         set_property("cc_palindome", "finished");
  2132.     }
  2133.  
  2134.  
  2135.     if((get_property("questL11Business") == "finished") && (get_property("cc_hiddenoffice") != "finished"))
  2136.     {
  2137.         print("Found completed Hidden Office Building (11)");
  2138.         set_property("cc_hiddenoffice", "finished");
  2139.     }
  2140.     if((get_property("questL11Curses") == "finished") && (get_property("cc_hiddenapartment") != "finished"))
  2141.     {
  2142.         print("Found completed Hidden Apartment Building (11)");
  2143.         set_property("cc_hiddenapartment", "finished");
  2144.     }
  2145.     if((get_property("questL11Spare") == "finished") && (get_property("cc_hiddenbowling") != "finished"))
  2146.     {
  2147.         print("Found completed Hidden Bowling Alley (11)");
  2148.         set_property("cc_hiddenbowling", "finished");
  2149.     }
  2150.     if((get_property("questL11Doctor") == "finished") && (get_property("cc_hiddenhospital") != "finished"))
  2151.     {
  2152.         print("Found completed Hidden Hopickle (11)");
  2153.         set_property("cc_hiddenhospital", "finished");
  2154.     }
  2155.     if((get_property("questL11Worship") == "finished") && (get_property("cc_hiddencity") != "finished"))
  2156.     {
  2157.         print("Found completed Hidden City (11)");
  2158.         set_property("cc_hiddencity", "finished");
  2159.     }
  2160.  
  2161.  
  2162.     if(get_property("sidequestOrchardCompleted") != "none")
  2163.     {
  2164.         if(get_property("cc_nunsTrickGland") != "done")
  2165.         {
  2166.             print("Found completed Orchard (Nuns Trick - Gland) (12)");
  2167.             set_property("cc_nunsTrickGland", "done");
  2168.         }
  2169.         if(get_property("cc_orchard") != "finished")
  2170.         {
  2171.             print("Found completed Orchard (12)");
  2172.             set_property("cc_orchard", "finished");
  2173.         }
  2174.         return false;
  2175.     }
  2176.  
  2177.     if((get_property("sidequestLighthouseCompleted") != "none") && (get_property("cc_sonata") != "finished"))
  2178.     {
  2179.         print("Found completed Lighthouse (12)");
  2180.         set_property("cc_sonata", "finished");
  2181.     }
  2182.     if((get_property("sidequestJunkyardCompleted") != "none") && (get_property("cc_gremlins") != "finished"))
  2183.     {
  2184.         print("Found completed Junkyard (12)");
  2185.         set_property("cc_gremlins", "finished");
  2186.     }
  2187.     if((get_property("sidequestOrchardCompleted") != "none") && (get_property("cc_orchard") != "finished"))
  2188.     {
  2189.         print("Found completed Orchard (12)");
  2190.         set_property("cc_orchard", "finished");
  2191.     }
  2192.  
  2193.  
  2194.     if((get_property("sidequestNunsCompleted") != "none") && (get_property("cc_nuns") != "done") && (get_property("cc_nuns") != "finished"))
  2195.     {
  2196.         print("Found completed Nuns (12)");
  2197.         set_property("cc_nuns", "finished");
  2198.     }
  2199.  
  2200.     if((get_property("sideDefeated") != "neither") && (get_property("cc_war") != "finished"))
  2201.     {
  2202.         print("Found completed Island War (12)");
  2203.         set_property("cc_war", "finished");
  2204.     }
  2205.  
  2206.  
  2207.     if(possessEquipment($item[Pirate Fledges]))
  2208.     {
  2209.         if(get_property("cc_pirateoutfit") != "finished")
  2210.         {
  2211.             print("Found Pirate Fledges and incomplete pirate outfit, fixing...");
  2212.             set_property("cc_pirateoutfit", "finished");
  2213.         }
  2214.         if(get_property("cc_fcle") != "finished")
  2215.         {
  2216.             print("Found Pirate Fledges and incomplete F\'C\'le, fixing...");
  2217.             set_property("cc_fcle", "finished");
  2218.         }
  2219.     }
  2220.     return false;
  2221. }
  2222.  
  2223.  
  2224.  
  2225. boolean L11_hiddenCityZones()
  2226. {
  2227.     if(my_level() < 11)
  2228.     {
  2229.         return false;
  2230.     }
  2231.     if(get_property("cc_mcmuffin") != "start")
  2232.     {
  2233.         return false;
  2234.     }
  2235.     if(get_property("cc_hiddenzones") == "finished")
  2236.     {
  2237.         return false;
  2238.     }
  2239.  
  2240.     if(get_property("cc_hiddenzones") == "")
  2241.     {
  2242.         print("Machete the hidden zones!", "blue");
  2243.         set_property("choiceAdventure781", "1");
  2244.         set_property("choiceAdventure785", "1");
  2245.         set_property("choiceAdventure783", "1");
  2246.         set_property("choiceAdventure787", "1");
  2247.         set_property("choiceAdventure789", "2");
  2248.         set_property("choiceAdventure791", "6");
  2249.         set_property("cc_hiddenzones", "0");
  2250.         if(possessEquipment($item[Antique Machete]))
  2251.         {
  2252.             set_property("cc_hiddenzones", "1");
  2253.         }
  2254.     }
  2255.  
  2256.     if(get_property("cc_hiddenzones") == "0")
  2257.     {
  2258.         if(possessEquipment($item[antique machete]))
  2259.         {
  2260.             set_property("cc_hiddenzones", "1");
  2261.         }
  2262.         else
  2263.         {
  2264.             if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2265.             {
  2266.                 handleBjornify($familiar[Grimstone Golem]);
  2267.             }
  2268.             if(contains_text(get_property("lastEncounter"), "Where Does The Lone Ranger Take His Garbagester"))
  2269.             {
  2270.                 set_property("choiceAdventure789", "6");
  2271.             }
  2272.             ccAdv(1, $location[The Hidden Park]);
  2273.             return true;
  2274.         }
  2275.     }
  2276.  
  2277.     if(get_property("cc_hiddenzones") == "1")
  2278.     {
  2279.         equip($item[antique machete]);
  2280.         handleFamiliar($familiar[Fist Turkey]);
  2281.         if((dreamJarDrops() < 1) && have_familiar($familiar[Unconscious Collective]))
  2282.         {
  2283.             handleFamiliar($familiar[Unconscious Collective]);
  2284.         }
  2285.         handleBjornify($familiar[Grinning Turtle]);
  2286.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2287.         {
  2288.             handleBjornify($familiar[grimstone golem]);
  2289.         }
  2290.         ccAdv(1, $location[An Overgrown Shrine (Northwest)]);
  2291.         if(contains_text(get_property("lastEncounter"), "Earthbound and Down"))
  2292.         {
  2293.             set_property("cc_hiddenzones", "2");
  2294.         }
  2295.         return true;
  2296.     }
  2297.  
  2298.     if(get_property("cc_hiddenzones") == "2")
  2299.     {
  2300.         equip($item[antique machete]);
  2301.         handleFamiliar($familiar[Fist Turkey]);
  2302.         handleBjornify($familiar[Grinning Turtle]);
  2303.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2304.         {
  2305.             handleBjornify($familiar[grimstone golem]);
  2306.         }
  2307.         ccAdv(1, $location[An Overgrown Shrine (Northeast)]);
  2308.         if(contains_text(get_property("lastEncounter"), "Air Apparent"))
  2309.         {
  2310.             set_property("cc_hiddenzones", "3");
  2311.         }
  2312.         return true;
  2313.     }
  2314.  
  2315.     if(get_property("cc_hiddenzones") == "3")
  2316.     {
  2317.         equip($item[antique machete]);
  2318.         handleFamiliar($familiar[Fist Turkey]);
  2319.         handleBjornify($familiar[Grinning Turtle]);
  2320.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2321.         {
  2322.             handleBjornify($familiar[grimstone golem]);
  2323.         }
  2324.         ccAdv(1, $location[An Overgrown Shrine (Southwest)]);
  2325.         if(contains_text(get_property("lastEncounter"), "Water You Dune"))
  2326.         {
  2327.             set_property("cc_hiddenzones", "4");
  2328.         }
  2329.         return true;
  2330.     }
  2331.  
  2332.     if(get_property("cc_hiddenzones") == "4")
  2333.     {
  2334.         equip($item[antique machete]);
  2335.         handleFamiliar($familiar[Fist Turkey]);
  2336.         handleBjornify($familiar[Grinning Turtle]);
  2337.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2338.         {
  2339.             handleBjornify($familiar[grimstone golem]);
  2340.         }
  2341.         ccAdv(1, $location[An Overgrown Shrine (Southeast)]);
  2342.         if(contains_text(get_property("lastEncounter"), "Fire When Ready"))
  2343.         {
  2344.             set_property("cc_hiddenzones", "5");
  2345.         }
  2346.         return true;
  2347.     }
  2348.  
  2349.     if(get_property("cc_hiddenzones") == "5")
  2350.     {
  2351.         equip($item[antique machete]);
  2352.         handleFamiliar($familiar[Fist Turkey]);
  2353.         handleBjornify($familiar[Grinning Turtle]);
  2354.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2355.         {
  2356.             handleBjornify($familiar[grimstone golem]);
  2357.         }
  2358.         ccAdv(1, $location[A Massive Ziggurat]);
  2359.         if(contains_text(get_property("lastEncounter"), "Legend of the Temple in the Hidden City"))
  2360.         {
  2361.             set_property("choiceAdventure791", "1");
  2362.             set_property("choiceAdventure781", "2");
  2363.             set_property("choiceAdventure785", "2");
  2364.             set_property("choiceAdventure783", "2");
  2365.             set_property("choiceAdventure787", "2");
  2366.             set_property("cc_hiddenzones", "finished");
  2367.             handleFamiliar($familiar[Adventurous Spelunker]);
  2368.             handleBjornify($familiar[El Vibrato Megadrone]);
  2369.         }
  2370.         if(contains_text(get_property("lastEncounter"), "Temple of the Legend in the Hidden City"))
  2371.         {
  2372.             set_property("choiceAdventure791", "1");
  2373.             set_property("choiceAdventure781", "2");
  2374.             set_property("choiceAdventure785", "2");
  2375.             set_property("choiceAdventure783", "2");
  2376.             set_property("choiceAdventure787", "2");
  2377.             set_property("cc_hiddenzones", "finished");
  2378.         }
  2379.         return true;
  2380.     }
  2381.     return false;
  2382. }
  2383.  
  2384. boolean L11_unlockHiddenCity()
  2385. {
  2386.     if(my_level() < 11)
  2387.     {
  2388.         return false;
  2389.     }
  2390.     if(my_adventures() <= 3)
  2391.     {
  2392.         return false;
  2393.     }
  2394.     if(get_property("cc_hiddenunlock") != "nose")
  2395.     {
  2396.         return false;
  2397.     }
  2398.     if(get_property("cc_mcmuffin") != "start")
  2399.     {
  2400.         return false;
  2401.     }
  2402.  
  2403.     print("Searching for the Hidden City", "blue");
  2404.     if((item_amount($item[Stone Wool]) == 0) && (have_effect($effect[stone-faced]) == 0))
  2405.     {
  2406.         pullXWhenHaveY($item[Stone Wool], 1, 0);
  2407.     }
  2408.     buffMaintain($effect[Stone-Faced], 0, 1, 1);
  2409.  
  2410.     if(ccAdvBypass(280))
  2411.     {
  2412.         print("Wandering monster interrupted our attempt at the Hidden City", "red");
  2413.         return true;
  2414.     }
  2415.  
  2416.     visit_url("choice.php?whichchoice=582&option=2&pwd");
  2417.     visit_url("choice.php?whichchoice=580&option=2&pwd");
  2418.     visit_url("choice.php?whichchoice=584&option=4&pwd");
  2419.     visit_url("choice.php?whichchoice=580&option=1&pwd");
  2420.     visit_url("choice.php?whichchoice=123&option=2&pwd");
  2421.     visit_url("choice.php");
  2422.     cli_execute("dvorak");
  2423.     visit_url("choice.php?whichchoice=125&option=3&pwd");
  2424.     print("Hidden Temple Unlocked");
  2425.     set_property("cc_hiddenunlock", "finished");
  2426.     set_property("choiceAdventure582", "1");
  2427.     set_property("choiceAdventure579", "3");
  2428.     if((item_amount($item[antique machete]) == 0) && (!in_hardcore()))
  2429.     {
  2430.         pullXWhenHaveY($item[Antique Machete], 1, 0);
  2431.     }
  2432.     return true;
  2433. }
  2434.  
  2435.  
  2436. boolean L11_nostrilOfTheSerpent()
  2437. {
  2438.     if(get_property("cc_mcmuffin") != "start")
  2439.     {
  2440.         return false;
  2441.     }
  2442.     if(item_amount($item[The Nostril of the Serpent]) != 0)
  2443.     {
  2444.         return false;
  2445.     }
  2446.     if(get_property("cc_hiddenunlock") != "")
  2447.     {
  2448.         return false;
  2449.     }
  2450.  
  2451.     print("Must get a snake nose.", "blue");
  2452.     if((item_amount($item[Stone Wool]) == 0) && (have_effect($effect[stone-faced]) == 0))
  2453.     {
  2454.         pullXWhenHaveY($item[Stone Wool], 1, 0);
  2455.     }
  2456.     set_property("choiceAdventure582", "1");
  2457.     set_property("choiceAdventure579", "2");
  2458.  
  2459.     buffMaintain($effect[Stone-Faced], 0, 1, 1);
  2460.     if(have_effect($effect[Stone-Faced]) == 0)
  2461.     {
  2462.         abort("We are not Stone-Faced. Please get a stone wool and run me again.");
  2463.     }
  2464.  
  2465.     ccAdv(1, $location[The Hidden Temple]);
  2466.     cli_execute("refresh inv");
  2467.     if(item_amount($item[The Nostril of the Serpent]) == 1)
  2468.     {
  2469.         set_property("cc_hiddenunlock", "nose");
  2470.         set_property("choiceAdventure579", "3");
  2471.     }
  2472.     return true;
  2473. }
  2474.  
  2475. boolean LX_spookyBedroomCombat()
  2476. {
  2477.     set_property("cc_bedroomHandler1", "yes");
  2478.     set_property("cc_bedroomHandler2", "yes");
  2479.     ccAdv(1, $location[The Haunted Bedroom]);
  2480.     if(contains_text(visit_url("main.php"), "choice.php"))
  2481.     {
  2482.         print("Bedroom choice adventure get!", "green");
  2483.         ccAdv(1, $location[The Haunted Bedroom]);
  2484.     }
  2485.     else if(contains_text(visit_url("main.php"), "Combat"))
  2486.     {
  2487.         print("Bedroom post-combat super combat get!", "green");
  2488.         ccAdv(1, $location[The Haunted Bedroom]);
  2489.     }
  2490.     set_property("cc_bedroomHandler1", "no");
  2491.     set_property("cc_bedroomHandler2", "no");
  2492.     return false;
  2493. }
  2494.  
  2495. boolean LX_spookyravenSecond()
  2496. {
  2497.     if((get_property("cc_spookyravensecond") != "") || (get_property("cc_spookyravennecklace") != "done"))
  2498.     {
  2499.         return false;
  2500.     }
  2501.  
  2502.     if((item_amount($item[Lady Spookyraven\'s Powder Puff]) == 1) && (item_amount($item[Lady Spookyraven\'s Dancing Shoes]) == 1) && (item_amount($item[Lady Spookyraven\'s Finest Gown]) == 1))
  2503.     {
  2504.         print("Finished Spookyraven, just dancing with the lady.", "blue");
  2505.         visit_url("place.php?whichplace=manor2&action=manor2_ladys");
  2506.         visit_url("place.php?whichplace=manor2&action=manor2_ladys");
  2507.         set_property("cc_ballroomopen", "open");
  2508.         ccAdv(1, $location[The Haunted Ballroom]);
  2509.         if(contains_text(get_property("lastEncounter"), "Lights Out in the Ballroom"))
  2510.         {
  2511.             ccAdv(1, $location[The Haunted Ballroom]);
  2512.         }
  2513.         set_property("choiceAdventure106", "2");
  2514.         visit_url("place.php?whichplace=manor3&action=manor3_ladys");
  2515.         return true;
  2516.     }
  2517.  
  2518.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2519.     {
  2520.         handleBjornify($familiar[grimstone golem]);
  2521.     }
  2522.  
  2523.     if(item_amount($item[Lord Spookyraven\'s Spectacles]) == 0)
  2524.     {
  2525.         set_property("choiceAdventure878", "3");
  2526.     }
  2527.     else
  2528.     {
  2529.         if(item_amount($item[Disposable Instant Camera]) == 0)
  2530.         {
  2531.             set_property("choiceAdventure878", "4");
  2532.         }
  2533.         else
  2534.         {
  2535.             set_property("choiceAdventure878", "2");
  2536.         }
  2537.     }
  2538.  
  2539.     if(get_property("cc_bedroomHandler1") == "yes")
  2540.     {
  2541.         set_property("cc_bedroomHandler1", "no");
  2542.         set_property("cc_bedroomHandler2", "no");
  2543.         abort("We are currently in a choice and mafia won't automatically handle this. It's usually One Simple Nightstand that causes this but you might have a bonus. Woo.");
  2544.     }
  2545.  
  2546.  
  2547.     if(get_property("cc_ballroomopen") == "open" || get_property( "questM21Dance" ) == 'finished' || get_property( "questM21Dance" ) == 'step3')
  2548.     {
  2549.         if(item_amount($item[Lord Spookyraven\'s Spectacles]) == 1)
  2550.         {
  2551.             set_property("cc_spookyravensecond", "finished");
  2552.         }
  2553.         else
  2554.         {
  2555.             print("Need Spectacles, damn it.", "blue");
  2556.             LX_spookyBedroomCombat();
  2557.             print("Finished 1 Spookyraven Bedroom Spectacle Sequence", "blue");
  2558.         }
  2559.         return true;
  2560.     }
  2561.     else
  2562.     {
  2563.         if((item_amount($item[Lady Spookyraven\'s Finest Gown]) == 0) && (get_counters("Fortune Cookie", 0, 10) != "Fortune Cookie"))
  2564.         {
  2565.             print("Spookyraven: Bedroom", "blue");
  2566.             LX_spookyBedroomCombat();
  2567.             print("Finished 1 Spookyraven Bedroom Sequence", "blue");
  2568.             return true;
  2569.         }
  2570.         if(item_amount($item[Lady Spookyraven\'s Dancing Shoes]) == 0)
  2571.         {
  2572.             set_property("louvreGoal", "7");
  2573.             set_property("louvreDesiredGoal", "7");
  2574.             print("Spookyraven: Gallery", "blue");
  2575.             ccAdv(1, $location[The Haunted Gallery]);
  2576.             return true;
  2577.         }
  2578.         if(item_amount($item[Lady Spookyraven\'s Powder Puff]) == 0)
  2579.         {
  2580.             if((my_daycount() == 1) && (get_property("_hipsterAdv").to_int() < 7))
  2581.             {
  2582.                 handleFamiliar($familiar[Artistic Goth Kid]);
  2583.             }
  2584.             print("Spookyraven: Bathroom", "blue");
  2585.             set_property("choiceAdventure892", "1");
  2586.             ccAdv(1, $location[The Haunted Bathroom]);
  2587.  
  2588.             handleFamiliar($familiar[Adventurous Spelunker]);
  2589.             return true;
  2590.         }
  2591.     }
  2592.     return false;
  2593. }
  2594.  
  2595.  
  2596.  
  2597. boolean L11_mauriceSpookyraven()
  2598. {
  2599.     if(get_property("cc_spookyravennecklace") != "done")
  2600.     {
  2601.         return false;
  2602.     }
  2603.     if(get_property("cc_mcmuffin") != "start")
  2604.     {
  2605.         return false;
  2606.     }
  2607.     if(get_property("cc_ballroom") != "")
  2608.     {
  2609.         return false;
  2610.     }
  2611.  
  2612.     if(my_class() == $class[Ed])
  2613.     {
  2614.         if(item_amount($item[7962]) == 0)
  2615.         {
  2616.             set_property("cc_ballroom", "finished");
  2617.             return true;
  2618.         }
  2619.     }
  2620.     else if(item_amount($item[2286]) > 0)
  2621.     {
  2622.         set_property("cc_ballroom", "finished");
  2623.         return true;
  2624.     }
  2625.  
  2626.     if(get_property("cc_ballroomflat") == "")
  2627.     {
  2628.         print("Searching for the basement of Spookyraven", "blue");
  2629.         set_property("choiceAdventure106", "2");
  2630.         set_property("choiceAdventure90", "3");
  2631.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2632.         {
  2633.             handleBjornify($familiar[grimstone golem]);
  2634.         }
  2635.         if(my_mp() > 60)
  2636.         {
  2637.             handleBjornify($familiar[grimstone golem]);
  2638.         }
  2639.         buffMaintain($effect[Snow Shoes], 0, 1, 1);
  2640.  
  2641.         handleInitFamiliar();
  2642.         if(!ccAdv(1, $location[The Haunted Ballroom]))
  2643.         {
  2644.             visit_url("place.php?whichplace=manor2");
  2645.             print("If 'That Area is not available', mafia isn't recognizing it without a visit to manor2, not sure why.", "red");
  2646.         }
  2647.         handleFamiliar($familiar[Adventurous Spelunker]);
  2648.         if(contains_text(get_property("lastEncounter"), "We\'ll All Be Flat"))
  2649.         {
  2650.             set_property("cc_ballroomflat", "organ");
  2651.         }
  2652.         return true;
  2653.     }
  2654.     if(item_amount($item[recipe: mortar-dissolving solution]) == 0)
  2655.     {
  2656.         equip($slot[acc3], $item[Lord Spookyraven\'s Spectacles]);
  2657.         visit_url("place.php?whichplace=manor4&action=manor4_chamberwall");
  2658.         use(1, $item[recipe: mortar-dissolving solution]);
  2659.  
  2660.         if(item_amount($item[Numberwang]) > 0)
  2661.         {
  2662.             equip($slot[acc3], $item[numberwang]);
  2663.         }
  2664.  
  2665.         #Cellar, laundry room Lights out ignore
  2666.         set_property("choiceAdventure901", "2");
  2667.         set_property("choiceAdventure891", "1");
  2668.     }
  2669.  
  2670.     if((item_amount($item[blasting soda]) == 1) && (item_amount($item[bottle of Chateau de Vinegar]) == 1))
  2671.     {
  2672.         print("Time to cook up something explosive! Science fair unstable fulminate time!", "green");
  2673.         ovenHandle();
  2674.         craft("cook", 1, $item[bottle of Chateau de Vinegar], $item[blasting soda]);
  2675.         set_property("cc_winebomb", "partial");
  2676.     }
  2677.  
  2678.     if(possessEquipment($item[Unstable Fulminate]))
  2679.     {
  2680.         set_property("cc_winebomb", "partial");
  2681.     }
  2682.  
  2683.     if((item_amount($item[bottle of Chateau de Vinegar]) == 0) && (get_property("cc_winebomb") == ""))
  2684.     {
  2685.         print("Searching for vinegar", "blue");
  2686.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2687.         {
  2688.             handleBjornify($familiar[grimstone golem]);
  2689.         }
  2690.         buffMaintain($effect[Joyful Resolve], 0, 1, 1);
  2691.         ccAdv(1, $location[The Haunted Wine Cellar]);
  2692.         return true;
  2693.     }
  2694.     if((item_amount($item[blasting soda]) == 0) && (get_property("cc_winebomb") == ""))
  2695.     {
  2696.         print("Searching for baking soda, I mean, blasting pop.", "blue");
  2697.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  2698.         {
  2699.             handleBjornify($familiar[grimstone golem]);
  2700.         }
  2701.         ccAdv(1, $location[The Haunted Laundry Room]);
  2702.         return true;
  2703.     }
  2704.  
  2705.     if(get_property("cc_winebomb") == "partial")
  2706.     {
  2707.         if(item_amount($item[unstable fulminate]) > 0)
  2708.         {
  2709.             if(weapon_hands(equipped_item($slot[weapon])) != 1)
  2710.             {
  2711.                 equip($slot[weapon], $item[none]);
  2712.             }
  2713.             equip($item[unstable fulminate]);
  2714.         }
  2715.         print("Now we mix and heat it up.", "blue");
  2716.  
  2717.         if((my_path() == "Picky") && (item_amount($item[gumshoes]) > 0))
  2718.         {
  2719.             change_mcd(0);
  2720.             equip($slot[acc2], $item[gumshoes]);
  2721.         }
  2722.         ccAdv(1, $location[The Haunted Boiler Room]);
  2723.  
  2724.         if(item_amount($item[wine bomb]) == 1)
  2725.         {
  2726.             set_property("cc_winebomb", "finished");
  2727.             visit_url("place.php?whichplace=manor4&action=manor4_chamberwall");
  2728.         }
  2729.         return true;
  2730.     }
  2731.  
  2732.     if(get_property("cc_winebomb") == "finished")
  2733.     {
  2734.         print("Down with the tyrant of Spookyraven!", "blue");
  2735.         if(my_mp() >= 20)
  2736.         {
  2737.             useCocoon();
  2738.         }
  2739.         buffMaintain($effect[Astral Shell], 10, 1, 1);
  2740.         buffMaintain($effect[Elemental Saucesphere], 10, 1, 1);
  2741.  
  2742.         visit_url("place.php?whichplace=manor4&action=manor4_chamberboss");
  2743.         if(my_class() != $class[Ed])
  2744.         {
  2745.             ccAdv(1, $location[Noob Cave]);
  2746.         }
  2747.         if(have_effect($effect[beaten up]) == 0)
  2748.         {
  2749.             set_property("cc_ballroom", "finished");
  2750.         }
  2751.         return true;
  2752.     }
  2753.     return false;
  2754. }
  2755.  
  2756. boolean LX_dinseylandfillFunbucks()
  2757. {
  2758.     if(!get_property("cc_getDinseyGarbageMoney").to_boolean())
  2759.     {
  2760.         return false;
  2761.     }
  2762.     if(!elementalPlanes_access($element[stench]))
  2763.     {
  2764.         return false;
  2765.     }
  2766.     if(get_property("cc_dinseyGarbageMoney").to_int() == my_daycount())
  2767.     {
  2768.         return false;
  2769.     }
  2770.     if((my_adventures() == 0) || (my_level() < 5))
  2771.     {
  2772.         return false;
  2773.     }
  2774.     if(item_amount($item[Bag of Park Garbage]) > 0)
  2775.     {
  2776.         return dinseylandfill_garbageMoney();
  2777.     }
  2778.     if((my_daycount() >= 3) && (my_adventures() > 5))
  2779.     {
  2780.         # We do this after the item check since we may have an extra bag and we should turn that in.
  2781.         return false;
  2782.     }
  2783.     ccAdv(1, $location[Barf Mountain]);
  2784.     return true;
  2785. }
  2786.  
  2787. boolean L13_sorceressDoor()
  2788. {
  2789.     if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_05_monster1"))
  2790.     {
  2791.         set_property("cc_sorceress", "tower");
  2792.         return false;
  2793.     }
  2794.     if(get_property("cc_sorceress") != "door")
  2795.     {
  2796.         return false;
  2797.     }
  2798.  
  2799.     if((item_amount($item[Richard\'s Star Key]) == 0) && (item_amount($item[Star Chart]) == 0))
  2800.     {
  2801.         if(my_rain() < 50)
  2802.         {
  2803.             pullXWhenHaveY($item[Star Chart], 1, 0);
  2804.         }
  2805.     }
  2806.  
  2807.     if((item_amount($item[Richard\'s Star Key]) == 0) && (item_amount($item[Star Chart]) > 0) && (item_amount($item[star]) >= 8) && (item_amount($item[line]) >= 7))
  2808.     {
  2809.         visit_url("shop.php?pwd&whichshop=starchart&action=buyitem&quantity=1&whichrow=141");
  2810.         if(item_amount($item[Richard\'s Star Key]) == 0)
  2811.         {
  2812.             cli_execute("make richard's star key");
  2813.         }
  2814.     }
  2815.  
  2816.     if(item_amount($item[white pixel]) >= 30)
  2817.     {
  2818.         cli_execute("make digital key");
  2819.         set_property("cc_crackpotjar", "finished");
  2820.     }
  2821.  
  2822.     string page = visit_url("place.php?whichplace=nstower_door");
  2823.     if(contains_text(page, "ns_lock1"))
  2824.     {
  2825.         if(item_amount($item[Boris\'s Key]) == 0)
  2826.         {
  2827.             cli_execute("make Boris's Key");
  2828.         }
  2829.         if(item_amount($item[Boris\'s Key]) == 0)
  2830.         {
  2831.             abort("Need Boris's Key for the Sorceress door :(");
  2832.         }
  2833.         visit_url("place.php?whichplace=nstower_door&action=ns_lock1");
  2834.     }
  2835.     if(contains_text(page, "ns_lock2"))
  2836.     {
  2837.         if(item_amount($item[Jarlsberg\'s Key]) == 0)
  2838.         {
  2839.             cli_execute("make Jarlsberg's Key");
  2840.         }
  2841.         if(item_amount($item[Jarlsberg\'s Key]) == 0)
  2842.         {
  2843.             abort("Need Jarlsberg's Key for the Sorceress door :(");
  2844.         }
  2845.         visit_url("place.php?whichplace=nstower_door&action=ns_lock2");
  2846.     }
  2847.     if(contains_text(page, "ns_lock3"))
  2848.     {
  2849.         if(item_amount($item[Sneaky Pete\'s Key]) == 0)
  2850.         {
  2851.             cli_execute("make Sneaky Pete's Key");
  2852.         }
  2853.         if(item_amount($item[Sneaky Pete\'s Key]) == 0)
  2854.         {
  2855.             abort("Need Sneaky Pete's Key for the Sorceress door :(");
  2856.         }
  2857.         visit_url("place.php?whichplace=nstower_door&action=ns_lock3");
  2858.     }
  2859.  
  2860.     if(contains_text(page, "ns_lock4"))
  2861.     {
  2862.         if(item_amount($item[Richard\'s Star Key]) == 0)
  2863.         {
  2864.             cli_execute("make richard's star key");
  2865.         }
  2866.         if(item_amount($item[Richard\'s Star Key]) == 0)
  2867.         {
  2868.             abort("Need Richard's Star Key for the Sorceress door :(");
  2869.         }
  2870.         visit_url("place.php?whichplace=nstower_door&action=ns_lock4");
  2871.     }
  2872.  
  2873.     if(contains_text(page, "ns_lock5"))
  2874.     {
  2875.         if(item_amount($item[Digital Key]) == 0)
  2876.         {
  2877.             cli_execute("make digital key");
  2878.         }
  2879.         if(item_amount($item[Digital Key]) == 0)
  2880.         {
  2881.             abort("Need Digital Key for the Sorceress door :(");
  2882.         }
  2883.         visit_url("place.php?whichplace=nstower_door&action=ns_lock5");
  2884.     }
  2885.  
  2886.     if(contains_text(page, "ns_lock6"))
  2887.     {
  2888.         if(item_amount($item[Skeleton Key]) == 0)
  2889.         {
  2890.             cli_execute("make skeleton key");
  2891.         }
  2892.         if(item_amount($item[Skeleton Key]) == 0)
  2893.         {
  2894.             abort("Need Skeleton Key for the Sorceress door :(");
  2895.         }
  2896.         visit_url("place.php?whichplace=nstower_door&action=ns_lock6");
  2897.     }
  2898.  
  2899.  
  2900.     visit_url("place.php?whichplace=nstower_door&action=ns_doorknob");
  2901.     return true;
  2902. }
  2903.  
  2904.  
  2905. boolean L11_unlockEd()
  2906. {
  2907.     if(get_property("cc_mcmuffin") != "pyramid")
  2908.     {
  2909.         return false;
  2910.     }
  2911.  
  2912.     if(my_class() == $class[Ed])
  2913.     {
  2914.         set_property("cc_mcmuffin", "finished");
  2915.         return true;
  2916.     }
  2917.  
  2918.     if(get_property("cc_tavern") != "finished")
  2919.     {
  2920.         print("Uh oh, didn\'t do the tavern and we are at the pyramid....", "red");
  2921.     }
  2922.  
  2923.     if(get_property("cc_nunsTrick") == "got")
  2924.     {
  2925.         set_property("cc_nunsTrickActive", "yes");
  2926.     }
  2927.  
  2928.     print("In the pyramid (W:" + item_amount($item[crumbling wooden wheel]) + ") (R:" + item_amount($item[tomb ratchet]) + ") (U:" + get_property("controlRoomUnlock") + ")", "blue");
  2929.  
  2930.     if(!get_property("middleChamberUnlock").to_boolean())
  2931.     {
  2932.         ccAdv(1, $location[The Upper Chamber]);
  2933.         return true;
  2934.     }
  2935.  
  2936.     int total = item_amount($item[Crumbling Wooden Wheel]);
  2937.     total = total + item_amount($item[Tomb Ratchet]);
  2938.  
  2939.     if((total >= 10) && (my_adventures() >= 4) && get_property("controlRoomUnlock").to_boolean())
  2940.     {
  2941.         visit_url("place.php?whichplace=pyramid&action=pyramid_control");
  2942.         int x = 0;
  2943.         while(x < 10)
  2944.         {
  2945.             if(item_amount($item[crumbling wooden wheel]) > 0)
  2946.             {
  2947.                 visit_url("choice.php?pwd&whichchoice=929&option=1&choiceform1=Use+a+wheel+on+the+peg&pwd="+my_hash());
  2948.             }
  2949.             else
  2950.             {
  2951.                 visit_url("choice.php?whichchoice=929&option=2&pwd");
  2952.             }
  2953.             x = x + 1;
  2954.             if((x == 3) || (x == 7) || (x == 10))
  2955.             {
  2956.                 visit_url("choice.php?pwd&whichchoice=929&option=5&choiceform5=Head+down+to+the+Lower+Chambers+%281%29&pwd="+my_hash());
  2957.             }
  2958.             if((x == 3) || (x == 7))
  2959.             {
  2960.                 visit_url("place.php?whichplace=pyramid&action=pyramid_control");
  2961.             }
  2962.         }
  2963.         set_property("cc_mcmuffin", "ed");
  2964.         return true;
  2965.     }
  2966.     if(total < 10)
  2967.     {
  2968.         buffMaintain($effect[Joyful Resolve], 0, 1, 1);
  2969.         buffMaintain($effect[One Very Clear Eye], 0, 1, 1);
  2970.         buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  2971.         buffMaintain($effect[Human-Fish Hybrid], 0, 1, 1);
  2972.         buffMaintain($effect[Human-Human Hybrid], 0, 1, 1);
  2973.         if(get_property("cc_dickstab").to_boolean())
  2974.         {
  2975.             buffMaintain($effect[Wet and Greedy], 0, 1, 1);
  2976.             buffMaintain($effect[Frosty], 0, 1, 1);
  2977.         }
  2978.         if(item_amount($item[possessed sugar cube]) > 0)
  2979.         {
  2980.             cli_execute("make sugar fairy");
  2981.             buffMaintain($effect[Dance of the Sugar Fairy], 0, 1, 1);
  2982.         }
  2983.     }
  2984.     if((have_effect($effect[On The Trail]) > 0) && (get_property("olfactedMonster") != "Tomb Rat"))
  2985.     {
  2986.         if(item_amount($item[soft green echo eyedrop antidote]) > 0)
  2987.         {
  2988.             uneffect($effect[On The Trail]);
  2989.         }
  2990.     }
  2991.  
  2992.     ccAdv(1, $location[The Middle Chamber]);
  2993.     return true;
  2994. }
  2995.  
  2996.  
  2997. boolean L11_unlockPyramid()
  2998. {
  2999. #   if((my_level() >= 12) && (my_class() != $class[Ed]) && (((item_amount($item[ancient amulet]) > 0) && (item_amount($item[Eye of Ed]) > 0) && (item_amount($item[Staff of Fats]) > 0)) || (item_amount($item[Staff of Ed]) > 0)) && (get_property("cc_mcmuffin") == "start"))
  3000.     int pyramidLevel = 11;
  3001.     if(get_property("cc_dickStab").to_boolean())
  3002.     {
  3003.         pyramidLevel = 12;
  3004.     }
  3005.  
  3006.     if(my_level() < pyramidLevel)
  3007.     {
  3008.         return false;
  3009.     }
  3010.     if(my_class() == $class[Ed])
  3011.     {
  3012.         return false;
  3013.     }
  3014.     if(get_property("cc_mcmuffin") != "start")
  3015.     {
  3016.         return false;
  3017.     }
  3018.  
  3019.     if(get_property("questL11Pyramid") == "started")
  3020.     {
  3021.         set_property("cc_mcmuffin", "pyramid");
  3022.         return true;
  3023.     }
  3024.  
  3025.  
  3026.     if((((item_amount($item[2180]) > 0) && (item_amount($item[2286]) > 0) && (item_amount($item[2268]) > 0)) || (item_amount($item[2325]) > 0)))
  3027.     {
  3028.         print("Reveal the pyramid", "blue");
  3029. #       if(item_amount($item[Staff of Ed]) == 0)
  3030.         if(item_amount($item[2325]) == 0)
  3031.         {
  3032.             craft("combine", 1, $item[2180], $item[2286]);
  3033.             craft("combine", 1, $item[headpiece of the staff of ed], $item[2268]);
  3034.         }
  3035.         if(item_amount($item[2325]) == 0)
  3036.         {
  3037.             abort("Failed making Staff of Ed (2325) via CLI. Please do it manually and rerun.");
  3038.         }
  3039.  
  3040.         visit_url("place.php?whichplace=desertbeach&action=db_pyramid1");
  3041.  
  3042.         if(get_property("questL11Pyramid") == "unstarted")
  3043.         {
  3044.             print("No burning Ed's model now!", "blue");
  3045.             if((my_path() == "One Crazy Random Summer") && (get_property("desertExploration").to_int() == 100))
  3046.             {
  3047.                 print("We might have had an issue due to OCRS and the Desert, please finish the desert (and only the desert) manually and run again.", "red");
  3048.                 string page = visit_url("place.php?whichplace=desertbeach");
  3049.                 matcher desert_matcher = create_matcher("title=\"[(](\\d+)% explored[)]\"", page);
  3050.                 if(desert_matcher.find())
  3051.                 {
  3052.                     int found = to_int(desert_matcher.group(1));
  3053.                     if(found < 100)
  3054.                     {
  3055.                         set_property("desertExploration", found);
  3056.                     }
  3057.                 }
  3058.  
  3059.                 if(get_property("desertExploration").to_int() == 100)
  3060.                 {
  3061.                     abort("Tried to open the Pyramid but could not. Something went wrong :(");
  3062.                 }
  3063.                 else
  3064.                 {
  3065.                     print("Incorrectly had exploration value of 100 however, this was correctable. Trying to resume.", "blue");
  3066.                     return false;
  3067.                 }
  3068.             }
  3069.             abort("Tried to open the Pyramid but could not. Something went wrong :(");
  3070.         }
  3071.  
  3072.         set_property("cc_hiddencity", "finished");
  3073.         set_property("cc_ballroom", "finished");
  3074.         set_property("cc_palindome", "finished");
  3075.         set_property("cc_mcmuffin", "pyramid");
  3076.         buffMaintain($effect[Snow Shoes], 0, 1, 1);
  3077.         ccAdv(1, $location[The Upper Chamber]);
  3078.         return true;
  3079.     }
  3080.     else
  3081.     {
  3082.         return false;
  3083.     }
  3084. }
  3085.  
  3086. boolean L11_defeatEd()
  3087. {
  3088.     if(get_property("cc_mcmuffin") != "ed")
  3089.     {
  3090.         return false;
  3091.     }
  3092.     if(my_adventures() <= 7)
  3093.     {
  3094.         return false;
  3095.     }
  3096.  
  3097.     #if(item_amount($item[Holy MacGuffin]) == 1)
  3098.     if(item_amount($item[2334]) == 1)
  3099.     {
  3100.         set_property("cc_mcmuffin", "finished");
  3101.         cli_execute("ccs null");
  3102.         council();
  3103.         return true;
  3104.     }
  3105.  
  3106.     int baseML = monster_level_adjustment();
  3107.     if(my_path() == "Heavy Rains")
  3108.     {
  3109.         baseML = baseML + 60;
  3110.     }
  3111.     if(baseML > 150)
  3112.     {
  3113.         equip($slot[acc2], $item[pirate fledges]);
  3114.         uneffect($effect[Ur-kel\'s Aria of Annoyance]);
  3115.         if(possessEquipment($item[Beer Helmet]))
  3116.         {
  3117.             equip($item[beer helmet]);
  3118.         }
  3119.     }
  3120.     print("Time to waste all of Ed's Ka Coins :(", "blue");
  3121.  
  3122.     set_property("choiceAdventure976", "1");
  3123.     cli_execute("ccs cc_default");
  3124.  
  3125.     #This seems to work but we just want to be a little careful with it.
  3126.     if(true)
  3127.     {
  3128.         while(item_amount($item[2334]) == 0)
  3129.         {
  3130.             ccAdv(1, $location[The Lower Chambers]);
  3131.         }
  3132.     }
  3133.     else
  3134.     {
  3135.         visit_url("place.php?whichplace=pyramid&action=pyramid_state1a");
  3136.         visit_url("choice.php?pwd&whichchoice=976&option=1&choiceform1=If+you+say+so...&pwd="+my_hash());
  3137.         visit_url("fight.php");
  3138.         int x = 0;
  3139.         while(x < 7)
  3140.         {
  3141.             x = x + 1;
  3142.             run_combat();
  3143.             #ccAdv(1, $location[Noob Cave]);
  3144.             if(x < 7)
  3145.             {
  3146.                 visit_url("fight.php");
  3147.             }
  3148.         }
  3149.     }
  3150.  
  3151.     #if(item_amount($item[Holy MacGuffin]) != 0)
  3152.     if(item_amount($item[2334]) != 0)
  3153.     {
  3154.         set_property("cc_mcmuffin", "finished");
  3155.         cli_execute("ccs null");
  3156.         council();
  3157.     }
  3158.     return true;
  3159. }
  3160.  
  3161. boolean L12_sonofaFinish()
  3162. {
  3163.     if(get_property("cc_sonata") == "finished")
  3164.     {
  3165.         return false;
  3166.     }
  3167.     if(item_amount($item[barrel of gunpowder]) < 5)
  3168.     {
  3169.         return false;
  3170.     }
  3171.     if(get_property("cc_hippyInstead").to_boolean() && (get_property("fratboysDefeated").to_int() < 64))
  3172.     {
  3173.         return false;
  3174.     }
  3175.  
  3176.     warOutfit();
  3177.     visit_url("bigisland.php?place=lighthouse&action=pyro&pwd");
  3178.     visit_url("bigisland.php?place=lighthouse&action=pyro&pwd");
  3179.     set_property("cc_sonata", "finished");
  3180.     return true;
  3181. }
  3182.  
  3183.  
  3184.  
  3185. boolean L12_gremlinStart()
  3186. {
  3187.     if(my_level() < 12)
  3188.     {
  3189.         return false;
  3190.     }
  3191.     if(get_property("cc_gremlins") != "")
  3192.     {
  3193.         return false;
  3194.     }
  3195.     print("Gremlin prep", "blue");
  3196.     if(get_property("cc_hippyInstead").to_boolean())
  3197.     {
  3198.         if(!possessEquipment($item[Reinforced Beaded Headband]))
  3199.         {
  3200.             pullXWhenHaveY($item[Reinforced Beaded Headband], 1, 0);
  3201.         }
  3202.         if(!possessEquipment($item[Bullet-Proof Corduroys]))
  3203.         {
  3204.             pullXWhenHaveY($item[Bullet-Proof Corduroys], 1, 0);
  3205.         }
  3206.         if(!possessEquipment($item[Round Purple Sunglasses]))
  3207.         {
  3208.             pullXWhenHaveY($item[Round Purple Sunglasses], 1, 0);
  3209.         }
  3210.     }
  3211.  
  3212.     if((!possessEquipment($item[Ouija Board\, Ouija Board])) && (item_amount($item[Lump of Brituminous Coal]) > 0))
  3213.     {
  3214.         while(item_amount($item[turtle totem]) == 0)
  3215.         {
  3216.             buyUpTo(1, $item[chewing gum on a string]);
  3217.             use(1, $item[chewing gum on a string]);
  3218.         }
  3219.         craft("smith", 1, $item[lump of Brituminous coal], $item[turtle totem]);
  3220.         while(item_amount($item[turtle totem]) == 0)
  3221.         {
  3222.             buyUpTo(1, $item[chewing gum on a string]);
  3223.             use(1, $item[chewing gum on a string]);
  3224.         }
  3225.     }
  3226.     if((item_amount($item[louder than bomb]) == 0) && (item_amount($item[Lump of Brituminous Coal]) > 0))
  3227.     {
  3228.         buyUpTo(1, $item[Ben-Gal&trade; Balm]);
  3229.         cli_execute("make louder than bomb");
  3230. #       craft("paste", 1, $item[Ben-Gal&trade; Balm], $item[Handful of Smithereens]);
  3231.     }
  3232.     set_property("cc_gremlins", "start");
  3233.     set_property("cc_gremlinclap", "");
  3234.     set_property("cc_gremlinbatter", "");
  3235.     set_property("cc_gremlinpants", "");
  3236.     set_property("cc_gremlinlouder", "");
  3237.     return true;
  3238. }
  3239.  
  3240. boolean L12_gremlins()
  3241. {
  3242.     if(get_property("cc_gremlins") != "start")
  3243.     {
  3244.         return false;
  3245.     }
  3246.     if(get_property("sidequestJunkyardCompleted") != "none")
  3247.     {
  3248.         return false;
  3249.     }
  3250.     if(get_property("cc_hippyInstead").to_boolean() && (get_property("fratboysDefeated").to_int() < 192))
  3251.     {
  3252.         return false;
  3253.     }
  3254.  
  3255.     #Put a different shield in here.
  3256.     print("Doing them gremlins", "blue");
  3257.     if(item_amount($item[Ouija Board\, Ouija Board]) > 0)
  3258.     {
  3259.         equip($item[Ouija Board\, Ouija Board]);
  3260.     }
  3261.     if(item_amount($item[Reinforced Beaded Headband]) > 0)
  3262.     {
  3263.         equip($item[Reinforced Beaded Headband]);
  3264.     }
  3265.     useCocoon();
  3266.  
  3267.     handleInitFamiliar();
  3268.     if(item_amount($item[molybdenum hammer]) == 0)
  3269.     {
  3270.         ccAdv(1, $location[Next to that barrel with something burning in it], "ccsJunkyard");
  3271.         return true;
  3272.     }
  3273.  
  3274.     if(item_amount($item[molybdenum screwdriver]) == 0)
  3275.     {
  3276.         ccAdv(1, $location[Out by that rusted-out car], "ccsJunkyard");
  3277.         return true;
  3278.     }
  3279.  
  3280.     if(item_amount($item[molybdenum crescent wrench]) == 0)
  3281.     {
  3282.         ccAdv(1, $location[over where the old tires are], "ccsJunkyard");
  3283.         return true;
  3284.     }
  3285.  
  3286.     if(item_amount($item[molybdenum pliers]) == 0)
  3287.     {
  3288.         ccAdv(1, $location[near an abandoned refrigerator], "ccsJunkyard");
  3289.         return true;
  3290.     }
  3291.     handleFamiliar($familiar[Adventurous Spelunker]);
  3292.     warOutfit();
  3293.     visit_url("bigisland.php?action=junkman&pwd");
  3294.     set_property("cc_gremlins", "finished");
  3295.     return true;
  3296. }
  3297.  
  3298. boolean L12_sonofaBeach()
  3299. {
  3300.     if(my_level() < 12)
  3301.     {
  3302.         return false;
  3303.     }
  3304.     if(get_property("cc_sonata") == "finished")
  3305.     {
  3306.         return false;
  3307.     }
  3308.     if(!get_property("cc_hippyInstead").to_boolean())
  3309.     {
  3310.         if(get_property("cc_gremlins") != "finished")
  3311.         {
  3312.             return false;
  3313.         }
  3314.     }
  3315.     else if(get_property("fratboysDefeated").to_int() < 64)
  3316.     {
  3317.         return false;
  3318.     }
  3319.     if(item_amount($item[barrel of gunpowder]) >= 5)
  3320.     {
  3321.         return false;
  3322.     }
  3323. #   Probably bad exclusions here.
  3324. #   if(have_skill($skill[Rain Man]))
  3325. #   {
  3326. #       return false;
  3327. #   }
  3328. #   if(!get_property("cc_100familiar").to_boolean())
  3329. #   {
  3330. #       return false;
  3331. #   }
  3332.  
  3333.     if(get_property("sidequestLighthouseCompleted") != "none")
  3334.     {
  3335.         set_property("cc_sonata", "finished");
  3336.         return true;
  3337.     }
  3338.  
  3339.  
  3340.     if(!uneffect($effect[The Sonata of Sneakiness]))
  3341.     {
  3342.         return false;
  3343.     }
  3344.     if((my_class() == $class[Ed]) && (item_amount($item[Talisman of Horus]) == 0))
  3345.     {
  3346.         return false;
  3347.     }
  3348.  
  3349.     if(!uneffect($effect[Shelter of Shed]))
  3350.     {
  3351.         print("Can not uneffect Shelter of Shed for the Lobsterfrogman, delaying");
  3352.         return false;
  3353.     }
  3354.     buffMaintain($effect[Taunt of Horus], 0, 1, 1);
  3355.     buffMaintain($effect[Hippy Stench], 0, 1, 1);
  3356.     buffMaintain($effect[Musk of the Moose], 0, 1, 10);
  3357.     buffMaintain($effect[Carlweather\'s Cantata of Confrontation], 0, 1, 10);
  3358.     if(have_familiar($familiar[Grim Brother]))
  3359.     {
  3360.         handleBjornify($familiar[Grim Brother]);
  3361.     }
  3362.     if(equipped_item($slot[hat]) == $item[Xiblaxian stealth cowl])
  3363.     {
  3364.         equip($item[Beer Helmet]);
  3365.     }
  3366.     if(equipped_item($slot[acc1]) == $item[over-the-shoulder folder holder])
  3367.     {
  3368.         equip($slot[acc1], $item[bejeweled pledge pin]);
  3369.     }
  3370.     if(item_amount($item[portable cassette player]) > 0)
  3371.     {
  3372.         equip($slot[acc2], $item[portable cassette player]);
  3373.     }
  3374.     handleFamiliar($familiar[Jumpsuited Hound Dog]);
  3375.  
  3376.     if(item_amount($item[barrel of gunpowder]) < 4)
  3377.     {
  3378.         set_property("cc_doCombatCopy", "yes");
  3379.     }
  3380.     ccAdv(1, $location[Sonofa Beach]);
  3381.     set_property("cc_doCombatCopy", "no");
  3382.  
  3383.     if((my_class() == $class[Ed]) && (my_hp() == 0))
  3384.     {
  3385.         use(1, $item[Linen Bandages]);
  3386.     }
  3387.     return true;
  3388. }
  3389.  
  3390. boolean L12_filthworms()
  3391. {
  3392.     if(my_level() < 12)
  3393.     {
  3394.         return false;
  3395.     }
  3396.     if(item_amount($item[Heart of the Filthworm Queen]) > 0)
  3397.     {
  3398.         set_property("cc_orchard", "done");
  3399.     }
  3400.     if(get_property("cc_orchard") != "start")
  3401.     {
  3402.         return false;
  3403.     }
  3404.     print("Doing the orchard.", "blue");
  3405.  
  3406.     if(item_amount($item[Filthworm Hatchling Scent Gland]) > 0)
  3407.     {
  3408.         use(1, $item[Filthworm Hatchling Scent Gland]);
  3409.     }
  3410.     if(item_amount($item[Filthworm Drone Scent Gland]) > 0)
  3411.     {
  3412.         use(1, $item[Filthworm Drone Scent Gland]);
  3413.     }
  3414.     if(item_amount($item[Filthworm Royal Guard Scent Gland]) > 0)
  3415.     {
  3416.         use(1, $item[Filthworm Royal Guard Scent Gland]);
  3417.     }
  3418.  
  3419.     if(have_effect($effect[Filthworm Guard Stench]) > 0)
  3420.     {
  3421.         ccAdv(1, $location[The Filthworm Queen\'s Chamber]);
  3422.         if(item_amount($item[Heart of the Filthworm Queen]) > 0)
  3423.         {
  3424.             set_property("cc_orchard", "done");
  3425.         }
  3426.         return true;
  3427.     }
  3428.  
  3429.     if(!have_skill($skill[Lash of the Cobra]))
  3430.     {
  3431.         buffMaintain($effect[Joyful Resolve], 0, 1, 1);
  3432.         buffMaintain($effect[Kindly Resolve], 0, 1, 1);
  3433.         buffMaintain($effect[Fortunate Resolve], 0, 1, 1);
  3434.         buffMaintain($effect[One Very Clear Eye], 0, 1, 1);
  3435.         buffMaintain($effect[Human-Fish Hybrid], 0, 1, 1);
  3436.         buffMaintain($effect[Human-Human Hybrid], 0, 1, 1);
  3437.         buffMaintain($effect[Human-Machine Hybrid], 0, 1, 1);
  3438.  
  3439.         if(get_property("cc_dickstab").to_boolean())
  3440.         {
  3441.             buffMaintain($effect[Wet and Greedy], 0, 1, 1);
  3442.         }
  3443.         buffMaintain($effect[Frosty], 0, 1, 1);
  3444.     }
  3445.  
  3446.     if((!possessEquipment($item[A Light That Never Goes Out])) && (item_amount($item[Lump of Brituminous Coal]) > 0))
  3447.     {
  3448.         buyUpTo(1, $item[third-hand lantern]);
  3449.         craft("smith", 1, $item[Lump of Brituminous Coal], $item[third-hand lantern]);
  3450.     }
  3451.  
  3452.     if(possessEquipment($item[A Light That Never Goes Out]))
  3453.     {
  3454.         if(weapon_hands(equipped_item($slot[weapon])) != 1)
  3455.         {
  3456.             equip($slot[weapon], $item[none]);
  3457.         }
  3458.         equip($item[A Light That Never Goes Out]);
  3459.     }
  3460.  
  3461.     handleFamiliar($familiar[Adventurous Spelunker]);
  3462.  
  3463.     if(have_effect($effect[Filthworm Drone Stench]) > 0)
  3464.     {
  3465.         ccAdv(1, $location[The Royal Guard Chamber]);
  3466.         return true;
  3467.     }
  3468.     if(have_effect($effect[Filthworm Larva Stench]) > 0)
  3469.     {
  3470.         ccAdv(1, $location[The Feeding Chamber]);
  3471.         return true;
  3472.     }
  3473.     ccAdv(1, $location[The Hatching Chamber]);
  3474.     return true;
  3475. }
  3476.  
  3477. boolean tryCookies()
  3478. {
  3479.     string cookie = get_counters("Fortune Cookie", 0, 200);
  3480.     if(cookie == "Fortune Cookie")
  3481.     {
  3482.         return true;
  3483.     }
  3484.     if(my_fullness() < 12)
  3485.     {
  3486.         return false;
  3487.     }
  3488.     while((fullness_limit() - my_fullness()) > 0)
  3489.     {
  3490.         buyUpTo(1, $item[Fortune Cookie]);
  3491.         if(item_amount($item[Mayoflex]) > 0)
  3492.         {
  3493.             use(1, $item[Mayoflex]);
  3494.         }
  3495.         eatsilent(1, $item[Fortune Cookie]);
  3496.         cookie = get_counters("Fortune Cookie", 0, 200);
  3497.         if(cookie == "Fortune Cookie")
  3498.         {
  3499.             return true;
  3500.         }
  3501.     }
  3502.     return false;
  3503. }
  3504.  
  3505. boolean tryPantsEat()
  3506. {
  3507.     if((fullness_limit() - my_fullness()) > 0)
  3508.     {
  3509.         if(item_amount($item[Mayoflex]) > 0)
  3510.         {
  3511.             use(1, $item[Mayoflex]);
  3512.         }
  3513.         if(item_amount($item[tasty tart]) > 0)
  3514.         {
  3515.             eatsilent(1, $item[tasty tart]);
  3516.             return true;
  3517.         }
  3518.         if(item_amount($item[deviled egg]) > 0)
  3519.         {
  3520.             eatsilent(1, $item[deviled egg]);
  3521.             return true;
  3522.         }
  3523.         if(item_amount($item[cold mashed potatoes]) > 0)
  3524.         {
  3525.             eatsilent(1, $item[cold mashed potatoes]);
  3526.             return true;
  3527.         }
  3528.         if(item_amount($item[dinner roll]) > 0)
  3529.         {
  3530.             eatsilent(1, $item[dinner roll]);
  3531.             return true;
  3532.         }
  3533.         if(item_amount($item[whole turkey leg]) > 0)
  3534.         {
  3535.             eatsilent(1, $item[whole turkey leg]);
  3536.             return true;
  3537.         }
  3538.         if(item_amount($item[can of sardines]) > 0)
  3539.         {
  3540.             eatsilent(1, $item[can of sardines]);
  3541.             return true;
  3542.         }
  3543.         if(item_amount($item[high-calorie sugar substitute]) > 0)
  3544.         {
  3545.             eatsilent(1, $item[high-calorie sugar substitute]);
  3546.             return true;
  3547.         }
  3548.         if(item_amount($item[pat of butter]) > 0)
  3549.         {
  3550.             eatsilent(1, $item[pat of butter]);
  3551.             return true;
  3552.         }
  3553.     }
  3554.     return false;
  3555. }
  3556.  
  3557.  
  3558. void consumeStuff()
  3559. {
  3560.     if(ed_eatStuff())
  3561.     {
  3562.         return;
  3563.     }
  3564.     if(get_property("kingLiberated") != false)
  3565.     {
  3566.         return;
  3567.     }
  3568.  
  3569.     int mpForOde = 50;
  3570.     if(!have_skill($skill[The Ode to Booze]))
  3571.     {
  3572.         mpForOde = 0;
  3573.     }
  3574.  
  3575.     if(my_daycount() == 1)
  3576.     {
  3577.         if((my_spleen_use() == 0) && (item_amount($item[grim fairy tale]) > 0))
  3578.         {
  3579.             chew(1, $item[grim fairy tale]);
  3580.             set_property("cc_grimfairytale", "1");
  3581.         }
  3582.  
  3583.         //  Try to drink more on day 1 please!
  3584.  
  3585.         if((my_meat() > 400) && (item_amount($item[handful of smithereens]) == 3) && (get_property("cc_mosquito") == "finished"))
  3586.         {
  3587.             cli_execute("make 3 paint a vulgar pitcher");
  3588.         }
  3589.  
  3590.         if(((my_inebriety() + 2) < inebriety_limit()) && (my_mp() >= mpForOde) && (item_amount($item[Agitated Turkey]) >= 2))
  3591.         {
  3592.             shrugAT();
  3593.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3594.             drink(2, $item[Agitated Turkey]);
  3595.         }
  3596.  
  3597.         if(((my_inebriety() + 1) == inebriety_limit()) && (my_mp() >= mpForOde) && (item_amount($item[Cold One]) >= 1) && (my_level() >= 11))
  3598.         {
  3599.             shrugAT();
  3600.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3601.             drink(1, $item[Cold One]);
  3602.         }
  3603.  
  3604.         if((my_spleen_use() <= 7) && (my_level() >= 10) && (my_adventures() < 3) && (item_amount($item[astral energy drink]) > 0))
  3605.         {
  3606.             chew(1, $item[astral energy drink]);
  3607.         }
  3608.  
  3609.         if((my_mp() > mpForOde) && (my_meat() > 400) && (my_level() >= 3) && (item_amount($item[paint a vulgar pitcher]) > 0) && ((my_inebriety() + 2) <= inebriety_limit()))
  3610.         {
  3611.             shrugAT();
  3612.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3613.             drink(1, $item[paint a vulgar pitcher]);
  3614.             if(item_amount($item[paint a vulgar pitcher]) > 0)
  3615.             {
  3616.                 drink(1, $item[paint a vulgar pitcher]);
  3617.             }
  3618.         }
  3619.  
  3620.         if((my_mp() > mpForOde) && get_property("cc_100familiar").to_boolean() && (my_inebriety() == 0) && (my_meat() >= 500))
  3621.         {
  3622.             shrugAT();
  3623.             buffMaintain($effect[Ode to Booze], 50, 1, 1);
  3624.             cli_execute("drink 1 lucky lindy");
  3625.  
  3626.             pullXWhenHaveY($item[ice island long tea], 1, 0);
  3627.             drink(1, $item[Ice Island Long Tea]);
  3628.         }
  3629.  
  3630.         if((my_mp() > mpForOde) && get_property("cc_100familiar").to_boolean() && (my_inebriety() == 13) && (item_amount($item[Cold One]) > 0) && (my_level() >= 10))
  3631.         {
  3632.             shrugAT();
  3633.             buffMaintain($effect[Ode to Booze], 50, 1, 1);
  3634.             drink(1, $item[Cold One]);
  3635.         }
  3636.  
  3637.         if((my_mp() > mpForOde) && (amountTurkeyBooze() >= 2) && (my_inebriety() == 0) && (my_meat() >= 500))
  3638.         {
  3639.             shrugAT();
  3640.             buffMaintain($effect[Ode to Booze], 50, 1, 3);
  3641.             cli_execute("drink 1 lucky lindy");
  3642.             print("drink 1 lucky lindy");
  3643.             while((amountTurkeyBooze() > 0) && (my_inebriety() < 3))
  3644.             {
  3645.                 if(item_amount($item[Friendly Turkey]) > 0)
  3646.                 {
  3647.                     drink(1, $item[Friendly Turkey]);
  3648.                 }
  3649.                 else if(item_amount($item[Agitated Turkey]) > 0)
  3650.                 {
  3651.                     drink(1, $item[Agitated Turkey]);
  3652.                 }
  3653.                 else if(item_amount($item[Ambitious Turkey]) > 0)
  3654.                 {
  3655.                     drink(1, $item[Ambitious Turkey]);
  3656.                 }
  3657.             }
  3658.         }
  3659.  
  3660.         if((my_mp() > mpForOde) && (turkeyBooze() >= 5) && (amountTurkeyBooze() >= 3) && (my_inebriety() < 6))
  3661.         {
  3662.             shrugAT();
  3663.             buffMaintain($effect[Ode to Booze], 50, 1, 3);
  3664.             while((amountTurkeyBooze() > 0) && (my_inebriety() < 6))
  3665.             {
  3666.                 if(item_amount($item[Friendly Turkey]) > 0)
  3667.                 {
  3668.                     drink(1, $item[Friendly Turkey]);
  3669.                 }
  3670.                 else if(item_amount($item[Agitated Turkey]) > 0)
  3671.                 {
  3672.                     drink(1, $item[Agitated Turkey]);
  3673.                 }
  3674.                 else if(item_amount($item[Ambitious Turkey]) > 0)
  3675.                 {
  3676.                     drink(1, $item[Ambitious Turkey]);
  3677.                 }
  3678.             }
  3679.         }
  3680.  
  3681. #       int sockdollagerDrunk = 6;
  3682. #       if(get_property("cc_100familiar").to_boolean())
  3683. #       {
  3684. #           sockdollagerDrunk = 5;
  3685. #       }
  3686.  
  3687. #       if((get_property("cc_bat") == "finished") && (get_property("_speakeasyDrinksDrunk") != "1") && (my_mp() > 50))
  3688. #       if((get_property("cc_ballroomsong") == "set") && (get_property("_speakeasyDrinksDrunk").to_int() == 1) && (my_mp() > mpForOde) && (my_inebriety() == sockdollagerDrunk))
  3689.         if((get_property("cc_ballroomsong") == "set") && (get_property("_speakeasyDrinksDrunk").to_int() == 1) && (my_mp() >= (mpForOde+30)) && ((my_inebriety() + 2) <= inebriety_limit()))
  3690.         {
  3691.             shrugAT();
  3692.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3693.             visit_url("clan_viplounge.php?action=speakeasy");
  3694.             cli_execute("drink 1 sockdollager");
  3695.             print("drink 1 sockdollager");
  3696. #           cli_execute("get _speakeasyDrinksDrunk ");
  3697.             print("Second speakeasy drink down!");
  3698.             hermit(10, $item[ten-leaf clover]);
  3699.         }
  3700.  
  3701.         if((my_adventures() < 4) && (my_fullness() == 0) && (my_level() >= 7))
  3702.         {
  3703.             dealWithMilkOfMagnesium(true);
  3704.             buffMaintain($effect[Got Milk], 0, 1, 1);
  3705.             if(item_amount($item[Spaghetti Breakfast]) > 0)
  3706.             {
  3707.                 ccEat(1, $item[Spaghetti Breakfast]);
  3708.             }
  3709.             pullXWhenHaveY(whatHiMein(), 2, 0);
  3710.             ccEat(2, whatHiMein());
  3711.             if(item_amount($item[digital key lime pie]) > 0)
  3712.             {
  3713.                 ccEat(1, $item[digital key lime pie]);
  3714.                 tryPantsEat();
  3715.             }
  3716.             else
  3717.             {
  3718.                 if(my_fullness() == 10)
  3719.                 {
  3720.                     pullXWhenHaveY(whatHiMein(), 1, 0);
  3721.                     ccEat(1, whatHiMein());
  3722.                 }
  3723.                 else
  3724.                 {
  3725.                     pullXWhenHaveY($item[Digital Key Lime Pie], 1, 0);
  3726.                     ccEat(1, $item[Digital Key Lime Pie]);
  3727.                 }
  3728.             }
  3729.         }
  3730.  
  3731.         if((my_adventures() < 4) && (my_fullness() == 0) && (my_level() >= 6) && (item_amount($item[Boris\'s Key Lime Pie]) > 0) && (item_amount($item[Jarlsberg\'s Key Lime Pie]) > 0) && (item_amount($item[Sneaky Pete\'s Key Lime Pie]) > 0))
  3732.         {
  3733.             dealWithMilkOfMagnesium(true);
  3734.             buffMaintain($effect[Got Milk], 0, 1, 1);
  3735.             ccEat(1, $item[Boris\'s Key Lime Pie]);
  3736.             ccEat(1, $item[Jarlsberg\'s Key Lime Pie]);
  3737.             ccEat(1, $item[Sneaky Pete\'s Key Lime Pie]);
  3738.             tryPantsEat();
  3739.             tryPantsEat();
  3740.             tryPantsEat();
  3741.         }
  3742.  
  3743.         if((fullness_limit() > 15) && (my_fullness() < fullness_limit()))
  3744.         {
  3745.             tryCookies();
  3746.             if((my_adventures() < 5) && (my_spleen_use() == 15) && (my_inebriety() >= 14))
  3747.             {
  3748.                 tryPantsEat();
  3749.             }
  3750.         }
  3751.  
  3752.         if((my_spleen_use() == 4) && (item_amount($item[carrot nose]) > 0))
  3753.         {
  3754.             use(1, $item[carrot nose]);
  3755.             chew(1, $item[carrot juice]);
  3756.             while ((my_spleen_use() <= 12) && (item_amount($item[Unconscious Collective Dream Jar]) > 0))
  3757.             {
  3758.                 chew(1, $item[Unconscious Collective Dream Jar]);
  3759.             }
  3760.         }
  3761.  
  3762.         if(((my_spleen_use() >= 4) && (my_spleen_use() < 7)) || ((my_spleen_use() >= 12) && (my_spleen_use() < 15)))
  3763.         {
  3764.             if(item_amount($item[tenderizing hammer]) == 0)
  3765.             {
  3766.                 buyUpTo(1, $item[tenderizing hammer]);
  3767.             }
  3768.             pulverizeThing($item[oversized pizza cutter]);
  3769.             pulverizeThing($item[giant artisanal rice peeler]);
  3770.             pulverizeThing($item[magilaser blastercannon]);
  3771.             pulverizeThing($item[giant discarded bottlecap]);
  3772.             pulverizeThing($item[spiked femur]);
  3773.             pulverizeThing($item[broken sword]);
  3774.             pulverizeThing($item[curmudgel]);
  3775.             pulverizeThing($item[giant turkey leg]);
  3776.             pulverizeThing($item[glowing red eye]);
  3777.             if(item_amount($item[hot wad]) > 0)
  3778.             {
  3779.                 chew(1, $item[hot wad]);
  3780.             }
  3781.             else if(item_amount($item[stench wad]) > 0)
  3782.             {
  3783.                 chew(1, $item[stench wad]);
  3784.             }
  3785.             else if(item_amount($item[twinkly wad]) > 0)
  3786.             {
  3787.                 chew(1, $item[twinkly wad]);
  3788.             }
  3789.             else if((item_amount($item[twinkly nuggets]) >= 5) && ((my_class() == $class[Seal Clubber]) || (my_class() == $class[Turtle Tamer])))
  3790.             {
  3791.                 cli_execute("make 1 twinkly wad");
  3792.                 chew(1, $item[twinkly wad]);
  3793.             }
  3794.         }
  3795.  
  3796.         if((my_fullness() >= 15) && ((my_spleen_use() == 7) || (my_level() == 10)) && (my_inebriety() >= 14) && (my_adventures() < 5))
  3797.         {
  3798.             if(item_amount($item[astral energy drink]) > 0)
  3799.             {
  3800.                 chew(1, $item[astral energy drink]);
  3801.             }
  3802.         }
  3803.     }
  3804.     else if(my_daycount() == 2)
  3805.     {
  3806.         if((my_level() >= 7) && (my_fullness() == 0) && ((my_adventures() < 10) || (get_counters("Fortune Cookie", 0, 5) == "Fortune Cookie") || (get_counters("Fortune Cookie", 0, 200) != "Fortune Cookie") || (get_property("middleChamberUnlock").to_boolean())))
  3807.         {
  3808.             dealWithMilkOfMagnesium(true);
  3809.             buffMaintain($effect[Got Milk], 0, 1, 1);
  3810.  
  3811.             if(towerKeyCount() == 3)
  3812.             {
  3813.                 ccEat(3, whatHiMein());
  3814.             }
  3815.             if(get_property("cc_useCubeling").to_boolean())
  3816.             {
  3817.                 int count = towerKeyCount();
  3818.                 if(get_property("cc_phatloot").to_int() < my_daycount())
  3819.                 {
  3820.                     count = count + 1;
  3821.                 }
  3822.                 if(count >= 2)
  3823.                 {
  3824.                     if(item_amount($item[Spaghetti Breakfast]) > 0)
  3825.                     {
  3826.                         if(item_amount($item[Mayoflex]) > 0)
  3827.                         {
  3828.                             use(1, $item[Mayoflex]);
  3829.                         }
  3830.                         ccEat(1, $item[Spaghetti Breakfast]);
  3831.                     }
  3832.                     pullXWhenHaveY($item[Boris\'s Key Lime Pie], 1, 0);
  3833.                     if(item_amount($item[Boris\'s Key Lime Pie]) > 0)
  3834.                     {
  3835.                         if(item_amount($item[Mayoflex]) > 0)
  3836.                         {
  3837.                             use(1, $item[Mayoflex]);
  3838.                         }
  3839.                         ccEat(1, $item[Boris\'s Key Lime Pie]);
  3840.                     }
  3841.                     pullXWhenHaveY(whatHiMein(), 2, 0);
  3842.                     if(item_amount(whatHiMein()) > 0)
  3843.                     {
  3844.                         if(item_amount($item[Mayoflex]) > 0)
  3845.                         {
  3846.                             use(1, $item[Mayoflex]);
  3847.                         }
  3848.                         ccEat(1, whatHiMein());
  3849.                     }
  3850.                     if(item_amount(whatHiMein()) > 0)
  3851.                     {
  3852.                         if(item_amount($item[Mayoflex]) > 0)
  3853.                         {
  3854.                             use(1, $item[Mayoflex]);
  3855.                         }
  3856.                         ccEat(1, whatHiMein());
  3857.                     }
  3858.                 }
  3859.             }
  3860.             else if(!get_property("cc_useCubeling").to_boolean())
  3861.             {
  3862.                 ccEat(1, $item[Boris\'s Key Lime Pie]);
  3863.                 ccEat(1, $item[Jarlsberg\'s Key Lime Pie]);
  3864.                 ccEat(1, $item[Sneaky Pete\'s Key Lime Pie]);
  3865.                 #cli_execute("eat 1 video games hot dog");
  3866.                 if(my_fullness() != 15)
  3867.                 {
  3868.                     tryPantsEat();
  3869.                     tryPantsEat();
  3870.                     tryPantsEat();
  3871.                 }
  3872.             }
  3873.         }
  3874.  
  3875.         if((fullness_limit() >= 15) && (my_fullness() < fullness_limit()))
  3876.         {
  3877.             tryCookies();
  3878.             if((my_adventures() < 5) && (my_spleen_use() == 15) && (my_inebriety() >= 14))
  3879.             {
  3880.                 tryPantsEat();
  3881.             }
  3882.         }
  3883.  
  3884.         if((my_inebriety() == 0) && (my_mp() >= mpForOde) && (item_amount($item[handful of smithereens]) >= 2))
  3885.         {
  3886.             shrugAT();
  3887.             buffMaintain($effect[Ode to Booze], 50, 1, 4);
  3888.             cli_execute("make 2 paint a vulgar pitcher");
  3889.             drink(2, $item[paint a vulgar pitcher]);
  3890.         }
  3891.  
  3892.         if((my_inebriety() == 4) && (my_mp() >= mpForOde) && (item_amount($item[handful of smithereens]) >= 1))
  3893.         {
  3894.             shrugAT();
  3895.             cli_execute("make 1 paint a vulgar pitcher");
  3896.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3897.             drink(1, $item[paint a vulgar pitcher]);
  3898.         }
  3899.  
  3900.         if((my_inebriety() <= 9) && (my_adventures() < 10) && (my_mp() >= mpForOde))
  3901.         {
  3902.             shrugAT();
  3903.             buffMaintain($effect[Ode to Booze], 50, 1, 4);
  3904.             if(item_amount($item[handful of smithereens]) > 0)
  3905.             {
  3906.                 cli_execute("make 1 paint a vulgar pitcher");
  3907.                 drink(1, $item[paint a vulgar pitcher]);
  3908.             }
  3909.             else if(my_meat() > 35000)
  3910.             {
  3911.                 visit_url("clan_viplounge.php?action=speakeasy");
  3912.                 cli_execute("drink flivver");
  3913.             }
  3914.         }
  3915.  
  3916.         if((get_property("cc_nunsTrick") == "got") && (get_property("currentNunneryMeat").to_int() < 100000))
  3917.         {
  3918.             if((get_property("cc_mcmuffin") == "ed") || (get_property("cc_mcmuffin") == "finished"))
  3919.             {
  3920.                 if((my_inebriety() >= 6) && (my_inebriety() <= 11) && (my_mp() >= mpForOde))
  3921.                 {
  3922.                     if(item_amount($item[ambitious turkey]) > 0)
  3923.                     {
  3924.                         shrugAT();
  3925.                         buffMaintain($effect[Ode to Booze], 50, 1, 1);
  3926.                         drink(1, $item[ambitious turkey]);
  3927.                     }
  3928.                 }
  3929.             }
  3930.         }
  3931.  
  3932.         if((my_level() >= 11) && (my_mp() > mpForOde) && (item_amount($item[Cold One]) > 1) && ((my_inebriety() + 2) <= inebriety_limit()))
  3933.         {
  3934.             shrugAT();
  3935.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3936.             drink(2, $item[Cold One]);
  3937.         }
  3938.  
  3939.         if((my_inebriety() >= 6) && (my_inebriety() <= 11) && (get_property("cc_orchard") == "finished") && (my_mp() >= mpForOde))
  3940.         {
  3941.             if((get_property("cc_nuns") != "finished") && (get_property("cc_nuns") != "done") && (get_property("currentNunneryMeat").to_int() == 0))
  3942.             {
  3943.                 if(item_amount($item[ambitious turkey]) > 0)
  3944.                 {
  3945.                     shrugAT();
  3946.                     buffMaintain($effect[Ode to Booze], 50, 1, 1);
  3947.                     drink(1, $item[ambitious turkey]);
  3948.                 }
  3949.             }
  3950.         }
  3951.  
  3952.         if((my_path() == "Picky") && (my_mp() > mpForOde) && (item_amount($item[paint a vulgar pitcher]) > 0) && ((my_inebriety() + 2) <= inebriety_limit()))
  3953.         {
  3954.             shrugAT();
  3955.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  3956.             drink(1, $item[paint a vulgar pitcher]);
  3957.         }
  3958.  
  3959.  
  3960.         if((my_path() == "Picky") && (my_mp() > mpForOde) && (item_amount($item[Ambitious Turkey]) > 0) && ((my_inebriety() + 1) <= inebriety_limit()))
  3961.         {
  3962.             shrugAT();
  3963.             buffMaintain($effect[Ode to Booze], 50, 1, 1);
  3964.             drink(1, $item[Ambitious Turkey]);
  3965.         }
  3966.  
  3967.         if((my_path() == "Picky") && (my_mp() > mpForOde) && (my_inebriety() <= inebriety_limit()) && (my_meat() > 500) && (get_property("_speakeasyDrinksDrunk").to_int() < 3))
  3968.         {
  3969.             # We could check for good drinks here but I don't know what would be good checks
  3970.             int canDrink = inebriety_limit() - my_inebriety();
  3971.  
  3972.             #Consider Ish Kabibble for A-Boo Peak (2)
  3973.             visit_url("clan_viplounge.php?action=speakeasy");
  3974.  
  3975.             #item toDrink = $item[none];
  3976.             string toDrink = "";
  3977.             if(canDrink >= 2)
  3978.             {
  3979.                 toDrink = "Bee's Knees";
  3980.             }
  3981.             else if(canDrink >= 1)
  3982.             {
  3983.                 toDrink = "glass of \"milk\"";
  3984.             }
  3985.  
  3986.             #if(toDrink != $item[none])
  3987.             if(toDrink != "")
  3988.             {
  3989.                 shrugAT();
  3990.                 buffMaintain($effect[Ode to Booze], 50, 1, 4);
  3991.                 cli_execute("drink 1 " + toDrink);
  3992.                 print("drink 1 " + toDrink);
  3993.             }
  3994.         }
  3995.  
  3996. /*****  This section needs to merge into a "Standard equivalent"        *****/
  3997.         if((my_path() == "Standard") && (my_mp() >= mpForOde) && (item_amount($item[paint a vulgar pitcher]) > 0) && ((my_inebriety() + 2) <= inebriety_limit()))
  3998.         {
  3999.             shrugAT();
  4000.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  4001.             drink(1, $item[paint a vulgar pitcher]);
  4002.         }
  4003.  
  4004.  
  4005.         if((my_path() == "Standard") && (my_mp() >= mpForOde) && (item_amount($item[Ambitious Turkey]) > 0) && ((my_inebriety() + 1) <= inebriety_limit()))
  4006.         {
  4007.             shrugAT();
  4008.             buffMaintain($effect[Ode to Booze], 50, 1, 1);
  4009.             drink(1, $item[Ambitious Turkey]);
  4010.         }
  4011.  
  4012.         if((my_path() == "Standard") && (my_mp() >= mpForOde) && (my_inebriety() <= inebriety_limit()) && (my_meat() > 500) && (get_property("_speakeasyDrinksDrunk").to_int() < 3))
  4013.         {
  4014.             # We could check for good drinks here but I don't know what would be good checks
  4015. #           int canDrink = inebriety_limit() - my_inebriety();
  4016.  
  4017.             #Consider Ish Kabibble for A-Boo Peak (2)
  4018. #           visit_url("clan_viplounge.php?action=speakeasy");
  4019.  
  4020.             #item toDrink = $item[none];
  4021. #           string toDrink = "";
  4022. #           if(canDrink >= 2)
  4023. #           {
  4024. #               toDrink = "Bee's Knees";
  4025. #           }
  4026. #           else if(canDrink >= 1)
  4027. #           {
  4028. #               toDrink = "glass of \"milk\"";
  4029. #           }
  4030.  
  4031.             #if(toDrink != $item[none])
  4032. #           if(toDrink != "")
  4033. #           {
  4034. #               shrugAT();
  4035. #               buffMaintain($effect[Ode to Booze], 50, 1, 4);
  4036. #               cli_execute("drink 1 " + toDrink);
  4037. #               print("drink 1 " + toDrink);
  4038. #           }
  4039.         }
  4040.  
  4041.  
  4042. /*****  End of Standard equivalent secton                               *****/
  4043.  
  4044.  
  4045.         if((my_level() >= 11) && (my_spleen_use() == 0) && (item_amount($item[astral energy drink]) >= 2))
  4046.         {
  4047.             chew(1, $item[astral energy drink]);
  4048.             use(1, $item[mojo filter]);
  4049.             chew(1, $item[astral energy drink]);
  4050.         }
  4051.     }
  4052.     else if(my_daycount() == 3)
  4053.     {
  4054.         if((my_level() >= 7) && (my_fullness() == 0) && (my_adventures() < 10))
  4055.         {
  4056.             dealWithMilkOfMagnesium(true);
  4057.  
  4058.             if(item_amount($item[Star Key Lime Pie]) >= 3)
  4059.             {
  4060.                 buffMaintain($effect[Got Milk], 0, 1, 1);
  4061.                 ccEat(3, $item[Star Key Lime Pie]);
  4062.                 tryPantsEat();
  4063.                 tryPantsEat();
  4064.                 tryPantsEat();
  4065.             }
  4066.             else
  4067.             {
  4068.                 pullXWhenHaveY(whatHiMein(), 3, 0);
  4069.                 if(item_amount(whatHiMein()) >= 3)
  4070.                 {
  4071.                     buffMaintain($effect[Got Milk], 0, 1, 1);
  4072.                     eatsilent(3, whatHiMein());
  4073.                 }
  4074.             }
  4075.         }
  4076.  
  4077.         if((item_amount($item[handful of smithereens]) > 0) && (my_meat() > 300))
  4078.         {
  4079.             cli_execute("make paint a vulgar pitcher");
  4080.         }
  4081.  
  4082.         if((my_path() == "Picky") && (my_mp() > mpForOde) && (item_amount($item[paint a vulgar pitcher]) > 0) && ((my_inebriety() + 2) <= inebriety_limit()))
  4083.         {
  4084.             shrugAT();
  4085.             buffMaintain($effect[Ode to Booze], 50, 1, 2);
  4086.             drink(1, $item[paint a vulgar pitcher]);
  4087.         }
  4088.  
  4089.         if((my_path() == "Picky") && (my_mp() > mpForOde) && (item_amount($item[Ambitious Turkey]) > 0) && ((my_inebriety() + 1) <= inebriety_limit()))
  4090.         {
  4091.             shrugAT();
  4092.             buffMaintain($effect[Ode to Booze], 50, 1, 1);
  4093.             drink(1, $item[Ambitious Turkey]);
  4094.         }
  4095.     }
  4096. }
  4097.  
  4098. void handleJar()
  4099. {
  4100.     if(item_amount($item[psychoanalytic jar]) > 0)
  4101.     {
  4102.         if(contains_text(visit_url("showplayer.php?who=1"), "psychoanalytic"))
  4103.         {
  4104.             if((my_daycount() == 1) && !have_familiar($familiar[Adventurous Spelunker]))
  4105.             {
  4106.                 visit_url("showplayer.php?who=1&action=jung&whichperson=jick", true);
  4107.                 cli_execute("refresh inv");
  4108.                 if(item_amount($item[jar of psychoses (Jick)]) == 0)
  4109.                 {
  4110.                     abort("Tried to get a Jick Jar and failed (" + my_daycount() + ")");
  4111.                 }
  4112.             }
  4113.             else
  4114.             {
  4115.                 if(item_amount($item[jar of psychoses (The Crackpot Mystic)]) == 0)
  4116.                 {
  4117.                     visit_url("shop.php?whichshop=mystic&action=jung&whichperson=mystic", true);
  4118.                 }
  4119.                 else
  4120.                 {
  4121.                     visit_url("showplayer.php?who=1&action=jung&whichperson=jick", true);
  4122.                     cli_execute("refresh inv");
  4123.                     if(item_amount($item[jar of psychoses (Jick)]) == 0)
  4124.                     {
  4125.                         abort("Tried to get a Jick Jar and failed (" + my_daycount() + ")");
  4126.                     }
  4127.                 }
  4128.             }
  4129.         }
  4130.         else
  4131.         {
  4132.             if(item_amount($item[jar of psychoses (The Crackpot Mystic)]) == 0)
  4133.             {
  4134.                 visit_url("shop.php?whichshop=mystic&action=jung&whichperson=mystic", true);
  4135.             }
  4136.             else
  4137.             {
  4138.                 put_closet(1, $item[psychoanalytic jar]);
  4139.             }
  4140.         }
  4141.     }
  4142. }
  4143.  
  4144. boolean L12_nunsTrickGlandGet()
  4145. {
  4146.     if(get_property("sidequestOrchardCompleted") != "none")
  4147.     {
  4148.         return false;
  4149.     }
  4150.     if(get_property("cc_nunsTrickGland") != "start")
  4151.     {
  4152.         return false;
  4153.     }
  4154.     if(have_effect($effect[Everything looks yellow]) != 0)
  4155.     {
  4156.         return false;
  4157.     }
  4158.     if(get_property("cc_100familiar").to_boolean())
  4159.     {
  4160.         return false;
  4161.     }
  4162.     if((my_lightning() < 5) && (my_path() == "Heavy Rains"))
  4163.     {
  4164.         return false;
  4165.     }
  4166.     cli_execute("outfit war hippy fatigues");
  4167.     if(my_path() != "Heavy Rains")
  4168.     {
  4169.         handleFamiliar($familiar[Crimbo Shrub]);
  4170.         if((my_familiar() == $familiar[Crimbo Shrub]) && !get_property("_shrubDecorated").to_boolean())
  4171.         {
  4172.             visit_url("inv_use.php?pwd=&which=3&whichitem=7958");
  4173.             visit_url("choice.php?pwd=&whichchoice=999&option=1&topper=1&lights=1&garland=1&gift=1");
  4174.         }
  4175.     }
  4176.     if(item_amount($item[Filthworm Hatchling Scent Gland]) > 0)
  4177.     {
  4178.         set_property("cc_nunsTrickGland", "done");
  4179.         return true;
  4180.     }
  4181.     ccAdv(1, $location[The Hatching Chamber]);
  4182.     if(item_amount($item[Filthworm Hatchling Scent Gland]) > 0)
  4183.     {
  4184.         set_property("cc_nunsTrickGland", "done");
  4185.     }
  4186.     return true;
  4187. }
  4188.  
  4189. boolean L12_finalizeWar()
  4190. {
  4191.     if(get_property("cc_war") != "done")
  4192.     {
  4193.         return false;
  4194.     }
  4195.  
  4196.     if(have_outfit("War Hippy Fatigues"))
  4197.     {
  4198.         print("Getting dimes.", "blue");
  4199.         sell($item[padl phone].buyer, item_amount($item[padl phone]), $item[padl phone]);
  4200.         sell($item[red class ring].buyer, item_amount($item[red class ring]), $item[red class ring]);
  4201.         sell($item[blue class ring].buyer, item_amount($item[blue class ring]), $item[blue class ring]);
  4202.         sell($item[white class ring].buyer, item_amount($item[white class ring]), $item[white class ring]);
  4203.     }
  4204.     if(have_outfit("Frat Warrior Fatigues"))
  4205.     {
  4206.         print("Getting quarters.", "blue");
  4207.         sell($item[pink clay bead].buyer, item_amount($item[pink clay bead]), $item[pink clay bead]);
  4208.         sell($item[purple clay bead].buyer, item_amount($item[purple clay bead]), $item[purple clay bead]);
  4209.         sell($item[green clay bead].buyer, item_amount($item[green clay bead]), $item[green clay bead]);
  4210.         sell($item[communications windchimes].buyer, item_amount($item[communications windchimes]), $item[communications windchimes]);
  4211.     }
  4212.  
  4213.     if(!get_property("cc_hippyInstead").to_boolean())
  4214.     {
  4215.         while($coinmaster[Dimemaster].available_tokens >= 2)
  4216.         {
  4217.             cli_execute("make filthy poultice");
  4218.         }
  4219.     }
  4220.     else
  4221.     {
  4222.         while($coinmaster[Quartersmaster].available_tokens >= 2)
  4223.         {
  4224.             cli_execute("make gauze garter");
  4225.         }
  4226.     }
  4227.  
  4228.     int have = item_amount($item[filthy poultice]) + item_amount($item[gauze garter]);
  4229.     if(have < 10)
  4230.     {
  4231.         int need = 10 - have;
  4232.         if(!get_property("cc_hippyInstead").to_boolean())
  4233.         {
  4234.             need = min(need, $coinmaster[Quartersmaster].available_tokens / 2);
  4235.             cli_execute("make " + need + " gauze garter");
  4236.         }
  4237.         else
  4238.         {
  4239.             need = min(need, $coinmaster[Dimemaster].available_tokens / 2);
  4240.             cli_execute("make " + need + " filthy poultice");
  4241.         }
  4242.     }
  4243.  
  4244.  
  4245.     if(have_outfit("War Hippy Fatigues"))
  4246.     {
  4247.         while($coinmaster[Dimemaster].available_tokens >= 5)
  4248.         {
  4249.             cli_execute("make " + $coinmaster[Dimemaster].available_tokens/5 + " fancy seashell necklace");
  4250.         }
  4251.         while($coinmaster[Dimemaster].available_tokens >= 2)
  4252.         {
  4253.             cli_execute("make " + $coinmaster[Dimemaster].available_tokens/2 + " filthy poultice");
  4254.         }
  4255.         while($coinmaster[Dimemaster].available_tokens >= 1)
  4256.         {
  4257.             cli_execute("make " + $coinmaster[Dimemaster].available_tokens + " water pipe bomb");
  4258.         }
  4259.     }
  4260.  
  4261.     if(have_outfit("Frat Warrior Fatigues"))
  4262.     {
  4263.         while($coinmaster[Quartersmaster].available_tokens >= 5)
  4264.         {
  4265.             cli_execute("make " + $coinmaster[Quartersmaster].available_tokens/5 + " commemorative war stein");
  4266.         }
  4267.         while($coinmaster[Quartersmaster].available_tokens >= 2)
  4268.         {
  4269.             cli_execute("make " + $coinmaster[Quartersmaster].available_tokens/2 + " gauze garter");
  4270.         }
  4271.         while($coinmaster[Quartersmaster].available_tokens >= 1)
  4272.         {
  4273.             cli_execute("make " + $coinmaster[Quartersmaster].available_tokens + " beer bomb");
  4274.         }
  4275.     }
  4276.  
  4277.     if(my_mp() < 40)
  4278.     {
  4279.         if(possessEquipment($item[Pantsgiving]))
  4280.         {
  4281.             equip($item[pantsgiving]);
  4282.         }
  4283.         doRest();
  4284.     }
  4285.     warOutfit();
  4286.     cli_execute("refresh equip");
  4287.     if(my_hp() < my_maxhp())
  4288.     {
  4289.         print("My hp is: " + my_hp());
  4290.         print("My max hp is: " + my_maxhp());
  4291.         useCocoon();
  4292.     }
  4293.     print("Let's fight the boss!", "blue");
  4294.     visit_url("bigisland.php?place=camp&whichcamp=1");
  4295.     visit_url("bigisland.php?place=camp&whichcamp=2");
  4296.     visit_url("bigisland.php?action=bossfight&pwd");
  4297.     ccAdv(1, $location[Noob Cave]);
  4298.     council();
  4299.     set_property("cc_war", "finished");
  4300.     return true;
  4301. }
  4302.  
  4303. boolean LX_getDigitalKey()
  4304. {
  4305.     if(contains_text(get_property("nsTowerDoorKeysUsed"), "digital key"))
  4306.     {
  4307.         return false;
  4308.     }
  4309.     if(((get_property("cc_war") != "finished") && (item_amount($item[rock band flyers]) == 0)))
  4310.     {
  4311.         return false;
  4312.     }
  4313.     while((item_amount($item[Red Pixel]) > 0) && (item_amount($item[Blue Pixel]) > 0) && (item_amount($item[Green Pixel]) > 0) && (item_amount($item[White Pixel]) < 30))
  4314.     {
  4315.         cli_execute("make white pixel");
  4316.     }
  4317.     if((item_amount($item[white pixel]) >= 30) || (item_amount($item[Richard\'s Star Key]) > 0))
  4318.     {
  4319.         if(have_effect($effect[consumed by fear]) > 0)
  4320.         {
  4321.             uneffect($effect[Consumed By Fear]);
  4322.             council();
  4323.         }
  4324.         return false;
  4325.     }
  4326.  
  4327.  
  4328.     if(get_property("cc_crackpotjar") == "")
  4329.     {
  4330.         if(item_amount($item[jar of psychoses (The crackpot mystic)]) == 0)
  4331.         {
  4332.             pullXWhenHaveY($item[jar of psychoses (the Crackpot Mystic)], 1, 0);
  4333.         }
  4334.         if(item_amount($item[jar of psychoses (The crackpot mystic)]) == 0)
  4335.         {
  4336.             set_property("cc_crackpotjar", "fail");
  4337.         }
  4338.         else
  4339.         {
  4340.             woods_questStart();
  4341.             use(1, $item[jar of psychoses (The crackpot mystic)]);
  4342.             set_property("cc_crackpotjar", "done");
  4343.         }
  4344.     }
  4345.     print("Getting white pixels: Have " + item_amount($item[white pixel]), "blue");
  4346.     #if(item_amount($item[white pixel]) >= 27)
  4347.     #{
  4348.     #   abort("Can we pull any pixels?");
  4349.     #}
  4350.     if(get_property("cc_crackpotjar") == "done")
  4351.     {
  4352.         set_property("choiceAdventure644", 3);
  4353.         ccAdv(1, $location[Fear Man\'s Level]);
  4354.         if(have_effect($effect[consumed by fear]) == 0)
  4355.         {
  4356.             print("Well, we don't seem to have further access to the Fear Man area so... abort that plan", "red");
  4357.             set_property("cc_crackpotjar", "fail");
  4358.         }
  4359.     }
  4360.     else if(get_property("cc_crackpotjar") == "fail")
  4361.     {
  4362.         woods_questStart();
  4363.         equip($slot[acc2], $item[Continuum Transfunctioner]);
  4364.         ccAdv(1, $location[8-bit Realm]);
  4365.     }
  4366.     return true;
  4367. }
  4368.  
  4369. boolean L11_getBeehive()
  4370. {
  4371.     if(my_level() < 11)
  4372.     {
  4373.         return false;
  4374.     }
  4375.     if(!get_property("cc_getBeehive").to_boolean())
  4376.     {
  4377.         return false;
  4378.     }
  4379.  
  4380.     print("Must find a beehive!", "blue");
  4381.  
  4382.     set_property("choiceAdventure923", "1");
  4383.     set_property("choiceAdventure924", "3");
  4384.     set_property("choiceAdventure1018", "1");
  4385.     set_property("choiceAdventure1019", "1");
  4386.  
  4387.     handleBjornify($familiar[grimstone golem]);
  4388.     buffMaintain($effect[The Sonata of Sneakiness], 20, 1, 1);
  4389.     buffMaintain($effect[Smooth Movements], 10, 1, 1);
  4390.  
  4391.     ccAdv(1, $location[The Black Forest]);
  4392.     if(item_amount($item[beehive]) > 0)
  4393.     {
  4394.         set_property("cc_getBeehive", false);
  4395.     }
  4396.     return true;
  4397. }
  4398.  
  4399. boolean L12_orchardStart()
  4400. {
  4401.     if(my_level() < 12)
  4402.     {
  4403.         return false;
  4404.     }
  4405.     if(get_property("cc_orchard") != "")
  4406.     {
  4407.         return false;
  4408.     }
  4409.     if((get_property("hippiesDefeated").to_int() < 64) && !get_property("cc_hippyInstead").to_boolean())
  4410.     {
  4411.         return false;
  4412.     }
  4413.  
  4414.     warOutfit();
  4415.     visit_url("bigisland.php?place=orchard&action=stand&pwd");
  4416.     set_property("cc_orchard", "start");
  4417.     return true;
  4418. }
  4419.  
  4420. boolean L12_orchardFinalize()
  4421. {
  4422.     if(get_property("cc_orchard") != "done")
  4423.     {
  4424.         return false;
  4425.     }
  4426.     set_property("cc_orchard", "finished");
  4427.     if(item_amount($item[A Light that Never Goes Out]) > 0)
  4428.     {
  4429.         pulverizeThing($item[A Light that Never Goes Out]);
  4430.     }
  4431.     warOutfit();
  4432.     visit_url("bigisland.php?place=orchard&action=stand&pwd");
  4433.     visit_url("bigisland.php?place=orchard&action=stand&pwd");
  4434.     return true;
  4435. }
  4436.  
  4437.  
  4438. boolean L10_plantThatBean()
  4439. {
  4440.     if((my_level() < 10) || (get_property("cc_bean") != ""))
  4441.     {
  4442.         return false;
  4443.     }
  4444.     council();
  4445.     print("Planting me magic bean!", "blue");
  4446.     string page = visit_url("place.php?whichplace=plains");
  4447.     if(contains_text(page, "place.php?whichplace=beanstalk"))
  4448.     {
  4449.         print("I have no bean but I see a stalk here. Okies. I'm ok with that", "blue");
  4450.         set_property("cc_bean", "plant");
  4451.         visit_url("place.php?whichplace=beanstalk");
  4452.         return true;
  4453.     }
  4454.     use(1, $item[enchanted bean]);
  4455.     set_property("cc_bean", "plant");
  4456.     return true;
  4457. }
  4458.  
  4459. boolean L10_holeInTheSky()
  4460. {
  4461.     if(my_level() < 10)
  4462.     {
  4463.         return false;
  4464.     }
  4465.     if(!get_property("cc_holeinthesky").to_boolean())
  4466.     {
  4467.         return false;
  4468.     }
  4469.     if(item_amount($item[steam-powered model rocketship]) > 0)
  4470.     {
  4471.         set_property("cc_holeinthesky", false);
  4472.     }
  4473.  
  4474.     print("Castle Top Floor - Opening the Hole in the Sky", "blue");
  4475.     set_property("choiceAdventure677", 2);
  4476.     set_property("choiceAdventure675", 4);
  4477.     set_property("choiceAdventure678", 3);
  4478.     set_property("choiceAdventure676", 4);
  4479.  
  4480.     handleInitFamiliar();
  4481.     ccAdv(1, $location[The Castle in the Clouds in the Sky (Top Floor)]);
  4482.     handleFamiliar($familiar[Adventurous Spelunker]);
  4483.     return true;
  4484. }
  4485.  
  4486. boolean L10_topFloor()
  4487. {
  4488.     if(my_level() < 10)
  4489.     {
  4490.         return false;
  4491.     }
  4492.     if(get_property("cc_castletop") != "")
  4493.     {
  4494.         return false;
  4495.     }
  4496.  
  4497.     print("Castle Top Floor", "blue");
  4498.     set_property("choiceAdventure677", 1);
  4499.     set_property("choiceAdventure675", 4);
  4500.     set_property("choiceAdventure678", 3);
  4501.     set_property("choiceAdventure676", 4);
  4502.  
  4503.     if((item_amount($item[mohawk wig]) == 0) && !in_hardcore())
  4504.     {
  4505.         pullXWhenHaveY($item[Mohawk Wig], 1, 0);
  4506.     }
  4507.     if(item_amount($item[Mohawk Wig]) > 0)
  4508.     {
  4509.         equip($item[mohawk wig]);
  4510.     }
  4511.     set_property("choiceAdventure678", 1);
  4512.     if(my_class() == $class[Ed])
  4513.     {
  4514.         set_property("choiceAdventure679", 2);
  4515.     }
  4516.     else
  4517.     {
  4518.         set_property("choiceAdventure679", 1);
  4519.     }
  4520.  
  4521.     handleInitFamiliar();
  4522.     ccAdv(1, $location[The Castle in the Clouds in the Sky (Top Floor)]);
  4523.     handleFamiliar($familiar[Adventurous Spelunker]);
  4524.  
  4525.     if(contains_text(get_property("lastEncounter"), "Keep On Turnin\' the Wheel in the Sky"))
  4526.     {
  4527.         set_property("cc_castletop", "finished");
  4528.         council();
  4529.     }
  4530.     if(contains_text(get_property("lastEncounter"), "Copper Feel"))
  4531.     {
  4532.         set_property("cc_castletop", "finished");
  4533.         council();
  4534.     }
  4535.     return true;
  4536. }
  4537.  
  4538. boolean L10_ground()
  4539. {
  4540.     if(my_level() < 10)
  4541.     {
  4542.         return false;
  4543.     }
  4544.     if(get_property("cc_castleground") != "")
  4545.     {
  4546.         return false;
  4547.     }
  4548.     print("Castle Ground Floor, boring!", "blue");
  4549.     set_property("choiceAdventure672", 3);
  4550.     set_property("choiceAdventure673", 3);
  4551.     set_property("choiceAdventure674", 3);
  4552.     if(my_class() == $class[Ed])
  4553.     {
  4554.         set_property("choiceAdventure1026", 3);
  4555.     }
  4556.     else
  4557.     {
  4558.         if(item_amount($item[electric boning knife]) > 0)
  4559.         {
  4560.             set_property("choiceAdventure1026", 3);
  4561.         }
  4562.         else
  4563.         {
  4564.             set_property("choiceAdventure1026", 2);
  4565.         }
  4566.     }
  4567.  
  4568.     handleInitFamiliar();
  4569.     ccAdv(1, $location[The Castle in the Clouds in the Sky (Ground Floor)]);
  4570.     handleFamiliar($familiar[Adventurous Spelunker]);
  4571.  
  4572.     if(contains_text(get_property("lastEncounter"), "Top of the Castle, Ma"))
  4573.     {
  4574.         set_property("cc_castleground", "finished");
  4575.     }
  4576.     return true;
  4577. }
  4578.  
  4579. boolean L10_basement()
  4580. {
  4581.     if(my_level() < 10)
  4582.     {
  4583.         return false;
  4584.     }
  4585.     if(get_property("cc_castlebasement") != "")
  4586.     {
  4587.         return false;
  4588.     }
  4589.     print("Basement Search", "blue");
  4590.     set_property("choiceAdventure669", "1");
  4591.     set_property("choiceAdventure670", "5");
  4592.     set_property("choiceAdventure671", "4");
  4593.  
  4594.     if(my_primestat() == $stat[Muscle])
  4595.     {
  4596.         buyUpTo(1, $item[Ben-Gal&trade; Balm]);
  4597.         buffMaintain($effect[Go Get \'Em\, Tiger!], 0, 1, 1);
  4598.     }
  4599.     buyUpTo(1, $item[Hair Spray]);
  4600.     buffMaintain($effect[Butt-Rock Hair], 0, 1, 1);
  4601.  
  4602.     if(item_amount($item[titanium assault umbrella]) == 1)
  4603.     {
  4604.         set_property("choiceAdventure669", "4");
  4605.     }
  4606.     else
  4607.     {
  4608.         set_property("choiceAdventure669", "1");
  4609.     }
  4610.  
  4611.     handleInitFamiliar();
  4612.     ccAdv(1, $location[The Castle in the Clouds in the Sky (Basement)]);
  4613.     handleFamiliar($familiar[Adventurous Spelunker]);
  4614.  
  4615.     if((contains_text(get_property("lastEncounter"), "The Fast and the Furry-ous")) && (item_amount($item[titanium assault umbrella]) == 1))
  4616.     {
  4617.         print("We was fast and furry-ous!", "blue");
  4618.         equip($item[titanium assault umbrella]);
  4619.         set_property("choiceAdventure669", "1");
  4620.         ccAdv(1, $location[The Castle in the Clouds in the Sky (Basement)]);
  4621.         set_property("cc_castlebasement", "finished");
  4622.     }
  4623.     else if(contains_text(get_property("lastEncounter"), "You Don\'t Mess Around with Gym"))
  4624.     {
  4625.         print("Just messed with Gym", "blue");
  4626.         set_property("choiceAdventure670", "5");
  4627.         if(item_amount($item[amulet of extreme plot significance]) == 0)
  4628.         {
  4629.             if(in_hardcore() && !possessEquipment($item[Amulet of Extreme Plot Significance]))
  4630.             {
  4631.                 print("Backfarming an Amulet of Extreme Plot Significance, sigh :(", "blue");
  4632.                 ccAdv(1, $location[The Penultimate Fantasy Airship]);
  4633.                 return true;
  4634.             }
  4635.             else
  4636.             {
  4637.                 pullXWhenHaveY($item[Amulet of Extreme Plot Significance], 1, 0);
  4638.             }
  4639.         }
  4640.         equip($slot[acc3], $item[amulet of extreme plot significance]);
  4641.         set_property("choiceAdventure670", "4");
  4642.         ccAdv(1, $location[The Castle in the Clouds in the Sky (Basement)]);
  4643.         set_property("cc_castlebasement", "finished");
  4644.     }
  4645.     return true;
  4646. }
  4647.  
  4648. boolean L10_airship()
  4649. {
  4650.     if(my_level() < 10)
  4651.     {
  4652.         return false;
  4653.     }
  4654.     if(item_amount($item[S.O.C.K.]) == 1)
  4655.     {
  4656.         set_property("cc_airship", "finished");
  4657.     }
  4658.     if(get_property("cc_airship") != "")
  4659.     {
  4660.         return false;
  4661.     }
  4662.  
  4663.     visit_url("clan_viplounge.php?preaction=goswimming&subaction=submarine");
  4664.     print("Fantasy Airship Fly Fly time", "blue");
  4665.     if(my_mp() > 60)
  4666.     {
  4667.         handleBjornify($familiar[grimstone golem]);
  4668.     }
  4669.  
  4670.     if(item_amount($item[model airship]) == 0)
  4671.     {
  4672.         set_property("choiceAdventure182", "4");
  4673.     }
  4674.     else
  4675.     {
  4676.         set_property("choiceAdventure182", "1");
  4677.     }
  4678.  
  4679.     if((my_daycount() == 1) && (get_property("_hipsterAdv").to_int() < 7))
  4680.     {
  4681.         print("Hipster Adv: " + get_property("_hipsterAdv"), "blue");
  4682.         handleFamiliar($familiar[Artistic Goth Kid]);
  4683.     }
  4684.  
  4685.     if((item_amount($item[mohawk wig]) == 0) && (have_effect($effect[Everything Looks Yellow]) == 0))
  4686.     {
  4687.         handleFamiliar($familiar[Crimbo Shrub]);
  4688.         if((my_familiar() == $familiar[Crimbo Shrub]) && !get_property("_shrubDecorated").to_boolean())
  4689.         {
  4690.             visit_url("inv_use.php?pwd=&which=3&whichitem=7958");
  4691.             visit_url("choice.php?pwd=&whichchoice=999&option=1&topper=1&lights=1&garland=1&gift=1");
  4692.         }
  4693.     }
  4694.  
  4695.     buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  4696.     buffMaintain($effect[Snow Shoes], 0, 1, 1);
  4697.     buffMaintain($effect[Fishy\, Oily], 0, 1, 1);
  4698.  
  4699.     ccAdv(1, $location[The Penultimate Fantasy Airship]);
  4700.     handleFamiliar($familiar[Adventurous Spelunker]);
  4701.     return true;
  4702. }
  4703.  
  4704. boolean Lsc_flyerSeals()
  4705. {
  4706.     if(my_class() != $class[Seal Clubber])
  4707.     {
  4708.         return false;
  4709.     }
  4710.     if(get_property("cc_prewar") != "started")
  4711.     {
  4712.         return false;
  4713.     }
  4714.     if(get_property("flyeredML") >= 10000)
  4715.     {
  4716.         return false;
  4717.     }
  4718.     if(item_amount($item[Rock Band Flyers]) == 0)
  4719.     {
  4720.         return false;
  4721.     }
  4722.     if(get_property("choiceAdventure1003").to_int() >= 3)
  4723.     {
  4724.         return false;
  4725.     }
  4726.  
  4727.     if((get_property("_sealsSummoned").to_int() < 5) && (my_meat() > 500))
  4728.     {
  4729.         element towerTest = ns_crowd3();
  4730.         boolean doElement = false;
  4731.         if(item_amount($item[powdered sealbone]) > 0)
  4732.         {
  4733.             if((towerTest == $element[cold]) && (item_amount($item[frost-rimed seal hide]) < 2) && (item_amount($item[figurine of a cold seal]) > 0))
  4734.             {
  4735.                 doElement = true;
  4736.             }
  4737.             if((towerTest == $element[hot]) && (item_amount($item[sizzling seal fat]) < 2) && (item_amount($item[figurine of a charred seal]) > 0))
  4738.             {
  4739.                 doElement = true;
  4740.             }
  4741.             if((towerTest == $element[sleaze]) && (item_amount($item[seal lube]) < 2) && (item_amount($item[figurine of a slippery seal]) > 0))
  4742.             {
  4743.                 doElement = true;
  4744.             }
  4745.             if((towerTest == $element[spooky]) && (item_amount($item[scrap of shadow]) < 2) && (item_amount($item[figurine of a shadowy seal]) > 0))
  4746.             {
  4747.                 doElement = true;
  4748.             }
  4749.             if((towerTest == $element[stench]) && (item_amount($item[fustulent seal grulch]) < 2) && (item_amount($item[figurine of a stinking seal]) > 0))
  4750.             {
  4751.                 doElement = true;
  4752.             }
  4753.         }
  4754.  
  4755.         handleInitFamiliar();
  4756.         if(doElement)
  4757.         {
  4758.             if(item_amount($item[imbued seal-blubber candle]) == 0)
  4759.             {
  4760.                 buyUpTo(1, $item[seal-blubber candle]);
  4761.                 cli_execute("make imbued seal-blubber candle");
  4762.             }
  4763.             handleSealElement(towerTest);
  4764.         }
  4765.         else
  4766.         {
  4767.             buyUpTo(1, $item[figurine of an armored seal]);
  4768.             buyUpTo(10, $item[seal-blubber candle]);
  4769.             handleSealArmored();
  4770.         }
  4771.         if((item_amount($item[bad-ass club]) == 0) && (item_amount($item[ingot of seal-iron]) > 0))
  4772.         {
  4773.             use(1, $item[ingot of seal-iron]);
  4774.         }
  4775.         handleFamiliar($familiar[Adventurous Spelunker]);
  4776.         return true;
  4777.     }
  4778.     return false;
  4779. }
  4780.  
  4781. boolean L0_handleRainDoh()
  4782. {
  4783.     if(item_amount($item[rain-doh box full of monster]) == 0)
  4784.     {
  4785.         return false;
  4786.     }
  4787.     if(my_level() <= 3)
  4788.     {
  4789.         return false;
  4790.     }
  4791.     if(have_effect($effect[ultrahydrated]) > 0)
  4792.     {
  4793.         return false;
  4794.     }
  4795.  
  4796.     monster enemy = to_monster(get_property("rainDohMonster"));
  4797.     print("Black boxing: " + enemy, "blue");
  4798.  
  4799.     if(enemy == $monster[Ninja Snowman Assassin])
  4800.     {
  4801.         int count = item_amount($item[ninja rope]);
  4802.         count += item_amount($item[ninja crampons]);
  4803.         count += item_amount($item[ninja carabiner]);
  4804.  
  4805.         if((count <= 1) && (get_property("_raindohCopiesMade").to_int() < 5))
  4806.         {
  4807.             set_property("cc_doCombatCopy", "yes");
  4808.         }
  4809.         handleRainDoh();
  4810.         if(last_monster() != $monster[ninja snowman assassin])
  4811.         {
  4812.             abort("Now sure what exploded, tried to summon copy of " + enemy + " but got " + last_monster() + " instead.");
  4813.         }
  4814.         set_property("cc_doCombatCopy", "no");
  4815.         if(count == 3)
  4816.         {
  4817.             set_property("cc_ninjasnowmanassassin", "1");
  4818.         }
  4819.         return true;
  4820.     }
  4821.     if(enemy == $monster[Ghost])
  4822.     {
  4823.         int count = item_amount($item[white pixel]);
  4824.         count += 30 * item_amount($item[digital key]);
  4825.  
  4826.         if((count <= 20) && (get_property("_raindohCopiesMade").to_int() < 5))
  4827.         {
  4828.             set_property("cc_doCombatCopy", "yes");
  4829.         }
  4830.         handleRainDoh();
  4831.         if(last_monster() != $monster[ghost])
  4832.         {
  4833.             abort("Now sure what exploded, tried to summon copy of " + enemy + " but got " + last_monster() + " instead.");
  4834.         }
  4835.         set_property("cc_doCombatCopy", "no");
  4836.         if(count > 20)
  4837.         {
  4838.         }
  4839.         return true;
  4840.     }
  4841.     if(enemy == $monster[Lobsterfrogman])
  4842.     {
  4843.         if((get_property("cc_hasrainman") == "") && (item_amount($item[barrel of gunpowder]) < 4))
  4844.         {
  4845.             set_property("cc_doCombatCopy", "yes");
  4846.         }
  4847.         handleRainDoh();
  4848.         if(last_monster() != $monster[lobsterfrogman])
  4849.         {
  4850.             abort("Now sure what exploded, tried to summon copy of " + enemy + " but got " + last_monster() + " instead.");
  4851.         }
  4852.         set_property("cc_doCombatCopy", "no");
  4853.         return true;
  4854.     }
  4855.     if(enemy == $monster[Skinflute])
  4856.     {
  4857.         int stars = item_amount($item[star]);
  4858.         int lines = item_amount($item[line]);
  4859.  
  4860.         if((stars < 7) && (lines < 6)  & (get_property("_raindohCopiesMade").to_int() < 5))
  4861.         {
  4862.             set_property("cc_doCombatCopy", "yes");
  4863.         }
  4864.         handleRainDoh();
  4865.         if(last_monster() != $monster[skinflute])
  4866.         {
  4867.             abort("Now sure what exploded, tried to summon copy of " + enemy + " but got " + last_monster() + " instead.");
  4868.         }
  4869.         set_property("cc_doCombatCopy", "no");
  4870.         return true;
  4871.     }
  4872.  
  4873.     /*  Should we check for an acceptable monster or just empty the box in that case?
  4874.     huge swarm of ghuol whelps, modern zmobie, gaudy pirate, writing desk, mountain man
  4875.     */
  4876.     //If doesn\'t match a special condition
  4877.     if(enemy != $monster[none])
  4878.     {
  4879.         handleRainDoh();
  4880.         if(last_monster() != enemy)
  4881.         {
  4882.             abort("Now sure what exploded, tried to summon copy of " + enemy + " but got " + last_monster() + " instead.");
  4883.         }
  4884.         return true;
  4885.     }
  4886.  
  4887.     return false;
  4888. }
  4889.  
  4890.  
  4891. boolean LX_ornateDowsingRod()
  4892. {
  4893.     if(!get_property("cc_grimstoneOrnateDowsingRod").to_boolean())
  4894.     {
  4895.         return false;
  4896.     }
  4897.     if(possessEquipment($item[UV-resistant compass]))
  4898.     {
  4899.         print("You have a UV-resistant compass for some reason, I assume you don't want an Ornate Dowsing Rod.", "red");
  4900.         set_property("cc_grimstoneOrnateDowsingRod", false);
  4901.         return false;
  4902.     }
  4903.     if(my_adventures() <= 6)
  4904.     {
  4905.         return false;
  4906.     }
  4907.     if(item_amount($item[Grimstone Mask]) == 0)
  4908.     {
  4909.         return false;
  4910.     }
  4911.     if(my_daycount() < 2)
  4912.     {
  4913.         return false;
  4914.     }
  4915.     if(get_counters("", 0, 6) != "")
  4916.     {
  4917.         return false;
  4918.     }
  4919.  
  4920.     #Need to make sure we get our grimstone mask
  4921.     print("Acquiring a Dowsing Rod!", "blue");
  4922.     set_property("choiceAdventure829", "1");
  4923.     use(1, $item[grimstone mask]);
  4924.  
  4925.     set_property("choiceAdventure822", "1");
  4926.     set_property("choiceAdventure823", "1");
  4927.     set_property("choiceAdventure824", "1");
  4928.     set_property("choiceAdventure825", "1");
  4929.     set_property("choiceAdventure826", "1");
  4930.     while(item_amount($item[odd silver coin]) < 1)
  4931.     {
  4932.         ccAdv(1, $location[The Prince\'s Balcony]);
  4933.     }
  4934.     while(item_amount($item[odd silver coin]) < 2)
  4935.     {
  4936.         ccAdv(1, $location[The Prince\'s Dance Floor]);
  4937.     }
  4938.     while(item_amount($item[odd silver coin]) < 3)
  4939.     {
  4940.         ccAdv(1, $location[The Prince\'s Lounge]);
  4941.     }
  4942.     while(item_amount($item[odd silver coin]) < 4)
  4943.     {
  4944.         ccAdv(1, $location[The Prince\'s Kitchen]);
  4945.     }
  4946.     while(item_amount($item[odd silver coin]) < 5)
  4947.     {
  4948.         ccAdv(1, $location[The Prince\'s Restroom]);
  4949.     }
  4950.  
  4951.     cli_execute("make ornate dowsing rod");
  4952.     set_property("cc_grimstoneOrnateDowsingRod", false);
  4953.     set_property("choiceAdventure805", "1");
  4954.     return true;
  4955. }
  4956.  
  4957. boolean L7_crypt()
  4958. {
  4959.     if((my_level() < 7) || (get_property("cc_crypt") != ""))
  4960.     {
  4961.         return false;
  4962.     }
  4963.     if(item_amount($item[chest of the bonerdagon]) == 1)
  4964.     {
  4965.         set_property("cc_crypt", "finished");
  4966.         use(1, $item[chest of the bonerdagon]);
  4967.         return false;
  4968.     }
  4969.     oldPeoplePlantStuff();
  4970.  
  4971.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  4972.     {
  4973.         handleBjornify($familiar[grimstone golem]);
  4974.     }
  4975.     buffMaintain($effect[Browbeaten], 0, 1, 1);
  4976.     buffMaintain($effect[Rosewater Mark], 0, 1, 1);
  4977.  
  4978.     boolean edAlcove = true;
  4979.     if(my_class() == $class[Ed])
  4980.     {
  4981.         edAlcove = have_skill($skill[More Legs]);
  4982.     }
  4983.  
  4984.     if((get_property("cyrptAlcoveEvilness").to_int() > 0) && ((get_property("cyrptAlcoveEvilness").to_int() <= get_property("cc_waitingArrowAlcove").to_int()) || (get_property("cyrptAlcoveEvilness").to_int() <= 25)) && edAlcove)
  4985.     {
  4986.         if(have_familiar($familiar[Xiblaxian Holo-Companion]))
  4987.         {
  4988.             handleFamiliar($familiar[Xiblaxian Holo-Companion]);
  4989.         }
  4990.         else
  4991.         {
  4992.             handleFamiliar($familiar[Oily Woim]);
  4993.         }
  4994.  
  4995.         if((get_property("_badlyRomanticArrows") == "0") && have_familiar($familiar[Reanimated Reanimator]) && (my_daycount() == 1))
  4996.         {
  4997.             handleFamiliar($familiar[Reanimated Reanimator]);
  4998.         }
  4999.  
  5000.         buffMaintain($effect[Sepia Tan], 0, 1, 1);
  5001.         if((my_class() == $class[Seal Clubber]) || (my_class() == $class[Turtle Tamer]))
  5002.         {
  5003.             buyUpTo(1, $item[Cheap Wind-up Clock]);
  5004.             buffMaintain($effect[Ticking Clock], 0, 1, 1);
  5005.         }
  5006.         buffMaintain($effect[Song of Slowness], 110, 1, 1);
  5007.         buffMaintain($effect[Fishy\, Oily], 0, 1, 1);
  5008.  
  5009.         if((have_effect($effect[Soles of Glass]) == 0) && (get_property("_grimBuff") == false))
  5010.         {
  5011.             visit_url("choice.php?pwd&whichchoice=835&option=1", true);
  5012.         }
  5013.  
  5014.         print("The Alcove! (" + initiative_modifier() + ")", "blue");
  5015.         ccAdv(1, $location[The Defiled Alcove]);
  5016.         handleFamiliar($familiar[Adventurous Spelunker]);
  5017.         return true;
  5018.     }
  5019.  
  5020.     if(get_property("cyrptNookEvilness").to_int() > 0)
  5021.     {
  5022.         print("The Nook!", "blue");
  5023.         buffMaintain($effect[Joyful Resolve], 0, 1, 1);
  5024.         ccAdv(1, $location[The Defiled Nook]);
  5025.         if(item_amount($item[evil eye]) > 0)
  5026.         {
  5027.             use(1, $item[evil eye]);
  5028.         }
  5029.         return true;
  5030.     }
  5031.  
  5032.     if(get_property("cyrptNicheEvilness").to_int() > 0)
  5033.     {
  5034.         if((my_daycount() == 1) && (get_property("_hipsterAdv").to_int() < 7))
  5035.         {
  5036.             handleFamiliar($familiar[Artistic Goth Kid]);
  5037.         }
  5038.         print("The Niche!", "blue");
  5039.         ccAdv(1, $location[The Defiled Niche]);
  5040.  
  5041.         handleFamiliar($familiar[Adventurous Spelunker]);
  5042.         return true;
  5043.     }
  5044.  
  5045.     if(get_property("cyrptCrannyEvilness").to_int() > 0)
  5046.     {
  5047.         print("The Cranny!", "blue");
  5048.         set_property("choiceAdventure523", "4");
  5049.  
  5050.         if(my_mp() > 60)
  5051.         {
  5052.             handleBjornify($familiar[grimstone golem]);
  5053.         }
  5054.  
  5055.         ccAdv(1, $location[The Defiled Cranny]);
  5056.         return true;
  5057.     }
  5058.  
  5059.     if(get_property("cyrptTotalEvilness").to_int() <= 0)
  5060.     {
  5061.         if(my_primestat() == $stat[Muscle])
  5062.         {
  5063.             buyUpTo(1, $item[Ben-Gal&trade; Balm]);
  5064.             buffMaintain($effect[Go Get \'Em\, Tiger!], 0, 1, 1);
  5065.             buyUpTo(1, $item[Blood of the Wereseal]);
  5066.             buffMaintain($effect[Temporary Lycanthropy], 0, 1, 1);
  5067.         }
  5068.  
  5069.         useCocoon();
  5070.         set_property("choiceAdventure527", 1);
  5071.         boolean tryBoner = ccAdv(1, $location[Haert of the Cyrpt]);
  5072.         if(item_amount($item[chest of the bonerdagon]) == 1)
  5073.         {
  5074.             set_property("cc_crypt", "finished");
  5075.             use(1, $item[chest of the bonerdagon]);
  5076.         }
  5077.         else if(!tryBoner)
  5078.         {
  5079.             print("We tried to kill the Bonerdagon because the cyrpt was defiled but couldn't adventure there and the chest of the bonerdagon is gone so we can't check that. Anyway, we are going to assume the cyrpt is done now.", "red");
  5080.             set_property("cc_crypt", "finished");
  5081.         }
  5082.         else
  5083.         {
  5084.             abort("Failed to kill bonerdagon");
  5085.         }
  5086.         return true;
  5087.     }
  5088.     return false;
  5089. }
  5090.  
  5091. boolean L1_edIsland()
  5092. {
  5093.     return L1_edIsland(0);
  5094. }
  5095.  
  5096. boolean L1_edDinsey()
  5097. {
  5098.     if(my_class() != $class[Ed])
  5099.     {
  5100.         return false;
  5101.     }
  5102.     if(!elementalPlanes_access($element[stench]))
  5103.     {
  5104.         return false;
  5105.     }
  5106.     if(my_level() < 6)
  5107.     {
  5108.         return false;
  5109.     }
  5110.     if(!get_property("cc_dickstab").to_boolean())
  5111.     {
  5112.         return false;
  5113.     }
  5114.     if(possessEquipment($item[Sewage-Clogged Pistol]) && possessEquipment($item[Perfume-Soaked Bandana]))
  5115.     {
  5116.         return false;
  5117.     }
  5118.     ccAdv(1, $location[Pirates of the Garbage Barges]);
  5119.     return true;
  5120. }
  5121.  
  5122. boolean L1_edIsland(int dickstabOverride)
  5123. {
  5124.     if(my_class() != $class[Ed])
  5125.     {
  5126.         return false;
  5127.     }
  5128.     if(!elementalPlanes_access($element[spooky]))
  5129.     {
  5130.         return false;
  5131.     }
  5132.  
  5133.     skill blocker = $skill[Still Another Extra Spleen];
  5134.     if(get_property("cc_dickstab").to_boolean())
  5135.     {
  5136.         if(turns_played() > 22)
  5137.         {
  5138.             blocker = $skill[Replacement Liver];
  5139.             blocker = $skill[Okay Seriously, This is the Last Spleen];
  5140.             if((dickstabOverride == 0) || (my_level() >= dickstabOverride))
  5141.             {
  5142.                 return false;
  5143.             }
  5144.         }
  5145.     }
  5146.  
  5147.     if((my_level() >= 10) || ((my_level() >= 8) && have_skill(blocker)))
  5148.     {
  5149.         return false;
  5150.     }
  5151.     if((my_level() >= 3) && !get_property("controlPanel9").to_boolean())
  5152.     {
  5153.         visit_url("place.php?whichplace=airport_spooky_bunker&action=si_controlpanel");
  5154.         visit_url("choice.php?pwd=&whichchoice=986&option=9",true);
  5155.     }
  5156.     if((my_level() >= 3) && !get_property("controlPanel9").to_boolean())
  5157.     {
  5158.         abort("Damn control panel is not set, WTF!!!");
  5159.     }
  5160.  
  5161.     #If we get some other CI quest, this might keep triggering, should we flag this?
  5162.     if((my_hp() > 20) && !possessEquipment($item[Gore Bucket]) && !possessEquipment($item[Encrypted Micro-Cassette Recorder]) && !possessEquipment($item[Military-Grade Fingernail Clippers]))
  5163.     {
  5164.         elementalPlanes_takeJob($element[spooky]);
  5165.         #visit_url("place.php?whichplace=airport_spooky&action=airport2_radio");
  5166.         #visit_url("choice.php?pwd&whichchoice=984&option=1", true);
  5167.         set_property("choiceAdventure988", 2);
  5168.     }
  5169.  
  5170.     if(item_amount($item[Gore Bucket]) > 0)
  5171.     {
  5172.         equip($item[Gore Bucket]);
  5173.     }
  5174.  
  5175.     if(item_amount($item[Personal Ventilation Unit]) > 0)
  5176.     {
  5177.         equip($slot[acc2], $item[Personal Ventilation Unit]);
  5178.     }
  5179.     if(possessEquipment($item[Gore Bucket]) && (get_property("goreCollected").to_int() >= 100))
  5180.     {
  5181.         visit_url("place.php?whichplace=airport_spooky&action=airport2_radio");
  5182.         visit_url("choice.php?pwd&whichchoice=984&option=1", true);
  5183.     }
  5184.  
  5185.     buffMaintain($effect[Experimental Effect G-9], 0, 1, 1);
  5186.     ccAdv(1, $location[The Secret Government Laboratory]);
  5187.     if(item_amount($item[Bottle-Opener Keycard]) > 0)
  5188.     {
  5189.         use(1, $item[Bottle-Opener Keycard]);
  5190.     }
  5191.     set_property("choiceAdventure988", 1);
  5192.     return true;
  5193. }
  5194.  
  5195.  
  5196. boolean L1_edIslandFallback()
  5197. {
  5198.     if(my_class() != $class[Ed])
  5199.     {
  5200.         return false;
  5201.     }
  5202.     if(elementalPlanes_access($element[spooky]))
  5203.     {
  5204.         return false;
  5205.     }
  5206.  
  5207.     if((my_level() >= 10) || ((my_level() >= 8) && have_skill($skill[Still Another Extra Spleen])))
  5208.     {
  5209.         return false;
  5210.     }
  5211.     if(elementalPlanes_access($element[stench]))
  5212.     {
  5213.         ccAdv(1, $location[Pirates of the Garbage Barges]);
  5214.         return true;
  5215.     }
  5216.  
  5217.     if(LX_islandAccess())
  5218.     {
  5219.         return true;
  5220.     }
  5221.  
  5222.     return ccAdv(1, $location[Hippy Camp]);
  5223. }
  5224.  
  5225. boolean L6_friarsGetParts()
  5226. {
  5227.     if((my_level() < 6) || (get_property("cc_friars") != ""))
  5228.     {
  5229.         return false;
  5230.     }
  5231.     if(my_mp() > 50)
  5232.     {
  5233.         handleBjornify($familiar[grimstone golem]);
  5234.     }
  5235.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  5236.     {
  5237.         handleBjornify($familiar[grimstone golem]);
  5238.     }
  5239.     if((my_daycount() == 1) && (get_property("_hipsterAdv").to_int() < 7) && (item_amount($item[hot wing]) >= 3))
  5240.     {
  5241.         handleFamiliar($familiar[Artistic Goth Kid]);
  5242.     }
  5243.     buffMaintain($effect[Snow Shoes], 0, 1, 1);
  5244.  
  5245.     if(item_amount($item[box of birthday candles]) == 0)
  5246.     {
  5247.         print("Getting Box of Birthday Candles", "blue");
  5248.         ccAdv(1, $location[The Dark Heart of the Woods]);
  5249.         handleFamiliar($familiar[Adventurous Spelunker]);
  5250.         return true;
  5251.     }
  5252.  
  5253.     if(item_amount($item[dodecagram]) == 0)
  5254.     {
  5255.         print("Getting Dodecagram", "blue");
  5256.         ccAdv(1, $location[The Dark Neck of the Woods]);
  5257.         handleFamiliar($familiar[Adventurous Spelunker]);
  5258.         return true;
  5259.     }
  5260.     if(item_amount($item[eldritch butterknife]) == 0)
  5261.     {
  5262.         print("Getting Eldritch Butterknife", "blue");
  5263.         ccAdv(1, $location[The Dark Elbow of the Woods]);
  5264.         handleFamiliar($familiar[Adventurous Spelunker]);
  5265.         return true;
  5266.     }
  5267.     handleFamiliar($familiar[Adventurous Spelunker]);
  5268.     print("Finishing friars", "blue");
  5269.     visit_url("friars.php?action=ritual&pwd");
  5270.     council();
  5271.     set_property("cc_friars", "done");
  5272.     return true;
  5273. }
  5274.  
  5275. boolean L6_friarsHotWing()
  5276. {
  5277.     if(get_property("cc_friars") != "done")
  5278.     {
  5279.         return false;
  5280.     }
  5281.     if((get_property("cc_pirateoutfit") == "almost") || (get_property("cc_pirateoutfit") == "finished") )
  5282.     {
  5283.         if(get_property("cc_friars") == "done")
  5284.         {
  5285.             set_property("cc_friars", "finished");
  5286.         }
  5287.         return false;
  5288.     }
  5289.  
  5290.     if(item_amount($item[hot wing]) >= 3)
  5291.     {
  5292.         set_property("cc_friars", "finished");
  5293.         return true;
  5294.     }
  5295.  
  5296.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  5297.     {
  5298.         handleBjornify($familiar[grimstone golem]);
  5299.     }
  5300.     print("Need more Hot Wings", "blue");
  5301.     if(my_class() == $class[Ed])
  5302.     {
  5303.         boolean status = ccAdv(1, $location[Pandamonium]);
  5304.         if(status == false)
  5305.         {
  5306.             print("Was unable to go to Pandamonium (438) in Ed. Uh oh. If we did, run me again and report this to the script writer", "blue");
  5307.         }
  5308.         return true;
  5309.     }
  5310.     ccAdv(1, $location[Pandamonium Slums]);
  5311.     return true;
  5312. }
  5313.  
  5314. boolean LX_fancyOilPainting()
  5315. {
  5316.     if(get_property("chasmBridgeProgress").to_int() >= 30)
  5317.     {
  5318.         return false;
  5319.     }
  5320.     if(my_adventures() <= 4)
  5321.     {
  5322.         return false;
  5323.     }
  5324.     if(item_amount($item[Grimstone Mask]) == 0)
  5325.     {
  5326.         return false;
  5327.     }
  5328.     if(!get_property("cc_grimstoneFancyOilPainting").to_boolean())
  5329.     {
  5330.         return false;
  5331.     }
  5332.     if(get_counters("", 0, 6) != "")
  5333.     {
  5334.         return false;
  5335.     }
  5336.     print("Acquiring a Fancy Oil Painting!", "blue");
  5337.     set_property("choiceAdventure829", "1");
  5338.     use(1, $item[grimstone mask]);
  5339.     set_property("choiceAdventure823", "1");
  5340.     set_property("choiceAdventure824", "1");
  5341.     set_property("choiceAdventure825", "1");
  5342.     set_property("choiceAdventure826", "1");
  5343.  
  5344.     while(item_amount($item[odd silver coin]) < 1)
  5345.     {
  5346.         ccAdv(1, $location[The Prince\'s Balcony]);
  5347.     }
  5348.     while(item_amount($item[odd silver coin]) < 2)
  5349.     {
  5350.         ccAdv(1, $location[The Prince\'s Dance Floor]);
  5351.     }
  5352.     while(item_amount($item[odd silver coin]) < 3)
  5353.     {
  5354.         ccAdv(1, $location[The Prince\'s Lounge]);
  5355.     }
  5356.     while(item_amount($item[odd silver coin]) < 4)
  5357.     {
  5358.         ccAdv(1, $location[The Prince\'s Kitchen]);
  5359.     }
  5360.     cli_execute("make fancy oil painting");
  5361.     set_property("cc_grimstoneFancyOilPainting", false);
  5362.     return true;
  5363. }
  5364.  
  5365. boolean L9_leafletQuest()
  5366. {
  5367.     if((my_level() < 9) || possessEquipment($item[Giant Pinky Ring]))
  5368.     {
  5369.         return false;
  5370.     }
  5371.     if(my_class() == $class[Ed])
  5372.     {
  5373.         return false;
  5374.     }
  5375.     if(get_campground() contains $item[Frobozz Real-Estate Company Instant House (TM)])
  5376.     {
  5377.         return false;
  5378.     }
  5379.     print("Got a leaflet to do", "blue");
  5380.     council();
  5381.     cli_execute("leaflet");
  5382.     use(1, $item[Frobozz Real-Estate Company Instant House (TM)]);
  5383.     return true;
  5384. }
  5385.  
  5386. boolean L8_trapperGround()
  5387. {
  5388.     if(get_property("cc_trapper") != "start")
  5389.     {
  5390.         return false;
  5391.     }
  5392.  
  5393.     #print("Starting Trapper Collection", "blue");
  5394.     item oreGoal = to_item(get_property("trapperOre"));
  5395.  
  5396.     if((item_amount(oreGoal) >= 3) && (item_amount($item[goat cheese]) >= 3))
  5397.     {
  5398.         print("Giving Trapper goat cheese and " + oreGoal, "blue");
  5399.         set_property("cc_trapper", "yeti");
  5400.         visit_url("place.php?whichplace=mclargehuge&action=trappercabin");
  5401.         return true;
  5402.     }
  5403.  
  5404.     if(item_amount($item[goat cheese]) < 3)
  5405.     {
  5406.         print("Yay for goat cheese!", "blue");
  5407.         ccAdv(1, $location[The Goatlet]);
  5408.         return true;
  5409.     }
  5410.  
  5411.     if(item_amount(oreGoal) >= 3)
  5412.     {
  5413.         if(item_amount($item[goat cheese]) >= 3)
  5414.         {
  5415.             print("Giving Trapper goat cheese and " + oreGoal, "blue");
  5416.             set_property("cc_trapper", "yeti");
  5417.             visit_url("place.php?whichplace=mclargehuge&action=trappercabin");
  5418.             return true;
  5419.         }
  5420.         print("Yay for goat cheese!", "blue");
  5421.         ccAdv(1, $location[The Goatlet]);
  5422.         return true;
  5423.     }
  5424.     else if((my_rain() > 50) && (have_effect($effect[Ultrahydrated]) == 0) && (my_path() == "Heavy Rains"))
  5425.     {
  5426.         print("Trying to summon a mountain man", "blue");
  5427.         set_property("cc_mountainmen", "1");
  5428.         rainManSummon("mountain man", false, false);
  5429.         return true;
  5430.     }
  5431.     else if(my_path() == "Heavy Rains")
  5432.     {
  5433.         #Do pulls instead if we don't possess rain man?
  5434.         print("Need Ore but not enough rain", "blue");
  5435.         return false;
  5436.     }
  5437.     else if(!in_hardcore())
  5438.     {
  5439.         if(pulls_remaining() > 0)
  5440.         {
  5441.             pullXWhenHaveY(oreGoal, 3 - item_amount(oreGoal), item_amount(oreGoal));
  5442.         }
  5443.     }
  5444.     return false;
  5445. }
  5446.  
  5447. boolean L8_trapperStart()
  5448. {
  5449.     if((my_level() < 8) || (get_property("cc_trapper") != ""))
  5450.     {
  5451.         return false;
  5452.     }
  5453.     council();
  5454.     print("Let's meet the trapper.", "blue");
  5455.  
  5456.     visit_url("place.php?whichplace=mclargehuge&action=trappercabin");
  5457.     set_property("cc_trapper", "start");
  5458.     return true;
  5459. }
  5460.  
  5461. boolean L5_goblinKing()
  5462. {
  5463.     if(get_property("cc_goblinking") == "finished")
  5464.     {
  5465.         return false;
  5466.     }
  5467.     if(my_level() < 8)
  5468.     {
  5469.         return false;
  5470.     }
  5471.     if(my_adventures() <= 2)
  5472.     {
  5473.         return false;
  5474.     }
  5475.     if(get_counters("Fortune Cookie", 0, 3) == "Fortune Cookie")
  5476.     {
  5477.         return false;
  5478.     }
  5479.     if(!possessEquipment($item[Knob Goblin Harem Veil]) || !possessEquipment($item[Knob Goblin Harem Pants]))
  5480.     {
  5481.         return false;
  5482.     }
  5483.  
  5484.     print("Death to the gobbo!!", "blue");
  5485.     cli_execute("outfit knob goblin harem girl disguise");
  5486.     buffMaintain($effect[Knob Goblin Perfume], 0, 1, 1);
  5487.     if(have_effect($effect[Knob Goblin Perfume]) == 0)
  5488.     {
  5489.         ccAdv(1, $location[Cobb\'s Knob Harem]);
  5490.         if(contains_text(get_property("lastEncounter"), "Cobb's Knob lab key"))
  5491.         {
  5492.             ccAdv(1, $location[Cobb\'s Knob Harem]);
  5493.         }
  5494.         return true;
  5495.     }
  5496.  
  5497.     if(my_primestat() == $stat[Muscle])
  5498.     {
  5499.         buyUpTo(1, $item[Ben-Gal&trade; Balm]);
  5500.         buffMaintain($effect[Go Get \'Em\, Tiger!], 0, 1, 1);
  5501.     }
  5502.     buyUpTo(1, $item[Hair Spray]);
  5503.     buffMaintain($effect[Butt-Rock Hair], 0, 1, 1);
  5504.  
  5505.     if((my_class() == $class[Seal Clubber]) || (my_class() == $class[Turtle Tamer]))
  5506.     {
  5507.         buyUpTo(1, $item[Blood of the Wereseal]);
  5508.         buffMaintain($effect[Temporary Lycanthropy], 0, 1, 1);
  5509.     }
  5510.  
  5511.     if(monster_level_adjustment() > 150)
  5512.     {
  5513.         equip($slot[acc2], $item[none]);
  5514.     }
  5515.  
  5516.     ccAdv(1, $location[Throne Room]);
  5517.     if(have_effect($effect[Beaten Up]) > 0)
  5518.     {
  5519.         return true;
  5520.     }
  5521.     if((item_amount($item[Crown of the Goblin King]) > 0) || (item_amount($item[Glass Balls of the Goblin King]) > 0) || (item_amount($item[Codpiece of the Goblin King]) > 0))
  5522.     {
  5523.         set_property("cc_goblinking", "finished");
  5524.         council();
  5525.     }
  5526.     if(item_amount($item[Goblin Water]) > 0)
  5527.     {
  5528.         set_property("cc_goblinking", "finished");
  5529.         council();
  5530.     }
  5531.     return true;
  5532. }
  5533.  
  5534. boolean L4_batCave()
  5535. {
  5536.     if(get_property("cc_bat") == "finished")
  5537.     {
  5538.         return false;
  5539.     }
  5540.  
  5541.     print("In the bat hole!", "blue");
  5542.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  5543.     {
  5544.         handleBjornify($familiar[grimstone golem]);
  5545.     }
  5546.     buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  5547.  
  5548.     if(item_amount($item[sonar-in-a-biscuit]) > 0)
  5549.     {
  5550.         use(item_amount($item[sonar-in-a-biscuit]), $item[sonar-in-a-biscuit]);
  5551.         return true;
  5552.     }
  5553.     string batHole = visit_url("place.php?whichplace=bathole");
  5554.  
  5555.     if(contains_text(batHole, "bathole_bg5"))
  5556.     {
  5557.         if((item_amount($item[enchanted bean]) == 0) && (get_property("cc_bean") != "plant"))
  5558.         {
  5559.             ccAdv(1, $location[The Beanbat Chamber]);
  5560.             return true;
  5561.         }
  5562.         set_property("cc_bat", "finished");
  5563.         council();
  5564.         return true;
  5565.     }
  5566.  
  5567.     if(contains_text(batHole, "bathole_bg4"))
  5568.     {
  5569.         ccAdv(1, $location[The Boss Bat\'s Lair]);
  5570.         return true;
  5571.     }
  5572.     if(contains_text(batHole, "bathole_bg3"))
  5573.     {
  5574.         if((item_amount($item[enchanted bean]) == 0) && (get_property("cc_bean") != "plant"))
  5575.         {
  5576.             ccAdv(1, $location[The Beanbat Chamber]);
  5577.             return true;
  5578.         }
  5579.         ccAdv(1, $location[The Batrat and Ratbat Burrow]);
  5580.         return true;
  5581.     }
  5582.     if(contains_text(batHole, "bathole_bg2"))
  5583.     {
  5584.         ccAdv(1, $location[The Batrat and Ratbat Burrow]);
  5585.         return true;
  5586.     }
  5587.  
  5588.     buffMaintain($effect[Hide of Sobek], 10, 1, 1);
  5589.     buffMaintain($effect[Astral Shell], 10, 1, 1);
  5590.     buffMaintain($effect[Elemental Saucesphere], 10, 1, 1);
  5591.     if(elemental_resist($element[stench]) < 1)
  5592.     {
  5593.         if(possessEquipment($item[Knob Goblin Harem Veil]))
  5594.         {
  5595.             equip($item[Knob Goblin Harem Veil]);
  5596.         }
  5597.         else
  5598.         {
  5599.             return false;
  5600.         }
  5601.     }
  5602.  
  5603.     if((my_class() == $class[Ed]) && (item_amount($item[Disassembled Clover]) > 0))
  5604.     {
  5605.         use(1, $item[Disassembled Clover]);
  5606.         if(ccAdvBypass(31, $location[Guano Junction]))
  5607.         {
  5608.             print("Wandering monster interrupt at Guano Junction", "red");
  5609.             return true;
  5610.         }
  5611.         use(item_amount($item[ten-leaf clover]), $item[ten-leaf clover]);
  5612.         return true;
  5613.     }
  5614.  
  5615.     ccAdv(1, $location[Guano Junction]);
  5616.     return true;
  5617. }
  5618.  
  5619. boolean LX_islandAccess()
  5620. {
  5621.     if((item_amount($item[Shore Inc. Ship Trip Scrip]) >= 3) && (item_amount($item[Dingy Dinghy]) == 0) && (my_meat() >= 400))
  5622.     {
  5623.         cli_execute("make dinghy plans");
  5624.         buyUpTo(1, $item[dingy planks]);
  5625.         use(1, $item[dinghy plans]);
  5626.         return true;
  5627.     }
  5628.     if(item_amount($item[Dingy Dinghy]) > 0)
  5629.     {
  5630.         return false;
  5631.     }
  5632.     if((my_adventures() <= 9) || (my_meat() <= 1900))
  5633.     {
  5634.         return false;
  5635.     }
  5636.     if(get_counters("Fortune Cookie", 0, 9) == "Fortune Cookie")
  5637.     {
  5638.         //Just check the Fortune Cookie counter not any others.
  5639.         return false;
  5640.     }
  5641.  
  5642.     print("At the shore, la de da!", "blue");
  5643.     if(my_primestat() == $stat[Muscle])
  5644.     {
  5645.         set_property("choiceAdventure793", "1");
  5646.     }
  5647.     else if(my_primestat() == $stat[Mysticality])
  5648.     {
  5649.         set_property("choiceAdventure793", "2");
  5650.     }
  5651.     else
  5652.     {
  5653.         set_property("choiceAdventure793", "3");
  5654.     }
  5655.     while((item_amount($item[Shore Inc. Ship Trip Scrip]) < 3) && (my_meat() > 500))
  5656.     {
  5657.         ccAdv(1, $location[The Shore\, Inc. Travel Agency]);
  5658.     }
  5659.     if(item_amount($item[Shore Inc. Ship Trip Scrip]) < 3)
  5660.     {
  5661.         print("Failed to get enough Shore Scrip for some reason, continuing...", "red");
  5662.         return false;
  5663.     }
  5664.  
  5665.     if(my_meat() >= 400)
  5666.     {
  5667.         cli_execute("make dinghy plans");
  5668.         buyUpTo(1, $item[dingy planks]);
  5669.         use(1, $item[dinghy plans]);
  5670.         return true;
  5671.     }
  5672.     return false;
  5673. }
  5674.  
  5675. boolean LX_phatLootToken()
  5676. {
  5677.     if(!possessEquipment($item[Ring of Detect Boring Doors]) || (item_amount($item[Eleven-Foot Pole]) == 0) || (item_amount($item[Pick-O-Matic Lockpicks]) == 0))
  5678.     {
  5679.         return false;
  5680.     }
  5681.     if(my_level() > 13)
  5682.     {
  5683.         return false;
  5684.     }
  5685.     if(get_property("cc_sorceress") != "")
  5686.     {
  5687.         return false;
  5688.     }
  5689.     if(get_property("cc_phatloot").to_int() >= my_daycount())
  5690.     {
  5691.         return false;
  5692.     }
  5693.     if(towerKeyCount() >= 3)
  5694.     {
  5695.         return false;
  5696.     }
  5697.     if(my_adventures() <= 5)
  5698.     {
  5699.         return false;
  5700.     }
  5701.     if(get_property("cc_keysdone") != "")
  5702.     {
  5703.         return false;
  5704.     }
  5705.     print("Phat Loot Token Get!", "blue");
  5706.     set_property("choiceAdventure690", "2");
  5707.     set_property("choiceAdventure691", "2");
  5708.     set_property("choiceAdventure692", "3");
  5709.     set_property("choiceAdventure693", "2");
  5710.     equip($slot[acc3], $item[ring of detect boring doors]);
  5711.     ccAdv(1, $location[the daily dungeon]);
  5712.     cli_execute("unequip acc3");
  5713.     if(get_property("_lastDailyDungeonRoom").to_int() == 15)
  5714.     {
  5715.         set_property("cc_phatloot", "" + my_daycount());
  5716.     }
  5717.     return true;
  5718.  
  5719. }
  5720.  
  5721.  
  5722. boolean L2_treeCoin()
  5723. {
  5724.     if(get_property("cc_treecoin") == "finished")
  5725.     {
  5726.         return false;
  5727.     }
  5728.     print("Time for a tree-holed coin", "blue");
  5729.     set_property("choiceAdventure502", "2");
  5730.     set_property("choiceAdventure505", "2");
  5731.     ccAdv(1, $location[the spooky forest]);
  5732.     if(item_amount($item[tree-holed coin]) == 1)
  5733.     {
  5734.         set_property("cc_treecoin", "finished");
  5735.     }
  5736.     return true;
  5737. }
  5738.  
  5739. boolean L2_spookyMap()
  5740. {
  5741.     if(get_property("cc_spookymap") == "finished")
  5742.     {
  5743.         return false;
  5744.     }
  5745.     print("Need a spooky map now", "blue");
  5746.     set_property("choiceAdventure502", "3");
  5747.     set_property("choiceAdventure506", "3");
  5748.     set_property("choiceAdventure507", "1");
  5749.     ccAdv(1, $location[the spooky forest]);
  5750.     if(item_amount($item[spooky temple map]) == 1)
  5751.     {
  5752.         set_property("cc_spookymap", "finished");
  5753.     }
  5754.     return true;
  5755. }
  5756.  
  5757. boolean L2_spookyFertilizer()
  5758. {
  5759.    if(item_amount($item[Spooky-Gro Fertilizer]) > 0)
  5760.    {
  5761.        set_property("cc_spookyfertilizer", "finished");
  5762.    }
  5763.     if(get_property("cc_spookyfertilizer") == "finished")
  5764.     {
  5765.         return false;
  5766.     }
  5767.     print("Need some poop, I mean fertilizer now", "blue");
  5768.     set_property("choiceAdventure502", "3");
  5769.     set_property("choiceAdventure506", "2");
  5770.     ccAdv(1, $location[The Spooky Forest]);
  5771.     if(item_amount($item[Spooky-Gro Fertilizer]) > 0)
  5772.     {
  5773.         set_property("cc_spookyfertilizer", "finished");
  5774.     }
  5775.     return true;
  5776. }
  5777.  
  5778. boolean L2_spookySapling()
  5779. {
  5780.     if(get_property("cc_spookysapling") == "finished")
  5781.     {
  5782.         return false;
  5783.     }
  5784.     if(my_meat() < 100)
  5785.     {
  5786.         return false;
  5787.     }
  5788.     print("And a spooky sapling!", "blue");
  5789.     set_property("choiceAdventure502", "1");
  5790.     set_property("choiceAdventure503", "3");
  5791.     set_property("choiceAdventure504", "3");
  5792.  
  5793. #   cli_execute("aa none");
  5794.     if(contains_text(visit_url("adventure.php?snarfblat=15"), "Combat"))
  5795.     {
  5796.         ccAdv(1, $location[The Spooky Forest]);
  5797.     }
  5798.     else
  5799.     {
  5800.         if(contains_text(get_property("lastEncounter"), "Hoom Hah"))
  5801.         {
  5802.             return true;
  5803.         }
  5804.         if(contains_text(get_property("lastEncounter"), "Blaaargh! Blaaargh!"))
  5805.         {
  5806.             print("Ewww, fake blood semirare. Worst. Day. Ever.", "red");
  5807.             return true;
  5808.         }
  5809.         visit_url("choice.php?whichchoice=502&option=1&pwd");
  5810.         visit_url("choice.php?whichchoice=503&option=3&pwd");
  5811.         if(item_amount($item[bar skin]) > 0)
  5812.         {
  5813.             visit_url("choice.php?whichchoice=504&option=2&pwd");
  5814.         }
  5815.         visit_url("choice.php?whichchoice=504&option=3&pwd");
  5816.         visit_url("choice.php?whichchoice=504&option=4&pwd");
  5817.         if(item_amount($item[Spooky Sapling]) > 0)
  5818.         {
  5819.             set_property("cc_spookysapling", "finished");
  5820.             use(1, $item[Spooky Temple Map]);
  5821.         }
  5822.         else
  5823.         {
  5824.             abort("Supposedly bought a spooky sapling, but failed :(");
  5825.         }
  5826.     }
  5827.     return true;
  5828. }
  5829.  
  5830. boolean L2_mosquito()
  5831. {
  5832.     if(get_property("cc_mosquito") == "finished")
  5833.     {
  5834.         return false;
  5835.     }
  5836.  
  5837.     buffMaintain($effect[Snow Shoes], 0, 1, 1);
  5838.  
  5839.     print("Trying to find a mosquito.", "blue");
  5840.     set_property("choiceAdventure502", "2");
  5841.     set_property("choiceAdventure505", "1");
  5842.     ccAdv(1, $location[The Spooky Forest]);
  5843.  
  5844.     if(item_amount($item[mosquito larva]) > 0)
  5845.     {
  5846.         council();
  5847.         visit_url("tavern.php?place=barkeep");
  5848.         set_property("cc_mosquito", "finished");
  5849.     }
  5850.     return true;
  5851. }
  5852.  
  5853. boolean LX_handleSpookyravenFirstFloor()
  5854. {
  5855.     if(get_property("cc_spookyravennecklace") == "done")
  5856.     {
  5857.         return false;
  5858.     }
  5859.     if(possessEquipment($item[Ghost of a Necklace]))
  5860.     {
  5861.         set_property("cc_spookyravennecklace", "done");
  5862.         return false;
  5863.     }
  5864.  
  5865.     boolean delayKitchen = false;
  5866.     if(get_property("cc_delayHauntedKitchen").to_boolean())
  5867.     {
  5868.         if((elemental_resist($element[hot]) < 9) || (elemental_resist($element[stench]) < 9))
  5869.         {
  5870.             if(my_class() == $class[Ed])
  5871.             {
  5872.                 delayKitchen = have_skill($skill[Even More Elemental Wards]);
  5873.             }
  5874.             else
  5875.             {
  5876.                 delayKitchen = false;
  5877.             }
  5878.         }
  5879.     }
  5880.  
  5881.     if(delayKitchen)
  5882.     {
  5883.         return false;
  5884.     }
  5885.  
  5886.     if(get_property("writingDesksDefeated").to_int() >= 5)
  5887.     {
  5888.         abort("Mafia reports 5 or more writing desks defeated yet we are still looking for them? Give Lady Spookyraven her necklace?");
  5889.     }
  5890.     if(item_amount($item[Lady Spookyraven\'s Necklace]) > 0)
  5891.     {
  5892.         abort("Have Lady Spookyraven's Necklace but did not give it to her....");
  5893.     }
  5894.  
  5895.     if(!have_skill($skill[Rain Man]) || get_property("cc_100familiar").to_boolean())
  5896.     {
  5897.         if(item_amount($item[Spookyraven Library Key]) == 1)
  5898.         {
  5899.             print("Well, we need writing desks", "blue");
  5900.             print("Going to the liberry!", "blue");
  5901. #           cli_execute("olfact writing desk");
  5902.             set_property("choiceAdventure888", "4");
  5903.             set_property("choiceAdventure889", "4");
  5904.             set_property("choiceAdventure163", "4");
  5905.             ccAdv(1, $location[The Haunted Library]);
  5906.         }
  5907.         else if(item_amount($item[Spookyraven Billiards room key]) == 1)
  5908.         {
  5909.             if((my_inebriety() < 8) && ((my_inebriety() + 2) < inebriety_limit()))
  5910.             {
  5911.                 print("Not quite boozed up for the billiards room... we'll be back.", "green");
  5912.                 return false;
  5913.             }
  5914.  
  5915.             set_property("choiceAdventure875" , "1");
  5916.             buffMaintain($effect[Chalky Hand], 0, 1, 1);
  5917.  
  5918.             # Staff of Fats
  5919.             if(item_amount($item[7964]) > 0)
  5920.             {
  5921.                 equip($item[7964]);
  5922.             }
  5923.             if(item_amount($item[2268]) > 0)
  5924.             {
  5925.                 equip($item[2268]);
  5926.             }
  5927.  
  5928.             #Staff of Ed
  5929.             if(item_amount($item[7961]) > 0)
  5930.             {
  5931.                 equip($item[7961]);
  5932.             }
  5933.             print("It's billiards time!", "blue");
  5934.             ccAdv(1, $location[The Haunted Billiards Room]);
  5935.  
  5936.         }
  5937.         else
  5938.         {
  5939.             print("Looking for the Billards Room key (Hot/Stench:" + elemental_resist($element[hot]) + "/" + elemental_resist($element[stench]) + "): Progress " + get_property("manorDrawerCount") + "/24", "blue");
  5940.             handleFamiliar($familiar[Exotic Parrot]);
  5941.             if(get_property("manorDrawerCount").to_int() >= 24)
  5942.             {
  5943.                 cli_execute("refresh inv");
  5944.                 if(item_amount($item[Spookyraven Billiards Room Key]) == 0)
  5945.                 {
  5946.                     print("We think you've opened enough drawers in the kitchen but you don't have the Billiards Room Key.");
  5947.                     wait(10);
  5948.                 }
  5949.             }
  5950.             buffMaintain($effect[Hide of Sobek], 10, 1, 1);
  5951.             ccAdv(1, $location[The Haunted Kitchen]);
  5952.         }
  5953.         return true;
  5954.     }
  5955.     return false;
  5956. }
  5957.  
  5958. boolean L5_getEncryptionKey()
  5959. {
  5960.     if(get_property("cc_day1_cobb") == "finished")
  5961.     {
  5962.         return false;
  5963.     }
  5964.     print("Looking for the knob.", "blue");
  5965.     ccAdv(1, $location[the outskirts of cobb\'s knob]);
  5966.  
  5967.     if(item_amount($item[11-inch knob sausage]) == 1)
  5968.     {
  5969.         visit_url("guild.php?place=challenge");
  5970.     }
  5971.  
  5972.     if(item_amount($item[Knob Goblin Encryption Key]) == 1)
  5973.     {
  5974.         set_property("cc_day1_cobb", "finished");
  5975.         council();
  5976.     }
  5977.     return true;
  5978. }
  5979.  
  5980. boolean LX_handleSpookyravenNecklace()
  5981. {
  5982.     if((get_property("cc_spookyravennecklace") == "done") || (item_amount($item[Lady Spookyraven\'s Necklace]) == 0))
  5983.     {
  5984.         return false;
  5985.     }
  5986.     if(possessEquipment($item[Ghost Of A Necklace]))
  5987.     {
  5988.         set_property("cc_spookyravennecklace", "done");
  5989.         return false;
  5990.     }
  5991.  
  5992.     print("Starting Spookyraven Second Floor.", "blue");
  5993.     visit_url("place.php?whichplace=manor1&action=manor1_ladys");
  5994.     visit_url("main.php");
  5995.     visit_url("place.php?whichplace=manor2&action=manor2_ladys");
  5996.  
  5997.     set_property("choiceAdventure876", "2");
  5998.     set_property("choiceAdventure877", "1");
  5999.     set_property("choiceAdventure878", "3");
  6000.     set_property("choiceAdventure879", "1");
  6001.     set_property("choiceAdventure880", "1");
  6002.  
  6003.     #handle lights-out, too bad we can't at least start Stephen Spookyraven here.
  6004.     set_property("choiceAdventure897", "2");
  6005.     set_property("choiceAdventure896", "1");
  6006.     set_property("choiceAdventure892", "2");
  6007.  
  6008.     if(item_amount($item[ghost of a necklace]) > 0)
  6009.     {
  6010.         set_property("cc_spookyravennecklace", "done");
  6011.     }
  6012.     else if((item_amount($item[ghost of a necklace]) == 0) || (item_amount($item[Lady Spookyraven\'s Necklace]) == 1))
  6013.     {
  6014.         cli_execute("refresh inv");
  6015.         set_property("cc_spookyravennecklace", "done");
  6016.         #abort("Mafia still doesn't understand the ghost of a necklace, just re-run me.");
  6017.     }
  6018.     return true;
  6019. }
  6020.  
  6021.  
  6022. boolean L12_startWar()
  6023. {
  6024.     if(get_property("cc_prewar") != "")
  6025.     {
  6026.         return false;
  6027.     }
  6028.  
  6029.     print("Must save the ferret!!", "blue");
  6030.     outfit("frat warrior fatigues");
  6031.     if(my_mp() > 60)
  6032.     {
  6033.         handleBjornify($familiar[grimstone golem]);
  6034.     }
  6035.     buffMaintain($effect[Snow Shoes], 0, 1, 1);
  6036.  
  6037.     ccAdv(1, $location[Wartime Hippy Camp]);
  6038.     if(contains_text(get_property("lastEncounter"), "Blockin\' Out the Scenery"))
  6039.     {
  6040.         set_property("cc_prewar", "started");
  6041.         visit_url("bigisland.php?action=junkman&pwd");
  6042.         if(!get_property("cc_hippyInstead").to_boolean())
  6043.         {
  6044.             visit_url("bigisland.php?place=concert&pwd");
  6045.             visit_url("bigisland.php?place=lighthouse&action=pyro&pwd=");
  6046.             visit_url("bigisland.php?place=lighthouse&action=pyro&pwd=");
  6047.             set_property("cc_gunpowder", "done");
  6048.         }
  6049.     }
  6050.     return true;
  6051. }
  6052.  
  6053. boolean L12_getOutfit()
  6054. {
  6055.     if(get_property("cc_prehippy") == "done")
  6056.     {
  6057.         return false;
  6058.     }
  6059.  
  6060.     set_property("choiceAdventure143", "3");
  6061.     set_property("choiceAdventure144", "3");
  6062.     set_property("choiceAdventure145", "1");
  6063.     set_property("choiceAdventure146", "1");
  6064.  
  6065.     if((get_property("cc_orcishfratboyspy") == "done") && (!in_hardcore()))
  6066.     {
  6067.         pullXWhenHaveY($item[Beer Helmet], 1, 0);
  6068.         pullXWhenHaveY($item[Bejeweled Pledge Pin], 1, 0);
  6069.         pullXWhenHaveY($item[Distressed Denim Pants], 1, 0);
  6070.     }
  6071.  
  6072.     if(possessEquipment($item[beer helmet]) && possessEquipment($item[bejeweled pledge pin]) && possessEquipment($item[distressed denim pants]))
  6073.     {
  6074.         set_property("choiceAdventure139", "3");
  6075.         set_property("choiceAdventure140", "3");
  6076.         set_property("cc_prehippy", "done");
  6077.         visit_url("clan_viplounge.php?preaction=goswimming&subaction=submarine");
  6078.         return true;
  6079.     }
  6080.  
  6081.     if(get_property("cc_prehippy") == "firstOutfit")
  6082.     {
  6083.         outfit("filthy hippy disguise");
  6084.         if(my_lightning() >= 5)
  6085.         {
  6086.             ccAdv(1, $location[Wartime Frat House]);
  6087.             return true;
  6088.         }
  6089.  
  6090.         if(in_hardcore())
  6091.         {
  6092.             ccAdv(1, $location[Wartime Frat House]);
  6093.             return true;
  6094.         }
  6095.  
  6096.         if((have_effect($effect[everything looks yellow]) > 0) || (get_property("cc_haslightningbolt") == ""))
  6097.         {
  6098.             pullXWhenHaveY($item[Beer Helmet], 1, 0);
  6099.             pullXWhenHaveY($item[Bejeweled Pledge Pin], 1, 0);
  6100.             pullXWhenHaveY($item[Distressed Denim Pants], 1, 0);
  6101.             return true;
  6102.         }
  6103.  
  6104.         //We should probably have some kind of backup solution here
  6105.  
  6106.         return false;
  6107.     }
  6108.     else
  6109.     {
  6110.         if(!in_hardcore())
  6111.         {
  6112.             pullXWhenHaveY($item[Filthy Knitted Dread Sack], 1, 0);
  6113.             pullXWhenHaveY($item[Filthy Corduroys], 1, 0);
  6114.         }
  6115.         if(L12_preOutfit())
  6116.         {
  6117.             return true;
  6118.         }
  6119.     }
  6120.     return false;
  6121. }
  6122.  
  6123. boolean L12_preOutfit()
  6124. {
  6125.     if(item_amount($item[Dingy Dinghy]) == 0)
  6126.     {
  6127.         return false;
  6128.     }
  6129.     if(!in_hardcore())
  6130.     {
  6131.         return false;
  6132.     }
  6133.     if(my_level() < 9)
  6134.     {
  6135.         return false;
  6136.     }
  6137.     if(get_property("cc_prehippy") != "")
  6138.     {
  6139.         return false;
  6140.     }
  6141.     if(my_path() == "Heavy Rains")
  6142.     {
  6143.         abort("We shouldn't be going down this path in HR");
  6144.     }
  6145.     if(possessEquipment($item[Filthy Knitted Dread Sack]) && possessEquipment($item[Filthy Corduroys]))
  6146.     {
  6147.         set_property("cc_prehippy", "firstOutfit");
  6148.         return true;
  6149.     }
  6150.     if((my_class() == $class[Ed]) && have_skill($skill[Wrath of Ra]))
  6151.     {
  6152.         if(have_effect($effect[Everything Looks Yellow]) != 0)
  6153.         {
  6154.             return false;
  6155.         }
  6156.         if(my_mp() < 40)
  6157.         {
  6158.             return false;
  6159.         }
  6160.     }
  6161.     print("Trying to acquire a filthy hippy outfit", "blue");
  6162.     if(my_level() < 12)
  6163.     {
  6164.         ccAdv(1, $location[Hippy Camp]);
  6165.     }
  6166.     else
  6167.     {
  6168.         ccAdv(1, $location[Wartime Hippy Camp]);
  6169.     }
  6170.     return true;
  6171. }
  6172.  
  6173. boolean L12_flyerFinish()
  6174. {
  6175.     if(item_amount($item[rock band flyers]) == 0)
  6176.     {
  6177.         return false;
  6178.     }
  6179.     if(get_property("flyeredML").to_int() < 10000)
  6180.     {
  6181.         return false;
  6182.     }
  6183.     if(get_property("cc_ignoreFlyer").to_boolean())
  6184.     {
  6185.         return false;
  6186.     }
  6187.     print("Done with this Rock Band crap", "blue");
  6188.     warOutfit();
  6189.     visit_url("bigisland.php?place=concert&pwd");
  6190.  
  6191.     cli_execute("refresh inv");
  6192.     if(item_amount($item[Rock Band Flyers]) == 0)
  6193.     {
  6194.         change_mcd(0);
  6195.         return true;
  6196.     }
  6197.     print("We thought we had enough flyeredML, but we don't. Big sadness, let's try that again.", "red");
  6198.     set_property("flyeredML", 9999);
  6199.     return false;
  6200. }
  6201.  
  6202. boolean L9_highLandlord()
  6203. {
  6204.     if(my_level() < 9)
  6205.     {
  6206.         return false;
  6207.     }
  6208.     if(get_property("chasmBridgeProgress").to_int() < 30)
  6209.     {
  6210.         return false;
  6211.     }
  6212.     if(get_property("cc_highlandlord") == "finished")
  6213.     {
  6214.         return false;
  6215.     }
  6216.  
  6217.     if((my_class() == $class[Ed]) && !get_property("cc_chasmBusted").to_boolean())
  6218.     {
  6219.         return false;
  6220.     }
  6221.  
  6222.     if(get_property("cc_highlandlord") == "")
  6223.     {
  6224.         visit_url("place.php?whichplace=highlands&action=highlands_dude");
  6225.         set_property("cc_aboocount", "0");
  6226.         set_property("choiceAdventure296", "1");
  6227.         set_property("cc_highlandlord", "start");
  6228.         return true;
  6229.     }
  6230.  
  6231.     if(contains_text(visit_url("place.php?whichplace=highlands"), "fire1.gif"))
  6232.     {
  6233.         set_property("cc_boopeak", "finished");
  6234.     }
  6235.  
  6236.     if(L9_aBooPeak())
  6237.     {
  6238.         return true;
  6239.     }
  6240.  
  6241.     if(L9_oilPeak())
  6242.     {
  6243.         return true;
  6244.     }
  6245.  
  6246.     if(L9_twinPeak())
  6247.     {
  6248.         return true;
  6249.     }
  6250.  
  6251.     if((get_property("twinPeakProgress").to_int() == 15) && (get_property("cc_oilpeak") == "finished") && (get_property("cc_boopeak") == "finished"))
  6252.     {
  6253.         print("Highlord Done", "blue");
  6254.         visit_url("place.php?whichplace=highlands&action=highlands_dude");
  6255.         council();
  6256.         set_property("cc_highlandlord", "finished");
  6257.         return true;
  6258.     }
  6259.  
  6260.     return false;
  6261. }
  6262.  
  6263. boolean L9_aBooPeak()
  6264. {
  6265.     if(get_property("cc_boopeak") == "finished")
  6266.     {
  6267.         return false;
  6268.     }
  6269.  
  6270.     if(get_property("cc_aboocount").to_int() < 5)
  6271.     {
  6272.         print("A-Boo Peak: " + get_property("booPeakProgress"), "blue");
  6273.         set_property("cc_aboocount", get_property("cc_aboocount").to_int() + 1);
  6274.         ccAdv(1, $location[A-Boo Peak]);
  6275.         return true;
  6276.     }
  6277.  
  6278.     print("A-Boo Peak: " + get_property("booPeakProgress"), "blue");
  6279.     if(item_amount($item[a-boo clue]) > 0)
  6280.     {
  6281.         boolean doThisBoo = false;
  6282.         buffMaintain($effect[Go Get \'Em\, Tiger!], 0, 1, 1);
  6283.         buffMaintain($effect[Astral Shell], 10, 1, 1);
  6284.         buffMaintain($effect[Elemental Saucesphere], 10, 1, 1);
  6285.  
  6286.         if(my_class() == $class[Ed])
  6287.         {
  6288.             if(item_amount($item[Linen Bandages]) == 0)
  6289.             {
  6290.                 return false;
  6291.             }
  6292.         }
  6293.         maximize("spooky res, cold res -equip lihc face -equip snow suit", 0, 0, false);
  6294.         adjustEdHat("ml");
  6295.         int coldResist = elemental_resist($element[cold]);
  6296.         int spookyResist = elemental_resist($element[spooky]);
  6297.  
  6298.         if(item_amount($item[Spooky Powder]) > 0)
  6299.         {
  6300.             spookyResist = spookyResist + 1;
  6301.         }
  6302.         if(item_amount($item[Cold Powder]) > 0)
  6303.         {
  6304.             coldResist = coldResist + 1;
  6305.         }
  6306.  
  6307.         #   Ed could really use some HP buffs but healing is an issue here.
  6308.         if(my_class() == $class[Ed])
  6309.         {
  6310.             if(black_market_available() && (item_amount($item[Can of Black Paint]) == 0) && (have_effect($effect[Red Door Syndrome]) == 0) && (my_meat() >= 1000))
  6311.             {
  6312.                 buyUpTo(1, $item[Can of Black Paint]);
  6313.             }
  6314.  
  6315.             if(item_amount($item[Can of Black Paint]) > 0)
  6316.             {
  6317.                 spookyResist = spookyResist + 2;
  6318.                 coldResist = coldResist + 2;
  6319.             }
  6320.             if(item_amount($item[Oil of Parrrlay]) > 0)
  6321.             {
  6322.                 spookyResist = spookyResist + 1;
  6323.                 coldResist = coldResist + 1;
  6324.             }
  6325.         }
  6326.  
  6327.         #Calculate how much boo peak damage does per unit resistance.
  6328.         int estimatedCold = (13+25+50+125+250) * ((100.0 - elemental_resist_value(coldResist)) / 100.0);
  6329.         int estimatedSpooky = (13+25+50+125+250) * ((100.0 - elemental_resist_value(spookyResist)) / 100.0);
  6330.         print("Current HP: " + my_hp() + "/" + my_maxhp(), "blue");
  6331.         print("Expected cold damage: " + estimatedCold + " Expected spooky damage: " + estimatedSpooky, "blue");
  6332.         int totalDamage = estimatedCold + estimatedSpooky;
  6333.         int mp_need = 40;
  6334.         if((my_hp() - totalDamage) > 200)
  6335.         {
  6336.             mp_need = mp_need - 20;
  6337.         }
  6338.         if((my_hp() - totalDamage) > 300)
  6339.         {
  6340.             mp_need = mp_need - 10;
  6341.         }
  6342.  
  6343.         if(my_turncount() == get_property("cc_lastABooConsider").to_int())
  6344.         {
  6345.             set_property("cc_lastABooCycleFix", get_property("cc_lastABooCycleFix").to_int() + 1);
  6346.             if(get_property("cc_lastABooCycleFix").to_int() > 5)
  6347.             {
  6348.                 abort("We are in an A-Boo Peak cycle and can't find anything else to do. Aborting. If you have actual other quests left, please report this. Otherwise, complete A-Boo peak manually");
  6349.             }
  6350.         }
  6351.         else
  6352.         {
  6353.             set_property("cc_lastABooConsider", my_turncount());
  6354.             set_property("cc_lastABooCycleFix", 0);
  6355.         }
  6356.  
  6357.         if(get_property("booPeakProgress").to_int() == 0)
  6358.         {
  6359.             doThisBoo = true;
  6360.         }
  6361.         if(((my_hp() >= 400) && (my_mp() >= mp_need)) || ((my_hp() >= totalDamage) && (my_mp() >= 20)))
  6362.         {
  6363.             doThisBoo = true;
  6364.         }
  6365.         if(doThisBoo)
  6366.         {
  6367.             if((item_amount($item[Lihc Face]) > 0) && (my_class() != $class[Ed]))
  6368.             {
  6369.                 equip($item[Lihc Face]);
  6370.             }
  6371.             if(item_amount($item[ghost of a necklace]) > 0)
  6372.             {
  6373.                 equip($slot[acc2], $item[ghost of a necklace]);
  6374.             }
  6375.             buffMaintain($effect[Spookypants], 0, 1, 1);
  6376.             buffMaintain($effect[Insulated Trousers], 0, 1, 1);
  6377.  
  6378.             if(my_class() == $class[Ed])
  6379.             {
  6380.                 buffMaintain($effect[Red Door Syndrome], 0, 1, 1);
  6381.                 buffMaintain($effect[Well-Oiled], 0, 1, 1);
  6382.             }
  6383.  
  6384.             set_property("choiceAdventure611", "1");
  6385.             useCocoon();
  6386.             use(1, $item[A-Boo clue]);
  6387.             ccAdv(1, $location[A-Boo Peak]);
  6388.             useCocoon();
  6389.             if((my_class() == $class[Ed]) && (my_hp() == 0))
  6390.             {
  6391.                 use(1, $item[Linen Bandages]);
  6392.             }
  6393.             return true;
  6394.         }
  6395.         else if(my_path() != "Picky")
  6396.         {
  6397.             #abort("Could not handle HP/MP situation for a-boo peak");
  6398.         }
  6399.         equipBaseline();
  6400.     }
  6401.     else if((get_property("cc_abooclover") == "") && (get_property("booPeakProgress").to_int() >= 40))
  6402.     {
  6403.         if(item_amount($item[disassembled clover]) > 0)
  6404.         {
  6405.             use(1, $item[disassembled clover]);
  6406.  
  6407.             string page = visit_url("adventure.php?snarfblat=296&confirm=on");
  6408.             if(contains_text(page, "Combat"))
  6409.             {
  6410.                 print("Wandering monster interrupt at a-boo peak", "red");
  6411.                 ccAdv(1, $location[A-Boo Peak]);
  6412.                 use(item_amount($item[ten-leaf clover]), $item[ten-leaf clover]);
  6413.             }
  6414.             else
  6415.             {
  6416.                 set_property("cc_abooclover", "used");
  6417.             }
  6418.             return true;
  6419.         }
  6420.     }
  6421.     else
  6422.     {
  6423.         ccAdv(1, $location[A-Boo Peak]);
  6424.         if(get_property("lastEncounter") == "Come On Ghosty, Light My Pyre")
  6425.         {
  6426.             set_property("cc_boopeak", "finished");
  6427.         }
  6428.         return true;
  6429.     }
  6430.     return false;
  6431. }
  6432.  
  6433. boolean L9_twinPeak()
  6434. {
  6435.     if(get_property("twinPeakProgress").to_int() >= 15)
  6436.     {
  6437.         return false;
  6438.     }
  6439.     if(get_property("cc_oilpeak") != "finished")
  6440.     {
  6441.         return false;
  6442.     }
  6443.  
  6444.     buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  6445.     if(get_property("cc_twinpeakprogress") == "")
  6446.     {
  6447.         print("Twin Peak", "blue");
  6448.         set_property("choiceAdventure604", "1");
  6449.         set_property("choiceAdventure618", "2");
  6450.         buffMaintain($effect[Joyful Resolve], 0, 1, 1);
  6451.         ccAdv(1, $location[Twin Peak]);
  6452.         if(last_monster() != $monster[gourmet gourami])
  6453.         {
  6454.             visit_url("choice.php?pwd&whichchoice=604&option=1&choiceform1=Continue...");
  6455.             visit_url("choice.php?pwd&whichchoice=604&option=1&choiceform1=Everything+goes+black.");
  6456.             set_property("cc_twinpeakprogress", "1");
  6457.             set_property("choiceAdventure606", "2");
  6458.             set_property("choiceAdventure608", "1");
  6459.         }
  6460.         return true;
  6461.     }
  6462.  
  6463.     if(my_mp() > 60)
  6464.     {
  6465.         handleBjornify($familiar[grimstone golem]);
  6466.     }
  6467.  
  6468.     int progress = get_property("twinPeakProgress").to_int();
  6469.     boolean needStench = ((progress & 1) == 0);
  6470.     boolean needFood = ((progress & 2) == 0);
  6471.     boolean needJar = ((progress & 4) == 0);
  6472.     boolean needInit = (progress == 7);
  6473.  
  6474.     int attemptNum = 0;
  6475.     boolean attempt = false;
  6476.     if(needInit)
  6477.     {
  6478.         buffMaintain($effect[Adorable Lookout], 0, 1, 1);
  6479.         if(initiative_modifier() < 40.0)
  6480.         {
  6481.             if((my_class() == $class[Turtle Tamer]) || (my_class() == $class[Seal Clubber]))
  6482.             {
  6483.                 buyUpTo(1, $item[Cheap Wind-Up Clock]);
  6484.                 buffMaintain($effect[Ticking Clock], 0, 1, 1);
  6485.             }
  6486.         }
  6487.         if(initiative_modifier() < 40.0)
  6488.         {
  6489.             return false;
  6490.         }
  6491.         attemptNum = 4;
  6492.         attempt = true;
  6493.     }
  6494.  
  6495.     if(needJar && (item_amount($item[Jar of Oil]) == 1))
  6496.     {
  6497.         attemptNum = 3;
  6498.         attempt = true;
  6499.     }
  6500.  
  6501.     if(!attempt && needFood)
  6502.     {
  6503.         if(item_drop_modifier() < 50)
  6504.         {
  6505.             if((friars_available()) && (!get_property("friarsBlessingReceived").to_boolean()))
  6506.             {
  6507.                 cli_execute("friars food");
  6508.             }
  6509.         }
  6510.         float food_drop = item_drop_modifier();
  6511.         if(have_effect($effect[Brother Flying Burrito\'s Blessing]) > 0)
  6512.         {
  6513.             food_drop = food_drop + 30;
  6514.         }
  6515.         if(food_drop >= 50.0)
  6516.         {
  6517.             attemptNum = 2;
  6518.             attempt = true;
  6519.         }
  6520.     }
  6521.  
  6522.     if(!attempt && needStench)
  6523.     {
  6524.         buffMaintain($effect[Astral Shell], 10, 1, 1);
  6525.         buffMaintain($effect[Elemental Saucesphere], 10, 1, 1);
  6526.         buffMaintain($effect[Hide of Sobek], 10, 1, 1);
  6527.         if(elemental_resist($element[stench]) < 4)
  6528.         {
  6529.             handleFamiliar($familiar[Exotic Parrot]);
  6530.         }
  6531.         if(elemental_resist($element[stench]) < 4)
  6532.         {
  6533.             buffMaintain($effect[Neutered Nostrils], 0, 1, 1);
  6534.         }
  6535.         if(elemental_resist($element[stench]) < 4)
  6536.         {
  6537.             buffMaintain($effect[Oiled-Up], 0, 1, 1);
  6538.         }
  6539.         if(elemental_resist($element[stench]) < 4)
  6540.         {
  6541.             buffMaintain($effect[Well-Oiled], 0, 1, 1);
  6542.         }
  6543.         if(elemental_resist($element[stench]) >= 4)
  6544.         {
  6545.             attemptNum = 1;
  6546.             attempt = true;
  6547.         }
  6548.     }
  6549.  
  6550.     if(!attempt)
  6551.     {
  6552.         return false;
  6553.     }
  6554.  
  6555.     set_property("choiceAdventure609", "1");
  6556.     if(attemptNum == 1)
  6557.     {
  6558.         set_property("choiceAdventure606", "1");
  6559.         set_property("choiceAdventure607", "1");
  6560.     }
  6561.     else if(attemptNum == 2)
  6562.     {
  6563.         set_property("choiceAdventure606", "2");
  6564.         set_property("choiceAdventure608", "1");
  6565.     }
  6566.     else if(attemptNum == 3)
  6567.     {
  6568.         set_property("choiceAdventure606", "3");
  6569.         set_property("choiceAdventure609", "1");
  6570.         set_property("choiceAdventure616", "1");
  6571.     }
  6572.     else if(attemptNum == 4)
  6573.     {
  6574.         set_property("choiceAdventure606", "4");
  6575.         set_property("choiceAdventure610", "1");
  6576.         set_property("choiceAdventure1056", "1");
  6577.     }
  6578.  
  6579.     int trimmers = item_amount($item[Rusty Hedge Trimmers]);
  6580.     if(item_amount($item[Rusty Hedge Trimmers]) > 0)
  6581.     {
  6582.         use(1, $item[rusty hedge trimmers]);
  6583.         cli_execute("refresh inv");
  6584.         if(item_amount($item[rusty hedge trimmers]) == trimmers)
  6585.         {
  6586.             abort("Tried using a rusty hedge trimmer but that didn't seem to work");
  6587.         }
  6588.         string page = visit_url("main.php");
  6589.         if((contains_text(page, "choice.php")) && (!contains_text(page, "Really Sticking Her Neck Out")) && (!contains_text(page, "It Came from Beneath the Sewer?")))
  6590.         {
  6591.             print("Inside of a Rusty Hedge Trimmer sequence.", "blue");
  6592.         }
  6593.         else
  6594.         {
  6595.             print("Rusty Hedge Trimmer Sequence completed itself.", "blue");
  6596.             return true;
  6597.         }
  6598.     }
  6599.  
  6600.     if(ccAdvBypass(297, $location[Twin Peak]))
  6601.     {
  6602.         return true;
  6603.     }
  6604.     string page = visit_url("main.php");
  6605.     if((contains_text(page, "choice.php")) && (!contains_text(page, "Really Sticking Her Neck Out")) && (!contains_text(page, "It Came from Beneath the Sewer?")))
  6606.     {
  6607.         if(attemptNum == 1)
  6608.         {
  6609.             visit_url("choice.php?pwd&whichchoice=606&option=1&choiceform1=Investigate+Room+237");
  6610.             visit_url("choice.php?pwd&whichchoice=607&option=1&choiceform1=Carefully+inspect+the+body");
  6611.         }
  6612.         else if(attemptNum == 2)
  6613.         {
  6614.             visit_url("choice.php?pwd&whichchoice=606&option=2&choiceform2=Search+the+pantry");
  6615.             visit_url("choice.php?pwd&whichchoice=608&option=1&choiceform1=Search+the+shelves");
  6616.         }
  6617.         else if(attemptNum == 3)
  6618.         {
  6619.             visit_url("choice.php?pwd&whichchoice=606&option=3&choiceform3=Follow+the+faint+sound+of+music");
  6620.             visit_url("choice.php?pwd&whichchoice=609&option=1&choiceform1=Examine+the+painting");
  6621.             visit_url("choice.php?pwd&whichchoice=616&option=1&choiceform1=Mingle");
  6622.         }
  6623.         else if(attemptNum == 4)
  6624.         {
  6625.             visit_url("choice.php?pwd&whichchoice=606&option=4&choiceform4=Wait+--+who%27s+that%3F");
  6626.             visit_url("choice.php?pwd&whichchoice=610&option=1&choiceform1=Pursue+your+double");
  6627.             visit_url("choice.php?pwd&whichchoice=1056&option=1&choiceform1=And+then...");
  6628.         }
  6629.         return true;
  6630.     }
  6631.     else
  6632.     {
  6633.         ccAdv(1, $location[Twin Peak]);
  6634.     }
  6635.     return true;
  6636. }
  6637.  
  6638. boolean L9_oilPeak()
  6639. {
  6640.     if(get_property("cc_oilpeak") != "")
  6641.     {
  6642.         return false;
  6643.     }
  6644.  
  6645.     print("Oil Peak with ML: " + monster_level_adjustment(), "blue");
  6646.  
  6647.     if(contains_text(visit_url("place.php?whichplace=highlands"), "fire3.gif"))
  6648.     {
  6649.         if(item_amount($item[bubblin\' crude]) >= 12)
  6650.         {
  6651.             cli_execute("make jar of oil");
  6652.             set_property("cc_oilpeak", "finished");
  6653.             return true;
  6654.         }
  6655.         if(item_amount($item[Jar of oil]) > 0)
  6656.         {
  6657.             set_property("cc_oilpeak", "finished");
  6658.             return true;
  6659.         }
  6660.         print("Oil Peak is finished but we need more crude!", "blue");
  6661.     }
  6662.  
  6663.     buffMaintain($effect[Litterbug], 0, 1, 1);
  6664.     buffMaintain($effect[Tortious], 0, 1, 1);
  6665.     buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  6666.     handleInitFamiliar();
  6667.  
  6668.     if((my_class() == $class[Ed]) && get_property("cc_dickstab").to_boolean())
  6669.     {
  6670.         buffMaintain($effect[The Dinsey Look], 0, 1, 1);
  6671.     }
  6672.     ccAdv(1, $location[Oil Peak]);
  6673.     handleFamiliar($familiar[Adventurous Spelunker]);
  6674.     return true;
  6675. }
  6676.  
  6677. boolean L9_chasmBuild()
  6678. {
  6679.     if((my_level() < 9) || (get_property("chasmBridgeProgress").to_int() >= 30))
  6680.     {
  6681.         return false;
  6682.     }
  6683.     if(LX_getDictionary() || LX_dictionary())
  6684.     {
  6685.         return true;
  6686.     }
  6687.     print("Chasm time", "blue");
  6688.     if(item_amount($item[fancy oil painting]) > 0)
  6689.     {
  6690.         visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6691.     }
  6692.     if(item_amount($item[bridge]) > 0)
  6693.     {
  6694.         visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6695.     }
  6696.  
  6697.     if((my_class() == $class[Ed]) && !get_property("cc_chasmBusted").to_boolean())
  6698.     {
  6699.         print("What a nice bridge over here...." , "green");
  6700.  
  6701.         string page = visit_url("place.php?whichplace=orc_chasm&action=bridge_done");
  6702.         ccAdvBypass("place.php?whichplace=orc_chasm&action=bridge_done", $location[The Smut Orc Logging Camp]);
  6703.  
  6704.         set_property("cc_chasmBusted", true);
  6705.         set_property("chasmBridgeProgress", 0);
  6706.         return true;
  6707.     }
  6708.  
  6709.     if(in_hardcore())
  6710.     {
  6711.         int need = (30 - get_property("chasmBridgeProgress").to_int());
  6712.         if((my_class() == $class[Ed]) && (need > 3) && (item_amount($item[Disassembled Clover]) > 2))
  6713.         {
  6714.             use(1, $item[disassembled clover]);
  6715.             visit_url("adventure.php?snarfblat=295&confirm=on");
  6716.             if(contains_text(visit_url("main.php"), "Combat"))
  6717.             {
  6718.                 ccAdv(1, $location[The Smut Orc Logging Camp]);
  6719.                 return true;
  6720.             }
  6721.             visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6722.             return true;
  6723.         }
  6724.  
  6725.         ccAdv(1, $location[The Smut Orc Logging Camp]);
  6726.  
  6727.         if(item_amount($item[Smut Orc Keepsake Box]) > 0)
  6728.         {
  6729.             use(1, $item[Smut Orc Keepsake Box]);
  6730.         }
  6731.         visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6732.         if(get_property("chasmBridgeProgress").to_int() >= 30)
  6733.         {
  6734.             visit_url("place.php?whichplace=highlands&action=highlands_dude");
  6735.         }
  6736.         return true;
  6737.     }
  6738.  
  6739.     int need = (30 - get_property("chasmBridgeProgress").to_int()) / 5;
  6740.     if(need > 0)
  6741.     {
  6742.         while((need > 0) && (item_amount($item[Snow Berries]) >= 2))
  6743.         {
  6744.             cli_execute("make 1 snow boards");
  6745.             need = need - 1;
  6746.             visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6747.         }
  6748.     }
  6749.  
  6750.     need = 30 - get_property("chasmBridgeProgress").to_int();
  6751.     if((need <= 3) && (need >= 1) && (item_amount($item[Disassembled Clover]) > 0))
  6752.     {
  6753.         use(1, $item[disassembled clover]);
  6754.         visit_url("adventure.php?snarfblat=295&confirm=on");
  6755.         if(contains_text(visit_url("main.php"), "Combat"))
  6756.         {
  6757.             //run_combat();
  6758.             ccAdv(1, $location[The Smut Orc Logging Camp]);
  6759.             return true;
  6760.         }
  6761.         visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6762.     }
  6763.     else
  6764.     {
  6765.         ccAdv(1, $location[The Smut Orc Logging Camp]);
  6766.         visit_url("place.php?whichplace=orc_chasm&action=bridge"+(to_int(get_property("chasmBridgeProgress"))));
  6767.         return true;
  6768.         #abort("Umm.... we failed the smut orcs. Sorry bro.");
  6769.     }
  6770.     if(get_property("chasmBridgeProgress").to_int() < 30)
  6771.     {
  6772.         abort("Umm.... we failed the smut orcs. Sorry bro.");
  6773.         abort("Our chasm bridge situation is borken. Beep boop.");
  6774.     }
  6775.     visit_url("place.php?whichplace=highlands&action=highlands_dude");
  6776.     return true;
  6777. }
  6778.  
  6779. boolean LX_dictionary()
  6780. {
  6781.     if(item_amount($item[abridged dictionary]) == 1)
  6782.     {
  6783.         if(knoll_available() || (get_property("questM01Untinker") == "finished"))
  6784.         {
  6785.             print("Untinkering dictionary", "blue");
  6786.             cli_execute("untinker abridged dictionary");
  6787.         }
  6788.     }
  6789.     return false;
  6790. }
  6791.  
  6792. boolean L9_chasmStart()
  6793. {
  6794.     if(my_level() < 9)
  6795.     {
  6796.         return false;
  6797.     }
  6798.     if((my_class() == $class[Ed]) && !get_property("cc_chasmBusted").to_boolean())
  6799.     {
  6800.         print("It's a troll on a bridge!!!!", "blue");
  6801.  
  6802.         string page = visit_url("place.php?whichplace=orc_chasm&action=bridge_done");
  6803.         ccAdvBypass("place.php?whichplace=orc_chasm&action=bridge_done", $location[The Smut Orc Logging Camp]);
  6804.  
  6805.         set_property("cc_chasmBusted", true);
  6806.         set_property("chasmBridgeProgress", 0);
  6807.         return true;
  6808.     }
  6809.     return false;
  6810. }
  6811.  
  6812.  
  6813. boolean L11_talismanOfNam()
  6814. {
  6815.     if(my_level() < 11)
  6816.     {
  6817.         return false;
  6818.     }
  6819.     if(item_amount($item[Talisman O\' Namsilat]) > 0 || have_equipped($item[Talisman O\' Namsilat]))
  6820.     {
  6821.         set_property("cc_swordfish", "finished");
  6822.         set_property("cc_gaudy", "finished");
  6823.     }
  6824.     if(get_property("cc_swordfish") == "finished")
  6825.     {
  6826.         if(item_amount($item[Talisman O\' Namsilat]) == 0 && have_equipped($item[Talisman O\' Namsilat]) == false)
  6827.         {
  6828.             print("We should have a talisman o' namsilat but we don't know about it, refreshing inventory", "red");
  6829.             cli_execute("refresh inv");
  6830.         }
  6831.         return false;
  6832.     }
  6833.     if(get_property("cc_mcmuffin") != "start")
  6834.     {
  6835.         return false;
  6836.     }
  6837.     if(!possessEquipment($item[Pirate Fledges]))
  6838.     {
  6839.         return false;
  6840.     }
  6841.     if((get_property("cc_war") == "finished") || (get_property("cc_prewar") == ""))
  6842.     {
  6843.         equip($slot[acc3], $item[pirate fledges]);
  6844.         if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  6845.         {
  6846.             handleBjornify($familiar[grimstone golem]);
  6847.         }
  6848.         if(my_mp() > 60)
  6849.         {
  6850.             handleBjornify($familiar[grimstone golem]);
  6851.         }
  6852.         set_property("choiceAdventure189", "1");
  6853.         set_property("oceanAction", "continue");
  6854.         set_property("oceanDestination", to_lower_case(my_primestat()));
  6855.         handleInitFamiliar();
  6856.  
  6857.         if(get_property("cc_gaudy") == "")
  6858.         {
  6859.             print("It always be swordfish.", "blue");
  6860.             ccAdv(1, $location[The Poop Deck]);
  6861.             if(contains_text(get_property("lastEncounter"), "It\'s Always Swordfish"))
  6862.             {
  6863.                 set_property("cc_gaudy", "start");
  6864.             }
  6865.         }
  6866.         else
  6867.         {
  6868.             if((item_amount($item[gaudy key]) < 2) && (item_amount($item[Talisman O\' Namsilat]) < 1) && have_equipped($item[Talisman O\' Namsilat]) == false)
  6869.             {
  6870.                 print("Well, need to farm gaudy keys I suppose... sigh.", "blue");
  6871.                 ccAdv(1, $location[Belowdecks]);
  6872.                 handleFamiliar($familiar[Adventurous Spelunker]);
  6873.                 return true;
  6874.             }
  6875.             set_property("cc_gaudy", "finished");
  6876.             set_property("cc_swordfish", "finished");
  6877.             use(1, $item[gaudy key]);
  6878.             use(1, $item[gaudy key]);
  6879.         }
  6880.         handleFamiliar($familiar[Adventurous Spelunker]);
  6881.         return true;
  6882.     }
  6883.     return false;
  6884. }
  6885.  
  6886. boolean L11_mcmuffinDiary()
  6887. {
  6888.     if(my_level() < 11)
  6889.     {
  6890.         return false;
  6891.     }
  6892.     if(my_adventures() <= 4)
  6893.     {
  6894.         return false;
  6895.     }
  6896.     if(my_meat() < 500)
  6897.     {
  6898.         return false;
  6899.     }
  6900.     if(item_amount($item[Forged Identification Documents]) == 0)
  6901.     {
  6902.         return false;
  6903.     }
  6904.  
  6905.     print("Getting the McMuffin Diary", "blue");
  6906.     set_property("choiceAdventure793", "1");
  6907.     ccAdv(1, $location[The Shore\, Inc. Travel Agency]);
  6908.     use(item_amount($item[Your Father\'s Macguffin Diary]), $item[your father\'s macguffin diary]);
  6909.     use(item_amount($item[Copy of a Jerk Adventurer\'s Father\'s Diary]), $item[Copy of a Jerk Adventurer\'s Father\'s Diary]);
  6910.     set_property("cc_mcmuffin", "start");
  6911.     return true;
  6912. }
  6913.  
  6914. boolean L11_forgedDocuments()
  6915. {
  6916.     if(my_level() < 11)
  6917.     {
  6918.         return false;
  6919.     }
  6920.     if(!black_market_available())
  6921.     {
  6922.         return false;
  6923.     }
  6924.     if(get_property("cc_mcmuffin") != "")
  6925.     {
  6926.         return false;
  6927.     }
  6928.     if(get_property("cc_blackmap") == "finished")
  6929.     {
  6930.         return false;
  6931.     }
  6932.     if(item_amount($item[Forged Identification Documents]) != 0)
  6933.     {
  6934.         return false;
  6935.     }
  6936.     if(my_meat() < 5500)
  6937.     {
  6938.         return false;
  6939.     }
  6940.  
  6941.     print("Getting the McMuffin Book", "blue");
  6942.     buyUpTo(1, $item[forged identification documents]);
  6943.     handleFamiliar($familiar[Adventurous Spelunker]);
  6944.     set_property("cc_blackmap", "finished");
  6945.     return true;
  6946.  
  6947. }
  6948.  
  6949.  
  6950. boolean L11_blackMarket()
  6951. {
  6952.     if(my_level() < 11)
  6953.     {
  6954.         return false;
  6955.     }
  6956.     if(get_property("cc_blackmap") != "")
  6957.     {
  6958.         return false;
  6959.     }
  6960.     if(black_market_available())
  6961.     {
  6962.         set_property("cc_blackmap", "document");
  6963.         return false;
  6964.     }
  6965.     if($location[The Black Forest].turns_spent > 12)
  6966.     {
  6967.         print("We have spent a bit many adventures in The Black Forest... manually checking", "red");
  6968.         visit_url("place.php?whichplace=woods");
  6969.         if($location[The Black Forest].turns_spent > 30)
  6970.         {
  6971.             abort("We have spent too many turns in The Black Forest and haven't found The Black Market. Something is wrong. (Find Black Forest, set cc_blackmap=document, do not buy Forged Identification Documents");
  6972.         }
  6973.     }
  6974.  
  6975.     print("Must find the Black Market: " + get_property("blackForestProgress"), "blue");
  6976.     if(get_property("cc_blackfam").to_boolean())
  6977.     {
  6978.         council();
  6979.         handleFamiliar($familiar[reassembled blackbird]);
  6980.         pullXWhenHaveY($item[blackberry galoshes], 1, 0);
  6981.         set_property("cc_blackfam", false);
  6982.         set_property("choiceAdventure923", "1");
  6983.     }
  6984.  
  6985.     if(get_property("cc_getBeehive").to_boolean())
  6986.     {
  6987.         set_property("choiceAdventure924", "3");
  6988.         set_property("choiceAdventure1018", "1");
  6989.         set_property("choiceAdventure1019", "1");
  6990.     }
  6991.     else
  6992.     {
  6993.         set_property("choiceAdventure924", "1");
  6994.     }
  6995.  
  6996.     if(item_amount($item[blackberry galoshes]) == 1)
  6997.     {
  6998.         equip($slot[acc3], $item[blackberry galoshes]);
  6999.     }
  7000.  
  7001.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  7002.     {
  7003.         handleBjornify($familiar[grimstone golem]);
  7004.     }
  7005.     else
  7006.     {
  7007.         handleBjornify($familiar[Grim Brother]);
  7008.     }
  7009.  
  7010.     handleFamiliar($familiar[reassembled blackbird]);
  7011.  
  7012.     if(!possessEquipment($item[Blackberry Galoshes]) && (item_amount($item[Blackberry]) >= 3))
  7013.     {
  7014.         set_property("choiceAdventure924", "2");
  7015.         set_property("choiceAdventure928", "4");
  7016.     }
  7017.  
  7018.     ccAdv(1, $location[The Black Forest]);
  7019.     if(black_market_available())
  7020.     {
  7021.         buyUpTo(1, $item[can of black paint]);
  7022.         handleFamiliar($familiar[Adventurous Spelunker]);
  7023.         set_property("cc_blackmap", "document");
  7024.         if(my_meat() >= 5000)
  7025.         {
  7026.             buyUpTo(1, $item[forged identification documents]);
  7027.             set_property("cc_blackmap", "finished");
  7028.         }
  7029.     }
  7030.     return true;
  7031. }
  7032.  
  7033. boolean L11_holeInTheSky()
  7034. {
  7035.     if(my_level() < 11)
  7036.     {
  7037.         return false;
  7038.     }
  7039.     if(!get_property("cc_getStarKey").to_boolean())
  7040.     {
  7041.         return false;
  7042.     }
  7043.     if(item_amount($item[steam-powered model rocketship]) == 0)
  7044.     {
  7045.         return false;
  7046.     }
  7047.     if(contains_text(get_property("nsTowerDoorKeysUsed"),"star key"))
  7048.     {
  7049.         set_property("cc_getStarKey", false);
  7050.         return false;
  7051.     }
  7052.     if(item_amount($item[Richard\'s Star Key]) > 0)
  7053.     {
  7054.         set_property("cc_getStarKey", false);
  7055.         return false;
  7056.     }
  7057.     if((item_amount($item[star]) >= 8) && (item_amount($item[line]) >= 7))
  7058.     {
  7059.         if(!in_hardcore())
  7060.         {
  7061.             set_property("cc_getStarKey", false);
  7062.             return false;
  7063.         }
  7064.         else if(item_amount($item[Star Chart]) > 0)
  7065.         {
  7066.             set_property("cc_getStarKey", false);
  7067.             return false;
  7068.         }
  7069.     }
  7070.     ccAdv(1, $location[The Hole In The Sky]);
  7071.     return true;
  7072. }
  7073.  
  7074. boolean L5_haremOutfit()
  7075. {
  7076.     if(my_level() < 5)
  7077.     {
  7078.         return false;
  7079.     }
  7080.     if(get_property("questL05Goblin") == "finished")
  7081.     {
  7082.         return false;
  7083.     }
  7084.     if(possessEquipment($item[Knob Goblin Harem Veil]) && possessEquipment($item[Knob Goblin Harem Pants]))
  7085.     {
  7086.         return false;
  7087.     }
  7088.  
  7089.     if(have_effect($effect[Everything Looks Yellow]) > 0)
  7090.     {
  7091.         return false;
  7092.     }
  7093.  
  7094.     if(my_path() == "Heavy Rains")
  7095.     {
  7096.         if(have_skill($skill[Ball Lightning]) && (my_lightning() >= 5))
  7097.         {
  7098.             buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  7099.             print("Ditch attempt at the Harem Girl", "blue");
  7100.         }
  7101.         else if(!in_hardcore())
  7102.         {
  7103.             return false;
  7104.         }
  7105.     }
  7106.  
  7107.     handleFamiliar($familiar[Crimbo Shrub]);
  7108.     if((my_familiar() == $familiar[Crimbo Shrub]) && (!get_property("_shrubDecorated").to_boolean()))
  7109.     {
  7110.         visit_url("inv_use.php?pwd=&which=3&whichitem=7958");
  7111.         visit_url("choice.php?pwd=&whichchoice=999&option=1&topper=1&lights=1&garland=1&gift=1");
  7112.         print("Time to bring Crimbo Fun to the Harem!", "blue");
  7113.     }
  7114.     ccAdv(1, $location[Cobb\'s Knob Harem]);
  7115.     handleFamiliar($familiar[Adventurous Spelunker]);
  7116.     return true;
  7117. }
  7118.  
  7119. boolean LX_getDictionary()
  7120. {
  7121.     if(item_amount($item[abridged dictionary]) == 1)
  7122.     {
  7123.         return false;
  7124.     }
  7125.     if(item_amount($item[dictionary]) == 1)
  7126.     {
  7127.         return false;
  7128.     }
  7129.     if(my_level() < 9)
  7130.     {
  7131.         return false;
  7132.     }
  7133.     if(my_meat() < 1000)
  7134.     {
  7135.         return false;
  7136.     }
  7137.     if((get_property("questL12War") != "unstarted") && ((get_property("questL12War") != "finished")))
  7138.     {
  7139.         return false;
  7140.     }
  7141.     buyUpTo(1, $item[abridged dictionary]);
  7142.     if(item_amount($item[abridged dictionary]) == 0)
  7143.     {  
  7144.         return false;
  7145.     }
  7146.     return true;
  7147. }
  7148.  
  7149. boolean LX_fcle()
  7150. {
  7151.     if(get_property("cc_pirateoutfit") != "finished")
  7152.     {
  7153.         return false;
  7154.     }
  7155.     LX_getDictionary();
  7156.     if(get_property("cc_fcle") != "")
  7157.     {
  7158.         return false;
  7159.     }
  7160.  
  7161.     if(possessEquipment($item[pirate fledges]))
  7162.     {
  7163.         set_property("cc_fcle", "finished");
  7164.         visit_url("store.php?whichstore=r");
  7165.         print("Updating Pirate Bookstore Item (" + get_property("lastPirateEphemeraReset") + "): " + get_property("lastPirateEphemera"), "blue");
  7166.         return true;
  7167.     }
  7168.  
  7169.     if(get_property("cc_prewar") != "")
  7170.     {
  7171.         if(get_property("cc_war") != "finished")
  7172.         {
  7173.             return false;
  7174.         }
  7175.     }
  7176.  
  7177.     switch(my_primestat())
  7178.     {
  7179.     case $stat[Muscle]:
  7180.         set_property("choiceAdventure191", 3);
  7181.         break;
  7182.     case $stat[Moxie]:
  7183.         set_property("choiceAdventure191", 1);
  7184.         break;
  7185.     case $stat[Mysticality]:
  7186.         if((my_class() == $class[Ed]) && (my_hp() < 20))
  7187.         {
  7188.             set_property("choiceAdventure191", 1);
  7189.         }
  7190.         else
  7191.         {
  7192.             set_property("choiceAdventure191", 4);
  7193.         }
  7194.         break;
  7195.     }
  7196.  
  7197.     if((item_amount($item[rigging shampoo]) == 1) && (item_amount($item[ball polish]) == 1) && (item_amount($item[mizzenmast mop]) == 1))
  7198.     {
  7199.         use(1, $item[rigging shampoo]);
  7200.         use(1, $item[ball polish]);
  7201.         use(1, $item[mizzenmast mop]);
  7202.         cli_execute("outfit swashbuckling getup");
  7203.         ccAdv(1, $location[The F\'c\'le]);
  7204.         return true;
  7205.     }
  7206.  
  7207.     buffMaintain($effect[Joyful Resolve], 0, 1, 1);
  7208.     if((my_class() == $class[Ed]) && (item_amount($item[Talisman of Renenutet]) == 0))
  7209.     {
  7210.         return false;
  7211.     }
  7212.  
  7213.     if(my_class() == $class[Ed])
  7214.     {
  7215.         if((have_effect($effect[Taunt of Horus]) == 0) && (item_amount($item[Talisman of Horus]) == 0) && !get_property("cc_dickstab").to_boolean())
  7216.         {
  7217.             return false;
  7218.         }
  7219.     }
  7220.     if(!uneffect($effect[Shelter Of Shed]))
  7221.     {
  7222.         print("Could not uneffect Shelter of Shed for F'C'le, delaying");
  7223.         return false;
  7224.     }
  7225.     buffMaintain($effect[Taunt of Horus], 0, 1, 1);
  7226.     print("Fcle time!", "blue");
  7227.     cli_execute("outfit swashbuckling getup");
  7228.     if(item_amount($item[numberwang]) > 0)
  7229.     {
  7230.         equip($slot[acc1], $item[numberwang]);
  7231.     }
  7232.  
  7233.     ccAdv(1, $location[The F\'c\'le]);
  7234.     return true;
  7235. }
  7236.  
  7237.  
  7238. boolean LX_pirateBeerPong()
  7239. {
  7240.     if(get_property("cc_pirateoutfit") != "almost")
  7241.     {
  7242.         return false;
  7243.     }
  7244.     cli_execute("outfit swashbuckling getup");
  7245.     LX_getDictionary();
  7246.     string page = tryBeerPong();
  7247.     if(contains_text(page, "victory laps"))
  7248.     {
  7249.         set_property("cc_pirateoutfit", "finished");
  7250.     }
  7251.     else if(contains_text(page, "Combat"))
  7252.     {
  7253.         ccAdv(1, $location[barrrney\'s barrr]);
  7254.     }
  7255.     return true;
  7256. }
  7257.  
  7258. boolean LX_nastyBooty()
  7259. {
  7260.     if(item_amount($item[Cap\'m Caronch\'s Map]) == 0)
  7261.     {
  7262.         return false;
  7263.     }
  7264.     if(item_amount($item[Cap\'m Caronch\'s Nasty Booty]) != 0)
  7265.     {
  7266.         return false;
  7267.     }
  7268.     if(my_class() == $class[Ed])
  7269.     {
  7270.         handleServant($servant[Cat]);
  7271.     }
  7272. #   cli_execute("outfit swashbuckling getup");
  7273.     if((my_class() == $class[Ed]) && possessEquipment($item[The Crown of Ed the Undying]))
  7274.     {
  7275.         adjustEdHat("weasel");
  7276.     }
  7277.  
  7278.     string page = "inv_use.php?pwd=&which=3&whichitem=2950";
  7279.     ccAdvBypass(page, $location[Noob Cave]);
  7280.  
  7281.     return true;
  7282. }
  7283.  
  7284. boolean LX_pirateBlueprint()
  7285. {
  7286.     if(get_property("cc_pirateoutfit") != "blueprint")
  7287.     {
  7288.         return false;
  7289.     }
  7290.     if((my_class() == $class[Ed]) && (my_maxhp() < 70))
  7291.     {
  7292.         if((item_amount($item[Cap\'m Caronch\'s Map]) != 0) && (item_amount($item[Cap\'m Caronch\'s Nasty Booty]) == 0))
  7293.         {
  7294.             return false;
  7295.         }
  7296.     }
  7297.  
  7298.     print("Trying to blueprint handle", "blue");
  7299.     LX_getDictionary();
  7300.     if(LX_nastyBooty())
  7301.     {
  7302.         return true;
  7303.     }
  7304.     if(item_amount($item[orcish frat house blueprints]) == 0)
  7305.     {
  7306.         cli_execute("outfit swashbuckling getup");
  7307.         ccAdv(1, $location[barrrney\'s barrr]);
  7308.         return true;
  7309.     }
  7310.     else
  7311.     {
  7312.         print("Crossdressing (even if you are female) as a sorority girl!", "blue");
  7313.         set_property("choiceAdventure188", "3");
  7314.         if(knoll_available())
  7315.         {
  7316.             buyUpTo(1, $item[frilly skirt]);
  7317.         }
  7318.         else if(!possessEquipment($item[Frilly Skirt]))
  7319.         {
  7320.             ccAdv(1, $location[The Degrassi Knoll Gym]);
  7321.             return true;
  7322.         }
  7323.  
  7324.  
  7325.         if(item_amount($item[Hot Wing]) < 3)
  7326.         {
  7327.             return false;
  7328.         }
  7329.         if(equipped_item($slot[pants]) != $item[Frilly Skirt])
  7330.         {
  7331.             equip($item[Frilly Skirt]);
  7332.         }
  7333.  
  7334.         use(1, $item[orcish frat house blueprints]);
  7335.         set_property("cc_pirateoutfit", "almost");
  7336.         return true;
  7337.     }
  7338. }
  7339.  
  7340. boolean LX_pirateInsults()
  7341. {
  7342.     if(get_property("cc_pirateoutfit") != "insults")
  7343.     {
  7344.         return false;
  7345.     }
  7346.  
  7347.     if((my_class() == $class[Ed]) && (my_maxhp() < 70))
  7348.     {
  7349.         if((item_amount($item[Cap\'m Caronch\'s Map]) != 0) && (item_amount($item[Cap\'m Caronch\'s Nasty Booty]) == 0))
  7350.         {
  7351.             return false;
  7352.         }
  7353.     }
  7354.  
  7355.     print("Insult gathering party.", "blue");
  7356.     if(LX_nastyBooty())
  7357.     {
  7358.         return true;
  7359.     }
  7360.     cli_execute("outfit swashbuckling getup");
  7361.     LX_getDictionary();
  7362.  
  7363.     if((item_amount($item[the big book of pirate insults]) == 0) && (my_meat() > 500))
  7364.     {
  7365.         buyUpTo(1, $item[the big book of pirate insults]);
  7366.     }
  7367.     if(item_amount($item[the big book of pirate insults]) == 0)
  7368.     {
  7369.         return false;
  7370.     }
  7371.  
  7372.     buyUpTo(1, $item[hair spray]);
  7373.     buffMaintain($effect[Butt-Rock Hair], 0, 1, 1);
  7374.     if((my_class() == $class[Seal Clubber]) || (my_class() == $class[Turtle Tamer]))
  7375.     {
  7376.         buyUpTo(1, $item[Ben-Gal&trade; Balm]);
  7377.         buyUpTo(1, $item[Blood of the Wereseal]);
  7378.         buffMaintain($effect[Go Get \'Em\, Tiger!], 0, 1, 1);
  7379.         buffMaintain($effect[Temporary Lycanthropy], 0, 1, 1);
  7380.     }
  7381.  
  7382. #   cli_execute("refresh inv");
  7383.  
  7384.     if(numPirateInsults() < 7)
  7385.     {
  7386.         ccAdv(1, $location[barrrney\'s barrr]);
  7387.         return true;
  7388.     }
  7389.     set_property("cc_pirateoutfit", "blueprint");
  7390.     return false;
  7391. }
  7392.  
  7393. boolean LX_pirateOutfit()
  7394. {
  7395.     if(get_property("cc_pirateoutfit") != "")
  7396.     {
  7397.         return false;
  7398.     }
  7399.     if(item_amount($item[Dingy Dinghy]) == 0)
  7400.     {
  7401.         return false;
  7402.     }
  7403.  
  7404.     if((possessEquipment($item[eyepatch])) && (possessEquipment($item[swashbuckling pants])) && (possessEquipment($item[stuffed shoulder parrot])))
  7405.     {
  7406.         if(item_amount($item[the big book of pirate insults]) == 1)
  7407.         {
  7408.             set_property("cc_pirateoutfit", "insults");
  7409.             return true;
  7410.         }
  7411.         if((item_amount($item[the big book of pirate insults]) == 0) && (my_meat() > 500))
  7412.         {
  7413.             set_property("cc_pirateoutfit", "insults");
  7414.             buyUpTo(1, $item[the big book of pirate insults]);
  7415.             return true;
  7416.         }
  7417.     }
  7418.     else
  7419.     {
  7420.         if((my_class() == $class[Ed]) && !possessEquipment($item[stuffed shoulder parrot]))
  7421.         {
  7422.             if(my_hp() <= 3)
  7423.             {
  7424.                 return false;
  7425.             }
  7426.         }
  7427.  
  7428.  
  7429.         print("Searching for a pirate outfit.", "blue");
  7430.         if(possessEquipment($item[eyepatch]))
  7431.         {
  7432.             set_property("choiceAdventure22", "2");
  7433.             if(possessEquipment($item[swashbuckling pants]))
  7434.             {
  7435.                 set_property("choiceAdventure22", "3");
  7436.             }
  7437.         }
  7438.         else
  7439.         {
  7440.             set_property("choiceAdventure22", "1");
  7441.         }
  7442.  
  7443.         if(possessEquipment($item[stuffed shoulder parrot]))
  7444.         {
  7445.             set_property("choiceAdventure23", "2");
  7446.             if(possessEquipment($item[swashbuckling pants]))
  7447.             {
  7448.                 set_property("choiceAdventure23", "3");
  7449.             }
  7450.         }
  7451.         else
  7452.         {
  7453.             set_property("choiceAdventure23", "1");
  7454.         }
  7455.  
  7456.         if(possessEquipment($item[stuffed shoulder parrot]))
  7457.         {
  7458.             set_property("choiceAdventure24", "3");
  7459.             if(possessEquipment($item[eyepatch]))
  7460.             {
  7461.                 set_property("choiceAdventure24", "2");
  7462.             }
  7463.         }
  7464.         else
  7465.         {
  7466.             set_property("choiceAdventure24", "1");
  7467.         }
  7468.  
  7469.         if(item_amount($item[the big book of pirate insults]) == 0)
  7470.         {
  7471.             if(!in_hardcore() || (pulls_remaining() > 0))
  7472.             {
  7473.                 pullXWhenHaveY($item[The Big Book of Pirate Insults], 1, 0);
  7474.                 if(item_amount($item[the big book of pirate insults]) == 0)
  7475.                 {
  7476.                     abort("Do not have a pirate insult book, fix that and run again");
  7477.                 }
  7478.             }
  7479.         }
  7480.         if(my_class() == $class[Ed])
  7481.         {
  7482.             change_mcd(0);
  7483.         }
  7484.         ccAdv(1, $location[The Obligatory Pirate\'s Cove]);
  7485.         return true;
  7486.     }
  7487.     return false;
  7488. }
  7489.  
  7490.  
  7491. boolean L8_trapperYeti()
  7492. {
  7493.     if(get_property("cc_trapper") != "yeti")
  7494.     {
  7495.         return false;
  7496.     }
  7497.  
  7498.     if(!have_skill($skill[Rain Man]) && (pulls_remaining() >= 3))
  7499.     {
  7500.         if(item_amount($item[Ninja Rope]) == 0)
  7501.         {
  7502.             pullXWhenHaveY($item[Ninja Rope], 1, 0);
  7503.         }
  7504.         if(item_amount($item[Ninja Crampons]) == 0)
  7505.         {
  7506.             pullXWhenHaveY($item[Ninja Crampons], 1, 0);
  7507.         }
  7508.         if(item_amount($item[Ninja Carabiner]) == 0)
  7509.         {
  7510.             pullXWhenHaveY($item[Ninja Carabiner], 1, 0);
  7511.         }
  7512.     }
  7513.  
  7514.     if((item_amount($item[Ninja Rope]) >= 1) && (item_amount($item[Ninja Carabiner]) >= 1) && (item_amount($item[Ninja Crampons]) >= 1))
  7515.     {
  7516.         if(elemental_resist($element[cold]) < 5)
  7517.         {
  7518.             buffMaintain($effect[Astral Shell], 10, 1, 1);
  7519.             buffMaintain($effect[Elemental Saucesphere], 10, 1, 1);
  7520.             buffMaintain($effect[Hide of Sobek], 10, 1, 1);
  7521.         }
  7522.         if(elemental_resist($element[cold]) >= 5)
  7523.         {
  7524.             if(get_property("cc_mistypeak") == "")
  7525.             {
  7526.                 set_property("cc_ninjasnowmanassassin", "1");
  7527.                 visit_url("place.php?whichplace=mclargehuge&action=trappercabin");
  7528.                 visit_url("place.php?whichplace=mclargehuge&action=cloudypeak");
  7529.                 set_property("cc_mistypeak", "done");
  7530.             }
  7531.  
  7532.             print("Time to take out Gargle", "blue");
  7533.             if((item_amount($item[Groar\'s Fur]) == 0) && (item_amount($item[Winged Yeti Fur]) == 0))
  7534.             {
  7535.                 //If this returns false, we might have finished already, can we check this?
  7536.                 ccAdv(1, $location[Mist-shrouded Peak]);
  7537.             }
  7538.             else
  7539.             {
  7540.                 visit_url("place.php?whichplace=mclargehuge&action=trappercabin");
  7541.                 autosell(5, $item[dense meat stack]);
  7542.                 set_property("cc_trapper", "finished");
  7543.                 council();
  7544.             }
  7545.             return true;
  7546.         }
  7547.     }
  7548.     else if(my_class() == $class[Ed])
  7549.     {
  7550.         if(get_property("questL08Trapper") == "step1")
  7551.         {
  7552.             set_property("questL08Trapper", "step2");
  7553.         }
  7554.         if((my_class() == $class[Ed]) && (item_amount($item[Talisman of Horus]) == 0))
  7555.         {
  7556.             return false;
  7557.         }
  7558.  
  7559.         if(my_class() == $class[Ed])
  7560.         {
  7561.             if((have_effect($effect[Taunt of Horus]) == 0) && (item_amount($item[Talisman of Horus]) == 0))
  7562.             {
  7563.                 return false;
  7564.             }
  7565.         }
  7566.         if((have_effect($effect[Thrice-Cursed]) > 0) || (have_effect($effect[Twice-Cursed]) > 0) || (have_effect($effect[Once-Cursed]) > 0))
  7567.         {
  7568.             return false;
  7569.         }
  7570.  
  7571.  
  7572.         if(!uneffect($effect[Shelter Of Shed]))
  7573.         {
  7574.             print("Could not uneffect Shelter of Shed for ninja snowmen, delaying");
  7575.             return false;
  7576.         }
  7577.         buffMaintain($effect[Taunt of Horus], 0, 1, 1);
  7578.         if(have_effect($effect[Taunt of Horus]) > 0)
  7579.         {
  7580.             if(!elementalPlanes_access($element[spooky]))
  7581.             {
  7582.                 adjustEdHat("myst");
  7583.             }
  7584.             ccAdv(1, $location[Lair of the Ninja Snowmen]);
  7585.             return true;
  7586.         }
  7587.     }
  7588.     return false;
  7589. }
  7590.  
  7591. boolean cc_tavern()
  7592. {
  7593.     if(get_property("cc_tavern") == "finished")
  7594.     {
  7595.         return false;
  7596.     }
  7597.     visit_url("cellar.php");
  7598.     # Mafia usually fixes tavernLayout when we visit the cellar. However, it sometimes leaves it in a broken state so we can't guarantee this will actually help. However, it will result in no net change in tavernLayout so at least we can abort.
  7599.     string tavern = get_property("tavernLayout");
  7600.     if(index_of(tavern, "3") != -1)
  7601.     {
  7602.         set_property("cc_tavern", "finished");
  7603.         return true;
  7604.     }
  7605.     print("In the tavern! Layout: " + tavern, "blue");
  7606.     boolean [int] locations = $ints[3, 2, 1, 0, 5, 10, 15, 20, 16, 21];
  7607.     foreach loc in locations
  7608.     {
  7609.         tavern = get_property("tavernLayout");
  7610.         if(char_at(tavern, loc) == "0")
  7611.         {
  7612.             int actual = loc + 1;
  7613.             #string newTavern = substring(tavern, 0, loc) + "1" + substring(tavern, loc+1, 25);
  7614.             #set_property("tavernLayout", newTavern);
  7615.             boolean needReset = false;
  7616.             #string page = visit_url("cellar.php?action=explore&whichspot=" + actual);
  7617.  
  7618.             if(ccAdvBypass("cellar.php?action=explore&whichspot=" + actual))
  7619.             {
  7620.                 return true;
  7621.             }
  7622.  
  7623.             string page = visit_url("main.php");
  7624.             if(contains_text(page, "You've already explored that spot."))
  7625.             {
  7626.                 needReset = true;
  7627.                 print("tavernLayout is not reporting places we've been to.", "red");
  7628.             }
  7629.             if(contains_text(page, "Darkness (5,5)"))
  7630.             {
  7631.                 needReset = true;
  7632.                 print("tavernLayout is reporting too many places as visited.", "red");
  7633.             }
  7634.  
  7635.             #page = visit_url("main.php");
  7636.             #if(contains_text(page, "Combat"))
  7637.             #{
  7638.             #   ccAdv(1, $location[Noob Cave]);
  7639.             #}
  7640.             if(contains_text(page, "whichchoice value=") || contains_text(page, "whichchoice="))
  7641.             {
  7642.                 adv1($location[Noob Cave], 1, "");
  7643.             }
  7644.             if(last_monster() == $monster[Crate])
  7645.             {
  7646.                 if(get_property("cc_newbieOverride").to_boolean())
  7647.                 {
  7648.                     set_property("cc_newbieOverride", false);
  7649.                 }
  7650.                 else
  7651.                 {
  7652.                     abort("We went to the Noob Cave for reals... uh oh");
  7653.                 }
  7654.             }
  7655.             if(get_property("lastEncounter") == "Like a Bat Into Hell")
  7656.             {
  7657.                 abort("Got stuck undying while trying to do the tavern. Must handle manualy and then resume.");
  7658.             }
  7659.  
  7660.             if(needReset)
  7661.             {
  7662.                 print("We attempted a tavern adventure but the tavern layout was not maintained properly.", "red");
  7663.                 print("Attempting to reset this issue...", "red");
  7664.                 set_property("tavernLayout", "0000100000000000000000000");
  7665.                 visit_url("cellar.php");
  7666.             }
  7667.             return true;
  7668.         }
  7669.     }
  7670.     print("We found no valid location to tavern, something went wrong...", "red");
  7671.     print("Attempting to reset this issue...", "red");
  7672.     set_property("tavernLayout", "0000100000000000000000000");
  7673.     wait(5);
  7674.     return true;
  7675. }
  7676.  
  7677. boolean L3_tavern()
  7678. {
  7679.     if(get_property("cc_tavern") == "finished")
  7680.     {
  7681.         return false;
  7682.     }
  7683.     if(my_adventures() < 5)
  7684.     {
  7685.         return false;
  7686.     }
  7687.     if(get_counters("Fortune Cookie", 0, 10) == "Fortune Cookie")
  7688.     {
  7689.         return false;
  7690.     }
  7691.  
  7692.     int mpNeed = 0;
  7693.     if(have_skill($skill[The Sonata of Sneakiness]))
  7694.     {
  7695.         mpNeed = mpNeed + 20;
  7696.     }
  7697.     if(have_skill($skill[Musk of the Moose]))
  7698.     {
  7699.         mpNeed = mpNeed + 10;
  7700.     }
  7701.  
  7702.     if(my_class() == $class[Ed])
  7703.     {
  7704.         set_property("choiceAdventure1000", "1");
  7705.         set_property("choiceAdventure1001", "2");
  7706.         if((my_mp() < 15) && have_skill($skill[Shelter of Shed]))
  7707.         {
  7708.             return false;
  7709.         }
  7710.     }
  7711.     else if((have_effect($effect[In A Lather]) == 0) || (my_mp() < mpNeed))
  7712.     {
  7713.         if((my_daycount() <= 2) && (my_level() <= 11))
  7714.         {
  7715.             return false;
  7716.         }
  7717.     }
  7718.     print("Doing Tavern", "blue");
  7719.     if(have_effect($effect[In A Lather]) > 0)
  7720.     {
  7721.         set_property("choiceAdventure513", "2");
  7722.         set_property("choiceAdventure514", "2");
  7723.         set_property("choiceAdventure515", "2");
  7724.         set_property("choiceAdventure496", "2");
  7725.     }
  7726.     else
  7727.     {
  7728.         set_property("choiceAdventure513", "1");
  7729.         set_property("choiceAdventure514", "1");
  7730.         set_property("choiceAdventure515", "1");
  7731.         set_property("choiceAdventure496", "1");
  7732.     }
  7733.  
  7734.     if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  7735.     {
  7736.         handleBjornify($familiar[grimstone golem]);
  7737.     }
  7738.  
  7739.     buffMaintain($effect[The Sonata of Sneakiness], 20, 1, 1);
  7740.     buffMaintain($effect[Smooth Movements], 10, 1, 1);
  7741.     buffMaintain($effect[Tortious], 0, 1, 1);
  7742.     buffMaintain($effect[Litterbug], 0, 1, 1);
  7743.     change_mcd(10);
  7744.  
  7745. #   cli_execute("ccs cc_default");
  7746.     while(cc_tavern())
  7747.     {
  7748.         if(my_adventures() <= 0)
  7749.         {
  7750.             abort("Ran out of adventures while doing the tavern.");
  7751.         }
  7752.         wait(4);
  7753.     }
  7754.     visit_url("tavern.php?place=barkeep");
  7755. #   tavern();
  7756. #   cli_execute("ccs null");
  7757.     set_property("cc_tavern", "finished");
  7758.     council();
  7759.     return true;
  7760. }
  7761.  
  7762.  
  7763.  
  7764. boolean LX_setBallroomSong()
  7765. {
  7766.     if((get_property("cc_ballroomopen") != "open") || (get_property("cc_ballroomsong") == "set"))
  7767.     {
  7768.         return false;
  7769.     }
  7770.     if(my_class() == $class[Ed])
  7771.     {
  7772.         return false;
  7773.     }
  7774.     if(to_int(get_property( "lastQuartetRequest" ))>0)
  7775.     {
  7776.         set_property("cc_ballroomsong",'set');
  7777.         //song is set
  7778.         return false;
  7779.     }
  7780.     if(my_mp() > 60)
  7781.     {
  7782.         handleBjornify($familiar[grimstone golem]);
  7783.     }
  7784.     set_property("choiceAdventure90", "3");
  7785.  
  7786.     set_property("choiceAdventure106", "2");
  7787.     if(my_class() == $class[Ed])
  7788.     {
  7789.         set_property("choiceAdventure106", "1");
  7790.     }
  7791.  
  7792.     ccAdv(1, $location[The Haunted Ballroom]);
  7793.     if(contains_text(get_property("lastEncounter"), "Strung-Up Quartet"))
  7794.     {
  7795.         set_property("cc_ballroomsong", "set");
  7796.     }
  7797.     if(contains_text(get_property("lastEncounter"), "We\'ll All Be Flat"))
  7798.     {
  7799.         set_property("cc_ballroomflat", "organ");
  7800.         if(my_class() == $class[Ed])
  7801.         {
  7802.             set_property("cc_ballroomsong", "set");
  7803.         }
  7804.     }
  7805.     return true;
  7806. }
  7807.  
  7808.  
  7809.  
  7810.  
  7811. boolean doTasks()
  7812. {
  7813.     if(my_thunder() > get_property("cc_lastthunder").to_int())
  7814.     {
  7815.         set_property("cc_lastthunderturn", "" + my_turncount());
  7816.         set_property("cc_lastthunder", "" + my_thunder());
  7817.     }
  7818.     wait(1);
  7819.     print("Turn(" + my_turncount() + "): Starting with " + my_adventures() + " left and " + pulls_remaining() + " pulls left at Level: " + my_level(), "cyan");
  7820.     if((item_amount($item[rock band flyers]) == 1) && (get_property("flyeredML").to_int() < 10000))
  7821.     {
  7822.         print("Still flyering: " + get_property("flyeredML"), "blue");
  7823.     }
  7824.     print("Encounter: " + combat_rate_modifier() + "   Exp Bonus: " + experience_bonus(), "blue");
  7825.     print("Meat: " + meat_drop_modifier() + "   Item: " + item_drop_modifier(), "blue");
  7826.     print("ML: " + monster_level_adjustment() + " control: " + current_mcd(), "blue");
  7827.     if(my_class() == $class[Sauceror])
  7828.     {
  7829.         print("Soulsauce: " + my_soulsauce(), "blue");
  7830.     }
  7831.     if(have_effect($effect[ultrahydrated]) > 0)
  7832.     {
  7833.         print("Ultrahydrated: " + have_effect($effect[ultrahydrated]), "violet");
  7834.     }
  7835.     if(have_effect($effect[Everything looks yellow]) > 0)
  7836.     {
  7837.         print("Everything Looks Yellow: " + have_effect($effect[everything looks yellow]), "blue");
  7838.     }
  7839.     if((item_amount($item[Snow suit]) > 0) || (equipped_item($slot[familiar]) == $item[snow suit]))
  7840.     {
  7841.         print("Snow suit usage: " + get_property("_snowSuitCount") + " carrots: " + get_property("_carrotNoseDrops"), "blue");
  7842.     }
  7843.     print("HP: " + my_hp() + "/" + my_maxhp() + "\tMP: " + my_mp() + "/" + my_maxmp(), "violet");
  7844.     if(my_path() == "Heavy Rains")
  7845.     {
  7846.         print("Post adventure done: Thunder: " + my_thunder() + " Rain: " + my_rain() + " Lightning: " + my_lightning(), "green");
  7847.     }
  7848.     if(my_class() == $class[Ed])
  7849.     {
  7850.         print("Ka Coins: " + item_amount($item[Ka Coin]) + " Lashes used: " + get_property("_edLashCount"), "green");
  7851.     }
  7852.  
  7853.     if(get_property("cc_interrupt").to_boolean())
  7854.     {
  7855.         set_property("cc_interrupt", false);
  7856.         abort("cc_interrupt detected and aborting, cc_interrupt disabled.");
  7857.     }
  7858.  
  7859.     int delay = get_property("cc_delayTimer").to_int();
  7860.     if(delay != 0)
  7861.     {
  7862.         print("Delay between adventures... (cc_ascend.ash wait(delay)) beep boop... ", "blue");
  7863.         wait(delay);
  7864.     }
  7865.  
  7866.     if((monster_level_adjustment() > 150) && (monster_level_adjustment() < 160))
  7867.     {
  7868.         int base = (monster_level_adjustment() - current_mcd());
  7869.         if(base < 150)
  7870.         {
  7871.             int canhave = 150 - base;
  7872.             change_mcd(canhave);
  7873.         }
  7874.     }
  7875.     else
  7876.     {
  7877.         if((get_property("flyeredML").to_int() >= 10000) && (my_level() >= 13))
  7878.         {
  7879.             if(current_mcd() != 0)
  7880.             {
  7881.                 change_mcd(0);
  7882.             }
  7883.         }
  7884.         else if(((monster_level_adjustment() + (10 - current_mcd())) < 150) && (current_mcd() != 10))
  7885.         {
  7886.             change_mcd(10);
  7887.         }
  7888.     }
  7889.     if((my_familiar() == $familiar[Reanimated Reanimator]) && (get_property("_badlyRomanticArrows") == "1"))
  7890.     {
  7891.         print("We have a Reanimator as our familiar but can't winkat anymore. Let's change to our default.", "red");
  7892.         handleFamiliar($familiar[Adventurous Spelunker]);
  7893.     }
  7894.     if(my_familiar() == $familiar[Crimbo Shrub])
  7895.     {
  7896.         if((get_property("_jungDrops").to_int() == 1) || (my_daycount() > 1))
  7897.         {
  7898.             if((item_amount($item[jar of psychoses (Jick)]) == 1) && (my_daycount() == 2) && (get_property("_jungDrops").to_int() == 0))
  7899.             {
  7900.                 handleFamiliar($familiar[Angry Jung Man]);
  7901.             }
  7902.             else
  7903.             {
  7904.                 handleFamiliar($familiar[Adventurous Spelunker]);
  7905.             }
  7906.         }
  7907.         else
  7908.         {
  7909.             handleFamiliar($familiar[Angry Jung Man]);
  7910.         }
  7911.     }
  7912.     if(my_familiar() == $familiar[Angry Jung Man])
  7913.     {
  7914.         if((get_property("_jungDrops").to_int() == 1) || (my_daycount() > 1))
  7915.         {
  7916.             handleFamiliar($familiar[Adventurous Spelunker]);
  7917.         }
  7918.     }
  7919.     else if((my_familiar() == $familiar[Adventurous Spelunker]) && (get_property("_jungDrops").to_int() == 0) && (my_daycount() == 1))
  7920.     {
  7921.         handleFamiliar($familiar[Angry Jung Man]);
  7922.     }
  7923.  
  7924.     oldPeoplePlantStuff();
  7925.     picky_buyskills();
  7926.  
  7927.     if(get_property("cc_doCombatCopy") == "yes")
  7928.     {
  7929.         # This should never persist into another turn, ever.
  7930.         set_property("cc_doCombatCopy", "no");
  7931.     }
  7932.  
  7933.     if((equipped_item($slot[familiar]) == $item[none]) && (my_familiar() != $familiar[none]) && (my_path() == "Heavy Rains"))
  7934.     {
  7935.         abort("Familiar has no equipment, WTF");
  7936.     }
  7937.  
  7938.     if(item_amount($item[pulled red taffy]) >= 6)
  7939.     {
  7940.         use(item_amount($item[pulled red taffy]), $item[pulled red taffy]);
  7941.     }
  7942.     if(item_amount($item[pulled orange taffy]) >= 6)
  7943.     {
  7944.         use(item_amount($item[pulled orange taffy]), $item[pulled orange taffy]);
  7945.     }
  7946.     if(item_amount($item[pulled violet taffy]) >= 6)
  7947.     {
  7948.         use(item_amount($item[pulled violet taffy]), $item[pulled violet taffy]);
  7949.     }
  7950.     buyableMaintain($item[Ben-gal&trade; Balm], 1, 200);
  7951.     buyableMaintain($item[Turtle Pheromones], 1, 800, my_class() == $class[Turtle Tamer]);
  7952.     buyableMaintain($item[Hair Spray], 1, 200, my_class() != $class[Turtle Tamer]);
  7953.     buyableMaintain($item[Blood of the Wereseal], 1, 3500, (monster_level_adjustment() > 135));
  7954.     buffMaintain($effect[Gummi-Grin], 0, 1, 1);
  7955.     buffMaintain($effect[Strong Resolve], 0, 1, 1);
  7956.     buffMaintain($effect[Irresistible Resolve], 0, 1, 1);
  7957.     buffMaintain($effect[Brilliant Resolve], 0, 1, 1);
  7958.     buffMaintain($effect[From Nantucket], 0, 1, 1);
  7959.     buffMaintain($effect[Squatting and Thrusting], 0, 1, 1);
  7960.     buffMaintain($effect[You Read the Manual], 0, 1, 1);
  7961.  
  7962.     if(item_amount($item[dense meat stack]) > 1)
  7963.     {
  7964.         autosell(1, $item[dense meat stack]);
  7965.     }
  7966.  
  7967.     if(my_level() > get_property("lastCouncilVisit").to_int())
  7968.     {
  7969.         council();
  7970.     }
  7971.  
  7972.     equipBaseline();
  7973.  
  7974.     if(doHRSkills())
  7975.     {
  7976.         return true;
  7977.     }
  7978.     handleJar();
  7979.  
  7980.     if((have_effect($effect[beaten up]) > 0) && (my_path() == "One Crazy Random Summer"))
  7981.     {
  7982.         if(contains_text(get_property("cc_funPrefix"), "annoying") ||
  7983.             contains_text(get_property("cc_funPrefix"), "phase-shifting") ||
  7984.             contains_text(get_property("cc_funPrefix"), "restless") ||
  7985.             contains_text(get_property("cc_funPrefix"), "ticking"))
  7986.         {
  7987.             print("Probably beaten up by FUN! Trying to recover instead of aborting", "red");
  7988.             handleTracker(last_monster(), get_property("cc_funPrefix"), "cc_funTracker");
  7989.             if(have_skill($skill[Tongue of the Walrus]) && have_skill($skill[Cannelloni Cocoon]) && (my_mp() >= 30))
  7990.             {
  7991.                 use_skill(1, $skill[Tongue of the Walrus]);
  7992.                 useCocoon();
  7993.             }
  7994.             else
  7995.             {
  7996.                 cli_execute("hottub");
  7997.             }
  7998.         }
  7999.     }
  8000.  
  8001.  
  8002.     if(have_effect($effect[beaten up]) > 0)
  8003.     {
  8004.         abort("Got beaten up, please fix me");
  8005.     }
  8006.  
  8007.     if(last_monster() == $monster[Crate])
  8008.     {
  8009.         if(get_property("cc_newbieOverride").to_boolean())
  8010.         {
  8011.             set_property("cc_newbieOverride", false);
  8012.         }
  8013.         else
  8014.         {
  8015.             abort("We went to the Noob Cave for reals... uh oh");
  8016.         }
  8017.     }
  8018.     else
  8019.     {
  8020.         set_property("cc_newbieOverride", false);
  8021.     }
  8022.  
  8023.  
  8024.     hr_dnaPotions();
  8025.     picky_dnaPotions();
  8026.     standard_dnaPotions();
  8027.  
  8028.     # FIXME: Can we do this earlier? This isn't even all that useful, to be fair.
  8029.     # When is the last time we encounter each of these types?
  8030.     if((my_level() >= 13) && (get_property("_dnaPotionsMade").to_int() == 3) && (get_property("choiceAdventure1003").to_int() < 3) && (!get_property("_dnaHybrid").to_boolean()))
  8031.     {
  8032.         if((get_property("nsChallenge2") == "") && (get_property("telescopeUpgrades").to_int() >= 2))
  8033.         {
  8034.             ns_crowd3();
  8035.         }
  8036.         if((get_property("dnaSyringe") == "plant") && (get_property("nsChallenge2") == "cold"))
  8037.         {
  8038.             cli_execute("camp dnainject");
  8039.         }
  8040.         if((get_property("dnaSyringe") == "demon") && (get_property("nsChallenge2") == "hot"))
  8041.         {
  8042.             cli_execute("camp dnainject");
  8043.         }
  8044.         if((get_property("dnaSyringe") == "slime") && (get_property("nsChallenge2") == "sleaze"))
  8045.         {
  8046.             cli_execute("camp dnainject");
  8047.         }
  8048.         if((get_property("dnaSyringe") == "undead") && (get_property("nsChallenge2") == "spooky"))
  8049.         {
  8050.             cli_execute("camp dnainject");
  8051.         }
  8052.         if((get_property("dnaSyringe") == "hobo") && (get_property("nsChallenge2") == "stench"))
  8053.         {
  8054.             cli_execute("camp dnainject");
  8055.         }
  8056.     }
  8057.  
  8058.  
  8059.  
  8060.     if(get_property("dnaSyringe") == "construct")
  8061.     {
  8062.         if((get_property("_dnaPotionsMade").to_int() == 0) && (my_daycount() == 1))
  8063.         {
  8064.             cli_execute("camp dnapotion");
  8065.         }
  8066.         if((get_property("_dnaPotionsMade").to_int() == 1) && (my_daycount() == 1))
  8067.         {
  8068.             cli_execute("camp dnapotion");
  8069.         }
  8070.     }
  8071.  
  8072.     if(get_property("dnaSyringe") == "fish")
  8073.     {
  8074.         if((get_property("_dnaPotionsMade").to_int() == 2) && (my_daycount() == 1))
  8075.         {
  8076.             cli_execute("camp dnapotion");
  8077.         }
  8078.         if((get_property("_dnaPotionsMade").to_int() == 0) && (my_daycount() == 2))
  8079.         {
  8080.             cli_execute("camp dnapotion");
  8081.         }
  8082.     }
  8083.  
  8084.     if(get_property("dnaSyringe") == "constellation")
  8085.     {
  8086.         if((get_property("_dnaPotionsMade").to_int() == 1) && (my_daycount() == 2))
  8087.         {
  8088.             cli_execute("camp dnapotion");
  8089.         }
  8090.     }
  8091.  
  8092.     if(get_property("dnaSyringe") == "dude")
  8093.     {
  8094.         if((get_property("_dnaPotionsMade").to_int() == 2) && (my_daycount() == 2))
  8095.         {
  8096.             cli_execute("camp dnapotion");
  8097.         }
  8098.     }
  8099.  
  8100.     if(get_property("cc_useCubeling").to_boolean())
  8101.     {
  8102.         if((item_amount($item[ring of detect boring doors]) == 1) && (item_amount($item[eleven-foot pole]) == 1) && (item_amount($item[pick-o-matic lockpicks]) == 1))
  8103.         {
  8104.             set_property("cc_cubeItems", "done");
  8105.         }
  8106.         if((get_property("cc_cubeItems") == "") && (my_familiar() != $familiar[Gelatinous Cubeling]))
  8107.         {
  8108.             handleFamiliar($familiar[Gelatinous Cubeling]);
  8109.         }
  8110.     }
  8111.  
  8112.     if((my_daycount() == 1) && (turkeyBooze() < 5) && have_familiar($familiar[Fist Turkey]))
  8113.     {
  8114.         handleFamiliar($familiar[Fist Turkey]);
  8115.     }
  8116.  
  8117.     if((item_amount($item[snow berries]) == 3) && (my_daycount() == 1) && get_property("cc_grimstoneFancyOilPainting").to_boolean())
  8118.     {
  8119.         cli_execute("make 1 snow cleats");
  8120.     }
  8121.  
  8122.     if((item_amount($item[snow berries]) > 0) && (my_daycount() > 1) && (get_property("chasmBridgeProgress").to_int() >= 30))
  8123.     {
  8124.         visit_url("place.php?whichplace=orc_chasm");
  8125.         if(get_property("chasmBridgeProgress").to_int() >= 30)
  8126.         {
  8127.             cli_execute("make " + item_amount($item[snow berries]) + " snow cleats");
  8128.         }
  8129.         else
  8130.         {
  8131.             abort("Bridge progress came up as >= 30 but is no longer after viewing the page.");
  8132.         }
  8133.     }
  8134.  
  8135.     fortuneCookieEvent();
  8136.  
  8137.     if(knoll_available() && (item_amount($item[detuned radio]) == 0) && (my_meat() > 300))
  8138.     {
  8139.         buyUpTo(1, $item[detuned radio]);
  8140.         change_mcd(10);
  8141.         visit_url("choice.php?pwd&whichchoice=835&option=2", true);
  8142.     }
  8143.  
  8144.     consumeStuff();
  8145.     int paintingLevel = 8;
  8146.     if(my_path() == "One Crazy Random Summer")
  8147.     {
  8148.         paintingLevel = 9;
  8149.     }
  8150.     if((my_level() >= paintingLevel) && (chateaumantegna_havePainting()) && (my_class() == $class[Ed]) && (my_daycount() <= 3))
  8151.     {
  8152.         if((have_effect($effect[Everything Looks Yellow]) == 0) && have_skill($skill[Wrath of Ra]) && (my_mp() >= 40))
  8153.         {
  8154.             if(chateaumantegna_usePainting())
  8155.             {
  8156.                 ccAdv(1, $location[Noob Cave]);
  8157.                 return true;
  8158.             }
  8159.         }
  8160.     }
  8161.  
  8162.  
  8163.     if((my_level() >= 9) && !get_property("_photocopyUsed").to_boolean() && (my_class() == $class[Ed]) && (my_daycount() < 3))
  8164.     {
  8165.         if(handleFaxMonster("lobsterfrogman"))
  8166.         {
  8167.             return true;
  8168.         }
  8169.     }
  8170.  
  8171.     if(LX_dictionary())
  8172.     {
  8173.         return true;
  8174.     }
  8175.     if((my_level() >= 5) && (item_amount($item[knob goblin encryption key]) == 1))
  8176.     {
  8177.         if(item_amount($item[Cobb\'s Knob Map]) == 0)
  8178.         {
  8179.             council();
  8180.         }
  8181.         use(1, $item[Cobb\'s Knob Map]);
  8182.         return true;
  8183.     }
  8184.  
  8185.  
  8186.     if(my_class() == $class[Ed])
  8187.     {
  8188.         ed_buySkills();
  8189.  
  8190.         if(get_property("edPiece") != "hyena")
  8191.         {
  8192.             if(get_property("spookyAirportAlways").to_boolean() || (my_level() >= 5))
  8193.             {
  8194.                 adjustEdHat("ml");
  8195.             }
  8196.             else
  8197.             {
  8198.                 adjustEdHat("myst");
  8199.             }
  8200.         }
  8201.         if(L1_edIsland() || l1_edIslandFallback())
  8202.         {
  8203.             return true;
  8204.         }
  8205.  
  8206.         if(L5_getEncryptionKey())
  8207.         {
  8208.             return true;
  8209.         }
  8210.  
  8211.         if(LX_islandAccess())
  8212.         {
  8213.             return true;
  8214.         }
  8215.         if((item_amount($item[Hermit Permit]) == 0) && (my_meat() > 100))
  8216.         {
  8217.             buy(1, $item[Hermit Permit]);
  8218.         }
  8219.         while((item_amount($item[Seal Tooth]) == 0) && (item_amount($item[Hermit Permit]) > 0) && (my_meat() > 50))
  8220.         {
  8221.             if((item_amount($item[Worthless Trinket]) + item_amount($item[Worthless Gewgaw]) + item_amount($item[Worthless Knick-knack])) > 0)
  8222.             {
  8223.                 hermit(1, $item[Seal Tooth]);
  8224.             }
  8225.             else
  8226.             {
  8227.                 buyUpTo(1, $item[chewing gum on a string]);
  8228.                 use(1, $item[chewing gum on a string]);
  8229.             }
  8230.         }
  8231.  
  8232.         if(my_level() >= 9)
  8233.         {
  8234.             if((get_property("timesRested").to_int() < total_free_rests()) && chateaumantegna_available())
  8235.             {
  8236.                 doRest();
  8237.                 cli_execute("scripts/postcheese.ash");
  8238.                 return true;
  8239.             }
  8240.         }
  8241.  
  8242.         if(L10_plantThatBean() || L10_airship() || L10_basement() || L10_ground() || L10_topFloor())
  8243.         {
  8244.             return true;
  8245.         }
  8246.  
  8247.         if(L12_preOutfit())
  8248.         {
  8249.             return true;
  8250.         }
  8251.  
  8252.         if(get_property("cc_dickstab").to_boolean())
  8253.         {
  8254.             if((my_level() >= 5) && (chateaumantegna_havePainting()) && (my_daycount() <= 2) && (my_class() != $class[Ed]))
  8255.             {
  8256.                 if(chateaumantegna_usePainting())
  8257.                 {
  8258.                     ccAdv(1, $location[Noob Cave]);
  8259.                     return true;
  8260.                 }
  8261.             }
  8262.             if(L1_edDinsey())
  8263.             {
  8264.                 return true;
  8265.             }
  8266.             if(L2_mosquito() || L2_treeCoin() || L2_spookyMap() || L2_spookyFertilizer() || L2_spookySapling())
  8267.             {
  8268.                 return true;
  8269.             }
  8270.             if(L8_trapperStart() || L8_trapperGround() || L8_trapperYeti())
  8271.             {
  8272.                 return true;
  8273.             }
  8274.             if(L4_batCave())
  8275.             {
  8276.                 return true;
  8277.             }
  8278.             if(L5_getEncryptionKey())
  8279.             {
  8280.                 return true;
  8281.             }
  8282.             if(L5_goblinKing())
  8283.             {
  8284.                 return true;
  8285.             }
  8286.             if(L9_chasmStart() || L9_chasmBuild())
  8287.             {
  8288.                 return true;
  8289.             }
  8290.             if(LX_pirateOutfit() || LX_pirateInsults() || LX_pirateBlueprint() || LX_pirateBeerPong() || LX_fcle())
  8291.             {
  8292.                 return true;
  8293.             }
  8294.             if(LX_dinseylandfillFunbucks())
  8295.             {
  8296.                 return true;
  8297.             }
  8298.  
  8299.             if(my_level() < 9)
  8300.             {
  8301.                 if((get_property("timesRested").to_int() < total_free_rests()) && chateaumantegna_available())
  8302.                 {
  8303.                     doRest();
  8304.                     cli_execute("scripts/postcheese.ash");
  8305.                     return true;
  8306.                 }
  8307.             }
  8308.  
  8309.             if(L1_edIsland(10))
  8310.             {
  8311.                 return true;
  8312.             }
  8313.  
  8314.             buffMaintain($effect[The Dinsey Look], 0, 1, 1);
  8315.  
  8316.             if(L7_crypt())
  8317.             {
  8318.                 if(item_amount($item[FunFunds&trade;]) > 4)
  8319.                 {
  8320.                     buy(1, $item[Dinsey Face Paint]);
  8321.                 }
  8322.                 return true;
  8323.             }
  8324.  
  8325.  
  8326.         }
  8327.  
  8328.  
  8329.         if(LX_pirateOutfit() || LX_pirateInsults() || LX_pirateBlueprint() || LX_pirateBeerPong() || LX_fcle())
  8330.         {
  8331.             return true;
  8332.         }
  8333.         if(L2_mosquito() || L2_treeCoin() || L2_spookyMap() || L2_spookyFertilizer() || L2_spookySapling())
  8334.         {
  8335.             return true;
  8336.         }
  8337.         if(L8_trapperStart() || L8_trapperGround() || L8_trapperYeti())
  8338.         {
  8339.             return true;
  8340.         }
  8341.         if(L4_batCave())
  8342.         {
  8343.             return true;
  8344.         }
  8345.         if(L5_goblinKing())
  8346.         {
  8347.             return true;
  8348.         }
  8349.         if(!get_property("cc_dickstab").to_boolean() || (my_daycount() >= 2))
  8350.         {
  8351.             if(L3_tavern())
  8352.             {
  8353.                 return true;
  8354.             }
  8355.         }
  8356.  
  8357.         if(L9_chasmStart() || L9_chasmBuild())
  8358.         {
  8359.             return true;
  8360.         }
  8361.  
  8362.         if(L6_friarsGetParts() || L6_friarsHotWing())
  8363.         {
  8364.             return true;
  8365.         }
  8366.         if(L11_blackMarket() || L11_forgedDocuments() || L11_mcmuffinDiary() || L11_talismanOfNam())
  8367.         {
  8368.             return true;
  8369.         }
  8370.  
  8371.         if(my_spleen_use() == 35)
  8372.         {
  8373.             if(my_daycount() >= 2)
  8374.             {
  8375.                 if(my_mp() < 40)
  8376.                 {
  8377.                     buffMaintain($effect[Spiritually Awake], 0, 1, 1);
  8378.                     buffMaintain($effect[Spiritually Aware], 0, 1, 1);
  8379.                     buffMaintain($effect[Spiritually Awash], 0, 1, 1);
  8380.                 }
  8381.             }
  8382.         }
  8383.     }
  8384.  
  8385.     if(organsFull() && (my_adventures() < 10) && (chateaumantegna_havePainting()) && (my_daycount() == 1) && (my_class() != $class[Ed]))
  8386.     {
  8387.         if(chateaumantegna_usePainting())
  8388.         {
  8389.             ccAdv(1, $location[Noob Cave]);
  8390.             return true;
  8391.         }
  8392.     }
  8393.     if((my_level() >= 8) && (chateaumantegna_havePainting()) && (my_daycount() == 2) && (my_class() != $class[Ed]))
  8394.     {
  8395.         if(chateaumantegna_usePainting())
  8396.         {
  8397.             ccAdv(1, $location[Noob Cave]);
  8398.             return true;
  8399.         }
  8400.     }
  8401.  
  8402.     if((my_class() != $class[Ed]) && (my_level() >= 9) && (my_daycount() == 1))
  8403.     {
  8404.         if((get_property("timesRested").to_int() < total_free_rests()) && chateaumantegna_available())
  8405.         {
  8406.             doRest();
  8407.             cli_execute("scripts/postcheese.ash");
  8408.             return true;
  8409.         }
  8410.     }
  8411.  
  8412.     if(LX_dinseylandfillFunbucks())
  8413.     {
  8414.         return true;
  8415.     }
  8416.  
  8417.     #Can we have some other way to check that we have AT skills?
  8418.     if((item_amount($item[antique accordion]) == 0) && (my_meat() > 12500) && (have_skill($skill[The Ode to Booze])))
  8419.     {
  8420.         buyUpTo(1, $item[antique accordion]);
  8421.     }
  8422.  
  8423.  
  8424.     if(L12_flyerFinish())
  8425.     {
  8426.         return true;
  8427.     }
  8428.  
  8429.     if((my_level() >= 12) && (item_amount($item[rock band flyers]) == 0) && (get_property("flyeredML").to_int() < 10000) && ((get_property("cc_hiddenapartment") == "0") || (get_property("cc_hiddenapartment") == "finished")) && (have_effect($effect[ultrahydrated]) == 0))
  8430.     {
  8431.         if(L12_getOutfit())
  8432.         {
  8433.             return true;
  8434.         }
  8435.  
  8436.         if(L12_startWar())
  8437.         {
  8438.             return true;
  8439.         }
  8440.     }
  8441.  
  8442.     if(L5_getEncryptionKey())
  8443.     {
  8444.         return true;
  8445.     }
  8446.  
  8447.     if(LX_handleSpookyravenNecklace())
  8448.     {
  8449.         return true;
  8450.     }
  8451.  
  8452.     if(L0_handleRainDoh())
  8453.     {
  8454.         return true;
  8455.     }
  8456.  
  8457.     if(routineRainManHandler())
  8458.     {
  8459.         return true;
  8460.     }
  8461.  
  8462.     if(LX_handleSpookyravenFirstFloor())
  8463.     {
  8464.         return true;
  8465.     }
  8466.  
  8467.     if(L2_mosquito() || L2_treeCoin() || L2_spookyMap() || L2_spookyFertilizer() || L2_spookySapling())
  8468.     {
  8469.         return true;
  8470.     }
  8471.  
  8472.     if(get_property("lastGoofballBuy").to_int() < my_ascensions())
  8473.     {
  8474.         visit_url("woods.php");
  8475.         print("Got Goofballs", "blue");
  8476.         visit_url("tavern.php?place=susguy&action=buygoofballs", true);
  8477.     }
  8478.  
  8479.     if((item_amount($item[bitchin\' meatcar]) == 0) && !gnomads_available() && (my_class() != $class[Ed]))
  8480.     {
  8481.         cli_execute("make bitch");
  8482.         cli_execute("place.php?whichplace=desertbeach&action=db_nukehouse");
  8483.     }
  8484.  
  8485.     if(L5_haremOutfit())
  8486.     {
  8487.         return true;
  8488.     }
  8489.  
  8490.     if(LX_phatLootToken())
  8491.     {
  8492.         return true;
  8493.     }
  8494.  
  8495.     if(LX_islandAccess())
  8496.     {
  8497.         return true;
  8498.     }
  8499.  
  8500.     if(L4_batCave())
  8501.     {
  8502.         return true;
  8503.     }
  8504.  
  8505.     if(L5_goblinKing())
  8506.     {
  8507.         return true;
  8508.     }
  8509.  
  8510.     if(LX_spookyravenSecond() || LX_setBallroomSong())
  8511.     {
  8512.         return true;
  8513.     }
  8514.  
  8515.     if(L3_tavern())
  8516.     {
  8517.         return true;
  8518.     }
  8519.  
  8520.     if(L6_friarsGetParts() || L6_friarsHotWing())
  8521.     {
  8522.         return true;
  8523.     }
  8524.  
  8525.     if(L9_leafletQuest())
  8526.     {
  8527.         return true;
  8528.     }
  8529.  
  8530.     if(L7_crypt())
  8531.     {
  8532.         return true;
  8533.     }
  8534.  
  8535.     if(LX_fancyOilPainting())
  8536.     {
  8537.         return true;
  8538.     }
  8539.  
  8540.     if(L8_trapperStart() || L8_trapperGround() || L8_trapperYeti())
  8541.     {
  8542.         return true;
  8543.     }
  8544.  
  8545.     if(LX_pirateOutfit() || LX_pirateInsults() || LX_pirateBlueprint() || LX_pirateBeerPong() || LX_fcle())
  8546.     {
  8547.         return true;
  8548.     }
  8549.  
  8550.     if(L10_plantThatBean())
  8551.     {
  8552.         return true;
  8553.     }
  8554.  
  8555.     if(L12_preOutfit())
  8556.     {
  8557.         return true;
  8558.     }
  8559.  
  8560.     if(L10_airship() || L10_basement() || L10_ground() || L10_topFloor())
  8561.     {
  8562.         return true;
  8563.     }
  8564.  
  8565.     if(L10_holeInTheSky())
  8566.     {
  8567.         return true;
  8568.     }
  8569.  
  8570.     if(L11_holeInTheSky())
  8571.     {
  8572.         return true;
  8573.     }
  8574.  
  8575.     if(L9_chasmStart() || L9_chasmBuild())
  8576.     {
  8577.         return true;
  8578.     }
  8579.  
  8580.     if(L9_highLandlord())
  8581.     {
  8582.         return true;
  8583.     }
  8584.  
  8585.     if(Lsc_flyerSeals())
  8586.     {
  8587.         return true;
  8588.     }
  8589.  
  8590.     if(L11_blackMarket() || L11_forgedDocuments() || L11_mcmuffinDiary() || L11_talismanOfNam())
  8591.     {
  8592.         return true;
  8593.     }
  8594.  
  8595.     if(L11_mauriceSpookyraven())
  8596.     {
  8597.         return true;
  8598.     }
  8599.  
  8600.     if(L11_nostrilOfTheSerpent())
  8601.     {
  8602.         return true;
  8603.     }
  8604.  
  8605.     if(L11_unlockHiddenCity())
  8606.     {
  8607.         return true;
  8608.     }
  8609.  
  8610.     if(L11_hiddenCityZones())
  8611.     {
  8612.         return true;
  8613.     }
  8614.  
  8615.     if(LX_ornateDowsingRod())
  8616.     {
  8617.         return true;
  8618.     }
  8619.  
  8620.     if(L12_nunsTrickGlandGet())
  8621.     {
  8622.         return true;
  8623.     }
  8624.     if(get_property("cc_hippyInstead").to_boolean() && (get_property("cc_nunsTrick") == "true"))
  8625.     {
  8626.         set_property("cc_nunsTrick", "false");
  8627.         set_property("cc_ignoreFlyer", true);
  8628.     }
  8629.  
  8630.  
  8631.  
  8632.     #Re add level 12 requirement so we can get the hippy outfit?
  8633.     if(((my_level() >= 12) || (get_property("cc_palindome") == "finished")) && (get_property("cc_mcmuffin") == "start") && (get_property("desertExploration").to_int() < 100) && ((get_property("cc_hiddenapartment") == "finished") || (get_property("cc_hiddenapartment") == "0")))
  8634.     {
  8635.         item desertBuff = $item[none];
  8636.         if(possessEquipment($item[UV-resistant compass]))
  8637.         {
  8638.             desertBuff = $item[UV-resistant compass];
  8639.         }
  8640.         if(possessEquipment($item[Ornate Dowsing Rod]))
  8641.         {
  8642.             desertBuff = $item[Ornate Dowsing Rod];
  8643.         }
  8644.  
  8645.         if(possessEquipment(desertBuff))
  8646.         {
  8647.             if((have_effect($effect[Ultrahydrated]) > 0) || (get_property("desertExploration").to_int() == 0))
  8648.             {
  8649.                 print("Searching for the pyramid", "blue");
  8650.                 equip(desertBuff);
  8651.                 if((my_path() == "Heavy Rains") && (item_amount($item[Thor\'s Pliers]) > 0))
  8652.                 {
  8653.                     equip($item[Thor\'s Pliers]);
  8654.                 }
  8655.                 handleFamiliar($familiar[Artistic Goth Kid]);
  8656.  
  8657.                 if(possessEquipment($item[reinforced beaded headband]) && possessEquipment($item[bullet-proof corduroys]) && possessEquipment($item[round purple sunglasses]))
  8658.                 {
  8659.                     if(get_property("cc_nunsTrick") == "true")
  8660.                     {
  8661.                         print("Had gotten War Hippy Fatigues during the Ferret rescue. Don't need to worry about them now.", "blue");
  8662.                         set_property("cc_nunsTrick", "got");
  8663.                         set_property("cc_nunsTrickGland", "start");
  8664.                     }
  8665.                 }
  8666.                 else
  8667.                 {
  8668. #                   print("Only have some of the War Hippy Fatigues, so I'm going to closet everything relevant to get them in the desert", "blue");
  8669.                     put_closet(item_amount($item[beer helmet]), $item[beer helmet]);
  8670.                     put_closet(item_amount($item[distressed denim pants]), $item[distressed denim pants]);
  8671.                     put_closet(item_amount($item[bejeweled pledge pin]), $item[bejeweled pledge pin]);
  8672.                     put_closet(item_amount($item[reinforced beaded headband]), $item[reinforced beaded headband]);
  8673.                     put_closet(item_amount($item[bullet-proof corduroys]), $item[bullet-proof corduroys]);
  8674.                     put_closet(item_amount($item[round purple sunglasses]), $item[round purple sunglasses]);
  8675.                 }
  8676.  
  8677.                 buyUpTo(1, $item[hair spray]);
  8678.                 buffMaintain($effect[Butt-Rock Hair], 0, 1, 1);
  8679.                 if(my_primestat() == $stat[Muscle])
  8680.                 {
  8681.                     buyUpTo(1, $item[Ben-Gal&trade; Balm]);
  8682.                     buffMaintain($effect[Go Get \'Em\, Tiger!], 0, 1, 1);
  8683.                     buyUpTo(1, $item[Blood of the Wereseal]);
  8684.                     buffMaintain($effect[Temporary Lycanthropy], 0, 1, 1);
  8685.                 }
  8686.  
  8687.                 if((my_mp() > 30) && ((my_hp()*2) < (my_maxhp()*1)))
  8688.                 {
  8689.                     useCocoon();
  8690.                 }
  8691.  
  8692.                 handleInitFamiliar();
  8693.                 ccAdv(1, $location[The Arid\, Extra-Dry Desert]);
  8694.                 handleFamiliar($familiar[Adventurous Spelunker]);
  8695.  
  8696.                 if(contains_text(get_property("lastEncounter"), "He Got His Just Desserts"))
  8697.                 {
  8698.                     take_closet(1, $item[beer helmet]);
  8699.                     take_closet(1, $item[distressed denim pants]);
  8700.                     take_closet(1, $item[bejeweled pledge pin]);
  8701.                     set_property("cc_nunsTrick", "got");
  8702.                     set_property("cc_nunsTrickGland", "start");
  8703.                 }
  8704.  
  8705.                 int need = 100 - get_property("desertExploration").to_int();
  8706.                 print("Need for desert: " + need, "blue");
  8707.                 print("Worm riding: " + item_amount($item[worm-riding manual page]), "blue");
  8708.                 if((need < 85) && (item_amount($item[Can of Black Paint]) > 0))
  8709.                 {
  8710.                     visit_url("place.php?whichplace=desertbeach&action=db_gnasir");
  8711.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8712.                     visit_url("choice.php?whichchoice=805&option=2&pwd=");
  8713.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8714.                     use(1, $item[desert sightseeing pamphlet]);
  8715.                 }
  8716.                 if((need < 85) && (item_amount($item[Killing Jar]) > 0) && (get_property("cc_killingjar") != "done"))
  8717.                 {
  8718.                     set_property("cc_killingjar", "done");
  8719.                     visit_url("place.php?whichplace=desertbeach&action=db_gnasir");
  8720.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8721.                     visit_url("choice.php?whichchoice=805&option=2&pwd=");
  8722.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8723.                     use(1, $item[desert sightseeing pamphlet]);
  8724.                 }
  8725.  
  8726.                 need = 100 - get_property("desertExploration").to_int();
  8727.                 if((need >= 15) && (item_amount($item[Worm-Riding Manual Page]) >= 15))
  8728.                 {
  8729.                     pullXWhenHaveY($item[Drum Machine], 1, 0);
  8730.                     visit_url("place.php?whichplace=desertbeach&action=db_gnasir");
  8731.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8732.                     visit_url("choice.php?whichchoice=805&option=2&pwd=");
  8733.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8734.                     set_property("cc_killingjar", "done");
  8735.                     use(1, $item[Drum Machine]);
  8736.                 }
  8737.  
  8738.                 need = 100 - get_property("desertExploration").to_int();
  8739.                 if((need <= 15) && (get_property("cc_killingjar") == "") && (get_property("cc_killingjar") != "done"))
  8740.                 {
  8741.                     pullXWhenHaveY($item[Killing Jar], 1, 0);
  8742.                     set_property("cc_killingjar", "done");
  8743.                     visit_url("place.php?whichplace=desertbeach&action=db_gnasir");
  8744.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8745.                     visit_url("choice.php?whichchoice=805&option=2&pwd=");
  8746.                     visit_url("choice.php?whichchoice=805&option=1&pwd=");
  8747.                     use(1, $item[desert sightseeing pamphlet]);
  8748.                 }
  8749.  
  8750.                 handleFamiliar($familiar[Adventurous Spelunker]);
  8751.                 return true;
  8752.             }
  8753.             #else if((100 - get_property("desertExploration").to_int()) <= 15)
  8754.             else
  8755.             {
  8756.                 int need = 100 - get_property("desertExploration").to_int();
  8757.                 print("Getting some ultrahydrated, I suppose. Desert left: " + need, "blue");
  8758.  
  8759.                 if((need > 15) && (item_amount($item[disassembled clover]) > 2))
  8760.                 {
  8761.                     print("Gonna clover this, yeah, it only saves 2 adventures. So?", "green");
  8762.                     use(1, $item[disassembled clover]);
  8763.                     if(contains_text(visit_url("adventure.php?snarfblat=122&confirm=on"), "Combat"))
  8764.                     {
  8765.                         print("Wandering combat in The Oasis, boo. Gonna have to do this again.");
  8766.                         ccAdv(1, $location[The Oasis]);
  8767.                         if(item_amount($item[ten-leaf clover]) == 1)
  8768.                         {
  8769.                             use(1, $item[ten-leaf clover]);
  8770.                         }
  8771.                     }
  8772.                 }
  8773.                 else
  8774.                 {
  8775.                     if(!ccAdv(1, $location[The Oasis]))
  8776.                     {
  8777.                         print("Could not visit the Oasis for some reason, assuming desertExploration is incorrect.", "red");
  8778.                         set_property("desertExploration", 0);
  8779.                     }
  8780.                 }
  8781.  
  8782.                 return true;
  8783.             }
  8784.         }
  8785.         else if(my_level() >= 12)
  8786.         {
  8787.             abort("I can't do the Oasis without an Ornate Dowsing Rod. You can manually get a UV-resistant compass and I'll use that if you really hate me that much.");
  8788.             #print("Unable to currently do the Oasis and no longer aborting... yet", "red");
  8789.         }
  8790.         else
  8791.         {
  8792.             print("Skipping desert, don't have a rod or a compass.");
  8793.         }
  8794.     }
  8795.  
  8796.     if((get_property("cc_nunsTrick") == "got") && (get_property("currentNunneryMeat").to_int() < 100000) && !get_property("cc_100familiar").to_boolean())
  8797.     {
  8798.         set_property("cc_nunsTrickActive", "yes");
  8799.         if((get_property("cc_mcmuffin") == "ed") || (get_property("cc_mcmuffin") == "finished"))
  8800.         {
  8801.             if(doThemtharHills(true))
  8802.             {
  8803.                 return true;
  8804.             }
  8805.         }
  8806.     }
  8807.  
  8808.     if(get_property("cc_nunsTrickActive") == "yes")
  8809.     {
  8810.         set_property("cc_nunsTrickActive", "no");
  8811.     }
  8812.  
  8813.     if((get_property("cc_nuns") == "done") && (item_amount($item[half a purse]) > 0))
  8814.     {
  8815.         pulverizeThing($item[Half A Purse]);
  8816.         if(item_amount($item[Handful of Smithereens]) > 0)
  8817.         {
  8818.             cli_execute("make louder than bomb");
  8819.         }
  8820.     }
  8821.  
  8822.     boolean canDoHidden = true;
  8823.     if((item_amount($item[Moss-Covered Stone Sphere]) == 0) && (get_property("cc_hiddenapartment") != "finished"))
  8824.     {
  8825.         if(get_counters("Fortune Cookie", 0, 9) == "Fortune Cookie")
  8826.         {
  8827.             canDoHidden = false;
  8828.         }
  8829.         if((my_adventures() < (9 - get_property("cc_hiddenapartment").to_int())))
  8830.         {
  8831.             canDoHidden = false;
  8832.         }
  8833.     }
  8834.  
  8835.     if((get_property("cc_hiddenzones") == "finished") && (get_property("cc_hiddencity") == "") && canDoHidden)
  8836.     {
  8837.         if(my_class() == $class[Ed])
  8838.         {
  8839.             if(item_amount($item[7963]) == 0)
  8840.             {
  8841.                 set_property("cc_hiddencity", "finished");
  8842.                 return true;
  8843.             }
  8844.         }
  8845.         else if(item_amount($item[2180]) == 1)
  8846.         {
  8847.             set_property("cc_hiddencity", "finished");
  8848.             return true;
  8849.         }
  8850.  
  8851.  
  8852.         if((get_property("_nanorhinoBanishedMonster") == "") && (have_effect($effect[nanobrawny]) == 0))
  8853.         {
  8854.             handleFamiliar($familiar[Nanorhino]);
  8855.         }
  8856.         else
  8857.         {
  8858.             handleFamiliar($familiar[Adventurous Spelunker]);
  8859.         }
  8860.  
  8861.  
  8862.         if((item_amount($item[Book of Matches]) > 0) && (my_ascensions() > get_property("hiddenTavernUnlock").to_int()))
  8863.         {
  8864.             use(1, $item[Book of Matches]);
  8865.         }
  8866.  
  8867.         if((get_property("cc_hiddenapartment") != "finished"))
  8868.         {
  8869.             if(item_amount($item[Moss-Covered Stone Sphere]) > 0)
  8870.             {
  8871.                 set_property("cc_hiddenapartment", "finished");
  8872.                 cli_execute("hottub");
  8873.                 if(have_effect($effect[On The Trail]) > 0)
  8874.                 {
  8875.                     if(item_amount($item[soft green echo eyedrop antidote]) > 0)
  8876.                     {
  8877.                         uneffect($effect[On The Trail]);
  8878.                     }
  8879.                 }
  8880.                 return true;
  8881.             }
  8882.             print("The idden [sic] apartment!", "blue");
  8883.             int current = get_property("cc_hiddenapartment").to_int();
  8884.             current = current + 1;
  8885.             set_property("cc_hiddenapartment", current);
  8886.             if(current <= 8)
  8887.             {
  8888.                 print("Hidden Apartment Progress: " + get_property("hiddenApartmentProgress"), "blue");
  8889.                 ccAdv(1, $location[The Hidden Apartment Building]);
  8890.                 return true;
  8891.             }
  8892.             else
  8893.             {
  8894.                 set_property("choiceAdventure780", "1");
  8895.                 if(have_effect($effect[Thrice-Cursed]) == 0)
  8896.                 {
  8897.                     if((item_amount($item[Book of Matches]) == 0) && !in_hardcore())
  8898.                     {
  8899.                         pullXWhenHaveY($item[Book of Matches], 1, 0);
  8900.                     }
  8901.                     if((item_amount($item[Book of Matches]) > 0) && (my_ascensions() > get_property("hiddenTavernUnlock").to_int()))
  8902.                     {
  8903.                         use(1, $item[Book of Matches]);
  8904.                     }
  8905.                     while(have_effect($effect[Thrice-Cursed]) == 0)
  8906.                     {
  8907.                         if((inebriety_limit() - my_inebriety()) > 0)
  8908.                         {
  8909.                             if(my_mp() > 50)
  8910.                             {
  8911.                                 shrugAT();
  8912.                                 buffMaintain($effect[Ode to Booze], 50, 1, 1);
  8913.                             }
  8914.                             buyUpTo(1, $item[Cursed Punch]);
  8915.                             drink(1, $item[Cursed Punch]);
  8916.                         }
  8917.                         else
  8918.                         {
  8919.                             set_property("choiceAdventure780", "2");
  8920.                             break;
  8921.                         }
  8922.                     }
  8923.                 }
  8924.                 print("Hidden Apartment Progress: " + get_property("hiddenApartmentProgress"), "blue");
  8925.                 ccAdv(1, $location[The Hidden Apartment Building]);
  8926.                 return true;
  8927.             }
  8928.         }
  8929.         if((get_property("cc_hiddenoffice") != "finished") && (my_adventures() >= 11))
  8930.         {
  8931.             if(item_amount($item[Crackling Stone Sphere]) > 0)
  8932.             {
  8933.                 if(have_effect($effect[On The Trail]) > 0)
  8934.                 {
  8935.                     if(item_amount($item[soft green echo eyedrop antidote]) > 0)
  8936.                     {
  8937.                         uneffect($effect[On The Trail]);
  8938.                     }
  8939.                 }
  8940.                 set_property("cc_hiddenoffice", "finished");
  8941.                 return true;
  8942.             }
  8943.             print("The idden [sic] office!", "blue");
  8944.             int current = get_property("cc_hiddenoffice").to_int();
  8945.             current = current + 1;
  8946.             set_property("cc_hiddenoffice", ""+current);
  8947.             if(current <= 6)
  8948.             {
  8949.                 set_property("choiceAdventure786", "2");
  8950.             }
  8951.             else
  8952.             {
  8953.                 set_property("choiceAdventure786", "1");
  8954.             }
  8955.  
  8956.             print("Hidden Office Progress: " + get_property("hiddenOfficeProgress"), "blue");
  8957.             if(get_property("_grimstoneMaskDropsCrown").to_int() == 0)
  8958.             {
  8959.                 print('bjorning golem','blue');
  8960.                 handleBjornify($familiar[grimstone golem]);
  8961.             }
  8962.  
  8963.             if(get_property("cc_autoCraft") == "")
  8964.             {
  8965.                 set_property("cc_autoCraft", get_property("autoCraft").to_boolean());
  8966.             }
  8967.             set_property("autoCraft", false);
  8968.  
  8969.             ccAdv(1, $location[The Hidden Office Building]);
  8970.  
  8971.  
  8972.             if((item_amount($item[Boring Binder Clip]) == 1) && (item_amount($item[McClusky File (Page 5)]) == 1))
  8973.             {
  8974.                 #cli_execute("make mcclusky file (complete)");
  8975.                 visit_url("inv_use.php?pwd=&which=3&whichitem=6694");
  8976.                 cli_execute("refresh inv");
  8977.             }
  8978.             if(get_property("cc_autoCraft") != "")
  8979.             {
  8980.                 set_property("autoCraft", get_property("cc_autoCraft").to_boolean());
  8981.                 set_property("cc_autoCraft", "");
  8982.             }
  8983.  
  8984. #           if(item_amount($item[McClusky File (Complete)]) == 1)
  8985. #           {
  8986. #               print("If we abort saying that a boring binder clip doesn't make anything interesting.", "red");
  8987. #               print("Just run me again, we are trying to work with that...", "red");
  8988. #           }
  8989.  
  8990.             return true;
  8991.         }
  8992.  
  8993.         if(get_property("cc_hiddenbowling") != "finished")
  8994.         {
  8995.             if(item_amount($item[Scorched Stone Sphere]) > 0)
  8996.             {
  8997.                 if(have_effect($effect[On The Trail]) > 0)
  8998.                 {
  8999.                     if(item_amount($item[soft green echo eyedrop antidote]) > 0)
  9000.                     {
  9001.                         uneffect($effect[On The Trail]);
  9002.                     }
  9003.                 }
  9004.                 set_property("cc_hiddenbowling", "finished");
  9005.                 return true;
  9006.             }
  9007.  
  9008.             print("The idden [sic] bowling alley!", "blue");
  9009.             if(item_amount($item[Book of Matches]) == 0)
  9010.             {
  9011.                 pullXWhenHaveY($item[Book of Matches], 1, 0);
  9012.             }
  9013.             if((item_amount($item[Book of Matches]) > 0) && (my_ascensions() > get_property("hiddenTavernUnlock").to_int()))
  9014.             {
  9015.                 use(1, $item[Book of Matches]);
  9016.             }
  9017.             if(item_amount($item[Bowl Of Scorpions]) == 0)
  9018.             {
  9019.                 buyUpTo(1, $item[Bowl Of Scorpions]);
  9020.                 if(my_path() == "One Crazy Random Summer")
  9021.                 {
  9022.                     buyUpTo(3, $item[Bowl Of Scorpions]);
  9023.                 }
  9024.             }
  9025.             set_property("choiceAdventure788", "1");
  9026.  
  9027.             if(item_amount($item[Airborne Mutagen]) > 1)
  9028.             {
  9029.                 buffMaintain($effect[Heightened Senses], 0, 1, 1);
  9030.             }
  9031.  
  9032.             buffMaintain($effect[Fishy Whiskers], 0, 1, 1);
  9033.             print("Hidden Bowling Alley Progress: " + get_property("hiddenBowlingAlleyProgress"), "blue");
  9034.             ccAdv(1, $location[The Hidden Bowling Alley]);
  9035.  
  9036.             return true;
  9037.         }
  9038.  
  9039.         if(get_property("cc_hiddenhospital") != "finished")
  9040.         {
  9041.             if(item_amount($item[Dripping Stone Sphere]) > 0)
  9042.             {
  9043.                 set_property("cc_hiddenhospital", "finished");
  9044.                 return true;
  9045.             }
  9046.             print("The idden osptial!! [sic]", "blue");
  9047.             set_property("choiceAdventure784", "1");
  9048.  
  9049.             if(item_amount($item[bloodied surgical dungarees]) > 0)
  9050.             {
  9051.                 equip($item[bloodied surgical dungarees]);
  9052.             }
  9053.             if(item_amount($item[half-size scalpel]) > 0)
  9054.             {
  9055.                 equip($item[half-size scalpel]);
  9056.             }
  9057.             if(item_amount($item[surgical apron]) > 0)
  9058.             {
  9059.                 equip($item[surgical apron]);
  9060.             }
  9061.             if(item_amount($item[head mirror]) > 0)
  9062.             {
  9063.                 equip($slot[acc3], $item[head mirror]);
  9064.             }
  9065.             if(item_amount($item[surgical mask]) > 0)
  9066.             {
  9067.                 equip($slot[acc2], $item[surgical mask]);
  9068.             }
  9069.             print("Hidden Hospital Progress: " + get_property("hiddenHospitalProgress"), "blue");
  9070.             if(my_mp() > 60)
  9071.             {
  9072.                 print('bjorning golem','blue');
  9073.                 handleBjornify($familiar[grimstone golem]);
  9074.             }
  9075.             ccAdv(1, $location[The Hidden Hospital]);
  9076.  
  9077.             return true;
  9078.         }
  9079.         if((get_property("cc_hiddenapartment") == "finished") && (get_property("cc_hiddenoffice") == "finished") && (get_property("cc_hiddenbowling") == "finished") && (get_property("cc_hiddenhospital") == "finished"))
  9080.         {
  9081.             print("Getting the stone triangles", "blue");
  9082.             set_property("choiceAdventure791", "1");
  9083.             while(item_amount($item[stone triangle]) < 1)
  9084.             {
  9085.                 ccAdv(1, $location[An Overgrown Shrine (Northwest)]);
  9086.             }
  9087.             while(item_amount($item[stone triangle]) < 2)
  9088.             {
  9089.                 ccAdv(1, $location[An Overgrown Shrine (Northeast)]);
  9090.             }
  9091.             while(item_amount($item[stone triangle]) < 3)
  9092.             {
  9093.                 ccAdv(1, $location[An Overgrown Shrine (Southwest)]);
  9094.             }
  9095.             while(item_amount($item[stone triangle]) < 4)
  9096.             {
  9097.                 ccAdv(1, $location[An Overgrown Shrine (Southeast)]);
  9098.             }
  9099.  
  9100.             print("Fighting the out-of-work spirit", "blue");
  9101.             useCocoon();
  9102.  
  9103.             try
  9104.             {
  9105.                 handleInitFamiliar();
  9106.                 cli_execute("ccs cc_default");
  9107.                 if(ccAdv(1, $location[A Massive Ziggurat])) {}
  9108.                 handleFamiliar($familiar[Adventurous Spelunker]);
  9109.                 cli_execute("ccs null");
  9110.             }
  9111.             finally
  9112.             {
  9113.                 cli_execute("ccs null");
  9114.                 print("If I stopped, just run me again, beep!", "red");
  9115.             }
  9116.  
  9117.             if(item_amount($item[2180]) == 1)
  9118.             {
  9119.                 set_property("cc_hiddencity", "finished");
  9120.             }
  9121.  
  9122.             return true;
  9123.         }
  9124.         abort("Should not have gotten here. Aborting");
  9125.     }
  9126.  
  9127.     if((get_property("cc_mcmuffin") == "start") && (get_property("cc_swordfish") == "finished") && (get_property("cc_palindome") == ""))
  9128.     {
  9129.         if(get_property("questL11Palindome") == "finished")
  9130.         {
  9131.             set_property("cc_palindome", "finished");
  9132.             return true;
  9133.         }
  9134.         if(equipped_item($slot[acc3]) != $item[Talisman O\' Namsilat])
  9135.         {
  9136.             equip($slot[acc3], $item[Talisman O\' Namsilat]);
  9137.         }
  9138.  
  9139.         int total = 0;
  9140.         total = total + item_amount($item[Photograph Of A Red Nugget]);
  9141.         total = total + item_amount($item[Photograph Of An Ostrich Egg]);
  9142.         total = total + item_amount($item[Photograph Of God]);
  9143.         total = total + item_amount($item[Photograph Of A Dog]);
  9144.  
  9145.  
  9146.         boolean lovemeDone = (item_amount($item[&quot;I Love Me\, Vol. I&quot;]) > 0);
  9147.         if(get_property("palindomeDudesDefeated").to_int() >= 5)
  9148.         {
  9149.             string palindomeCheck = visit_url("place.php?whichplace=palindome");
  9150.             lovemeDone = lovemeDone || contains_text(palindomeCheck, "pal_drlabel");
  9151.         }
  9152.  
  9153.         print("In the palindome", "blue");
  9154.         if( total == 4 || (total == 0 && loveMeDone) )
  9155.         {
  9156.             if(item_amount($item[&quot;I Love Me\, Vol. I&quot;]) > 0)
  9157.             {
  9158.                 use(1, $item[&quot;I Love Me\, Vol. I&quot;]);
  9159.             }
  9160.             visit_url("place.php?whichplace=palindome&action=pal_drlabel");
  9161.             visit_url("choice.php?pwd&whichchoice=872&option=1&photo1=2259&photo2=7264&photo3=7263&photo4=7265");
  9162.  
  9163.             if(my_class() == $class[Ed])
  9164.             {
  9165.                 set_property("cc_palindome", "finished");
  9166.                 return true;
  9167.             }
  9168.  
  9169.             while(get_property("questL11Palindome") != "step5")
  9170.             {
  9171.                 use(1, $item[&quot;2 Love Me\, Vol. 2&quot;]);
  9172.                 if(have_effect($effect[Beaten Up]) > 0)
  9173.                 {
  9174.                     cli_execute("hottub");
  9175.                 }
  9176.                 visit_url("place.php?whichplace=palindome&action=pal_mrlabel");
  9177.                 if((item_amount($item[wet stew]) == 0) && (item_amount($item[Mega Gem]) == 0))
  9178.                 {
  9179.                     pullXWhenHaveY($item[Wet Stew], 1, 0);
  9180.                 }
  9181.                 if((item_amount($item[stunt nuts]) == 0) && (item_amount($item[Mega Gem]) == 0))
  9182.                 {
  9183.                     pullXWhenHaveY($item[Stunt Nuts], 1, 0);
  9184.                 }
  9185.                 if(item_amount($item[wet stew]) == 0 && (item_amount($item[bird rib]) > 0 && item_amount($item[lion oil]) > 0))
  9186.                 {
  9187.                     craft("cook", 1, $item[bird rib], $item[lion oil]);
  9188.                 }
  9189.                 if(item_amount($item[stunt nuts]) > 0 && item_amount($item[wet stew]) > 0)
  9190.                 {
  9191.                     craft("cook", 1, $item[wet stew], $item[stunt nuts]);
  9192.                 }
  9193.                 if(item_amount($item[Wet Stunt Nut Stew]) == 0 && (item_amount($item[Mega Gem]) == 0))
  9194.                 {
  9195.                     if(item_amount($item[stunt nuts]) == 0)
  9196.                     {
  9197.                         print("Don't have stunt nuts, gonna farm Inside the Palindome", "orange");
  9198.                         ccAdv(1, $location[Inside the Palindome]);
  9199.                     }else if( item_amount($item[wet stew]) == 0 ){
  9200.                         if(item_amount($item[bird rib]) == 0)
  9201.                         {
  9202.                             print("Don't have bird rib", "orange");
  9203.                         }
  9204.                         if(item_amount($item[lion oil]) == 0)
  9205.                         {
  9206.                             print("Don't have lion oil", "orange");
  9207.                         }
  9208.                         if(item_amount($item[bird rib]) == 0 || item_amount($item[lion oil]) == 0)
  9209.                         {
  9210.                             ccAdv(1, $location[whitey's grove]);
  9211.                         }
  9212.                     }
  9213.                     //abort("Could not make Wet Stunt Nut Stew");
  9214.                 }
  9215.                 if(item_amount($item[Wet Stunt Nut Stew])>0)
  9216.                 {
  9217.                     break;
  9218.                 }
  9219.             }
  9220.             visit_url("place.php?whichplace=palindome&action=pal_mrlabel");
  9221.             equip($slot[acc2], $item[Mega Gem]);
  9222.             print("War sir is raw!!", "blue");
  9223.             visit_url("place.php?whichplace=palindome&action=pal_drlabel");
  9224.             visit_url("choice.php?pwd&whichchoice=131&option=1&choiceform1=War%2C+sir%2C+is+raw%21");
  9225.             ccAdv(1, $location[Noob Cave]);//why?
  9226.             if(item_amount($item[2268]) == 1)
  9227.             {
  9228.                 set_property("cc_palindome", "finished");
  9229.             }
  9230.             return true;
  9231.         }
  9232.         else
  9233.         {
  9234.             if(my_mp() > 60)
  9235.             {
  9236.                 print('bjorning golem','blue');
  9237.                 handleBjornify($familiar[grimstone golem]);
  9238.             }
  9239.             if(get_property("questL11Palindome")=='step3')
  9240.             {
  9241.                
  9242.             }else{
  9243.                 ccAdv(1, $location[Inside the Palindome]);
  9244.                 if($location[Inside the Palindome].turns_spent > 30)
  9245.                 {
  9246.                     abort("It appears that we've spent too many turns in the Palindome. If you run me again, I'll try one more time but many I failed finishing the Palindome");
  9247.                 }
  9248.             }
  9249.         }
  9250.         return true;
  9251.     }
  9252.  
  9253.     if(L11_unlockPyramid() || L11_unlockEd() || L11_defeatEd())
  9254.     {
  9255.         return true;
  9256.     }
  9257.  
  9258.     if(L12_gremlins() || L12_gremlinStart())
  9259.     {
  9260.         return true;
  9261.     }
  9262.  
  9263.     if(L12_sonofaFinish() || L12_sonofaBeach())
  9264.     {
  9265.         return true;
  9266.     }
  9267.  
  9268.     if((get_property("cc_orchard") == "finished") && (get_property("sidequestOrchardCompleted") == "none"))
  9269.     {
  9270.         abort("The script thinks we completed the orchard but mafia doesn't, return the heart?");
  9271.     }
  9272.  
  9273.     if(L12_orchardStart())
  9274.     {
  9275.         return true;
  9276.     }
  9277.  
  9278.     if(L12_filthworms())
  9279.     {
  9280.         return true;
  9281.     }
  9282.  
  9283.     if(L12_orchardFinalize())
  9284.     {
  9285.         return true;
  9286.     }
  9287.  
  9288.  
  9289.     if((get_property("flyeredML").to_int() < 10000) && (!get_property("cc_ignoreFlyer").to_boolean() && (my_level() >= 12)))
  9290.     {
  9291.         print("Not enough flyer ML and we don't know what else to do...", "red");
  9292.         if(get_property("spookyAirportAlways").to_boolean())
  9293.         {
  9294.             if(item_amount($item[Personal Ventilation Unit]) > 0)
  9295.             {
  9296.                 equip($slot[acc2], $item[Personal Ventilation Unit]);
  9297.             }
  9298.             buffMaintain($effect[Experimental Effect G-9], 0, 1, 1);
  9299.             if(my_primestat() == $stat[Mysticality])
  9300.             {
  9301.                 buffMaintain($effect[Perspicacious Pressure], 0, 1, 1);
  9302.                 buffMaintain($effect[Glittering Eyelashes], 0, 1, 1);
  9303.                 buffMaintain($effect[Erudite], 0, 1, 1);
  9304.             }
  9305.             ccAdv(1, $location[The Secret Government Laboratory]);
  9306.             return true;
  9307.         }
  9308.         abort("Have not been able to flyer enough in-run, you can manually do this or override cc_ignoreFlyer = true");
  9309.     }
  9310.  
  9311.     if((my_level() >= 12) && ((get_property("hippiesDefeated").to_int() >= 192) || get_property("cc_hippyInstead").to_boolean()) && (get_property("cc_nuns") == ""))
  9312.     {
  9313.         if(doThemtharHills(false))
  9314.         {
  9315.             return true;
  9316.         }
  9317.     }
  9318.  
  9319.     if((get_property("cc_war") != "done") && (get_property("cc_war") != "finished") && ((get_property("hippiesDefeated").to_int() >= 1000) || (get_property("fratboysDefeated").to_int() >= 1000)))
  9320.     {
  9321.         set_property("cc_nuns", "finished");
  9322.         set_property("cc_war", "done");
  9323.     }
  9324.  
  9325.     if((my_level() >= 12) && (get_property("cc_battleFratplant") == ""))
  9326.     {
  9327.         warOutfit();
  9328.         warAdventure();
  9329.         oldPeoplePlantStuff();
  9330.         set_property("cc_battleFratplant", "plant");
  9331.         return true;
  9332.     }
  9333.  
  9334.     if(L11_getBeehive())
  9335.     {
  9336.         return true;
  9337.     }
  9338.  
  9339.     if(L12_finalizeWar())
  9340.     {
  9341.         return true;
  9342.     }
  9343.  
  9344.     if(LX_getDigitalKey())
  9345.     {
  9346.         return true;
  9347.     }
  9348.  
  9349.     if((item_amount($item[rock band flyers]) == 1) && (get_property("flyeredML").to_int() < 10000))
  9350.     {
  9351.         print("Not enough flyer ML but we are ready for the war... uh oh", "blue");
  9352.         if(my_path() == "Picky")
  9353.         {
  9354.             //This is outdated since we don\'t need to consider stars/lines as much
  9355.             if(item_amount($item[Steam-Powered Model Rocketship]) == 0)
  9356.             {
  9357.                 set_property("choiceAdventure677", "2");
  9358.                 set_property("choiceAdventure678", "3");
  9359.                 handleInitFamiliar();
  9360.                 ccAdv(1, $location[The Castle in the Clouds in the Sky (Top Floor)]);
  9361.                 handleFamiliar($familiar[Adventurous Spelunker]);
  9362.             }
  9363.             else
  9364.             {
  9365.                 ccAdv(1, $location[The Hole in the Sky]);
  9366.             }
  9367.             return true;
  9368.         }
  9369.         else
  9370.         {
  9371.             print("Should not have so little flyer ML at this point", "red");
  9372.             wait(1);
  9373.             handleFamiliar($familiar[Fist Turkey]);
  9374.             if(elementalPlanes_access($element[sleaze]))
  9375.             {
  9376.                 ccAdv(1, $location[Sloppy Seconds Diner]);
  9377.             }
  9378.             else
  9379.             {
  9380.                 abort("Need more flyer ML but don't know where to go :(");
  9381.             }
  9382.             return true;
  9383.         }
  9384.     }
  9385.  
  9386.     if((get_property("cc_battleFratplant") == "plant") && ((get_property("hippiesDefeated").to_int() < 64) && (get_property("fratboysDefeated").to_int() < 64)) && (my_level() >= 12))
  9387.     {
  9388.         print("First 64 combats. To orchard/lighthouse", "blue");
  9389.         warOutfit();
  9390.         warAdventure();
  9391.         return true;
  9392.     }
  9393.  
  9394.     if((get_property("cc_battleFratplant") == "plant") && ((get_property("hippiesDefeated").to_int() < 192) && (get_property("fratboysDefeated").to_int() < 192)) && (my_level() >= 12))
  9395.     {
  9396.         print("Getting to the nunnery/junkyard", "blue");
  9397.         warOutfit();
  9398.         warAdventure();
  9399.         return true;
  9400.     }
  9401.  
  9402.     if((get_property("cc_nuns") == "done") && ((get_property("hippiesDefeated").to_int() < 1000) && (get_property("fratboysDefeated").to_int() < 1000)) && (my_level() >= 12))
  9403.     {
  9404.         print("Doing the wars.", "blue");
  9405.         warOutfit();
  9406.         warAdventure();
  9407.         return true;
  9408.     }
  9409.  
  9410.     if((get_property("cc_nuns") == "finished") && ((get_property("hippiesDefeated").to_int() < 1000) && (get_property("fratboysDefeated").to_int() < 1000)) && (my_level() >= 12))
  9411.     {
  9412.         print("Doing the wars.", "blue");
  9413.         warOutfit();
  9414.         warAdventure();
  9415.         return true;
  9416.     }
  9417.  
  9418.  
  9419.     if(get_property("cc_sorceress") == "")
  9420.     {
  9421.         if(my_class() == $class[Ed])
  9422.         {
  9423.             if(item_amount($item[Thwaitgold Scarab Beetle Statuette]) > 0)
  9424.             {
  9425.                 set_property("cc_sorceress", "finished");
  9426.                 council();
  9427.                 return true;
  9428.             }
  9429.  
  9430.             council();
  9431.             if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_10_sorcfight"))
  9432.             {
  9433.                 print("We found the jerkwad!! Revenge!!!!!", "blue");
  9434.  
  9435.                 string page = "place.php?whichplace=nstower&action=ns_10_sorcfight";
  9436.                 ccAdvBypass(page, $location[Noob Cave]);
  9437.  
  9438.                 if(item_amount($item[Thwaitgold Scarab Beetle Statuette]) > 0)
  9439.                 {
  9440.                     set_property("cc_sorceress", "finished");
  9441.                     council();
  9442.                 }
  9443.                 return true;
  9444.             }
  9445.             else
  9446.             {
  9447.                 if((get_property("timesRested").to_int() < total_free_rests()) && chateaumantegna_available())
  9448.                 {
  9449.                     doRest();
  9450.                     cli_execute("scripts/postcheese.ash");
  9451.                     return true;
  9452.                 }
  9453.                 print("Please check your quests, but you might just not be at level 13 yet in order to continue.", "red");
  9454.                 if((my_level() < 13) && get_property("spookyAirportAlways").to_boolean())
  9455.                 {
  9456.                     boolean tryJungle = false;
  9457.                     if(have_effect($effect[Jungle Juiced]) > 0)
  9458.                     {
  9459.                         tryJungle = true;
  9460.                     }
  9461.  
  9462.                     if(((my_inebriety() + 1) < inebriety_limit()) && (item_amount($item[Coinspiracy]) > 0) && (have_effect($effect[Jungle Juiced]) == 0))
  9463.                     {
  9464.                         buy(1, $item[Jungle Juice]);
  9465.                         drink(1, $item[Jungle Juice]);
  9466.                         tryJungle = true;
  9467.                     }
  9468.  
  9469.                     buffMaintain($effect[Experimental Effect G-9], 0, 1, 1);
  9470.                     if(my_primestat() == $stat[Mysticality])
  9471.                     {
  9472.                         buffMaintain($effect[Perspicacious Pressure], 0, 1, 1);
  9473.                         buffMaintain($effect[Glittering Eyelashes], 0, 1, 1);
  9474.                         buffMaintain($effect[Erudite], 0, 1, 1);
  9475.                     }
  9476.  
  9477.                     if(tryJungle)
  9478.                     {
  9479.                         ccAdv(1, $location[The Deep Dark Jungle]);
  9480.                     }
  9481.                     else
  9482.                     {
  9483.                         if(item_amount($item[Personal Ventilation Unit]) > 0)
  9484.                         {
  9485.                             equip($slot[acc2], $item[Personal Ventilation Unit]);
  9486.                         }
  9487.                         ccAdv(1, $location[The Secret Government Laboratory]);
  9488.                     }
  9489.                     return true;
  9490.                 }
  9491.                 else
  9492.                 {
  9493.                     abort("We must be missing a sidequest. We can't find the jerk adventurer.");
  9494.                 }
  9495.             }
  9496.         }
  9497.  
  9498.  
  9499.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_01_contestbooth"))
  9500.         {
  9501.             set_property("cc_sorceress", "start");
  9502.             set_property("choiceAdventure1003", 0);
  9503.         }
  9504.         else
  9505.         {
  9506.             if(((my_daycount() > 2) && !in_hardcore()) || (my_daycount() > 3))
  9507.             {
  9508.                 abort("Some sidequest is not done for some raisin.");
  9509.             }
  9510.             else if(my_level() < 13)
  9511.             {
  9512.                 print("I seem to need to power level, or something... waaaa.", "red");
  9513.                 wait(10);
  9514.                 if((get_property("timesRested").to_int() < total_free_rests()) && chateaumantegna_available())
  9515.                 {
  9516.                     doRest();
  9517.                     cli_execute("scripts/postcheese.ash");
  9518.                     return true;
  9519.                 }
  9520.  
  9521.                 handleFamiliar($familiar[Fist Turkey]);
  9522.                 if(elementalPlanes_access($element[sleaze]))
  9523.                 {
  9524.                     ccAdv(1, $location[Sloppy Seconds Diner]);
  9525.                 }
  9526.                 else
  9527.                 {
  9528.                     print("The following error message is probably wrong, you just need to powerlevel to 13 most likely.", "red");
  9529.                     abort("Need more flyer ML but don't know where to go :(");
  9530.                 }
  9531.                 return true;
  9532.             }
  9533.             else
  9534.             {
  9535.                 #need a wand (or substitute a key lime for food earlier)
  9536.             }
  9537.         }
  9538.     }
  9539.  
  9540.  
  9541.     if(get_property("cc_sorceress") == "start")
  9542.     {
  9543.         if((get_property("cc_trytower") == "pause") || (get_property("cc_trytower") == "stop") || ((my_name() == "Cheesecookie") && (get_property("choiceAdventure1003").to_int() < 3)))
  9544.         {
  9545.             ns_crowd1();
  9546.             ns_crowd2();
  9547.             ns_crowd3();
  9548.             ns_hedge1();
  9549.             ns_hedge2();
  9550.             ns_hedge3();
  9551.             if(get_property("cc_trytower") == "stop")
  9552.             {
  9553.                 print("Manual handling for the start of challenges still required. Then run me again. Beep", "blue");
  9554.                 set_property("choiceAdventure1003", 3);
  9555.                 abort("Can't handle this optimally just yet, damn it");
  9556.             }
  9557.             else if(get_property("cc_trytower") == "pause")
  9558.             {
  9559.                 set_property("cc_trytower", "");
  9560.                 print("Start the tower challenges and then run me again and I'll take care of the rest");
  9561.                 abort("Run again once all three challenges have been started. We will assume they have been");
  9562.                 set_property("choiceAdventure1003", 3);
  9563.             }
  9564.             else
  9565.             {
  9566.                 print("Manual handling for the start of challenges still required. Then run me again. Beep");
  9567.                 set_property("choiceAdventure1003", 3);
  9568.                 abort("Can't handle this optimally just yet, damn it");
  9569.             }
  9570.         }
  9571.         if(contains_text(visit_url("place.php?whichplace=nstower"), "nstower_door"))
  9572.         {
  9573.             set_property("cc_sorceress", "door");
  9574.             return true;
  9575.         }
  9576.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_03_hedgemaze"))
  9577.         {
  9578.             set_property("cc_sorceress", "hedge");
  9579.             return true;
  9580.         }
  9581.  
  9582.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_02_coronation"))
  9583.         {
  9584.             set_property("choiceAdventure1020", "1");
  9585.             set_property("choiceAdventure1021", "1");
  9586.             set_property("choiceAdventure1022", "1");
  9587.             visit_url("place.php?whichplace=nstower&action=ns_02_coronation");
  9588.             visit_url("choice.php?pwd=&whichchoice=1020&option=1", true);
  9589.             visit_url("choice.php?pwd=&whichchoice=1021&option=1", true);
  9590.             visit_url("choice.php?pwd=&whichchoice=1022&option=1", true);
  9591.             return true;
  9592.         }
  9593.  
  9594.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_01_crowd1"))
  9595.         {
  9596.             visit_url("place.php?whichplace=nstower&action=ns_01_crowd1");
  9597.             ccAdv(1, $location[Noob Cave]);
  9598.             return true;
  9599.         }
  9600.  
  9601.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_01_crowd2"))
  9602.         {
  9603.             visit_url("place.php?whichplace=nstower&action=ns_01_crowd2");
  9604.             ccAdv(1, $location[Noob Cave]);
  9605.             return true;
  9606.         }
  9607.  
  9608.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_01_crowd3"))
  9609.         {
  9610.             visit_url("place.php?whichplace=nstower&action=ns_01_crowd3");
  9611.             ccAdv(1, $location[Noob Cave]);
  9612.             return true;
  9613.         }
  9614.  
  9615.         // FIXME: We want to invoke all three challenges at once because of cross-buffs.
  9616.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_01_contestbooth"))
  9617.         {
  9618.             set_property("choiceAdventure1003", get_property("choiceAdventure1003").to_int() + 1);
  9619.             int nsChoice = get_property("choiceAdventure1003").to_int();
  9620.  
  9621.             switch(nsChoice)
  9622.             {
  9623.             case 1:
  9624.                 switch(ns_crowd1())
  9625.                 {
  9626.                 case 1:                 maximize("initiative", 1500, 0, false);     break;
  9627.                 }
  9628.                 break;
  9629.             case 2:
  9630.                 switch(ns_crowd2())
  9631.                 {
  9632.                 case $stat[moxie]:      maximize("moxie", 1500, 0, false);          break;
  9633.                 case $stat[muscle]:     maximize("muscle", 1500, 0, false);         break;
  9634.                 case $stat[mysticality]:maximize("myst", 1500, 0, false);           break;
  9635.                 }
  9636.                 break;
  9637.             case 3:
  9638.                 switch(ns_crowd3())
  9639.                 {
  9640.                 case $element[cold]:    maximize("cold dmg", 1500, 0, false);           break;
  9641.                 case $element[hot]:     maximize("hot dmg", 1500, 0, false);            break;
  9642.                 case $element[sleaze]:  maximize("sleaze dmg", 1500, 0, false);         break;
  9643.                 case $element[stench]:  maximize("stench dmg", 1500, 0, false);         break;
  9644.                 case $element[spooky]:  maximize("spooky dmg", 1500, 0, false);         break;
  9645.                 }
  9646.                 break;
  9647.             }
  9648.  
  9649.             if(nsChoice > 6)
  9650.             {
  9651.                 abort("Trying to select NS gate challenges or complete the gate and we explodered");
  9652.             }
  9653.  
  9654.             visit_url("place.php?whichplace=nstower&action=ns_01_contestbooth");
  9655.             visit_url("choice.php?pwd=&whichchoice=1003&option=" + nsChoice, true);
  9656.             visit_url("main.php");
  9657.             return true;
  9658.         }
  9659.  
  9660.         abort("Failed the sorceress first area stuff, uh oh.");
  9661.     }
  9662.  
  9663.     if(get_property("cc_sorceress") == "hedge")
  9664.     {
  9665.         if(contains_text(visit_url("place.php?whichplace=nstower"), "nstower_door"))
  9666.         {
  9667.             set_property("cc_sorceress", "door");
  9668.             return true;
  9669.         }
  9670.  
  9671.         # Set this so it aborts if not enough adventures. Otherwise, well, we end up in a loop.
  9672.         set_property("choiceAdventure1004", "3");
  9673.  
  9674.         set_property("choiceAdventure1005", "2");           # 'Allo
  9675.         set_property("choiceAdventure1006", "2");           # One Small Step For Adventurer
  9676.         set_property("choiceAdventure1007", "2");           # Twisty Little Passages, All Hedge
  9677.         set_property("choiceAdventure1008", "2");           # Pooling Your Resources
  9678.         set_property("choiceAdventure1009", "2");           # Gold Ol' 44% Duck
  9679.         set_property("choiceAdventure1010", "2");           # Another Day, Another Fork
  9680.         set_property("choiceAdventure1011", "2");           # Of Mouseholes and Manholes
  9681.         set_property("choiceAdventure1012", "2");           # The Last Temptation
  9682.         set_property("choiceAdventure1013", "1");           # Masel Tov!
  9683.  
  9684.         maximize_hedge();
  9685.         useCocoon();
  9686.         visit_url("place.php?whichplace=nstower&action=ns_03_hedgemaze");
  9687.  
  9688.         if(get_property("cc_hedge") == "slow")
  9689.         {
  9690.             visit_url("choice.php?pwd=&whichchoice=1005&option=1", true);
  9691.             visit_url("choice.php?pwd=&whichchoice=1006&option=1", true);
  9692.             visit_url("choice.php?pwd=&whichchoice=1007&option=1", true);
  9693.             visit_url("choice.php?pwd=&whichchoice=1008&option=1", true);
  9694.             visit_url("choice.php?pwd=&whichchoice=1009&option=1", true);
  9695.             visit_url("choice.php?pwd=&whichchoice=1010&option=1", true);
  9696.             visit_url("choice.php?pwd=&whichchoice=1011&option=1", true);
  9697.             visit_url("choice.php?pwd=&whichchoice=1012&option=1", true);
  9698.             visit_url("choice.php?pwd=&whichchoice=1013&option=1", true);
  9699.         }
  9700.         else if(get_property("cc_hedge") == "fast")
  9701.         {
  9702.             visit_url("choice.php?pwd=&whichchoice=1005&option=2", true);
  9703. #           visit_url("choice.php?pwd=&whichchoice=1006&option=2", true);
  9704. #           visit_url("choice.php?pwd=&whichchoice=1007&option=2", true);
  9705.             visit_url("choice.php?pwd=&whichchoice=1008&option=2", true);
  9706. #           visit_url("choice.php?pwd=&whichchoice=1009&option=2", true);
  9707. #           visit_url("choice.php?pwd=&whichchoice=1010&option=2", true);
  9708.             visit_url("choice.php?pwd=&whichchoice=1011&option=2", true);
  9709. #           visit_url("choice.php?pwd=&whichchoice=1012&option=2", true);
  9710.             visit_url("choice.php?pwd=&whichchoice=1013&option=1", true);
  9711.         }
  9712.         else
  9713.         {
  9714.             abort("cc_hedge not set properly (slow/fast), assuming manual handling desired");
  9715.         }
  9716.         return true;
  9717.     }
  9718.  
  9719.     if(L13_sorceressDoor())
  9720.     {
  9721.         return true;
  9722.     }
  9723.  
  9724.     if(get_property("cc_sorceress") == "tower")
  9725.     {
  9726.         if(my_name() == "Cheesecookie")
  9727.         {
  9728. #           abort("Aborting for tower experiments, beep");
  9729.         }
  9730.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_05_monster1"))
  9731.         {
  9732.             change_mcd(0);
  9733.             if(item_amount($item[bottle of monsieur bubble]) > 0)
  9734.             {
  9735.                 use(1, $item[bottle of monsieur bubble]);
  9736.             }
  9737.             else if(item_amount($item[carbonated soy milk]) > 0)
  9738.             {
  9739.                 use(1, $item[carbonated soy milk]);
  9740.             }
  9741.             else if(item_amount($item[tiny house]) > 1)
  9742.             {
  9743.                 use(2, $item[tiny house]);
  9744.             }
  9745.  
  9746.             #glowing syringe : biologically shocke
  9747.             int sources = 0;
  9748.             if(item_amount($item[astral shirt]) > 0)
  9749.             {
  9750.                 equip($item[astral shirt]);
  9751.             }
  9752.             if(equipped_item($slot[shirt]) == $item[astral shirt])
  9753.             {
  9754.                 sources = 6;
  9755.             }
  9756.             if(have_skill($skill[headbutt]))
  9757.             {
  9758.                 sources = sources + 1;
  9759.             }
  9760.             item familiarEquip = equipped_item($slot[Familiar]);
  9761.             if((have_familiar($familiar[warbear drone])) && !get_property("cc_100familiar").to_boolean())
  9762.             {
  9763.                 sources = sources + 2;
  9764.                 handleFamiliar($familiar[Warbear Drone]);
  9765.                 if(!possessEquipment($item[Warbear Drone Codes]))
  9766.                 {
  9767.                     pullXWhenHaveY($item[warbear drone codes], 1, 0);
  9768.                 }
  9769.                 if((item_amount($item[warbear drone codes]) > 0) || (equipped_item($slot[familiar]) == $item[warbear drone codes]))
  9770.                 {
  9771.                     equip($item[warbear drone codes]);
  9772.                     sources = sources + 2;
  9773.                 }
  9774.             }
  9775.             if(item_amount($item[hippy protest button]) > 0)
  9776.             {
  9777.                 equip($slot[acc1], $item[hippy protest button]);
  9778.                 sources = sources + 1;
  9779.             }
  9780.             else
  9781.             {
  9782.                 equip($slot[acc1], $item[pirate fledges]);
  9783.             }
  9784.             if(item_amount($item[glob of spoiled mayo]) > 0)
  9785.             {
  9786.                 buffMaintain($effect[Mayeaugh], 0, 1, 1);
  9787.                 sources = sources + 1;
  9788.             }
  9789.             if(item_amount($item[smirking shrunken head]) > 0)
  9790.             {
  9791.                 equip($item[smirking shrunken head]);
  9792.                 sources = sources + 1;
  9793.             }
  9794.             else if(item_amount($item[hot plate]) > 0)
  9795.             {
  9796.                 equip($item[hot plate]);
  9797.                 sources = sources + 1;
  9798.             }
  9799.             if(have_skill($skill[Scarysauce]))
  9800.             {
  9801.                 buffMaintain($effect[Scarysauce], 0, 1, 1);
  9802.                 sources = sources + 1;
  9803.             }
  9804.             if(have_skill($skill[Spiky Shell]))
  9805.             {
  9806.                 buffMaintain($effect[Spiky Shell], 0, 1, 1);
  9807.                 sources = sources + 1;
  9808.             }
  9809.             if(have_skill($skill[Jalape&ntilde;o Saucesphere]))
  9810.             {
  9811.                 sources = sources + 1;
  9812.                 buffMaintain($effect[Jalape&ntilde;o Saucesphere], 0, 1, 1);
  9813.             }
  9814.             print('bjorning monkey','blue');
  9815.             handleBjornify($familiar[Hobo Monkey]);
  9816.             if(equipped_item($slot[acc2]) != $item[world\'s best adventurer sash])
  9817.             {
  9818.                 equip($slot[acc2], $item[world\'s best adventurer sash]);
  9819.             }
  9820. #           if(item_amount($item[old-school calculator watch]) > 0)
  9821. #           {
  9822. #               equip($slot[acc3], $item[old-school calculator watch]);
  9823. #           }
  9824.             if((equipped_item($slot[acc3]) != $item[acid-squirting flower]) && (item_amount($item[acid-squirting flower]) > 0))
  9825.             {
  9826.                 equip($slot[acc3], $item[acid-squirting flower]);
  9827.             }
  9828.             if(have_skill($skill[Frigidalmatian]) && (my_mp() > 300))
  9829.             {
  9830.                 sources = sources + 1;
  9831.             }
  9832.  
  9833.  
  9834.             if((item_amount($item[beehive]) > 0) || (sources > 14))
  9835.             {
  9836.                 if(item_amount($item[beehive]) == 0)
  9837.                 {
  9838.                     useCocoon();
  9839.                 }
  9840.                 visit_url("place.php?whichplace=nstower&action=ns_05_monster1");
  9841.                 adv1($location[Noob Cave], 1, "cc_combatHandler");
  9842.                 if(have_effect($effect[Beaten Up]) > 0)
  9843.                 {
  9844.                     set_property("cc_getBeehive", true);
  9845.                     print("I probably failed the Wall of Skin, I assume that I tried without a beehive. Well, I'm going back to get it.", "red");
  9846.                 }
  9847.                 else
  9848.                 {
  9849.                     handleFamiliar($familiar[Adventurous Spelunker]);
  9850.                     if(item_amount(familiarEquip) > 0)
  9851.                     {
  9852.                         equip(familiarEquip);
  9853.                     }
  9854.                 }
  9855.             }
  9856.             else
  9857.             {
  9858.                 set_property("cc_getBeehive", true);
  9859.                 print("Need a beehive, buzz buzz.", "red");
  9860.             }
  9861.             return true;
  9862.         }
  9863.  
  9864.  
  9865.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_06_monster2"))
  9866.         {
  9867.             buffMaintain($effect[Disco Leer], 0, 1, 1);
  9868.             buffMaintain($effect[Polka of Plenty], 0, 1, 1);
  9869.             buffMaintain($effect[Cranberry Cordiality], 0, 1, 1);
  9870.             if((get_property("sidequestArenaCompleted") == "fratboy") && (get_property("concertVisited") == "false") && (have_effect($effect[Winklered]) == 0))
  9871.             {
  9872.                 cli_execute("concert 2");
  9873.             }
  9874.             if(item_amount($item[Silver Cow Creamer]) > 0)
  9875.             {
  9876.                 equip($item[Silver Cow Creamer]);
  9877.             }
  9878.             if(item_amount($item[Sneaky Pete\'s Leather Jacket]) > 0)
  9879.             {
  9880.                 equip($item[Sneaky Pete\'s Leather Jacket]);
  9881.             }
  9882.             maximize("meat drop", 1500, 0, false);
  9883.             if((my_class() == $class[Seal Clubber]) && (item_amount($item[Meat Tenderizer is Murder]) > 0))
  9884.             {
  9885.                 equip($item[Meat Tenderizer is Murder]);
  9886.             }
  9887.             handleFamiliar($familiar[Adventurous Spelunker]);
  9888.  
  9889.             if(my_mp() >= 20)
  9890.             {
  9891.                 useCocoon();
  9892.             }
  9893.             else if(my_hp() < (0.9 * my_maxhp()))
  9894.             {
  9895.                 cli_execute("hottub");
  9896.             }
  9897.             #Wall of Meat, buff meat, need at least 400 I suppose.
  9898.             visit_url("place.php?whichplace=nstower&action=ns_06_monster2");
  9899.             #adv1($location[Noob Cave], 1, "cc_combatHandler");
  9900.             ccAdv(1, $location[Noob Cave]);
  9901.             return true;
  9902.         }
  9903.  
  9904.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_07_monster3"))
  9905.         {
  9906.             # wall of bones
  9907.             # is affected by -ML
  9908.             # 1000 stats, immune to stuns, maybe if you prep a big mien or greasy.
  9909.             # Tried +65/+460% at 541 Myst: (6831, 6845, 6815 damage)
  9910.  
  9911.             if((my_class() == $class[Sauceror]) || have_skill($skill[Garbage Nova]))
  9912.             {
  9913.                 uneffect($effect[Scarysauce]);
  9914.                 uneffect($effect[Jalape&ntilde;o Saucesphere]);
  9915.                 uneffect($effect[Mayeaugh]);
  9916.                 uneffect($effect[Spiky Shell]);
  9917.                 use_familiar($familiar[none]);
  9918.                 buffMaintain($effect[Tomato Power], 0, 1, 1);
  9919.                 buffMaintain($effect[Seeing Colors], 0, 1, 1);
  9920.                 buffMaintain($effect[Glittering Eyelashes], 0, 1, 1);
  9921.                 buffMaintain($effect[OMG WTF], 0, 1, 1);
  9922.                 buffMaintain($effect[There is a Spoon], 0, 1, 1);
  9923.                 boolean keepTrying = true;
  9924.                 while((my_mp() < 216) && keepTrying)
  9925.                 {
  9926.                     keepTrying = false;
  9927.                     if(item_amount($item[Carbonated Soy Milk]) > 0)
  9928.                     {
  9929.                         use(1, $item[Carbonated Soy Milk]);
  9930.                         keepTrying = true;
  9931.                     }
  9932.                     if(item_amount($item[Natural Fennel Soda]) > 0)
  9933.                     {
  9934.                         use(1, $item[Natural Fennel Soda]);
  9935.                         keepTrying = true;
  9936.                     }
  9937.                     if(item_amount($item[Phonics Down]) > 0)
  9938.                     {
  9939.                         use(1, $item[Phonics Down]);
  9940.                         keepTrying = true;
  9941.                     }
  9942.                 }
  9943.                 buffMaintain($effect[Song of Sauce], 0, 1, 1);
  9944.                 maximize("myst", 1500, 0, false);
  9945.                 if(equipped_item($slot[acc1]) == $item[hand in glove])
  9946.                 {
  9947.                     equip($slot[acc1], $item[Pirate Fledges]);
  9948.                 }
  9949.                 if(equipped_item($slot[acc2]) == $item[hand in glove])
  9950.                 {
  9951.                     equip($slot[acc2], $item[Pirate Fledges]);
  9952.                 }
  9953.                 if(equipped_item($slot[acc3]) == $item[hand in glove])
  9954.                 {
  9955.                     equip($slot[acc3], $item[Pirate Fledges]);
  9956.                 }
  9957.                 useCocoon();
  9958.                 visit_url("place.php?whichplace=nstower&action=ns_07_monster3");
  9959.                 #adv1($location[Noob Cave], 1, "cc_combatHandler");
  9960.                 ccAdv(1, $location[Noob Cave]);
  9961.                 if(have_effect($effect[Beaten Up]) > 0)
  9962.                 {
  9963.                     abort("Could not towerkill Wall of Bones, must be handled manually");
  9964.                 }
  9965.                 else
  9966.                 {
  9967.                     handleFamiliar($familiar[Adventurous Spelunker]);
  9968.                 }
  9969.             }
  9970.             else if(item_amount($item[electric boning knife]) > 0)
  9971.             {
  9972.                 visit_url("place.php?whichplace=nstower&action=ns_07_monster3");
  9973.                 adv1($location[Noob Cave], 1, "cc_combatHandler");
  9974.             }
  9975.             else
  9976.             {
  9977.                 print("Backfarming an Electric Boning Knife", "brown");
  9978.                 set_property("choiceAdventure1026", "2");
  9979.                 ccAdv(1, $location[The Castle in the Clouds in the Sky (Ground Floor)]);
  9980. #               abort("Need an electric boning knife");
  9981.             }
  9982.             return true;
  9983.         }
  9984.  
  9985.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_08_monster4"))
  9986.         {
  9987.             set_property("choiceAdventure1015", "2");
  9988.             visit_url("place.php?whichplace=nstower&action=ns_08_monster4");
  9989.             #Not breaking the mirror wastes an adventure
  9990.             visit_url("choice.php?pwd=&whichchoice=1015&option=2", true);
  9991.             return true;
  9992.         }
  9993.  
  9994.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_09_monster5"))
  9995.         {
  9996.             if(my_maxhp() < 800)
  9997.             {
  9998.                 buffMaintain($effect[Industrial Strength Starch], 0, 1, 1);
  9999.                 buffMaintain($effect[Truly Gritty], 0, 1, 1);
  10000.                 buffMaintain($effect[Superheroic], 0, 1, 1);
  10001.                 buffMaintain($effect[Strong Grip], 0, 1, 1);
  10002.                 buffMaintain($effect[Spiky Hair], 0, 1, 1);
  10003.             }
  10004.             cli_execute("scripts/postcheese.ash");
  10005.             cli_execute("hottub");
  10006.  
  10007.             visit_url("place.php?whichplace=nstower&action=ns_09_monster5");
  10008.             adv1($location[Noob Cave], 1, "cc_combatHandler");
  10009.  
  10010.             return true;
  10011.         }
  10012.  
  10013.         if(contains_text(visit_url("place.php?whichplace=nstower"), "ns_10_sorcfight"))
  10014.         {
  10015.             set_property("cc_sorceress", "top");
  10016.             return true;
  10017.         }
  10018.     }
  10019.  
  10020.     if(get_property("cc_wandOfNagamar").to_boolean())
  10021.     {
  10022.         if(item_amount($item[wand of nagamar]) > 0)
  10023.         {
  10024.             set_property("cc_wandOfNagamar", false);
  10025.             return true;
  10026.         }
  10027.         else if(pulls_remaining() >= 2)
  10028.         {
  10029.             if((item_amount($item[ruby w]) > 0) && (item_amount($item[metallic A]) > 0))
  10030.             {
  10031.                 cli_execute("make wa");
  10032.             }
  10033.             pullXWhenHaveY($item[WA], 1, 0);
  10034.             pullXWhenHaveY($item[ND], 1, 0);
  10035.             cli_execute("make wand of nagamar");
  10036.             return true;
  10037.         }
  10038.         else
  10039.         {
  10040.             pullXWhenHaveY($item[disassembled clover], 1, 0);
  10041.             use(1, $item[disassembled clover]);
  10042.             visit_url("adventure.php?snarfblat=322&confirm=on");
  10043.             cli_execute("make wand of nagamar");
  10044.             return true;
  10045.         }
  10046.     }
  10047.  
  10048.     if(get_property("cc_sorceress") == "top")
  10049.     {
  10050.         set_property("cc_sorceress", "final");
  10051.     }
  10052.  
  10053.     if((get_property("cc_sorceress") == "final") && !get_property("cc_wandOfNagamar").to_boolean())
  10054.     {
  10055.         //We should probably not do the buffing if we are fighting the actual sorceress.
  10056.         cli_execute("scripts/postcheese.ash");
  10057.         if(item_amount($item[Ouija Board\, Ouija Board]) > 0)
  10058.         {
  10059.             equip($item[Ouija Board\, Ouija Board]);
  10060.         }
  10061.  
  10062.         handleFamiliar($familiar[warbear drone]);
  10063.         if(!have_familiar($familiar[Warbear Drone]))
  10064.         {
  10065.             handleFamiliar($familiar[Fist Turkey]);
  10066.         }
  10067.  
  10068.         if(item_amount($item[Beer Helmet]) > 0)
  10069.         {
  10070.             equip($item[Beer Helmet]);
  10071.         }
  10072.         if(item_amount($item[Misty Cloak]) > 0)
  10073.         {
  10074.             equip($item[Misty Cloak]);
  10075.         }
  10076.         if(item_amount($item[Attorney\'s Badge]) > 0)
  10077.         {
  10078.             equip($slot[acc2], $item[Attorney\'s Badge]);
  10079.         }
  10080.         if(item_amount($item[gumshoes]) > 0)
  10081.         {
  10082.             equip($slot[acc1], $item[gumshoes]);
  10083.         }
  10084.         if(item_amount($item[World\'s Best Adventurer Sash]) > 0)
  10085.         {
  10086.             equip($slot[acc3], $item[World\'s Best Adventurer Sash]);
  10087.         }
  10088.  
  10089.  
  10090.         set_property("cc_disableAdventureHandling", "yes");
  10091.         visit_url("place.php?whichplace=nstower&action=ns_10_sorcfight");
  10092.         ccAdv(1, $location[Noob Cave]);
  10093.         if(have_effect($effect[Beaten Up]) > 0)
  10094.         {
  10095.             print("Sorceress beat us up. Wahhh.", "red");
  10096.             return true;
  10097.         }
  10098.         if(last_monster() == $monster[Naughty Sorceress])
  10099.         {
  10100.             ccAdv(1, $location[Noob Cave]);
  10101.             if(have_effect($effect[Beaten Up]) > 0)
  10102.             {
  10103.                 print("Blobbers Sorceress beat us up. Wahhh.", "red");
  10104.                 return true;
  10105.             }
  10106.             ccAdv(1, $location[Noob Cave]);
  10107.             if(have_effect($effect[Beaten Up]) > 0)
  10108.             {
  10109.                 print("We got beat up by a sausage....", "red");
  10110.                 return true;
  10111.             }
  10112.             visit_url("place.php?whichplace=nstower&action=ns_11_prism");
  10113.         }
  10114.  
  10115.         set_property("cc_disableAdventureHandling", "no");
  10116.         visit_url("place.php?whichplace=nstower&action=ns_11_prism");
  10117.         if(get_property("kingLiberated") == "false")
  10118.         {
  10119.             abort("Yeah, so, I'm done. You might be stuck at the shadow, or at the final boss, or just with a king in a prism. I don't know and quite frankly, after the last " + my_daycount() + " days, I don't give a damn. That's right, I said it. Bitches.");
  10120.         }
  10121.         set_property("cc_sorceress", "finished");
  10122.         return true;
  10123.     }
  10124.  
  10125.     if((get_property("cc_sorceress") == "finished") && (my_class() == $class[Ed]))
  10126.     {
  10127. #       if(item_amount($item[Holy MacGuffin]) == 0)
  10128.         if(item_amount($item[7965]) == 0)
  10129.         {
  10130.             ccAdv(1, $location[The Secret Council Warehouse]);
  10131.         }
  10132.         else
  10133.         {
  10134.             //Complete.
  10135.             return false;
  10136.         }
  10137.         while((item_amount($item[Warehouse Map Page]) > 0) && (item_amount($item[Warehouse Inventory Page]) > 0))
  10138.         {
  10139.             #use(item_amount($item[Warehouse Map Page]), $item[Warehouse Map Page]);
  10140.             use(item_amount($item[Warehouse Inventory Page]), $item[Warehouse Inventory Page]);
  10141.         }
  10142.         if(get_property("lastEncounter") == "You Found It!")
  10143.         {
  10144.             council();
  10145.             print("McMuffin is found!", "blue");
  10146.             print("Ed Combats: " + get_property("cc_edCombatCount"), "blue");
  10147.             print("Ed Combat Rounds: " + get_property("cc_edCombatRoundCount"), "blue");
  10148.  
  10149.             return false;
  10150.         }
  10151.         return true;
  10152.     }
  10153.  
  10154.     print("I should not get here more than once because I pretty much just finished all my in-run stuff. Beep", "blue");
  10155.     wait(5);
  10156.     return false;
  10157. }
  10158.  
  10159. void cc_begin()
  10160. {
  10161.     if(contains_text(visit_url("main.php"), "Being Picky"))
  10162.     {
  10163.         picky_startAscension();
  10164.     }
  10165.  
  10166. #   cli_execute("spookyraven on");
  10167.     cli_execute("spookyraven off");
  10168.  
  10169.     print("Hello " + my_name() + ", time to explode!");
  10170.     print("This is version: " + svn_info("ccascend-cc_ascend").last_changed_rev);
  10171.     print("This is day " + my_daycount() + ".");
  10172.     print("Turns played: " + my_turncount() + " current adventures: " + my_adventures());
  10173.     print("Current Ascension: " + my_path());
  10174.  
  10175.     settingFixer();
  10176.  
  10177.     uneffect($effect[Ode To Booze]);
  10178.     handlePulls(my_daycount());
  10179.     initializeDay(my_daycount());
  10180.  
  10181.  
  10182.     if(!get_property("autoSatisfyWithCoinmasters").to_boolean())
  10183.     {
  10184.         set_property("cc_priorCoinmasters", true);
  10185.         set_property("autoSatisfyWithCoinmasters", true);
  10186.     }
  10187.  
  10188.     set_property("kingLiberatedScript", "scripts/kingcheese.ash");
  10189.     set_property("afterAdventureScript", "scripts/postcheese.ash");
  10190.     set_property("betweenAdventureScript", "scripts/precheese.ash");
  10191.     set_property("betweenBattleScript", "scripts/precheese.ash");
  10192.  
  10193.  
  10194.     string charpane = visit_url("charpane.php");
  10195.     if(contains_text(charpane, "<hr width=50%>"))
  10196.     {
  10197.         print("Switching off Compact Character Mode, will resume during bedtime");
  10198.         set_property("cc_priorCharpaneMode", 1);
  10199.         visit_url("account.php?am=1&pwd=&action=flag_compactchar&value=0&ajax=0", true);
  10200.     }
  10201.  
  10202.     if(vars["chit.helpers.xiblaxian"] != "false")
  10203.     {
  10204.         print("Switching off CHiT Xiblaxian Counter, will resume during bedtime");
  10205.         set_property("cc_priorXiblaxianMode", 1);
  10206.         setvar("chit.helpers.xiblaxian", false);
  10207.     }
  10208.  
  10209.  
  10210.     if(my_class() == $class[Ed])
  10211.     {
  10212.         if(get_property("hpAutoRecoveryItems") != "linen bandages")
  10213.         {
  10214.             set_property("cc_hpAutoRecoveryItems", get_property("hpAutoRecoveryItems"));
  10215.             set_property("cc_hpAutoRecovery", get_property("hpAutoRecovery"));
  10216.             set_property("cc_hpAutoRecoveryTarget", get_property("hpAutoRecoveryTarget"));
  10217.             set_property("hpAutoRecoveryItems", "linen bandages");
  10218.             set_property("hpAutoRecovery", 0.0);
  10219.             set_property("hpAutoRecoveryTarget", 0.0);
  10220.         }
  10221.     }
  10222.  
  10223.     questOverride();
  10224.  
  10225.     if(my_daycount() > 1)
  10226.     {
  10227.         equipBaseline();
  10228.     }
  10229.  
  10230.     if(have_skill($skill[That\'s Not a Knife]))
  10231.     {
  10232.         use_skill(1, $skill[That\'s Not a Knife]);
  10233.         if(item_amount($item[boot knife]) == 1)
  10234.         {
  10235.             put_closet(1, $item[boot knife]);
  10236.         }
  10237.         if(item_amount($item[broken beer bottle]) == 1)
  10238.         {
  10239.             put_closet(1, $item[broken beer bottle]);
  10240.         }
  10241.         if(item_amount($item[sharpened spoon]) == 1)
  10242.         {
  10243.             put_closet(1, $item[sharpened spoon]);
  10244.         }
  10245.         if(item_amount($item[candy knife]) == 1)
  10246.         {
  10247.             put_closet(1, $item[candy knife]);
  10248.         }
  10249.         if(item_amount($item[soap knife]) >= 1)
  10250.         {
  10251.             put_closet(1, $item[soap knife]);
  10252.         }
  10253.     }
  10254.  
  10255.     #   pullsNeeded("evaluate");
  10256.     #   string data = visit_url("lair1.php?action=gates");
  10257.     #   int extra_pulls = pulls_remaining() - pullsNeeded(data);
  10258.     #   abort("oops");
  10259.     consumeStuff();
  10260.     while((my_adventures() > 1) && (my_inebriety() <= inebriety_limit()) && (get_property("kingLiberated") == "false") && doTasks())
  10261.     {
  10262.         if((my_fullness() >= fullness_limit()) && (my_inebriety() >= inebriety_limit()) && (my_spleen_use() == spleen_limit()) && (my_adventures() < 4) && (my_rain() >= 50) && (get_counters("Fortune Cookie", 0, 4) == "Fortune Cookie"))
  10263.         {
  10264.             abort("Manually handle, because we have fortune cookie and rain man colliding at the end of our day and we don't know quite what to do here");
  10265.         }
  10266.         #We save the last adventure for a rain man, damn it.
  10267.     }
  10268.  
  10269.     if(get_property("kingLiberated") == "true")
  10270.     {
  10271.         if(get_property("cc_aftercore") != "done")
  10272.         {
  10273.             print("Failed to trigger kingLiberated script on liberation. Doing it manually", "green");
  10274.             cli_execute("scripts/kingcheese.ash");
  10275.         }
  10276.         equipBaseline();
  10277.         handleFamiliar($familiar[Adventurous Spelunker]);
  10278.         if(item_amount($item[hairpiece on fire]) > 0)
  10279.         {
  10280.             equip($item[hairpiece on fire]);
  10281.         }
  10282.         if(item_amount($item[fudgecycle]) > 0)
  10283.         {
  10284.             equip($slot[acc1], $item[fudgecycle]);
  10285.         }
  10286.         if(item_amount($item[camp scout backpack]) > 0)
  10287.         {
  10288.             equip($item[camp scout backpack]);
  10289.         }
  10290.         if(item_amount($item[operation patriot shield]) > 0)
  10291.         {
  10292.             equip($item[operation patriot shield]);
  10293.         }
  10294.         if((equipped_item($slot[familiar]) != $item[snow suit]) && (item_amount($item[snow suit]) > 0))
  10295.         {
  10296.             equip($item[snow suit]);
  10297.         }
  10298.         if(item_amount($item[mayfly bait necklace]) > 0)
  10299.         {
  10300.             equip($slot[acc2], $item[mayfly bait necklace]);
  10301.         }
  10302.     }
  10303.  
  10304.     doBedtime();
  10305.     print("Done for today (" + my_daycount() + "), beep boop");
  10306. }
  10307.  
  10308. void main()
  10309. {
  10310.     cc_begin();
  10311. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement