Jump to content

Facebook Farmville automation


marian001
 Share

Recommended Posts

Bot for FarmVille

Site: http://farmvillebot.net

So, this bot can automatically:

- Plant crops

- Harvest crops from land and from trees

- Get products from livestock

Also, this bot allows you to halve the time necessary for crops to ripen!!!

Unlike the rest of bots, this one operates not by clicks, but by sending requests to the game server. It is a more reliable method.

Do the following to start the bot:

1. If your default browser is different from Internet Explorer, open Internet Explorer and log in at http://facebook.com selecting the “Remember Me” checkbox.

2. Close Internet Explorer.

3. Run the “farmvillebot” program.

4. Wait till the farm is loaded.

5. Open the “Settings” tab. Specify the necessary settings.

That’s all. The bot is ready to work instead of you. You can minimize the program and get down to your business.

Link to comment
Share on other sites

  • Replies 501
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I have a method for getting about 1600 xp per minute at a cost of 10 gold per xp. I'm 30 and it only took about 5 minutes to get 31. Quite simply Zynga has a lot of server-side checks, but there are a few things they leave to the client for performance: plant time, harvest time, plow time and time-to-harvest to name a few. So if you can trick your client into using a 0 plant time, plow time, and time-to-harvest you can effectively plant and plow as fast as your comp and autoit can keep up. Its like the soybean bot except planting is instantaneous and there's no delay to delete.

To do this, you only need to get your client to use a different gameSettings.xml that defines these settings and more. There may be a way to save and modify the HTML that is loading the Farmville game, but I trouble with that. Instead:

1. Download Fiddler (a transparent proxy by Microsoft that allows you to inspect and modify web requests): www.fiddler2.com

2. Download the most recent gameSettings.xml document (you can find the version in the HTML source or with something like Firebug): http://facebook2.farmville.static.zynga.com/current/v5608/gameSettings.xml

3. Add a AutoResponder rule to match: "regex:(?insx)^http://.*gameSettings\.xml{:content:}quot; and respond with "C:\gameSettings.xml" (or wherever you saved the xml document.)

4. Now to prove that Fiddler is serving your own document, edit C:\gameSettings.xml and change a comment or something obvious. Now hit this URL again (hit shift-refresh to force your browser to override its cached copy): http://facebook2.farmville.static.zynga.com/current/v5608/gameSettings.xml

If you get your modified version, then you're good to go. When you refresh Farmville, it will use your gameSettings.xml instead of the one on the server.

You can play with the different settings, but most of them are protected server-side. That means you can make something cost 0 gold, but the server will just barf when you buy it. You can enable some of the unreleased items for purchase like "Oil Derrick" and you can place it but the server will send back an error and force a refresh. There's still lots of fun to be had though!

However, like I said before, some of the timer options are left to the client. So go ahead and change your plowTime, harvestTime and plantTime to 0. This gives you insta-farm if you have trapped your guy. Or if you don't want to trap you guy, change walkSpeed to something like 1 and you'll fly! Whenever you change your gameSettings.xml you need to force a refresh so your client reads the new settings. Shift-refresh like you did before.

Now its time to modify the crops. Search for "soybeans" and change the growTime to 0.00001. Now when you plant soybeans they will ripen and wither away in literally seconds. Don't be tempted to harvest them because the server checks the harvest time and will barf. The server does not, however, check plow time. You can plow anything you want and the server doesn't care.

So to get mad XP all you need to do is run a basic autoit script that plants these uber-soybeans, then wait a second and run it again with plow, rinse and repeat. All in all I can do my whole farm in 30 seconds, so depending on your farm size this should come out to 1000-2000xp per minute at a cost of 10 gold per xp. If you play with the coinFountainProbability you can get the free money for plowing more often, but from experience this is somehow protected by server which I don't understand...if the client is flipping the coin then why would the server reject it. Oh well, if anyone figures that out then you might be able to net gold at the same time you are XPing.

Proceed with caution, Zynga will figure it out eventually.

NICE! That is exactly what I've been trying to do for awhile. I just couldn't get a program to inject my custom config file, and whenever it did work - the game would freeze :) Thanks for this method though. Will try this now.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

Hey, guys!

Well, I am frazzled! I really really really wanted a clicker for DELETING plots but no-one seems to have developed it and I only have 2 days left before the § 6.25 per Experience of the Sweet Seeds ends! *Sigh* Well, AutoIt is not a very complicated scripting language so I've literally spent all night trying to solve the delete problem since 'wither-and-replow' is not an option for never-die sweet seeds. So this is what I came up with based on Jackalo previous code:

;*** Farmville Bot
; v2009-07-30 - Now has a GUI, a target button, and optional avoidance of spawning square.
; v2009-07-31 - Added a Mouse Speed variable, made the GUI look better
; v2009-08-23 - Reworked the entire script to use hotkeys and a variable harvest area
; v2009-08-24 - Finished the rewrite, cleaned and compacted the code, added Help button

; Just some things to remember...
; When zoomed all the way out, the below are true...
; Moving across columns, x+25, y-12
; Moving down rows, x+25, y+12

;*** Design Goals
; 1. Create a better looking interface



; Includes
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>

; Define a few (global) variables
$script_x = 0
$script_y = 0
$script_speed = 25
$script_size_columns = 4
$script_size_rows = 4
$script_running = 0
$accept_click = False

$shovel_x = 1150
$shovel_y = 1100
$shovel_crc = 904470361

$hoe_x = 1100
$hoe_y = 1100
$hoe_crc = 3175953493

$hoe1_x = 1100
$hoe1_y = 1050
$hoe1_crc = 2463686371

$arrow_x = 1050
$arrow_y = 1100
$arrow_crc = 1998292005

$arrow1_x = 1050
$arrow1_y = 1050
$arrow1_crc = 4025221020

$accept_x = 725
$accept_y = 700
$accept_crc = 4243092551

$sp_x = 587
$sp_y = 652

; Hotkeys
HotKeySet("{HOME}", "set_position")
HotKeySet("{PGUP}", "start_script")
HotKeySet("{PGDN}", "stop_script")

HotKeySet("{INSERT}", "plow")
HotKeySet("{DELETE}", "shovel")
HotKeySet("{END}", "plant")

HotKeySet("q", "all")

; Hotkey Functions
Func set_position()
    $script_x = MouseGetPos(0)
    $script_y = MouseGetPos(1)
    
    GUICtrlSetData($label_coordinate_x, $script_x)
    GUICtrlSetData($label_coordinate_y, $script_y)
EndFunc

Func start_script()
    GUICtrlSetColor($graphic_background, "0x33FF33")
;~  GUICtrlSetBkColor($button_help, "0x33FF33")
    $accept_click = False
    $script_running = 1
EndFunc

Func stop_script()
    GUICtrlSetColor($graphic_background, "0xF0F0F0")
;~  GUICtrlSetBkColor($button_help, "0xF0F0F0")
    $accept_click = False
    $script_running = 0
EndFunc

Func plow()
    $accept_click = False
EndFunc

Func plant()
    $accept_click = False
EndFunc

Func shovel()
    MouseClick("primary", $shovel_x, $shovel_y, 1, $script_speed)
    GUICtrlSetColor($graphic_background, "0x33FF33")
;~  GUICtrlSetBkColor($button_help, "0x33FF33")
    $accept_click = True
    $script_running = 1
EndFunc

; Helper Functions
Func crc_at_mouse()
    $jPos = MouseGetPos()
    Return get_crc($jPos[0], $jPos[1])
EndFunc

Func get_crc($theX, $theY)
    $pSum = PixelChecksum($theX-10,$theY-25,$theX+10, $theY+25)
    Return $pSum
EndFunc

Func click_accept()
;   Find Coord and click!
    If get_crc($accept_x, $accept_y) == $accept_crc Then
        MouseClick("primary", $accept_x, $accept_y, 1, $script_speed)
        Return True
    Else
        Return False
    EndIf
EndFunc

$window_main = GUICreate("Farmville Bot", 200, 165)
$graphic_background = GUICtrlCreateGraphic(0, 0, 200, 165)
GUICtrlSetState($graphic_background, $GUI_DISABLE)

GUICtrlCreateGroup("Coordinates", 5, 5, 75, 60)
GUICtrlCreateLabel("X:", 20, 25, 50)
GUICtrlCreateLabel("Y:", 20, 40, 50)
$label_coordinate_x = GUICtrlCreateLabel($script_x, 40, 25, 30)
$label_coordinate_y = GUICtrlCreateLabel($script_y, 40, 40, 30)

$button_help = GUICtrlCreateButton("Help", 15, 95, 75, 45)

GUICtrlCreateGroup("Size", 90, 5, 105, 61)
GUICtrlCreateLabel("Columns:", 98, 20)
$input_size_columns = GUICtrlCreateInput($script_size_columns, 145, 18, 40, 20)
$updown_size_columns = GUICtrlCreateUpdown($input_size_columns)
GUICtrlSetLimit($updown_size_columns, 20, 1)
GUICtrlCreateLabel("Rows:", 98, 42)
$input_size_rows = GUICtrlCreateInput($script_size_rows, 145, 40, 40, 20)
$updown_size_rows = GUICtrlCreateUpdown($input_size_rows)
GUICtrlSetLimit($updown_size_rows, 20, 1)

GUICtrlCreateGroup("Mouse Speed", 110, 75, 85, 85)
$input_speed = GUICtrlCreateInput($script_speed, 125, 95, 50, 20, $ES_CENTER)
$updown_speed = GUICtrlCreateUpdown($input_speed)
GUICtrlSetLimit($updown_speed, 50, 1)
$button_speed_1 = GUICtrlCreateButton("1", 115, 120, 25, 15)
$button_speed_5 = GUICtrlCreateButton("5", 140, 120, 25, 15)
$button_speed_10 = GUICtrlCreateButton("10", 165, 120, 25, 15)
$button_speed_15 = GUICtrlCreateButton("15", 115, 140, 25, 15)
$button_speed_25 = GUICtrlCreateButton("25", 140, 140, 25, 15)
$button_speed_50 = GUICtrlCreateButton("50", 165, 140, 25, 15)


$window_help = GUICreate("Help", 170, 65, -1, -1, -1, 0, $window_main)
GUICtrlCreateLabel("Home = Set starting coordinates", 10, 5)
GUICtrlCreateLabel("Insert = Start the script", 10, 25)
GUICtrlCreateLabel("Delete = Stop the script", 10, 45)


GUISetState(@SW_SHOW, $window_main)


While 1
    If $script_running Then
        ; Seriously, why is this even necessary...?
        $script_size_columns = GUICtrlRead($input_size_columns)
        $script_size_rows = GUICtrlRead($input_size_rows)
        
        farm()
        click_accept()
    EndIf
        
    $script_speed = GUICtrlRead($input_speed)
    $gui_msg = GUIGetMsg(1)
    
    Select
        Case $gui_msg[0] = $GUI_EVENT_CLOSE
            If $gui_msg[1] = $window_main Then
                ExitLoop
            ElseIf $gui_msg[1] = $window_help Then
                GUISetState(@SW_HIDE, $window_help)
            EndIf
        Case $gui_msg[0] = $button_help
            GUISetState(@SW_SHOW, $window_help)
        Case $gui_msg[0] = $button_speed_1
            GUICtrlSetData($input_speed, "1")
        Case $gui_msg[0] = $button_speed_5
            GUICtrlSetData($input_speed, "5")
        Case $gui_msg[0] = $button_speed_10
            GUICtrlSetData($input_speed, "10")
        Case $gui_msg[0] = $button_speed_15
            GUICtrlSetData($input_speed, "15")
        Case $gui_msg[0] = $button_speed_25
            GUICtrlSetData($input_speed, "25")
        Case $gui_msg[0] = $button_speed_50
            GUICtrlSetData($input_speed, "50")
    EndSelect

    Sleep(25)
WEnd

Func farm()
    ; Some (local) variables
    $current_x = $script_x
    $current_y = $script_y
    
    For $current_row = 1 To $script_size_rows Step 1
        For $current_column = 1 To $script_size_columns Step 1
            MouseClick("primary", $current_x, $current_y, 1, $script_speed)

            If $accept_click Then
                MouseMove($accept_x, $accept_y, $script_speed)
                While Not click_accept()
                    If Not $script_running Then ExitLoop
                    MouseMove($accept_x, $accept_y, $script_speed)
                WEnd
                Sleep(500)
            EndIf

            $current_x = $current_x + 25
            $current_y = $current_y - 12
            
            If Not $script_running Then ExitLoop
        Next
        
        ; Reset to beginning of row
        $current_x = $current_x - (25 * $script_size_columns)
        $current_y = $current_y - (-12 * $script_size_columns)
        
        ; Advance to the next row
        $current_x = $current_x + 25
        $current_y = $current_y + 12
        
        If Not $script_running Then ExitLoop
    Next
    
    ; Stop running now
    stop_script()
EndFunc

func all()
    MouseClick("primary", $hoe_x, $hoe_y, 1, $script_speed)
    MouseClick("primary", $hoe1_x, $hoe1_y, 1, $script_speed)
    MouseClick("primary", $script_x, $script_y, 1, $script_speed)
    MouseClick("primary", $arrow_x, $arrow_y, 1, $script_speed)
    MouseClick("primary", $arrow1_x, $arrow1_y, 1, $script_speed)
    MouseClick("primary", $script_x, $script_y, 1, $script_speed)
    MouseClick("primary", $sp_x, $sp_y, 1, $script_speed)
    MouseClick("primary", $shovel_x, $shovel_y, 1, $script_speed)
    MouseClick("primary", $script_x, $script_y, 1, $script_speed)
    While Not click_accept()
        If Not $script_running Then ExitLoop
        MouseMove($accept_x, $accept_y, $script_speed)
    WEnd
EndFunc

Apart from the obvious flaw of hardcoding in certain button positions, the thing is this works most of the time for deleting plots, but occasionally it gets stumped for at least some of the following reasons:

1) It can't detect when a plot is already deleted (when it's grass)

This causes the script to lock up and can only be aborted.

2) I put in a sleep to cause a delay between clicking "Accept" and the next plot to delete but still sometimes the clicker ends up clicking on the dialog since it's not finished being dismissed.

I could make the timeout bigger but I really need a way of using PixelCRC to verify the dialog is truly gone.

3) I have a hash of the button in a selected state, but not in an unselected state and it is possible the mouse is moving too fast for the application to detect it is over the button and highlighting it.

This solution should be simple: simply hash over the button as selected and as not selected and if the hash is a match for either, click.

Can anyone help me with these issues? I really want to get my money's worth with these Sweet Seeds but clicking a plot and then clicking accept 320 times is really driving me insane! Please help but if no-one can, I understand. I just hope opportunity arises some future day.

Jeffrey.

Link to comment
Share on other sites

how did u find that xml linke?? http://facebook2.farmville.static.zynga.com/current/v5608/gameSettings.xml

hen i log into fb and goto fv.. i couldnt find the xml game setting link anywhere..

By sniffing the packets. Check my previous posts in this thread.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

Bot for FarmVille

Site: http://farmvillebot.net

So, this bot can automatically:

- Plant crops

- Harvest crops from land and from trees

- Get products from livestock

Also, this bot allows you to halve the time necessary for crops to ripen!!!

Unlike the rest of bots, this one operates not by clicks, but by sending requests to the game server. It is a more reliable method.

Do the following to start the bot:

1. If your default browser is different from Internet Explorer, open Internet Explorer and log in at http://facebook.com selecting the “Remember Me” checkbox.

2. Close Internet Explorer.

3. Run the “farmvillebot” program.

4. Wait till the farm is loaded.

5. Open the “Settings” tab. Specify the necessary settings.

That’s all. The bot is ready to work instead of you. You can minimize the program and get down to your business.

has anyone checked this out to see if its safe to use?

Link to comment
Share on other sites

has anyone checked this out to see if its safe to use?

I scanned it for viruses with Norton Antivirus with update stamp today and it came up clean. It seems to work but it's not flexible enough for me as it doesn't support delete-accept.

Jeffrey.

Link to comment
Share on other sites

By sniffing the packets. Check my previous posts in this thread.

cool i got it working thanx. i guess last nite i was tire and didnt see the gamesetting .xml during the sniff lol.

a similar way can be done using cheat engine 5.5 and increase the speed hack.

i guess eventually they will make these two option server side..

..

Edited by guardianx
Link to comment
Share on other sites

how did u find that xml linke?? http://facebook2.farmville.static.zynga.com/current/v5608/gameSettings.xml

hen i log into fb and goto fv.. i couldnt find the xml game setting link anywhere..

You can use Firebug in Firefox and search for "gamesettings", or if you hover over the "|" between "Support" and "Forums" below the game it will show you the server and flash versions: "p: 5608 f: 5606"

Link to comment
Share on other sites

You can use Firebug in Firefox and search for "gamesettings", or if you hover over the "|" between "Support" and "Forums" below the game it will show you the server and flash versions: "p: 5608 f: 5606"

Any exploits for those versions?

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

Did Zynga found out? I get out of sync error b4, and didn't touch anything apart from plowtime harvesttime and the growtime to 0.0001

Still works for me. Be sure you are using the latest XML and try setting planttime, plowtime, and harvesttime to 0, growtime to 0.0001. I have not tried the first three with a decimal.

Link to comment
Share on other sites

Still works for me. Be sure you are using the latest XML and try setting planttime, plowtime, and harvesttime to 0, growtime to 0.0001. I have not tried the first three with a decimal.

mine gets out of sync, but i dont think your supposed to harvest them, i think just putting plow and plant time at 0 with a deleting script is best, cause harvesting screws with the server.

if you dont want it to wither,

find the words wither and witherederror, all 3 are right around each other and just set them to -1.

Link to comment
Share on other sites

mine gets out of sync, but i dont think your supposed to harvest them, i think just putting plow and plant time at 0 with a deleting script is best, cause harvesting screws with the server.

if you dont want it to wither,

find the words wither and witherederror, all 3 are right around each other and just set them to -1.

No, no, I DO want them to wither, I just want the XP, but keeo getting out of sync.

Will try with a greater. patch right know i'm just using 3x3, I'll try in the full 20x20 and see what happens

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...