linder
Members-
Posts
7 -
Joined
-
Last visited
linder's Achievements
Seeker (1/7)
0
Reputation
-
it wont be 40 lines if you know what your doing
-
why not make it easy for you and have 2 variables?
-
Updated after the change in market, soybeans changed from 5th to 4th place also put in so you can choose if you want to go with 1,2 or 3 squares for this Just to let you know, with 3 squares it takes aprox 19sec to plow, plant, delete with costs 90coins and you gain 9xp, that is 2 seconds per xp... Short explain on soybean deletemethod... Its the best exp/money in the game! (except architec ribbon) ... and it will give you 1xp/10coin I have gone from 15000xp to 45000xp in 3days using this method
-
Tried to edit my last posts but this forum doesnt let me to :/ I did manage to fix a "plow-plant-soybean-delete" script using Jackalo maincode (not much is like it was from the begining tho) And as I have never ever worked with scripting before. I couldnt figure out how to fix it for different resolutions etc so this only works for ppl with same resolution as me, 1280x800 ... And I also bet it doesnt work on farms smaller then 20x20, but cant see why that should be a problem as you arent supposed to use this method with a farm smaller than 20x20. ; This script require a 20x20 farm and a 1280 x 800 resolutin ; Includes #include <GUIConstantsEx.au3> #include <EditConstants.au3> ; Define a few (global) variables $script_speed = 30 $script_amount = 4 $script_running = 0 ; Hotkeys HotKeySet("{INSERT}", "start_script") HotKeySet("{DELETE}", "stop_script") ; Hotkey Functions 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("Beanbot", 100, 145) $graphic_background = GUICtrlCreateGraphic(0, 0, 200, 165) GUICtrlSetState($graphic_background, $GUI_DISABLE) GUICtrlCreateGroup("Amount", 10, 5, 85, 40) $input_amount = GUICtrlCreateInput($script_amount, 12, 18, 80, 20, $ES_CENTER) $updown_amount = GUICtrlCreateUpdown($input_amount) GUICtrlSetLimit($updown_amount, 20, 1) GUICtrlCreateGroup("Mouse Speed", 10, 50, 85, 40) $input_speed = GUICtrlCreateInput($script_speed, 12, 63, 80, 20, $ES_CENTER) $updown_speed = GUICtrlCreateUpdown($input_speed) GUICtrlSetLimit($updown_speed, 50, 1) GUICtrlCreateLabel("Insert = Start", 10, 100) GUICtrlCreateLabel("Delete = Stop", 10, 120) GUISetState(@SW_SHOW, $window_main) While 1 If $script_running Then $script_amount = GUICtrlRead($input_amount) 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 EndIf EndSelect Sleep(25) WEnd Func farm() For $current_amount = 1 To $script_amount Step 1 MouseClick("primary", 948, 707, 1, $script_speed) ;plow1 MouseClick("primary", 945, 648, 1, $script_speed) ;plow2 MouseClick("primary", 1112, 414, 1, $script_speed) ;last square MouseClick("primary", 940, 768, 1, $script_speed) ;market MouseClick("primary", 498, 596, 1, $script_speed) ;soybeans MouseClick("primary", 1112, 414, 1, $script_speed) ;last square MouseClick("primary", 997, 707, 1, $script_speed) ;delete MouseClick("primary", 1112, 414, 1, $script_speed) ;last square If Not $script_running Then ExitLoop ;this is before delete accept just for safety MouseClick("primary", 569, 493, 1, $script_speed) ;delete accept Next ; Stop running now stop_script() EndFunc ____________________________________________________________________________________ And for you guys out there with the farmer in boxed up in middle / startposition This actually works (only tested on 20x20)... Just be sure that you set your position so high that you doesnt hit the head (or mainly the mohikan) of your farmer I just added 7 lines so all credit to Jackalo ;*** 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 $current_row = $script_size_rows / 2 Then If $current_column = $script_size_columns / 2 Then $current_x = $current_x + 25 $current_y = $current_y - 12 $current_column = $current_column + 1 EndIf EndIf 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
-
That was a good answer to why I cant edit the post... In my opinion you should be able to edit your posts as many times as you want and also being able to delete it
-
why couldnt i edit my last post more? If $current_row = $script_size_rows / 2 Then If $current_column = $script_size_columns / 2 Then $current_x = $current_x + 25 $current_y = $current_y - 12 EndIf EndIf Added this code worked for me It skipps the middle square where i have my farmer stucked
-
Where do you have your farmer trapped? I got my farmer trapped at the middle spot and with this script it presses my farmer and ill get upp the "female or male" popup I dont know how this script thing works but it cant be that hard to exclude the middlespot? And it would be lovely if someone made a script for soybeans-delete method... Just one spot would be enough and just loop it edit: 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 $current_row = $script_size_rows/2 Then If $current_column = (($script_size_clumns/2)+1) Then $current_x = $current_x + 25 $current_y = $current_y - 12 EndIf EndIf If Not $script_running Then ExitLoop Next I put this in and im gonna see if it works