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/Grass/Code"
From A Tale in the Desert
< User:Cegaiel | Macros | Grass
Jump to navigationJump to search (New page: <pre> ; grass collector ^p::Pause ^!g:: ;This script collects grass in a small area. It will click/walk different in a circle around where you are standing. ;Make sure you have plenty of ...) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
; grass collector | ; grass collector | ||
− | |||
− | |||
;This script collects grass in a small area. It will click/walk different in a circle around where you are standing. | ;This script collects grass in a small area. It will click/walk different in a circle around where you are standing. | ||
Line 11: | Line 9: | ||
− | |||
;Ctrl+p to Pause script | ;Ctrl+p to Pause script | ||
Line 52: | Line 49: | ||
GuiControl, Text, GrassCycleText, Cycle %GrassCycle% of %NumGrass% | GuiControl, Text, GrassCycleText, Cycle %GrassCycle% of %NumGrass% | ||
WinActivate, eGenesis Client | WinActivate, eGenesis Client | ||
− | CoordMode, Mouse, Relative | + | ;CoordMode, Mouse, Relative |
+ | |||
+ | SetDefaultMouseSpeed, 0 | ||
+ | SetMouseDelay, -1 | ||
+ | |||
+ | |||
loop, %NumGrass% | loop, %NumGrass% | ||
{ | { | ||
Line 99: | Line 101: | ||
;PixelSearch, Px, Py, 0, 0, 91, 74, 0xB46E6C | ;PixelSearch, Px, Py, 0, 0, 91, 74, 0xB46E6C | ||
− | ImageSearch, Px, Py, | + | ImageSearch, Px, Py, 50 , 38, 244, 120, %shades% Grass_icon.png |
+ | |||
;Sleep, 1000 | ;Sleep, 1000 | ||
if ErrorLevel = 0 | if ErrorLevel = 0 | ||
Line 116: | Line 119: | ||
} | } | ||
return | return | ||
+ | |||
+ | |||
+ | ^r::reload | ||
+ | ^p::Pause | ||
</pre> | </pre> |
Latest revision as of 06:58, 25 January 2012
; grass collector ;This script collects grass in a small area. It will click/walk different in a circle around where you are standing. ;Make sure you have plenty of grass around you! ;Lock screen (Alt+L) and use F6 camera angle and zoom in about medium. ;Make sure you are Walking Slow (Esc, Emote..., Gait: Walking) ;Make sure that What Do I Do Now? icon (top left (Clipboard with notebook on it) is gone (Uncheck Utility, Interface) ;Ctrl+p to Pause script shades:="*90" IfWinExist eGenesis Client { WinActivate WinGetPos,,, winWidth, winHeight minorOffset = 70 majorOffset = 100 winXCenter := winWidth / 2 winYCenter := ((winHeight - 22) / 2) + 32 winXLeft := winXCenter - minorOffset winXFarLeft := winXCenter - majorOffset winXRight := winXCenter + minorOffset winXFarRight := winXCenter + majorOffset winYUp := winYCenter - minorOffset winYFarUp := winYCenter - majorOffset winYDown := winYCenter + minorOffset winYFarDown := winYCenter + majorOffset circleMove = 0 Gui, +AlwaysOnTop +ToolWindow Gui, Add, Text,, How many grass cycles? Gui, Add, Edit, Number vNumGrass Gui, Add, Button, default gGrassCommit, OK Gui, Show return GrassCommit: Gui, Submit Gui, Destroy GrassCycle = 0 Gui, +AlwaysOnTop +ToolWindow Gui, Font, bold Gui, Add, Text, vGrassCycleText, Cycle %NumGrass% of %NumGrass% Gui, Font, norm Gui, Show GuiControl, Text, GrassCycleText, Cycle %GrassCycle% of %NumGrass% WinActivate, eGenesis Client ;CoordMode, Mouse, Relative SetDefaultMouseSpeed, 0 SetMouseDelay, -1 loop, %NumGrass% { if circleMove = 0 { MouseClick, left, %winXCenter%, %winYFarUp% circleMove++ } else if circleMove = 1 { MouseClick, left, %winXRight%, %winYUp% circleMove++ } else if circleMove = 2 { MouseClick, left, %winXFarRight%, %winYCenter% circleMove++ } else if circleMove = 3 { MouseClick, left, %winXRight%, %winYDown% circleMove++ } else if circleMove = 4 { MouseClick, left, %winXCenter%, %winYFarDown% circleMove++ } else if circleMove = 5 { MouseClick, left, %winXLeft%, %winYDown% circleMove++ } else if circleMove = 6 { MouseClick, left, %winXFarLeft%, %winYCenter% circleMove++ } else if circleMove = 7 { MouseClick, left, %winXLeft%, %winYUp% circleMove = 0 } loop { ;PixelSearch, Px, Py, 0, 0, 91, 74, 0xB46E6C ImageSearch, Px, Py, 50 , 38, 244, 120, %shades% Grass_icon.png ;Sleep, 1000 if ErrorLevel = 0 { GrassCycle++ GuiControl, Text, GrassCycleText, Cycle %GrassCycle% of %NumGrass% ;MouseClick, left, 91, 74 MouseClick, left, Px, Py Sleep, 250 break } } } Gui, Destroy return } return ^r::reload ^p::Pause