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.

Difference between revisions of "SlateClayGrass"

From A Tale in the Desert
Jump to navigationJump to search
Line 1: Line 1:
//General purpose slate and clay collector.  Works best without water jugs
+
  //General purpose slate and clay collector.  Works best without water jugs
//or a fishing pole.  To begin, hover your mouse over the icon
+
  //or a fishing pole.  To begin, hover your mouse over the icon
//you wish to collect in ATITD (i.e. be over a patch of clay or a piece of
+
  //you wish to collect in ATITD (i.e. be over a patch of clay or a piece of
//slate and have this program active.  Press F2, and the macro will start.
+
  //slate and have this program active.  Press F2, and the macro will start.
Constants
+
  Constants
  Red = 0
+
    Red = 0
  Green = 0
+
    Green = 0
  Blue = 0
+
    Blue = 0
  XPos = 0
+
    XPos = 0
  YPos = 0
+
    YPos = 0
  CurrKey = 0
+
    CurrKey = 0
  OrigX = 0
+
    OrigX = 0
  OrigY = 0
+
    OrigY = 0
  right = 0
+
    right = 0
End
+
  End
SetConst XPos = {MouseX}
+
  SetConst XPos = {MouseX}
SetConst YPos = {MouseY}
+
  SetConst YPos = {MouseY}
LoadRGB $XPos, $YPos
+
  LoadRGB $XPos, $YPos
SetConst Red = {RGBRed}
+
  SetConst Red = {RGBRed}
SetConst Blue = {RGBBlue}
+
  SetConst Blue = {RGBBlue}
SetConst Green = {RGBGreen}
+
  SetConst Green = {RGBGreen}
SetConst CurrKey = {GlobalKeys}
+
  SetConst CurrKey = {GlobalKeys}
Rightclick
+
  Rightclick
  
  
While $CheckforLostFocus = 0
+
  While $CheckforLostFocus = 0
  GetRed  $XPos, $YPos = $Red
+
    GetRed  $XPos, $YPos = $Red
    GetGreen  $XPos, $YPos = $Green
+
      GetGreen  $XPos, $YPos = $Green
      GetBlue  $XPos, $YPos = $Blue
+
        GetBlue  $XPos, $YPos = $Blue
        Set OrigX = {mousex}
+
          Set OrigX = {mousex}
        Set OrigY = {Mousey}
+
          Set OrigY = {Mousey}
        MousePos $XPos, $YPos
+
          MousePos $XPos, $YPos
        Delay 10
+
          Delay 10
        Rightclick
+
          Rightclick
        Delay 10
+
          Delay 10
        MousePos $OrigX, $OrigY
+
          MousePos $OrigX, $OrigY
 +
        End
 
       End
 
       End
 
     End
 
     End
 
   End
 
   End
End
 
  
Function CheckforLostFocus
+
  Function CheckforLostFocus
  if {activewindow} contains eGenesis
+
    if {activewindow} contains eGenesis
    Compute Result = 0
+
      Compute Result = 0
    Exit
+
      Exit
  Else
+
    Else
  Bell Exclamation
+
    Bell Exclamation
     Stop
+
        Stop
 +
     End
 
   End
 
   End
End
 

Revision as of 11:13, 2 February 2010

 //General purpose slate and clay collector.  Works best without water jugs
 //or a fishing pole.  To begin, hover your mouse over the icon
 //you wish to collect in ATITD (i.e. be over a patch of clay or a piece of
 //slate and have this program active.  Press F2, and the macro will start.
 Constants
   Red = 0
   Green = 0
   Blue = 0
   XPos = 0
   YPos = 0
   CurrKey = 0
   OrigX = 0
   OrigY = 0
   right = 0
 End
 SetConst XPos = {MouseX}
 SetConst YPos = {MouseY}
 LoadRGB $XPos, $YPos
 SetConst Red = {RGBRed}
 SetConst Blue = {RGBBlue}
 SetConst Green = {RGBGreen}
 SetConst CurrKey = {GlobalKeys}
 Rightclick


 While $CheckforLostFocus = 0
   GetRed  $XPos, $YPos = $Red
     GetGreen  $XPos, $YPos = $Green
       GetBlue  $XPos, $YPos = $Blue
         Set OrigX = {mousex}
         Set OrigY = {Mousey}
         MousePos $XPos, $YPos
         Delay 10
         Rightclick
         Delay 10
         MousePos $OrigX, $OrigY
       End
     End
   End
 End
 Function CheckforLostFocus
   if {activewindow} contains eGenesis
     Compute Result = 0
     Exit
   Else
   	Bell Exclamation
       Stop
   End
 End