While true:
flag = hero.findFlag(“green”)
enemies = hero.findEnemies()
If flag:
Hero.pickUpFlag(flag)
If enemies:
If hero.isReady(“cleave”):
Hero.cleave(enemy)
Else:
Hero.attack(enemy)
I haven’t done flags in awhile. But if I remember correctly, instead of Hero.pickUpFlag(flag)
Do Hero.pickUpFlag("green") But I can’t be sure about that one.
while True:
flag = hero.findFlag("green")
enemy = hero.findNearestEnemy()
if flag:
hero.pickUpFlag(flag)
if enemy and enemy.type != "yak":
if hero.isReady("cleave"):
hero.cleave(enemy)
else:
hero.attack(enemy)