<?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=User%3AKibble%2FMacros%2FLead</id>
	<title>User:Kibble/Macros/Lead - 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=User%3AKibble%2FMacros%2FLead"/>
	<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=User:Kibble/Macros/Lead&amp;action=history"/>
	<updated>2026-06-02T19:29:30Z</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=User:Kibble/Macros/Lead&amp;diff=54023&amp;oldid=prev</id>
		<title>Kibble at 05:27, 22 February 2009</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=User:Kibble/Macros/Lead&amp;diff=54023&amp;oldid=prev"/>
		<updated>2009-02-22T05:27:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:27, 22 February 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// Written by: Coyan/Mosaic Guild&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// Written by: Coyan/Mosaic Guild&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// This is what I suggest for setting up for this macro&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;// This is what I suggest for setting up for this macro&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l205&quot; &gt;Line 205:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 206:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	END&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	END&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;END&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;END&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kibble</name></author>
	</entry>
	<entry>
		<id>http://www.atitd.org/wiki/t4w/index.php?title=User:Kibble/Macros/Lead&amp;diff=54022&amp;oldid=prev</id>
		<title>Kibble: New page: // Written by: Coyan/Mosaic Guild // This is what I suggest for setting up for this macro // First align your view so you can see all 7 crystals clearly // second use Alt-L to lock your ca...</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=User:Kibble/Macros/Lead&amp;diff=54022&amp;oldid=prev"/>
		<updated>2009-02-22T05:27:36Z</updated>

		<summary type="html">&lt;p&gt;New page: // Written by: Coyan/Mosaic Guild // This is what I suggest for setting up for this macro // First align your view so you can see all 7 crystals clearly // second use Alt-L to lock your ca...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;// Written by: Coyan/Mosaic Guild&lt;br /&gt;
// This is what I suggest for setting up for this macro&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;
// Third before starting this, I suggest you have your mouse sitting over&lt;br /&gt;
//  the first crystal.&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;
// Thank you Xyrrus for talking to me about using Hue&lt;br /&gt;
// This is a derivation of the Iron macro, in this case I added a step to keep track of the crystals same color status&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;
	CrysHue=List&lt;br /&gt;
	CrysIDcnt=List&lt;br /&gt;
END&lt;br /&gt;
// Initially this will fail up to 7 times while it looks for the &amp;quot;common&amp;quot; gem, once it finds it, its pretty accurate.&lt;br /&gt;
Constants&lt;br /&gt;
	totalpulls = 1000 // How many times do you want it to pull the mine&lt;br /&gt;
	colordiff = 10 // this is used to find a base for comparison, shouldn't need adjusting&lt;br /&gt;
	CDiff = 0&lt;br /&gt;
	CurrHigh = 0&lt;br /&gt;
	Compare = 0&lt;br /&gt;
	Currcrys = 0&lt;br /&gt;
	NumCrysID = 0&lt;br /&gt;
	currhighcnt = 0&lt;br /&gt;
	cntr = 0&lt;br /&gt;
	Minval = 0&lt;br /&gt;
	Maxval = 0&lt;br /&gt;
	Tmpval = 0&lt;br /&gt;
	loopcnt = 1 &lt;br /&gt;
	Mousecnt = 1&lt;br /&gt;
	MouseXN = 0&lt;br /&gt;
	MouseYN = 0&lt;br /&gt;
	ColorHS = 0&lt;br /&gt;
	OElistcnt = 0&lt;br /&gt;
	OELvlset = 1&lt;br /&gt;
	CurrCrysHue = 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;
setactivewindow eGenesis Client&lt;br /&gt;
Loop 7&lt;br /&gt;
	Delay 3 sec&lt;br /&gt;
	Listadd MouseX, {MouseX}&lt;br /&gt;
	Listadd MouseY, {MouseY}&lt;br /&gt;
	keys {loopno}&lt;br /&gt;
END&lt;br /&gt;
keys {return}&lt;br /&gt;
keys {return}&lt;br /&gt;
&lt;br /&gt;
ListClear CrysIDcnt&lt;br /&gt;
&lt;br /&gt;
loop $totalpulls&lt;br /&gt;
	Compute loopcnt = 1&lt;br /&gt;
	ListClear CrysHue&lt;br /&gt;
	loop 7&lt;br /&gt;
		mousepos MouseX[$loopcnt], MouseY[$loopcnt]&lt;br /&gt;
		LoadRGB MouseX[$loopcnt], MouseY[$loopcnt]&lt;br /&gt;
&lt;br /&gt;
		Call CALCHUECOLOR&lt;br /&gt;
		//SayPaste {RGBRed} {RGBGreen} {RGBBlue} CrysHue[$loopcnt] $Tmpval for testing&lt;br /&gt;
		Compute loopcnt = $loopcnt + 1&lt;br /&gt;
		Delay 100&lt;br /&gt;
	END&lt;br /&gt;
	//Delay 100000 for testing&lt;br /&gt;
	CALL FindtheOdd&lt;br /&gt;
	CALL IncrementID&lt;br /&gt;
	&lt;br /&gt;
	mousepos MouseX[$Mousecnt], MouseY[$Mousecnt]&lt;br /&gt;
	Delay 200 //200&lt;br /&gt;
	keys w&lt;br /&gt;
	//leftclick&lt;br /&gt;
	//Compute MouseXN = MouseX[$Mousecnt] + 15 // adjust this if you need to for the menu click&lt;br /&gt;
	//Compute MouseYN = MouseY[$Mousecnt] - 5 // adjust this if you need to for the menu click&lt;br /&gt;
	//Mousepos $MouseXN, $MouseYN&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;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
Procedure CALCHUECOLOR // This procedure calculates the Hue of the crystal&lt;br /&gt;
	Compute Minval = 0&lt;br /&gt;
	Compute Maxval = 255&lt;br /&gt;
	IF {RGBRed} &amp;gt; {RGBGreen}&lt;br /&gt;
		Compute Minval = {RGBGreen}&lt;br /&gt;
		Compute Maxval = {RGBRed}&lt;br /&gt;
	Else&lt;br /&gt;
		Compute Maxval = {RGBGreen}&lt;br /&gt;
		Compute Minval = {RGBRed}&lt;br /&gt;
	END&lt;br /&gt;
	IF {RGBBlue} &amp;lt; $Minval&lt;br /&gt;
		Compute Minval = {RGBBlue}&lt;br /&gt;
	ELSE&lt;br /&gt;
		IF {RGBBlue} &amp;gt; $Maxval&lt;br /&gt;
			Compute Maxval = {RGBBlue}&lt;br /&gt;
		END&lt;br /&gt;
	END&lt;br /&gt;
&lt;br /&gt;
	Compute Tmpval = $Maxval - $Minval&lt;br /&gt;
&lt;br /&gt;
	IF {RGBRed} = $Maxval&lt;br /&gt;
		Compute CurrCrysHue = {RGBGreen} - {RGBBlue}&lt;br /&gt;
		Compute CurrCrysHue = $CurrCrysHue/$Tmpval&lt;br /&gt;
	ELSE&lt;br /&gt;
		IF $Maxval = {RGBGreen}&lt;br /&gt;
			Compute CurrCrysHue = {RGBBlue} - {RGBRed}&lt;br /&gt;
			Compute CurrCrysHue = $CurrCrysHue/$Tmpval&lt;br /&gt;
			Compute CurrCrysHue = 2.0 + $CurrCrysHue&lt;br /&gt;
		ELSE&lt;br /&gt;
			IF $Maxval = {RGBBlue}&lt;br /&gt;
				Compute CurrCrysHue = {RGBRed} - {RGBGreen}&lt;br /&gt;
				Compute CurrCrysHue = $CurrCrysHue/$Tmpval&lt;br /&gt;
				Compute CurrCrysHue = 4.0 + $CurrCrysHue&lt;br /&gt;
			END&lt;br /&gt;
		END&lt;br /&gt;
	END&lt;br /&gt;
	Compute CurrCrysHue = $CurrCrysHue * 100&lt;br /&gt;
	Listadd CrysHue, $CurrCrysHue&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Procedure FindtheOdd&lt;br /&gt;
	Call Findcompare&lt;br /&gt;
	Compute CDiff = 0&lt;br /&gt;
	Compute CurrHigh = 0&lt;br /&gt;
	&lt;br /&gt;
	Compute Currcrys = 1&lt;br /&gt;
	loop 7 &lt;br /&gt;
		IF $Currcrys &amp;lt;&amp;gt; $Compare&lt;br /&gt;
			Compute ColorHS = CrysHue[$Currcrys] - CrysHue[$Compare]&lt;br /&gt;
			IF $ColorHS &amp;lt; 0&lt;br /&gt;
				Compute ColorHS = 0 - $ColorHS&lt;br /&gt;
			END&lt;br /&gt;
			&lt;br /&gt;
			IF $ColorHS &amp;gt; $CDiff&lt;br /&gt;
				Compute CDiff = $ColorHS&lt;br /&gt;
				Compute CurrHigh = $Currcrys&lt;br /&gt;
			END&lt;br /&gt;
		END&lt;br /&gt;
		&lt;br /&gt;
		Compute Currcrys = $Currcrys + 1&lt;br /&gt;
	END&lt;br /&gt;
	&lt;br /&gt;
	Compute Mousecnt = $CurrHigh&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Procedure FindCompare // For Iron we need to find the common crystals in the first 3&lt;br /&gt;
	&lt;br /&gt;
	Compute ColorHS = CrysHue[1] - CrysHue[2]&lt;br /&gt;
	IF $ColorHS &amp;lt; 0&lt;br /&gt;
		Compute ColorHS = 0 - $ColorHS&lt;br /&gt;
	END&lt;br /&gt;
	&lt;br /&gt;
	IF $ColorHS &amp;lt; $colordiff&lt;br /&gt;
		Compute Compare = 1&lt;br /&gt;
	ELSE&lt;br /&gt;
		Compute ColorHS = CrysHue[1] - CrysHue[3]&lt;br /&gt;
		IF $ColorHS &amp;lt; 0&lt;br /&gt;
			Compute ColorHS = 0 - $ColorHS&lt;br /&gt;
		END&lt;br /&gt;
			&lt;br /&gt;
		IF $ColorHS &amp;lt; $colordiff&lt;br /&gt;
			Compute Compare = 1&lt;br /&gt;
		ELSE&lt;br /&gt;
			Compute Compare = 2&lt;br /&gt;
		END&lt;br /&gt;
	END&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
// this procedure keeps track of how many times each crystal has been NOT the odd crystal&lt;br /&gt;
Procedure IncrementID&lt;br /&gt;
	ListCount CrysIDcnt, NumCrysID&lt;br /&gt;
&lt;br /&gt;
	IF $NumCrysID = 0&lt;br /&gt;
		Loop 7&lt;br /&gt;
			ListAdd CrysIDcnt, 1&lt;br /&gt;
		END&lt;br /&gt;
		&lt;br /&gt;
	ELSE&lt;br /&gt;
		Compute cntr = 1&lt;br /&gt;
		Loop 7&lt;br /&gt;
			Compute Tmpval = CrysIDcnt[$cntr] + 1&lt;br /&gt;
			Compute CrysIDcnt[$cntr] = $Tmpval&lt;br /&gt;
			Compute cntr = $cntr + 1&lt;br /&gt;
		END&lt;br /&gt;
		Compute CrysIDcnt[$Mousecnt] = 1&lt;br /&gt;
		Compute currhighcnt = 1&lt;br /&gt;
		Compute cntr = 1&lt;br /&gt;
		Loop 7&lt;br /&gt;
			IF CrysIDcnt[$cntr] &amp;gt; $currhighcnt&lt;br /&gt;
				Compute currhighcnt = CrysIDcnt[$cntr]&lt;br /&gt;
				Compute $Mousecnt = $cntr&lt;br /&gt;
			END&lt;br /&gt;
			Compute cntr = $cntr + 1			&lt;br /&gt;
		END&lt;br /&gt;
	END&lt;br /&gt;
END&lt;/div&gt;</summary>
		<author><name>Kibble</name></author>
	</entry>
</feed>