pickUpItem is not a command

I was playing the level Alchemic Stack, and it states that pickUpItem is not a command, so I cannot progress with the level. Here is my code:

# Use mushrooms to defeat the Yeti.
# Use potions to heal the hero.

yeti = hero.findNearestEnemy()
peasant = hero.findFriends()[0]
# Use "pickUpItem" command to take items.

items = peasant.findItems()
for item in items:
    if item.type!="gold-key":
        hero.command(peasant, "pickUpItem", item)
# Use "dropItem" command to put the top item.
# Drop the key near the door to open it.

key = peasant.findNearestByType("gold-key")
hero.command(peasant, "pickUpItem", key)
hero.command(peasant, "dropItem", Vector(40, 36))
# Use peasant.peekItem() to get know the item on the top.
# Mushrooms to the yeti, potions to the hero.

while True:
    item = peasant.peekItem()
    if not(item):
        break
    if item.type == "potion":
        hero.command(peasant, "dropItem", hero.pos)
    elif item.type == "mushroom":
        hero.command(peasant, "dropItem", yeti.pos)
# Aaaand one (or two) final hit to the yeti.
hero.cast("summon-burl")
hero.cast("summon-yeti")
hero.cast("summon-undead")

while True:
    hero.attack(yeti)

Please help, Thanks

Your code works absolutely fine for me. Where does it say the error is? Can you post a screenshot of your gear? Maybe it’s something to do with that.

1 Like

Here is the error


My gear

I don’t see anything that would prevent you from using that command, here’s my gear:


There’s a small chance its the mimic? I remember having a similar trouble with this level but I don’t remember what fixed it.

Nvm. Changed the hero to Tharin and solved the level. Thanks anyways.

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