Can you guys help me with Siege of Stonehold


#1

i need help with it because i cant move at all


#2

Could you post your code and give us more details?


#3

enemy = self.findNearestEnemy()
greenflag = self.findFlag(“green”)
if enemy:
distance = self.distanceTo(enemy)
loop:
if enemy:
self.distanceTo(enemy)
if distance < 5:
self.isReady(“cleave”)
self.attack(enemy)
self.attack(enemy)
self.cleave(enemy)
if greenflag:
self.pickUpFlag(greenflag)


#4

Please format you code according to the FAQ>.

move all your variables inside the loop. Without them, you hero stores only the first enemy and/or none at all.