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

[SOLVED] Can't complete Zig Zag and Zoom

I’m trying to complete Zig Zag and Zoom but I die right before getting to the exit. Can anyone help?

# Escape from Death Valley!
# Move by with a zigzag pattern using real modulo functions.

# This function returns a value from 0 to 15:
def mod15(n):
    while n > 15:
        n -= 15
    return n

# This function should return a value from 0 to 9:
def mod9(n):
    # While n is greater or equal to 9, subtract 9 from n:
    while n > 9:
        n -= 9
    return n

# Don't change the following code:
while True:
    time = hero.time
    if time < 30:
        y = 10 + 3 * mod15(time)
        y = 20 + 3 * mod9(time)
    x = 10 + time
    hero.moveXY(x, y)

I don’t see anything wrong with your code and it works when I run it. I receive zero damage.

Here is my inventory, if it helps.

Use faster boots. I’m using 2.5 m/sec boots with the ring of speed and it completed no problem. When I used the boots you have I died. Using 2.5 m/sec boots without the ring of speed it passed.

Ohhh… That worked.

um hacked code:

hero.moveXY(71, 43);

and it works!
you can see the leaderboard for proof, 9.4 secs!!!