<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.atitd.org/wiki/t6w/index.php?action=history&amp;feed=atom&amp;title=User%3ACegaiel%2FMacros%2FHacklingRake%2FCode</id>
	<title>User:Cegaiel/Macros/HacklingRake/Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.atitd.org/wiki/t6w/index.php?action=history&amp;feed=atom&amp;title=User%3ACegaiel%2FMacros%2FHacklingRake%2FCode"/>
	<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/HacklingRake/Code&amp;action=history"/>
	<updated>2026-06-02T09:11:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/HacklingRake/Code&amp;diff=148951&amp;oldid=prev</id>
		<title>Cegaiel: Created page with &quot;&lt;pre&gt; ;Ctrl+P to pause script and Ctrl+P again to resume ;The AHK icon in system tray will turn red while paused. ;Ctrl+R to reload script ;Date: 3/26/2010 ;Last Update: 12/13/20...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/HacklingRake/Code&amp;diff=148951&amp;oldid=prev"/>
		<updated>2012-02-03T04:45:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; ;Ctrl+P to pause script and Ctrl+P again to resume ;The AHK icon in system tray will turn red while paused. ;Ctrl+R to reload script ;Date: 3/26/2010 ;Last Update: 12/13/20...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
;Ctrl+P to pause script and Ctrl+P again to resume&lt;br /&gt;
;The AHK icon in system tray will turn red while paused.&lt;br /&gt;
;Ctrl+R to reload script&lt;br /&gt;
;Date: 3/26/2010&lt;br /&gt;
;Last Update: 12/13/2011&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
step = 1&lt;br /&gt;
cycles = 0&lt;br /&gt;
counter = 0&lt;br /&gt;
&lt;br /&gt;
	Gui, +AlwaysOnTop +ToolWindow&lt;br /&gt;
	Gui, Add, Text,, How many Rotten Flax`nare in your inventory?&lt;br /&gt;
	Gui, Add, Edit, vFlax wp number&lt;br /&gt;
&lt;br /&gt;
	Gui, Add, Text,, Eating Grilled Food?`n(Automatically eat every 10 Teppy Min)&lt;br /&gt;
	Gui, Add, DropDownList, vEat Choose1, No|Yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Gui, Add, Button, gStart, Continue&lt;br /&gt;
	Gui, Show&lt;br /&gt;
	return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Start:&lt;br /&gt;
Gui, Submit&lt;br /&gt;
Gui, Destroy&lt;br /&gt;
Cycles := Floor(Flax/10)&lt;br /&gt;
&lt;br /&gt;
Msgbox, This requires %Cycles% cycles, the macro will stop automatically after %Cycles% cycles.`n`nNow, hover mouse over a black letter, in the word ENDURANCE, in skills tab`n`nThis is the letter/skill that turns red when you get tired`n`nWhen you are hovering a black letter it will tell you in the tooltip.`n`nPress F2, when it tells you in tooltip, to set position.`n`nClick OK to proceed...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			IfWinExist eGenesis Client&lt;br /&gt;
			{&lt;br /&gt;
&lt;br /&gt;
			WinActivate, eGenesis Client&lt;br /&gt;
			WinWait, eGenesis Client&lt;br /&gt;
			WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos &lt;br /&gt;
&lt;br /&gt;
			;Get coordinates, for your resolutions'  X,Y location of the popups (OK button) that will occur later.&lt;br /&gt;
			CenterX := Floor(Xmax/2)&lt;br /&gt;
			CenterY := Floor(Ymax/2)+109&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			;Offsets the search coordinates for OK popup for the imagesearch in Popup sub.&lt;br /&gt;
			;ImageSearch method (Popup sub)&lt;br /&gt;
			ClickPopX1 := CenterX - 40&lt;br /&gt;
			ClickPopY1 := CenterY - 30&lt;br /&gt;
&lt;br /&gt;
			ClickPopX2 := CenterX + 30&lt;br /&gt;
			ClickPopY2 := CenterY + 30&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
			} else {&lt;br /&gt;
			MsgBox, eGenesis Client not running, aborting...&lt;br /&gt;
			Exit&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SetDefaultMouseSpeed, 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
loop&lt;br /&gt;
{&lt;br /&gt;
MouseGetPos, skillX, skillY&lt;br /&gt;
PixelGetColor, color, skillX, skillY, RGB&lt;br /&gt;
&lt;br /&gt;
if color = 0x000000&lt;br /&gt;
{&lt;br /&gt;
ToolTip, Coordinates: %skillX%`, %skillY%`nColor: %color%`n`n* HOVERING BLACK *`n* Press F2 to set location *&lt;br /&gt;
} else {&lt;br /&gt;
ToolTip, Coordinates: %skillX%`, %skillY%`nColor: %color%&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GetKeyState, state, F2&lt;br /&gt;
if state = D&lt;br /&gt;
{&lt;br /&gt;
MsgBox Endurance text location recorded!`n`nNow pinup your Hackling Rake menu. Make sure it says &amp;quot;Seperate Rotten Flax (Step 1, Remove Straw)&amp;quot;`n`nHover mouse over that option and press F2 to record the click position.`n`nClick OK to proceed...&lt;br /&gt;
Tooltip&lt;br /&gt;
break&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
KeyWait, F2, D&lt;br /&gt;
if ErrorLevel = 0&lt;br /&gt;
{&lt;br /&gt;
MouseGetPos, ClickX, ClickY&lt;br /&gt;
Msgbox, Hackling Rake menu (Step 1) location recorded!`n`nNote: you can hit Ctrl+P to PAUSE script anytime and Ctrl+P again to RESUME`n`nClick OK to Start...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		if (Eat == &amp;quot;Yes&amp;quot;)&lt;br /&gt;
		{&lt;br /&gt;
&lt;br /&gt;
Msgbox, One more step! You have selected that you will be eating grilled foods!`n`nPinup the Esc, Skills, Consume menu and set the click position of the &amp;quot;Eat Grilled food&amp;quot; menu by hovering and hitting F2.`n`nNote: When this macro begins, it will first eat (so don't manually eat first).`n`nThen every 10 Teppy Mins (11:00 real time), it will automatically click/eat the grilled food.`n`nClick OK, then hit F2 over the grilled food consume menu to set...&lt;br /&gt;
&lt;br /&gt;
	WinActivate, eGenesis Client&lt;br /&gt;
&lt;br /&gt;
	KeyWait, F2, D&lt;br /&gt;
	if ErrorLevel = 0&lt;br /&gt;
	{&lt;br /&gt;
	MouseGetPos, EatX, EatY&lt;br /&gt;
	Msgbox, Eat location recorded!`n`nClick OK to eat food and start the macro...&lt;br /&gt;
&lt;br /&gt;
	EatTimer = 1&lt;br /&gt;
	#Persistent &lt;br /&gt;
	SetTimer, Eat, 1000&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SetDefaultMouseSpeed, 0&lt;br /&gt;
&lt;br /&gt;
	Gui, +AlwaysOnTop +ToolWindow&lt;br /&gt;
	Gui, Add, Text, vClickText, Preparing to start... Standby!`n`n`n`n&lt;br /&gt;
	Gui, Show&lt;br /&gt;
	GuiControl, Text, ClickText, Preparing to start... Standby!`n`n`n`n&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		loop&lt;br /&gt;
		{&lt;br /&gt;
&lt;br /&gt;
WinActivate, eGenesis Client&lt;br /&gt;
PixelGetColor, color, skillX, skillY, RGB&lt;br /&gt;
&lt;br /&gt;
	if color = 0x000000&lt;br /&gt;
	{&lt;br /&gt;
	MouseGetPos, OldX, OldY&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (step = 1) {&lt;br /&gt;
;Step 1 (Remove Straw) - Top/1st menu choice&lt;br /&gt;
Click %ClickX%, %ClickY%&lt;br /&gt;
} else if (step = 2) {&lt;br /&gt;
;Step 2 (Seperate) - 2nd menu choice&lt;br /&gt;
NewY := ClickY + 15&lt;br /&gt;
Click %ClickX%, %NewY%&lt;br /&gt;
} else if (step = 3) {&lt;br /&gt;
;Step 3 (Refine) - 2nd menu choice&lt;br /&gt;
NewY := ClickY + 15&lt;br /&gt;
Click %ClickX%, %NewY%&lt;br /&gt;
} else if (step = 4) {&lt;br /&gt;
;Clean Hackling Rake - Top/1st menu choice&lt;br /&gt;
Click %ClickX%, %ClickY%&lt;br /&gt;
step = 0&lt;br /&gt;
counter++&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
step++&lt;br /&gt;
MouseMove, %OldX%, %OldY%&lt;br /&gt;
Sleep 500&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GuiControl, Text, ClickText, %counter% of %Cycles% cycles`n`nStep: %step% of 5 until next cycle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;This searches for a popup box, which would suggest something likely went wrong&lt;br /&gt;
&lt;br /&gt;
;			PixelSearch, Px, Py, %CenterX%, %CenterY%, %CenterX%, %CenterY%, 0xECDFBD, 15, Fast|RGB&lt;br /&gt;
			ImageSearch, PopX, PopY, ClickPopX1, ClickPopY1, ClickPopX2, ClickPopY2, *50 OK.PNG&lt;br /&gt;
&lt;br /&gt;
			if ErrorLevel = 0&lt;br /&gt;
			{&lt;br /&gt;
			SoundPlay *16,1&lt;br /&gt;
			Msgbox, Pop Up box detected! Pausing macro...`n`nFind the problem, correct and hit Ctrl+P.`n`nYou will resume from where you left off at...`n`nIf your flax comb just broke, then Ctrl+R to reload.&lt;br /&gt;
			PAUSE&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
;End searching for popupbox&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		if (Eat == &amp;quot;Yes&amp;quot;)&lt;br /&gt;
		{&lt;br /&gt;
		GuiControl, Text, ClickText, %counter% of %Cycles% cycles`n`nStep: %step% of 5 until next cycle`n`nEat Grilled: %EatTimer%s of 660s&lt;br /&gt;
&lt;br /&gt;
		} else {&lt;br /&gt;
		GuiControl, Text, ClickText, %counter% of %Cycles% cycles`n`nStep: %step% of 5 until next cycle&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (Counter = Cycles)&lt;br /&gt;
break&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
		}&lt;br /&gt;
SoundPlay *16,1&lt;br /&gt;
GuiControl, Text, ClickText, Processed %Flax% rotten flax, Exiting...&lt;br /&gt;
PAUSE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Eat: &lt;br /&gt;
&lt;br /&gt;
	EatTimer --&lt;br /&gt;
&lt;br /&gt;
	GuiControl, Text, ClickText, %counter% of %Cycles% cycles`n`nStep: %step% of 5 until next cycle`n`nEat Grilled: %EatTimer%s of 660s&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	if EatTimer = 0&lt;br /&gt;
	{&lt;br /&gt;
	SoundPlay *64,1&lt;br /&gt;
	GuiControl, Text, ClickText, Eating grilled food...&lt;br /&gt;
	MouseGetPos, OldMX, OldMY&lt;br /&gt;
	;Click the Eat Grilled food menu&lt;br /&gt;
	Click, %EatX%, %EatY%			&lt;br /&gt;
	Sleep, 500&lt;br /&gt;
	MouseMove, %OldMX%, %OldMY%, 0			&lt;br /&gt;
	EatTimer = 660&lt;br /&gt;
	Sleep 1000&lt;br /&gt;
	}&lt;br /&gt;
	return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
^r::reload&lt;br /&gt;
^p::Pause&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cegaiel</name></author>
	</entry>
</feed>