Hi, i’m having trouble with the level Decoy Drill, i’m using the following code:
decoysBuilt = 0
loop:
item = self.findNearestItem()
if item and self.gold <=25 and decoysBuilt < 4:
pos = item.pos
x = pos.x
y = pos.y
self.moveXY(x, y)
elif self.gold >= 25 and decoysBuilt < 4 :
self.buildXY("decoy", self.pos.x-5, self.pos.y)
decoysBuilt += decoysBuilt + 1
elif decoysBuilt == 4:
break
self.moveXY(14, 36)
self.say("Hey, i am done building "+decoysBuilt+" decoys.")
After building three decoy my character stay in place and keep hiting the floor with his sword until time run out, i really can’t see what’s wrong, any help would be very welcomed.
Thank you very much for your time, have a nice day.