<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.atitd.org/wiki/t4w/index.php?action=history&amp;feed=atom&amp;title=Titanium_Macro</id>
	<title>Titanium Macro - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.atitd.org/wiki/t4w/index.php?action=history&amp;feed=atom&amp;title=Titanium_Macro"/>
	<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=Titanium_Macro&amp;action=history"/>
	<updated>2026-05-31T18:35:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://www.atitd.org/wiki/t4w/index.php?title=Titanium_Macro&amp;diff=27650&amp;oldid=prev</id>
		<title>Xyrrus: New page: &lt;pre&gt; // ATITD Titanium Ore Mining Macro for ACTool // RELEASE: Jan-9-2009 // Script Adapted for Titanium by Xyrrus // Original Mining Script by Coyan // // Setup: // // First align your v...</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=Titanium_Macro&amp;diff=27650&amp;oldid=prev"/>
		<updated>2009-01-10T05:41:07Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; // ATITD Titanium Ore Mining Macro for ACTool // RELEASE: Jan-9-2009 // Script Adapted for Titanium by Xyrrus // Original Mining Script by Coyan // // Setup: // // First align your v...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
// ATITD Titanium Ore Mining Macro for ACTool&lt;br /&gt;
// RELEASE: Jan-9-2009&lt;br /&gt;
// Script Adapted for Titanium by Xyrrus&lt;br /&gt;
// Original Mining Script by Coyan&lt;br /&gt;
//&lt;br /&gt;
// Setup:&lt;br /&gt;
//&lt;br /&gt;
// First align your view so you can see all 7 crystals clearly&lt;br /&gt;
// second use Alt-L to lock your camera angle&lt;br /&gt;
//&lt;br /&gt;
// You will have 3 seconds between the recording of each crystal's location&lt;br /&gt;
// place your mouse over a spot of average gem color for each crystal in turn&lt;br /&gt;
// Once it has identified the 7 crystals, it will run the mine&lt;br /&gt;
//&lt;br /&gt;
// ** FOR TITANIUM **&lt;br /&gt;
// Place your cursor over an 'average' color for the gem. The titanium macro is quite forgiving about misplaced clicks.&lt;br /&gt;
//&lt;br /&gt;
// Method:&lt;br /&gt;
// The goal is to click the gem which has been the same for the longest. Macro stores the previous and current RGB values for each gem. When a match is found, the gem's streak is updated. The macro clicks on the gem with the longest streak.&lt;br /&gt;
// Attempted to compare hex values for more efficient storage, but it resulted in floating point errors (?)&lt;br /&gt;
//&lt;br /&gt;
// Accuracy:&lt;br /&gt;
// Appears 95%+&lt;br /&gt;
// Tested Jan-9-2008 Xyrrus&lt;br /&gt;
// Every so often it fails for no apparant reason. If you can figure out why, please chat or email me - Xyrrus&lt;br /&gt;
&lt;br /&gt;
Constructs&lt;br /&gt;
	MouseX=List // this is an array of mouse X coords for gem sample points&lt;br /&gt;
	MouseY=List // this is an array of mouse X coords for gem sample points&lt;br /&gt;
	&lt;br /&gt;
	previousRValues=List&lt;br /&gt;
	currentRValues=List&lt;br /&gt;
	&lt;br /&gt;
	previousGValues=List&lt;br /&gt;
	currentGValues=List&lt;br /&gt;
	&lt;br /&gt;
	previousBValues=List&lt;br /&gt;
	currentBValues=List&lt;br /&gt;
	&lt;br /&gt;
	previousStreaks=List&lt;br /&gt;
	currentStreaks=List&lt;br /&gt;
	&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Constants&lt;br /&gt;
	// ** User Settable Constants **&lt;br /&gt;
	totalpulls = 100 	// How many times do you want it to pull the mine.&lt;br /&gt;
	RepairAdjust = 15 	// Adjust the vertical positining of the mouse, used when &lt;br /&gt;
&lt;br /&gt;
	// ** Other Variable **&lt;br /&gt;
	currentR = 0&lt;br /&gt;
	currentG = 0&lt;br /&gt;
	currentB = 0&lt;br /&gt;
	previousR = 0&lt;br /&gt;
	previousG = 0&lt;br /&gt;
	previousB = 0&lt;br /&gt;
	&lt;br /&gt;
	longestGem = 1 // Set this to 1, because we have no idea which is the correct gem to select the first time around.&lt;br /&gt;
	longestStreak = 0&lt;br /&gt;
	&lt;br /&gt;
	currentGem = 0&lt;br /&gt;
	&lt;br /&gt;
	Mousecnt = 1&lt;br /&gt;
	MouseX = 0&lt;br /&gt;
	MouseY = 0&lt;br /&gt;
	&lt;br /&gt;
	//trash variables&lt;br /&gt;
	temp1 = 0&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
// First part that requires a detailed explanation&lt;br /&gt;
// this loop will pause for 3 seconds then grab the current mouse location&lt;br /&gt;
// its purpose is to identify the 7 sampling locations for the crystals&lt;br /&gt;
// when it grabs the sampling spot, it will then echo a . to the chat window&lt;br /&gt;
// make sure you are in your main chat tab.&lt;br /&gt;
&lt;br /&gt;
Loop 7&lt;br /&gt;
	Delay 3000&lt;br /&gt;
	Listadd MouseX, {MouseX}&lt;br /&gt;
	Listadd MouseY, {MouseY}&lt;br /&gt;
	SayPaste .&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
// Need to setup the previous values&lt;br /&gt;
Loop 7&lt;br /&gt;
	listAdd previousRValues, 0&lt;br /&gt;
	listAdd previousGValues, 0&lt;br /&gt;
	listAdd previousBValues, 0&lt;br /&gt;
	listAdd previousStreaks, 0&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
// Main Gathering Loop&lt;br /&gt;
&lt;br /&gt;
loop $totalpulls&lt;br /&gt;
	&lt;br /&gt;
	Compute currentGem = 1&lt;br /&gt;
	Compute longestStreak = 0&lt;br /&gt;
	&lt;br /&gt;
	// Clear the Current List&lt;br /&gt;
	ListClear currentRValues&lt;br /&gt;
	ListClear currentGValues&lt;br /&gt;
	ListClear currentBValues&lt;br /&gt;
	ListClear currentStreaks&lt;br /&gt;
	&lt;br /&gt;
	loop 7&lt;br /&gt;
		mousepos MouseX[$currentGem], MouseY[$currentGem]&lt;br /&gt;
		LoadRGB MouseX[$currentGem], MouseY[$currentGem]&lt;br /&gt;
&lt;br /&gt;
		// Setup the List&lt;br /&gt;
		CALL UpdateGemInfo&lt;br /&gt;
&lt;br /&gt;
		Compute currentGem = $currentGem + 1&lt;br /&gt;
		Delay 100&lt;br /&gt;
	END&lt;br /&gt;
	//Delay 100000 for testing&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	// Set the Old List to the Current List&lt;br /&gt;
	ListAssign currentRValues, previousRValues&lt;br /&gt;
	ListAssign currentGValues, previousGValues&lt;br /&gt;
	ListAssign currentBValues, previousBValues&lt;br /&gt;
	ListAssign currentStreaks, previousStreaks&lt;br /&gt;
&lt;br /&gt;
	//keys {RETURN}&lt;br /&gt;
	//say mining $longestgem&lt;br /&gt;
&lt;br /&gt;
	mousepos MouseX[$longestGem], MouseY[$longestGem]&lt;br /&gt;
	Delay 200 //200&lt;br /&gt;
	leftclick&lt;br /&gt;
	Compute MouseX = MouseX[$longestGem] + 15 // adjust this if you need to for the menu click&lt;br /&gt;
	Compute MouseY = MouseY[$longestGem] - $repairadjust // adjust this if you need to for the menu click&lt;br /&gt;
	Mousepos $MouseX, $MouseY&lt;br /&gt;
	Delay 200&lt;br /&gt;
	Leftclick&lt;br /&gt;
	&lt;br /&gt;
	Delay 4300 // Delay to manage the str/perc timer on mining, adjust as needed	&lt;br /&gt;
end // Main Loop&lt;br /&gt;
&lt;br /&gt;
// UpdateGemInfo&lt;br /&gt;
&lt;br /&gt;
Procedure UpdateGemInfo&lt;br /&gt;
	// Get the RGB Values for Each Gem&lt;br /&gt;
	Compute currentR = {RGBRed}&lt;br /&gt;
	Compute currentG = {RGBGreen}&lt;br /&gt;
	Compute currentB = {RGBBlue}&lt;br /&gt;
	&lt;br /&gt;
	listAdd currentRValues, $currentR&lt;br /&gt;
	listAdd currentGValues, $currentG&lt;br /&gt;
	listAdd currentBValues, $currentB&lt;br /&gt;
	&lt;br /&gt;
	setConst previousR = previousRValues[$currentGem]&lt;br /&gt;
	setConst previousG = previousGValues[$currentGem]&lt;br /&gt;
	setConst previousB = previousBValues[$currentGem]&lt;br /&gt;
	&lt;br /&gt;
	if $currentR = $previousR AND $currentG = $previousG AND $currentB = $previousB&lt;br /&gt;
		compute temp1 = previousStreaks[$currentGem] + 1&lt;br /&gt;
		listAdd currentStreaks, $temp1&lt;br /&gt;
	else&lt;br /&gt;
		listAdd currentStreaks, 0&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if currentStreaks[$currentGem] &amp;gt; $longestStreak&lt;br /&gt;
		compute longestStreak = currentStreaks[$currentGem]&lt;br /&gt;
		compute longestGem = $currentGem&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
END // Update Gem Info&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xyrrus</name></author>
	</entry>
</feed>