Or simply just zoom out.... and drag your farm around under your mouse.
Foolproof script based on the inital poster's one. Improved it to work for any farm, as long as you zoom out to the maximum.
(do note, when you trap your farmer with hay bales, you WILL click him or the haybales whenever you're harvesting. Whenever you have the plow tool or the plant tool selected, you will be able to just type in your entire farm ... 18x18 20x20 22x22 etc, you wont click your Farmerdude)
Script:
Code:
!^p::
GoSub GetFarmSq
GoSub Getfirstsq
looptimes := farmy // 2
checkmod := mod(farmy,2)
newx := startx + 25
newy := starty - 12
oldx := startx - 25
oldy := starty + 12
nextx := startx + 25
nexty := starty + 12
if (farmy = 1)
goto singleLine
else if (farmy > 1)
goto multiLine
multiLine:
Loop, %looptimes%
{
Click %startx%,%starty%
Loop, %farmx%
{
Click %newx%,%newy%
MouseClickDrag, L, newx, newy, startx, starty
sleep 200
}
Click %nextx%,%nexty%
MouseClickDrag, L, nextx, nexty, startx, starty
sleep 200
Loop, %farmx%
{
Click %oldx%,%oldy%
MouseClickDrag, L, oldx, oldy, startx, starty
sleep 200
}
Click %nextx% %nexty%
MouseClickDrag, L, nextx, nexty, startx, starty
sleep 200
}
if (checkmod = 0)
msgbox, Done
else if (checkmod = 1)
{
Loop, %farmx%
{
Click %newx%,%newy%
MouseClickDrag, L, newx, newy, startx, starty
sleep 200
}
msgbox, Done
}
return
singleLine:
Click %startx%,%starty%
Loop, %farmx%
{
Click %newx%,%newy%
MouseClickDrag, L, newx, newy, startx, starty
sleep 200
}
msgbox, Done
return
GoSub Getfirstsq
GetFarmsq:
Inputbox, farmx, Hey There, Enter the number of squares in your top row, ,100,150
Inputbox, farmy, Hey There, Enter the number of squares in long, ,100,150
msgbox, you said your farm was %farmx% x %farmy%
farmx--
return
Getfirstsq:
Msgbox, Click the middle of the top left square
KeyWait, LButton, D
KeyWait, LButton, D
MouseGetPos, startx, starty
return
!^x::reload
Return
start key got changed to CTRL ALT P (ctrl alt x to reload stayed)
Credits to Bearclaw for a nice base to start off.