Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[SOLVED] Help with the trials please

@Archipelago-Gold needs some help and he is given some stuff to help him out but i would like some help here is the code

array = [[31, 26], [53, 21], [74, 21], [86, 21], [112, 23], [127, 25], [68, 20], [51, 25], [12, 53], [10, 86],
         [16, 115], [34, 126], [12, 112], [34, 126], [12, 112], [34, 126], [12, 112], [34, 126], [12, 112], [34, 126],
         [12, 112], [44, 130], [60, 125], [85, 32], [103, 125], [85, 32], [103, 125], [85, 32], [103, 125], [85, 32],
         [103, 125], [41, 95], [40, 84], [100, 89], [130, 72], [102, 55]]
arrayIndex = 0;
while arrayIndex < len(array):
    enemy = hero.findNearestEnemy()
    item = hero.findNearestItem()
    if (enemy and hero.distanceTo(enemy) < 50):
        if (hero.isReady('jump') and hero.distanceTo(enemy) > 10):
            hero.jumpTo(enemy.pos)
        elif (hero.isReady("cleave")):
            hero.cleave(enemy)
        elif (hero.isReady("bash")):
            hero.bash(enemy)
        elif (hero.isReady("power-up")):
            hero.powerUp()
            hero.attack(enemy)
        else:
            hero.attack(enemy)
    elif (item):
        if (hero.isReady('jump')):
            hero.jumpTo(item.pos)
        else:
            hero.move(item.pos)
    else:
        if (hero.isReady('jump')):
            hero.jumpTo({'x': array[arrayIndex][0], 'y': array[arrayIndex][1]})
        else:
            hero.moveXY(array[arrayIndex][0], array[arrayIndex][1])
        arrayIndex += 1```

My strategy for this level was to find close enemies and attack them, then collect mushrooms.

my strat is: hero.find and attack enemy. Then, if no enemy, hero.find and move item. if no enemy or item, hero.findNearestFlag, pick up flag. Good luck, @Archipelago-Gold!

That’s what I did but then my hero stops at the end and doesn’t complete the final trial.

my start was using all of the best items i had and then using @abc and using @Dragonlouis strats i won

by that time I had temple guard and deflector, I buy nothing but the very best. So, what I’m saying is that maybe you didn’t have my equipment. I recommend high health warriors

You do not want to start with the best because they are easy in the beginning and you need to beat the time limit so you just normally attack in the first trial second use semi best so like bash and attack maybe some defend and in the 3 trial you use best and i don’t know what the last trial is i haven’t been able to get it to load the last trial yet.

And i don’t have premium

I have the best stuff for the warrior for the desert my sword one shots most of them it is just i can’t get the last trial to load.

dude, I’m not a sub and at that point I had deflector and temple guard. but yes bash is helpful.

hmm that might not be really good for you then because it works every time

@ZAX155, what are you talking about? and also, you can skip trials and come back with better equipment which is what I recommend for people without temple guard and deflector.

that is what i did i think

Okay listen, it’s not my gear dude it’s my code it just stops at the end for some reason it never completes the final trial.

the best equipment if you know how to use it it is a gaurnteed win

here is the code again

array = [[31, 26], [53, 21], [74, 21], [86, 21], [112, 23], [127, 25], [68, 20], [51, 25], [12, 53], [10, 86],
         [16, 115], [34, 126], [12, 112], [34, 126], [12, 112], [34, 126], [12, 112], [34, 126], [12, 112], [34, 126],
         [12, 112], [44, 130], [60, 125], [85, 32], [103, 125], [85, 32], [103, 125], [85, 32], [103, 125], [85, 32],
         [103, 125], [41, 95], [40, 84], [100, 89], [130, 72], [102, 55]]
arrayIndex = 0;
while arrayIndex < len(array):
    enemy = hero.findNearestEnemy()
    item = hero.findNearestItem()
    if (enemy and hero.distanceTo(enemy) < 50):
        if (hero.isReady('jump') and hero.distanceTo(enemy) > 10):
            hero.jumpTo(enemy.pos)
        elif (hero.isReady("cleave")):
            hero.cleave(enemy)
        elif (hero.isReady("bash")):
            hero.bash(enemy)
        elif (hero.isReady("power-up")):
            hero.powerUp()
            hero.attack(enemy)
        else:
            hero.attack(enemy)
    elif (item):
        if (hero.isReady('jump')):
            hero.jumpTo(item.pos)
        else:
            hero.move(item.pos)
    else:
        if (hero.isReady('jump')):
            hero.jumpTo({'x': array[arrayIndex][0], 'y': array[arrayIndex][1]})
        else:
            hero.moveXY(array[arrayIndex][0], array[arrayIndex][1])
        arrayIndex += 1```

Hey I have solved this code error if you could please mark this topic as solved@ZAX155 Thanks!

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.