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
< User:Cegaiel | Macros | Potash
Jump to navigationJump to searchLine 1: | Line 1: | ||
<pre> | <pre> | ||
− | |||
− | |||
;Make Potash with 6 kettles (MAY work with other stoked kettle projects) | ;Make Potash with 6 kettles (MAY work with other stoked kettle projects) | ||
;Requires: | ;Requires: | ||
Line 7: | Line 5: | ||
;150 Water | ;150 Water | ||
;30 Ash | ;30 Ash | ||
+ | |||
+ | ;Pin 6 kettle menus from left to right | ||
;Ctrl+Alt+W to start script | ;Ctrl+Alt+W to start script | ||
Line 15: | Line 15: | ||
^p::Pause | ^p::Pause | ||
^!w:: | ^!w:: | ||
+ | |||
+ | IfWinExist eGenesis Client | ||
+ | { | ||
+ | WinGet, GameWinHandle, ID, eGenesis Client | ||
+ | } | ||
+ | |||
+ | seconds = 5 | ||
+ | |||
+ | 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 ... | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Loop, %seconds% | ||
+ | { | ||
+ | GuiControl, Text, MineCycleText, %seconds% seconds before the script will begin ... | ||
+ | seconds -- | ||
+ | Sleep 1000 | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | GuiControl, Text, MineCycleText, Focusing to eGenesis client ... | ||
+ | |||
+ | WinActivate | ||
;Click Potash Button | ;Click Potash Button | ||
+ | GuiControl, Text, MineCycleText, Clicking Potash, Pot 1 | ||
Click, 45, 165 ;Pot 1 | Click, 45, 165 ;Pot 1 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Potash, Pot 2 | ||
Click, 220, 165 ;Pot 2 | Click, 220, 165 ;Pot 2 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Potash, Pot 3 | ||
Click, 385, 165 ;Pot 3 | Click, 385, 165 ;Pot 3 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Potash, Pot 4 | ||
Click, 555, 165 ;Pot 4 | Click, 555, 165 ;Pot 4 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Potash, Pot 5 | ||
Click, 725, 165 ;Pot 5 | Click, 725, 165 ;Pot 5 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Potash, Pot 6 | ||
Click, 890, 165 ;Pot 6 | Click, 890, 165 ;Pot 6 | ||
sleep 200 | sleep 200 | ||
Line 33: | Line 69: | ||
;Click Begin button | ;Click Begin button | ||
+ | GuiControl, Text, MineCycleText, Click Begin, Pot 1 | ||
Click, 45, 240 ;Pot 1 | Click, 45, 240 ;Pot 1 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Begin, Pot 2 | ||
Click, 220, 240 ;Pot 2 | Click, 220, 240 ;Pot 2 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Begin, Pot 3 | ||
Click, 385, 240 ;Pot 3 | Click, 385, 240 ;Pot 3 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Begin, Pot 4 | ||
Click, 555, 240 ;Pot 4 | Click, 555, 240 ;Pot 4 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Begin, Pot 5 | ||
Click, 725, 240 ;Pot 5 | Click, 725, 240 ;Pot 5 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Click Begin, Pot 6 | ||
Click, 890, 240 ;Pot 6 | Click, 890, 240 ;Pot 6 | ||
sleep 200 | sleep 200 | ||
Line 49: | Line 91: | ||
− | ;Click Ignite + Max button, Refresh Menu (to show Stoke Max option) | + | ;Click Ignite + Max button, then Refresh Menu (to show Stoke Max option) |
+ | |||
+ | |||
;Pot 1 | ;Pot 1 | ||
+ | GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 1 | ||
Click, 45, 240 ;Ignite | Click, 45, 240 ;Ignite | ||
sleep 200 | sleep 200 | ||
Line 59: | Line 104: | ||
;Pot 2 | ;Pot 2 | ||
+ | GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 2 | ||
Click, 215, 240 ;Ignite | Click, 215, 240 ;Ignite | ||
sleep 200 | sleep 200 | ||
Line 67: | Line 113: | ||
;Pot 3 | ;Pot 3 | ||
+ | GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 3 | ||
Click, 385, 240 ;Ignite | Click, 385, 240 ;Ignite | ||
sleep 200 | sleep 200 | ||
Line 75: | Line 122: | ||
;Pot 4 | ;Pot 4 | ||
+ | GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 4 | ||
Click, 560, 240 ;Ignite | Click, 560, 240 ;Ignite | ||
sleep 200 | sleep 200 | ||
Line 83: | Line 131: | ||
;Pot 5 | ;Pot 5 | ||
+ | GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 5 | ||
Click, 725, 240 ;Ignite | Click, 725, 240 ;Ignite | ||
sleep 200 | sleep 200 | ||
Line 91: | Line 140: | ||
;Pot 6 | ;Pot 6 | ||
+ | GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 6 | ||
Click, 895, 240 ;Ignite | Click, 895, 240 ;Ignite | ||
sleep 200 | sleep 200 | ||
Line 99: | Line 149: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ;Stoke 1 countdown | ||
+ | |||
+ | seconds = 130 | ||
+ | Loop, %seconds% | ||
+ | { | ||
+ | GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 1/5 (24 water) | ||
+ | seconds -- | ||
+ | Sleep 1000 | ||
+ | } | ||
+ | |||
+ | Gosub, StokeMax | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ;Stoke 2 (19 water) countdown | ||
+ | |||
+ | seconds = 165 | ||
+ | Loop, %seconds% | ||
+ | { | ||
+ | GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 2/5 (19 water) | ||
+ | seconds -- | ||
+ | Sleep 1000 | ||
+ | } | ||
+ | |||
+ | Gosub, StokeMax | ||
+ | |||
+ | |||
+ | |||
+ | ;Stoke 3 (14 water) countdown | ||
+ | |||
+ | seconds = 165 | ||
+ | Loop, %seconds% | ||
+ | { | ||
+ | GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 3/5 (14 water) | ||
+ | seconds -- | ||
+ | Sleep 1000 | ||
+ | } | ||
+ | |||
+ | 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 | ||
+ | } | ||
+ | |||
+ | Gosub, StokeMax | ||
− | ; | + | ;Stoke 5 (6 water) countdown |
− | |||
− | + | seconds = 100 | |
− | + | Loop, %seconds% | |
− | + | { | |
− | + | GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 5/5 (6 water) | |
− | + | seconds -- | |
− | + | Sleep 1000 | |
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | Gosub, StokeMax | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ;Countdown until complete | ||
+ | seconds = 180 | ||
+ | Loop, %seconds% | ||
+ | { | ||
+ | GuiControl, Text, MineCycleText, %seconds% seconds until complete | ||
+ | seconds -- | ||
+ | Sleep 1000 | ||
+ | } | ||
+ | Gui, Destroy | ||
+ | Gui, Add, Text,, Middle-click on this window to end the script. | ||
+ | Gui, Show | ||
+ | return | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | StokeMax: | |
− | + | WinActivate | |
;Click Stoke Max | ;Click Stoke Max | ||
MouseGetPos, OldMX, OldMY | MouseGetPos, OldMX, OldMY | ||
+ | GuiControl, Text, MineCycleText, Stoking, Pot 1 | ||
Click, 50, 75 ; Pot 1 | Click, 50, 75 ; Pot 1 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Stoking, Pot 2 | ||
Click, 250, 75 ; Pot 2 | Click, 250, 75 ; Pot 2 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Stoking, Pot 3 | ||
Click, 420, 75 ; Pot 3 | Click, 420, 75 ; Pot 3 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Stoking, Pot 4 | ||
Click, 590, 75 ; Pot 4 | Click, 590, 75 ; Pot 4 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Stoking, Pot 5 | ||
Click, 750, 75 ; Pot 5 | Click, 750, 75 ; Pot 5 | ||
sleep 200 | sleep 200 | ||
+ | GuiControl, Text, MineCycleText, Stoking, Pot 6 | ||
Click, 910, 75 ; Pot 6 | Click, 910, 75 ; Pot 6 | ||
sleep 200 | sleep 200 | ||
MouseMove, %OldMX%, %OldMY%, 0 | MouseMove, %OldMX%, %OldMY%, 0 | ||
− | </pre> | + | |
+ | return</pre> |
Revision as of 05:55, 28 January 2010
;Make Potash with 6 kettles (MAY work with other stoked kettle projects) ;Requires: ;168 Wood ;150 Water ;30 Ash ;Pin 6 kettle menus from left to right ;Ctrl+Alt+W to start script ;Ctrl+R to reload ;Ctrl+P to pause ^r::reload ^p::Pause ^!w:: IfWinExist eGenesis Client { WinGet, GameWinHandle, ID, eGenesis Client } seconds = 5 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 ... Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds% seconds before the script will begin ... seconds -- Sleep 1000 } GuiControl, Text, MineCycleText, Focusing to eGenesis client ... WinActivate ;Click Potash Button GuiControl, Text, MineCycleText, Clicking Potash, Pot 1 Click, 45, 165 ;Pot 1 sleep 200 GuiControl, Text, MineCycleText, Click Potash, Pot 2 Click, 220, 165 ;Pot 2 sleep 200 GuiControl, Text, MineCycleText, Click Potash, Pot 3 Click, 385, 165 ;Pot 3 sleep 200 GuiControl, Text, MineCycleText, Click Potash, Pot 4 Click, 555, 165 ;Pot 4 sleep 200 GuiControl, Text, MineCycleText, Click Potash, Pot 5 Click, 725, 165 ;Pot 5 sleep 200 GuiControl, Text, MineCycleText, Click Potash, Pot 6 Click, 890, 165 ;Pot 6 sleep 200 ;Click Begin button GuiControl, Text, MineCycleText, Click Begin, Pot 1 Click, 45, 240 ;Pot 1 sleep 200 GuiControl, Text, MineCycleText, Click Begin, Pot 2 Click, 220, 240 ;Pot 2 sleep 200 GuiControl, Text, MineCycleText, Click Begin, Pot 3 Click, 385, 240 ;Pot 3 sleep 200 GuiControl, Text, MineCycleText, Click Begin, Pot 4 Click, 555, 240 ;Pot 4 sleep 200 GuiControl, Text, MineCycleText, Click Begin, Pot 5 Click, 725, 240 ;Pot 5 sleep 200 GuiControl, Text, MineCycleText, Click Begin, Pot 6 Click, 890, 240 ;Pot 6 sleep 200 ;Click Ignite + Max button, then Refresh Menu (to show Stoke Max option) ;Pot 1 GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 1 Click, 45, 240 ;Ignite sleep 200 Click, 515, 420 ;Max button sleep 200 Click, 70, 45 ;Click Menu to refresh sleep 200 ;Pot 2 GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 2 Click, 215, 240 ;Ignite sleep 200 Click, 515, 420 ;Max button sleep 200 Click, 245, 45 ;Click Menu to refresh sleep 200 ;Pot 3 GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 3 Click, 385, 240 ;Ignite sleep 200 Click, 515, 420 ;Max button sleep 200 Click, 415, 45 ;Click Menu to refresh sleep 200 ;Pot 4 GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 4 Click, 560, 240 ;Ignite sleep 200 Click, 515, 420 ;Max button sleep 200 Click, 580, 45 ;Click Menu to refresh sleep 200 ;Pot 5 GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 5 Click, 725, 240 ;Ignite sleep 200 Click, 515, 420 ;Max button sleep 200 Click, 750, 45 ;Click Menu to refresh sleep 200 ;Pot 6 GuiControl, Text, MineCycleText, Igniting/Refreshing Pot 6 Click, 895, 240 ;Ignite sleep 200 Click, 515, 420 ;Max button sleep 200 Click, 915, 45 ;Click Menu to refresh sleep 200 ;Stoke 1 countdown seconds = 130 Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 1/5 (24 water) seconds -- Sleep 1000 } Gosub, StokeMax ;Stoke 2 (19 water) countdown seconds = 165 Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 2/5 (19 water) seconds -- Sleep 1000 } Gosub, StokeMax ;Stoke 3 (14 water) countdown seconds = 165 Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 3/5 (14 water) seconds -- Sleep 1000 } 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 } Gosub, StokeMax ;Stoke 5 (6 water) countdown seconds = 100 Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds% seconds until Stoke 5/5 (6 water) seconds -- Sleep 1000 } Gosub, StokeMax ;Countdown until complete seconds = 180 Loop, %seconds% { GuiControl, Text, MineCycleText, %seconds% seconds until complete seconds -- Sleep 1000 } Gui, Destroy Gui, Add, Text,, Middle-click on this window to end the script. Gui, Show return StokeMax: WinActivate ;Click Stoke Max MouseGetPos, OldMX, OldMY GuiControl, Text, MineCycleText, Stoking, Pot 1 Click, 50, 75 ; Pot 1 sleep 200 GuiControl, Text, MineCycleText, Stoking, Pot 2 Click, 250, 75 ; Pot 2 sleep 200 GuiControl, Text, MineCycleText, Stoking, Pot 3 Click, 420, 75 ; Pot 3 sleep 200 GuiControl, Text, MineCycleText, Stoking, Pot 4 Click, 590, 75 ; Pot 4 sleep 200 GuiControl, Text, MineCycleText, Stoking, Pot 5 Click, 750, 75 ; Pot 5 sleep 200 GuiControl, Text, MineCycleText, Stoking, Pot 6 Click, 910, 75 ; Pot 6 sleep 200 MouseMove, %OldMX%, %OldMY%, 0 return