Can you help me please because I don’t know how to get the pet move to my flag and here is my code
# Accumulate 300 gold and escape from the dungeon.
def onSpawn(event):
# Send the pet to walk around the dungeon:
flag = hero.findFlag("green")
flag = pet.findNearestByType("green")
if flag:
pet.moveXY(flag.pos.x, flag.pos.y)
pass
pet.on("spawn", onSpawn)
hero.cast("summon-undead")
hero.cast("summon-burl")
while True:
# When you have 300+ gold move to the red mark:
if hero.gold == 300:
hero.moveXY(50, 34)