while True:
hero.shield()
flagGreen = hero.findFlag("green")
flag = hero.findFlag("violet")
if flagGreen:
enemy = hero.findNearestEnemy()
hero.moveXY(flagGreen.pos.x, flagGreen.pos.y)
if enemy.type != "sand yak":
hero.attack(enemy)
hero.shield()
if flag:
enemy = hero.findNearestEnemy()
if enemy.type != "sand yak":
hero.electrocute(enemy)
This is my code
and this is the items i have.
I really need help.
I know this is a dead topic but I have checked other posts and they still do not work