Farmville / Mouse Recorder Pro Helper Script

By IRoll11!~s Last update Feb 18, 2010 — Installed 1,884 times.

Script Summary: Script that creates a script for use by Mouse Recorder Pro for auto harvesting.

Version: 1.0.1


This script does nothing on it's own, it is a script for writing a script for use by the following program:

Mouse-Recorder-Pro Version 1.3 (NOT version 2.0!)

If you want to automate your harvesting / plowing / planting you need to download the above program. It is small, freeware, and tested free from malware/adware/etc. by both Softpedia and by me uploading it to Kaspersky Online Virus Scanning

You can use the Mouse Recorder Program as is. It's very simple, click record and it will record whatever you click on. Save the file, then click Play to play it back. However if you change your farm layout or buy a bigger farm you have to record a new macro. Also, the macro files from the program become very large because it records the position of the mouse a few times every second.

To get around these limitations I wrote this. If you follow the instructions below it will create a small script that will:

  1. Click the zoom button multiple times in order to fit as much of your farm on the screen as possible.
  2. Click the full screen button.
  3. Click once on every plot on your farm, regardless of whether there is a crop there or not.

It clicks the plots from bottom to top, so if there is something else like a building that creates a popup button it will simply move a little higher to the next plot and avoid clicking any of the popup-menu options.

If your entire farm does not fit onto your screen while zoomed all the way out and in full screen mode it doesn't matter, apparently the program is perfectly OK with using negative values for the mouse position and will gladly click on plots that are off the screen.

In order to get the full advantage from this, your plots should be in a regular arrangement with regards to each other. In other words, if you have one giant block of plots and then a smaller one that is offset by say, 1/2 a plot length from the others, the smaller plots will not be harvested because the mouse will wind up clicking right inbetween them.

Your farmer needs to be trapped. The script will skip over the center plot.

Using the Script - Getting your Coordinates

  1. Install the script.
  2. Take a screenshot of your facebook or farmville page once your farm has loaded. Load this screenshot into your favorite graphics program and find the X and Y coordinates of the zoom button and the X and Y coordinates of the fullscreen button. Make a note of these.
  3. For the script to run these two buttons need to be in the same place on the screen each time you start it. If you have to scroll down in order to see these buttons, then you can't just scroll down a random amount until you see them because you won't be able to reproduce that. If that is the case, try lining up the bottom of the farmville application window with the top of the status bar on your browser, then take the screenshot.
  4. I'm assuming you know how to find the X and Y coordinates in a screenshot. If you don't, you'll just have to look them up somewhere else. =/
  5. Load in the farmville application again. This time click the zoom out button 3-4 times until your farm is zoomed all the way out, then click the full screen button. Take a screenshot of your farm. Load this screenshot into your favorite graphics program and find the X and Y coordinates of the CENTER of the bottommost plot on your farm.
  6. If you don't have anything planted in the bottommost plot, then plow that square before you take a screenshot. It is best to take the screenshot while your plots are fallow or plowed, if they have crops it can be difficult to find the exact center of the plot.

Here is a screenshot of me finding the X and Y coords of the zoom button in photoshop using the rectangular Marquee tool and the Info Window (Step 2):

Here is a screenshot of me finding the X and Y coordinates of the center of the bottommost plot on my farm (Step 5):

Notice that I didn't have anything planted in my lowest plot, so I drew some lines to highlight it so I could find the center.

Using the Script - Making the Script file

Now that you have your 3 sets of coordinates:

  1. Click CTRL-SHIFT-J to bring up the error console. Click the Messages tab. If there are any there click clear. Leave the error console up.
  2. Visit: This not-so-random blank page. It is the only page the script runs on (so it wouldn't be slowing down your regular browsing if you don't disable or uninstall it once you're done.. now aren't I nice?) You will be prompted to enter the 3 sets of coordinates and will be asked how big your farm is.
  3. When you are done entering, go back to the error console. Your script will be contained in one big message.
  4. Click on the message to highlight it.
  5. Right click and select Copy.
  6. Open up notepad or any other text editor.
  7. Paste in the script.
  8. Go to the very first line and delete that entire line. (The first line, the one that says DELETE THIS ENTIRE LINE =)
  9. Save your script as whatever.mrs in the C:\Program Files\Nemex\Mouse Recorder Pro directory, assuming you installed it in the default location.

Running the script.

Load farmville so that the zoom and fullscreen buttons are in the same location on your screen as they were when you took the screenshots. Start Mouse Record Pro. Load the script. Run it.

Run it once for harvesting. Run it again for plowing. When plowing, do NOT chose the plow tool, leave it on the multi-tool. If you put it on plow it'll plow over any ground that's open.

To plant, select what crop you want to plant in your market FIRST, then run the script again.