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/HacklingRake/Code"

From A Tale in the Desert
Jump to navigationJump to search
(New page: <pre> ;Ctrl+Alt+W to start macro. ;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...)
 
Line 84: Line 84:
 
}
 
}
  
Sleep 500
+
Sleep 1000
 
}
 
}
 
</pre>
 
</pre>

Revision as of 09:43, 21 February 2010

;Ctrl+Alt+W to start macro.
;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::

Counter = 1

SetDefaultMouseSpeed, 0


Msgbox, First, make sure you loaded your hackling rake with materials before beginning`n`nHover 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...

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 Endurance text location recorded!`n`nNow pinup your Hackling Rake menu. Make sure it says "Seperate Rotten Flax (Step 1, Remove Straw)"`n`nHover mouse over that option and press F2 to record the click position.`n`nClick OK to proceed...
Tooltip
break
}
}


KeyWait, F2, D
if ErrorLevel = 0
{
MouseGetPos, ClickX, ClickY
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...
}




loop
{

WinActivate, eGenesis Client
PixelGetColor, color, skillX, skillY, RGB

if color = 0x000000
{
MouseGetPos, OldX, OldY


if (counter = 1) {
;Step 1 (Remove Straw) - Top/1st menu choice
Click %ClickX%, %ClickY%
} else if (counter = 2) {
;Step 2 (Seperate) - 2nd menu choice
NewY := ClickY + 15
Click %ClickX%, %NewY%
} else if (counter = 3) {
;Step 3 (Refine) - 2nd menu choice
NewY := ClickY + 15
Click %ClickX%, %NewY%
} else if (counter = 4) {
;Clean Hackling Rake - Top/1st menu choice
Click %ClickX%, %ClickY%
counter = 0
}


counter++
MouseMove, %OldX%, %OldY%
}

Sleep 1000
}