[Solved] Help with Alchemic stack


#1

help with this. I don’t know what is wrong


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

# Use "dropItem" command to put the top item.
# Drop the key near the door to open it.
key = peasant.findNearestByType("gold-key")

# Use peasant.peekItem() to get know the item on the top.
# Mushrooms to the yeti, potions to the hero.
peasant = hero.findFriends()[0]
items = peasant.findItems()
item = hero.findNearest(hero.findItems())
yetiPos = {"x": 61, "y": 44}
yakPos = {"x": 41, "y": 35}
skeletonPos = {"x": 60, "y": 24}
if item:
    for item in items:
        # Command the peasant "pickUpItem" an item:
        hero.command(peasant, "pickUpItem", item)
    

peasant.peekItem()
while True:
    # Check an item on the top of the stack.
    topItem = peasant.peekItem()
    if not topItem:
        break
    # If topItem type is "potion":
    # If topItem type is "mushroom":
    if topItem.type == "mushroom":
        # Command to "dropItem" to yetis:
        hero.command(peasant, "dropItem", yetiPos)
    # If topItem type is "lightstone":
    if topItem.type == "potion":
        hero.command(peasant, "dropItem", skeletonPos)
        # Command to "dropItem" to skeletons:

#3

i’ll try to beat it and i’ll show how I beat it ok @Enderlord832


#4

Thanks but i dont know what is wrong. The peasant stops at when i tell hem to peek at the top item.


#5

I solved it i just had to get the key first


#6

Show me your code because i’m stuck on it to


#7

sure

(Solution removed)


#8

How do i attack after
Every time i say to attack after the code it makes him attack before???


#9

i did it. This is the code use pender with the elementel codex 5 and a wristwatch with time on it

(Solution removed)


#10

Please do not post nor ask for final solutions. They are not permitted on this board. Please feel free to post your non-working code and request assistance. That is what this board is for. Thanks.


#11

Sorry I didn’t know :frowning_face: