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:Cegaiel/Macros/Grass

From A Tale in the Desert
< User:Cegaiel‎ | Macros
Revision as of 18:14, 5 January 2010 by Cegaiel (talk | contribs) (New page: <pre> ; grass collector ^p::Pause ^!g:: ;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 ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
; grass collector
^p::Pause
^!g::

;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+Alt+G to enter the amount of grass to collect.
;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
	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, 92 , 61, 576, 150, %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