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:Sithid/Macros/AHK/Grass"
From A Tale in the Desert
< User:Sithid | Macros | AHK
Jump to navigationJump to search(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Grass Macro == | == Grass Macro == | ||
− | My simple grass macro.<br> | + | My simple grass macro.<br><br> |
− | Hotkeys | + | |
− | Alt + s : | + | Hotkeys |
+ | Alt + s : Starts the script/macro. | ||
Alt + Escape : Terminates the script/macro. | Alt + Escape : Terminates the script/macro. | ||
− | Pause : | + | Pause : Pauses the script/macro. |
Run script/macro and press alt + s to start. Follow the msgbox instructions and enjoy. | Run script/macro and press alt + s to start. Follow the msgbox instructions and enjoy. | ||
Line 38: | Line 39: | ||
return | return | ||
− | SetDefaultMouseSpeed | + | SetDefaultMouseSpeed 0 |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
; Main script execution. | ; Main script execution. | ||
Main() | Main() | ||
Line 58: | Line 53: | ||
; Get egen client window stats. | ; Get egen client window stats. | ||
WinGetActiveStats, win_Title, win_Xmax, win_Ymax, win_Xpos, win_Ypos | WinGetActiveStats, win_Title, win_Xmax, win_Ymax, win_Xpos, win_Ypos | ||
+ | |||
+ | MsgBox, Please hover over your grass icon and press F1. | ||
+ | |||
+ | ; Varibles, no touching! | ||
+ | GrassIconX := 0 | ||
+ | GrassIconY := 0 | ||
+ | CenterX := win_Xmax / 2 | ||
+ | CenterY := win_Ymax / 2 | ||
; Wait until the f1 key is pressed. | ; Wait until the f1 key is pressed. | ||
KeyWait F1, D | KeyWait F1, D | ||
+ | |||
+ | ; Wait till the f1 key is released. | ||
+ | KeyWait F1 | ||
; Set the grass icons x/y. | ; Set the grass icons x/y. | ||
MouseGetPos GrassIconX, GrassIconY | MouseGetPos GrassIconX, GrassIconY | ||
− | |||
− | |||
− | |||
; Main function loop, performs the picking. | ; Main function loop, performs the picking. |
Latest revision as of 03:31, 2 January 2009
Grass Macro
My simple grass macro.
Hotkeys
Alt + s : Starts the script/macro. Alt + Escape : Terminates the script/macro. Pause : Pauses the script/macro.
Run script/macro and press alt + s to start. Follow the msgbox instructions and enjoy.
The Macro
; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; Author: Sithid ; ; Script Function: ; Simple grass picker ; Notes: ; Thanks Selune for helping me out with AHK ... though I still hate AHK :P. ; #NoEnv SendMode Input #SingleInstance force Pause:: Pause return !Escape:: ExitApp return !s:: Main() return SetDefaultMouseSpeed 0 ; Main script execution. Main() { ; Wait for the egen client to be running. WinWait, eGenesis Client ; Check if the egen client is active, wait for it to become so. IfWinNotActive, eGenesis Client, , WinActivate, eGenesis Client, WinWaitActive, eGenesis Client, ; Get egen client window stats. WinGetActiveStats, win_Title, win_Xmax, win_Ymax, win_Xpos, win_Ypos MsgBox, Please hover over your grass icon and press F1. ; Varibles, no touching! GrassIconX := 0 GrassIconY := 0 CenterX := win_Xmax / 2 CenterY := win_Ymax / 2 ; Wait until the f1 key is pressed. KeyWait F1, D ; Wait till the f1 key is released. KeyWait F1 ; Set the grass icons x/y. MouseGetPos GrassIconX, GrassIconY ; Main function loop, performs the picking. loop { ; Click the grass icon, place to run to, and sleep. MouseClick, left, GrassIconX, GrassIconY MouseClick, left, CenterX, CenterY + 200 Sleep, 3000 ; Again, click the grass icon, place to run to, and sleep. MouseClick, left, GrassIconX, GrassIconY MouseClick, left, CenterX, CenterY - 200 Sleep, 3000 } }