Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###############################################################################################################################################################
- # #
- # [01.] Global variables: #
- # - buffer VIP_LOUNGE #
- # [02.] item choose_familiar_equipment(string currently_farming) #
- # [03.] boolean get_meat_buffs(boolean get_all) (bruker VIP_LOUNGE) #
- # [04.] boolean get_item_buffs(boolean get_all) (bruker VIP_LOUNGE) #
- # [05.] boolean get_buffs(string what_to_farm) kaller 03 og 04 basert på kva me er på jakt etter. #
- # [06.] void get_ode() #
- # [07.] void consumption() - kaller eatdrink med riktige parametre #
- # [08.] boolean wear_pantsgiving() - Return false if we've gained all we can from pantsgiving #
- # [09.] string create_maximizer_string(string what_to_farm) #
- # [10.] location choose_location(string what_to_farm) #
- # [11.] familiar choose_familiar(string what_to_farm) #
- # [12.] void farm(string modifier_string, int adventures_to_save) - må brytes opp! #
- # [13.] void choose_bjornify_familiar()
- # [14.] free_fights_outfit()
- # [15.] free_fights()
- # [16.] void simple_farming(string what_to_farm, int adventures_to_save, boolean overdrink_after_farming) - skal kalle alle underliggande funksjonar
- # [17.] void main(string what_to_farm) - kaller simple_farming #
- # #
- ###############################################################################################################################################################
- import <AT_song_support.ash>;
- import <canadv.ash>;
- import <EatDrink.ash>;
- import <Expanders.ash>;
- import <fishbot.ash>;
- import <OCD Inventory Control.ash>;
- import <UberPvPOptimizer.ash>;
- import <VampOut.ash>;
- import <clanhop.ash>;
- import <manaburn.ash>;
- import <manual_buffs.ash>;
- import <pvploot.ash>;
- import <zlib.ash>;
- # [01.] CONSTANTS
- buffer VIP_LOUNGE = visit_url("clan_viplounge.php?whichfloor=1").append(visit_url("clan_viplounge.php?whichfloor=2"));
- string stance = "Who's the Boss?";
- # [02.]
- item choose_familiar_equipment(string currently_farming) {
- item[12] priority_of_fam_eq;
- string satisfy_with_mall;
- item chosen_item;
- if (my_familiar() == $familiar[Li'l Xenomorph]) {
- return $item[tiny top hat and cane];
- }
- if (item_amount($item[snow suit]) > 0 && to_int(get_property("_snowSuitCount")) < 3) {
- return $item[snow suit];
- }
- priority_of_fam_eq[0] = $item[Mayflower bouquet];
- if (to_lower_case(currently_farming).contains_text("meat")) {
- priority_of_fam_eq[1] = $item[lucky Tam O'Shanter];
- priority_of_fam_eq[2] = $item[lucky Tam O'Shatner];
- } else if (to_lower_case(currently_farming).contains_text("item")) {
- priority_of_fam_eq[1] = $item[miniature gravy-covered maypole];
- priority_of_fam_eq[2] = $item[none];
- }
- priority_of_fam_eq[3] = $item[ittah bittah hookah];
- priority_of_fam_eq[4] = $item[flaming familiar doppelgänger];
- priority_of_fam_eq[5] = $item[astral pet sweater];
- priority_of_fam_eq[6] = $item[Li'l Businessman Kit];
- priority_of_fam_eq[7] = $item[little box of fireworks];
- priority_of_fam_eq[8] = $item[moveable feast];
- priority_of_fam_eq[9] = $item[plastic pumpkin bucket];
- priority_of_fam_eq[10] = familiar_equipment(my_familiar());
- priority_of_fam_eq[11] = $item[lead necklace];
- satisfy_with_mall = get_property("autoSatisfyWithMall");
- set_property("autoSatisfyWithMall", "false");
- for i from 0 to 11 {
- if (have_equipped(priority_of_fam_eq[i])) {
- chosen_item = priority_of_fam_eq[i];
- break;
- } else if (retrieve_item(1, priority_of_fam_eq[i])) {
- chosen_item = priority_of_fam_eq[i];
- break;
- } else if (get_price(priority_of_fam_eq[i], 0.5) < to_int(get_property("autoBuyPriceLimit"))) {
- if (buy (1, priority_of_fam_eq[i], get_price(priority_of_fam_eq[i], 0.5)*1.2) > 0) {
- chosen_item = priority_of_fam_eq[i];
- break;
- }
- }
- }
- set_property("autoSatisfyWithMall", satisfy_with_mall);
- return chosen_item;
- }
- # [03.]
- boolean get_meat_buffs(boolean get_all) {
- string current_clan;
- effect[5] meat_buffs;
- meat_buffs[0] = $effect[Billiards Belligerence];
- meat_buffs[1] = $effect[Dances with Tweedles];
- meat_buffs[2] = $effect[Brother Flying Burrito's Blessing];
- meat_buffs[3] = $effect[Winklered];
- meat_buffs[4] = $effect[Optimist Primal];
- foreach i in meat_buffs {
- if (my_effects() contains meat_buffs[i] && !get_all) {
- return true;
- }
- }
- // Pool table
- if (item_amount($item[Clan VIP Lounge key]) > 0 && to_int(get_property("_poolGames")) < 3) {
- if (!VIP_LOUNGE.contains_text("pooltable.gif")) {
- current_clan = get_clan_name();
- clanhop("Bonus Adventures from Hell");
- }
- for i from 1 to (3 - to_int(get_property("_poolGames"))) {
- cli_execute("pool 1");
- }
- if (current_clan.length() > 0) {
- clanhop(current_clan);
- }
- return true;
- }
- // Hatter
- if (!to_boolean(get_property("_madTeaParty"))) {
- if (item_amount($item["DRINK ME" potion]) < 1) {
- buy(1, $item["DRINK ME" potion], 500);
- }
- cli_execute("hatter 22");
- return true;
- }
- // Friars
- if (!to_boolean(get_property("friarsBlessingReceived")) && friars_available()) {
- cli_execute("friars food");
- return true;
- }
- // Island Arena
- if (get_property("sidequestArenaCompleted") == "fratboy" && !to_boolean(get_property("concertVisited"))) {
- cli_execute("concert winklered");
- return true;
- }
- if (get_property("sidequestArenaCompleted") == "fratboy" && !to_boolean(get_property("concertVisited"))) {
- cli_execute("concert optimist primal");
- return true;
- }
- return false;
- }
- # [04.]
- boolean get_item_buffs(boolean get_all) {
- string current_clan;
- effect[5] item_buffs;
- item_buffs[0] = $effect[Hustlin'];
- item_buffs[1] = $effect[Clyde's Blessing];
- item_buffs[2] = $effect[Quadrilled];
- item_buffs[3] = $effect[Brother Smothers's Blessing];
- item_buffs[4] = $effect[Dilated Pupils];
- foreach i in item_buffs {
- if (my_effects() contains item_buffs[i] && !get_all) {
- return true;
- }
- }
- // Pool table
- if (item_amount($item[Clan VIP Lounge key]) > 0 && to_int(get_property("_poolGames")) < 3) {
- if (!VIP_LOUNGE.contains_text("pooltable.gif")) {
- current_clan = get_clan_name();
- clanhop("Bonus Adventures from Hell");
- }
- for i from 1 to (3 - to_int(get_property("_poolGames"))) {
- cli_execute("pool 3");
- }
- print(current_clan.length(), "red");
- print(to_boolean(current_clan.length() > 0), "red");
- if (current_clan.length() > 0) {
- clanhop(current_clan);
- }
- return true;
- }
- // Legendary Beat
- if (item_amount($item[The Legendary Beat]) > 0 && !to_boolean(get_property("_legendaryBeat"))) {
- use(1, $item[The Legendary Beat]);
- }
- // Hatter
- if (!to_boolean(get_property("_madTeaParty"))) {
- if (item_amount($item["DRINK ME" potion]) < 1) {
- buy(1, $item["DRINK ME" potion], 500);
- }
- cli_execute("hatter 28");
- return true;
- }
- // Friars
- if (!to_boolean(get_property("friarsBlessingReceived")) && friars_available()) {
- cli_execute("friars booze");
- return true;
- }
- // Island Arena
- if (get_property("sidequestArenaCompleted") == "hippy" && !to_boolean(get_property("concertVisited"))) {
- cli_execute("concert dilated pupils");
- return true;
- }
- return false;
- }
- # [05.]
- boolean get_buffs(string what_to_farm) {
- boolean return_value;
- if (to_lower_case(what_to_farm).contains_text("meat")) {
- return_value = get_meat_buffs(false);
- if (!return_value) {
- return_value = get_item_buffs(false);
- }
- } else if (to_lower_case(what_to_farm).contains_text("item")) {
- return_value = get_item_buffs(false);
- if (!return_value) {
- return_value = get_meat_buffs(false);
- }
- }
- return return_value;
- }
- # [06.]
- void get_ode() {
- // Get ode from some other source
- int[string] otherBuffbotsPrices;
- otherBuffbotsPrices["kolabuff"] = 2;
- otherBuffbotsPrices["testudinata"] = 11;
- otherBuffbotsPrices["noblesse oblige"] = 16;
- otherBuffbotsPrices["iocainebot"] = 23;
- otherBuffbotsPrices["notbot"] = 40;
- otherBuffbotsPrices["tinkerballa"] = 67;
- if (!have_equipped($item[Brimstone Beret]) && available_amount($item[Brimstone Beret]) > 0 && can_equip($item[Brimstone Beret])) {
- equip($slot[hat], $item[Brimstone Beret]);
- } else if (!have_equipped($item[plexiglass pendant]) && available_amount($item[plexiglass pendant]) > 0 && can_equip($item[plexiglass pendant])) {
- equip($slot[acc3], $item[plexiglass pendant]);
- } else {
- maximize("+four songs", false);
- }
- cli_execute("refresh effects");
- if (!(have_effect($effect[Ode to Booze]) > 15)) {
- while (available_song_slots() <= 0) {
- open_song_spot();
- }
- if (is_online("buffy")) {
- chat_private("buffy", "ode");
- wait(30);
- }
- foreach buffbot in otherBuffbotsPrices {
- cli_execute("refresh effects");
- if (have_effect($effect[Ode to Booze]) > 0) {
- return;
- } else if (available_song_slots() <= 0) {
- open_song_spot();
- }
- if (is_online(buffbot) && !(have_effect($effect[Ode to Booze]) > 0)) {
- kmail(buffbot, "", otherBuffbotsPrices[buffbot]);
- wait(20);
- }
- }
- }
- }
- # [07.]
- void consumption() {
- SIM_CONSUME = false;
- if (my_inebriety() < inebriety_limit() || my_fullness() < fullness_limit() || my_spleen_use() < spleen_limit()) {
- if (!(have_effect($effect[Ode to Booze]) > 0) && my_inebriety() < inebriety_limit()) {
- get_ode();
- }
- eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
- }
- // Increase fullness/drunkenness limits.
- if (!to_boolean(get_property("_syntheticDogHairPillUsed")) && item_amount($item[synthetic dog hair pill]) >= 1) {
- use(1, $item[synthetic dog hair pill]);
- }
- if (!to_boolean(get_property("_distentionPillUsed")) && item_amount($item[distention pill]) >= 1) {
- // If pantsgiving is available, delay using distention pill.
- if ((item_amount($item[pantsgiving]) == 0 && !have_equipped($item[pantsgiving])) || to_int(get_property("_pantsgivingFullness")) >= 2) {
- use(1, $item[distention pill]);
- }
- }
- if (my_inebriety() < inebriety_limit() || my_fullness() < fullness_limit()) {
- if (!(have_effect($effect[Ode to Booze]) > 0) && my_inebriety() < inebriety_limit()) {
- get_ode();
- }
- eatdrink(fullness_limit(), inebriety_limit(), spleen_limit(), false);
- }
- }
- # [08.] Return false if we've gained all we can from pantsgiving
- boolean wear_pantsgiving () {
- int pant_turns = to_int(get_property("_pantsgivingCount"));
- int pant_fullness = to_int(get_property("_pantsgivingFullness"));
- float expected_advs_per_fullness = 6; float expected_advs_per_drunkenness = 6; float expected_advs_per_spleen = 1.5;
- int remaining_adventures;
- if (can_equip ($item[pantsgiving])) {
- remaining_adventures = my_adventures() + (fullness_limit() - my_fullness())*expected_advs_per_fullness + (inebriety_limit() - my_inebriety())*expected_advs_per_drunkenness + (spleen_limit() - my_spleen_use())*expected_advs_per_spleen;
- switch {
- case (pant_turns >= 498 && remaining_adventures + pant_turns < 4997):
- case (pant_turns >= 49 && remaining_adventures + pant_turns < 498):
- case (pant_turns >= 5 && remaining_adventures + pant_turns < 49):
- consumption();
- default:
- }
- if (pant_turns >= 48) {
- # user_confirm (pant_fullness + " - " + to_string(remaining_adventures + pant_turns) + " - " + to_boolean(pant_fullness >= 1 && remaining_adventures + pant_turns < 49));
- }
- switch {
- case (pant_fullness >= 4):
- case (pant_fullness >= 3 && remaining_adventures + pant_turns < 4997):
- case (pant_fullness >= 2 && remaining_adventures + pant_turns < 498):
- case (pant_fullness >= 1 && remaining_adventures + pant_turns < 49):
- case (remaining_adventures + pant_turns < 5):
- return false;
- default:
- return true;
- }
- }
- return false;
- }
- # [09.]
- string create_maximizer_string(string what_to_farm) {
- buffer maximizer_string;
- if (what_to_farm == "Meat Drop") {
- maximizer_string.append(what_to_farm + ", 0.1 Item Drop, 0.01 mp regen, -tie, -current, -familiar");
- } else if (what_to_farm == "Item Drop") {
- maximizer_string.append(what_to_farm + ", 0.1 Meat Drop, 0.01 mp regen, -tie, -current, -familiar");
- }
- if (!have_equipped($item[Mr. Cheeng's spectacles]) && can_equip($item[Mr. Cheeng's spectacles]) && available_amount($item[Mr. Cheeng's spectacles]) > 0) {
- if (equip ($slot[acc1], $item[Mr. Cheeng's spectacles])) {
- maximizer_string.append(", -acc1");
- }
- }
- // Equip pantsgiving, in case it's not already worn
- if (wear_pantsgiving()) {
- if (have_equipped ($item[Pantsgiving]) || equip ($slot[pants], $item[Pantsgiving])) {
- maximizer_string.append(", -pants");
- }
- }
- // Equip hamster, in case the maximizer tries to use the garbage detector (!)
- if (item_amount($item[Hodgman\'s imaginary hamster]) > 0 && my_path() != "Avatar of Boris" && my_path() != "Way of the Surprising Fist" && can_equip($item[Hodgman\'s imaginary hamster])) {
- if (weapon_hands(equipped_item($slot[weapon])) > 1) {
- equip($slot[weapon], $item[none]);
- }
- equip($slot[off-hand], $item[Hodgman\'s imaginary hamster]);
- }
- return to_string(maximizer_string);
- }
- # [10.]
- location choose_location(string what_to_farm) {
- int[string] currentPVPMinis = current_pvp_stances();
- #return $location[An Eldritch Fissure];
- // If PVP
- if (hippy_stone_broken()) {
- if (currentPVPMinis contains "Visiting the Cousins" && knoll_available()) {
- # return $location[The Bugbear Pen];
- }
- if (currentPVPMinis contains "Basket Reaver") {
- return $location[The Black Forest];
- }
- }
- // Else
- if (to_lower_case(what_to_farm).contains_text("meat")) {
- if (to_boolean(get_property("stenchAirportAlways")) || to_boolean(get_property("_stenchAirportToday"))) {
- return $location[Barf Mountain];
- } else if (to_boolean(get_property("sleazeAirportAlways")) || to_boolean(get_property("_sleazeAirportToday"))) {
- return $location[Sloppy Seconds Diner];
- } else {
- if (!get_property("banishedMonsters").contains_text("drunk pygmy")) {
- buy (11 - item_amount($item[bowl of scorpions]), $item[bowl of scorpions], to_int(get_property("valueOfAdventure")));
- }
- return $location[The Hidden Bowling Alley];
- }
- } else if (to_lower_case(what_to_farm).contains_text("item")) {
- if (can_adv($location[Spectral Pickle Factory])) {
- return $location[Spectral Pickle Factory];
- } else if (my_name() == "ereinion" && canadia_available()) {
- #return $location[The Ruins of the Fully Automated Crimbo Factory];
- return $location[Camp Logging Camp];
- } else if (to_boolean(get_property("spookyAirportAlways")) || to_boolean(get_property("_spookyAirportToday"))) {
- if (my_name() == "ereinion") {
- return $location[The Haunted Billiards Room];
- }
- return $location[The Deep Dark Jungle];
- } else if (to_boolean(get_property("stenchAirportAlways")) || to_boolean(get_property("_stenchAirportToday"))) {
- return $location[The Toxic Teacups];
- } else {
- #return $location[The Ruins of the Fully Automated Crimbo Factory];
- return $location[The Haunted Library];
- #whereToAdv = $location[The Haunted Wine Cellar];
- }
- }
- return $location[none];
- }
- # [11.]
- familiar choose_familiar(string what_to_farm) {
- int goal;
- familiar fam;
- familiar chosen_familiar;
- familiar[13] familiars_which_drop_items;
- familiars_which_drop_items[0] = $familiar[Adventurous Spelunker]; // Item, meat
- familiars_which_drop_items[1] = $familiar[Angry Jung Man]; // Item, meat
- familiars_which_drop_items[2] = $familiar[Blavious Kloop]; // Item, meat
- familiars_which_drop_items[3] = $familiar[Bloovian Groose]; // Meat
- familiars_which_drop_items[4] = $familiar[Fist Turkey]; // Item
- familiars_which_drop_items[5] = $familiar[Golden Monkey]; // Meat
- familiars_which_drop_items[6] = $familiar[Green Pixie]; // Item
- familiars_which_drop_items[7] = $familiar[Grim Brother]; // Meat
- familiars_which_drop_items[8] = $familiar[Grimstone Golem]; // Item, meat
- familiars_which_drop_items[9] = $familiar[Li'l Xenomorph]; // Item, meat
- familiars_which_drop_items[10] = $familiar[Pair of Stomping Boots]; // Item
- familiars_which_drop_items[11] = $familiar[Unconscious Collective]; // Meat
- familiars_which_drop_items[12] = $familiar[Machine Elf]; //
- // Choose default
- if (to_lower_case(what_to_farm).contains_text("meat")) {
- if (have_familiar($familiar[xo skeleton])) {
- chosen_familiar = $familiar[xo skeleton];
- } else if (have_familiar($familiar[hobo monkey])) {
- chosen_familiar = $familiar[hobo monkey];
- } else {
- chosen_familiar = $familiar[leprechaun];
- }
- } else if (to_lower_case(what_to_farm).contains_text("item")) {
- if (have_familiar($familiar[xo skeleton])) {
- chosen_familiar = $familiar[xo skeleton];
- } else if (have_familiar($familiar[jumpsuited hound dog])) {
- chosen_familiar = $familiar[jumpsuited hound dog];
- } else {
- chosen_familiar = $familiar[baby gravy fairy];
- }
- }
- // Check for what item-dropping familiars are options
- foreach i in familiars_which_drop_items {
- // Have it, correct drop modifier, adventuresleft
- fam = familiars_which_drop_items[i];
- if(have_familiar(fam) && numeric_modifier(fam, what_to_farm, 20, familiar_equipment(fam)) > 0) {
- if (to_int(fam.drops_today) < to_int(fam.drops_limit)) {
- chosen_familiar = fam;
- break;
- }
- }
- }
- if (my_name() == "ereinion") {
- # chosen_familiar = $familiar[Robortender];
- }
- print ("Best familiar found for " + what_to_farm + " is the " + to_string (chosen_familiar) + ".", "green");
- return chosen_familiar;
- }
- # [12.]
- void farm(string modifier_string, int adventures_to_save) {
- // No need to run this if out of adventures
- if (my_adventures() == 0) {
- return;
- }
- location whereToAdv = choose_location(modifier_string);
- familiar fam_to_use;
- item fam_eq;
- boolean already_optimized = false;
- boolean changes_done = false;
- boolean pantsgiving_best = false;
- int i;
- // Special cases
- switch (my_path()) {
- case "Avatar of Boris":
- if (item_amount($item[Clancy's lute]) > 0) {
- use(1, $item[Clancy's lute]);
- }
- if (item_amount($item[Trusty]) > 0) {
- equip($slot[weapon], $item[Trusty]);
- }
- case "Avatar of Sneaky Pete":
- case "Avatar of Jarlsberg":
- if (my_companion() != "Eggman" && have_skill($skill[Egg Man]) && item_amount($item[Cosmic Egg]) > 0) {
- use_skill(1, $skill[Egg Man]);
- }
- case "Acctually Ed the Undying":
- if (to_lower_case(modifier_string).contains_text("meat")) {
- if (have_servant($servant[maid]) && my_servant() != $servant[maid]) {
- use_servant($servant[maid]);
- }
- } else if (to_lower_case(modifier_string).contains_text("item")) {
- if (have_servant($servant[cat]) && my_servant() != $servant[maid]) {
- use_servant($servant[cat]);
- }
- }
- already_optimized = true;
- // Bleed over into "default" paths, but no need to "optimize" if that already has been done.
- default:
- changes_done = true;
- i = 30;
- while (my_adventures() > adventures_to_save) {
- if (i == 30) {
- // Pool buffs, hatter, etc.
- get_buffs(modifier_string);
- i = 0;
- }
- if (!already_optimized) {
- // Choose familiar
- fam_to_use = choose_familiar(modifier_string);
- if (fam_to_use != my_familiar()) {
- use_familiar(fam_to_use);
- // Choose familiar eq
- fam_eq = choose_familiar_equipment(modifier_string);
- if (fam_eq != $item[none] && !have_equipped(fam_eq)) {
- equip ($slot[familiar], fam_eq);
- }
- changes_done = true;
- }
- }
- if (have_equipped($item[Pantsgiving]) && !wear_pantsgiving() && !pantsgiving_best) {
- changes_done = true;
- }
- // Maximize if any changes
- if (changes_done) {
- maximize (create_maximizer_string(modifier_string), false);
- if (have_equipped($item[Pantsgiving])) {
- pantsgiving_best = true;
- }
- changes_done = false;
- }
- if (my_name() != "algen") {
- adventure (1, whereToAdv);
- } else {
- fish_function(min(max(1, my_adventures() - adventures_to_save), 10));
- }
- i = i + 1;
- }
- }
- }
- # [13.]
- void after_overdrinking(int fites_to_save) {
- buffer maximizer_string;
- // Vamp out
- if (available_amount($item[plastic vampire fangs]) > 0) {
- vamp_out(13);
- }
- // PVP
- if (hippy_stone_broken()) {
- cli_execute("refresh inv");
- main@pvploot();
- main@UberPvPOptimizer();
- cli_execute("pvp " + to_string(pvp_attacks_left()-fites_to_save) + " flowers " + stance);
- }
- // Libram-summoning
- manaburn();
- // Pajamas
- if (have_familiar($familiar[Trick-or-Treating Tot])) {
- use_familiar($familiar[Trick-or-Treating Tot]);
- }
- if (hippy_stone_broken()) {
- maximizer_string.append("0.1 adv, pvp fights, -current, -tie");
- } else {
- maximizer_string.append("adv, -current, -tie");
- }
- if (have_familiar($familiar[Disembodied Hand])) {
- maximizer_string.append(", switch disembodied hand");
- }
- maximize(maximizer_string, false);
- // Sell stuff
- ocd_inventory_control();
- // Get Jick Jar
- if (item_amount($item[psychoanalytic jar]) > 0) {
- if(visit_url("showplayer.php?who=1&action=jung&whichperson=jick").contains_text("Use psychoanalytic jar on him")) {
- visit_url("showplayer.php?who=1&action=jung&whichperson=jick");
- }
- print("Checked for Jick Jar", "green");
- }
- }
- # [13.]
- void choose_bjornify_familiar() {
- familiar fa;
- fa = $familiar[grim brother];
- if (have_familiar(fa) && to_int(get_property("_grimFairyTaleDropsCrown")) < 2) {
- if (my_bjorned_familiar() != fa) {
- bjornify_familiar(fa);
- }
- return;
- }
- fa = $familiar[grimstone golem];
- if (have_familiar(fa) && to_int(get_property("_grimstoneMaskDropsCrown")) < 1) {
- if (my_bjorned_familiar() != fa) {
- bjornify_familiar(fa);
- }
- return;
- }
- fa = $familiar[el vibrato megadrone];
- if (have_familiar(fa)) {
- if (my_bjorned_familiar() != fa) {
- bjornify_familiar(fa);
- }
- return;
- }
- }
- # [14.]
- void free_fights_outfit() {
- item it;
- familiar fa;
- buffer maximizer_string;
- maximizer_string.append("item Drop, 0.1 meat Drop, 0.01 mp regen, -tie, -current");
- it = $item[Pantsgiving];
- if (available_amount(it) > 0) {
- equip($slot[pants], it);
- maximizer_string.append(", -pants");
- }
- it = $item[KoL Con 13 snowglobe];
- if (available_amount(it) > 0) {
- equip($slot[off-hand], it);
- maximizer_string.append(", -offhand");
- it = $item[time-twitching toolbelt];
- if (available_amount(it) > 0) {
- equip($slot[acc2], it);
- maximizer_string.append(", -acc2");
- }
- }
- it = $item[Mr. Cheeng's spectacles];
- if (available_amount(it) > 0) {
- equip($slot[acc1], it);
- maximizer_string.append(", -acc1");
- }
- fa = $familiar[Rogue Program];
- if (have_familiar(fa)) {
- use_familiar(fa);
- }
- it = $item[snow suit];
- if (available_amount(it) > 0) {
- equip($slot[familiar], it);
- maximizer_string.append(", -familiar");
- }
- it = $item[buddy bjorn];
- if (available_amount(it) > 0) {
- equip($slot[back], it);
- choose_bjornify_familiar();
- maximizer_string.append(", -back");
- }
- maximize(maximizer_string, false);
- }
- # [15.]
- void free_fights() {
- int i = 0;
- familiar f;
- string choice_adv;
- if (!to_boolean(get_property("_loveTunnelUsed")) || to_boolean(get_property("snojoAvailable")) || to_int(get_property("_machineTunnelsAdv")) < 5 || to_int(get_property("_witchessFights")) < 5) {
- free_fights_outfit();
- // L.O.V.E. tunnel
- if (!to_boolean(get_property("_loveTunnelUsed")) && to_boolean(get_property("loveTunnelAvailable"))) {
- visit_url("place.php?whichplace=town_wrong&action=townwrong_tunnel");
- run_choice(1);
- run_choice(1);
- visit_url("choice.php");
- // 1 = Eardigan, 2 = Epaulettes, 3 = Earring
- run_choice(3);
- run_choice(1);
- visit_url("choice.php");
- // 1 = Lovebotamy, 2 = Open Heart Surgery, 3 = Wandering Eye Surgery
- run_choice(2);
- run_choice(1);
- // 1 = Enamorang, 2 = Emotionizer, 3 = Extraterrestrial Chocolate, 4 = Echinacea Bouquet, 5 = Elephant, 6 = 2 pieces of toast
- run_choice(2);
- }
- choose_bjornify_familiar();
- // Snojo
- if (to_boolean(get_property("snojoAvailable"))) {
- while (to_int(get_property("_snojoFreeFights")) < 10 && i <= 15) {
- adv1($location[The X-32-F Combat Training Snowman], -1, "");
- i = i + 1;
- }
- }
- choose_bjornify_familiar();
- // Machine elf tunnels
- if (have_familiar($familiar[Machine Elf]) && to_int(get_property("_machineTunnelsAdv")) < 5){
- f = my_familiar();
- i = 0;
- use_familiar($familiar[Machine Elf]);
- while (to_int(get_property("_machineTunnelsAdv")) < 5 && i <= 15) {
- adv1($location[The Deep Machine Tunnels], -1, "");
- i = i + 1;
- }
- use_familiar(f);
- }
- choose_bjornify_familiar();
- // Witchess
- if(get_campground() contains $item[Witchess Set] && to_int(get_property("_witchessFights")) < 5) {
- i = 0;
- while(to_int(get_property("_witchessFights")) < 5 && i < 10) {
- // Witchess knight
- choice_adv = "1936";
- if (to_int(get_property("_witchessFights")) == 4 && have_skill($skill[Frigidalmatian])) {
- // Witchess ox
- if (use_skill(1, $skill[Frigidalmatian])) {
- choice_adv = "1937";
- }
- }
- visit_url("campground.php?action=witchess");
- run_choice(1);
- visit_url("choice.php?option=1&pwd="+my_hash()+"&whichchoice=1182&piece=" + choice_adv, false);
- run_combat();
- i = i + 1;
- }
- }
- }
- }
- # [16.]
- void simple_farming(string what_to_farm, int adventures_to_save, int fites_to_save, boolean overdrink_after_farming) {
- int swagger; int meat;
- buffer maximizer_string;
- if (item_amount($item[Time-Spinner]) > 0 && !to_boolean (get_property ("_timeSpinnerReplicatorUsed"))) {
- cli_execute("timespinner shot");
- }
- // If overdrunk or not in aftercore, exit script
- if (my_inebriety() <= inebriety_limit() && can_interact()) {
- // Exit on invalid input
- string modifier_string;
- if (to_lower_case(what_to_farm).contains_text("meat")) {
- modifier_string = "Meat Drop";
- } else if (to_lower_case(what_to_farm).contains_text("item")) {
- modifier_string = "Item Drop";
- } else {
- print("Error in input; \'" + what_to_farm + "\'. The string given to the script should be either \'meat\' or \'item'. Try again.", "red");
- exit;
- }
- // Free_fights
- free_fights();
- // Initial meat and swagger values
- meat = my_meat(); swagger = to_int(get_property("availableSwagger"));
- // Consume
- if (my_inebriety() < inebriety_limit()) {
- get_ode();
- manual_buffs(false);
- wait(30);
- }
- consumption();
- if (my_adventures() >= 30) {
- // If no dog hair/distention pills left, get new ones
- if (item_amount($item[distention pill]) < 1 || item_amount($item[synthetic dog hair pill]) < 1) {
- expanders();
- }
- }
- // Farm
- farm(modifier_string, adventures_to_save);
- // Overdrink
- if (overdrink_after_farming) {
- get_ode();
- eatdrink(0, inebriety_limit(), 0, true);
- }
- after_overdrinking(fites_to_save);
- meat = my_meat() - meat; swagger = to_int(get_property("availableSwagger")) - swagger;
- print("Gained " + meat + " meat.", "blue");
- print("Gained " + swagger + " swagger. Current swagger is: " + get_property("availableSwagger"), "blue");
- } else if (!can_interact()) {
- print("Wait till you are out of ronin before running this script.", "red");
- } else {
- after_overdrinking(fites_to_save);
- print("You are overdrunk.", "red");
- }
- }
- # [17.]
- void main(string what_to_farm) {
- simple_farming(what_to_farm, 0, 0, true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement