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

Continuous Alchemy - HELP[SOLVED]

I need help with this level.

Here is the code:

type or paste code here
```# Race munchkins to the water distilled by Omarn Brewstone!
# Use the `continue` statement to avoid poison.
while True:
    enemy = hero.findNearestEnemy()
    item = hero.findNearestItem()
    
    # If there is no enemy, continue out of the loop.
    if not enemy:
        continue
    
    hero.say("I see a god dang enemy")
    # If there is no item, ask for a potion then continue:
    if not item:
        hero.say("Give me a drink!")
        continue
    
    # If the item.type "poison", continue out of the loop.
    if item.type == "poisom":
        continue
    # At this point, the potion must be a bottle of water
    # so moveXY to the potion, then back to the start!
    hero.moveXY(44, 35)
    hero.moveXY(34, 47)

please don’t post solutions @FireDragonYesh592 please delete the post.

2 Likes

By the way if that is the solution it’s weird because

You spelled poison wrong.

1 Like

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