// ONION MACRO // Here is my onion macro. I use this one on the shore with water to my east. // You may need to alter it to fit your needs. // IMPORTANT // // 1) Cartographer View // 2) Make sure "Plant all plants at my feet" is OFF under one-click and related // 3) Pin your plant window in top left corner with onion seeds at top // 4) Place your mouse pointer over your water button, Alt-Tab to windows // 5) Press F2, Confirm settings and press OK // // Settings are as follows: // Batch: How many rounds you want to plant // # of Plants: Number of plants you want to plant at one time (1-12) // Plant 1 wait time: Delay for time it takes to walk from last plant to first // Move wait time: Delay to allow watering from plant to plant // Time between waterings: Delay after last plant watering before you start over // // Current settings are for 12 plants but you may have to cut down # of plants // depending on lag. If you plant less than 12 plants, "Plant 1 wait time" will // need to be increased. 100 = 1 tenth of a second. // // ENJOY! Constants Loops = 25 //Number of rounds you want to plant Water = 5 P1Delay = 0 MoveDelay = 0 WDelay = 0 Num = 4 NewX = 0 NewY = 0 varOriginalMouseX = 0 varOriginalMouseY = 0 Ox = 476 Oy = 380 ODragX = 4 ODragY = 90 OWX = 50 OWY = 120 Onion = 1 WaterX = 0 WaterY = 0 Plants = 0 End Set WaterX = {MouseX} Set WaterY = {MouseY} Form Onions, Settings ed1=Editbox:Batch:1 ed2=Combobox:# of Plants:1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ed3=Editbox:Plant 1 wait time:1300 ed4=Editbox:Move wait time:900 ed5=Editbox:Time between Waterings:800 end FormLoad Onions, Onions.frm if ShowForm Onions Set Loops = Onions[ed1] Set Plants = Onions[ed2] Set P1Delay = Onions[ed3] Set MoveDelay = Onions[ed4] Set WDelay = Onions[ed5] Else stop end FormSave Onions, Onions.frm //Activate ATITD Window MousePos 100, 20 Delay 250 Leftclick Delay 2000 Call Onion Procedure Onion Loop $Loops Loop $Plants //Number of plants MousePos 50, 40 Delay 200 Rightclick Compute Num = $Onion * 2 - 1 MousePos 37, 101 Delay 200 Loop $Num Rightclick End Compute Onion = $Onion + 1 MousePos 32, 162 Delay 200 Rightclick End SetConst Onion = 1 Loop $Plants //Find and Pin Plants Mousepos $Ox, $Oy Delay 200 Call CheckOnions Compute Ox = $Ox - 41 End SetConst Onion = 1 Loop 5 Loop $Plants // Number of plants If $Onion = 5 Compute OWX = {mousex} + 168 SetConst OWY = 120 End If $Onion = 9 Compute OWX = {mousex} + 168 SetConst OWY = 120 End Compute NewY = $OWY - 20 MousePos $OWX, $NewY Delay 200 Rightclick Delay 300 Mousepos $OWX, $OWY Delay 200 Rightclick Compute OWY = {MouseY} + 60 If $Onion = 1 Delay 1300 //Plant 1 time Else Delay 900 //Move Time End Compute Onion = $Onion + 1 End Delay $WDelay //Pause between waterings SetConst Onion = 1 Compute OWX = 50 Compute OWY = 120 End Compute NewX = 489 Compute NewY = 270 Loop 3 Loop 4 MousePos $NewX, $NewY Delay 250 Rightclick Compute NewY = $NewY - 60 End Compute NewX = $NewX - 168 Compute NewY = 270 End Mousepos 930, 385 Leftclick Delay 3000 Mousepos 473, 397 Delay 250 Leftclick Delay 2000 MousePos $WaterX, $WaterY Delay 250 Leftclick MousePos 512,423 Delay 250 Leftclick Delay 5000 Compute Onion = 1 Compute ODragX = 4 Compute ODragY = 90 Compute Ox = 476 Compute Oy = 380 Compute OWX = 50 Compute OWY = 120 End End Procedure CheckOnions setconst varOriginalMouseX = {mousex} setconst varOriginalMouseY = {mousey} Compute NewY = $varOriginalMouseY Loop 15 RightClick Delay 400 LoadRGB {MouseX}, {MouseY} if {RGBBlue} > 220 Compute NewX = {mousex} + 148 Compute NewY = {mousey} - 23 MousePos $NewX, $NewY Delay 200 Leftclick Compute NewX = {mousex} - 145 MousePos $NewX, $NewY if $Onion > 8 Dragto $ODragX, $ODragY Compute ODragY = $ODragY + 60 End if $Onion = 5 or $Onion = 6 or $Onion = 7 or $Onion = 8 Dragto $ODragX, $ODragY Compute ODragY = $ODragY + 60 End If $Onion = 2 or $Onion = 3 or $Onion = 4 Dragto $ODragX, $ODragY Compute ODragY = $ODragY + 60 End if $Onion = 1 Dragto $ODragX, $ODragY Compute ODragY = $ODragY + 60 End Compute Onion = $Onion + 1 If $Onion = 5 SetConst ODragY = 90 Compute ODragX = $ODragX + 168 End If $Onion = 9 SetConst ODragY = 90 Compute ODragX = $ODragX + 168 END Break Else Compute Oy = $Oy + 1 MousePos $varOriginalMouseX, $Oy Delay 200 End End End