; This tends to drift a bit to the north - up the screen. ; The problem is finding the exact location of the avatar for movement clicks. ; Cartographer mode (F8,F8) zoomed half way in seems best. ^!g:: IfWinExist eGenesis Client { WinActivate SendMode Input SetDefaultMouseSpeed, 0 CoordMode, Mouse, Screen WinGetPos,,, winWidth, winHeight winWidth2 := winWidth - 200 Offset = 100 verticalDrift = 12 ; increase to move down the screen. ; majorOffset = 100 winXCenter := winWidth / 2 winYCenter := winHeight / 2 + verticalDrift winXLeft := winXCenter - Offset ; winXFarLeft := winXCenter - majorOffset winXRight := winXCenter + Offset ; winXFarRight := winXCenter + majorOffset ; winYUp := winYCenter - minorOffset ; winYFarUp := winYCenter - majorOffset ; winYDown := winYCenter + minorOffset ; winYFarDown := winYCenter + majorOffset circleMove = 0 NumGrass := 400 NumClay := 100 GrassGathered = 0 ClayGathered = 0 Count = 0 Gui, +AlwaysOnTop +ToolWindow ;Gui, Add, Text, vDebugText, Count is 0 from %Numgrass% ; Gui, Add, Text, vDebugText, Testing ... %widthOffset%, 140, %winWidth%, 150 Gui, Add, Text, vCycleLowerText, Count is 0 from %Numgrass% Gui, Show, X400 Y800, Macro-cycle WinActivate, eGenesis Client CoordMode, Mouse, Relative loop, %NumGrass% { Count++ GuiControl, Text, CycleLowerText, Cycle %Count% of %NumGrass% loop ; Search until found and click. { PixelSearch, Px, Py, %WinWidth2%, 0, %winWidth%, 50, 0xF93732, 2 GrassFound:=Errorlevel if (GrassFound = 0) { GrassGathered++ MouseGetPos, origX, origY MouseClick, left, %Px%, %Py% MouseMove, %origX%, %origY% break } else { PixelSearch, Px, Py, %WinWidth2%, 0, %winWidth%, 50, 0x1E19C4, 2 ClayFound:=Errorlevel if (ClayFound = 0) { ClayGathered++ MouseGetPos, origX, origY MouseClick, left, %Px%, %Py% MouseMove, %origX%, %origY% break } Sleep 250 } } MouseGetPos, origX, origY if circleMove = 0 { MouseClick, left, %winXRight%, %winYCenter% circleMove = 1 MouseMove, %origX%, %origY% } else if circleMove = 1 { MouseClick, left, %winXLeft%, %winYCenter% circleMove = 0 MouseMove, %origX%, %origY% } ; If (ClayFound = 0) ; { ; Sleep, 1000 ; } Sleep, 1000 ; if ( GrassGathered >= NumGrass or ClayGathered >= NumClay ) Break } Gui, Destroy return }