The Wiki for Tale 4 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.

User:Tunnen/BlethMacro

From A Tale in the Desert
< User:Tunnen
Revision as of 03:48, 24 October 2009 by Blethezar (talk | contribs)
Jump to navigationJump to search
// Wheat W/H keystroke Spammer.
// 
Constructs
 MouseX=List   // This sets up an array to hold all the field X positions
 MouseY=List   // This sets up an array to hold all the field Y positions
END
//
Constants
 totalfields = 20 // Change this number to the quantity of fields you want to run
 totalruns = 10000 // This sets how many times you want to spam the keys - reduce or increase as needed
 MouseXn = 0 // This holds the X value of where the mouse is currently sitting
 MouseYn = 0 // This holds the Y value of where the mouse is currently sitting
 RunCount = 0 // This holds the value of the current mouse list item we are clicking on
END
//
// Part 1 - Grab Field Positions
// 
ListClear MouseX // Set all MouseX list values to zero
ListClear MouseY // Set all MouseY list values to zero
Loop $totalfields  // Repeat this command for the number of fields there are
  Delay 5 Sec // Wait 5 seconds to move the mouse over the fields
  Listadd MouseX, {MouseX} // Add the Mouse X Location to the list
  Listadd MouseY, {MouseY} // Add the Mouse Y Location to the list
  KeyDown M 2 Sec //Press the M key to let you know to move the mouse
END
Loop $totalruns
  Compute RunCount = $RunCount + 1  // Tracks the field we are on
  Compute MouseXn = MouseX[$RunCount] // Sets the Mouse X Cord to the proper one for the field
  Compute MouseYn = MouseY[$RunCount] // Sets the Mouse Y Cord to the proper one for the field
  MousePos $MouseXn, $MouseYn // Move the Mouse over the field
  Delay 1 Sec  // wait 1 second
  KeyDown H 1 Sec  // Press the H key
  KeyDown W 1 Sec  // Press the W key
END