[Solved] Stranded In The Dunes - tip plz

I have been stuck on Stranded in the Dunes for at least two weeks. I can’t get to the skeleton king without my health being above half way. Can someone give me tips on how to beat this level. Heres my code.

while True:
    enemy = hero.findNearestEnemy()
    flag = hero.findFlag("black")
    if flag:
        hero.moveXY(flag.pos.x, flag.pos.y)
    elif enemy and enemy.type != "sand-yak":
        enemy = hero.findNearestEnemy()


You might not be powerful enough yet. Maybe you need some gear upgrades?

You can beat this level 100% without flags. But you still need to be strong enough to get through the whole thing.

If you can make it to the boss fight, the raven will throw you potions at points throughout the fight. So make sure you have some code to loot items like so.

item = this.findNearest(this.findItems());
if (item) {
    this.moveXY(item.pos.x, item.pos.y);

another tip. if you need to figure out if you have gotten to the boss screen or not. you can find that with something like this. (for a non flag play through this comes in handy)

let bossX = this.findNearest(this.findByType("x-red"));
if (bossX) {
    this.moveXY(60, 15);

Is your code in javascript or python? I am using python right now. Also heres my gear.

sotonin’s code is in javascript

Im doing python for my code

But i am going to try javascript

Hi, I made it to the Boss, but I don’t attack it. I only attack the minions.
Can someone help?

Nevermind. I finished the level

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