예제 #1
0
def run10():
    """ Perform a 10 minute run. """
    start = time.time()
    Inventory.loadout(2)  # loadout 2 is bars-heavy
    BasicTraining.basicTraining()
    FightBosses.fightBosses()
    Adventure.adventureZone()  # go to latest zone

    Misc.inputResource()  # all energy

    print(f'Time Machine loop for 5 minutes')
    while time.time() - start < 300:
        TimeMachine.addEnergy()
        TimeMachine.addMagic()
        print(f'sleeping for 30 seconds')
        sleep(30)

    Inventory.loadout(1)
    BasicTraining.basicTraining()

    Misc.reclaimAll()  # reclaim energy and magic from TM

    print(f'Main loop until 10 minutes')
    mainStart = time.time()
    pushAdventure = False
    while time.time() - start < 570:
        # push to new adventure zone
        if time.time() - mainStart > 120 and not pushAdventure:
            Adventure.adventureZone()
            pushAdventure = True
        print(f'sleeping 30 seconds')
        sleep(30)
        # fight bosses
        FightBosses.nuke()
        for _ in range(5):
            FightBosses.fightBoss()
        # augments
        Misc.inputResource(amount='quarter', idle=True)
        for _ in range(3):
            Augmentation.augmentation(aug=4)
        Augmentation.augmentation(aug=4, upgrade=True)
        # blood magic
        BloodMagic.addMagic(cap=True)
        BloodMagic.addMagic(magic=2, cap=True)
        BloodMagic.addMagic(magic=3, cap=True)

    MoneyPit.moneyPit()
    Navigation.menu('rebirth')
    while time.time() - start < 600:
        sleep(1)
    Rebirth.rebirth()
예제 #2
0
def run5():
    """ Perform a 5 minute run."""
    start = time.time()
    Inventory.loadout(2)  # loadout 2 is bars-heavy
    BasicTraining.basicTraining()
    FightBosses.nuke()
    sleep(3)
    Adventure.adventureZone()  # go to latest zone

    Misc.inputResource()  # all energy

    print(f'Time Machine loop for 2:30 minutes')
    inv1 = False
    lastZone = False
    loopCounter = 0
    while time.time() - start < 150:
        loopCounter += 1
        TimeMachine.addEnergy()
        TimeMachine.addMagic()
        if time.time() - start > 120 and not inv1:
            Inventory.loadout(1)
            BasicTraining.basicTraining()
            inv1 = True
        if loopCounter == 10:
            Adventure.itopodFarm()
        # if not lastZone:
        #     Adventure.adventureZone()
        #     lastZone = True

    Misc.reclaimAll()  # reclaim energy and magic from TM

    print(f'Main loop until 5 minutes')
    mainStart = time.time()
    pushAdventure = False
    loopCounter = 0
    while time.time() - start < 280:
        loopCounter += 1
        # push to new adventure zone
        # if time.time() - mainStart > 30 and not pushAdventure:
        #     Adventure.adventureZone()
        #     pushAdventure = True
        # fight bosses
        if loopCounter == 2:
            Adventure.itopodFarm()

        FightBosses.nuke()
        for _ in range(5):
            FightBosses.fightBoss()
        # augments
        Misc.inputResource(amount='quarter', idle=True)
        for _ in range(3):
            Augmentation.augmentation(aug=2)
        Augmentation.augmentation(aug=2, upgrade=True)
        # blood magic
        # BloodMagic.addMagic(cap=True)
        # BloodMagic.addMagic(magic=2, cap=True)
        # BloodMagic.addMagic(magic=3, cap=True)
        BloodMagic.addMagic(magic=3, cap=True)
        print(f'sleeping 15 seconds')
        sleep(15)

    MoneyPit.moneyPit()
    FightBosses.nuke()
    FightBosses.fightBoss()
    print('getting exp')
    # Statistics.screenshot('rebirth.png')
    expStart = time.time()
    exp = Statistics.getEXP()
    expEnd = time.time()
    print(f'time: {round(expStart - expEnd, 3)}')
    print('waiting for time')
    while time.time() - start < 300:
        sleep(1)
    Navigation.menu('fightBoss')
    click(*coords.STOP)  # stop fighting bosses
    Navigation.menu('rebirth')
    Rebirth.rebirth()
    return exp
예제 #3
0
def run3():
    """ Perform a 3 minute run. """
    start = time.time()
    Inventory.loadout(2)
    FightBosses.nuke()
    sleep(5)
    for i in range(3):
        FightBosses.fightBoss()

    Adventure.adventureZone('mega')
    sleep(5)
    Adventure.itopodFarm()

    Misc.inputResource()

    bm = False
    done = False
    wandoos = False
    adv = False
    while time.time() - start < 165:
        Misc.inputResource(amount='quarter', idle=True)

        if wandoos:
            Wandoos.addMagic()
            Wandoos.addEnergy()

        TimeMachine.addEnergy()
        TimeMachine.addMagic()

        Augmentation.augmentation(aug=4)
        Augmentation.augmentation(aug=4, upgrade=True)

        Wandoos.addEnergy()

        if time.time() - start > 60 and not done:
            Inventory.loadout(1)
            GoldDiggers.wandoosDigger()
            Adventure.adventureZone()
            sleep(5)
            Adventure.itopodFarm()
            bm = True

        if bm and not done:
            Misc.reclaimMagic()
            BloodMagic.addMagic(magic=5, cap=True)
            BloodMagic.addMagic(magic=4, cap=True)
            BloodMagic.addMagic(magic=3, cap=True)
            BloodMagic.addMagic(magic=2, cap=True)
            BloodMagic.addMagic(magic=1, cap=True)
            done = True
            wandoos = True

        FightBosses.nuke()
        FightBosses.fightBoss()

    GoldDiggers.clearActive()
    GoldDiggers.statDigger()

    MoneyPit.moneyPit()

    FightBosses.nuke()
    for i in range(4):
        FightBosses.fightBoss()
        sleep(1)
    # Navigation.menu('rebirth')
    while time.time() - start < 175:
        sleep(0.1)
    exp = Statistics.getEXP()
    # Statistics.screenshot('rebirth.png')
    Navigation.menu('fightBoss')
    click(*coords.STOP)  # stop fighting
    Navigation.menu('rebirth')
    while time.time() - start < 180:
        sleep(0.1)
    Rebirth.rebirth()
    return exp
예제 #4
0
def run7():
    """ Perform a 7 minute run."""
    start = time.time()
    Inventory.loadout(2)  # loadout 2 is bars-heavy
    BasicTraining.basicTraining()
    FightBosses.fightBosses()
    Adventure.adventureZone()  # go to latest zone

    Misc.inputResource()  # all energy

    print(f'Time Machine loop for 4 minutes')
    inv1 = False
    lastZone = False
    while time.time() - start < 180:
        TimeMachine.addEnergy()
        TimeMachine.addMagic()
        if time.time() - start > 180 and not inv1:
            Inventory.loadout(1)
            BasicTraining.basicTraining()
            inv1 = True
        if not lastZone:
            Adventure.adventureZone()
            lastZone = True
        startTime = time.time()

    Misc.reclaimAll()  # reclaim energy and magic from TM

    print(f'Main loop until 7 minutes')
    mainStart = time.time()
    pushAdventure = False
    while time.time() - start < 390:
        # push to new adventure zone
        if time.time() - mainStart > 120 and not pushAdventure:
            Adventure.adventureZone()
            pushAdventure = True
        # fight bosses
        FightBosses.nuke()
        for _ in range(5):
            FightBosses.fightBoss()
        # augments
        Misc.inputResource(amount='quarter', idle=True)
        for _ in range(3):
            Augmentation.augmentation(aug=3)
        Augmentation.augmentation(aug=3, upgrade=True)
        # blood magic
        BloodMagic.addMagic(cap=True)
        BloodMagic.addMagic(magic=2, cap=True)
        BloodMagic.addMagic(magic=3, cap=True)
        print(f'sleeping 30 seconds')
        sleep(30)

    MoneyPit.moneyPit()
    FightBosses.nuke()
    FightBosses.fightBoss()
    print('waiting for time')
    # Statistics.screenshot('rebirth.png')
    while time.time() - start < 420:
        sleep(1)
    click(*coords.STOP)  # stop fighting
    Navigation.menu('rebirth')
    Rebirth.rebirth()
예제 #5
0
    def lsc():
        """ LSC challenge logic."""

        start = time.time()

        Navigation.menu('fightBoss')
        FightBosses.nuke()
        Helper.sleep(3)  # wait for nuke
        FightBosses.fightBoss()

        Navigation.menu('inventory')
        Inventory.loadout(1)  # gold heavy

        Navigation.menu('adventure')
        Adventure.adventureZone('bae')
        Adventure.turnIdleOn()

        # before augments
        Misc.inputValue(2e9)

        Navigation.menu('timeMachine')
        TimeMachine.addEnergy()
        TimeMachine.addMagic()

        Navigation.menu('wandoos')
        Wandoos.addEnergy(cap=False)
        Wandoos.addMagic(cap=False)

        Navigation.menu('fightBoss')
        FightBosses.nuke()
        FightBosses.fightBoss()

        Navigation.menu('goldDiggers')
        GoldDiggers.clearActive()
        GoldDiggers.activate(['STAT', 'WANDOOS', 'MAGIC_BEARD', 'BLOOD'])

        Challenges.update()
        while Challenges.is_active():
            Navigation.menu('augments')
            Misc.inputResource(amount='half', idle=True, energy=True)
            Augmentation.augmentation(aug=7)
            Augmentation.augmentation(aug=7, upgrade=True)
            Helper.sleep(3)

            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()

            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=True)  # release some energy
            Wandoos.addMagic(cap=True)

            Navigation.menu('bloodMagic')
            for i in range(1, 8):
                BloodMagic.addMagic(magic=i, cap=True)

            Challenges.update()

        print('done with challenge')

        print('waiting for 3 min')
        while time.time() - start <= 180:
            Helper.sleep(1)

        print('starting another one')
        ChallengeRuns.completed += 1
        print(f'completed: {ChallengeRuns.completed}')
        ChallengeRuns.start(args.challenge)
예제 #6
0
    def no_rebirth():
        """ No Rebirth challenge logic.

        Basically the same as basic challenge but with no rebirths.
        """

        Navigation.menu('fightBoss')
        FightBosses.nuke()
        Helper.sleep(3)  # wait for nuke
        FightBosses.fightBoss()

        Navigation.menu('inventory')
        Inventory.loadout(1)  # gold heavy

        Navigation.menu('adventure')
        Adventure.adventureZone()
        Adventure.turnIdleOn()

        # before augments
        Misc.inputResource(amount='cap', idle=False, energy=True)
        while Statistics.checkPixelColor(*coords.AUGS_LOCKED,
                                         coords.BUTTON_LOCKED_COLOR):
            print('before augments loop')
            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=False)
            Wandoos.addMagic(cap=False)
            Helper.sleep(5)
            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()

        Misc.reclaimEnergy()
        Misc.inputResource(amount='quarter', idle=True, energy=True)
        Misc.inputResource(amount='quarter', idle=True, energy=True)
        kc = 0

        while Statistics.checkPixelColor(
                *coords.TM_LOCKED,
                coords.TM_LOCKED_IRON_PILL) or Statistics.checkPixelColor(
                    *coords.TM_LOCKED, coords.BUTTON_LOCKED_COLOR):
            print('before tm loop')

            Navigation.menu('augments')
            Augmentation.augmentation(aug=1)
            Augmentation.augmentation(aug=1)
            Augmentation.augmentation(aug=2)
            Augmentation.augmentation(aug=3)
            Augmentation.augmentation(aug=4)

            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()

            if kc % 5 == 0:
                Navigation.menu('adventure')
                Adventure.adventureZone()
            kc += 1

        Navigation.menu('inventory')
        Inventory.loadout(3)
        Misc.reclaimAll()
        kc = 0

        while Statistics.checkPixelColor(*coords.BM_LOCKED,
                                         coords.BUTTON_LOCKED_COLOR):
            print('before bm loop')
            Misc.inputResource(amount='quarter', idle=True, energy=True)
            Misc.inputResource(amount='quarter', idle=True, energy=True)
            for _ in range(2):
                TimeMachine.addEnergy()
                TimeMachine.addMagic()

            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=True)
            Wandoos.addEnergy(cap=True)
            Wandoos.addMagic(cap=True)
            Navigation.menu('augments')

            Misc.inputResource(amount='cap', idle=True, energy=True)
            Augmentation.augmentation(aug=5)
            Augmentation.augmentation(aug=5)
            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()
            if kc % 5 == 0:
                Navigation.menu('adventure')
                Adventure.adventureZone()
            kc += 1

        Misc.reclaimAll()

        Navigation.menu('bloodMagic')
        for i in range(1, 8):
            BloodMagic.addMagic(magic=i, cap=True)

        Navigation.menu('wandoos')
        Wandoos.addEnergy(cap=True)
        Wandoos.addMagic(cap=True)

        Navigation.menu('timeMachine')
        Misc.inputResource(amount='cap', idle=True, energy=False)
        TimeMachine.addMagic()
        Misc.inputResource(amount='quarter', idle=True, energy=True)
        TimeMachine.addEnergy()

        Navigation.menu('goldDiggers')
        GoldDiggers.clearActive()
        GoldDiggers.activate(['STAT', 'WANDOOS', 'MAGIC_BEARD', 'BLOOD'])

        kc = 0
        Challenges.update()
        print('final loop: ')
        print('augments, diggers, ygg, wandoos, bm')

        while Challenges.is_active():

            Navigation.menu('augments')
            Misc.inputResource(amount='half', idle=True, energy=True)
            Augmentation.augmentation(aug=(kc % 5) + 1)
            Augmentation.augmentation(aug=(kc % 5) + 1, upgrade=True)

            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()

            if kc % 5 == 0:
                Navigation.menu('adventure')
                Adventure.adventureZone()

                Navigation.menu('goldDiggers')
                GoldDiggers.clearActive()
                GoldDiggers.activate(
                    ['STAT', 'WANDOOS', 'MAGIC_BEARD', 'BLOOD'])

                Navigation.menu('yggdrasil')
                Yggdrasil.activate('POWER_ALPHA')
                Yggdrasil.activate('POWER_BETA')

                Challenges.update()
            kc += 1

            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=True)  # release some energy
            Wandoos.addMagic(cap=True)

            Navigation.menu('bloodMagic')
            for i in range(1, 8):
                BloodMagic.addMagic(magic=i, cap=True)

        print('done')
        print(f'starting another {args.challenge}')
        ChallengeRuns.completed += 1
        print(f'completed: {ChallengeRuns.completed}')
        ChallengeRuns.start(args.challenge)
예제 #7
0
    def no_tm(duration: int):
        """ Basic challenge logic without TM.

        Arguments:
        duration -- duration of current run.
        """

        start = time.time()

        Navigation.menu('fightBoss')
        FightBosses.nuke()
        Helper.sleep(3)  # wait for nuke
        FightBosses.fightBoss()

        Navigation.menu('inventory')
        Inventory.loadout(1)  # gold heavy

        Navigation.menu('adventure')
        Adventure.adventureZone()
        Adventure.turnIdleOn()

        # before augments
        Misc.inputResource(amount='cap', idle=False, energy=True)
        while (time.time() - start < duration and Statistics.checkPixelColor(
                *coords.AUGS_LOCKED, coords.BUTTON_LOCKED_COLOR)):
            print('before augments loop')
            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=False)
            Wandoos.addMagic(cap=False)
            Helper.sleep(5)
            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()

        if time.time() - start < duration:
            Misc.reclaimEnergy()
            Misc.inputResource(amount='quarter', idle=True, energy=True)
            kc = 0

        while (time.time() - start < duration
               and (Statistics.checkPixelColor(*coords.TM_LOCKED,
                                               coords.BUTTON_LOCKED_COLOR)
                    or Statistics.checkPixelColor(
                        *coords.TM_LOCKED, coords.TM_LOCKED_IRON_PILL))):
            print('before tm loop')
            Navigation.menu('augments')
            Augmentation.augmentation(aug=1)
            Augmentation.augmentation(aug=2)
            Augmentation.augmentation(aug=3)
            Augmentation.augmentation(aug=4)
            Helper.sleep(5)
            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()
            if kc % 5 == 0:
                Navigation.menu('adventure')
                Adventure.adventureZone()
            kc += 1

        if time.time() - start < duration:
            Navigation.menu('inventory')
            Inventory.loadout(3)
            Misc.reclaimAll()
            kc = 0

        while (time.time() - start < duration and Statistics.checkPixelColor(
                *coords.BM_LOCKED, coords.BUTTON_LOCKED_COLOR)):
            print('before bm loop')
            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=True)
            Wandoos.addMagic(cap=True)

            Navigation.menu('augments')
            Misc.inputResource(amount='half', idle=True, energy=True)
            Augmentation.augmentation(aug=5)
            Augmentation.augmentation(aug=4)

            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()
            if kc % 5 == 0:
                Navigation.menu('adventure')
                Adventure.adventureZone()
            kc += 1

        if time.time() - start < duration:
            Misc.reclaimAll()

            Navigation.menu('bloodMagic')
            for i in range(1, 8):
                BloodMagic.addMagic(magic=i, cap=True)

            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=True)
            Wandoos.addMagic(cap=True)

            kc = 0
            Challenges.update()

        while time.time() - start < duration and Challenges.is_active():
            print('final loop')

            Navigation.menu('wandoos')
            Wandoos.addEnergy(cap=True)  # release some energy
            Wandoos.addMagic(cap=True)

            Navigation.menu('bloodMagic')
            for i in range(1, 8):
                BloodMagic.addMagic(magic=i, cap=True)

            Navigation.menu('augments')
            Misc.inputResource(amount='half', idle=True, energy=True)
            Augmentation.augmentation(aug=(kc % 5) + 1)
            Augmentation.augmentation(aug=(kc % 5) + 1, upgrade=True)
            Helper.sleep(3)

            Navigation.menu('fightBoss')
            FightBosses.nuke()
            FightBosses.fightBoss()

            if kc % 5 == 0:
                Navigation.menu('adventure')
                Adventure.adventureZone()

                Challenges.update()

            kc += 1

        Challenges.update()
        if Challenges.is_active():
            ChallengeRuns.current_run += 1
            cr = ChallengeRuns.current_run
            print(f'next duration: {ChallengeRuns.runs[cr]}')
            Navigation.menu('fightBoss')
            Helper.click(*coords.STOP)
            Rebirth.rebirth()
            ChallengeRuns.no_tm(ChallengeRuns.runs[cr])
            # main
        else:
            print('done with challenge')
            print('starting another one')
            ChallengeRuns.completed += 1
            print(f'completed: {ChallengeRuns.completed}')
            ChallengeRuns.start(args.challenge)