How to get an item's coordinates? (Phyton)


#1

I forgot how to, can someone tell me?


#2

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)

    `

#3

smt.pos.x, smt.pos.y

20characters


#4

What?

20 characters minimum…


#5

Oh thanks man, I replaced smt for item, good day sir