[SOLVED] Could someone help me on Noble Sacrifice? (Python)


#1

I tried to loop so the soldiers would lure Mr. Yeti but it won’t work.

# Collect 80 gold
while hero.gold <= 80:
    coin = hero.findNearestItem()
    if coin:
        hero.move(coin.pos)
soldiers = 0
while soldiers < 4:
    if hero.gold >= hero.costOf("soldier"):
        hero.summon("soldier")
        soldiers += 1
# Send your soldiers into position
points = []
points[0] = { "x": 13, "y": 73 }
points[1] = { "x": 51, "y": 73 }
points[2] = { "x": 51, "y": 53 }
points[3] = { "x": 90, "y": 52 }
friends = hero.findFriends()

# Use range to make an array to loop over.
while True:
    for j in range(len(friends)):
        point = points[j]
        friend = friends[j]
    if friend:
        hero.command(friend, "move", point)


#2

Never mind, I figured it out
I did something