# \[Help\] Alchemic Power

**URL:** <https://discourse.codecombat.com/t/help-alchemic-power/10823>\
**Category:** Level Help\
**Created:** [March 8, 2017, 6:36pm UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823 "2017-03-08T18:36:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_TD\_RodYT](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/_td_rodyt/32/6285_2.png) [@\_TD\_RodYT](https://discourse.codecombat.com/u/_TD_RodYT)\
**Post date:** [March 8, 2017, 6:36pm UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/1 "2017-03-08T18:36:34Z")

</div>

I am stuck on this level. When Omarn says “Fetch!”, it is AFTER I die. When she does say “Fetch!” BEFORE I die however, the pet carries the potion to my hero, but never delivers it and turns around instead.

Code:

// Wait for alchemist’s commands to fetch potions.

// The event handler for the pet’s event “hear”.  
function onHear(event) {  
// Find the nearest potion.  
var potion = pet.findNearestByType(“potion”);  
// If the event’s message is “Fetch”  
if (event.message == “Fetch”) {  
pet.fetch(potion);  
}else{  
pet.moveXY(54, 34);  
}  
// Have the pet fetch the potion.

```
// Else (for any other messages):

    // Return the pet to the red mark.

```

}

pet.on(“hear”, onHear);

// You don’t have to change the code below.  
while(true) {  
var enemy = hero.findNearest(hero.findEnemies());  
if (enemy) {  
hero.attack(enemy);  
}  
else {  
hero.moveXY(40, 34);  
}  
}

---

<div class="post-metadata">

**Author:** ![Hellenar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/hellenar/32/9100_2.png) [@Hellenar](https://discourse.codecombat.com/u/Hellenar)\
**Post date:** [March 9, 2017, 3:29am UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/2 "2017-03-09T03:29:19Z")

</div>

Please format your code according to the FAQ.

What gear does your hero have? Maybe that’s why your hero dies before Omarn says “Fetch”.

---

<div class="post-metadata">

**Author:** ![\_TD\_RodYT](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/_td_rodyt/32/6285_2.png) [@\_TD\_RodYT](https://discourse.codecombat.com/u/_TD_RodYT)\
**Post date:** [March 9, 2017, 5:23am UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/3 "2017-03-09T05:23:12Z")

</div>

I have the best armor in the game. I have the Deflector, Dragon Head, and Dragon Chestplate

---

<div class="post-metadata">

**Author:** ![Hellenar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/hellenar/32/9100_2.png) [@Hellenar](https://discourse.codecombat.com/u/Hellenar)\
**Post date:** [March 9, 2017, 5:33am UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/4 "2017-03-09T05:33:07Z")

</div>

}else{ ?

[20 characters minimum]

---

<div class="post-metadata">

**Author:** ![\_TD\_RodYT](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/_td_rodyt/32/6285_2.png) [@\_TD\_RodYT](https://discourse.codecombat.com/u/_TD_RodYT)\
**Post date:** [March 9, 2017, 7:09am UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/5 "2017-03-09T07:09:17Z")

</div>

Could you please post your code so I could compare mine with yours and see if yours works? I know it may sound a little greedy but I can’t think of any thing else I could do.

---

<div class="post-metadata">

**Author:** ![Hellenar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/hellenar/32/9100_2.png) [@Hellenar](https://discourse.codecombat.com/u/Hellenar)\
**Post date:** [March 10, 2017, 2:10am UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/6 "2017-03-10T02:10:12Z")

</div>

This is interesting. I don’t see anything wrong. I have similar code and it runs perfectly.

Maybe bug in the level? Or try clearing cache? Don’t know if it will help, but just maybe…

---

<div class="post-metadata">

**Author:** ![PythonProfessor](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/pythonprofessor/32/6085_2.png) [@PythonProfessor](https://discourse.codecombat.com/u/PythonProfessor)\
**Post date:** [March 17, 2017, 10:26am UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/7 "2017-03-17T10:26:52Z")

</div>

Hi!

I had the same problem. But when I reset the level, it works perfectly.

---

<div class="post-metadata">

**Author:** ![\_TD\_RodYT](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/_td_rodyt/32/6285_2.png) [@\_TD\_RodYT](https://discourse.codecombat.com/u/_TD_RodYT)\
**Post date:** [March 17, 2017, 7:50pm UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/8 "2017-03-17T19:50:13Z")

</div>

That’s what I did! Thanks.

---

<div class="post-metadata">

**Author:** ![Munza](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munza/32/11316_2.png) [@Munza](https://discourse.codecombat.com/u/Munza)\
**Post date:** [June 13, 2020, 8:19pm UTC](https://discourse.codecombat.com/t/help-alchemic-power/10823/9 "2020-06-13T20:19:42Z")

</div>

I had to add my own check for hero health to make sure he didn’t get too low before receiving help
