The Wiki for Tale 6 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
Difference between revisions of "User:Anka/Macros/Grass Picker"
From ATITD6
Jump to navigationJump to search (Created page with "<pre> </pre>") |
|||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
+ | //Grass Picker | ||
+ | // | ||
+ | //This macro will pick grass and keep you in the same relative area. | ||
+ | //Alt Tab to stop. | ||
+ | //INSTRUCTIONS | ||
+ | // 1) Set your camera view to Cartographer (Double F8) and zoom all the way in. | ||
+ | // 2) Put your mouse pointer over pick grass button | ||
+ | // 3) Alt tab to ACTool (Don't move the mouse) Press F2 | ||
+ | // 4) Set Reps - (Wanted grass/2) / (Number of grass you pick/click) | ||
+ | // 5) Set Resolution | ||
+ | // 6) Click Ok to Continue or Cancel to Stop the macro | ||
+ | Constants | ||
+ | Reps = 0 | ||
+ | XPos1 = 0 //Grass button X Coord | ||
+ | YPos1 = 0 //Grass button Y Coord | ||
+ | XPos2 = 900 //507 | ||
+ | YPos2 = 573 //394 | ||
+ | YPos3 = 573 //394 | ||
+ | LOffset = 250 | ||
+ | ROffset = 300 | ||
+ | screenx = 0 | ||
+ | MouseX = 0 | ||
+ | MouseY = 0 | ||
+ | NewX = 0 | ||
+ | Pick = 1100 //Pick delay - Time waited while avatar picks grass | ||
+ | MDelay = 550 //Mouse move delay, increase if having problems | ||
+ | End | ||
+ | |||
+ | SetConst XPos1 = {mousex} | ||
+ | SetConst YPos1 = {mousey} | ||
+ | setconst screenx = {sreenwidth} / 2 | ||
+ | |||
+ | Form Grass,(Wanted grass/2) / (# of grass you pick/click) | ||
+ | ed1=EditBox:Reps:1 | ||
+ | ed2=ComboBox:Resolution:1920x1080, 1380x768, 1280x1024, 1024x768 | ||
+ | end | ||
+ | |||
+ | Formload Grass, Grass.frm | ||
+ | if ShowForm Grass | ||
+ | //Do this if OK clicked | ||
+ | Set Reps = Grass[ed1] | ||
+ | else | ||
+ | //Do this if Cancel is clicked | ||
+ | Stop | ||
+ | end | ||
+ | Formsave Grass, Grass.frm | ||
+ | |||
+ | Keydown @{Tab} 100 | ||
+ | Delay 2000 | ||
+ | |||
+ | Call Resolution | ||
+ | |||
+ | Loop $Reps | ||
+ | Compute NewX = $XPos2 - $LOffset | ||
+ | If $CheckforLostFocus = 0 | ||
+ | Call MouseLeft | ||
+ | End | ||
+ | Compute NewX = $XPos2 + $ROffset | ||
+ | If $CheckforLostFocus = 0 | ||
+ | Call MouseRight | ||
+ | End | ||
+ | End | ||
+ | |||
+ | Procedure MouseLeft | ||
+ | //Left side | ||
+ | MousePos $NewX, $YPos3 | ||
+ | Delay $MDelay | ||
+ | LeftClick | ||
+ | Delay $Pick | ||
+ | |||
+ | //Grass button | ||
+ | MousePos $XPos1, $YPos1 | ||
+ | Delay $MDelay | ||
+ | LeftClick | ||
+ | Delay 1500 | ||
+ | End | ||
+ | |||
+ | Procedure MouseRight | ||
+ | //Right side | ||
+ | MousePos $NewX, $YPos2 | ||
+ | Delay $MDelay | ||
+ | LeftClick | ||
+ | Delay $Pick | ||
+ | |||
+ | //Grass button | ||
+ | MousePos $XPos1, $YPos1 | ||
+ | Delay $MDelay | ||
+ | LeftClick | ||
+ | Delay 1500 | ||
+ | End | ||
+ | |||
+ | Procedure Resolution | ||
+ | Case Grass[ed2] | ||
+ | When 1920x1080 | ||
+ | SetConst XPos2 = 900 | ||
+ | SetConst YPos2 = 573 | ||
+ | SetConst YPos3 = 573 | ||
+ | SetConst LOffset = 200 | ||
+ | SetConst ROffset = 300 | ||
+ | When 1380x768 | ||
+ | SetConst XPos2 = 507 | ||
+ | SetConst YPos2 = 394 | ||
+ | SetConst YPos3 = 394 | ||
+ | SetConst LOffset = 133 | ||
+ | SetConst ROffset = 233 | ||
+ | When 1280x1024 | ||
+ | |||
+ | When 1024x768 | ||
+ | |||
+ | End | ||
+ | End | ||
+ | |||
+ | Procedure Coords | ||
+ | Delay 5000 | ||
+ | Keys {mousex}, {mousey} | ||
+ | End | ||
+ | |||
+ | Function CheckforLostFocus | ||
+ | if {activewindow} contains eGenesis | ||
+ | Compute Result = 0 | ||
+ | Exit | ||
+ | Else | ||
+ | Stop | ||
+ | End | ||
+ | End | ||
+ | //Written with AC Tool 4.6.2 by Anka | ||
</pre> | </pre> |
Latest revision as of 20:01, 2 January 2012
//Grass Picker // //This macro will pick grass and keep you in the same relative area. //Alt Tab to stop. //INSTRUCTIONS // 1) Set your camera view to Cartographer (Double F8) and zoom all the way in. // 2) Put your mouse pointer over pick grass button // 3) Alt tab to ACTool (Don't move the mouse) Press F2 // 4) Set Reps - (Wanted grass/2) / (Number of grass you pick/click) // 5) Set Resolution // 6) Click Ok to Continue or Cancel to Stop the macro Constants Reps = 0 XPos1 = 0 //Grass button X Coord YPos1 = 0 //Grass button Y Coord XPos2 = 900 //507 YPos2 = 573 //394 YPos3 = 573 //394 LOffset = 250 ROffset = 300 screenx = 0 MouseX = 0 MouseY = 0 NewX = 0 Pick = 1100 //Pick delay - Time waited while avatar picks grass MDelay = 550 //Mouse move delay, increase if having problems End SetConst XPos1 = {mousex} SetConst YPos1 = {mousey} setconst screenx = {sreenwidth} / 2 Form Grass,(Wanted grass/2) / (# of grass you pick/click) ed1=EditBox:Reps:1 ed2=ComboBox:Resolution:1920x1080, 1380x768, 1280x1024, 1024x768 end Formload Grass, Grass.frm if ShowForm Grass //Do this if OK clicked Set Reps = Grass[ed1] else //Do this if Cancel is clicked Stop end Formsave Grass, Grass.frm Keydown @{Tab} 100 Delay 2000 Call Resolution Loop $Reps Compute NewX = $XPos2 - $LOffset If $CheckforLostFocus = 0 Call MouseLeft End Compute NewX = $XPos2 + $ROffset If $CheckforLostFocus = 0 Call MouseRight End End Procedure MouseLeft //Left side MousePos $NewX, $YPos3 Delay $MDelay LeftClick Delay $Pick //Grass button MousePos $XPos1, $YPos1 Delay $MDelay LeftClick Delay 1500 End Procedure MouseRight //Right side MousePos $NewX, $YPos2 Delay $MDelay LeftClick Delay $Pick //Grass button MousePos $XPos1, $YPos1 Delay $MDelay LeftClick Delay 1500 End Procedure Resolution Case Grass[ed2] When 1920x1080 SetConst XPos2 = 900 SetConst YPos2 = 573 SetConst YPos3 = 573 SetConst LOffset = 200 SetConst ROffset = 300 When 1380x768 SetConst XPos2 = 507 SetConst YPos2 = 394 SetConst YPos3 = 394 SetConst LOffset = 133 SetConst ROffset = 233 When 1280x1024 When 1024x768 End End Procedure Coords Delay 5000 Keys {mousex}, {mousey} End Function CheckforLostFocus if {activewindow} contains eGenesis Compute Result = 0 Exit Else Stop End End //Written with AC Tool 4.6.2 by Anka