# \[Solved\] Lost Viking need Help!

**URL:** <https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683>\
**Category:** Solved\
**Created:** [October 13, 2017, 1:01pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683 "2017-10-13T13:01:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ender\_Dragon23](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@Ender\_Dragon23](https://discourse.codecombat.com/u/Ender_Dragon23)\
**Post date:** [October 13, 2017, 1:01pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/1 "2017-10-13T13:01:09Z")

</div>

I’m confused how Lost Viking works  
here is my code:

```python
SLIDE = 2
SWITCH = 6
SKIP = 11
# How many sideSteps north of the Red X you've taken.
sideSteps = 1

# How many steps east of the Red X you've taken.
steps = 1

# Multiply this with steps to determine your X coordinate. DON'T CHANGE THIS!
X_PACE_LENGTH = 4

# Multiply this with sideSteps to determine your Y coordinate. DON'T CHANGE THIS!
Y_PACE_LENGTH = 6

# The maze is 35 steps along the X axis.
while steps <= 35:
    
    # Take the next step:
    hero.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
    
    # Increment steps and sideSteps as appropriate, taking into account the special rules.
    steps += 1
    sideSteps += 1
    

```

---

<div class="post-metadata">

**Author:** ![ant](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ant/32/3362_2.png) [@ant](https://discourse.codecombat.com/u/ant)\
**Post date:** [October 13, 2017, 2:13pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/2 "2017-10-13T14:13:29Z")

</div>

Tell me, why do you post everything under the “adventurer” category? It’s clearly stated what it is for:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/f/f016be7f3a4acbd604a145d7bbb3bf95e57c6231.png)  
…and as this level has been around for years, you definitely should not be posting your question here.

* * *

And then: why don’t you use search? There are already at least 10 topics for the same level: [https://discourse.codecombat.com/search?q=lost%20viking](https://discourse.codecombat.com/search?q=lost%20viking)

I presume that you will find the answer to your question(s) in one of those.

---

<div class="post-metadata">

**Author:** ![Ender\_Dragon23](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@Ender\_Dragon23](https://discourse.codecombat.com/u/Ender_Dragon23)\
**Post date:** [October 13, 2017, 3:37pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/3 "2017-10-13T15:37:18Z")

</div>

I guess i wasn’t paying attention to category i was in

---

<div class="post-metadata">

**Author:** ![pblum12330](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/pblum12330/32/11600_2.png) [@pblum12330](https://discourse.codecombat.com/u/pblum12330)\
**Post date:** [March 22, 2020, 2:55am UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/4 "2020-03-22T02:55:43Z")

</div>

The funny things is, you can just shoot the Green eyed burl, wait in a spot lower than the blast radius, and then got to the end coordinate(marked by a FLOWER!), and then you can set the stupid steps to 35. \>.\<

The ending position of the hero and the steps being set to 35 are the ONLY ways to get to the coding!

---

<div class="post-metadata">

**Author:** ![JEFF](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jeff/32/11761_2.png) [@JEFF](https://discourse.codecombat.com/u/JEFF)\
**Post date:** [April 16, 2020, 3:56pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/5 "2020-04-16T15:56:08Z")

</div>

help

```python
sideSteps = 1

# Как много steps(шагов) к востоку от Красного Креста вы сделали.
steps = 1

# Перемножьте это с количеством шагов на восток(step), чтобы определить свою X координату. НЕ ИЗМЕНЯЙТЕ ЭТО!
X_PACE_LENGTH = 4

# Перемножьте это с количеством шагов к северу(sideSteps), чтобы определить свою Y координату. НЕ ИЗМЕНЯЙТЕ ЭТО!
Y_PACE_LENGTH = 6
SWITCH = 6
SLIDE = 8
SKIP = 11
sidemove = 1
# Лабиринт это 35 шагов вдоль Оси X.
while steps <= 35:
    # Сделайте следующий шаг:
    hero.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
    if (steps % SWITCH == 0):
        sidemove = sidemove * -1
    sideSteps += sidemove
    if (steps % SKIP == 0):
        sideSteps = sideSteps + sidemove
    if (sideSteps > SLIDE):
        sideSteps = sideSteps - SLIDE
    if (sideSteps < 1):
        sideSteps = sideSteps + SLIDE
        # Увеличивайте steps(шаги) и sideSteps(шаги в сторону) по необходимости, принимая во внимание специальные правила.
    steps += 1

```

---

<div class="post-metadata">

**Author:** ![Mauricio\_Silva](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/mauricio_silva/32/29292_2.png) [@Mauricio\_Silva](https://discourse.codecombat.com/u/Mauricio_Silva)\
**Post date:** [June 9, 2022, 10:14am UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/6 "2022-06-09T10:14:00Z")

</div>

hero.moveXY(16, 25)  
hero.moveXY(25, 25)  
hero.moveXY(33, 5)  
hero.moveXY(35, 48)  
hero.moveXY(46, 43)  
hero.moveXY(47, 5)  
hero.moveXY(58, 25)  
hero.moveXY(68, 17)  
hero.moveXY(87, 17)  
hero.moveXY(96, 32)  
hero.moveXY(103, 32)  
hero.moveXY(111, 19)  
hero.moveXY(127, 14)  
hero.moveXY(138, 25)  
hero.moveXY(143, 47)  
this is my way code

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [June 9, 2022, 1:53pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/7 "2022-06-09T13:53:17Z")

</div>

Please format your code using the code button (the 6th button in the bar)

---

<div class="post-metadata">

**Author:** ![Mauricio\_Silva](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/mauricio_silva/32/29292_2.png) [@Mauricio\_Silva](https://discourse.codecombat.com/u/Mauricio_Silva)\
**Post date:** [June 9, 2022, 5:02pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/8 "2022-06-09T17:02:21Z")

</div>

hero.moveXY(16, 25)  
hero.moveXY(25, 25)  
hero.moveXY(33, 5)  
hero.moveXY(35, 48)  
hero.moveXY(46, 43)  
hero.moveXY(47, 5)  
hero.moveXY(58, 25)  
hero.moveXY(68, 17)  
hero.moveXY(87, 17)  
hero.moveXY(96, 32)  
hero.moveXY(103, 32)  
hero.moveXY(111, 19)  
hero.moveXY(127, 14)  
hero.moveXY(138, 25)  
hero.moveXY(143, 47)  
this is my way code

---

<div class="post-metadata">

**Author:** ![phoenixRider2022](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/phoenixrider2022/32/29463_2.png) [@phoenixRider2022](https://discourse.codecombat.com/u/phoenixRider2022)\
**Post date:** [June 9, 2022, 8:29pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/9 "2022-06-09T20:29:42Z")

</div>

Hello and welcome to the forum 🥳  
Can you please format your code properly using this button:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/2/1/213e6f436012f4bd4725d6c9265ebcfb103ea30d.png)

---

<div class="post-metadata">

**Author:** ![TheCodingCrusader22](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/thecodingcrusader22/32/46084_2.png) [@TheCodingCrusader22](https://discourse.codecombat.com/u/TheCodingCrusader22)\
**Post date:** [August 12, 2022, 8:40pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/10 "2022-08-12T20:40:45Z")

</div>

this is a great tip (20 letters uggg)

---

<div class="post-metadata">

**Author:** ![porger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/porger/32/30506_2.png) [@porger](https://discourse.codecombat.com/u/porger)\
**Post date:** [August 30, 2022, 9:53pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/11 "2022-08-30T21:53:09Z")

</div>

you can straight up cheese the level by doing this with Arrowhead(the hero)

hero.attack(“Teemer”)  
hero.wait(1)  
hero.moveXY(0, 0)  
hero.wait(3)

# The raven will tell you what to use for your maze parameters!

hero.moveXY(143, 37)

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [August 30, 2022, 11:10pm UTC](https://discourse.codecombat.com/t/solved-lost-viking-need-help/12683/12 "2022-08-30T23:10:23Z")

</div>

…that’s exactly what Jason said……
