guardianx Posted September 25, 2009 Posted September 25, 2009 (edited) tek nice program. nvm about the previous post. i read the manual and found out the hot key.. while using ur bot. i notice it have problem when pop up msg appeart such as lvling up and when u win some ribbon. other than that it is a great program.. one question in the delay what does 1 delay = to in real time? Edited September 25, 2009 by guardianx
tekproxy Posted September 26, 2009 Posted September 26, 2009 Thanks mate. Yeah I tried to put it all in the manual. You're right, it would be nice if it dealt with messages like that and I plan to put it in if enough people want it.
waxxed Posted September 26, 2009 Posted September 26, 2009 Thanks mate. Yeah I tried to put it all in the manual. You're right, it would be nice if it dealt with messages like that and I plan to put it in if enough people want it.mine checks for popup messages, ive just been lazy to add all the pop ups in
tekproxy Posted September 26, 2009 Posted September 26, 2009 Yeah, that's cool. I noticed that when I looked at your blog. I should really add it in, and I just got some great ideas on how. Maybe I'll work on it in the morning. Hurry up and finish yours so I can take a look at it.
neobilmem Posted September 26, 2009 Posted September 26, 2009 (edited) 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> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ; Define a few (global) variables $script_x = 0 $script_y = 0 $script_speed = 0 $script_size_columns = 20 $script_size_rows = 20 $script_running = 0 $order = 0 $harvest = 140 $delay = 2 $script_running = 0 $pause = 0 $offset1x = 0 $offset1y = 0 $offset2x = 0 $offset2y = 0 $direction = 0 ; Hotkeys HotKeySet ("z", "RunIt") HotKeySet ("x", "ReverseIT") HotKeySet ("{esc}", "exitScript") HotKeySet ("{space}", "pauseScript") HotKeySet("{1}", "set_position") HotKeySet("{2}", "start_script") HotKeySet("{3}", "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 func defaultvalues() $offset1x = 15 $offset1y = 53 $offset2x = 4 $offset2y = 2 EndFunc defaultvalues() $window_main = GUICreate("Farmville ® ", 300, 365) $graphic_background = GUICtrlCreateGraphic(0, 0, 200, 165) GUICtrlSetState($graphic_background, $GUI_DISABLE) GUICtrlCreateGroup("Ağaçlar ve Hayvanlar için", 5, 180, 145, 120) ; defines offset, Tweak these if you constantly miss trees/chickens GUICtrlCreateLabel("Offset 1 X:", 15, 219) GUICtrlCreateLabel("Offset 1 Y:", 15, 239) GUICtrlCreateLabel("Offset 2 X:", 15, 259) GUICtrlCreateLabel("Offset 2 Y:", 15, 279) GUICtrlCreateLabel("Küçük Ayarlar Buradan Yapılır", 7, 195) $offset1xu = GUICtrlCreateInput($offset1x, 70, 215, 70, 20, $ES_CENTER) $updown_speedx1 = GUICtrlCreateUpdown($offset1xu) $offset1yu = GUICtrlCreateInput($offset1y, 70, 235, 70, 20, $ES_CENTER) $updown_speedy1 = GUICtrlCreateUpdown($offset1yu) $offset2xu = GUICtrlCreateInput($offset2x, 70, 255, 70, 20, $ES_CENTER) $updown_speedx2 = GUICtrlCreateUpdown($offset2xu) $offset2yu = GUICtrlCreateInput($offset2y, 70, 275, 70, 20, $ES_CENTER) $updown_speedy2 = GUICtrlCreateUpdown($offset2yu) GUICtrlCreateGroup("Koordinatlar", 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("Yardım", 15, 95, 75, 45) $button_start = GUICtrlCreateButton("Başlat",210,15,75,45) GUICtrlCreateGroup("Büyüklük", 90, 5, 105, 61) GUICtrlCreateLabel("Sütun :", 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("Sıra :", 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 Hızı", 110, 75, 85, 85) $input_speed = GUICtrlCreateInput($script_speed, 125, 95, 50, 20, $ES_CENTER) $updown_speed = GUICtrlCreateUpdown($input_speed) GUICtrlSetLimit($updown_speed, 3000, 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("Yardım", 300, 250, -1, -1, -1, 0, $window_main) GUICtrlCreateLabel("1 - Yeri Belirle", 10, 5) GUICtrlCreateLabel("2 - Başlat", 10, 25) GUICtrlCreateLabel("3 - Durdur", 10, 45) GUICtrlCreateLabel("Z - Sola Doğru (Ağaç ve Hayvanlar için)" , 10, 65) GUICtrlCreateLabel("X - Sağa Doğru (Ağaç ve Hayvanlar için)",10,85) GUICtrlCreateLabel("ESC - Kapat" , 10 , 105) GUICtrlCreateLabel("SPACE - Script Duraklat",10,125) GUICtrlCreateLabel("Yardım ", 10, 145) GUISetState(@SW_SHOW, $window_main) $window_start = GUICreate("Başlat", 190, 65, -1, -1, -1, 0, $window_main) GUICtrlCreateLabel("Hayırdır? :)", 10 ,5) 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_start Then GUISetState(@SW_HIDE, $window_start) EndIf Case $gui_msg[0] = $button_start GUISetState(@SW_SHOW, $window_start) EndSelect 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 pauseScript() if $pause = 1 then $pause = 0 $harvest = 140 Harvest() else $pause = 1 $harvest = 0 endif EndFunc Func exitScript() Exit EndFunc Func RunIt() $direction = 0 ;$pause = 0 Harvest() EndFunc Func ReverseIt() $direction = 1 ;$pause = 0 Harvest() EndFunc Func Harvest() $i = 0 $startPos = MouseGetPos() if $pause = 1 Then $harvest = 0 endif While $i < $harvest $i = $i + 1 $startPos = MouseGetPos() $pos = MouseGetPos() MouseClick("left") if $direction = 0 Then MouseClick("left",$pos[0]+$offset1x, $pos[1]+$offset1y, 1, 2) Mousemove($startPos[0],$startPos[1], 1) MouseMove($pos[0]-$offset2x,$pos[1]-$offset2y, 1) Elseif $direction = 1 Then MouseClick("left",$pos[0]+$offset1x, $pos[1]+$offset1y, 1, 2) Mousemove($startPos[0],$startPos[1], 1) MouseMove($pos[0]+$offset2x,$pos[1]-$offset2y, 1) endif wend EndFunc 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 $order = 0 Then $current_x = $current_x + 25 $current_y = $current_y - 12 Else $current_x = $current_x - 25 $current_y = $current_y + 12 EndIf If Not $script_running Then ExitLoop Next If $order = 0 Then $order = 1 $current_x = $current_x - 25 $current_y = $current_y + 12 else $order = 0 $current_x = $current_x + 25 $current_y = $current_y - 12 EndIf ; 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() $order = 0 EndFunc I am trying to develop newer Farmville bot script helps you in you? codes you got from the forum. I want to ask do I want to delete this hand tool and plow tool How do I add the code? Edited September 26, 2009 by neobilmem
JohannesM Posted September 26, 2009 Posted September 26, 2009 Here is a farmville bot I've been working on. Hopefully a few people can make use of it:http://mantis.sytes.net/~tekproxy/teksFVBot/Here are some features:Of course, can click everywhere on your farm to harvest / plow / plantCan even farm tree linesCan check for menus in the way or if your cursor has a sickle present (so it knows it's going to harvest)Hotkeys make starting and stopping easyOption to lock the mouse while running so you don't screw anything upWorks well with different resolutions, and if it doesn't, the offsets are configurableSupport for saving settings into multiple profilesAlmost everything is configurableIf you have any suggestions please let me know. I have a few ideas but I don't want to put in the effort if I'm the only one using it. :-DDo you have any other options to get the script code? - Johannes M.
error406 Posted September 26, 2009 Posted September 26, 2009 (edited) Here is a farmville bot I've been working on. Hopefully a few people can make use of it:http://mantis.sytes.net/~tekproxy/teksFVBot/If you have any suggestions please let me know. I have a few ideas but I don't want to put in the effort if I'm the only one using it. :-DHey tekproxy.Thanks for the program. i have use your bot in the last days since you post it and got some questions:i dont understand how can you exclude the center square (with the guy trapped in) or other squars with building or decoration from been clicked. the bot just click the guy and you get the male/female popup. if anyone here can explain it to me that will be great i play farmville just to complete the ribbons and to get the last level fast as i can. to do that i use all the farm squares to harvest/plow/plant (complete "cream of the crop" ribbon) and one edge for cherry trees and the other edge for chickens (to complete the "knock on the wood" and "zoologist" ribbons).when i try to use the bot at the trees in the edge i find that its not completely harvest all the trees. i have in this edge 2 lines of trees (to save space) it just harvest some of the trees in the line.also i was needed to remove the "check for sickle before harvesting" coz with this box checked its not havrest nothing its just click on all the trees.here is some picture of my farm to show that strategy:two lines of trees: http://i37.tinypic.com/2wn8sgl.jpgtwo lines of chickens: http://i34.tinypic.com/2502x68.jpgcomplete view: http://i33.tinypic.com/33eu23d.jpgtry to put just one line trees and othere line for chickens: http://i38.tinypic.com/fnr8lc.jpghow can i set the bot to harvest all the trees in the line/lines? okey, here are some suggestions (for u and for anyone that make us a framville bot:)if u can do the harvest/plow/plant complete automat. so that ppl will set the bot to choose what to plant from the shop with numbers (screen 1,2,3,4,5) and the seeds thay want to plant (seed 1,2,3,4,5,6,7,8) like now we got 5 diffrent screens in the shop and each screen has 8 diffrent seeds (to plant strawberry you set screen number 1, seed number 1; for blackberry screen 4 seed 2) this way when the shop have new plant/seeds all the setting will still suitable. the same we can set the bot for the time its take to harvest what we plant. (4 for 4 houres, 24 for 1 day etc..) and we got this complete automat.if u can plz do a auto/manual "pause" so when thing are screwed up you can continue from the last position (and not to set the home square again and again) also sometimes the server is startup (or "server out of sync") and when it dose the bot will start over go to fullscreen, max zoomout and continue what its did b4. bot can publish anything (lost animals, or any popups ribbons, levels, etc..)some members here say about "good samaritan" ribbon, that will do great! auto help neighbors while waiting for the crop.also the soybean xp greed (form the most bottom square?) will be great improve.ok thats all i think. if you do just some of this things that will be so great =]thank you very much for what you do and for make our life easy Cheers! Edited September 26, 2009 by error406
tekproxy Posted September 27, 2009 Posted September 27, 2009 JohannesM:Options other than the SVN? No. Is that what you're asking for? If so, I'll put it on the website now.erro406:Center Square - Yeah, an option to exclude the center square would be a good addition. Right now if you just pick the top most part of the home tile, it usually doesn't click you.Multiple tree rows - I think most people have 1 row, right? Is two really worth it? It's not 100% on with accuracy but since it seems a couple people are using it, I'll work on it and see what I can do. Sometimes you can play with the home location to get more trees. I do my girlfriend's trees in 2-4 tries. I'll make it work with 1 row first and then see about multiple. It shouldn't be too hard.Advanced features - More complete farmville automation will almost certainly require a lot in the way of clicking annoying windows away, which would mean hunting down a lot of offsets. I'm more than willing to do that if enough people use the bot, but right now it works 80% well and only took 30% effort to make it happen. What is the soybean xp greed thing? I haven't heard of that.Thanks for all of your ideas and suggestions.
Skrip Posted September 27, 2009 Posted September 27, 2009 (edited) Okay, I was successful in changing the game config file to this one: http://www.freewebs.com/phoenix159/gameSettings.xml, but after loading my config - the game would stop loading before I could even get in :/I also tried http:\/\/www.freewebs.com\/phoenix159\/gameSettings.xml, but it failed :/Here is the packet I'm modifyingexpandcollapse popup<html> <head> <link rel="stylesheet" type="text/css" href="http://facebook2.farmville.static.zynga.com/current/css/reset.css" /> <link rel="stylesheet" type="text/css" href="http://facebook2.farmville.static.zynga.com/current/css/main.css" /> </head> <body> <script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> <script type="text/javascript" src="http://facebook2.farmville.static.zynga.com/current/js/swfobject/swfobject.js"></script> <script type="text/javascript" src="http://facebook2.farmville.static.zynga.com/current/js/global.js"></script> <script type="text/javascript"> var flashVars = {"type":"","fb_sig_in_iframe":"1","fb_sig_locale":"en_US","fb_sig_in_new_facebook":"1","fb_sig_time":"1254026718.0075","fb_sig_added":"1","fb_sig_profile_update_time":"1250134068","fb_sig_expires":"1254114000","fb_sig_user":"1483867184","fb_sig_session_key":"2.hPlN9HQO_pVBEFcX_Ehjjg__.86400.1254114000-1483867184","fb_sig_ss":"2GL_QKix11CokXkx_nHvmQ__","fb_sig_ext_perms":"auto_publish_recent_activity","fb_sig_api_key":"80c6ec6628efd9a465dd223190a65bbc","fb_sig_app_id":"102452128776","fb_sig":"254b5bb3cd40b077f88fdd65b1fdf1e6","app_url":"http:\/\/fb-0.farmville.zynga.com\/current\/","sn_app_url":"http:\/\/apps.facebook.com\/onthefarm\/","asset_url":"http:\/\/facebook.farmville.static.zynga.com\/v5321\/","swfLocation":"http:\/\/facebook.farmville.static.zynga.com\/embeds\/FarmGame.5321.swf","game_config_url":"http:\/\/www.freewebs.com\/phoenix159\/gameSettings.xml"","localization_url":"http:\/\/facebook2.farmville.static.zynga.com\/current\/v5321\/flashLocaleXml.xml","flashRevision":"5321"} var params = { allowScriptAccess: "always", wmode: "opaque", allowFullScreen: "true" }; var attrs = { id: "flashapp",name: "flashapp" }; // load the flash movie. swfobject.embedSWF("http://facebook.farmville.static.zynga.com/embeds/FV_LoadBar.swf", "flashContent", "760", "594", "9.0.0", "playerProductInstall.swf", flashVars, params, attrs); </script> <div style="width:760px;height:594px;"> <div id="flashOuterContainer"> <div id="flashContent"> <span style="font-size: 19px; font-family: tahoma; color: #4880d7;padding-bottom: 10px;">Loading Game...</span><br/> <span style="font-size: 16px; font-family: tahoma;">If your game does not load within 10 seconds, you may need to upgrade your version of Flash. Please do so by clicking <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BUIGP">here</a></span> </div> </div> </div> <div id="rypixel"></div> <script type="text/javascript"> function rockyouPixel() { var pixel = '<img src="http://rya.rockyou.com/ams/dot.php?d=zyngafarm"/>'; } /** Mouse wheel callback, forward events to flash */ function onmousewheel(event) { var delta = 0; if (!event) { event = window.event; } if (event.wheelDelta) { delta = event.wheelDelta / 120; if (window.opera) { delta = -delta; } } else if (event.detail) { delta = -event.detail * 3; } flashapp.onmousewheel(delta); // Keep page from scrolling cancelEvent(event); } addLoadEvent( function() { hookEvent('flashapp', 'mousewheel', onmousewheel); }); /** @return array Returns an array of app friend ids for the current user */ function getAppFriendIds() { return g_appFriendIds; } /** @return array Returns an array of friend data for the current user */ function getFriendData() { return g_friendData; } /** @return array Returns user info for the current user */ function getUserInfo() { return g_userInfo; } /** * Shows the feed dialog for the user * * @param integer bundleId id of the bundle to display template * @param integer bundleData Data to display in the bundle * @param array targetId Array of ids to publish story to * @param string bodyGeneral Associated text for stories */ function showFeedDialog(bundleId, bundleData,targetId,bodyGeneral) { FB.ensureInit(function() { var result=FB.Connect.showFeedDialog(bundleId,bundleData,null,null,null,FB.RequireConnect.require,onFeedClosed,null,null); //document.getElementById('flashapp').style.height='0px'; if(result) { flashapp.logShowFeedDialog(); flashapp.disableAllInput(); } }); } /** Callback for when the feed dialog has closed */ function onFeedClosed() { //document.getElementById('flashapp').style.height='594'; flashapp.enableAllInput(); flashapp.logCloseFeedDialog(); } /** * Show permissions dialog for the user */ function showStreamPermissions() { FB.ensureInit(function() { FB.Connect.showPermissionDialog("publish_stream", onPermissionDialogClosed); }); } /** Callback for when the permissions dialog has closed */ function onPermissionDialogClosed() { //alert("perms window closed"); movie("flashContent").permissionDialogClosed(); } /** * Get a reference to the swf file * * @param string swf id of swf reference */ function movie(swf) { return document[swf]; } FB.init("80c6ec6628efd9a465dd223190a65bbc", "../xd_receiver.htm"); </script> test </body> </html> Edited September 27, 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]
error406 Posted September 27, 2009 Posted September 27, 2009 What is the soybean xp greed thing? I haven't heard of that.Hi tekproxy,i think ppl here was tallking about that but anyway..to get fast leveling up i buy exp points. you can buy 1 exp point for 10 coins (2exp from soybean and one from plowing) use with the procedure of plow-plant-delete thats call "power leveling"now im using ac-tool with coordination to auto the mouse movment but since ac-tool not work that perfect i thinks that if the bot will have this extra option it willl be nice. also i find that with ac-tool the most bottom square is the easiest to choose for save time.so what we need is just to set up how many times the loop will run the delete-plow-plant thing...and if we can choose lets say the most bottom square and the two square above it that will save us more time.also will be nice if you can see how meny points you will get if u run it 'number' of times.Thanks for your replay Greeting,error406
djdodo Posted September 28, 2009 Posted September 28, 2009 I can´play in Fullscreen cause my IE or Firefox hangs up... But I´m using the Autobot for Farming, the rest I want to do myself... except: The damn Neighbor helping. Does anyone have a script for helping neighbors? Tried myself but couldn´t get it working. I tried helping through the bottom line when in game-> Click-> Help/Visit -> Click the next etc. All the Popups "Will u try to help me" open in background, you can click the one by one, get money and exp but the Good Samaritan Counter does not increase. So I need a script: While true Go to Neighbors Page when exist "Go to XY farm" -> click else Send "F5" Click Accept 2x Go to Neighbors page
djdodo Posted September 28, 2009 Posted September 28, 2009 to get fast leveling up i buy exp points. you can buy 1 exp point for 10 coins (2exp from soybean and one from plowing) Plowing Cost 15 coins.How do you get to 10?
djdodo Posted September 28, 2009 Posted September 28, 2009 [edit] How Do I read the text under my mouse? e.g. $mousetext=http://apps.facebook.com/onthefarm/index.php?mission=crows&friendId=xxxxxxxxxxxxxxxxxx if strinstr($mousetext,"http://apps.facebook.com/onthefarm/index.php?mission=") Then Click [/edit]
Sn0opy Posted September 28, 2009 Posted September 28, 2009 [edit] How Do I read the text under my mouse? e.g. $mousetext=http://apps.facebook.com/onthefarm/index.php?mission=crows&friendId=xxxxxxxxxxxxxxxxxx if strinstr($mousetext,"http://apps.facebook.com/onthefarm/index.php?mission=") Then Click [/edit] You can't. But you can search for different pixels on that button.
error406 Posted September 28, 2009 Posted September 28, 2009 (edited) Plowing Cost 15 coins.How do you get to 10?like i say b4 Plowing cost 15 coins = 1exp pointSoybean cost 15 coins = 2exp pointsdelete plot cost 015+15 = 30 = 3 exp pointsthats it djdodo Edited September 28, 2009 by error406
JohannesM Posted September 29, 2009 Posted September 29, 2009 (edited) I can´play in Fullscreen cause my IE or Firefox hangs up... But I´m using the Autobot for Farming, the rest I want to do myself... except: The damn Neighbor helping. Does anyone have a script for helping neighbors? Tried myself but couldn´t get it working. I tried helping through the bottom line when in game-> Click-> Help/Visit -> Click the next etc. All the Popups "Will u try to help me" open in background, you can click the one by one, get money and exp but the Good Samaritan Counter does not increase. So I need a script: While true Go to Neighbors Page when exist "Go to XY farm" -> click else Send "F5" Click Accept 2x Go to Neighbors page Hi, here's my function in my script for the neighbors. Not perfect yet, but it will later. It works in fullscreen only! expandcollapse popupFunc visitNeighbors() MouseClick("primary", 720, 745) ; set the Neighbor "stripe" to the right $startX = 685 $startY = 750 $intN = 0 MouseClick("primary", 770, 635, 3) ; zoom in, to decrase the load time While PixelGetColor($startX, $startY) = 1288350 MouseClick("primary", $startX, $startY) ; click on Neigbor Sleep(1000) MouseClick("primary", $startX +25, $startY - 30) ; click on visit ConsoleWrite("[i] Farm Nr. " & $intN & @CRLF) MouseMove(500, 380) ; check the loading box Do sleep(100) Until PixelGetColor(500, 380) = 16776677 ; wait until the load box is present $intSleep = 2000 ; wait minimum 2 Seconds while PixelGetColor(500, 380) = 16776677 ; while loading box present Sleep(100) $intSleep = $intSleep + 200 ConsoleWrite(".") WEnd ConsoleWrite(@CRLF & "[~] sleeping... (" & $intSleep & " (" & $intSleep / 1000 & " Sec.))" & @CRLF) Sleep($intSleep) ; sleep MouseMove(252, 258) ; go to the coordinations of the accept button Sleep(1000) if PixelGetColor(252, 258) = 3262016 Then ; if there's an accept button ConsoleWrite("[i] Farm needs Help" & @CRLF) MouseClick("primary", 300, 260, 2) ; click on Accept EndIf ConsoleWrite("[i] next Farm" & @CRLF) if $intN = 7 Then MouseClick("primary", 150, 715) $intN = 0 $startX = 685 $startY = 750 Else ; end of the row, get the next page $intN +=1 $startX -= 66 EndIf WEnd MouseClick("primary", 815, 600) ; go home EndFunc - Johannes M. Edited September 29, 2009 by JohannesM
djdodo Posted September 29, 2009 Posted September 29, 2009 @JohannesM: Ich denke mal, Du sprichst Deutsch.... Skript läuft nicht wirklich. Ich starte es auf der "Play" Seite, richtig? Maus fährt von links unten nach rechts oben, es passiert aber nichts....
djdodo Posted September 29, 2009 Posted September 29, 2009 @JohannesM:Ich denke mal, Du sprichst Deutsch....Skript läuft nicht wirklich.Ich starte es auf der "Play" Seite, richtig?Maus fährt von links unten nach rechts oben, es passiert aber nichts....Nope. In Fullscreen it moves to the middle of the screen, one up and one right.Which resolution do you use?
JohannesM Posted September 29, 2009 Posted September 29, 2009 @JohannesM:Ich denke mal, Du sprichst Deutsch....Skript läuft nicht wirklich.Ich starte es auf der "Play" Seite, richtig?Maus fährt von links unten nach rechts oben, es passiert aber nichts....Ja deutsch, moecht aber fair bleiben und english kommunizieren.Okay, the resolution must be 1024 x 768. As I said, it's not perfect yet. - Jo
Sn0opy Posted September 29, 2009 Posted September 29, 2009 (edited) What about using this small snippet to find the embedded Farmville window?Func findMyFarm() $searchFor = 0x43A143 ;green color beside your farm. Even in the top left corner $coords = PixelSearch(0,0, @DesktopWidth, @DesktopHeight, $searchFor) if $coords <> 0 Then MsgBox(0, "gefunden!", $coords[0] & "," & $coords[1]) EndIf EndFuncThat would fix the resolution problem, because the Farmville window will even have the same size -> 757x594px (except in fullscreen) Edited September 29, 2009 by Sn0opy
Recommended Posts