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 "Harvest Macro"

From A Tale in the Desert
Jump to navigationJump to search
 
Line 11: Line 11:
 
   TopCY = 40 //Topclickable Y
 
   TopCY = 40 //Topclickable Y
 
   TopCX = 40 // Topclickable X
 
   TopCX = 40 // Topclickable X
Gridup = 5 //number of flax top to bottom
+
  Gridup = 5 //number of flax top to bottom
Gridside = 5 //number of flax side to side
+
  Gridside = 5 //number of flax side to side
Column = 1 //leave this at 1
+
  Column = 1 //leave this at 1
NormDelay = 1000 //the delay between actions
+
  NormDelay = 1000 //the delay between actions
StartDelay = 3000 //this is the zoom in delay, larger means closer
+
  StartDelay = 3000 //this is the zoom in delay, larger means closer
 +
  DoItAgain = 2 // added so I flax more than once without the F8/F8 reset
 +
    // Set DoItAgain to the number of times you want to run 25, the grid is offset so keep that in mind
 
END
 
END
  
 
Procedure START
 
Procedure START
Keys {F8}
+
  Keys {F8}
Keys {F8}
+
  Keys {F8}
MousePos $CenterX,$TopY
+
  MousePos $CenterX,$TopY
Delay $StartDelay
+
  Delay $StartDelay
MousePos $CenterX,$CenterY
+
  MousePos $CenterX,$CenterY
 
End
 
End
  
 
Procedure PLANT
 
Procedure PLANT
MousePos $TopCX, $TopCY
+
  MousePos $TopCX, $TopCY
LeftClick
+
  LeftClick
 
END
 
END
 
Procedure CLICKMENU
 
Procedure CLICKMENU
Compute MenuX = $VariableX + 10
+
  Compute MenuX = $VariableX + 10
Compute MenuY = $VariableY - 5
+
  Compute MenuY = $VariableY - 5
MousePos $MenuX, $MenuY
+
  MousePos $MenuX, $MenuY
Delay 250
+
  Delay 250
LeftClick
+
  LeftClick
 
END
 
END
  
Line 44: Line 46:
 
Compute VariableX = $CenterX+53
 
Compute VariableX = $CenterX+53
  
Loop $Gridside
+
Loop $DoItAgain
 +
  Loop $Gridside
  
If $Column = 1 or $Column = 3 or $Column = 5 or $Column = 7
+
    If $Column = 1 or $Column = 3 or $Column = 5 or $Column = 7
Compute VariableY = $CenterY-50
+
Compute VariableY = $CenterY-50
Else
+
    Else
Compute VariableY = $CenterY+50
+
Compute VariableY = $CenterY+50
End
+
    End
  
Call Plant
+
    Call Plant
Loop $Gridup
+
    Loop $Gridup
MousePos $CenterX,$VariableY
+
MousePos $CenterX,$VariableY
LeftClick
 
Delay $NormDelay
 
Call Plant
 
END
 
Compute $Column = $Column + 1
 
MousePos $VariableX,$CenterY
 
 
LeftClick
 
LeftClick
 
Delay $NormDelay
 
Delay $NormDelay
END
+
Call Plant
 +
    END
 +
    Compute $Column = $Column + 1
 +
    MousePos $VariableX,$CenterY
 +
    LeftClick
 +
    Delay $NormDelay
 +
  END
  
Compute VariableX = $CenterX-(($Gridside+1)*50)
+
  Compute VariableX = $CenterX-(($Gridside+1)*50)
Compute VariableY = $CenterY + (($Gridup-1)*50)-20
+
  Compute VariableY = $CenterY + (($Gridup-1)*50)-20
MousePos $VariableX,$VariableY
+
  MousePos $VariableX,$VariableY
LeftClick
+
  LeftClick
  
Delay 1500
+
  Delay 1500
RightClick
+
  RightClick
  
Compute VariableX = $CenterX - 85
+
  Compute VariableX = $CenterX - 85
Compute VariableY = $CenterY + 140
+
  Compute VariableY = $CenterY + 140
MousePos $VariableX,$VariableY
+
  MousePos $VariableX,$VariableY
  
Delay 11000
+
  Delay 11000
  
loop 3
+
  loop 3
 +
    LeftClick
 +
    Call CLICKMENU
 +
    loop 4
 +
Compute VariableY = $VariableY - 50
 +
MousePos $VariableX,$VariableY
 +
Delay 700
 
LeftClick
 
LeftClick
 
Call CLICKMENU
 
Call CLICKMENU
loop 4
+
    END
Compute VariableY = $VariableY - 50
+
 
 +
    loop 2
 +
Compute VariableY = $VariableY - 50
 +
Compute VariableX = $VariableX + 50
 +
 +
loop 5
 +
Compute VariableY = $VariableY + 50
 
MousePos $VariableX,$VariableY
 
MousePos $VariableX,$VariableY
 
Delay 700
 
Delay 700
Line 90: Line 105:
 
END
 
END
  
loop 2
+
Compute VariableY = $VariableY + 50
 +
Compute VariableX = $VariableX + 50
 +
 
 +
loop 5
 
Compute VariableY = $VariableY - 50
 
Compute VariableY = $VariableY - 50
Compute VariableX = $VariableX + 50
+
MousePos $VariableX,$VariableY
 +
Delay 700
 +
LeftClick
 +
Call CLICKMENU
 +
END
 +
    END
 
 
loop 5
+
    Compute VariableX = $CenterX - 85
Compute VariableY = $VariableY + 50
+
    Compute VariableY = $CenterY + 140
MousePos $VariableX,$VariableY
+
    MousePos $VariableX,$VariableY
Delay 700
+
    Delay 1500
LeftClick
+
  END
Call CLICKMENU
 
END
 
  
Compute VariableY = $VariableY + 50
+
  Delay 500
Compute VariableX = $VariableX + 50
+
  Compute Column = 1
 
+
  Compute VariableX = $CenterX+53
loop 5
 
Compute VariableY = $VariableY - 50
 
MousePos $VariableX,$VariableY
 
Delay 700
 
LeftClick
 
Call CLICKMENU
 
END
 
END
 
 
Compute VariableX = $CenterX - 85
 
Compute VariableY = $CenterY + 140
 
MousePos $VariableX,$VariableY
 
Delay 1500
 
 
END
 
END
 
</pre>
 
</pre>
 
back to Macro list:[[http://www.atitd.org/wiki/tale4/ACtool_Macros Mosaic Macros]]
 
back to Macro list:[[http://www.atitd.org/wiki/tale4/ACtool_Macros Mosaic Macros]]

Latest revision as of 17:39, 28 December 2008

// make sure you pin your plant/flax window in the upper left corner of your screen
Constants
  CenterX = 637 // at 1280x1024 this is my center windowed
  CenterY = 527 // at 1280x1024 this is my center windowed
  VariableY = 527 // this doesn't need to be set, it gets set while running
  VariableX = 637 // this doesn't need to be set, it gets set while running
  MenuX = 0
  MenuY = 0
  TopY = 10 //Top of the window for zooming
  TopCY = 40 //Topclickable Y
  TopCX = 40 // Topclickable X
  Gridup = 5 //number of flax top to bottom
  Gridside = 5 //number of flax side to side
  Column = 1 //leave this at 1
  NormDelay = 1000 //the delay between actions
  StartDelay = 3000 //this is the zoom in delay, larger means closer
  DoItAgain = 2 // added so I flax more than once without the F8/F8 reset
    // Set DoItAgain to the number of times you want to run 25, the grid is offset so keep that in mind
END

Procedure START
  Keys {F8}
  Keys {F8}
  MousePos $CenterX,$TopY
  Delay $StartDelay
  MousePos $CenterX,$CenterY
End

Procedure PLANT
  MousePos $TopCX, $TopCY
  LeftClick
END
Procedure CLICKMENU
  Compute MenuX = $VariableX + 10
  Compute MenuY = $VariableY - 5
  MousePos $MenuX, $MenuY
  Delay 250
  LeftClick
END

//This is where the actual macro starts, everything above are procedures
Call START
Delay $NormDelay
Compute Gridup = $Gridup-1
Compute VariableX = $CenterX+53

Loop $DoItAgain
  Loop $Gridside

    If $Column = 1 or $Column = 3 or $Column = 5 or $Column = 7
	Compute VariableY = $CenterY-50
    Else
	Compute VariableY = $CenterY+50
    End

    Call Plant
    Loop $Gridup
	MousePos $CenterX,$VariableY
	LeftClick
	Delay $NormDelay
	Call Plant
    END
    Compute $Column = $Column + 1
    MousePos $VariableX,$CenterY
    LeftClick
    Delay $NormDelay
  END

  Compute VariableX = $CenterX-(($Gridside+1)*50)
  Compute VariableY = $CenterY + (($Gridup-1)*50)-20
  MousePos $VariableX,$VariableY
  LeftClick

  Delay 1500
  RightClick

  Compute VariableX = $CenterX - 85
  Compute VariableY = $CenterY + 140
  MousePos $VariableX,$VariableY

  Delay 11000

  loop 3
    LeftClick
    Call CLICKMENU
    loop 4
	Compute VariableY = $VariableY - 50
	MousePos $VariableX,$VariableY
	Delay 700
	LeftClick
	Call CLICKMENU
    END

    loop 2
	Compute VariableY = $VariableY - 50
	Compute VariableX = $VariableX + 50
	
	loop 5
		Compute VariableY = $VariableY + 50
		MousePos $VariableX,$VariableY
		Delay 700
		LeftClick
		Call CLICKMENU
	END

	Compute VariableY = $VariableY + 50
	Compute VariableX = $VariableX + 50

	loop 5
		Compute VariableY = $VariableY - 50
		MousePos $VariableX,$VariableY
		Delay 700
		LeftClick
		Call CLICKMENU
	END
    END
	
    Compute VariableX = $CenterX - 85
    Compute VariableY = $CenterY + 140
    MousePos $VariableX,$VariableY
    Delay 1500
  END

  Delay 500
  Compute Column = 1
  Compute VariableX = $CenterX+53
END

back to Macro list:[Mosaic Macros]