I am at siege of stokehold and My character won’t move to pick up flags or anything. I’m not subscribed, am a beginner to code. I’m learning Python.
Here’s my code:
’ ’ ’
enemy= hero.findNearestEnemy()
flag=hero.findFlag()
green= hero.findFlag(‘green’)
black= hero.findFlag(‘black’)
while True:
if flag:
if flag.color is 'green':
hero.moveXY(19, 69)
elif flag.color is "black":
hero.move(flag.pos.x, flag.pos.y)
hero.pickUpFlag(black)
hero.attack(enemy)
else:
if hero.isReady('cleave'):
hero.cleave(enemy)
else:
hero.attack(enemy)