i need help with underground business. here is my code:
i can’t figure out what’s wrong.
You do not need to put
pet.on("spawn", onSpawn) in a while-true loop. It automatically loops itself.
gold? Try using
hero.gold. Also be sure to use
>= because there could be more than 300 gold (
>= means greater than or equal to), or else you will be assigning 300 to the variable
I don’t quite understand the
enemy issue, but unless you don’t have any glasses equipped, it should be working.
Also a little side note: I suppose that you should let the pet move to each corner of the dungeon because it is magnetic and attracts items, and there is more than one type of item to collect.
thanks! it worked! (it has to be 20 characters)
I can’t get 300 coins, only 150 coin. Do anyone know the resolution?
# Send the pet to walk around the dungeon:
# Don’t forget to return it to the hero:
# Guard peasants:
enemy = hero.findNearestEnemy()
# When you have 300+ gold move to the red mark:
if hero.gold >=300:
Did you get all the gold from the mimic, or did you not get any at all.
I only get 150 gold and don’t have any way to get all 300 gold. I don’t know why.
Even if i let mimic run around, it is still 150 coin
Anyone who can give me the correct code? Don’t instruction
for one you shouldn’t put it in a while loop.
I have passed. Thank you all :)))