wetwlly Posted October 13, 2009 Posted October 13, 2009 expandcollapse popup<item name="jackolanterns" type="decoration" subtype="decor_misc" giftable="false" buyable="false" code="X5"> <limitedStart>10/22/2009</limitedStart> <limitedEnd>10/29/2009</limitedEnd> <requiredLevel>1</requiredLevel> <cost>4000</cost> <sizeX>2</sizeX> <sizeY>2</sizeY> <image name="static" url="assets/decorations/spooky_jackolanterns.swf" loadClass="1"/> <image name="icon" url="assets/decorations/spooky_jackolanterns_icon.png"/> </item> − <item name="jackocat" type="decoration" subtype="decor_misc" giftable="false" buyable="false" code="X6"> <limitedStart>10/29/2009</limitedStart> <limitedEnd>11/02/2009</limitedEnd> <requiredLevel>1</requiredLevel> <cost>4000</cost> <sizeX>2</sizeX> <sizeY>2</sizeY> <image name="static" url="assets/decorations/spooky_jackocat.swf" loadClass="mc"/> <image name="icon" url="assets/decorations/spooky_jackocat_icon.png"/> </item> − <item name="spookyspiderweb" type="decoration" subtype="decor_misc" giftable="false" buyable="false" code="X7"> <limitedStart>10/22/2009</limitedStart> <limitedEnd>10/29/2009</limitedEnd> <requiredLevel>1</requiredLevel> <cost>4000</cost> <sizeX>5</sizeX> <sizeY>1</sizeY> <image name="static" url="assets/decorations/spooky_decos_static.swf" loadClass="1"/> <image name="icon" url="assets/decorations/spooky_spiderweb_icon.png"/> </item> − <item name="spookyironfence" type="decoration" subtype="decor_misc" giftable="false" buyable="false" multiplace="true" className="RotateableDecoration" code="X4"> <limitedStart>10/15/2009</limitedStart> <limitedEnd>10/22/2009</limitedEnd> <requiredLevel>14</requiredLevel> <cost>600</cost> <sizeX>5</sizeX> <sizeY>1</sizeY> − <collision> <r>O###O</r> </collision> <image name="horizontal" url="assets/decorations/spooky_ironfence.swf" loadClass="1"/> <image name="vertical" url="assets/decorations/spooky_ironfence.swf" loadClass="1"/> <image name="icon" url="assets/decorations/spooky_ironfence_icon.png"/> </item> − <item name="spookyironarch" type="decoration" subtype="decor_misc" giftable="false" buyable="false" multiplace="true" className="MaskedDecoration" code="X3"> <limitedStart>10/15/2009</limitedStart> <limitedEnd>10/22/2009</limitedEnd> <requiredLevel>14</requiredLevel> <cost>600</cost> <sizeX>5</sizeX> <sizeY>1</sizeY> − <collision> <r>OHHHO</r> </collision> <numParts>2</numParts> − <partSizes> <x>1 1</x> <y>1 1</y> <z>1 1</z> </partSizes> − <partDisplacements> <x>0 4</x> <y>0 0</y> <z>0 0</z> </partDisplacements> <image name="horizontal" url="assets/decorations/spooky_ironarch.swf" loadClass="1"/> <image name="vertical" url="assets/decorations/spooky_ironarch.swf" loadClass="1"/> <image name="horizontal_mask_part_1" url="assets/spooky_ironarch.swf" loadClass="1"/> <image name="vertical_mask_part_1" url="assets/decorations/spooky_ironarch.swf" loadClass="1"/> <image name="icon" url="assets/decorations/spooky_ironarch_icon.png"/> </item> couple new items coming soon ( 2 days for the fence and arch) spooky iron fence : 15th spooky iron arch : 15th jack-o-cat : 29th jack-o-lantern : 22nd spooky spider webs : 22nd also something from zynga! haha there TODO: on an achievement? TODO: Reenable this once we figure out how to get around moratorium <achievement name="picturefarm" code="A011"> <level count="3" xp="10" coins="500" /> <level count="10" xp="20" coins="1000" /> <level count="30" xp="50" coins="2500" /> <level count="50" xp="100" coins="5000" /> <image name="icon_48" url="assets/achievements/48x48/Camera_farms_icon.png" /> <image name="icon_100" url="assets/achievements/100x100/Camera_farms_icon_100.png" /> <image name="icon_130" url="assets/achievements/130x130/Camera_farms_icon_130.png" /> </achievement>
TimeHorse Posted October 13, 2009 Posted October 13, 2009 http://timehorse.pastebin.com/f7640767a This adds a combo box that allows you set 1 of 3 directions of clicking: North-East is the original order, always clicking rows in a North-Easterly direction North-East then South-West is a zig-zag pattern where the first row is North-Eastward, the second South-Westward and so on Eastward South then North is a straght Easterly movement, always toward the right, zig-zagging up then down the screen in a diamond pattern. Yes, I know this really isn't important to the widget but I still can't figure out how to solve the dialog dismissal problem so I thought I'd add a feature I thought I could complete. Jeffrey.
TimeHorse Posted October 13, 2009 Posted October 13, 2009 also something from zynga! haha there TODO: on an achievement? TODO: Reenable this once we figure out how to get around moratorium <achievement name="picturefarm" code="A011"> <level count="3" xp="10" coins="500" /> <level count="10" xp="20" coins="1000" /> <level count="30" xp="50" coins="2500" /> <level count="50" xp="100" coins="5000" /> <image name="icon_48" url="assets/achievements/48x48/Camera_farms_icon.png" /> <image name="icon_100" url="assets/achievements/100x100/Camera_farms_icon_100.png" /> <image name="icon_130" url="assets/achievements/130x130/Camera_farms_icon_130.png" /> </achievement>Yeah, I noticed that! I wonder who called the moratorium anyway. They literally pulled that the DAY I was going for it as I have a tonne of Farmville friends whose farms I could visit but never got a chance before the ribbon disappeared.Jeffrey.
Skrip Posted October 13, 2009 Posted October 13, 2009 (edited) Here's how to make crops smaller: <item name="pineapples" type="seed" subtype="fruit" buyable="true" mastery="true" code="PN"> <requiredLevel>15</requiredLevel> <cost>95</cost> <growTime>2</growTime> <plantXp>2</plantXp> <coinYield>242</coinYield> <sizeX>1</sizeX> <sizeY>1</sizeY> <masteryYield>1</masteryYield> <masteryLevel count="425" xp="25" coins="500" /> <masteryLevel count="750" xp="75" coins="1500" /> <masteryLevel count="1300" xp="250" coins="5000" gift="masterpineapple" /> <largeCropXp>4</largeCropXp> <largeCropChance>0.1</largeCropChance> <image name="seeds" url="assets/crops/crop_pineapple.swf" loadClass="1" /> <image name="growing1" url="assets/crops/crop_pineapple.swf" loadClass="1" /> <image name="growing2" url="assets/crops/crop_pineapple.swf" loadClass="1" /> <image name="grown" url="assets/crops/crop_pineapple.swf" loadClass="1" /> <image name="super" url="assets/crops/crop_pineapple.swf" loadClass="1" /> <image name="withered" url="assets/crops/crop_pineapple.swf" loadClass="1" /> <image name="icon" url="assets/crops/crop_pineapple_icon.png" /> </item>Just change the red on each plant, and inject config. Edited October 13, 2009 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]
f00 Posted October 13, 2009 Posted October 13, 2009 Also, check this out:What I see:What you would see: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)thanks for the fiddler idea!...I really need a way to change the size of the plow tool...modified FarmGame.5802 click hereuse it with fiddler: regex:(?insx)^http://.*FarmGame\.5802\.swfplow anywhere you want...(i managed to disable the collisioncontrol function...) ;-)“If I had six hours to chop down a tree, I’d spend the first four of them sharpening my axe”. -- Abraham Lincoln
Skrip Posted October 13, 2009 Posted October 13, 2009 (edited) thanks for the fiddler idea!...I really need a way to change the size of the plow tool...modified FarmGame.5802 click hereuse it with fiddler: regex:(?insx)^http://.*FarmGame\.5802\.swfplow anywhere you want...(i managed to disable the collisioncontrol function...) ;-)“If I had six hours to chop down a tree, I’d spend the first four of them sharpening my axe”. -- Abraham LincolnThanks alot. What lines contain the collision detection?EDIT: My bad. I read that wrong. Can I ask how you disabled it? Edited October 13, 2009 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]
f00 Posted October 14, 2009 Posted October 14, 2009 (edited) Thanks alot. What lines contain the collision detection?EDIT: My bad. I read that wrong. Can I ask how you disabled it?i modified some vars with a bytecode editor (i've never done this before), a lot of trial and error...the only thing i know is, that there are two (x,y) int vars for creating a vector (for plowmask or something like that)and their value has to be 4... so i searched, found and changed it to 1 ... and tadah... it worked. i think the complete loss of collision detection is a side effect,because i just tried to shrink the plow area Edited October 14, 2009 by f00
Skrip Posted October 14, 2009 Posted October 14, 2009 i modified some vars with a bytecode editor (i've never done this before), a lot of trial and error...the only thing i know is, that there are two (x,y) int vars for creating a vector (for plowmask or something like that)and their value has to be 4... so i searched, found and changed it to 1 ... and tadah... it worked. That's awesome man. Do you know what address and offset the byte was at? [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]
Skrip Posted October 14, 2009 Posted October 14, 2009 server rejects the swf file.Not for me. Refresh a couple times. [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]
wetwlly Posted October 14, 2009 Posted October 14, 2009 Not for me. Refresh a couple times.http://facebook2.farmville.static.zynga.com/current/v5854/gameSettings.xmlthis might be why. new version. does that change it?
Skrip Posted October 14, 2009 Posted October 14, 2009 http://facebook2.farmville.static.zynga.com/current/v5854/gameSettings.xmlthis might be why. new version. does that change it?Nah, just update the autoresponse to work with it. I am using it right now. It works still. [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]
wetwlly Posted October 14, 2009 Posted October 14, 2009 (edited) Nah, just update the autoresponse to work with it. I am using it right now. It works still.i got it working so epic hahaEDIT:something that just blew my mind.if we can do this collision detection stuff, you think we can figure out a way to just make it one click tree = harvest? same with animals? Edited October 14, 2009 by wetwlly
Dontpanicplz Posted October 15, 2009 Posted October 15, 2009 hey, im new here so cool the things you guys found out got everything working so far except for the plowong when you have the smaller plots cani change the plow size of the tool too or how to i get the small plots next eachother they are all spread out atm thx in advance grtz dpp,
wetwlly Posted October 15, 2009 Posted October 15, 2009 dont worry about making the plow tool size smaller just get the thing above the modded swf and you can overlap them and its the same thing
Proky Posted October 15, 2009 Posted October 15, 2009 (edited) 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 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. Hy all, sry for my English... How work this program? Install AutoIt, run script: http://timehorse.pastebin.com/ffa8d488 ( 1. #cs ---------------------------------------------------------------------------- 748. WEnd 749. EndFunc) save as f7640767a.au3 run, not work... #cs ---------------------------------------------------------------------------- This wtf?: AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. EDIT: sry, win7 ie 8 (32/64 bit, firefox) not work Edited October 15, 2009 by Proky
wetwlly Posted October 15, 2009 Posted October 15, 2009 expandcollapse popupFunc plow() $current_x = $script_x $current_y = $script_y ; Some (local) variables For $current_row = 1 To $script_size_rows Step 1 For $current_column = 1 To $script_size_columns Step 1 For $iWidth = $current_x To $current_x + 15 For $iHeigth = $current_y To $current_y + 15 If PixelGetColor($iWidth, $iHeigth) = 0x6A560F Then MouseClick("primary", $iWidth, $iHeigth, 1, 2) $current_x = $current_x + 25 $current_y = $current_y - 12 level() level2() publish() EndIf $current_x = $current_x + 25 $current_y = $current_y - 12 If Not $script_running Then ExitLoop Next If Not $script_running Then ExitLoop Next 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 EndFunc Okay so. I'm trying to find out how to make it search for a pixel in a location (pixel search doesnt work well for direct plot finding stuff) so far all i can figure out that this does is skips over this whole function. anyone help me out? im trying to make it so when i plow land, if plants had withered and already plowed the land over, to SKIP over it.
TimeHorse Posted October 15, 2009 Posted October 15, 2009 http://timehorse.pastebin.com/f7d2a3b25 The latest version adds better grass detection and now has a repeat playback mode for there actions: Plow-Plant-Delete, Plow-Plant-Wither and Reap-Plow-Plant (as in Harvest and Replant). Please note the value of $zoom will not work unless you use Fiddler to change: defaultZoom="0.33" If you're not using Fiddler, I recommend zooming all the way out and setting $zoom=0.5 or if you want to play in the default view (all the way zoomed in), set $zoom=2.0 Still missing: 1) Safe delete by examining a hash of the accept dialog for a match of the desired crop. 2) Measuring the dialogs so that an exact outline and spacing can be calculated and searched for in other words eliminating the need for training where anything but the initial eastmost position is 3) FIND SCREEN CAPS OF ALL IMAGES OF CLOSING DIALOGS since my script often fails because it either a) clicks when the closing dialog is still over the desired region or can't properly detect when a dialog has popped up. Indeed, I added a fuzzy heuristic to how grass is detected to be within 1 standard deviation of the average pixel colour for grass but these should be an exact match and my theory is that what is happening is while the dialog is being dismissed it has an alpha channel that is slighly modifying the colour of the grass pixel as it passes over. 4) Related: find some way of getting proper dialog hashes in the face of "+Mastery", "-Coins", etc pop-ups that appear on top of dialogs. As for running on Windows 7 with IE or Firefox, I don't have Windows 7 but this script is pretty simple and is not much different from any other AutoIt clicker so I wonder if AutoIt clicker even works there. My guess is yes, but maybe a reboot is in order. I'm otherwised stumpped. Jeffrey.
wetwlly Posted October 15, 2009 Posted October 15, 2009 tried a bit of your script timehorse into mine to try and make mine skip over plowed land when plowing fallow land.. still no good atm. heres wat it looks like expandcollapse popupFunc plow() $current_x = $script_x $current_y = $script_y ; Some (local) variables For $current_row = 1 To $script_size_rows Step 1 For $current_column = 1 To $script_size_columns Step 1 $px = PixelGetColor($current_x, $current_y) If $px == $fallow_match Then MouseClick("primary", $current_x, $current_y, 1, 2) $current_x = $current_x + 25 $current_y = $current_y - 12 level() level2() publish() EndIf $current_x = $current_x + 25 $current_y = $current_y - 12 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 EndFunc
TimeHorse Posted October 15, 2009 Posted October 15, 2009 tried a bit of your script timehorse into mine to try and make mine skip over plowed land when plowing fallow land.. still no good atm. heres wat it looks like expandcollapse popupFunc plow() $current_x = $script_x $current_y = $script_y ; Some (local) variables For $current_row = 1 To $script_size_rows Step 1 For $current_column = 1 To $script_size_columns Step 1 $px = PixelGetColor($current_x, $current_y) If $px == $fallow_match Then MouseClick("primary", $current_x, $current_y, 1, 2) $current_x = $current_x + 25 $current_y = $current_y - 12 level() level2() publish() EndIf $current_x = $current_x + 25 $current_y = $current_y - 12 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 EndFunc Hi, Wetwlly! Well, that's nowhere near the latest version of my script -- in fact, it a bit more like the earliest version of it that I borrowed from someone else. The latest script is always posted in my pastebin account, in this case http://timehorse.pastebin.com/f7d2a3b25 but you don't need to work from there, but I will say that I do have a Plow-Plant-Wither mode in there since we can modify the day in the gameSettings.xml to 1 second making the repeated plowing and planting of soy really lucrative! Thanks again for that suggestion! Now, assuming you have exactly the right pixel colour, and as you were trying to find your location by exact pixel match and the pixels repeat, I'll assume that's the case, but here's the kicker: the mouse (carot) you see in the game is PART of the image. So when you capture a pixel, if it's under the shadow of the mouse, it is likely to pick up your plow's pixels rather than the land under it. That's why a North-Easterly motion is best as you're always clicking above the cursor. But, the loop you're using is the North-East loop so that should NOT be an issue. NE loops have the advantage over zig-zag loops that if an obstruction is in your acrage, when you click on it and pop the menu you won't accidentally click "sell" or "move" because your next click will be above it AND that menu won't be blocking your PixelSearch for the next cell either. Other than those two issues, I'm not sure what could be going wrong here. Your code is similar to my Grass detection code though I wrote Grass Detection to a) check for all 27 pixel colours associated with grass and look for pixels in the range of 1 StDev of the average colour and call those Grass as well. Since plowing does not get dialog interference I'm really drawing a blank, to be honest, but one last thing to consider is if you're running in full-screen, sometimes the game locks up. But even then, I've noticed that everything works out in the end since you can go on clicking and the clicks register they just don't appear on your screen. Hope that helps. Jeffrey.
Recommended Posts