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

Help with the level "Don't rush, Be Quiet"{SOLVED}

Here is my code.

// Dodge the cannons and collect 8 gems.
// Watch out, cannons are ready to fire!
// Move slow along a special pattern to confuse them.

// This function returns a value from 0 to 30:
function mod30(n) {
    if (n >= 30) {
        return n - 30;
    } else {
        return n;

// This function should return a value from 0 to 40:
function mod40(n) {
    // Use an if-statement to return the correct value.
    if (n >= 40) {
        n = n- 40;
        return n;
    } else {
        return n;

// You don't need to change the following code:
while (true) {
    var time =;
    var x = mod30(time) + 25;
    var y = mod40(time) + 10;
    hero.moveXY(x, y);

Also, for some reason,

…That happens.

I can’t find anything wrong. Maybe your should change your equipments?
may you show me your equipments?

I have a friend who is stuck on this level with the same code as this.

What gear do they have equipped?

Nevermind he got it fixed but I got stuck on the level Mountain Mercenaries. In Cloudrip Mountain.

I don’t know what I’m doing wrong. I have the fastest boots.

Sorry for the Necro

Look closely at the comment instructions in line 12. Then compare to what you have for code in that function.

1 Like

Mod edit: Please do not request solutions. The purpose of this board is to assist people with their code. Simply providing solutions is counter productive to the learning process. There are many people here willing and able to assist you with your code but we do not just give the answers. Thanks.