Jump to content

Facebook Farmville automation


marian001
 Share

Recommended Posts

  • Replies 501
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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

oh just leave the withermultipler all the same, change witherederror to like 9999999999, and jsut harvest time at 0. it should instantly wither them

Edited by wetwlly
Link to comment
Share on other sites

Well, the Sweet Seeds era is over -- or is it, since apparently now you can plunk down another $25FV and get another crack at it, but for how long? 7 more days? From the time of purchase? Will it reset again next Friday at 12:00 CDT? Well, that's a question I think for google not here but back to my quest for the all-in-1 plow-plant-delete tool. I've made some progress and even once had a version that pretty accurately successfully deleted all but 1 of 300 plots. But that took like 7 seconds per plot (though it skipped grass for the most part) and over 300 plots that was taking longer than I'd wished.

I started with the Mouse Meander from 15% with a click-accept timeout of 10 seconds, which as I said was pretty successful. Then I tried to tweak that to 0%, 1%, 3% and 5% Meander. All of those produced numerous errors so I added a delete-click retry at various intervals, settling on 3 seconds. None of these modes got all squares and in fact the retry would frequently end up clicking the cancel button instead of accept because the cancel was above the plot it was trying to delete. Eventually midnight Chicago struck and I could plant Sweet Seeds no more. So I left my Sweet Potatoes to grow without withering and decided to take a brake and reflect on progress so far.

So that is the basic state as of now. I am of the opinion that I am becoming the "delete" expert here but appologize if someone else feels they deserve this mantle more. But others are far more qualified at visiting neighbours, dismissing leveling messages and harvesting, collecting and selling. I suggest in this respect we combine our efforts and that I continue to focus on how to get a seemless delete function working which can be combined into an all-in-1 tool.

Also, after accidentally deleting my picnic table (which was NOT in the grid line and I've no idea how it happened -- thank goodness the Oliphaunts were spared!!) I think it would be handy to do a PixelChecksum over the area of the delete dialog which states what you're trying to delete as part of the registration process. Thus, it would be able to click "cancel" when it accidentally clicks on something you actually didn't want to delete.

Also, as I said before, there are a lot of magic numbers in the delete code that I want to reduce. Mainly, these are offsets. It seems to me you need to measure 3 or so points from the user so perhaps a "train" series of key strokes like: "Hover over your leftmost crop and press {HOME}"; "Now hover over the Multi Tool and press {HOME} again". Etc. It could be very simple to set up once and then loop over the steps for as long as needed. Add in dismissing the leveling and visiting and ribbon dialogs and you have a true all-in-1 leveling tool: select your grid, tell it where the multi-tool is, where the accept button will appear and where the buy soy button is and then hit "go"! That's my ultimate goal here. Fortunately, some items are fixed, like distances between the various buttons or even where the zoom and fill-screen buttons are. This technique would work regardless of whether run in full-screen or windowed and regardless of full screen resolution. What do you guys think: worth the effort? Reinventing the wheel, a wheel I've seemed to have missed?

Anyway, here's my latest code.

Jeffrey.

Link to comment
Share on other sites

oh just leave the withermultipler all the same, change witherederror to like 9999999999, and jsut harvest time at 0. it should instantly wither them

Ok, with a Patch of 20x20 worked great, the onlu problem is that I have to use Explorer or Chrome, can't get Firefox to be redirected by fiddler2, in fact, no request from any firefox windows is seen in fiddler log, is there a way to do it?

PD: I hate when people do what I just did. I found the solution with a simple google search of fiddle+firefox. everithing is working perfectly now. Thanks

Edited by fmcatalan
Link to comment
Share on other sites

What do you guys think: worth the effort? Reinventing the wheel, a wheel I've seemed to have missed?

Unless you find some moral distinction between cheating and automating (either way it's avoiding doing the real work), why don't you just follow my post about fiddler?

Link to comment
Share on other sites

Unless you find some moral distinction between cheating and automating (either way it's avoiding doing the real work), why don't you just follow my post about fiddler?

I did use fiddler, and it works nicely for Soy, as well as speeding up the petit mec and the wither time and I love starting out in zoomed out mode. BUT, for never-wither crops like Sweet Seeds were, it just won't work because, of course, they never wither. :) Since the server will know something's up with harvesting it so early (believe me I tried) due to the time acceleration, and force a refresh, this technique does not work for Sweet Seeds, or, in their abscence, any never-wither crop that might follow and you never know if Sweet Seeds might one day return (and as I love helping the people of Haïti, I hope they do)! That's why the deleter is still useful. And why Sweet Seeds over Soy? Simply, 35% off coins per experience: §6.25 per Exp for Sweet Seeds, §10 for Soy.

EDIT: Also, the code that handles the confirmation dialog is handy since it is the same code that can handle seed selection making the plow-plant-wither technique also totally automatable.

Jeffrey.

Edited by TimeHorse
Link to comment
Share on other sites

Ah, progress!

http://timehorse.pastebin.com/ff703a98

That is the latest version of my script. You initialize it manually with 4 hot-keys: HOME sets your home position for the grid you're going to plow-plant-delete. "a" is for a position on the "Accept" button of a Delete Confirmation Dialog. "m" is to tell the script where the Multi Tool is (the Arrow). Finally, "s" is for selecting a seed; you do this by selecting the market and mouse-over a seed crop, i.e. soy's or sweet seeds' "buy" button. Close / Cancel each dialog after each training command, then you're ready. Hit INSERT to plow your grid, hit END to seed it with your selected seed and hit DELETE to delete all your plots in the grid.

Now, this is not perfect. The Grass Detection algorithm is still buggy meaning the delete script can spend as much as 30 seconds trying to delete an empty plot. I've noticed 2 Zygna refresses in the MANY tests I've run, so they may be on to something but there's been no roll-back of experience or coins spent or obviously level. Also, deletion is nearly 100% again, with maybe 1 error in 100 but that may be due to the occasional sync error since sync dialogs look like delete-confirm at this point (I'll CRC the wording of the dialog later so that you ONLY delete what you want to delete and cancel on anything else.

But, with the 4 trainings, there should be no magic numbers other than constant game metrics. And you can see I have added status messages to the dialog and will add more controls, such as UP and DOWN adjusting the Mouse Meandering speed while running. Still no handling for dismissing information dialogs but others have done that IIRC. I've ratcheted this up to 3% on the Meander scale and still see very few errors. One quirk though is if you want to avoid resetting the home plot between Plow (the lower corner) and Plant-Delete (centered), orient toward the lower corner as if plowing (best to do with a plow-tool) and try to edge it inward as much as possible until the plow outline moves out of alignment. This is the best HOME and should work for all three modes. I'd also like to add a Zig-Zag mode so that the way I like to click is up-down left-right not on the diagnol, i.e. diagnol to the plots in a 1u-2d-3u-4d-5u-4d-3u-2d-1u type fashion so I may make this happen.

The other thing I want to add is to have each task chain the next in a cirle so that when Plow is done, it starts Plant, and Plant triggers Delete when complete and then see if Delete can trigger another Plow and have this in turn repeat in a user-configurable amout of times, or infinite (until coins are depleated -- though not a good idea to depleat your coins folks unless you have trees and animals and lots of friends to build your wealth back up!

Anyway, I'd welcome any testers and comments and thanks to everyone who've contributed to this work before me!

Jeffrey.

Link to comment
Share on other sites

Okay. Since the latest update (5 min ago...), the game now also connects to: http://fbpr1.farmville.zynga.com/current/mylife.cfg (after loading the gamesettings.xml) and downloads this:

<mylife>
    <variable type="global" name="asset_path">http://facebook.farmville.static.zynga.com/assets/mylife/assets/</variable>
    <variable type="global" name="avatar_asset_path">http://facebook.farmville.static.zynga.com/assets/mylife/avatar_assets/</variable>
    <variable type="global" name="item_image_path">http://facebook.farmville.static.zynga.com/assets/mylife/item_images/</variable>
    <variable type="global" name="game_control_server">http://facebook.farmville.zynga.com/current/mylife_game_control/</variable>
    <variable type="global" name="APPNAME">FarmVille</variable>
</mylife>

http://facebook.farmville.zynga.com/current/mylife_game_control/ 403 permission error....

But could we do anything with that?

[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

Okay. Since the latest update (5 min ago...), the game now also connects to: http://fbpr1.farmville.zynga.com/current/mylife.cfg

Great catch. If I had to guess they are prepping for some performance upgrades...using different servers for different data streams. I haven't checked to see if they are actually doing it yet.

I diffed the new gameSettings and there's few changes. I think maybe the Pink Cow is available and they increased the odds of finding a lonely animal.

Link to comment
Share on other sites

Great catch. If I had to guess they are prepping for some performance upgrades...using different servers for different data streams. I haven't checked to see if they are actually doing it yet.

I diffed the new gameSettings and there's few changes. I think maybe the Pink Cow is available and they increased the odds of finding a lonely animal.

I saw that too. I was messing with that, and unfortunatly I think the probability for all that is server side :)

[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

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.

Latest version: http://facebook2.farmville.static.zynga.com/current/v5811/gameSettings.xml

And instead of changing the grow time, change the inGameDaySeconds="82800" to inGameDaySeconds="1", and every crop will instantly wither.

Does anyone know how to change the size of the 'plow tool'? (the red/green box)

Edited by Skrip

[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

Also, check this out:

What I see:

Posted Image

What you would see:

Posted Image

Totally removes the need to expand your farm (till you max that out too ;D)

(Please read post above this one. I really need a way to change the size of the plow tool)

Edited by Skrip

[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

this is all client sided right?

but if it is why u doing this no point 0_o

Because they stay there. That means I never have to expand my farm. There's like 40 plots there now. At least.

[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

does that mean if i use it and do what u did and get 40 plots w/o expand and then harvest i will have the money/xp on real game insead of client side game?

Yes.

[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

I posted my Neighbor-help-code some days ago.

Here again, with a few changes:

HotKeySet("{H}", "HelpNeighbor")
HotKeySet("{S}", "Stop")
While 1
    Sleep(100)
WEnd


Func HelpNeighbor()
WinWaitActive("FarmVille")
While True
    $coord=0
    $coord = PixelSearch( 450, 300, 671, 380, 0x4A925A)
    
    $step=1
    If Not @error Then
        $coord2 = PixelSearch( 450, 300, 671, 380, 0x104D18)
        If Not @error Then
            ;msgbox(0,"", $coord[0] & $coord[1])
            MouseMove($coord[0] ,$coord[1])
            $step=2
            MouseClick("left", $coord[0], $coord[1])
            $step=3
            Sleep(30000)
            $step=4
            MouseMove(417,499)
            $coord1 = PixelSearch( 400, 450, 500, 600, 0x31CB42)
            $step=5
            While @error
                $step=6
                MouseMove(417,499)
                MouseMove(420,505)
                $coord1 = PixelSearch( 400, 450, 500, 600, 0x31CB42)
                
            WEnd
                $step=7
                MouseMove($coord1[0]+ 10 ,$coord1[1]+10)
                $step=8
                MouseClick("left",$coord1[0]+ 10 ,$coord1[1]+10)
                $step=9
                Sleep(500)
                $step=10
                MouseClick("left",$coord1[0]+ 10 ,$coord1[1]+10)
                $step=11
                Sleep(1000)
                $step=12
                MouseMove(343,220)
                $step=13
                MouseClick("left",343,220)
                $step=14
                Sleep(10000)
                $step=15
        Else
            ;msgbox (0,"","Nicht gefunden!")    
            Send("{F5}")
            $step=17
            Sleep(10000)
            $step=18
        EndIf
    EndIf
WEnd
EndFunc

Func Stop()
    Exit
EndFunc

2 Problems remain:

1. If there is another info above the Free gifts | Play | My Neighbors the script won´t work (finding Free gifts), so there is to to some config dialog

1b. Same Prob for other resolutions

2. If there is no Go To XYZ´s Farm button, I need to press F5 manually, cause it finds the specified pixels, without the Button being there...

Anyone could help?

Link to comment
Share on other sites

New version of my PPD script (Plow, Plant, Delete) and I'm going to make it more flexible so it can do PPW (Plow, Plant[, Wither]) and HPP (Harvest, Plow, Plant) as well and try to teach it how to scroll through pages of seeds. Thus, you'll be able to select a sequence, and then a repeat count where it will do say Plow entire area, then Plant entire area then Delete entire area, First, though, I want to a ) fix a bug where it thinks a plot is not grass when it is and thus spends 30 seconds trying to delete nothing and b ) add the security fix that hashes over the "delete" message to make sure you only delete one object type (i.e. soy) instead of, say, your precious Elephant. Also, I want to get a better handle on the states of dialogs as in, I think I am still having a problem detecting when a dialog is fully dismissed and I really don't want the mouse to move before then lest it accidentally clicks on dismissing dialog rather than plot. I could really use a Flash expert to help me determine the various states of the dialog while disappearing to help with the proper pixel state check. At some point, I want to make use of PixelSearch to automate even more of the required offsets, including the hash of the delete dialog text.

What I HAVE added is a simple training function to allow the setting of the 4 needed mouse positions. You press "HOME" to initiate training, then follow the instructions:

1) Hover over multi tool and hit HOME -- ESC to skip

2) Hover over left-most plot and hit HOME -- ESC to skip

3) Hover over seed in Market dialog and hit HOME -- ESC to skip

4) Hover over Accept button in Delete dialog and hit HOME -- ESC to skip

If you can't have the widget dialog on the screen while you're performing these steps (for instance in Full Screen), just memorize them for now since you don't need to see anything to do them.

At some point, I need to add persistant storage (INI file) to save the last 4 positions so that you only need to set them once assuming you always have farmville on the same screen at the same screen position.

You can now also adjust the speed while clicking using the arrow keys: Up -1 Faster, Down +1 Slower, Left +5 Slower, Right -5 Faster.

You can find the script here: http://timehorse.pastebin.com/ffa8d488

I'll try to have the PPD working by the 15h so anyone wanting to buy into Sweet Seeds before they expire can use this to rack up the Exp for coin!

Jeffrey.

Edited by TimeHorse
Link to comment
Share on other sites

Also, check this out:

What I see:

Posted Image

What you would see:

Posted Image

Totally removes the need to expand your farm (till you max that out too ;D)

(Please read post above this one. I really need a way to change the size of the plow tool)

whats the code to make plots smaller?

B.T.W- ill post my scripts soon, i have a neighbor helper i have been using for about a month, and a plow plant delete that has been awesome for me, it works with the plots right next to your person (my guy is blocked in with posts) it works fully zoomed in, so that if the game errors it will hit the accept button and the screen refreshes and you will still have the same coords you set when you started because the plots are right there.

uhh only problem with PPD script is levels. itll work for when you get a level that includes you can now gift: or you can now plant:, but does not work for the levels that are past 40, that do not include gifts or seeds, if people could send me photos of their congratulations on a level that would be awesome ( and the publish/skip screen too ). thats pretty much the only problem.

one in a thousand chance my guy got stuck in the pick your seed screen but i will fix that later today if i have the chance, but i got midterms and sport.

but ya! to the people that have already posted on this forums, please send me an email if you want to test out my script ( will not send it to anyone who has not already posted ).

to anyone who wants to send me congratulation photos, please make sure that you have not zoomed in or out on your firefox to make your game smaller or not the original sizes :) thanks.

email me at: wetwlly@gmail.com

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...