Macros should be subpage to a Users page, and referenced from the Macros page. - MarvL// Dharma's Continuous Flaxing Macro V1.1
// Set your resolution to 1280 by 1024
// Make sure your ATITD window is maximized and AC Tool is not maximized, so the ATITD title bar is visible
// Pin open your planting window and drag it to the upper left corner.
// Enter Cartagropher View and zoom all the way in.
// Turn on "Enable hotkeys on flax"
// Turn off "Camera Moves quite fast" and "Camera moves unreasonably fast" options
// This macro works best on reasonably flat ground.
// It is tolerant of lag, but not impervious, so keep an eye on it.
// It might be more reliable if you have high frames per second, if you have trouble, try lowering your graphics settings.
// Look for comments below on how to customize
constants
// plant is the number of flax beds to plant before stopping plant = 240
MouseX = 0 MouseY = 0
MouseXStart = 0 MouseYStart = 0
cycle = 0
moveTime = 1400end
call Flax
procedure Test
MousePos 100, 10 Delay 300 LeftClick Delay 1 sec MousePos 700, 512 Call WeedAtMousePos
end
procedure Flax
MousePos 100, 10 Delay 300 LeftClick Delay 1 sec
while $plant >= 12
Call PlantFlax
loop 5 Call MoveRight Call PlantFlax end
Call MoveDown Call PlantFlax
loop 5 Call MoveLeft Call PlantFlax end
Delay 10000 // Delay some time because the first weeds grow more slowly than the second
loop cycle = 1 to 3
if $cycle = 1 MousePos 640, 250 else MousePos 540, 250 end
Call WeedAtMousePos
MousePos 850, 400 Call WeedAtMousePos
loop 3 MousePos 1000, 450 Call WeedAtMousePos end MousePos 980, 450 Call WeedAtMousePos
MousePos 750, 750 Call WeedAtMousePos
MousePos 450, 600 Call WeedAtMousePos
loop 3 MousePos 250, 550 Call WeedAtMousePos end
MousePos 250, 550 Call WeedAtMousePos end
Call MoveLeft Call MoveUp
compute $plant = $plant - 12 end
end
procedure PlantGrid
Call PlantFlax loop 2 Call MoveRight Call PlantFlax end Call MoveDown Call PlantFlax loop 2 Call MoveLeft Call PlantFlax end Call MoveDown Call PlantFlax loop 2 Call MoveRight Call PlantFlax end
end
procedure PlantFlax
MousePos 40, 40 Call ClickFast Delay 800end
procedure WeedAtMousePos
Compute MouseXStart = {MouseX} Compute MouseYStart = {MouseY} Compute MouseX = $MouseXStart + 2 Compute MouseY = $MouseYStart - 4
Call ClickFast Delay 200 LoadRGB $MouseX,$MouseY // Force the menu to appear if it didn't appear While {RGBRed} < 200 Call ClickFast Delay 200 LoadRGB $MouseX,$MouseY End
// Redisplay the menu until "Weed" appears Compute MouseX = $MouseXStart + 20 Compute MouseY = $MouseYStart LoadRGB $MouseX,$MouseY While {RGBRed} > 0 and {RGBRed} < 120 and {RGBBlue} < 120 and {RGBGreen} < 120 Call ClickFast Delay 200 LoadRGB $MouseX,$MouseY End
// Select "Weed" Compute MouseX = $MouseXStart + 30 Compute MouseY = $MouseYStart - 4 Call ClickFast MousePos $MouseX, $MouseY Call ClickFast Delay 1400end
procedure MoveUp
MousePos 640, 272 Call ClickFast Delay $moveTimeend
procedure MoveDown
MousePos 640, 752 Call ClickFast Delay $moveTimeend
procedure MoveLeft
MousePos 370, 532 Call ClickFast Delay $moveTimeend
procedure MoveRight
MousePos 880, 512 Call ClickFast Delay $moveTimeend
procedure ClickFast
Delay 250 LeftClick Delay 50end