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/SkillsTimer/Code"
From A Tale in the Desert
< User:Cegaiel | Macros | SkillsTimer
Jump to navigationJump to searchLine 61: | Line 61: | ||
− | loop | + | loop |
− | { | + | { |
WinActivate, eGenesis Client | WinActivate, eGenesis Client | ||
Line 73: | Line 73: | ||
MouseMove, %OldX%, %OldY% | MouseMove, %OldX%, %OldY% | ||
Sleep 500 | Sleep 500 | ||
− | + | counter++ | |
+ | ;Msgbox, #Black Detected: %A_Index%, #Clicks: %Clicks% | ||
− | |||
if (A_Index = Clicks) | if (A_Index = Clicks) | ||
break | break | ||
− | |||
} | } | ||
+ | } | ||
Msgbox, Done, executed %counter% clicks, Exiting... | Msgbox, Done, executed %counter% clicks, Exiting... | ||
</pre> | </pre> |
Revision as of 17:47, 23 February 2010
;Ctrl+Alt+W to start script ;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 ^r::reload ^p::Pause ^!w:: SetDefaultMouseSpeed, 0 counter = 0 Gui, +AlwaysOnTop +ToolWindow Gui, Add, Text,, # Clicks (Blank=Unlimited): Gui, Add, Edit, vClicks wp number Gui, Add, Button, gStart, GO Gui, Show return Start: Gui, Submit Gui, Destroy Msgbox, Hover mouse over a black letter, in skills tab (ie Endurance for digging)`n`nThe letter/skill you want to hover is the one 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... WinActivate, eGenesis Client loop { MouseGetPos, skillX, skillY PixelGetColor, color, skillX, skillY, RGB if color = 0x000000 { ToolTip, Coordinates: %skillX%`, %skillY%`nColor: %color%`n`n* HOVERING BLACK *`n* Press F2 to set location * } else { ToolTip, Coordinates: %skillX%`, %skillY%`nColor: %color% } GetKeyState, state, F2 if state = D { MsgBox Skills text location recorded!`n`nHover where you want to click and press F2.`n`nFor a dig (or other skills related tasks), pin up the Dig Hole menu and set the click to the word Dig.`n`nFor limestone/dirt set the click position on the icon.`n`nClick OK to proceed... Tooltip break } } KeyWait, F2, D if ErrorLevel = 0 { MouseGetPos, ClickX, ClickY Msgbox, Click location recorded!`n`nNote: you can hit Ctrl+P to PAUSE script anytime and Ctrl+P again to RESUME`n`nClick OK to Start... } loop { WinActivate, eGenesis Client PixelGetColor, color, skillX, skillY, RGB if color = 0x000000 { MouseGetPos, OldX, OldY Click %ClickX%, %ClickY% MouseMove, %OldX%, %OldY% Sleep 500 counter++ ;Msgbox, #Black Detected: %A_Index%, #Clicks: %Clicks% if (A_Index = Clicks) break } } Msgbox, Done, executed %counter% clicks, Exiting...