ereinion icon

Expanders.ash

ereinion | PRO | 11/03/16 06:26:04 PM UTC | 0 ⭐ | 276 👁️ | Never ⏰ | []
JavaScript |

2.81 KB

|

None

|

0 👍

/

0 👎

boolean can_use_familiars() {
    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]);
            return false;
        case "Avatar of Sneaky Pete":
            return false;
        case "Avatar of Jarlsberg":
            return false;
        case "Zombie Slayer":
            return false;
        default:
            return true;
    }
}
 
void select_familiar_and_familiar_eq() {
    // If cheerleader steam is less than 100, the hound dog is just as good.
    // Better, since it has greater choice of familiar equipment without depleting steam.
    // Backup is BGF. Everyone has one of those, right?
    // Could implement greater choice of familiars (and familiar equipment), but why bother :P
    if (can_use_familiars()) {
        if (have_familiar($familiar[Steam-Powered Cheerleader]) && to_int(get_property("_cheerleaderSteam")) > 100) {
            use_familiar($familiar[Steam-Powered Cheerleader]);
            equip($slot[familiar], $item[school spirit socket set]);
        } else if (have_familiar($familiar[Jumpsuited Hound Dog])) {
            use_familiar($familiar[Jumpsuited Hound Dog]);
            if (item_amount($item[Mayflower bouquet]) >= 1 || have_equipped($item[Mayflower bouquet])) {
                equip($slot[familiar], $item[Mayflower bouquet]);
            } else {
                equip($slot[familiar], $item[ittah bittah hookah]);
            }
        } else {
            use_familiar($familiar[Baby Gravy Fairy]);
            equip($slot[familiar], $item[ittah bittah hookah]);
        }
    }
}
 
boolean use_map() {
    // Choose which item to get from the choiceadventure (1 = distention pill, 2 = dog hair pill)
    if (item_amount($item[distention pill]) <= item_amount($item[synthetic dog hair pill])) {
        set_property("choiceAdventure536", "1");
    } else {
        set_property("choiceAdventure536", "2");
    }
    // Use the map, return false on failed use
    if (use(1, $item[Map to Safety Shelter Grimace Prime])) {
        return true;
    } else {
        return false;
    }
}
 
void expanders() {
    // Use transponder (buy if necessary)
    if (have_effect($effect[transpondent]) < 1) {
        if (item_amount($item[transporter transponder]) < 1) {
            buy(1, $item[transporter transponder], 15000);
        }
        use(1, $item[transporter transponder]);
    }
    
    // Pick what familiar to use
    select_familiar_and_familiar_eq();
    
    // Maximize item drop
    maximize("item, -current, -tie, 0.01 mp regen, -familiar", false);
    
    // Adventure while being transpondent
    while(have_effect($effect[transpondent]) > 0 && my_adventures() > 0) {
        // Use maps, if you have them. Exit if use fails.
        if (item_amount($item[Map to Safety Shelter Grimace Prime]) > 0) {
            if (!use_map()) {
                print("Something went wrong!", "red");
                return;
            }
        // Adventure, if out of maps.
        } else {
            if (adventure(1, $location[domed city of grimacia])) {}
        }
    }
}
 
void main() {
    expanders();
}

Comments