Copper Meadows it might be very simple

Why are you use moveXY?
Just do hero.pickUp(flag).