AutoIt Forums: Facebook Farmville automation - AutoIt Forums

Jump to content

  • (26 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Facebook Farmville automation plow, plant and harvest without a click... Rate Topic: ****- 4 Votes

#1 User is offline   marian001 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 10
  • Joined: 17-January 09
  • Location:Prague, Czech republic

Post icon  Posted 18 July 2009 - 08:42 PM

Farmville is a nice Facebook game (made in Flash) were you take care of your farm. It requires a lot of "work".. so I decided to automate it. That allows me to e.g. brush me teeth while watching how my farm is taken care of instead of never-ending clicking...

Before you run this:
- since I don't know how to control Flash app from autoit, this is just about knowing where to click, so your screen resolution, flash app position etc. must match mine (or you can make adjustments yourself)
- optimalized for 1280x800 screens and IE7 (without additional toolbars) running on Vista
- unexpected popup windows within flash are not handled, so you might need to stop script execution manually
- to stop script execution at any time, press ESC; otherwise don't move your mouse until script finishes
- you have to setup your field corner coordinates (when the application is in full-screen mode and twice zoomed out); I suggest you use ScriptWriter for this; to find a coordinates of a field tile, use its middle point
- you may enter you login (email) and password to enable automatic login
- this script assumes you have one plant planted on whole field
- ...more info in script

Features
- following actions are available: _Harvest, _Plow, _Plant, _Restore
- _Harvest - harvests whole field
- _Plow - plows whole field
- _Plant(screen, item) - buys item number 'item' (1-6) from screen number 'screen' within plants offered in market
- _Restore - for cases when you have to stop script (e.g. because of popup window) restore feature is available; every from above action writes its state into ini file after each click - this file is used to provide information for restore function; if you choose to run restore function, it will only finish unfinished job (e.g. buys last bought item and finishes planting) - no further tasks will be executed

Bonus
- I am including excel with comparison of items (incomplete...)

Version 1.0
Attached File  facebook_farmville.zip (14.17K)
Number of downloads: 12098

enjoy your farm... any improvements are welcome..

Marian

#2 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 26 August 2009 - 10:10 PM

It looks really good, trying to mod it for my computer but i hoep to get it working!

maybe there is a way to make it also just loop and have a wait time that you enter in when configuring, like starberries wait 4.05 hrs to start picking again.

#3 User is offline   ghetek 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 94
  • Joined: 09-October 04

Posted 27 August 2009 - 02:43 AM

I found out that you can perform jobs at your friends farms with this:

[ code='text' ]    ( Popup )
$oIE = _IECreate ("http://apps.facebook.com/onthefarm/index.php?mission=weeds&friendId=" & $FriendID,1) _IELoadWait ($oIE)


you can get friend IDs by hovering over their names in the "My Neighbors" tab. I tried multiple windows but game goes out of sync.

#4 User is online   Zinthose 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 17-April 08
  • Location:Ohio USA

Posted 27 August 2009 - 03:43 AM

FYI: If you want to know all the games settings you can download the xml loaded by the flash game at:
http://facebook2.farmville.static.zynga.com/current/v4415/gameSettings.xml

I've found that you can edit the moveSpeed setting using a _MemoryWrite but I haven't figured out how to reliably locate the offset.


edit: Updated link to reflect version change.

This post has been edited by Zinthose: 29 August 2009 - 03:14 AM


#5 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 27 August 2009 - 04:17 AM

View PostZinthose, on 27 August 2009 - 03:43 AM, said:

FYI: If you want to know all the games settings you can download the xml loaded by the flash game at:
http://facebook2.farmville.static.zynga.com/current/v4299/gameSettings.xml

I've found that you can edit the moveSpeed setting using a _MemoryWrite but I haven't figured out how to reliably locate the offset.


awesome info, looking through the plants and levels, cant wait for more stuff comes out for automating :D

#6 User is offline   Skrip 

  • (Previously known as Firestorm)
  • PipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 2,265
  • Joined: 26-November 05
  • Gender:Male
  • Location:Look behind you...

Posted 27 August 2009 - 05:41 AM

View PostZinthose, on 26 August 2009 - 09:43 PM, said:

FYI: If you want to know all the games settings you can download the xml loaded by the flash game at:
http://facebook2.farmville.static.zynga.com/current/v4299/gameSettings.xml

I've found that you can edit the moveSpeed setting using a _MemoryWrite but I haven't figured out how to reliably locate the offset.


I haven't played the game yet. But is it possible to edit where the game thinks the config file is? Possibly using the page source? (Not sure, haven't played it yet)

#7 User is online   Zinthose 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 17-April 08
  • Location:Ohio USA

Posted 27 August 2009 - 05:51 AM

View PostFirestorm, on 27 August 2009 - 12:41 AM, said:

I haven't played the game yet. But is it possible to edit where the game thinks the config file is? Possibly using the page source? (Not sure, haven't played it yet)


I've intercepted the header call using the firefox plugin Tamper, but I haven't figured out how to redirect the contents on the xml without a network sniffer or proxy hack.

I have a script running now that repeativly plows a plot of land plants strawberries then repeats.. this allows me to get 2xp per 25 coins but I've noticed that I'm finding the 100+ coin bonus being found after almost every plow. gone from level 17 to lvl 27 in just 4 days with the script running intermittently. I'll post the script here after I get some of the bugs worked out..

#8 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 27 August 2009 - 06:43 AM

View PostZinthose, on 27 August 2009 - 05:51 AM, said:

I've intercepted the header call using the firefox plugin Tamper, but I haven't figured out how to redirect the contents on the xml without a network sniffer or proxy hack.

I have a script running now that repeativly plows a plot of land plants strawberries then repeats.. this allows me to get 2xp per 25 coins but I've noticed that I'm finding the 100+ coin bonus being found after almost every plow. gone from level 17 to lvl 27 in just 4 days with the script running intermittently. I'll post the script here after I get some of the bugs worked out..


awesome dude that would be amazing :]

i have been trying to WPE pro and CE 5.5 farmville for acouple days, unlike the other zynga games, this one is tough..

#9 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 28 August 2009 - 08:24 AM

anyone know how to extract the game music haha that would be epic besides the fact of autoit the whole field :)

#10 User is online   Zinthose 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 126
  • Joined: 17-April 08
  • Location:Ohio USA

Posted 28 August 2009 - 11:24 AM

View Postwetwlly, on 28 August 2009 - 03:24 AM, said:

anyone know how to extract the game music haha that would be epic besides the fact of autoit the whole field :)


No need, the game downloads the music from the following url on each load: http://facebook.farmville.static.zynga.com/v4415/assets/sounds/Barnyard_02_44.mp3

Edit: Updated url to match version change.

This post has been edited by Zinthose: 29 August 2009 - 03:15 AM


#11 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 28 August 2009 - 03:30 PM

View PostZinthose, on 28 August 2009 - 11:24 AM, said:

No need, the game downloads the music from the following url on each load: http://facebook.farmville.static.zynga.com/v4299/assets/sounds/Barnyard_02_44.mp3


woot! epic thank you

#12 User is offline   Skrip 

  • (Previously known as Firestorm)
  • PipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 2,265
  • Joined: 26-November 05
  • Gender:Male
  • Location:Look behind you...

Posted 29 August 2009 - 05:53 AM

View PostZinthose, on 26 August 2009 - 11:51 PM, said:

I've intercepted the header call using the firefox plugin Tamper, but I haven't figured out how to redirect the contents on the xml without a network sniffer or proxy hack.

I have a script running now that repeativly plows a plot of land plants strawberries then repeats.. this allows me to get 2xp per 25 coins but I've noticed that I'm finding the 100+ coin bonus being found after almost every plow. gone from level 17 to lvl 27 in just 4 days with the script running intermittently. I'll post the script here after I get some of the bugs worked out..


Okay. Tamper is epic. I'm gonna try and hack farmville with it, and will post back with the results and the process.


EDIT: What the hell? You can't 'Tamper' where it's getting the resource from? I thought that was like the whole purpose of the 'Tamper' ability....Anybody know any other extensions that can edit where the resource is?
http://img198.imageshack.us/img198/7465/55344283.jpg

This post has been edited by Firestorm: 29 August 2009 - 06:08 AM


#13 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 29 August 2009 - 06:14 PM

i got an idea, can someone think up an autoit to just refresh My Neighbors, and click it when it says Go To ___'s Farm, then accept the weeding,scaring crows and click back to my neighbors until it finds go to again?

#14 User is offline   FireFox 

  • Quickest obfuscated spammer !!!
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,692
  • Joined: 10-November 08
  • Location:France

Posted 29 August 2009 - 11:13 PM

Can you make a "1024x768" version ? It's compatible with all screens ;)
Thanks in advance.

Cheers, FireFox.

#15 User is offline   Rorka 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 106
  • Joined: 18-March 09

Posted 30 August 2009 - 12:20 AM

i did automate Farmville using controlclick. but it didnt work out as they keep updating it all!

I might re-do it.

Maybe we should packet edit?

This post has been edited by Rorka: 30 August 2009 - 12:40 AM


#16 User is offline   Jackalo 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 30-August 09

Posted 30 August 2009 - 06:07 PM

I didn't want to create a new thread for the same kind of program, so I figured that I would post my alternative take on a Facebook Farmville click script here.

All this program does is automate the clicking process, with variable speeds, columns, and rows, and has hotkeys to make it quicker. This script was really great before they nerfed the instant farm technique, but it's still a time saver for me to this day.

I guess I should also note that this is made to work with Farmville when it's fully zoomed out. Take it or leave it, I just felt like sharing.

[ autoIt ]    ( ExpandCollapse - Popup )
;*** 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 ; Hotkeys HotKeySet("{HOME}", "set_position") HotKeySet("{INSERT}", "start_script") HotKeySet("{DELETE}", "stop_script") ; 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")     $script_running = 1 EndFunc Func stop_script()     GUICtrlSetColor($graphic_background, "0xF0F0F0") ;~  GUICtrlSetBkColor($button_help, "0xF0F0F0")     $script_running = 0 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()     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)                         $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  


#17 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 30 August 2009 - 07:09 PM

View PostJackalo, on 30 August 2009 - 06:07 PM, said:

I didn't want to create a new thread for the same kind of program, so I figured that I would post my alternative take on a Facebook Farmville click script here.

All this program does is automate the clicking process, with variable speeds, columns, and rows, and has hotkeys to make it quicker. This script was really great before they nerfed the instant farm technique, but it's still a time saver for me to this day.

I guess I should also note that this is made to work with Farmville when it's fully zoomed out. Take it or leave it, I just felt like sharing.



nerfed instant farm? you can still stick your character between haybales to farm unless u mean something different

#18 User is offline   Jackalo 

  • Newbie
  • Group: Members
  • Posts: 2
  • Joined: 30-August 09

Posted 30 August 2009 - 09:39 PM

View Postwetwlly, on 30 August 2009 - 01:09 PM, said:

nerfed instant farm? you can still stick your character between haybales to farm unless u mean something different


Your character doesn't move around the screen when doing that, but the instant farming (no Harvesting progress bar above your character's head) is gone.

#19 User is offline   wetwlly 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 47
  • Joined: 26-August 09

Posted 30 August 2009 - 10:06 PM

View PostJackalo, on 30 August 2009 - 09:39 PM, said:

Your character doesn't move around the screen when doing that, but the instant farming (no Harvesting progress bar above your character's head) is gone.


oh i c i c, well awesome script dude !

#20 User is offline   Eliran 

  • Newbie
  • Group: Members
  • Posts: 3
  • Joined: 31-August 09

Posted 31 August 2009 - 11:29 PM

OPS Double Please Delite this one

This post has been edited by Eliran: 31 August 2009 - 11:35 PM


  • (26 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

11 User(s) are reading this topic
0 members, 11 guests, 0 anonymous users