# Open doors and collect treasures.
peasant = hero.findByType("peasant")[0]
goldKey = peasant.findByType("gold-key")[0]
silverKey = peasant.findByType("silver-key")[0]
bronzeKey = peasant.findByType("bronze-key")[0]
# Command the peasant to pick up the gold and silver keys.
hero.command(peasant, "pickUpItem", goldKey)
hero.command(peasant, "pickUpItem", silverKey)
# Now, command the peasant to pick up the last key:
hero.command(peasant, "pickUpItem", bronzeKey)
# Command the peasant to drop a key near the first door.
hero.command(peasant, "dropItem", {"x": 40, "y": 34})
# The second key -> the second door.
hero.command(peasant, "dropItem", {"x": 31, "y": 34})
# Drop the first (in the stack) key to the last door:
hero.command(peasant, "dropItem", {"x": 23, "y": 35})
# Hurry and collect treasures!
hero.moveXY(10, 34)
hero.jumpTo({"x": 14, "y": 45})
item = hero.findNearestItem()
hero.moveXY(item.pos.x, item.pos.y)
hero.moveXY(14, 42)
hero.blink({"x": 15, "y": 34})
hero.wait(2)
hero.blink({"x": 15, "y": 23})
I think the blink is whatās wrong, maybe you canāt blink through mines, but I donāt have ritic so I canāt test it and I havenāt done that level yet so Iām afraid I canāt help you but Chaboi_3000 (got rid of summons because problem is solved) has ritic and has done that level maybe he can help you.
peasant = hero.findByType("peasant")[0]
goldKey = peasant.findByType("gold-key")[0]
silverKey = peasant.findByType("silver-key")[0]
bronzeKey = peasant.findByType("bronze-key")[0]
# Command the peasant to pick up the gold and silver keys.
hero.command(peasant, "pickUpItem", goldKey)
hero.command(peasant, "pickUpItem", silverKey)
# Now, command the peasant to pick up the last key:
hero.command(peasant, "pickUpItem", bronzeKey)
# Command the peasant to drop a key near the first door.
hero.command(peasant, "dropItem", {"x": 40, "y": 34})
# The second key -> the second door.
hero.command(peasant, "dropItem", {"x": 31, "y": 34})
# Drop the first (in the stack) key to the last door:
hero.command(peasant, "dropItem", {"x": 21, "y": 34})
hero.command(peasant, "move", {"x": 73, "y": 36})
# Hurry and collect treasures!
hero.moveXY(14, 34)
hero.jumpTo(Vector(14, 50))
hero.moveXY(11, 58)
hero.moveXY(8, 44)
while not(hero.isReady('jump')):
hero.wait()
hero.jumpTo(Vector(8, 34))
hero.jumpTo(6, 21)
hero.wait(5)
hero.say('wooh')
hero.moveXY(14, 34)
while not(hero.isReady('jump')):
hero.wait()
hero.jumpTo(Vector(14, 22))
hero.moveXY(10, 11)
Blink is an ability that the hero Ritic has. He costs 29,000 gems.
Whatās the problem with your code? It looks about right. I remember this level being fiddly with trying to get the right co-ordinates to jump to to avoid triggering the mines. Ritic does solve that problem.
# Open doors and collect treasures.
peasant = hero.findByType("peasant")[0]
goldKey = peasant.findByType("gold-key")[0]
silverKey = peasant.findByType("silver-key")[0]
bronzeKey = peasant.findByType("bronze-key")[0]
# Command the peasant to pick up the gold and silver keys.
hero.command(peasant, "pickUpItem", goldKey)
hero.command(peasant, "pickUpItem", silverKey)
# Now, command the peasant to pick up the last key:
hero.command(peasant, "pickUpItem", bronzeKey)
# Command the peasant to drop a key near the first door.
hero.command(peasant, "dropItem", {"x": 40, "y": 34})
# The second key -> the second door.
hero.command(peasant, "dropItem", {"x": 31, "y": 34})
# Drop the first (in the stack) key to the last door:
hero.command(peasant, "dropItem", {"x": 21, "y": 34})
hero.command(peasant, "move", {"x": 73, "y": 36})
# Hurry and collect treasures!
hero.moveXY(14, 34)
hero.jumpTo(Vector(14, 50))
hero.moveXY(11, 58)
hero.moveXY(8, 44)
while not(hero.isReady('jump')):
hero.wait()
hero.jumpTo(Vector(17, 34))
hero.moveXY(14, 34)
hero.wait(5)
hero.say('wooh')
hero.moveXY(14, 34)
while not(hero.isReady('jump')):
hero.wait()
hero.jumpTo(Vector(14, 22))
hero.moveXY(10, 11)
edit:
its goes ok after i go up the firetrap but when i go down i blow up please help
someone please help me its not working ;(
and also when it gets to the hero.moveXY(14, 34) it doesnāt work @Deadpool198@jka2706@Destroyer5023@JEFF@Gamestack@SwyGuy
my way is different from yours though my hero goes at the firetrap itself and explode the thing but i go to the point where it takes less damage then i collect the treasure