I forgot how to, can someone tell me?
Iâm on salted earth, this the code that I put, can anyone help me?
while True:
enemy = hero.findNearestEnemy()
if enemy.type == âmunchkinâ or enemy.type == âthrowerâ:
hero.attack(enemy)
item = hero.findNearestItem()
# Check the item type to make sure the hero doesnât pick up poison!
# Look for types: âgemâ and 'coinâ
if item.type == âgemâ or item.type == âcoinâ:
nearItem = hero.distanceTo(item)
hero.distanceTo(item)
hero.moveXY(nearItem, nearItem)
`
smt.pos.x, smt.pos.y
20characters
What?
20 characters minimumâŚ
Oh thanks man, I replaced smt for item, good day sir
1 Like