The Wiki for Tale 6 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:Cegaiel/Macros/Grass/Code"

From ATITD6
Jump to navigationJump to search
(Created page with "<pre> ; grass collector ;This script collects grass in a small area. It will click/walk different in a circle around where you are standing. ;Make sure you have plenty of grass ...")
 
 
Line 1: Line 1:
 
<pre>
 
<pre>
; grass collector
+
; Cegaiel's grass gatherer
  
 
;This script collects grass in a small area. It will click/walk different in a circle around where you are standing.
 
;This script collects grass in a small area. It will click/walk different in a circle around where you are standing.

Latest revision as of 03:58, 3 February 2012

; Cegaiel's grass gatherer

;This script collects grass in a small area. It will click/walk different in a circle around where you are standing.
;Make sure you have plenty of grass around you!
;Lock screen (Alt+L) and use F6 camera angle and zoom in about medium.
;Make sure you are Walking Slow (Esc, Emote..., Gait: Walking)
;Make sure that What Do I Do Now? icon (top left (Clipboard with notebook on it) is gone (Uncheck Utility, Interface)


;Ctrl+p to Pause script

shades:="*90"

IfWinExist eGenesis Client 
{
	WinActivate
	WinGetPos,,, winWidth, winHeight
	minorOffset = 70
	majorOffset = 100
	winXCenter := winWidth / 2
	winYCenter := ((winHeight - 22) / 2) + 32
	winXLeft := winXCenter - minorOffset
	winXFarLeft := winXCenter - majorOffset
	winXRight := winXCenter + minorOffset
	winXFarRight := winXCenter + majorOffset
	winYUp := winYCenter - minorOffset
	winYFarUp := winYCenter - majorOffset
	winYDown := winYCenter + minorOffset
	winYFarDown := winYCenter + majorOffset
	circleMove = 0
	
	Gui, +AlwaysOnTop +ToolWindow
	Gui, Add, Text,, How many grass cycles?
	Gui, Add, Edit, Number vNumGrass
	Gui, Add, Button, default gGrassCommit, OK
	Gui, Show
	return
	
	GrassCommit:
	Gui, Submit
	Gui, Destroy
	GrassCycle = 0
	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, bold
	Gui, Add, Text, vGrassCycleText, Cycle %NumGrass% of %NumGrass%
	Gui, Font, norm
	Gui, Show
	GuiControl, Text, GrassCycleText, Cycle %GrassCycle% of %NumGrass%
	WinActivate, eGenesis Client
	;CoordMode, Mouse, Relative

SetDefaultMouseSpeed, 0
SetMouseDelay, -1


	loop, %NumGrass%
	{
		if circleMove = 0 
		{
			MouseClick, left, %winXCenter%, %winYFarUp%
			circleMove++
		}
		else if circleMove = 1 
		{
			MouseClick, left, %winXRight%, %winYUp%
			circleMove++
		}
		else if circleMove = 2 
		{
			MouseClick, left, %winXFarRight%, %winYCenter%
			circleMove++
		}
		else if circleMove = 3 
		{
			MouseClick, left, %winXRight%, %winYDown%
			circleMove++
		}
		else if circleMove = 4 
		{
			MouseClick, left, %winXCenter%, %winYFarDown%
			circleMove++
		}
		else if circleMove = 5 
		{
			MouseClick, left, %winXLeft%, %winYDown%
			circleMove++
		}
		else if circleMove = 6 
		{
			MouseClick, left, %winXFarLeft%, %winYCenter%
			circleMove++
		}
		else if circleMove = 7 
		{
			MouseClick, left, %winXLeft%, %winYUp%
			circleMove = 0
		}
		loop
		{
			;PixelSearch, Px, Py, 0, 0, 91, 74, 0xB46E6C

			ImageSearch, Px, Py, 50 , 38, 244, 120, %shades% Grass_icon.png

			;Sleep, 1000
			if ErrorLevel = 0 
			{
				GrassCycle++
				GuiControl, Text, GrassCycleText, Cycle %GrassCycle% of %NumGrass%
				;MouseClick, left, 91, 74
				MouseClick, left, Px, Py
				Sleep, 250
				break
			}
		}
	}
	Gui, Destroy
	return
}
return


^r::reload
^p::Pause