So I ust reache dthe trial level in the desert, but it keeps lagging and when I refresh I keep getting the infinite loop notification, and I can’t seem to find it. Here is the code
return #Commented out to stop infinite loop.
return #Commented out to stop infinite loop.
# This level is intended to be for advanced players. The solution should be pretty complex with a lot of moving parts. It might also be a bit of a gear check unless you use creative methods.
# You need to make your way to the first trial (Oasis of Marr) defeating enemies along the way. When you reach it, pick all the mushrooms to trigger the trial to begin. If you survive the onslaught, make your way to the next Oasis for the second trial, then the Temple. When all trials are complete you will have to face the final boss. Good luck!
# HINT: Glasses with a high visual range help tremendously on this level so buy the best you can get.
# HINT: the unit 'type' for the oasis guardians is 'oasis-guardian'
def attack():
enemies = hero.findEnemies()
while enemies:
enemy = hero.findNearest(enemies)
while enemy.health > 0:
hero.attack(enemy)
def pickUp():
items = hero.findItems()
while items:
item = hero.findNearest(items)
hero.moveXY(item.pos.x, item.pos.y)
attack()
hero.moveXY(127, 21)
pickUp()
hero.moveXY(27, 30)
attack()
hero.moveXY(8, 80)
hero.moveXY(15, 114)
pickUp()
attack()
hero.moveXY(39, 129)
attack()
hero.moveXY(97, 127)
hero.moveXY(111, 117)
pickUp()
attack()
hero.moveXY(60, 120)
hero.moveXY(39, 92)
hero.moveXY(67, 71)
hero.attack(enemy)
Oh and here is my equipment: