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 "User:AngelRio/Flax"

From A Tale in the Desert
Jump to navigationJump to search
Line 23: Line 23:
 
* Tested using 1024 x 768 resolution.  If you have a different resolution, you may have to edit some of the values.
 
* Tested using 1024 x 768 resolution.  If you have a different resolution, you may have to edit some of the values.
  
 
+
==Bonus==
 +
For those tired of using their index fingers for clicking, you can now use the back tick (`) key as a left click.  Cheers!
  
 
=About AutoHotKey=
 
=About AutoHotKey=

Revision as of 07:05, 23 February 2009

Rationale

Growing flax is simple. It is one of the most basic building blocks of many construction projects. Farming it in quantities, however, present a risk to the wrist and carpal tunnel due to its repetitive nature. We plan to remedy that by using both left and right hands, and minimizing the stress on the mouse-holding hand.

This was written to reduce risk of RSI, and not for growing flax while you are AFK. With that in mind, please feel free to modify the code, and submit changes back. Thank you.

Instructions

  1. Load the AHK file.
  2. Position the flax menu below the TimeLoc window as shown below.
    1. Flax menu positioned below the TimeLoc window
  3. Go to overhead cartographic view (press F8 twice).
    1. Zoom in the closest level.
    2. Zoom out in 10 increments.
    3. Press Alt-L to freeze the zoom level.
  4. Start planting flax. Press the Insert key.
    1. Do not move the mouse at any time.
  5. Wait for the weeds to grow.
  6. Mouse over a flax bed and press the Delete or PageDown key.
    1. Repeat for each flax bed.
    2. Do not move the mouse when until the bed has been watered, weeded or harvested.
    3. Use the PageDown key when watering, weeding or harvesting from left to right, the Delete key when doing it from right to left.

Notes

  • Tested using 1024 x 768 resolution. If you have a different resolution, you may have to edit some of the values.

Bonus

For those tired of using their index fingers for clicking, you can now use the back tick (`) key as a left click. Cheers!

About AutoHotKey

I prefer using AutoHotKey since you can map certain keyboard sequences or mouse control into a "hotkey" such as Ctrl-Alt-Something, unlike with AC Tool where you need to be fast on the Alt-Tab draw. In this simple flax-growing script, we use the Insert, Delete and PageDown buttons which are not used in the game.

Code for AutoHotKey

;==============================================================================
; Plant a row of flax
;==============================================================================
PlantFlax()
{
  Loop 10
  {
    ; Wait for the proper position
    Sleep, 450

    ; Put a flax seed on the ground
    Click, 503, 55
  }
}

;==============================================================================
; Water, Weed or Harvest a bed of flax
;==============================================================================
WaterWeedHarvest(MouseX, MouseY)
{
  ; Approximate the location of the menu to click
  NewMouseX := MouseX + 40
  NewMouseY := MouseY

  ; Click on the Flax bed
  Click %MouseX% %MouseY%

  ; Wait for the menu to show up
  ; Change this to a better implementation that is lag-resistant
  Sleep, 500

  ; Click on the menu item to Water/Weed/Harvest
  Click %NewMouseX% %NewMouseY%

  ; Finished one bed
  Return
}


;==============================================================================
; Watering/Weeding/Harvesting from Left to Right
;==============================================================================
PgDn::

  ; Get location of the mouse pointer
  MouseGetPos, MouseX, MouseY

  WaterWeedHarvest(MouseX, MouseY)

  ; Finished one bed
  Return


;==============================================================================
; Watering/Weeding/Harvesting from Right to Left
;==============================================================================
Delete::

  ; Get location of the mouse pointer
  MouseGetPos, MouseX, MouseY

  WaterWeedHarvest(MouseX, MouseY)

  ; Move the mouse near the next flax bed
  NewMouseX := MouseX - 40
  MouseMove, %NewMouseX%, %MouseY%

  ; Finished one bed
  Return

;==============================================================================
; Planting two rows of flax
;==============================================================================
Insert::

  ; Move to the right...
  Click, 1024, 384

  PlantFlax()

  ; Move down, a bit to the right...
  Click, 585, 477
  Sleep, 1000

  ; Move to the left...
  Click, 0, 384

  PlantFlax()

  ; Move to the center ready for weeding
  Click, 692, 356

  ; End of Flax Planting
  Return

;==============================================================================
; Mouse click on ` key
;==============================================================================
`::

  Click