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:Kibble/Macros/Grass Picker"

From A Tale in the Desert
Jump to navigationJump to search
m
Line 1: Line 1:
 
<pre>
 
<pre>
// Grass Picker
+
//Grass Picker
// coded by: kibble
+
//coded by:Lunodragon
  
// Instructions:
 
// Make sure there is a grass icon in the same spot of the screen when
 
// stepping to the left and right.
 
// Start the Macro and hold your mouse over the grass icon.
 
// Wait for the macro to start picking grass.
 
 
// Declares
 
 
constants
 
constants
  objWindow = eGenesis Client       // <-- Program Window Title
+
objWindow = eGenesis Client  
  Action = leftclick                // <-- Action to perform (keys d for dig)
+
intCount = 2
  intCount = 500                    // <-- Number of Times to Repeat
+
intCount2 = 0
  intDelay = 5                     // <-- Seconds in delay between Picks
+
objWindow2 = Ac Tool 5.4.0
  bSwitch = 0
 
 
end
 
end
  
constructs
+
 
  MousePnt = list
+
 
 +
SetActiveWindow $objWindow
 +
 
 +
Keys {F5}
 +
MousePos 527, 766
 +
delay 1000
 +
MousePos 453, 380
 +
 +
 
 +
//Initial Gathering of grass
 +
MousePos 93, 90
 +
leftclick
 +
delay 3000
 +
 
 +
 
 +
//Move Back and Forth and Gather Grass
 +
procedure harvest
 +
MousePos 249, 361
 +
leftclick
 +
delay 1000
 +
MousePos 93, 90
 +
leftclick
 +
delay 3000
 +
MousePos 621, 357
 +
leftclick
 +
delay 1000
 +
MousePos 93, 90
 +
leftclick
 +
delay 3000
 
end
 
end
  
// Init
 
SetActiveWindow $objWindow
 
delay 3 sec                        // <-- Delay before the mouse position is captured
 
listadd MousePnt, {MouseX}
 
listadd MousePnt, {MouseY}
 
delay 2 sec                        // <-- Delay before start after mouse capture
 
  
mousepos MousePnt[1], MousePnt[2]
+
//To keep reseting the loop
$Action
+
procedure Test
 +
if $intCount = 0
 +
setconst intCount = $intCounter + 1
 +
end
 +
end
 +
 
  
// Main
+
//Loop to continue gathering grass
 +
procedure Run
 
loop $intCount
 
loop $intCount
  delay $intDelay sec
+
call harvest
  call Move
+
call Test
  delay 1 sec
+
call Run
  mousepos MousePnt[1], MousePnt[2]
+
end
  $Action
 
 
end
 
end
  
// Procedures
+
 
procedure Move
 
  if $bSwitch = 0
 
    keys {left}
 
    setconst bSwitch = 1
 
  else
 
    keys {right}
 
    setconst bSwitch = 0
 
  end
 
end
 
 
</pre>
 
</pre>

Revision as of 05:08, 6 February 2009

//Grass Picker
//coded by:Lunodragon

constants
objWindow = eGenesis Client 
intCount = 2
intCount2 = 0
objWindow2 = Ac Tool 5.4.0
end



SetActiveWindow $objWindow

Keys {F5}
MousePos 527, 766
delay 1000
MousePos 453, 380
 

//Initial Gathering of grass
MousePos 93, 90
leftclick
delay 3000


//Move Back and Forth and Gather Grass
procedure harvest
MousePos 249, 361
leftclick
delay 1000
MousePos 93, 90
leftclick
delay 3000
MousePos 621, 357
leftclick
delay 1000
MousePos 93, 90
leftclick
delay 3000
end


//To keep reseting the loop
procedure Test 
if $intCount = 0
		setconst intCount = $intCounter + 1
		end
		end


//Loop to continue gathering grass
procedure Run
loop $intCount
call harvest
call Test
call Run
end
end