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:Nisu Bastet/macro/onion and wood

From A Tale in the Desert
Jump to navigationJump to search
copy paste everything in a text file, save it with onionswood.ahk and start it with AHK
check screen shots before
start macro as below
onion macro with strg-shift-O
wood macro with strg-shift-w
both macro needs to be have screen size changed by hitting strg-shift-f12
wood macro needs be set before


need this image for onion macro, must be saved in same folder als macro file

Find Harvest th.png


^+[:: ;STRG SHIFT [
WinSet, Region, , A
return

^+d:: ;STRG SHIFT d
Winset, Disable, , A
return

^+]:: ;STRG SHIFT ]
Winset, Enable, , A
return

^+e::Edit
;STRG SHIFT E

^+q::Pause, Toggle
;STRG SHIFT Q

^+r::Reload
;STRG SHIFT R

^+x::ExitApp 
; Exit macro  strg shift X


; Atitd screen size 
^+F12:: ;strg shift f12
WinSet, Style, -0xC00000, eGenesis Client
WinMove, eGenesis Client, , 0, 0, 1151, 824
return



; ---- check Water ----
checkwater()
 {
   Sleep, 400
 PixelGetColor, water01, 342, 66 ; 3. posi water
 PixelGetColor, water02, 277, 69  ; 2. posi water
 Mousegetpos, mx2, my3
 Sleep, 400
  if (water01 = 0xD6AA8C) ;Water 3. posi da
   {
   MouseClick, right, 345, 83 ; click water
   Sleep, 500
mousemove, mx2, my3
   Sleep, 200
   checkgather()
   checkwater()
   }
  if (water02 = 0xEFC7B5) ;Water 2. posi da
   {
   MouseClick, right, 277, 69 ; click water
   Sleep, 500
mousemove, mx2, my3
   Sleep, 200
   checkgather()
   checkwater()
   }

 }
return





;---------------------------------------------
;------------------ W O O D ------------------
;---------------------------------------------

;needs adjustments on your site
; basic idea: 
; pin each tree after the next on left side, then after 9 trees, next on right side
; then set coords to run to next tree
; remain to carry grilled cabbage, maybe set coords where to eat again
; double F8 max zoomed out! 
; pin consume window right to items/skill tab
; pin "stash to WH window" between chat and consume window after taken hatchet and all stuff u need including 100 wood

; use the strg-shift-f12 option before
; place mouse over point of stashing wood before start wood macro

^+w:: ; strg shift w
MouseX = 13 ; sets F and G line
MouseGetPos, woodx01,  woodx02
loop
{
checkeatend() ; perception food
sleep, 300

loop, 5 ;anzahl wood runs
{
  IfWinactive, eGenesis Client
  {
    	MouseClick, left,  MouseX,  40 ;1. Baum fenster top left
sleep, 200
	checkwood()
sleep, 300
	MouseClick, left,  MouseX,  124 ;2. Baum fenster unter 1. fenster top left
sleep, 200
	checkwood()
sleep, 200
;moving
	MouseClick, left,  819,  190 ; MOVING
	Sleep, 400
	MouseClick, left,  MouseX,  208 ;3 baum fenster
sleep, 200
	checkwood()
sleep, 200
;moving
	MouseClick, left,  819,  190 ; MOVING
	Sleep, 400
	MouseClick, left,  MouseX,  292 ;4 baum fenster
sleep, 200
	checkwood()
sleep, 200
	MouseClick, left,  MouseX,  376 ;5 baum fenster
sleep, 200
	checkwood()
sleep, 200
;moving
	MouseClick, left,  819,  190 ; MOVING
	Sleep, 400
	MouseClick, left,  MouseX,  460 ;6 baum fenster
	checkwood()
;moving
	MouseClick, left,  819,  190 ; MOVING
	Sleep, 400
	MouseClick, left,  MouseX,  544 ;7 baum fenster, left
	checkwood()
;moving
	MouseClick, left,  819,  190 ; MOVING
	Sleep, 400
	MouseClick, left,  MouseX,  628 ;8 baum fenster, 
	checkwood()
;moving
	MouseClick, left,  969,  288 ; MOVING
	Sleep, 400
	MouseClick, left,  MouseX,  712 ;9 baum fenster, LINKS
	checkwood()
	MouseClick, left,  843,  40 ;1 baum fenster, RECHTS  bottle tree
	checkwood()
;moving
	MouseClick, left,  869,  418 ; MOVING
	Sleep, 400
	MouseClick, left,  845,  124 ;2 baum fenster, RECHTS  Royal Palm
	checkwood()
;moving back
	MouseClick, left,  417,  474 ; MOVING
	Sleep, 400
	}
}

MouseClick, left,  446,  230 ; movig to stop point
sleep 900
 MouseClick, right,  woodx01,  woodx02
sleep 75000
 MouseClick, right,  woodx01,  woodx02
sleep 1900
 MouseClick, right,  woodx01,  woodx02
sleep 1900
   MouseClick, right, 570, 449 
sleep 3900
	MouseClick, left,  547,  675 
sleep 500

}
return




checkwood()
{
MouseGetPos, MouseX, MouseY
Sleep, 200
wood02 := MouseY + 8
wood03 := MouseY + 12
woodi1 := MouseY - 20
Sleep, 200

loop ; checks ob holzfenster da is
 {
 Sleep, 250
 MouseClick, left, MouseX, woodi1 ;check color
 Sleep, 1000
 PixelGetColor, wood04, MouseX, wood03 ;G from Gather Wood
 PixelGetColor, wood06, MouseX, wood02 ;F from fertilize
 Sleep, 200
  if (wood04 != 0) ; nix DA
   {
   Sleep, 300
   wood06 := 1
   }
  if (wood06 = 0) ;F from fertilize  is DA!
   {
   Sleep, 200
   wood04 := 1
   Sleep, 200
   MouseClick, right, 377, 197 ;STOP moving
   Sleep, 1000
   }    
  if (wood04 = 0) ; G from Gather Wood  is DA!
   {
   MouseClick, left, MouseX, wood02 ;Get wood
   Sleep, 500
   break
   }
 }
sleep, 111
loop ; checks ob holz genommen
 {
 Sleep, 250
 MouseClick, left, MouseX, woodi1 ;check color
 Sleep, 500
 PixelGetColor, wood05, MouseX, wood02 ;F from fertilize
 Sleep, 200
 if (wood05 != 0)
  {
  Sleep, 500
  }
 if (wood05 = 0)
  {
  break
  }
 }
} ; wood ende




;needs special screen settings, so try it first
; 4 onions
; 1 jug, 4 seeds needed
; u need to stand near water and on sand
; double F8 max zoomed in, hit ALT-L after zoomed in to fix screen
; use the strg-shift-f12 option before

; -----------------------------------------
; ------------- O N I O N -----------------
; -----------------------------------------
^+O:: ; strg shift O
loop, 
{
  IfWinactive, eGenesis Client
  {
; plant -> place "plant onion windows" top left
  sleep 200
  MouseClick, right, 87, 40, 1, 0
  sleep 400
; 1. seed rechts
  MouseClick, right, 44, 21, 1, 0
  sleep 400
  MouseClick, right, 87, 77, 1, 0
  sleep 150
  MouseClick, right, 87, 77, 1, 0
  sleep 400
  MouseClick, right, 33, 139, 1, 0
  sleep 400
; 2. seed, unten
  MouseClick, right, 44, 21
  sleep 400
  MouseClick, right, 64, 100
  sleep 150
  MouseClick, right, 64, 100
  sleep 400
  MouseClick, right, 33, 139
  sleep 400
; 3. seed, links
  MouseClick, right, 44, 21
  sleep 400
  MouseClick, right, 40, 76
  sleep 150
  MouseClick, right, 40, 76
  sleep 400
  MouseClick, right, 33, 139
  sleep 400
; 4. seed, oben
  MouseClick, right, 44, 21
  sleep 400
  MouseClick, right, 64, 54
  sleep 150
  MouseClick, right, 64, 54
  sleep 400
  MouseClick, right, 33, 139
  sleep 400
; -------------------------------------
; Moves windows right plant
    MouseClick, right, 624, 409
    MouseGetPos, Moov01, Moov02
    sleep 200
      MouseMove , Moov01+13, Moov02-21
      sleep 51
	Click down
      sleep 50
	MouseMove , 205, 178
      MouseGetPos, Moov01, Moov02
      sleep 200
	Click up 
      sleep 150
      MouseClick, right, Moov01+162, Moov02
      sleep 350
; Moves windows down plant
    MouseClick, right, 577, 466
    MouseGetPos, Moov01, Moov02
    sleep 200
      MouseMove , Moov01+13, Moov02-21
      sleep 51
	Click down
      sleep 50
	MouseMove , 465, 178
      MouseGetPos, Moov01, Moov02
      sleep 200
	Click up 
      sleep 150
      MouseClick, right, Moov01+162, Moov02
      sleep 350
; Moves windows left plant
    MouseClick, right, 515, 418
    MouseGetPos, Moov01, Moov02
    sleep 200
      MouseMove , Moov01+13, Moov02-21
      sleep 51
	Click down
      sleep 50
	MouseMove , 685, 178
      MouseGetPos, Moov01, Moov02
      sleep 200
	Click up 
      sleep 150
      MouseClick, right, Moov01+162, Moov02
      sleep 350
; Moves windows top plant
    MouseClick, right, 579, 360
    MouseGetPos, Moov01, Moov02
    sleep 200
      MouseMove , Moov01+13, Moov02-21
      sleep 51
	Click down
      sleep 50
	MouseMove , 910,178
      MouseGetPos, Moov01, Moov02
      sleep 200
	Click up 
      sleep 150
      MouseClick, right , Moov01+162, Moov02
      sleep 350
; -------------------------------------
; Water
loop, 4
{
checkwater()
   MouseClick, right, 250, 206
sleep 500
checkwater()
   MouseClick, right, 500, 205
sleep 500
checkwater()
   MouseClick, right, 710, 206
sleep 500
checkwater()
   MouseClick, right, 950, 205
sleep 1000
}
loop  ; 1. onion
 {
click 250, 173
sleep 500
ImageSearch, Px, Py, 190, 190, 370, 230, *50 Find_Harvest_th.png
sleep 150
	if (ErrorLevel < 1) 
	{
		Click 250 , 206 ;Click Harvest This
sleep 400
		Click 367, 175 ; unpin window
		break 
	}
 }
loop ; 2. onion
 {
click 500, 173
sleep 500
ImageSearch, Px, Py, 450, 190, 610, 230, *50 Find_Harvest_th.png
sleep 150
	if (ErrorLevel < 1) 
	{
		Click 500, 205 ;Click Harvest This
sleep 400
		Click 627, 177 ; unpin window
		break 
	}
 }

loop ; 3. onion
 {
click 710, 173
sleep 500
ImageSearch, Px, Py, 670, 190, 840, 230, *50 Find_Harvest_th.png
sleep 150
	if (ErrorLevel < 1) 
	{
		Click 710, 206 ;Click Harvest This
sleep 400
		Click 847, 175 ; unpin window
		break 
	}
 }

loop ; 4. onion
 {
click 950, 173
sleep 500
ImageSearch, Px, Py, 890, 190, 1060, 230, *50 Find_Harvest_th.png
sleep 150
	if (ErrorLevel < 1) 
	{
		Click 950, 205 ;Click Harvest This
sleep 400
		Click 1072, 176 ; unpin window
		break 
	}
 }

  }
sleep 5000
}
return