Short-sighted Burl level help [Solved]

I would recommend using Pender Spellbane as your hero as it can move faster. That is, of course if you have subscribed and bought her. I used her and succeeded.

Hi Bryukh,

I am having the same problem, the code looks right and I try using clear cache and direct link to play the game and still incomplete toward the end he just chase my villager, I have speed boot +2.5 with 31%20AM Any help is appreciated. Thanks!

The burl is stopping a bit to the left after a few iterations…which causes him to see me and chase. But not only do I collect more than 4 coins, my hero lives, yet it says that he does not. At any rate, here is my code:

// Collect coins and run, or else the burl will find you.

// This function allows your hero take an item.
function takeItem(item) {
    hero.moveXY(item.pos.x, item.pos.y);
}

// Write the function "checkTakeRun" with one parameter.
// If the item exists, use "takeItem" function to take it.
// Go back to the start (green mark), with or without the item.
function checkTakeRun(target) {
    var item = hero.findNearestItem();
    if (item) {
        takeItem(target);
        hero.moveXY(40, 12);
    }
    else {
        hero.moveXY(40, 12);
    }
}
// Don't change this code.
while (true) {
    hero.moveXY(16, 56);
    var coin = hero.findNearestItem();
    checkTakeRun(coin);
    
    hero.moveXY(64, 56);
    coin = hero.findNearestItem();
    checkTakeRun(coin);
}

Just to reiterate, it seems to work fine until the Burl decides to stay on the left-hand side. I have not tried the provided link yet, however.

UPDATE: used the alternate link, and this time the burl only gave 2 iterations (forget how many previously, but seemed like more) before he decided to stay near the corner, but its the right corner this time.

Decided to run it again randomly…without changing code and it worked this time. Not sure what the hang up was.

function takeItem(item) {
    hero.moveXY(item.pos.x, item.pos.y);    // hero.moveXY(x, y);
}
function checkTakeRun(coin) {
    hero.moveXY(40, 12);
}
var item = hero.findNearestItem();
if (item) {
    hero.moveXY(x, y);
    takeItem(item);
}
// Nie zmieniaj tego kodu.
while (true) {
    hero.moveXY(16, 56);
    var coin = hero.findNearestItem();
    checkTakeRun(" Gold Coin");
    hero.moveXY(64, 56);
    coin = hero.findNearestItem();
    checkTakeRun("Gold Coin");
}
Please help me with that level

please help i have been stuck for almost a month!

here is my real code

Hi @cheddarcheese, welcome to the forum!
Please could you post your code fully formatted. (Yours is a bit of both). Read this topic to learn how to do that:

Please could you also give me a bit more information about your problem.
Thanks
Danny

2 Likes

i already finished it

im putting [Solved] then

ok then if you say so

1 Like


i am having some issues with this one as well. can’t see where i have the code wrong? i know it is easy but being dyslexic it is sometimes hard for me to see what i have done wrong?
thanks

1 Like
def takeItem(coin):
    hero.moveXY(coin.pos.x ,coin.pos.y)
def checkTakeRun(coin):
    if coin:
        takeItem(coin)
        hero.moveXY(40, 9)
        hero.moveXY(40, 12)
    else:
        hero.moveXY(40, 9)
        hero.moveXY(40, 12)

guys try this funny code for this level
if u are having trouble when u done everything correct but the burl caught u slacking

Plz don’t necro post when you have nothing on topic to say