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.

Difference between revisions of "User:Cegaiel/Macros/Potash/Code"

From A Tale in the Desert
Jump to navigationJump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<B>6 Kettles:</b> (12 Kettles at bottom)
+
<pre>
 +
;All new for Tale 5
 +
;Make Potash/Acid/Salt: 1-21 kettles
 +
 
 +
;Use 1280x1024 resolution.
 +
 
  
<pre>
+
;Pin Kettle #1-7 menus from left to right, starting at upper left corner
;Make Potash with 6 kettles (MAY work with other stoked kettle projects, just change coordinates of Click Potash button)
+
;Pin Kettle #8-14 below the above pinups/row
;Requires (1, 2, 3, 4, 5 runs):
+
;Pin Kettle #15-21 below the above pinups/row
;168, 336, 504, 672, 840 Wood
 
;150 Water
 
;30, 60, 90, 120, 150 Ash
 
  
;Pin 6 kettle menus from left to right
 
  
;Ctrl+Alt+W to start script
 
 
;Ctrl+R to reload
 
;Ctrl+R to reload
 
;Ctrl+P to pause
 
;Ctrl+P to pause
Line 21: Line 21:
 
;Likewise with stoking. It does not matter if you stoke the instant it hits zero wood or 29 seconds later, it wont speed anything up.
 
;Likewise with stoking. It does not matter if you stoke the instant it hits zero wood or 29 seconds later, it wont speed anything up.
  
^r::reload
+
 
^p::Pause
+
;Release Date: Oct 12, 2010
^!w::
+
;Author: Cegaiel
  
  
Line 34: Line 34:
 
Exit
 
Exit
 
}
 
}
 +
  
  
 
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
 
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
  
;======================================================================
 
;Check to see if we are in the correct resolution, or else exit script.
 
;You may remove this entire routine, if you wish.
 
 
if (Xmax = 1032) && (Ymax = 746)
 
{
 
nothing = 0
 
} else {
 
Msgbox, You are not in 1024x768 resolution`n`nExiting...
 
EXIT
 
}
 
;======================================================================
 
  
 +
Gui, +AlwaysOnTop +ToolWindow
 +
Gui, Add, Text,, Type of Kettles?
 +
Gui, Add, DropDownList, vKettle Choose1, Public or Guilded|Private
 +
Gui, Add, Text,, What are we making?
 +
Gui, Add, DropDownList, vMake Choose2, Acid|Potash|Salt
 +
Gui, Add, Text,, How many kettles?
 +
Gui, Add, DropDownList, vNumKettles Choose10, 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21
  
  
Gui, +AlwaysOnTop +ToolWindow
+
Gui, Add, Text,, How many runs?
Gui, Add, Text,, Type of Kettles?
+
Gui, Add, Edit, vRuns wp number, 1
Gui, Add, DropDownList, vKettle Choose1, Private|Public
+
Gui, Add, Button, Default gStart, BEGIN
Gui, Add, Button, Default gStart, GO
 
 
Gui, Show
 
Gui, Show
 
return
 
return
Line 62: Line 57:
  
 
Start:
 
Start:
seconds = 5
 
  
 
Gui, Submit
 
Gui, Submit
 
Gui, Destroy
 
Gui, Destroy
Msgbox, Ingredients needed to run 6 kettles:`n`n168 Wood`n150 Water`n30 Ash`n`nMake sure you have that in your inventory!`n`nKettle Type: %Kettle%`n`nClick OK to continue...
 
Gui, +AlwaysOnTop +ToolWindow
 
Gui, Font, bold
 
Gui, Add, Text, vMineCycleText, %seconds% seconds before the script will begin ...
 
Gui, Font, norm
 
Gui, Show
 
GuiControl, Text, MineCycleText, %seconds% seconds before the script will begin ...
 
  
 +
Counter = 0
 +
Wood := (28 * runs * NumKettles)
 +
Water := (25 * runs * NumKettles)
 +
Salt := (1 * runs * NumKettles)
 +
Ash := (5 * runs * NumKettles)
 +
 +
 +
 +
 +
 +
;Note Acid and Salt are on same X, just different Y
  
 +
if (Make == "Acid") {
 +
OutputTotal := (3 * NumKettles * runs)
 +
Msgbox, Ingredients needed to run %NumKettles% kettles (%runs% runs):`n`n%wood% Wood minimum (a few extra just in case)`n%water% Sulphurous Water`n%salt% Salt`n`nMake sure you have that in your inventory!`n`nYield: 3 Acid per kettle`nTotal: %OutputTotal% Acid (%runs% runs)`n`nKettle Type: %Kettle%`n`nClick OK to continue or Ctrl+R to reload script...
  
  
 +
;Position of the ACID button
 +
PotashX1 = 125
 +
PotashX2 = 295
 +
PotashX3 = 465
 +
PotashX4 = 635
 +
PotashX5 = 805
 +
PotashX6 = 975
 +
PotashX7 = 1145
  
  
Loop, %seconds%
+
PotashY = 265 ;+260
{
+
PotashY2 = 525
GuiControl, Text, MineCycleText, %seconds% seconds before the script will begin ...
+
PotashY3 = 785
seconds --
 
Sleep 1000
 
}
 
  
SetDefaultMouseSpeed, 0
 
  
 +
} else if (Make == "Salt") {
 +
OutputTotal := (3 * NumKettles * runs)
 +
Msgbox, Ingredients needed to run %NumKettles% kettles (%runs% runs):`n`n%wood% Wood minimum (a few extra just in case)`n%water% Coconut Water`n`nMake sure you have that in your inventory!`n`nYield: 3 Salt per kettle`nTotal: %OutputTotal% Salt (%runs% runs)`n`nKettle Type: %Kettle%`n`nClick OK to continue or Ctrl+R to reload script...
  
GuiControl, Text, MineCycleText, Focusing to eGenesis client ...
 
  
WinActivate, eGenesis Client
 
  
;Click Potash Button
 
  
PotashY = 165
+
;Position of the SALT button
if (Kettle == "Public")
+
PotashX1 = 125
PotashY := PotashY + 15
+
PotashX2 = 295
 +
PotashX3 = 465
 +
PotashX4 = 635
 +
PotashX5 = 805
 +
PotashX6 = 975
 +
PotashX7 = 1145
  
  
GuiControl, Text, MineCycleText, Clicking Potash, Pot 1
+
PotashY = 240
Click, 45, %PotashY% ;Pot 1
+
PotashY2 = 500
sleep 200
+
PotashY3 = 760
GuiControl, Text, MineCycleText, Click Potash, Pot 2
 
Click, 220, %PotashY% ;Pot 2
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 3
 
Click, 385, %PotashY% ;Pot 3
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 4
 
Click, 555, %PotashY% ;Pot 4
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 5
 
Click, 725, %PotashY% ;Pot 5
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 6
 
Click, 890, %PotashY% ;Pot 6
 
sleep 200
 
  
  
;Click Begin button
 
  
BeginIgniteY = 240
 
if (Kettle == "Public")
 
BeginIgniteY := BeginIgniteY + 15
 
  
  
GuiControl, Text, MineCycleText, Click Begin, Pot 1
+
} else if (Make == "Potash") {
Click, 45, %BeginIgniteY% ;Pot 1
+
OutputTotal := (5 * NumKettles * runs)
sleep 200
+
Msgbox, Ingredients needed to run %NumKettles% kettles (%runs% runs):`n`n%wood% Wood minimum (a few extra just in case)`n%water% Water`n%ash% Ash`n`nMake sure you have that in your inventory!`n`nYield: 5 Potash per kettle`nTotal: %OutputTotal% Potash (%runs% runs)`n`nKettle Type: %Kettle%`n`nClick OK to continue or Ctrl+R to reload script...
GuiControl, Text, MineCycleText, Click Begin, Pot 2
 
Click, 220, %BeginIgniteY% ;Pot 2
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 3
 
Click, 385, %BeginIgniteY% ;Pot 3
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 4
 
Click, 555, %BeginIgniteY% ;Pot 4
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 5
 
Click, 725, %BeginIgniteY% ;Pot 5
 
sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 6
 
Click, 890, %BeginIgniteY% ;Pot 6
 
sleep 200
 
  
  
 +
;Position of the POTASH button
 +
PotashX1 = 45 ;+170
 +
PotashX2 = 215
 +
PotashX3 = 385
 +
PotashX4 = 555
 +
PotashX5 = 725
 +
PotashX6 = 890
 +
PotashX7 = 1060
  
  
;Click Ignite + Max button, then Refresh Menu (to show Stoke Max option)
+
PotashY = 170 ;+260
 +
PotashY2 = 430
 +
PotashY3 = 690
 +
}
  
MaxButtonX = 515
 
MaxButtonY = 420
 
  
;Pot 1
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 1
 
Click, 45, %BeginIgniteY% ;Ignite
 
sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
sleep 200
 
Click, 70, 45 ;Click Menu to refresh
 
sleep 200
 
  
;Pot 2
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 2
 
Click, 220, %BeginIgniteY% ;Ignite
 
sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
sleep 200
 
Click, 245, 45 ;Click Menu to refresh
 
sleep 200
 
  
;Pot 3
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 3
 
Click, 385, %BeginIgniteY% ;Ignite
 
sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
sleep 200
 
Click, 415, 45 ;Click Menu to refresh
 
sleep 200
 
  
;Pot 4
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 4
 
Click, 555, %BeginIgniteY% ;Ignite
 
sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
sleep 200
 
Click, 580, 45 ;Click Menu to refresh
 
sleep 200
 
  
;Pot 5
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 5
 
Click, 725, %BeginIgniteY% ;Ignite
 
sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
sleep 200
 
Click, 750, 45 ;Click Menu to refresh
 
sleep 200
 
  
;Pot 6
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 6
 
Click, 890, %BeginIgniteY% ;Ignite
 
sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
sleep 200
 
Click, 915, 45 ;Click Menu to refresh
 
sleep 200
 
  
 +
;This is where the Stoke Max option appears on the menu
 +
StokeMaxX1 = 70 ;+170
 +
StokeMaxX2 = 240
 +
StokeMaxX3 = 410
 +
StokeMaxX4 = 580
 +
StokeMaxX5 = 750
 +
StokeMaxX6 = 920
 +
StokeMaxX7 = 1090
  
  
 +
StokeMaxY = 75 ;+260
 +
StokeMaxY2 = 335
 +
StokeMaxY3 = 595
  
;Stoke 1 countdown
 
  
seconds = 132
 
Loop, %seconds%
 
{
 
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 1/5  (24 water)
 
seconds --
 
Sleep 1000
 
  
GetKeyState, state, F2
 
if state = D
 
break
 
}
 
  
Gosub, StokeMax
+
;Max button, this is after the pot is ignited and asks for Quantity, we hit the Max button instead of typing a number
 +
; This is hard coded at 1280x1024 . This would likely be the only values you need to change if you try other resolutions
 +
MaxButtonX = 645
 +
MaxButtonY = 555
  
  
  
  
;Stoke 2 (19 water) countdown
+
;The Begin, Ignite and Take button appear in the same place, so these apply to all three.
 +
BeginIgniteTakeX1 = 50 ;+170
 +
BeginIgniteTakeX2 = 220
 +
BeginIgniteTakeX3 = 390
 +
BeginIgniteTakeX4 = 560
 +
BeginIgniteTakeX5 = 730
 +
BeginIgniteTakeX6 = 900
 +
BeginIgniteTakeX7 = 1070
  
seconds = 165
 
Loop, %seconds%
 
{
 
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 2/5  (19 water)
 
seconds --
 
Sleep 1000
 
  
GetKeyState, state, F2
+
BeginIgniteTakeY = 240 ;+260
if state = D
+
BeginIgniteTakeY2 = 500
{
+
BeginIgniteTakeY3 = 760
break
 
}
 
  
}
 
  
Gosub, StokeMax
 
  
  
  
;Stoke 3 (14 water) countdown
+
;NOTE: PotashY, StokeMaxY and BeginIgniteTakeY is set to Y position in Private kettle setting.
 +
;If this is a public kettle AND you are trying to change numbers for another resolution, then note:
 +
;The coords are adjusted for public below, take that into consideration.
 +
;If you dont have any of your own kettles and will change numbers for a different resolution, then
 +
;Just plug in all the numbers above (center of buttons) and launch the script and choose "Private" kettle, even though it is "Public"
  
seconds = 165
+
if (Kettle == "Public or Guilded")
Loop, %seconds%
 
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 3/5  (14 water)
+
;If the kettle is public then it lowers 15 coords at 1024x768 (will vary with other resolutions)
seconds --
+
PotashY := PotashY + 15
Sleep 1000
+
BeginIgniteTakeY := BeginIgniteTakeY + 15
 +
StokeMaxY := StokeMaxY + 15
  
GetKeyState, state, F2
+
PotashY2 := PotashY2 + 30
if state = D
+
BeginIgniteTakeY2 := BeginIgniteTakeY2 + 30
break
+
StokeMaxY2 := StokeMaxY2 + 30
  
 +
PotashY3 := PotashY3 + 45
 +
BeginIgniteTakeY3 := BeginIgniteTakeY3 + 45
 +
StokeMaxY3 := StokeMaxY3 + 45
 
}
 
}
  
Gosub, StokeMax
 
  
  
  
;Stoke 4 (9 water) countdown
 
  
seconds = 165
 
Loop, %seconds%
 
{
 
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 4/5  (9 water)
 
seconds --
 
Sleep 1000
 
  
GetKeyState, state, F2
+
;Make sure the RefreshY line stays after the 'if (Kettle == "Public")' line
if state = D
+
;This is the Y button of when it clicks the top of the menu to refresh the menu
break
+
 
}
 
  
Gosub, StokeMax
+
RefreshY := (StokeMaxY - 25)
 +
RefreshY2 := (StokeMaxY2 - 25)
 +
RefreshY3 := (StokeMaxY3 - 25)
  
  
;Stoke 5 (6 water) countdown
 
  
seconds = 96
 
Loop, %seconds%
 
{
 
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 5/5  (6 water)
 
seconds --
 
Sleep 1000
 
GetKeyState, state, F2
 
if state = D
 
break
 
}
 
  
Gosub, StokeMax
+
Gui, +AlwaysOnTop +ToolWindow
 +
Gui, Font, normal
 +
Gui, Add, Text, vMineCycleText, Preparing to start script, please stand by ...`n`n`n`n`n`n`n`n`n
 +
Gui, Show
  
  
;Countdown until complete
+
delay = 10
seconds = 176
+
Loop, %delay%
Loop, %seconds%
 
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Kettles complete...
+
GuiControl, Text, MineCycleText, %delay% seconds before the script will begin ...`n`nMove this out of way`n`nDont cover any pinups!`n`nDont leave anywhere near middle of screen (Load/Stoke Max wood popup)`n`nCtrl+P to Pause/Resume if needed...
seconds --
+
delay --
 
Sleep 1000
 
Sleep 1000
 
}
 
}
  
 +
SetDefaultMouseSpeed, 0
  
;Click Take button
 
WinActivate, eGenesis Client
 
  
GuiControl, Text, MineCycleText, Taking, Pot 1
+
GuiControl, Text, MineCycleText, Focusing to eGenesis client ...
Click, 45, %BeginIgniteY1% ;Pot 1
 
Sleep 200
 
GuiControl, Text, MineCycleText, Taking, Pot 2
 
Click, 220, %BeginIgniteY1% ;Pot 2
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 3
 
Click, 385, %BeginIgniteY1% ;Pot 3
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 4
 
Click, 555, %BeginIgniteY1% ;Pot 4
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 5
 
Click, 725, %BeginIgniteY1% ;Pot 5
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 6
 
Click, 890, %BeginIgniteY1% ;Pot 6
 
Sleep 200
 
  
 +
WinActivate, eGenesis Client
 +
Sleep 500
  
  
Gui, Destroy
 
Gui, Add, Text,, Done!.
 
Gui, Show
 
return
 
  
 +
Loop, %Runs%
 +
{
 +
counter ++
 +
stoke = 0
 +
waterlevel = -
 +
countdown = 0
 +
seconds = 0
 +
minutes = 0
 +
seconds_eta = 25
 +
minutes_eta = 15
 +
cseconds = 0
 +
cminutes = 0
 +
sSeconds = 0
 +
sMinutes = 0
 +
 +
;Click Potash/Acid/Salt Button
  
 +
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Clicking "%make%" buttons...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
  
  
StokeMax:
+
if (NumKettles >= 1)
 +
{
 +
Click, %PotashX1%, %PotashY% ;Pot 1
 +
sleep 200
 +
}
 +
if (NumKettles >= 2)
 +
{
 +
Click, %PotashX2%, %PotashY% ;Pot 2
 +
sleep 200
 +
}
 +
if (NumKettles >= 3)
 +
{
 +
Click, %PotashX3%, %PotashY% ;Pot 3
 +
sleep 200
 +
}
 +
if (NumKettles >= 4)
 +
{
 +
Click, %PotashX4%, %PotashY% ;Pot 4
 +
sleep 200
 +
}
 +
if (NumKettles >= 5)
 +
{
 +
Click, %PotashX5%, %PotashY% ;Pot 5
 +
sleep 200
 +
}
 +
if (NumKettles >= 6)
 +
{
 +
Click, %PotashX6%, %PotashY% ;Pot 6
 +
sleep 200
 +
}
 +
if (NumKettles >= 7)
 +
{
 +
Click, %PotashX7%, %PotashY% ;Pot 7
 +
sleep 200
 +
}
  
WinActivate, eGenesis Client
+
if (NumKettles >= 8)
 +
{
 +
Click, %PotashX1%, %PotashY2% ;Pot 8
 +
sleep 200
 +
}
 +
if (NumKettles >= 9)
 +
{
 +
Click, %PotashX2%, %PotashY2% ;Pot 9
 +
sleep 200
 +
}
 +
if (NumKettles >= 10)
 +
{
 +
Click, %PotashX3%, %PotashY2% ;Pot 10
 +
sleep 200
 +
}
 +
if (NumKettles >= 11)
 +
{
 +
Click, %PotashX4%, %PotashY2% ;Pot 11
 +
sleep 200
 +
}
 +
if (NumKettles >= 12)
 +
{
 +
Click, %PotashX5%, %PotashY2% ;Pot 12
 +
sleep 200
 +
}
 +
if (NumKettles >= 13)
 +
{
 +
Click, %PotashX6%, %PotashY2% ;Pot 13
 +
sleep 200
 +
}
 +
if (NumKettles >= 14)
 +
{
 +
Click, %PotashX7%, %PotashY2% ;Pot 14
 +
sleep 200
 +
}
  
StokeMaxY = 75
 
if (Kettle == "Public")
 
StokeMaxY := StokeMaxY + 15
 
  
 
+
if (NumKettles >= 15)
;Click Stoke Max
+
{
MouseGetPos, OldMX, OldMY
+
Click, %PotashX1%, %PotashY3% ;Pot 15
GuiControl, Text, MineCycleText, Stoking, Pot 1
+
sleep 200
Click, 50, %StokeMaxY% ; Pot 1
+
}
 +
if (NumKettles >= 16)
 +
{
 +
Click, %PotashX2%, %PotashY3% ;Pot 16
 
sleep 200
 
sleep 200
GuiControl, Text, MineCycleText, Stoking, Pot 2
+
}
Click, 250, %StokeMaxY% ; Pot 2
+
if (NumKettles >= 17)
 +
{
 +
Click, %PotashX3%, %PotashY3% ;Pot 17
 
sleep 200
 
sleep 200
GuiControl, Text, MineCycleText, Stoking, Pot 3
+
}
Click, 420, %StokeMaxY% ; Pot 3
+
if (NumKettles >= 18)
 +
{
 +
Click, %PotashX4%, %PotashY3% ;Pot 18
 
sleep 200
 
sleep 200
GuiControl, Text, MineCycleText, Stoking, Pot 4
+
}
Click, 590, %StokeMaxY% ; Pot 4
+
if (NumKettles >= 19)
 +
{
 +
Click, %PotashX5%, %PotashY3% ;Pot 19
 
sleep 200
 
sleep 200
GuiControl, Text, MineCycleText, Stoking, Pot 5
+
}
Click, 750, %StokeMaxY% ; Pot 5
+
if (NumKettles >= 20)
 +
{
 +
Click, %PotashX6%, %PotashY3% ;Pot 20
 
sleep 200
 
sleep 200
GuiControl, Text, MineCycleText, Stoking, Pot 6
+
}
Click, 910, %StokeMaxY% ; Pot 6
+
if (NumKettles >= 21)
 +
{
 +
Click, %PotashX7%, %PotashY3% ;Pot 21
 
sleep 200
 
sleep 200
MouseMove, %OldMX%, %OldMY%, 0
+
}
return
 
</pre>
 
  
  
  
 +
;Click Begin button
  
 +
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Clicking "Begin" buttons...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
  
  
----
+
if (NumKettles >= 1)
 +
{
 +
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY% ;Pot 1
 +
sleep 200
 +
}
 +
if (NumKettles >= 2)
 +
{
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY% ;Pot 2
 +
sleep 200
 +
}
 +
if (NumKettles >= 3)
 +
{
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY% ;Pot 3
 +
sleep 200
 +
}
 +
if (NumKettles >= 4)
 +
{
 +
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY% ;Pot 4
 +
sleep 200
 +
}
 +
if (NumKettles >= 5)
 +
{
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY% ;Pot 5
 +
sleep 200
 +
}
 +
if (NumKettles >= 6)
 +
{
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY% ;Pot 6
 +
sleep 200
 +
}
 +
if (NumKettles >= 7)
 +
{
 +
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY% ;Pot 7
 +
sleep 200
 +
}
  
  
 +
if (NumKettles >= 8)
 +
{
 +
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY2% ;Pot 8
 +
sleep 200
 +
}
 +
if (NumKettles >= 9)
 +
{
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY2% ;Pot 9
 +
sleep 200
 +
}
 +
if (NumKettles >= 10)
 +
{
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY2% ;Pot 10
 +
sleep 200
 +
}
 +
if (NumKettles >= 11)
 +
{
 +
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY2% ;Pot 11
 +
sleep 200
 +
}
 +
if (NumKettles >= 12)
 +
{
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY2% ;Pot 12
 +
sleep 200
 +
}
 +
if (NumKettles >= 13)
 +
{
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY2% ;Pot 13
 +
sleep 200
 +
}
 +
if (NumKettles >= 14)
 +
{
 +
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY2% ;Pot 14
 +
sleep 200
 +
}
  
 +
if (NumKettles >= 15)
 +
{
 +
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY3% ;Pot 15
 +
sleep 200
 +
}
 +
if (NumKettles >= 16)
 +
{
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY3% ;Pot 16
 +
sleep 200
 +
}
 +
if (NumKettles >= 17)
 +
{
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY3% ;Pot 17
 +
sleep 200
 +
}
 +
if (NumKettles >= 18)
 +
{
 +
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY3% ;Pot 18
 +
sleep 200
 +
}
 +
if (NumKettles >= 19)
 +
{
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY3% ;Pot 19
 +
sleep 200
 +
}
 +
if (NumKettles >= 20)
 +
{
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY3% ;Pot 20
 +
sleep 200
 +
}
 +
if (NumKettles >= 21)
 +
{
 +
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY3% ;Pot 21
 +
sleep 200
 +
}
  
  
<B>12 Kettles:</b>
 
  
<pre>
+
;Click Ignite + Max button, then Refresh Menu (to show Stoke Max option)
;Make Potash, Acid, Salt, Sulfur with 12 kettles (MAY work with other stoked kettle projects, just change coordinates of Click Potash button)
 
;Requires (per run):
 
;336 Wood
 
;300 Water
 
;60 Ash
 
  
;Pin 2 rows of 6 kettle menus, from left to right
+
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Igniting + Adding Max Wood...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
  
;Ctrl+Alt+W to start script
 
;Ctrl+R to reload
 
;Ctrl+P to pause
 
;Emergency: Hold F2 button down 2 seconds to Abort current countdown and hit Stoke Max immediately on all pots
 
;Only the current countdown will abort. It will move on to the next countdown and continue normally.
 
  
;Trust the script, only use Emergency F2 when you have more than 32s when the Wood count turns to zero
 
;As long as there is less than 32s, when the wood hits zero, then dont interupt the script
 
;When it hits zero wood, its still a full 32 seconds before the kettle goes out
 
;Likewise with stoking. It does not matter if you stoke the instant it hits zero wood or 29 seconds later, it wont speed anything up.
 
  
; Date: 4/28/2010
+
if (NumKettles >= 1)
 +
{
 +
;Pot 1
 +
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX1%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 2)
 +
{
 +
;Pot 2
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX2%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 3)
 +
{
 +
;Pot 3
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX3%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 4)
 +
{
 +
;Pot 4
 +
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX4%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 5)
 +
{
 +
;Pot 5
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX5%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 6)
 +
{
 +
;Pot 6
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX6%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 7)
 +
{
 +
;Pot 7
 +
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX7%, %RefreshY% ;Click Menu to refresh
 +
sleep 200
 +
}
  
^r::reload
 
^p::Pause
 
^!w::
 
  
  
 +
if (NumKettles >= 8)
 +
{
 +
;Pot 8
 +
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY2% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX1%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 9)
 +
{
 +
;Pot 9
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY2% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX2%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 10)
 +
{
 +
;Pot 10
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY2% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX3%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 11)
 +
{
 +
;Pot 11
 +
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY2% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX4%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 12)
 +
{
 +
;Pot 12
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY2% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX5%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 +
}
  
IfWinExist eGenesis Client
+
if (NumKettles >= 13)
 +
{
 +
;Pot 13
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY2% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX6%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 14)
 
{
 
{
WinGet, GameWinHandle, ID, eGenesis Client
+
;Pot 14
} else {
+
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY2% ;Ignite
Msgbox, eGenesis client not running, exiting...
+
sleep 200
Exit
+
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX7%, %RefreshY2% ;Click Menu to refresh
 +
sleep 200
 
}
 
}
  
  
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
+
if (NumKettles >= 15)
 +
{
 +
;Pot 15
 +
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY3% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX1%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 16)
 +
{
 +
;Pot 16
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY3% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX2%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 17)
 +
{
 +
;Pot 17
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY3% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX3%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 18)
 +
{
 +
;Pot 18
 +
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY3% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX4%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 19)
 +
{
 +
;Pot 19
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY3% ;Ignite
 +
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX5%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 +
}
  
;======================================================================
+
if (NumKettles >= 20)
;Check to see if we are in the correct resolution, or else exit script.
+
{
;You may remove this entire routine, if you wish.
+
;Pot 20
 
+
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY3% ;Ignite
if (Xmax = 1032) && (Ymax = 746)
+
sleep 200
 +
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX6%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 +
}
 +
if (NumKettles >= 21)
 
{
 
{
nothing = 0
+
;Pot 21
} else {
+
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY3% ;Ignite
Msgbox, You are not in 1024x768 resolution`n`nExiting...
+
sleep 200
EXIT
+
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 +
sleep 200
 +
Click, %StokeMaxX7%, %RefreshY3% ;Click Menu to refresh
 +
sleep 200
 
}
 
}
;======================================================================
 
  
  
  
Gui, +AlwaysOnTop +ToolWindow
 
Gui, Add, Text,, Type of Kettles?
 
Gui, Add, DropDownList, vKettle Choose2, Private|Public
 
Gui, Add, Text,, What are you making?
 
Gui, Add, DropDownList, vType Choose2, Acid|Potash|Salt|Sulfur
 
Gui, Add, Text,, How Many Runs (1)?
 
Gui, Add, Edit, vTurns wp number
 
  
Gui, Add, Button, Default gStart, GO
 
Gui, Show
 
return
 
  
  
Start:
 
seconds = 5
 
  
Gui, Submit
 
Gui, Destroy
 
Msgbox, Ingredients needed to run 12 kettles:`n`n336 Wood`n300 Water`n60 Ash`n`nMake sure you have that in your inventory!`n`nKettle Type: %Kettle%`n`nClick OK to continue...
 
Gui, +AlwaysOnTop +ToolWindow
 
Gui, Font, bold
 
Gui, Add, Text, vMineCycleText, %seconds% seconds before the script will begin ...
 
Gui, Font, norm
 
Gui, Show
 
GuiControl, Text, MineCycleText, %seconds% seconds before the script will begin ...
 
  
 +
 +
 +
;This begins the Elapsed and ETA timers
 +
#Persistent
 +
SetTimer, Timer, 1000
  
  
  
 +
;Stoke 1 countdown (@ 24 water, first 3 waters dont get burned off after you first start a kettle
  
 +
waterlevel = 24
 +
cminutes = 2
 +
cseconds = 12
 +
;countdown = 132
 +
GoSub, SetCountdown
  
Loop, %seconds%
+
Loop, %countdown%
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds before the script will begin ...
 
seconds --
 
Sleep 1000
 
}
 
  
SetDefaultMouseSpeed, 0
+
Gosub, StokeTimer
 +
 
 +
GetKeyState, state, F2
 +
if state = D
 +
break
 +
}
 +
 
 +
waterlevel = 19
 +
Gosub, StokeMax
  
  
GuiControl, Text, MineCycleText, Focusing to eGenesis client ...
 
  
WinActivate, eGenesis Client
 
  
;Potash and Sulfur have same X
+
;Stoke 2 (@ 19 water) countdown
;Salt and Acid have same X
 
  
 +
cminutes = 2
 +
cseconds = 43
 +
;countdown = 163
 +
GoSub, SetCountdown
  
if (Type == "Potash")
+
Loop, %countdown%
 
{
 
{
TypeX1 := 45
 
TypeX2 := 220
 
TypeX3 := 385
 
TypeX4 := 555
 
TypeX5 := 725
 
TypeX6 := 890
 
  
TypeY1 := 165
+
Gosub, StokeTimer
TypeY2 := 423
 
  
} else if (Type == "Sulfur") {
+
GetKeyState, state, F2
 +
if state = D
 +
{
 +
break
 +
}
 +
}
  
TypeX1 := 45
+
waterlevel = 14
TypeX2 := 220
+
Gosub, StokeMax
TypeX3 := 385
 
TypeX4 := 555
 
TypeX5 := 725
 
TypeX6 := 890
 
  
TypeY1 := 283
 
TypeY2 := 560
 
  
} else if (Type == "Salt") {
 
  
TypeX1 := 126
+
;Stoke 3 (@ 14 water) countdown
TypeX2 := 295
 
TypeX3 := 465
 
TypeX4 := 634
 
TypeX5 := 802
 
TypeX6 := 968
 
  
TypeY1 := 258
+
cminutes = 2
TypeY2 := 533
+
cseconds = 43
 +
;countdown = 163
 +
GoSub, SetCountdown
  
} else if (Type == "Acid") {
+
Loop, %countdown%
 +
{
  
TypeX1 := 126
+
Gosub, StokeTimer
TypeX2 := 295
 
TypeX3 := 465
 
TypeX4 := 634
 
TypeX5 := 802
 
TypeX6 := 968
 
  
TypeY1 := 283
+
GetKeyState, state, F2
TypeY2 := 558
+
if state = D
 +
{
 +
break
 +
}
 +
}
 +
 
 +
waterlevel = 9
 +
Gosub, StokeMax
  
}
 
  
  
 +
;Stoke 4 (@ 9 water) countdown
  
 +
cminutes = 2
 +
cseconds = 43
 +
;countdown = 163
 +
GoSub, SetCountdown
  
if (Kettle == "Public")
+
Loop, %countdown%
 
{
 
{
TypeY1 := TypeY1 + 15
+
 
TypeY2 := TypeY2 + 30
+
Gosub, StokeTimer
 +
 
 +
GetKeyState, state, F2
 +
if state = D
 +
{
 +
break
 +
}
 
}
 
}
  
Loop, %Turns%
+
waterlevel = 6
{
+
Gosub, StokeMax
  
  
;Click Type (Potash, Acid, Sulfur, Salt) Button
+
;Stoke 5 (@ 6 water) countdown
  
GuiControl, Text, MineCycleText, Clicking Potash, Pot 1
+
cminutes = 1
Click, %TypeX1%, %TypeY1% ;Pot 1
+
cseconds = 36
Sleep 200
+
;countdown = 96
GuiControl, Text, MineCycleText, Click Potash, Pot 2
+
GoSub, SetCountdown
Click, %TypeX2%, %TypeY1% ;Pot 2
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 3
 
Click, %TypeX3%, %TypeY1% ;Pot 3
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 4
 
Click, %TypeX4%, %TypeY1% ;Pot 4
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 5
 
Click, %TypeX5%, %TypeY1% ;Pot 5
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 6
 
Click, %TypeX6%, %TypeY1% ;Pot 6
 
Sleep 200
 
  
GuiControl, Text, MineCycleText, Clicking Potash, Pot 7
+
Loop, %countdown%
Click, %TypeX1%, %TypeY2% ;Pot 7
+
{
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 8
 
Click, %TypeX2%, %TypeY2% ;Pot 8
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 9
 
Click, %TypeX3%, %TypeY2% ;Pot 9
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 10
 
Click, %TypeX4%, %TypeY2% ;Pot 10
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 11
 
Click, %TypeX5%, %TypeY2% ;Pot 11
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Potash, Pot 12
 
Click, %TypeX6%, %TypeY2% ;Pot 12
 
Sleep 200
 
  
 +
Gosub, StokeTimer
  
 +
GetKeyState, state, F2
 +
if state = D
 +
{
 +
break
 +
}
 +
}
  
 +
waterlevel = N/A
 +
Gosub, StokeMax
  
  
 +
;Countdown until complete
 +
cminutes = 3
 +
cseconds = 12
 +
;countdown = 192
 +
GoSub, SetCountdown
  
BeginIgniteY1 = 240
+
Loop, %countdown%
BeginIgniteY2 = 500
 
if (Kettle == "Public")
 
 
{
 
{
BeginIgniteY1 := BeginIgniteY1 + 15
+
 
BeginIgniteY2 := BeginIgniteY2 + 30
+
Gosub, StokeTimer
 
}
 
}
  
;Click Begin button
 
  
GuiControl, Text, MineCycleText, Click Begin, Pot 1
+
cminutes = 0
Click, 45, %BeginIgniteY1% ;Pot 1
+
cseconds = 0
Sleep 200
+
} ; End Runs Loop
GuiControl, Text, MineCycleText, Click Begin, Pot 2
 
Click, 220, %BeginIgniteY1% ;Pot 2
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 3
 
Click, 385, %BeginIgniteY1% ;Pot 3
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 4
 
Click, 555, %BeginIgniteY1% ;Pot 4
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 5
 
Click, 725, %BeginIgniteY1% ;Pot 5
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 6
 
Click, 890, %BeginIgniteY1% ;Pot 6
 
Sleep 200
 
  
GuiControl, Text, MineCycleText, Click Begin, Pot 7
 
Click, 45, %BeginIgniteY2% ;Pot 7
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 8
 
Click, 220, %BeginIgniteY2% ;Pot 8
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 9
 
Click, 385, %BeginIgniteY2% ;Pot 9
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 10
 
Click, 555, %BeginIgniteY2% ;Pot 10
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 11
 
Click, 725, %BeginIgniteY2% ;Pot 11
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 12
 
Click, 890, %BeginIgniteY2% ;Pot 12
 
Sleep 200
 
  
  
  
;Click Ignite + Max button, then Refresh Menu (to show Stoke Max option)
+
;Click Take button
 +
WinActivate, eGenesis Client
  
MaxButtonX = 520
+
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nFinish: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Taking items from kettle...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
MaxButtonY = 423
 
  
;Pot 1
+
if (NumKettles >= 1)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 1
+
{
Click, 45, %BeginIgniteY1% ;Ignite
+
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY% ;Pot 1
 
Sleep 200
 
Sleep 200
Click, %MaxButtonX%, %MaxButtonY% ;Max button
+
}
 +
if (NumKettles >= 2)
 +
{
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY% ;Pot 2
 
Sleep 200
 
Sleep 200
Click, 70, 45 ;Click Menu to refresh
+
}
 +
if (NumKettles >= 3)
 +
{
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY% ;Pot 3
 
Sleep 200
 
Sleep 200
 
+
}
;Pot 2
+
if (NumKettles >= 4)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 2
+
{
Click, 220, %BeginIgniteY1% ;Ignite
+
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY% ;Pot 4
 
Sleep 200
 
Sleep 200
Click, %MaxButtonX%, %MaxButtonY% ;Max button
+
}
 +
if (NumKettles >= 5)
 +
{
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY% ;Pot 5
 
Sleep 200
 
Sleep 200
Click, 245, 45 ;Click Menu to refresh
+
}
 +
if (NumKettles >= 6)
 +
{
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY% ;Pot 6
 
Sleep 200
 
Sleep 200
 
+
}
;Pot 3
+
if (NumKettles >= 7)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 3
+
{
Click, 385, %BeginIgniteY1% ;Ignite
+
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY% ;Pot 7
Sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
Sleep 200
 
Click, 415, 45 ;Click Menu to refresh
 
 
Sleep 200
 
Sleep 200
 +
}
  
;Pot 4
+
if (NumKettles >= 8)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 4
+
{
Click, 555, %BeginIgniteY1% ;Ignite
+
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY2% ;Pot 8
 
Sleep 200
 
Sleep 200
Click, %MaxButtonX%, %MaxButtonY% ;Max button
+
}
 +
if (NumKettles >= 9)
 +
{
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY2% ;Pot 9
 
Sleep 200
 
Sleep 200
Click, 580, 45 ;Click Menu to refresh
+
}
 +
if (NumKettles >= 10)
 +
{
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY2% ;Pot 10
 
Sleep 200
 
Sleep 200
 
+
}
;Pot 5
+
if (NumKettles >= 11)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 5
+
{
Click, 725, %BeginIgniteY1% ;Ignite
+
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY2% ;Pot 11
 
Sleep 200
 
Sleep 200
Click, %MaxButtonX%, %MaxButtonY% ;Max button
+
}
 +
if (NumKettles >= 12)
 +
{
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY2% ;Pot 12
 
Sleep 200
 
Sleep 200
Click, 750, 45 ;Click Menu to refresh
+
}
 +
if (NumKettles >= 13)
 +
{
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY2% ;Pot 13
 
Sleep 200
 
Sleep 200
 
+
}
;Pot 6
+
if (NumKettles >= 14)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 6
+
{
Click, 890, %BeginIgniteY1% ;Ignite
+
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY2% ;Pot 14
Sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
Sleep 200
 
Click, 915, 45 ;Click Menu to refresh
 
 
Sleep 200
 
Sleep 200
 +
}
  
 
+
if (NumKettles >= 15)
;Pot 7
+
{
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 7
+
Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY3% ;Pot 15
Click, 45, %BeginIgniteY2% ;Ignite
 
 
Sleep 200
 
Sleep 200
Click, %MaxButtonX%, %MaxButtonY% ;Max button
+
}
 +
if (NumKettles >= 16)
 +
{
 +
Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY3% ;Pot 16
 
Sleep 200
 
Sleep 200
Click, 70, 305 ;Click Menu to refresh
+
}
 +
if (NumKettles >= 17)
 +
{
 +
Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY3% ;Pot 17
 
Sleep 200
 
Sleep 200
 
+
}
;Pot 8
+
if (NumKettles >= 18)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 8
+
{
Click, 220, %BeginIgniteY2% ;Ignite
+
Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY3% ;Pot 18
 
Sleep 200
 
Sleep 200
Click, %MaxButtonX%, %MaxButtonY% ;Max button
+
}
 +
if (NumKettles >= 19)
 +
{
 +
Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY3% ;Pot 19
 
Sleep 200
 
Sleep 200
Click, 245, 305 ;Click Menu to refresh
+
}
 +
if (NumKettles >= 20)
 +
{
 +
Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY3% ;Pot 20
 
Sleep 200
 
Sleep 200
 
+
}
;Pot 9
+
if (NumKettles >= 21)
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 9
+
{
Click, 385, %BeginIgniteY2% ;Ignite
+
Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY3% ;Pot 21
Sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
Sleep 200
 
Click, 415, 305 ;Click Menu to refresh
 
 
Sleep 200
 
Sleep 200
 +
}
  
;Pot 10
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 10
 
Click, 555, %BeginIgniteY2% ;Ignite
 
Sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
Sleep 200
 
Click, 580, 305 ;Click Menu to refresh
 
Sleep 200
 
  
;Pot 11
+
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 11
 
Click, 725, %BeginIgniteY2% ;Ignite
 
Sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
Sleep 200
 
Click, 750, 305 ;Click Menu to refresh
 
Sleep 200
 
  
;Pot 12
 
GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 12
 
Click, 890, %BeginIgniteY2% ;Ignite
 
Sleep 200
 
Click, %MaxButtonX%, %MaxButtonY% ;Max button
 
Sleep 200
 
Click, 915, 305 ;Click Menu to refresh
 
Sleep 200
 
  
  
 +
;ALL DONE!
 +
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nFinish: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: All Done!  Reload: Ctrl+R`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
 +
return
  
  
;Stoke 1 countdown
 
  
seconds = 132
 
Loop, %seconds%
 
{
 
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 1/5  (24 water)
 
seconds --
 
Sleep 1000
 
  
GetKeyState, state, F2
+
StokeMax:
if state = D
 
break
 
}
 
  
Gosub, StokeMax
+
WinActivate, eGenesis Client
  
  
 +
;Click Stoke Max
 +
 +
stoke ++
  
 +
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: STOKING!`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
  
;Stoke 2 (19 water) countdown
+
MouseGetPos, OldMX, OldMY
  
seconds = 163
+
if (NumKettles >= 1)
Loop, %seconds%
+
{
 +
Click, %StokeMaxX1%, %StokeMaxY% ; Pot 1
 +
sleep 200
 +
}
 +
if (NumKettles >= 2)
 +
{
 +
Click, %StokeMaxX2%, %StokeMaxY% ; Pot 2
 +
sleep 200
 +
}
 +
if (NumKettles >= 3)
 +
{
 +
Click, %StokeMaxX3%, %StokeMaxY% ; Pot 3
 +
sleep 200
 +
}
 +
if (NumKettles >= 4)
 +
{
 +
Click, %StokeMaxX4%, %StokeMaxY% ; Pot 4
 +
sleep 200
 +
}
 +
if (NumKettles >= 5)
 +
{
 +
Click, %StokeMaxX5%, %StokeMaxY% ; Pot 5
 +
sleep 200
 +
}
 +
if (NumKettles >= 6)
 +
{
 +
Click, %StokeMaxX6%, %StokeMaxY% ; Pot 6
 +
sleep 200
 +
}
 +
if (NumKettles >= 7)
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 2/5  (19 water)
+
Click, %StokeMaxX7%, %StokeMaxY% ; Pot 7
seconds --
+
sleep 200
Sleep 1000
+
}
  
GetKeyState, state, F2
+
if (NumKettles >= 8)
if state = D
+
{
{
+
Click, %StokeMaxX1%, %StokeMaxY2% ; Pot 8
break
+
sleep 200
}
+
}
 +
if (NumKettles >= 9)
 +
{
 +
Click, %StokeMaxX2%, %StokeMaxY2% ; Pot 9
 +
sleep 200
 +
}
 +
if (NumKettles >= 10)
 +
{
 +
Click, %StokeMaxX3%, %StokeMaxY2% ; Pot 10
 +
sleep 200
 +
}
 +
if (NumKettles >= 11)
 +
{
 +
Click, %StokeMaxX4%, %StokeMaxY2% ; Pot 11
 +
sleep 200
 +
}
 +
if (NumKettles >= 12)
 +
{
 +
Click, %StokeMaxX5%, %StokeMaxY2% ; Pot 12
 +
sleep 200
 +
}
 +
if (NumKettles >= 13)
 +
{
 +
Click, %StokeMaxX6%, %StokeMaxY2% ; Pot 13
 +
sleep 200
 +
}
 +
if (NumKettles >= 14)
 +
{
 +
Click, %StokeMaxX7%, %StokeMaxY2% ; Pot 14
 +
sleep 200
 +
}
  
 +
if (NumKettles >= 15)
 +
{
 +
Click, %StokeMaxX1%, %StokeMaxY3% ; Pot 15
 +
sleep 200
 +
}
 +
if (NumKettles >= 16)
 +
{
 +
Click, %StokeMaxX2%, %StokeMaxY3% ; Pot 16
 +
sleep 200
 +
}
 +
if (NumKettles >= 17)
 +
{
 +
Click, %StokeMaxX3%, %StokeMaxY3% ; Pot 17
 +
sleep 200
 
}
 
}
 
+
if (NumKettles >= 18)
Gosub, StokeMax
 
 
 
 
 
 
 
;Stoke 3 (14 water) countdown
 
 
 
seconds = 163
 
Loop, %seconds%
 
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 3/5  (14 water)
+
Click, %StokeMaxX4%, %StokeMaxY3% ; Pot 18
seconds --
+
sleep 200
Sleep 1000
 
 
 
GetKeyState, state, F2
 
if state = D
 
break
 
 
 
 
}
 
}
 
+
if (NumKettles >= 19)
Gosub, StokeMax
 
 
 
 
 
 
 
;Stoke 4 (9 water) countdown
 
 
 
seconds = 163
 
Loop, %seconds%
 
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 4/5  (9 water)
+
Click, %StokeMaxX5%, %StokeMaxY3% ; Pot 19
seconds --
+
sleep 200
Sleep 1000
 
 
 
GetKeyState, state, F2
 
if state = D
 
break
 
 
}
 
}
 
+
if (NumKettles >= 20)
Gosub, StokeMax
 
 
 
 
 
;Stoke 5 (6 water) countdown
 
 
 
seconds = 96
 
Loop, %seconds%
 
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 5/5  (6 water)
+
Click, %StokeMaxX6%, %StokeMaxY3% ; Pot 20
seconds --
+
sleep 200
Sleep 1000
 
GetKeyState, state, F2
 
if state = D
 
break
 
 
}
 
}
 
+
if (NumKettles >= 21)
Gosub, StokeMax
 
 
 
 
 
;Countdown until complete
 
seconds = 176
 
Loop, %seconds%
 
 
{
 
{
GuiControl, Text, MineCycleText, %seconds% seconds until Kettles complete...
+
Click, %StokeMaxX7%, %StokeMaxY3% ; Pot 21
seconds --
+
sleep 200
Sleep 1000
 
 
}
 
}
  
  
Sleep 10000
 
  
;Click Take button
+
MouseMove, %OldMX%, %OldMY%, 0
WinActivate, eGenesis Client
+
return
 
 
GuiControl, Text, MineCycleText, Taking, Pot 1
 
Click, 45, %BeginIgniteY1% ;Pot 1
 
Sleep 200
 
GuiControl, Text, MineCycleText, Taking, Pot 2
 
Click, 220, %BeginIgniteY1% ;Pot 2
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 3
 
Click, 385, %BeginIgniteY1% ;Pot 3
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 4
 
Click, 555, %BeginIgniteY1% ;Pot 4
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 5
 
Click, 725, %BeginIgniteY1% ;Pot 5
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 6
 
Click, 890, %BeginIgniteY1% ;Pot 6
 
Sleep 200
 
  
GuiControl, Text, MineCycleText, Click Begin, Pot 7
 
Click, 45, %BeginIgniteY2% ;Pot 7
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 8
 
Click, 220, %BeginIgniteY2% ;Pot 8
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 9
 
Click, 385, %BeginIgniteY2% ;Pot 9
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 10
 
Click, 555, %BeginIgniteY2% ;Pot 10
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 11
 
Click, 725, %BeginIgniteY2% ;Pot 11
 
Sleep 200
 
GuiControl, Text, MineCycleText, Click Begin, Pot 12
 
Click, 890, %BeginIgniteY2% ;Pot 12
 
Sleep 200
 
  
 +
Timer:
  
 +
seconds ++
  
} ;End Loop Turns
+
if (seconds = 60)
 +
{
 +
seconds := 0
 +
minutes ++
 +
}
 +
 +
if (seconds_eta = 0) && (minutes_eta > 0)
 +
{
 +
seconds_eta := 60
 +
minutes_eta --
 +
}
 +
 +
if (minutes_eta < 0)
 +
minutes_eta := 0
  
 +
seconds_eta --
 +
return
  
  
Gui, Destroy
+
SetCountdown:
Gui, Add, Text,, %Turns% turns...`n`nAll Done!.
 
Gui, Show
 
return
 
  
 +
countdown := (cminutes * 60 + cseconds)
 +
sSeconds := cseconds
 +
sMinutes := cminutes
 +
return
  
  
 +
StokeTimer:
 +
if (stoke = 5)
 +
{
 +
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nFinish: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Waiting on kettle to finish...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
  
StokeMax:
+
} else {
  
WinActivate, eGenesis Client
+
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Waiting to stoke...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
 +
}
  
StokeMaxY1 = 75
+
countdown --
StokeMaxY2 = 335
+
if (sSeconds = 0)
 +
{
 +
sSeconds := 60
 +
sMinutes --
 +
}
 +
 +
if (sMinutes < 0)
 +
sMinutes := 0
  
if (Kettle == "Public")
+
sSeconds --
{
+
Sleep 1000
StokeMaxY1 := StokeMaxY1 + 15
+
return
StokeMaxY2 := StokeMaxY2 + 30
 
}
 
  
;Click Stoke Max
 
MouseGetPos, OldMX, OldMY
 
  
GuiControl, Text, MineCycleText, Stoking, Pot 1
+
^r::reload
Click, 50, %StokeMaxY1% ; Pot 1
+
^p::Pause
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 2
 
Click, 250, %StokeMaxY1% ; Pot 2
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 3
 
Click, 420, %StokeMaxY1% ; Pot 3
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 4
 
Click, 590, %StokeMaxY1% ; Pot 4
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 5
 
Click, 750, %StokeMaxY1% ; Pot 5
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 6
 
Click, 910, %StokeMaxY1% ; Pot 6
 
Sleep 200
 
 
 
GuiControl, Text, MineCycleText, Stoking, Pot 7
 
Click, 50, %StokeMaxY2% ; Pot 7
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 8
 
Click, 250, %StokeMaxY2% ; Pot 8
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 9
 
Click, 420, %StokeMaxY2% ; Pot 9
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 10
 
Click, 590, %StokeMaxY2% ; Pot 10
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 11
 
Click, 750, %StokeMaxY2% ; Pot 11
 
Sleep 200
 
GuiControl, Text, MineCycleText, Stoking, Pot 12
 
Click, 910, %StokeMaxY2% ; Pot 12
 
Sleep 200
 
 
 
 
 
MouseMove, %OldMX%, %OldMY%, 0
 
return
 
 
</pre>
 
</pre>

Latest revision as of 05:03, 13 October 2010

;All new for Tale 5
;Make Potash/Acid/Salt: 1-21 kettles

;Use 1280x1024 resolution. 


;Pin Kettle #1-7 menus from left to right, starting at upper left corner
;Pin Kettle #8-14 below the above pinups/row
;Pin Kettle #15-21 below the above pinups/row


;Ctrl+R to reload
;Ctrl+P to pause
;Emergency: Hold F2 button down 2 seconds to Abort current countdown and hit Stoke Max immediately on all pots
;Only the current countdown will abort. It will move on to the next countdown and continue normally.

;Trust the script, only use Emergency F2 when you have more than 32s when the Wood count turns to zero
;As long as there is less than 32s, when the wood hits zero, then dont interupt the script
;When it hits zero wood, its still a full 32 seconds before the kettle goes out
;Likewise with stoking. It does not matter if you stoke the instant it hits zero wood or 29 seconds later, it wont speed anything up.


;Release Date: Oct 12, 2010
;Author: Cegaiel



	IfWinExist eGenesis Client
	{
	WinGet, GameWinHandle, ID, eGenesis Client
	} else {
	Msgbox, eGenesis client not running, exiting...
	Exit
	}



	WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos


	Gui, +AlwaysOnTop +ToolWindow
	Gui, Add, Text,, Type of Kettles?
	Gui, Add, DropDownList, vKettle Choose1, Public or Guilded|Private
	Gui, Add, Text,, What are we making?
	Gui, Add, DropDownList, vMake Choose2, Acid|Potash|Salt
	Gui, Add, Text,, How many kettles?
	Gui, Add, DropDownList, vNumKettles Choose10, 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21


	Gui, Add, Text,, How many runs?
	Gui, Add, Edit, vRuns wp number, 1
	Gui, Add, Button, Default gStart, BEGIN
	Gui, Show
	return


	Start:

	Gui, Submit
	Gui, Destroy

	Counter = 0
	Wood := (28 * runs * NumKettles)
	Water := (25 * runs * NumKettles)
	Salt := (1 * runs * NumKettles)
	Ash := (5 * runs * NumKettles)





	;Note Acid and Salt are on same X, just different Y

	if (Make == "Acid") {
	OutputTotal := (3 * NumKettles * runs)
	Msgbox, Ingredients needed to run %NumKettles% kettles (%runs% runs):`n`n%wood% Wood minimum (a few extra just in case)`n%water% Sulphurous Water`n%salt% Salt`n`nMake sure you have that in your inventory!`n`nYield: 3 Acid per kettle`nTotal: %OutputTotal% Acid (%runs% runs)`n`nKettle Type: %Kettle%`n`nClick OK to continue or Ctrl+R to reload script...


	;Position of the ACID button
	PotashX1 = 125
	PotashX2 = 295
	PotashX3 = 465
	PotashX4 = 635
	PotashX5 = 805
	PotashX6 = 975
	PotashX7 = 1145


	PotashY = 265 ;+260
	PotashY2 = 525
	PotashY3 = 785


	} else if (Make == "Salt") {
	OutputTotal := (3 * NumKettles * runs)
	Msgbox, Ingredients needed to run %NumKettles% kettles (%runs% runs):`n`n%wood% Wood minimum (a few extra just in case)`n%water% Coconut Water`n`nMake sure you have that in your inventory!`n`nYield: 3 Salt per kettle`nTotal: %OutputTotal% Salt (%runs% runs)`n`nKettle Type: %Kettle%`n`nClick OK to continue or Ctrl+R to reload script...




	;Position of the SALT button
	PotashX1 = 125
	PotashX2 = 295
	PotashX3 = 465
	PotashX4 = 635
	PotashX5 = 805
	PotashX6 = 975
	PotashX7 = 1145


	PotashY = 240 
	PotashY2 = 500
	PotashY3 = 760





	} else if (Make == "Potash") {
	OutputTotal := (5 * NumKettles * runs)
	Msgbox, Ingredients needed to run %NumKettles% kettles (%runs% runs):`n`n%wood% Wood minimum (a few extra just in case)`n%water% Water`n%ash% Ash`n`nMake sure you have that in your inventory!`n`nYield: 5 Potash per kettle`nTotal: %OutputTotal% Potash (%runs% runs)`n`nKettle Type: %Kettle%`n`nClick OK to continue or Ctrl+R to reload script...


	;Position of the POTASH button
	PotashX1 = 45 ;+170
	PotashX2 = 215
	PotashX3 = 385
	PotashX4 = 555
	PotashX5 = 725
	PotashX6 = 890
	PotashX7 = 1060


	PotashY = 170 ;+260
	PotashY2 = 430 
	PotashY3 = 690
	}








	;This is where the Stoke Max option appears on the menu
	StokeMaxX1 = 70 ;+170
	StokeMaxX2 = 240
	StokeMaxX3 = 410
	StokeMaxX4 = 580
	StokeMaxX5 = 750
	StokeMaxX6 = 920
	StokeMaxX7 = 1090


	StokeMaxY = 75 ;+260
	StokeMaxY2 = 335
	StokeMaxY3 = 595




	;Max button, this is after the pot is ignited and asks for Quantity, we hit the Max button instead of typing a number
	; This is hard coded at 1280x1024 . This would likely be the only values you need to change if you try other resolutions
	MaxButtonX = 645
	MaxButtonY = 555




	;The Begin, Ignite and Take button appear in the same place, so these apply to all three.
	BeginIgniteTakeX1 = 50 ;+170
	BeginIgniteTakeX2 = 220
	BeginIgniteTakeX3 = 390
	BeginIgniteTakeX4 = 560
	BeginIgniteTakeX5 = 730
	BeginIgniteTakeX6 = 900
	BeginIgniteTakeX7 = 1070


	BeginIgniteTakeY = 240 ;+260
	BeginIgniteTakeY2 = 500
	BeginIgniteTakeY3 = 760





;NOTE: PotashY, StokeMaxY and BeginIgniteTakeY is set to Y position in Private kettle setting.
;If this is a public kettle AND you are trying to change numbers for another resolution, then note:
;The coords are adjusted for public below, take that into consideration.
;If you dont have any of your own kettles and will change numbers for a different resolution, then
;Just plug in all the numbers above (center of buttons) and launch the script and choose "Private" kettle, even though it is "Public"

	if (Kettle == "Public or Guilded")
	{
	;If the kettle is public then it lowers 15 coords at 1024x768 (will vary with other resolutions)
	PotashY := PotashY + 15
	BeginIgniteTakeY := BeginIgniteTakeY + 15
	StokeMaxY := StokeMaxY + 15

	PotashY2 := PotashY2 + 30
	BeginIgniteTakeY2 := BeginIgniteTakeY2 + 30
	StokeMaxY2 := StokeMaxY2 + 30

	PotashY3 := PotashY3 + 45
	BeginIgniteTakeY3 := BeginIgniteTakeY3 + 45
	StokeMaxY3 := StokeMaxY3 + 45
	}






	;Make sure the RefreshY line stays after the 'if (Kettle == "Public")' line
	;This is the Y button of when it clicks the top of the menu to refresh the menu


	RefreshY := (StokeMaxY - 25)
	RefreshY2 := (StokeMaxY2 - 25)	
	RefreshY3 := (StokeMaxY3 - 25)	




	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, normal
	Gui, Add, Text, vMineCycleText, Preparing to start script, please stand by ...`n`n`n`n`n`n`n`n`n
	Gui, Show


	delay = 10
	Loop, %delay%
	{
	GuiControl, Text, MineCycleText, %delay% seconds before the script will begin ...`n`nMove this out of way`n`nDont cover any pinups!`n`nDont leave anywhere near middle of screen (Load/Stoke Max wood popup)`n`nCtrl+P to Pause/Resume if needed...
	delay --
	Sleep 1000
	}

SetDefaultMouseSpeed, 0


	GuiControl, Text, MineCycleText, Focusing to eGenesis client ...

	WinActivate, eGenesis Client
	Sleep 500



		Loop, %Runs%
		{
		counter ++
		stoke = 0
		waterlevel = -
		countdown = 0
		seconds = 0
		minutes = 0
		seconds_eta = 25
		minutes_eta = 15 
		cseconds = 0
		cminutes = 0
		sSeconds = 0
		sMinutes = 0
	
;Click Potash/Acid/Salt Button

GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Clicking "%make%" buttons...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s


	if (NumKettles >= 1)
	{
	Click, %PotashX1%, %PotashY% ;Pot 1
	sleep 200
	}
	if (NumKettles >= 2)
	{
	Click, %PotashX2%, %PotashY% ;Pot 2
	sleep 200
	}
	if (NumKettles >= 3)
	{
	Click, %PotashX3%, %PotashY% ;Pot 3
	sleep 200
	}
	if (NumKettles >= 4)
	{
	Click, %PotashX4%, %PotashY% ;Pot 4
	sleep 200
	}
	if (NumKettles >= 5)
	{
	Click, %PotashX5%, %PotashY% ;Pot 5
	sleep 200
	}
	if (NumKettles >= 6)
	{
	Click, %PotashX6%, %PotashY% ;Pot 6
	sleep 200
	}
	if (NumKettles >= 7)
	{
	Click, %PotashX7%, %PotashY% ;Pot 7
	sleep 200
	}

	if (NumKettles >= 8)
	{
	Click, %PotashX1%, %PotashY2% ;Pot 8
	sleep 200
	}
	if (NumKettles >= 9)
	{
	Click, %PotashX2%, %PotashY2% ;Pot 9
	sleep 200
	}
	if (NumKettles >= 10)
	{
	Click, %PotashX3%, %PotashY2% ;Pot 10
	sleep 200
	}
	if (NumKettles >= 11)
	{
	Click, %PotashX4%, %PotashY2% ;Pot 11
	sleep 200
	}
	if (NumKettles >= 12)
	{
	Click, %PotashX5%, %PotashY2% ;Pot 12
	sleep 200
	}
	if (NumKettles >= 13)
	{
	Click, %PotashX6%, %PotashY2% ;Pot 13
	sleep 200
	}
	if (NumKettles >= 14)
	{
	Click, %PotashX7%, %PotashY2% ;Pot 14
	sleep 200
	}


	if (NumKettles >= 15)
	{
	Click, %PotashX1%, %PotashY3% ;Pot 15
	sleep 200
	}
	if (NumKettles >= 16)
	{
	Click, %PotashX2%, %PotashY3% ;Pot 16
	sleep 200
	}
	if (NumKettles >= 17)
	{
	Click, %PotashX3%, %PotashY3% ;Pot 17
	sleep 200
	}
	if (NumKettles >= 18)
	{
	Click, %PotashX4%, %PotashY3% ;Pot 18
	sleep 200
	}
	if (NumKettles >= 19)
	{
	Click, %PotashX5%, %PotashY3% ;Pot 19
	sleep 200
	}
	if (NumKettles >= 20)
	{
	Click, %PotashX6%, %PotashY3% ;Pot 20
	sleep 200
	}
	if (NumKettles >= 21)
	{
	Click, %PotashX7%, %PotashY3% ;Pot 21
	sleep 200
	}



;Click Begin button

GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Clicking "Begin" buttons...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s


	if (NumKettles >= 1)
	{
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY% ;Pot 1			
	sleep 200
	}
	if (NumKettles >= 2)
	{
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY% ;Pot 2			
	sleep 200
	}
	if (NumKettles >= 3)
	{
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY% ;Pot 3			
	sleep 200
	}
	if (NumKettles >= 4)
	{
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY% ;Pot 4			
	sleep 200
	}
	if (NumKettles >= 5)
	{
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY% ;Pot 5			
	sleep 200
	}
	if (NumKettles >= 6)
	{
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY% ;Pot 6			
	sleep 200
	}
	if (NumKettles >= 7)
	{
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY% ;Pot 7			
	sleep 200
	}


	if (NumKettles >= 8)
	{
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY2% ;Pot 8			
	sleep 200
	}
	if (NumKettles >= 9)
	{
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY2% ;Pot 9			
	sleep 200
	}
	if (NumKettles >= 10)
	{
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY2% ;Pot 10			
	sleep 200
	}
	if (NumKettles >= 11)
	{
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY2% ;Pot 11			
	sleep 200
	}
	if (NumKettles >= 12)
	{
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY2% ;Pot 12		
	sleep 200
	}
	if (NumKettles >= 13)
	{
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY2% ;Pot 13		
	sleep 200
	}
	if (NumKettles >= 14)
	{
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY2% ;Pot 14		
	sleep 200
	}

	if (NumKettles >= 15)
	{
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY3% ;Pot 15			
	sleep 200
	}
	if (NumKettles >= 16)
	{
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY3% ;Pot 16			
	sleep 200
	}
	if (NumKettles >= 17)
	{
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY3% ;Pot 17			
	sleep 200
	}
	if (NumKettles >= 18)
	{
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY3% ;Pot 18			
	sleep 200
	}
	if (NumKettles >= 19)
	{
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY3% ;Pot 19		
	sleep 200
	}
	if (NumKettles >= 20)
	{
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY3% ;Pot 20		
	sleep 200
	}
	if (NumKettles >= 21)
	{
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY3% ;Pot 21		
	sleep 200
	}



;Click Ignite + Max button, then Refresh Menu (to show Stoke Max option)

GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Igniting + Adding Max Wood...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s



	if (NumKettles >= 1)
	{
	;Pot 1
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX1%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 2)
	{
	;Pot 2		
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX2%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 3)
	{
	;Pot 3
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX3%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 4)
	{
	;Pot 4
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX4%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 5)
	{
	;Pot 5
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX5%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 6)
	{
	;Pot 6
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX6%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 7)
	{
	;Pot 7
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX7%, %RefreshY% ;Click Menu to refresh	
	sleep 200
	}



	if (NumKettles >= 8)
	{
	;Pot 8		
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX1%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 9)
	{
	;Pot 9
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX2%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 10)
	{
	;Pot 10
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX3%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 11)
	{
	;Pot 11
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX4%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 12)
	{
	;Pot 12
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX5%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}

	if (NumKettles >= 13)
	{
	;Pot 13
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX6%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 14)
	{
	;Pot 14
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY2% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX7%, %RefreshY2% ;Click Menu to refresh	
	sleep 200
	}


	if (NumKettles >= 15)
	{
	;Pot 15		
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX1%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 16)
	{
	;Pot 16
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX2%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 17)
	{
	;Pot 17
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX3%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 18)
	{
	;Pot 18
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX4%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 19)
	{
	;Pot 19
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX5%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}

	if (NumKettles >= 20)
	{
	;Pot 20
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX6%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}
	if (NumKettles >= 21)
	{
	;Pot 21
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY3% ;Ignite			
	sleep 200
	Click, %MaxButtonX%, %MaxButtonY% ;Max button
	sleep 200
	Click, %StokeMaxX7%, %RefreshY3% ;Click Menu to refresh	
	sleep 200
	}










	;This begins the Elapsed and ETA timers
	#Persistent 
	SetTimer, Timer, 1000



;Stoke 1 countdown (@ 24 water, first 3 waters dont get burned off after you first start a kettle

	waterlevel = 24
	cminutes = 2
	cseconds = 12
	;countdown = 132
	GoSub, SetCountdown

	Loop, %countdown%
	{

	Gosub, StokeTimer

		GetKeyState, state, F2
		if state = D
		break
		}

	waterlevel = 19
	Gosub, StokeMax




;Stoke 2 (@ 19 water) countdown

	cminutes = 2
	cseconds = 43
	;countdown = 163
	GoSub, SetCountdown

	Loop, %countdown%
	{

	Gosub, StokeTimer

		GetKeyState, state, F2
		if state = D
		{
		break
		}
	}

	waterlevel = 14
	Gosub, StokeMax



;Stoke 3 (@ 14 water) countdown

	cminutes = 2
	cseconds = 43
	;countdown = 163
	GoSub, SetCountdown

	Loop, %countdown%
	{

	Gosub, StokeTimer

		GetKeyState, state, F2
		if state = D
		{
		break
		}
	}

	waterlevel = 9
	Gosub, StokeMax



;Stoke 4 (@ 9 water) countdown

	cminutes = 2
	cseconds = 43
	;countdown = 163
	GoSub, SetCountdown

	Loop, %countdown%
	{

	Gosub, StokeTimer

		GetKeyState, state, F2
		if state = D
		{
		break
		}
	}

waterlevel = 6
Gosub, StokeMax


;Stoke 5 (@ 6 water) countdown

	cminutes = 1
	cseconds = 36
	;countdown = 96
	GoSub, SetCountdown

	Loop, %countdown%
	{

	Gosub, StokeTimer

		GetKeyState, state, F2
		if state = D
		{
		break
		}
	}

waterlevel = N/A
Gosub, StokeMax


;Countdown until complete
	cminutes = 3
	cseconds = 12
	;countdown = 192
	GoSub, SetCountdown

	Loop, %countdown%
	{

	Gosub, StokeTimer
	}


cminutes = 0
cseconds = 0
		} ; End Runs Loop




;Click Take button
	WinActivate, eGenesis Client

GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nFinish: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Taking items from kettle...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s

	if (NumKettles >= 1)
	{
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY% ;Pot 1			
	Sleep 200
	}
	if (NumKettles >= 2)
	{
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY% ;Pot 2			
	Sleep 200
	}
	if (NumKettles >= 3)
	{
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY% ;Pot 3			
	Sleep 200
	}
	if (NumKettles >= 4)
	{
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY% ;Pot 4			
	Sleep 200
	}
	if (NumKettles >= 5)
	{
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY% ;Pot 5			
	Sleep 200
	}
	if (NumKettles >= 6)
	{
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY% ;Pot 6			
	Sleep 200
	}
	if (NumKettles >= 7)
	{
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY% ;Pot 7			
	Sleep 200
	}

	if (NumKettles >= 8)
	{
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY2% ;Pot 8			
	Sleep 200
	}
	if (NumKettles >= 9)
	{
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY2% ;Pot 9			
	Sleep 200
	}
	if (NumKettles >= 10)
	{
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY2% ;Pot 10			
	Sleep 200
	}
	if (NumKettles >= 11)
	{
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY2% ;Pot 11		
	Sleep 200
	}
	if (NumKettles >= 12)
	{
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY2% ;Pot 12		
	Sleep 200
	}
	if (NumKettles >= 13)
	{
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY2% ;Pot 13			
	Sleep 200
	}
	if (NumKettles >= 14)
	{
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY2% ;Pot 14			
	Sleep 200
	}

	if (NumKettles >= 15)
	{
	Click, %BeginIgniteTakeX1%, %BeginIgniteTakeY3% ;Pot 15			
	Sleep 200
	}
	if (NumKettles >= 16)
	{
	Click, %BeginIgniteTakeX2%, %BeginIgniteTakeY3% ;Pot 16			
	Sleep 200
	}
	if (NumKettles >= 17)
	{
	Click, %BeginIgniteTakeX3%, %BeginIgniteTakeY3% ;Pot 17			
	Sleep 200
	}
	if (NumKettles >= 18)
	{
	Click, %BeginIgniteTakeX4%, %BeginIgniteTakeY3% ;Pot 18		
	Sleep 200
	}
	if (NumKettles >= 19)
	{
	Click, %BeginIgniteTakeX5%, %BeginIgniteTakeY3% ;Pot 19		
	Sleep 200
	}
	if (NumKettles >= 20)
	{
	Click, %BeginIgniteTakeX6%, %BeginIgniteTakeY3% ;Pot 20			
	Sleep 200
	}
	if (NumKettles >= 21)
	{
	Click, %BeginIgniteTakeX7%, %BeginIgniteTakeY3% ;Pot 21			
	Sleep 200
	}


	



;ALL DONE!
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nFinish: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: All Done!  Reload: Ctrl+R`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
return




	StokeMax:

	WinActivate, eGenesis Client


	;Click Stoke Max
	
	stoke ++

GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: STOKING!`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s

	MouseGetPos, OldMX, OldMY

	if (NumKettles >= 1)
	{
	Click, %StokeMaxX1%, %StokeMaxY% ; Pot 1			
	sleep 200
	}
	if (NumKettles >= 2)
	{
	Click, %StokeMaxX2%, %StokeMaxY% ; Pot 2			
	sleep 200
	}
	if (NumKettles >= 3)
	{
	Click, %StokeMaxX3%, %StokeMaxY% ; Pot 3			
	sleep 200
	}
	if (NumKettles >= 4)
	{
	Click, %StokeMaxX4%, %StokeMaxY% ; Pot 4			
	sleep 200
	}
	if (NumKettles >= 5)
	{
	Click, %StokeMaxX5%, %StokeMaxY% ; Pot 5			
	sleep 200
	}
	if (NumKettles >= 6)
	{
	Click, %StokeMaxX6%, %StokeMaxY% ; Pot 6			
	sleep 200
	}
	if (NumKettles >= 7)
	{
	Click, %StokeMaxX7%, %StokeMaxY% ; Pot 7			
	sleep 200
	}

	if (NumKettles >= 8)
	{
	Click, %StokeMaxX1%, %StokeMaxY2% ; Pot 8
	sleep 200
	}
	if (NumKettles >= 9)
	{
	Click, %StokeMaxX2%, %StokeMaxY2% ; Pot 9
	sleep 200
	}
	if (NumKettles >= 10)
	{
	Click, %StokeMaxX3%, %StokeMaxY2% ; Pot 10
	sleep 200
	}
	if (NumKettles >= 11)
	{
	Click, %StokeMaxX4%, %StokeMaxY2% ; Pot 11
	sleep 200
	}
	if (NumKettles >= 12)
	{
	Click, %StokeMaxX5%, %StokeMaxY2% ; Pot 12
	sleep 200
	}
	if (NumKettles >= 13)
	{
	Click, %StokeMaxX6%, %StokeMaxY2% ; Pot 13
	sleep 200
	}
	if (NumKettles >= 14)
	{
	Click, %StokeMaxX7%, %StokeMaxY2% ; Pot 14
	sleep 200
	}

	if (NumKettles >= 15)
	{
	Click, %StokeMaxX1%, %StokeMaxY3% ; Pot 15
	sleep 200
	}
	if (NumKettles >= 16)
	{
	Click, %StokeMaxX2%, %StokeMaxY3% ; Pot 16
	sleep 200
	}
	if (NumKettles >= 17)
	{
	Click, %StokeMaxX3%, %StokeMaxY3% ; Pot 17
	sleep 200
	}
	if (NumKettles >= 18)
	{
	Click, %StokeMaxX4%, %StokeMaxY3% ; Pot 18
	sleep 200
	}
	if (NumKettles >= 19)
	{
	Click, %StokeMaxX5%, %StokeMaxY3% ; Pot 19
	sleep 200
	}
	if (NumKettles >= 20)
	{
	Click, %StokeMaxX6%, %StokeMaxY3% ; Pot 20
	sleep 200
	}
	if (NumKettles >= 21)
	{
	Click, %StokeMaxX7%, %StokeMaxY3% ; Pot 21
	sleep 200
	}



	MouseMove, %OldMX%, %OldMY%, 0			
	return


		Timer:

		seconds ++

		if (seconds = 60)
		{
		seconds := 0
		minutes ++
		}
		
		if (seconds_eta = 0) && (minutes_eta > 0)
		{
		seconds_eta := 60
		minutes_eta --
		}
		
		if (minutes_eta < 0)
		minutes_eta := 0

		seconds_eta --
		return


			SetCountdown:

			countdown := (cminutes * 60 + cseconds)
			sSeconds := cseconds
			sMinutes := cminutes
			return


				StokeTimer:
				if (stoke = 5)
				{
GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nFinish: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Waiting on kettle to finish...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s

				} else {

GuiControl, Text, MineCycleText, Current stoke: %stoke% of 5`nNext stoke's water level: %waterlevel%`nNext stoke: %cminutes%m %cseconds%s`nRemaining: %sMinutes%m %sSeconds%s`n`nStatus: Waiting to stoke...`n`nRuns: %counter% of %runs%  /  Kettles Running: %NumKettles%`nElapsed: %minutes%m %seconds%s`nETA this run: %minutes_eta%m %seconds_eta%s
				}

				countdown --
				if (sSeconds = 0)
				{
				sSeconds := 60
				sMinutes --
				}
		
				if (sMinutes < 0)
				sMinutes := 0

				sSeconds --
				Sleep 1000
				return


^r::reload
^p::Pause