Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import <EatDrink.ash>;
- import <manual_buffs.ash>;
- import <pvpbestgear.ash>;
- import <pvploot.ash>;
- import <zlib.ash>;
- import <AT_song_support.ash>;
- import <manaburn.ash>;
- import <clanhop.ash>;
- import <VampOut.ash>;
- import <OCD Inventory Control.ash>;
- import <Expanders.ash>;
- string VIP_LOUNGE = visit_url("clan_viplounge.php");
- 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;
- }
- 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;
- }
- void get_all_buffs(string s) {
- if (s == "Meat Drop") {
- while (get_meat_buffs(true)) {}
- while (get_item_buffs(true)) {}
- } else {
- while (get_item_buffs(true)) {}
- while (get_meat_buffs(true)) {}
- }
- }
- 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[plexiglass pendant]) && available_amount($item[plexiglass pendant]) > 0) {
- equip($slot[acc3], $item[plexiglass pendant]);
- }
- 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);
- }
- }
- }
- }
- // Consumption
- 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);
- }
- }
- // Adventuring
- boolean changePantsAfterAdventuringFor1(location whereToAdv) {
- if (have_equipped($item[pantsgiving])) {
- adventure(1, whereToAdv);
- if (to_int(get_property("_pantsgivingCount")) >= 49) {
- consumption();
- }
- if (to_int(get_property("_pantsgivingFullness")) >= 2) {
- return true;
- }
- }
- return false;
- }
- void farm(string modifier_string) {
- // No need to run this if out of adventures
- if (my_adventures() == 0) {
- return;
- }
- // What familiar you use once you've got all the drops, and where to farm
- familiar defaultFamiliar;
- location whereToAdv;
- int adventures_to_save;
- adventures_to_save = 0;
- if (modifier_string == "Meat Drop") {
- defaultFamiliar = $familiar[hobo monkey];
- whereToAdv = $location[Sloppy Seconds Diner];
- } else if (modifier_string == "Item Drop") {
- defaultFamiliar = $familiar[jumpsuited hound dog];
- if (my_name() == "ereinion") {
- whereToAdv = $location[Camp Logging Camp];
- } else {
- whereToAdv = $location[The Haunted Library];
- }
- }
- // Initial maximizer string
- buffer maximizer_string;
- maximizer_string.append(modifier_string + ", -tie, -current");
- if (item_amount($item[pantsgiving]) >= 1 || have_equipped($item[pantsgiving])) {
- if (get_property("_pantsgivingFullness") < 2) {
- equip($slot[pants], $item[pantsgiving]);
- maximizer_string.append(", -pants");
- }
- }
- // Concerning familiars
- string[familiar] dropperProperty;
- dropperProperty[$familiar[Angry Jung Man]] = "_jungDrops"; // Item, meat
- dropperProperty[$familiar[Blavious Kloop]] = "_kloopDrops"; // Item, meat
- dropperProperty[$familiar[Bloovian Groose]] = "_grooseDrops"; // Meat
- dropperProperty[$familiar[Fist Turkey]] = "_turkeyBooze"; // Item
- dropperProperty[$familiar[Green Pixie]] = "_absintheDrops"; // Item
- dropperProperty[$familiar[Grim Brother]] = "_grimFairyTaleDrops"; // Meat
- dropperProperty[$familiar[Grimstone Golem]] = "_grimstoneMaskDrops"; // Item, meat
- dropperProperty[$familiar[Li'l Xenomorph]] = "_transponderDrops"; // Item, meat
- dropperProperty[$familiar[Pair of Stomping Boots]] = "_bootStomps"; // Item
- dropperProperty[$familiar[Unconscious Collective]] = "_dreamJarDrops"; // Meat
- int[familiar] otherThan5;
- otherThan5[$familiar[Angry Jung Man]] = 1;
- otherThan5[$familiar[Grimstone Golem]] = 1;
- otherThan5[$familiar[Pair of Stomping Boots]] = 7;
- int goal;
- // 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") {
- if (weapon_hands(equipped_item($slot[weapon])) > 1) {
- equip($slot[weapon], $item[none]);
- }
- equip($slot[off-hand], $item[Hodgman\'s imaginary hamster]);
- }
- // Special cases
- switch (my_path()) {
- case "Avatar of Boris":
- if (item_amount($item[Clancy's lute]) > 0) {
- use(1, $item[Clancy's lute]);
- }
- equip($slot[weapon], $item[Trusty]);
- maximize(maximizer_string, false);
- get_all_buffs(modifier_string);
- while (my_adventures() > adventures_to_save) {
- if (have_equipped($item[pantsgiving])) {
- if (changePantsAfterAdventuringFor1(whereToAdv)) {
- maximizer_string.replace_string(", -pants", "");
- maximize(maximizer_string, false);
- }
- } else {
- adventure(1, whereToAdv);
- }
- }
- break;
- case "Avatar of Sneaky Pete":
- maximize(maximizer_string, false);
- get_all_buffs(modifier_string);
- while (my_adventures() > adventures_to_save) {
- if (have_equipped($item[pantsgiving])) {
- if (changePantsAfterAdventuringFor1(whereToAdv)) {
- maximizer_string.replace_string(", -pants", "");
- maximize(maximizer_string, false);
- }
- } else {
- adventure(1, whereToAdv);
- }
- }
- break;
- 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]);
- }
- maximize(maximizer_string, false);
- get_all_buffs(modifier_string);
- while (my_adventures() > adventures_to_save) {
- if (have_equipped($item[pantsgiving])) {
- if (changePantsAfterAdventuringFor1(whereToAdv)) {
- maximizer_string.replace_string(", -pants", "");
- maximize(maximizer_string, false);
- }
- } else {
- adventure(1, whereToAdv);
- }
- }
- break;
- default:
- // Use all item-dropping familiars which also buffs what you are trying to farm (item/meat)
- foreach fam in dropperProperty {
- // Have it, correct drop modifier, adventures left
- if(have_familiar(fam) && numeric_modifier(fam, modifier_string, 20, familiar_equipment(fam)) > 0 && my_adventures() > adventures_to_save) {
- use_familiar(fam);
- // Get limited daily buffs, new one every time you switch familiar
- if (modifier_string.contains_text("Item")) {
- if (!get_item_buffs(false)) {
- get_meat_buffs(false);
- }
- } else {
- if (!get_meat_buffs(false)) {
- get_item_buffs(false);
- }
- }
- if (fam == $familiar[Li'l Xenomorph] && dropperProperty[fam] < 5) {
- maximizer_string.append(", equip tiny top hat and cane");
- }
- if (otherThan5 contains fam) {
- goal = otherThan5[fam];
- } else {
- goal = 5;
- }
- // Not at max drops
- if (to_int(get_property(dropperProperty[fam])) < goal) {
- // Change gear
- maximize(maximizer_string, false);
- // Adventure
- while(get_property(dropperProperty[fam]) < goal && my_adventures() > adventures_to_save) {
- if (have_equipped($item[pantsgiving])) {
- if(changePantsAfterAdventuringFor1(whereToAdv)) {
- maximizer_string.replace_string(", -pants", "");
- maximize(maximizer_string, false);
- }
- } else {
- adventure(1, whereToAdv);
- }
- }
- }
- // If tiny top hat and cane added to maximizer string, remove it.
- maximizer_string.replace_string(", equip tiny top hat and cane", "");
- }
- }
- // Burn the rest of your adventures using the default familiar.
- # Not during Crimbo
- if (my_adventures() > adventures_to_save) {
- use_familiar(defaultFamiliar);
- maximize(maximizer_string, false);
- get_all_buffs(modifier_string);
- // Spend one adventure at a time until the limit for pantsgiving is reached
- while(to_int(get_property("_pantsgivingFullness")) < 2 && have_equipped($item[pantsgiving])) {
- if(changePantsAfterAdventuringFor1(whereToAdv)) {
- maximizer_string.replace_string(", -pants", "");
- }
- }
- maximize(maximizer_string, false);
- adventure(my_adventures() - adventures_to_save, whereToAdv);
- }
- // End of switch
- }
- }
- void simple_farming(string what_to_farm) {
- boolean overdrink_after_farming;
- overdrink_after_farming = true;
- // 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;
- }
- // Consume
- if (!have_equipped($item[plexiglass pendant]) && item_amount($item[plexiglass pendant]) >= 1) {
- equip($slot[acc3], $item[plexiglass pendant]);
- }
- if (my_inebriety() < inebriety_limit()) {
- manual_buffs(true);
- wait(30);
- }
- consumption();
- // 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);
- // Overdrink
- if (overdrink_after_farming) {
- get_ode();
- eatdrink(0, inebriety_limit(), 0, true);
- }
- // 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@pvpbestgear();
- cli_execute("flowers");
- }
- // Libram-summoning
- manaburn();
- // Sell staff
- ocd_inventory_control();
- // Pajamas
- if (hippy_stone_broken()) {
- maximize("0.1 adv, pvp fights, -current", false);
- } else {
- maximize("adv, -current", false);
- }
- // 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");
- }
- } else if (!can_interact()) {
- print("Wait till you are out of ronin before running this script.", "red");
- } else {
- print("You are overdrunk.", "red");
- }
- }
- void main(string what_to_farm) {
- simple_farming(what_to_farm);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement