<?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%2FTin</id>
	<title>User:Kibble/Macros/Tin - 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%2FTin"/>
	<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=User:Kibble/Macros/Tin&amp;action=history"/>
	<updated>2026-06-03T08:46:54Z</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/Tin&amp;diff=54027&amp;oldid=prev</id>
		<title>Kibble: New page: &lt;pre&gt; // ATITD Tin Ore Mining Macro for ACTool // RELEASE: Jan-9-2009 // Original Mining Script by Coyan // Adapted for Tin by Xyrrus // // SETUP // // First align your view so you can see...</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t4w/index.php?title=User:Kibble/Macros/Tin&amp;diff=54027&amp;oldid=prev"/>
		<updated>2009-02-22T05:32:32Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;lt;pre&amp;gt; // ATITD Tin Ore Mining Macro for ACTool // RELEASE: Jan-9-2009 // Original Mining Script by Coyan // Adapted for Tin by Xyrrus // // SETUP // // First align your view so you can see...&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 Tin Ore Mining Macro for ACTool&lt;br /&gt;
// RELEASE: Jan-9-2009&lt;br /&gt;
// Original Mining Script by Coyan&lt;br /&gt;
// Adapted for Tin by Xyrrus&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 TIN ** Place your cursor over the **DARKEST PART* of each particular gem or you will experience higher failure rates.&lt;br /&gt;
// This is often the base/corner of the crystal.&lt;br /&gt;
//&lt;br /&gt;
// Method:&lt;br /&gt;
// Script mines the gem with the lowest blue component value.&lt;br /&gt;
//&lt;br /&gt;
// Accuracy:&lt;br /&gt;
// Tested 50 pulls, 3 errors. - Xyrrus Jan-9-2009&lt;br /&gt;
// Incidently, this is better than many players report by hand.&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;
  CrysBlue=List&lt;br /&gt;
  OEOffset=List&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Constants&lt;br /&gt;
  OELevel = 3	// ** SET THIS ** to the 'depth' you want the memory game to play. A higher number will mean that you will achieve higher quantities per pull. However, a failure means that the sequence is reset and you will get &amp;quot;failed&amp;quot; messages equal to this number. Set this higher if you're very confident in your ability to place the cursor on the darkest part of each gem. Set it lower if you're less accurate. 3 is a good starting number. If you consistently see low-error performance, set it higher. Note that this number *for tin ore* does not appear to rely on ore extraction skill level (?)&lt;br /&gt;
  totalpulls = 100 // 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;
  RepairAdjust = 15 	// ** SET THIS ** to adjust the vertical positining of the mouse if the mine is not being worked. Increase / decrease by 15 per line as needed. &amp;quot;This mine has been repaired&amp;quot; text and custom mine labels will result in adjustments being required:&lt;br /&gt;
  // 15 - No Repairs or Text&lt;br /&gt;
  // 0 - Repair or Text&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  Compare = 0&lt;br /&gt;
  Currcrys = 0&lt;br /&gt;
  LowestCrystal = 0&lt;br /&gt;
  CurrentLow = 0&lt;br /&gt;
  //DIFFFOUND = 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;
  CurrCrysBlue = 0&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute LowestCrystal = 0&lt;br /&gt;
Compute CurrentLow = 255&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 3000&lt;br /&gt;
  Listadd MouseX, {MouseX}&lt;br /&gt;
  Listadd MouseY, {MouseY}&lt;br /&gt;
  keys {loopno}&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
keys {return}&lt;br /&gt;
keys {return}&lt;br /&gt;
delay 1 sec&lt;br /&gt;
&lt;br /&gt;
ListClear OEOffset&lt;br /&gt;
&lt;br /&gt;
loop $totalpulls&lt;br /&gt;
  Compute loopcnt = 1&lt;br /&gt;
  ListClear CrysBlue&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;
    // Setup the List&lt;br /&gt;
    Call GetBlueValues&lt;br /&gt;
    &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 FindTinOre&lt;br /&gt;
  &lt;br /&gt;
  CALL OreExtractionstore&lt;br /&gt;
  &lt;br /&gt;
  ListCount OEOffset, $OElistcnt&lt;br /&gt;
  IF $OELevel &amp;gt;= $OElistcnt&lt;br /&gt;
    Compute OELvlset = OEOffset[1] // work the current crystal until we are at our OE Level&lt;br /&gt;
  ELSE&lt;br /&gt;
    Compute OELvlset = OEOffset[$OELevel]&lt;br /&gt;
  END&lt;br /&gt;
  //Saypaste $OELevel $OElistcnt $OELvlset&lt;br /&gt;
  &lt;br /&gt;
  mousepos MouseX[$OELvlset], MouseY[$OELvlset]&lt;br /&gt;
  Delay 200 //200&lt;br /&gt;
  keys w&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 GetBlueValues&lt;br /&gt;
  // Find the 'blueness' of each crystal, add it to the list. The gem with tin is the gem with the lowest blue component.&lt;br /&gt;
  Compute CurrCrysBlue = {RGBBlue}&lt;br /&gt;
  Listadd CrysBlue, $CurrCrysBlue&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Procedure FindTinOre&lt;br /&gt;
  // Find which element in the list has the least amount of blue in it.&lt;br /&gt;
  Compute LowestCrystal = 0&lt;br /&gt;
  Compute CurrentLow = 255&lt;br /&gt;
  Compute Currcrys = 1&lt;br /&gt;
  loop 7&lt;br /&gt;
    If CrysBlue[$CurrCrys] &amp;lt; $CurrentLow&lt;br /&gt;
      compute lowestCrystal = $currCrys&lt;br /&gt;
      compute currentLow = crysblue[$currcrys]&lt;br /&gt;
    END&lt;br /&gt;
    &lt;br /&gt;
    Compute Currcrys = $Currcrys + 1&lt;br /&gt;
  END //loop&lt;br /&gt;
  &lt;br /&gt;
  Compute Mousecnt = $LowestCrystal&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Procedure OreExtractionstore&lt;br /&gt;
  // Memory game storage&lt;br /&gt;
  ListCount OEOffset, $OElistcnt&lt;br /&gt;
  IF $OElistcnt = 0&lt;br /&gt;
    Listadd OEOffset, $Mousecnt&lt;br /&gt;
  ELSE&lt;br /&gt;
    IF $OElistcnt = 1&lt;br /&gt;
      Listadd OEOffset, OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    IF $OElistcnt = 2&lt;br /&gt;
      Listadd OEOffset, OEOffset[2]&lt;br /&gt;
      Compute OEOffset[2] = OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    IF $OElistcnt = 3&lt;br /&gt;
      Listadd OEOffset, OEOffset[3]&lt;br /&gt;
      Compute OEOffset[3] = OEOffset[2]&lt;br /&gt;
      Compute OEOffset[2] = OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    IF $OElistcnt = 4&lt;br /&gt;
      Listadd OEOffset, OEOffset[4]&lt;br /&gt;
      Compute OEOffset[4] = OEOffset[3]&lt;br /&gt;
      Compute OEOffset[3] = OEOffset[2]&lt;br /&gt;
      Compute OEOffset[2] = OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    IF $OElistcnt = 5&lt;br /&gt;
      Listadd OEOffset, OEOffset[5]&lt;br /&gt;
      Compute OEOffset[5] = OEOffset[4]&lt;br /&gt;
      Compute OEOffset[4] = OEOffset[3]&lt;br /&gt;
      Compute OEOffset[3] = OEOffset[2]&lt;br /&gt;
      Compute OEOffset[2] = OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    IF $OElistcnt = 6&lt;br /&gt;
      Listadd OEOffset, OEOffset[6]&lt;br /&gt;
      Compute OEOffset[6] = OEOffset[5]&lt;br /&gt;
      Compute OEOffset[5] = OEOffset[4]&lt;br /&gt;
      Compute OEOffset[4] = OEOffset[3]&lt;br /&gt;
      Compute OEOffset[3] = OEOffset[2]&lt;br /&gt;
      Compute OEOffset[2] = OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    IF $OElistcnt = 7&lt;br /&gt;
      Compute OEOffset[7] = OEOffset[6]&lt;br /&gt;
      Compute OEOffset[6] = OEOffset[5]&lt;br /&gt;
      Compute OEOffset[5] = OEOffset[4]&lt;br /&gt;
      Compute OEOffset[4] = OEOffset[3]&lt;br /&gt;
      Compute OEOffset[3] = OEOffset[2]&lt;br /&gt;
      Compute OEOffset[2] = OEOffset[1]&lt;br /&gt;
    END&lt;br /&gt;
    &lt;br /&gt;
    Compute OEOffset[1] = $Mousecnt&lt;br /&gt;
  END&lt;br /&gt;
  &lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kibble</name></author>
	</entry>
</feed>