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.

Harvest Macro

From A Tale in the Desert
Revision as of 17:39, 28 December 2008 by Coyan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
// 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]