def speedrun(duration): """Start a speedrun. Keyword arguments duration -- duration in minutes to run f -- feature object """ diggers = [2, 3, 11, 12] FightBoss.nuke() time.sleep(2) FightBoss.fight() Adventure.adventure(highest=True) time.sleep(2) rb_time = Rebirth.get_rebirth_time() while int(rb_time.timestamp.tm_min) < duration: GoldDiggers.gold_diggers(diggers) Wandoos.wandoos(True) Augmentation.augments({"SM": 1}, coords.INPUT_MAX) if not Inputs.check_pixel_color(*coords.COLOR_TM_LOCKED): BloodMagic.blood_magic(6) FightBoss.nuke() rb_time = Rebirth.get_rebirth_time() MoneyPit.pit() MoneyPit.spin() return
def loop(idle_majors: bool = False) -> None: """Run infinite loop to prevent idling after task is complete. Keyword arguments idle_majors -- Set to True if you wish to idle major and minor quests. Set to False if you wish to idle minor quests only. Currently active quest will be idled regardless. """ Questing.set_use_majors(idle_majors) print("Engaging idle loop") while True: # main loop Questing.questing( subcontract=True) # Questing first, as we are already there MoneyPit.pit() MoneyPit.spin() Inventory.boost_cube() GoldDiggers.gold_diggers() Yggdrasil.ygg() Adventure.itopod_snipe(300)
"""ITOPOD Sniping script.""" import time # Helper classes from classes.features import Adventure, GoldDiggers, MoneyPit, Inventory from classes.helper import Helper from classes.stats import Tracker import constants as const Helper.init(True) Helper.requirements() tracker = Tracker(5) while True: # main loop titans = Adventure.check_titan_status() if titans: for titan in titans: Adventure.kill_titan(titan) Adventure.itopod_snipe(300) MoneyPit.pit() tracker.progress() GoldDiggers.gold_diggers(const.DEFAULT_DIGGER_ORDER) Inventory.boost_equipment(boost_cube=True) time.sleep(3) # Need to wait for tooltip to disappear
def run() -> None: """Rebirth procedure.""" GuffinRun.advanced_training_locked = True GuffinRun.current_boss = 0 GuffinRun.rb_time = 0 GuffinRun.__update_gamestate() if GuffinRun.rb_time > GuffinRun.max_rb_duration: Rebirth.do_rebirth() return FightBoss.nuke() time.sleep(2) Adventure.adventure(const.ZONE_MAP[GuffinRun.gold_zone]) BloodMagic.toggle_auto_spells(number=False, drop=False) GoldDiggers.gold_diggers(GuffinRun.diggers) BloodMagic.blood_magic(8) NGU.cap_ngu() NGU.cap_ngu(magic=True) Wandoos.set_wandoos(0) Wandoos.wandoos(True, True) Augmentation.augments({ GuffinRun.aug[0]: 0.66, GuffinRun.aug[1]: 0.34 }, Misc.get_idle_cap(1) * 0.5) TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.1, magic=True) GuffinRun.__update_gamestate() BloodMagic.toggle_auto_spells(drop=False, gold=False) if GuffinRun.wishes: GuffinRun.wishes.get_caps() GuffinRun.wishes.get_wish_status() GuffinRun.wishes.allocate_wishes() while GuffinRun.advanced_training_locked: GuffinRun.__do_quest() FightBoss.nuke() GoldDiggers.gold_diggers(GuffinRun.diggers) NGU.cap_ngu() NGU.cap_ngu(magic=True) Hacks.hacks(GuffinRun.hacks, coords.INPUT_MAX) Augmentation.augments( { GuffinRun.aug[0]: 0.66, GuffinRun.aug[1]: 0.34 }, Misc.get_idle_cap(1) * 0.5, ) TimeMachine.time_machine(coords.INPUT_MAX, magic=True) GuffinRun.__update_gamestate() Misc.reclaim_tm(energy=True, magic=True) Misc.reclaim_aug() AdvancedTraining.advanced_training(1e12) Wandoos.set_wandoos(GuffinRun.wandoos_version) Wandoos.wandoos(True, True) Augmentation.augments({ GuffinRun.aug[0]: 0.66, GuffinRun.aug[1]: 0.34 }, Misc.get_idle_cap(1) * 0.5) TimeMachine.time_machine(Misc.get_idle_cap(1) * 0.1, magic=True) while GuffinRun.rb_time < GuffinRun.max_rb_duration - 140: GoldDiggers.gold_diggers(GuffinRun.diggers) FightBoss.nuke() Hacks.hacks(GuffinRun.hacks, coords.INPUT_MAX) GuffinRun.__do_quest() GuffinRun.__update_gamestate() FightBoss.fight() Adventure.adventure(itopodauto=True) MoneyPit.pit() Misc.save_check() while GuffinRun.rb_time < GuffinRun.max_rb_duration: time.sleep(1) GuffinRun.__update_gamestate() FightBoss.nuke() Rebirth.do_rebirth() # Must wait for game to fully redraw all elements after rebirthing time.sleep(1) GuffinRun.runs += 1 print( f"Completed guffin run #{GuffinRun.runs} in {time.strftime('%H:%M:%S', time.gmtime(GuffinRun.rb_time))}" )
def speedrun(duration): """Start a speedrun. Keyword arguments duration -- duration in minutes to run f -- feature object """ Rebirth.do_rebirth() FightBoss.nuke() time.sleep(2) Adventure.adventure(highest=True) try: current_boss = int(FightBoss.get_current_boss()) if current_boss > 28 and current_boss < 49: Augmentation.augments({"EB": 1}, Misc.get_idle_cap(1)) elif current_boss >= 49: Augmentation.augments({ "EB": 0.66, "CS": 0.34 }, Misc.get_idle_cap(1)) except ValueError: print("couldn't get current boss") while Inputs.check_pixel_color(*coords.COLOR_TM_LOCKED): FightBoss.nuke() FightBoss.fight() Wandoos.wandoos(True) while Inputs.check_pixel_color(*coords.COLOR_BM_LOCKED): Wandoos.wandoos(True) FightBoss.nuke() time.sleep(2) FightBoss.fight() BloodMagic.blood_magic(8) Wandoos.wandoos(True) rb_time = Rebirth.get_rebirth_time() while int(rb_time.timestamp.tm_min) < duration: FightBoss.nuke() FightBoss.fight() Adventure.adventure(highest=True) Wandoos.wandoos(True) if Wandoos.check_wandoos_bb_status(): Augmentation.augments({ "EB": 0.66, "CS": 0.34 }, Misc.get_idle_cap(1)) """If current rebirth is scheduled for more than 3 minutes and we already finished the rebirth, we will return here, instead of waiting for the duration. Since we cannot start a new challenge if less than 3 minutes have passed, we must always wait at least 3 minutes.""" rb_time = Rebirth.get_rebirth_time() if duration > 3: if not Rebirth.check_challenge(): while int(rb_time.timestamp.tm_min) < 3: rb_time = Rebirth.get_rebirth_time() time.sleep(1) MoneyPit.pit() MoneyPit.spin() return MoneyPit.pit() MoneyPit.spin() return