Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 6th, 2012  |  syntax: None  |  size: 65.29 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.awt.*;
  2. import org.rsbot.event.events.ServerMessageEvent;
  3. import org.rsbot.script.Script;
  4. import org.rsbot.script.ScriptManifest;
  5. import org.rsbot.script.wrappers.RSArea;
  6. import org.rsbot.script.wrappers.RSCharacter;
  7. import org.rsbot.script.wrappers.RSComponent;
  8. import org.rsbot.script.wrappers.RSInterface;
  9. import org.rsbot.script.wrappers.RSNPC;
  10. import org.rsbot.script.wrappers.RSTile;
  11. import java.awt.BasicStroke;
  12. import java.awt.Color;
  13. import java.awt.Font;
  14. import java.awt.Graphics;
  15. import java.awt.Graphics2D;
  16. import java.awt.Image;
  17. import java.awt.Point;
  18. import java.awt.RenderingHints;
  19. import java.awt.image.BufferedImage;
  20. import java.io.BufferedReader;
  21. import java.io.BufferedWriter;
  22. import java.io.File;
  23. import java.io.FileWriter;
  24. import java.io.IOException;
  25. import java.io.InputStreamReader;
  26. import java.io.PrintWriter;
  27. import java.net.MalformedURLException;
  28. import java.net.URL;
  29. import java.net.URLConnection;
  30. import java.util.regex.Matcher;
  31. import java.util.regex.Pattern;
  32.  
  33. import javax.imageio.ImageIO;
  34. import javax.swing.JFileChooser;
  35. import javax.swing.JOptionPane;
  36.  
  37. import org.rsbot.event.events.ServerMessageEvent;
  38. import org.rsbot.event.listeners.PaintListener;
  39. import org.rsbot.event.listeners.ServerMessageListener;
  40. import org.rsbot.script.Script;
  41. import org.rsbot.script.ScriptManifest;
  42. import org.rsbot.script.methods.Game;
  43. import org.rsbot.script.wrappers.RSArea;
  44. import org.rsbot.script.wrappers.RSNPC;
  45. import org.rsbot.script.wrappers.RSTile;
  46. import org.rsbot.util.GlobalConfiguration;
  47. import java.awt.Color;
  48. import java.awt.Font;
  49. import java.awt.Graphics;
  50. import java.awt.Rectangle;
  51. import org.rsbot.event.events.ServerMessageEvent;
  52. import org.rsbot.script.Script;
  53. import org.rsbot.script.ScriptManifest;
  54. import org.rsbot.script.wrappers.RSArea;
  55. import org.rsbot.script.wrappers.RSCharacter;
  56. import org.rsbot.script.wrappers.RSComponent;
  57. import org.rsbot.script.wrappers.RSInterface;
  58. import org.rsbot.script.wrappers.RSNPC;
  59. import org.rsbot.script.wrappers.RSTile;
  60. import java.awt.BasicStroke;
  61. import java.awt.Color;
  62. import java.awt.Container;
  63. import java.awt.Dimension;
  64. import java.awt.Font;
  65. import java.awt.Graphics;
  66. import java.awt.Graphics2D;
  67. import java.awt.Image;
  68. import java.awt.Insets;
  69. import java.awt.Point;
  70. import java.awt.RenderingHints;
  71. import java.awt.SystemColor;
  72. import java.awt.image.BufferedImage;
  73. import java.io.BufferedReader;
  74. import java.io.BufferedWriter;
  75. import java.io.File;
  76. import java.io.FileWriter;
  77. import java.io.IOException;
  78. import java.io.InputStreamReader;
  79. import java.net.MalformedURLException;
  80. import java.net.URL;
  81. import java.net.URLConnection;
  82.  
  83. import javax.imageio.ImageIO;
  84. import javax.swing.ImageIcon;
  85. import javax.swing.JButton;
  86. import javax.swing.JFileChooser;
  87. import javax.swing.JFrame;
  88. import javax.swing.JLabel;
  89. import javax.swing.JOptionPane;
  90. import javax.swing.JPanel;
  91. import javax.swing.UIManager;
  92.  
  93. import java.awt.event.ActionEvent;
  94. import java.awt.event.ActionListener;
  95. import java.awt.event.MouseEvent;
  96. import java.awt.event.MouseListener;
  97. import java.awt.event.MouseMotionListener;
  98.  
  99. import org.rsbot.event.events.ServerMessageEvent;
  100. import org.rsbot.event.listeners.PaintListener;
  101. import org.rsbot.event.listeners.ServerMessageListener;
  102. import org.rsbot.script.Script;
  103. import org.rsbot.script.ScriptManifest;
  104. import org.rsbot.script.methods.Game;
  105. import org.rsbot.script.methods.Skills;
  106. import org.rsbot.script.wrappers.RSArea;
  107. import org.rsbot.script.wrappers.RSNPC;
  108. import org.rsbot.script.wrappers.RSTile;
  109.  
  110. /*
  111.  Author: LegendOwnz
  112.  Converted To 2.XX By: Norton50
  113.  Side note: Removed Any Useless Code In The Script
  114.  I Keep My Promise I Will Update Now :]
  115.  */
  116.  
  117. @SuppressWarnings({ "unused", "deprecation" })
  118. @ScriptManifest(authors = { "Norton50, LegendOwnz" }, name = "<HTML><B><FONT COLOR=\"red\">Norton's Fixed LegendSudoku</FONT></B></HTML>", version = 6.3, description = "The Best Sudoku Solver")
  119. public class NortonSudoku extends Script implements PaintListener,
  120.  
  121. ServerMessageListener {
  122.         private int speed;
  123.         private int clicks;
  124.         private int[][] Solve;
  125.         private Boolean exited;
  126.         private int failcount;
  127.         private int failed;
  128.         private int solved;
  129.         private boolean stop;;
  130.         private long screentime;
  131.         private Items items;
  132.         private long start_gold;
  133.         private long start_weath;
  134.         private RSArea gameArea;
  135.  
  136.         public NortonSudoku() {
  137.  
  138.                 this.speed = 1;
  139.  
  140.                 this.clicks = 0;
  141.                 this.Solve = new int[9][9];
  142.  
  143.                 this.exited = Boolean.valueOf(false);
  144.  
  145.                 this.failcount = 0;
  146.  
  147.                 this.failed = 0;
  148.                 this.solved = 0;
  149.  
  150.                 this.stop = false;
  151.  
  152.                 this.starttime = System.currentTimeMillis();
  153.                 this.screentime = (this.starttime + 300000L);
  154.  
  155.                 this.items = null;
  156.  
  157.                 this.start_gold = 0L;
  158.                 this.start_weath = 0L;
  159.  
  160.                 this.gameArea = new RSArea(new RSTile(3301, 3209), new RSTile(3306,
  161.                                 3214));
  162.         }
  163.  
  164.         public String state = "Loading Legend Sudoku";
  165.         private int naturePrice;
  166.         private int cosmicPrice;
  167.         private int bloodPrice;
  168.         private int deathPrice;
  169.         private int chaosPrice;
  170.         private int mindPrice;
  171.         private int soulPrice;
  172.         private int bodyPrice;
  173.         private int lawPrice;
  174.         private final RSArea gameArea1 = new RSArea(new RSTile(3301, 3209),
  175.                         new RSTile(3306, 3214));
  176.         private long starttime;
  177.  
  178.         long getRuneCosts() {
  179.                 if (this.items == null)
  180.                         return 0L;
  181.                 long l = this.inventory.getCount(true,
  182.                                 new int[] { this.items.natureID }) * 177;
  183.  
  184.                 l += this.inventory.getCount(true, new int[] { this.items.cosmicID })
  185.                                 * 68;
  186.                 l += this.inventory.getCount(true, new int[] { this.items.bloodID })
  187.                                 * 354;
  188.                 l += this.inventory.getCount(true, new int[] { this.items.deathID })
  189.                                 * 337;
  190.                 l += this.inventory.getCount(true, new int[] { this.items.chaosID })
  191.                                 * 113;
  192.                 l += this.inventory.getCount(true, new int[] { this.items.mindID })
  193.                                 * 3;
  194.                 l += this.inventory.getCount(true, new int[] { this.items.soulID })
  195.                                 * 359;
  196.                 l += this.inventory.getCount(true, new int[] { this.items.bodyID })
  197.                                 * 4;
  198.                 l += this.inventory.getCount(true, new int[] { this.items.lawID })
  199.                                 * 296;
  200.                 return l;
  201.         }
  202.  
  203.         private int natureInvID = 561;
  204.         private int cosmicInvID = 564;
  205.         private int bloodInvID = 565;
  206.         private int deathInvID = 560;
  207.         private int chaosInvID = 562;
  208.         private int mindInvID = 558;
  209.         private int soulInvID = 566;
  210.         private int bodyInvID = 559;
  211.         private int lawInvID = 563;
  212.         private boolean started = false;
  213.         private int profit = 0;
  214.         private int startMoney = 0;
  215.         private int startCash = 0;
  216.         private int startRunes = 0;
  217.         private long HOUR_MS = 0;
  218.         private int currentMoney = 0;
  219.         private int currentCash = 0;
  220.         private int currentRunes = 0;
  221.         private static final String UPDATER_FILE_NAME = "NortonSudoku.java";
  222.         private static final String UPDATER_URL = "http://pastebin.com/raw.php?i=x6Jdk5GV";
  223.         private static final Pattern UPDATER_VERSION_PATTERN = Pattern
  224.                         .compile("version\\s*=\\s*([0-9.]+)");
  225.         boolean messedUp = false;
  226.         boolean sudokuOpen = false;
  227.         boolean sudokuSolved = false;
  228.         boolean talked = false;
  229.         public ScriptManifest properties = getClass().getAnnotation(
  230.                         ScriptManifest.class);
  231.         private int[][] sudokuGrid = new int[9][9];
  232.         private int mindID = 8982;
  233.         private int fireID = 8980;
  234.         private int airID = 8975;
  235.         private int waterID = 8987;
  236.         private int earthID = 8979;
  237.         private int bodyID = 8976;
  238.         private int deathID = 8978;
  239.         private int chaosID = 8977;
  240.         private int lawID = 8981;
  241.         long scriptStartTIME = 0;
  242.  
  243.         int aliID = 1862;
  244.  
  245.         int moneyID = 995;
  246.  
  247.         private long perHour(long paramLong1, long paramLong2) {
  248.                 double d1 = 0.0D;
  249.                 long l1 = 0L;
  250.                 long l2 = 0L;
  251.                 long l3 = 0L;
  252.  
  253.                 if (paramLong2 >= 1000L) {
  254.                         l1 = paramLong2 / 1000L;
  255.                 }
  256.                 if (l1 >= 60L) {
  257.                         l2 = l1 / 60L;
  258.                         l1 -= l2 * 60L;
  259.                 }
  260.  
  261.                 if (l2 >= 60L) {
  262.                         l3 = l2 / 60L;
  263.                         l2 -= l3 * 60L;
  264.                 }
  265.  
  266.                 if (l3 > 0L)
  267.                         d1 = l3 * 60L * 60L;
  268.                 if (l2 > 0L)
  269.                         d1 += l2 * 60L;
  270.                 if (l1 > 0L) {
  271.                         d1 += l1;
  272.                 }
  273.                 double d2 = paramLong1 / d1;
  274.                 double d3 = d2 * 60.0D;
  275.                 return Math.round(d3 * 60.0D);
  276.         }
  277.  
  278.         private String formatLong(long paramLong) {
  279.                 if (paramLong >= 1000000000L) {
  280.                         return paramLong / 1000000000L + "BIL";
  281.                 }
  282.                 if (paramLong >= 10000000L) {
  283.                         return paramLong / 1000000L + "MIL";
  284.                 }
  285.                 if (paramLong >= 1000L) {
  286.                         return paramLong / 1000L + "K";
  287.                 }
  288.                 return "" + paramLong;
  289.         }
  290.  
  291.         String formatTime(long paramLong) {
  292.                 if (paramLong <= 0L)
  293.                         return "00:00:00";
  294.                 long l1 = 0L;
  295.                 long l2 = 0L;
  296.                 long l3 = 0L;
  297.                 String str = "";
  298.  
  299.                 if (paramLong >= 1000L) {
  300.                         l1 = paramLong / 1000L;
  301.                 }
  302.  
  303.                 if (l1 >= 60L) {
  304.                         l2 = l1 / 60L;
  305.                         l1 -= l2 * 60L;
  306.                 }
  307.  
  308.                 if (l2 >= 60L) {
  309.                         l3 = l2 / 60L;
  310.                         l2 -= l3 * 60L;
  311.                 }
  312.  
  313.                 if (l3 < 10L)
  314.                         str = str + "0" + l3 + ":";
  315.                 else
  316.                         str = str + Long.toString(l3) + ":";
  317.                 if (l2 < 10L)
  318.                         str = str + "0" + l2 + ":";
  319.                 else
  320.                         str = str + Long.toString(l2) + ":";
  321.                 if (l1 < 10L)
  322.                         str = str + "0" + l1;
  323.                 else
  324.                         str = str + Long.toString(l1);
  325.                 if (l3 >= 10000L)
  326.                         return "00:00:00";
  327.                 return str;
  328.         }
  329.  
  330.         public Boolean Hi() throws InterruptedException {
  331.                 if (!inArea(aliArea))
  332.                         return Faill();
  333.                 return true;
  334.         }
  335.  
  336.         long getProfit() {
  337.                 if (this.items == null)
  338.                         return 0L;
  339.                 return this.inventory.getCount(true, new int[] { this.items.goldID })
  340.                                 + getRuneCosts() - this.start_weath;
  341.         }
  342.  
  343.         public boolean onStart() {
  344.                 HOUR_MS = System.currentTimeMillis();
  345.                 JOptionPane.showMessageDialog(null, "Welcome To Legend Sudoku revamp by Norton50\n"
  346.                                 + "        [V6.3.1]");
  347.                 resetGrid();
  348.                 return true;
  349.         }
  350.  
  351.         private final int[] aliArea = { 3300, 3208, 3308, 3214 };
  352.         private RSTile aliTile = new RSTile(3305, 3211);
  353.         private RSTile aliTileextra = new RSTile(3305, 3212);
  354.  
  355.         private enum State {
  356.                 buyRunes, openSudoku, doSudoku, toAli, end, error, Gone;
  357.  
  358.         }
  359.  
  360.         private Image getImage(String url) {
  361.                 try {
  362.                         return ImageIO.read(new URL(url));
  363.                 } catch (IOException e) {
  364.                         return null;
  365.                 }
  366.         }
  367.  
  368.         private State getState() {
  369.  
  370.                 try {
  371.                         if (!this.gameArea.contains(getMyPlayer().getLocation()))
  372.                                 return State.Gone;
  373.  
  374.                         if (inArea(aliArea)) {
  375.                                 if (inventory.getCount(true, moneyID) < 70000) {
  376.                                         return State.end;
  377.  
  378.                                 }
  379.                                 if (inventory.getCount(true, moneyID) >= 70000) {
  380.                                         if (sudokuOpen == false) {
  381.                                                 sudokuSolved = false;
  382.                                                 if (interfaces.get(228).getComponent(2)
  383.                                                                 .containsText("Buy all")) {
  384.                                                         return State.buyRunes;
  385.                                                 }
  386.                                                 if (!interfaces.get(228).getComponent(2)
  387.                                                                 .containsText("Buy all")) {
  388.                                                         return State.openSudoku;
  389.                                                 }
  390.                                         }
  391.                                         if (sudokuOpen == true) {
  392.                                                 return State.doSudoku;
  393.                                         }
  394.                                 }
  395.                         }
  396.                         if (!inArea(aliArea)) {
  397.                                 return State.Gone;
  398.                         }
  399.  
  400.                 } catch (Exception e) {
  401.                 }
  402.                 return State.error;
  403.  
  404.         }
  405.  
  406.         private final RenderingHints antialiasing = new RenderingHints(
  407.                         RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  408.  
  409.         private final Color color1 = new Color(153, 0, 0, 174);
  410.         private final Color color2 = new Color(51, 204, 255);
  411.         private final Color color3 = new Color(102, 153, 255);
  412.         private final Color color4 = new Color(204, 255, 204);
  413.         private final Color color5 = new Color(153, 255, 255);
  414.         private final Color color6 = new Color(51, 204, 0);
  415.         private final Color color7 = new Color(0, 153, 204);
  416.  
  417.         private final BasicStroke stroke1 = new BasicStroke(2);
  418.         private final BasicStroke stroke2 = new BasicStroke(1);
  419.  
  420.         private final Font font1 = new Font("SansSerif", 1, 14);
  421.         private final Font font2 = new Font("Segoe UI Semibold", 0, 14);
  422.         private final Font font3 = new Font("SansSerif", 3, 14);
  423.  
  424.         private final Image img1 = getImage("http://legendownz.webs.com/Legend%20Sudoku/Bagi.png");
  425.  
  426.         @Override
  427.         public int loop() {
  428.                 if (!started) {
  429.                         this.items = new Items(this);
  430.                         this.screentime = (this.starttime + 300000L);
  431.                         this.start_gold = this.inventory.getCount(true,
  432.                                         new int[] { this.items.goldID });
  433.                         this.start_weath = (this.start_gold + getRuneCosts());
  434.                         started = true;
  435.                 }
  436.                 if (this.inventory.getCount(true, new int[] { 995 }) != 0)
  437.                         if (this.inventory.getCount(true, new int[] { 995 }) < 30000)
  438.                                 if (this.npcs.getNearest(new int[] { 1862 }) != null) {
  439.                                         log("We Are Below 30k. Stopping Script");
  440.                                         return -1;
  441.                                 }
  442.  
  443.                 if (interfaces.get(288).getComponent(9).containsText("open casket")) {
  444.                         sudokuOpen = true;
  445.                 }
  446.                 if (!interfaces.get(288).getComponent(9).containsText("open casket")) {
  447.                         sudokuOpen = false;
  448.                 }
  449.                 exitGeneralStore();
  450.                 if (messedUp == true) {
  451.                         talked = false;
  452.                         sudokuOpen = false;
  453.                         messedUp = false;
  454.                         failed++;
  455.                         resetGrid();
  456.                         interfaces.getComponent(288, 212).doClick(true);
  457.                         sleep(random(500, 750));
  458.  
  459.                 }
  460.  
  461.                 try {
  462.                         switch (getState()) {
  463.  
  464.                         case Gone:
  465.                                 log("Got Lost, Walking Back");
  466.                                 talked = false;
  467.                                 Fail();
  468.                                 break;
  469.  
  470.                         case toAli:
  471.  
  472.                                 toAli();
  473.                                 break;
  474.  
  475.                         case openSudoku:
  476.  
  477.                                 openSudoku();
  478.  
  479.                                 break;
  480.  
  481.                         case doSudoku:
  482.                                 doSudoku();
  483.  
  484.                                 break;
  485.  
  486.                         case buyRunes:
  487.                                 buyRunes();
  488.  
  489.                                 break;
  490.  
  491.                         case end:
  492.                                 stopScript();
  493.                                 break;
  494.                         }
  495.                 } catch (Exception e) {
  496.                 }
  497.                 calculateProfit();
  498.                 return 200;
  499.  
  500.         }
  501.  
  502.         private Boolean Faill() throws InterruptedException {
  503.                 walking.walkTileMM(aliTileextra, 2, 2);
  504.                 wait(700);
  505.                 RSNPC npc = npcs.getNearest(aliID);
  506.                 npc.doAction("Talk-to");
  507.                 talked = true;
  508.                 sleep(00 + random(00, 00));
  509.                 return true;
  510.         }
  511.  
  512.         private void Fail() throws InterruptedException {
  513.                 walking.walkTileMM(aliTileextra, 2, 2);
  514.                 wait(500);
  515.                 RSNPC npc = npcs.getNearest(aliID);
  516.                 npc.doAction("Talk-to");
  517.                 talked = true;
  518.                 sleep(00 + random(00, 00));
  519.  
  520.         }
  521.  
  522.         private void getPrices() {
  523.                 naturePrice = (179);
  524.                 cosmicPrice = (70);
  525.                 bloodPrice = (347);
  526.                 deathPrice = (337);
  527.                 chaosPrice = (117);
  528.                 mindPrice = (3);
  529.                 soulPrice = (345);
  530.                 bodyPrice = (4);
  531.                 lawPrice = (295);
  532.  
  533.                 startCash = inventory.getCount(true, 995);
  534.                 startRunes = (179 * inventory.getCount(561)
  535.                                 + 70 * inventory.getCount(564) + 347
  536.                                 * inventory.getCount(565) + 337
  537.                                 * inventory.getCount(560) + 117
  538.                                 * inventory.getCount(562) + 3
  539.                                 * inventory.getCount(558) + 345
  540.                                 * inventory.getCount(566) + 4
  541.                                 * inventory.getCount(559) + 295
  542.                                 * inventory.getCount(563));
  543.                 startMoney = startCash + startRunes;
  544.  
  545.         }
  546.  
  547.         public void NortonSudokuAntiBan() {
  548.                 int randomNum = random(1, 12);
  549.                 int r = random(1, 16);
  550.                 if (randomNum == 6) {
  551.                         if (r == 1) {
  552.                                 state = "Doing Antiban";
  553.                                 camera.setAngle(random(100, 360));
  554.                                 camera.setAngle(random(100, 680));
  555.                                 log("Changed Camrea View");
  556.                                 sleep(random(200, 400));
  557.                         }
  558.                         if (r == 2) {
  559.                                 state = "Doing Antiban";
  560.  
  561.                                 camera.setAngle(random(100, 360));
  562.                                 camera.setAngle(random(100, 680));
  563.                                 log(" Changed Camera View");
  564.                                 sleep(random(200, 400));
  565.                         }
  566.                         if (r == 3) {
  567.                                 state = "Doing Antiban";
  568.  
  569.                                 camera.setAngle(random(100, 360));
  570.                                 camera.setAngle(random(100, 680));
  571.                                 log("Changed Camera View");
  572.                                 sleep(random(200, 400));
  573.                         }
  574.                         if (r == 4) {
  575.                                 state = "Doing Antiban";
  576.  
  577.                                 camera.setAngle(random(100, 360));
  578.                                 camera.setAngle(random(100, 680));
  579.                                 log("Changed Camera View");
  580.                                 sleep(random(200, 400));
  581.                         }
  582.                         if (r == 5) {
  583.                                 state = "Doing Antiban";
  584.  
  585.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  586.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  587.                                 log("Moved Mouse for Human Like Patterns");
  588.                                 sleep(random(200, 400));
  589.                         }
  590.                         if (r == 6) {
  591.                                 state = "Doing Antiban";
  592.  
  593.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  594.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  595.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  596.                                 log("Moved Mouse for Human Like Patterns");
  597.                                 sleep(random(200, 400));
  598.                         }
  599.                         if (r == 7) {
  600.                                 state = "Doing Antiban";
  601.  
  602.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  603.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  604.                                 log("Moved Mouse for Human Like Patterns");
  605.                                 sleep(random(200, 400));
  606.                         }
  607.                         if (r == 8) {
  608.                                 state = "Doing Antiban";
  609.                                 mouse.move(random(100, 600), random(100, 400), 0, 0);
  610.                                 log("Moved Mouse for Human Like Patterns");
  611.                                 sleep(random(200, 400));
  612.  
  613.                         }
  614.  
  615.                 }
  616.         }
  617.  
  618.         private void calculateProfit() {
  619.  
  620.                 currentCash = inventory.getCount(true, 995);
  621.                 currentRunes = (177 * inventory.getCount(561))
  622.                                 + (68 * inventory.getCount(564))
  623.                                 + (354 * inventory.getCount(565))
  624.                                 + (337 * inventory.getCount(560))
  625.                                 + (113 * inventory.getCount(562))
  626.                                 + (3 * inventory.getCount(558))
  627.                                 + (359 * inventory.getCount(566))
  628.                                 + (4 * inventory.getCount(559))
  629.                                 + (296 * inventory.getCount(563));
  630.  
  631.                 currentMoney = currentCash + currentRunes;
  632.  
  633.                 profit = currentMoney - startMoney;
  634.  
  635.         }
  636.  
  637.         public double getVersion() {
  638.                 return properties.version();
  639.         }
  640.  
  641.         private void GoToAli() {
  642.                 walking.walkTileMM(aliTileextra, 2, 2);
  643.  
  644.         }
  645.  
  646.         private void talktoalinow() {
  647.                 RSNPC npc = npcs.getNearest(aliID);
  648.                 npc.doAction("Talk-to");
  649.                 talked = true;
  650.                 sleep(00 + random(00, 00));
  651.  
  652.         }
  653.  
  654.         private void toAli() {
  655.                 walking.walkTileMM(aliTile, 2, 2);
  656.         }
  657.  
  658.         private void openSudoku() throws InterruptedException {
  659.                 while (npcs.getNearest(aliID) != null && talked == false) {
  660.                         RSNPC npc = npcs.getNearest(aliID);
  661.                         npc.doAction("Talk-to");
  662.                         talked = true;
  663.  
  664.                 }
  665.  
  666.                 state = "Talking To Ali";
  667.                 mouse.setSpeed(random(6, 7));
  668.                 Hi();
  669.                 sleep(00 + random(10, 20));
  670.                 while ((interfaces.get(241).getComponent(4)
  671.                                 .containsText("How's the adventuring"))) {
  672.                         interfaces.getComponent(241, 5).doClick(true);
  673.                         sleep(00 + random(01, 05));
  674.  
  675.                 }
  676.                 while ((interfaces.get(228).getComponent(2)
  677.                                 .containsText("Hi, Ali. Not bad"))) {
  678.                         interfaces.getComponent(228, 2).doClick(true);
  679.                         sleep(00 + random(01, 05));
  680.  
  681.                 }
  682.                 while ((interfaces.get(64).getComponent(4).containsText("Hi Ali"))) {
  683.                         interfaces.getComponent(64, 5).doClick(true);
  684.                         sleep(00 + random(01, 05));
  685.  
  686.                 }
  687.                 while ((interfaces.get(241).getComponent(4)
  688.                                 .containsText("Still selling"))) {
  689.                         interfaces.getComponent(241, 5).doClick(true);
  690.                         sleep(00 + random(01, 05));
  691.  
  692.                 }
  693.                 while ((interfaces.get(241).getComponent(4).containsText("Sigh"))) {
  694.                         interfaces.getComponent(241, 5).doClick(true);
  695.                         sleep(00 + random(01, 05));
  696.                 }
  697.                 while ((interfaces.get(64).getComponent(4)
  698.                                 .containsText("What's up with you"))) {
  699.                         interfaces.getComponent(64, 5).doClick(true);
  700.                         sleep(00 + random(01, 05));
  701.  
  702.                 }
  703.                 while ((interfaces.get(243).getComponent(4)
  704.                                 .containsText("Well, I always fancied"))) {
  705.                         interfaces.getComponent(243, 7).doClick(true);
  706.                         sleep(00 + random(01, 05));
  707.  
  708.                 }
  709.                 if ((interfaces.get(64).getComponent(4)
  710.                                 .containsText("Is there anything I could do"))) {
  711.                         interfaces.getComponent(64, 5).doClick(true);
  712.                         sleep(00 + random(01, 05));
  713.  
  714.                 }
  715.                 while ((interfaces.get(241).getComponent(4)
  716.                                 .containsText("How's the adventuring"))) {
  717.                         interfaces.getComponent(241, 5).doClick(true);
  718.                         sleep(00 + random(01, 05));
  719.  
  720.                 }
  721.                 while ((interfaces.get(244).getComponent(4)
  722.                                 .containsText("I have a friend"))) {
  723.                         interfaces.getComponent(244, 8).doClick(true);
  724.                         sleep(00 + random(01, 05));
  725.  
  726.                 }
  727.                 while ((interfaces.get(64).getComponent(4)
  728.                                 .containsText("Maybe I could give it a look"))) {
  729.                         interfaces.getComponent(64, 5).doClick(true);
  730.                         sleep(00 + random(01, 05));
  731.  
  732.                 }
  733.                 while ((interfaces.get(232).getComponent(4)
  734.                                 .containsText("selection of runes"))) {
  735.                         interfaces.getComponent(232, 4).doClick(true);
  736.                         sleep(00 + random(01, 05));
  737.  
  738.                 }
  739.                 while ((interfaces.get(232).getComponent(3)
  740.                                 .containsText("selection of runes"))) {
  741.                         interfaces.getComponent(232, 3).doClick(true);
  742.                         sleep(00 + random(01, 05));
  743.  
  744.                 }
  745.                 while ((interfaces.get(234).getComponent(4)
  746.                                 .containsText("selection of runes"))) {
  747.                         interfaces.getComponent(234, 4).doClick(true);
  748.                         sleep(00 + random(01, 05));
  749.  
  750.                 }
  751.                 while ((interfaces.get(230).getComponent(2)
  752.                                 .containsText("selection of runes"))) {
  753.                         interfaces.getComponent(230, 2).doClick(true);
  754.                         sleep(10 + random(100, 200));
  755.                 }
  756.                 while ((interfaces.get(241).getComponent(4).containsText("Hang on"))) {
  757.                         interfaces.getComponent(241, 5).doClick(true);
  758.                         sleep(random(100, 200));
  759.  
  760.                 }
  761.                 while ((interfaces.get(233).getComponent(3)
  762.                                 .containsText("large casket of runes"))) {
  763.                         interfaces.getComponent(233, 3).doClick(true);
  764.                         sleep(00 + random(00, 00));
  765.  
  766.                 }
  767.                 while ((interfaces.get(231).getComponent(3)
  768.                                 .containsText("large casket of runes"))) {
  769.                         interfaces.getComponent(231, 3).doClick(true);
  770.                         sleep(00 + random(00, 00));
  771.  
  772.                 }
  773.                 while ((interfaces.get(235).getComponent(3)
  774.                                 .containsText("large casket of runes"))) {
  775.                         interfaces.getComponent(235, 3).doClick(true);
  776.                         sleep(00 + random(00, 00));
  777.  
  778.                 }
  779.                 while ((interfaces.get(64).getComponent(4)
  780.                                 .containsText("On second thoughts"))) {
  781.                         talked = false;
  782.                         interfaces.getComponent(64, 5).doClick(true);
  783.                         sleep(00 + random(00, 00));
  784.  
  785.                 }
  786.                 while ((interfaces.get(65).getComponent(4)
  787.                                 .containsText("I'm feeling lucky"))) {
  788.                         interfaces.getComponent(65, 6).doClick(true);
  789.                         sleep(00 + random(00, 00));
  790.  
  791.                 }
  792.                 while ((interfaces.get(230).getComponent(4)
  793.                                 .containsText("Examine lock"))) {
  794.                         interfaces.getComponent(230, 4).doClick(true);
  795.                         sleep(00 + random(00, 00));
  796.                         sudokuOpen = true;
  797.  
  798.                 }
  799.                 while (interfaces.get(64).getComponent(4)
  800.                                 .containsText("Who did you want me")) {
  801.                         talked = false;
  802.                         interfaces.getComponent(64, 5).doClick(true);
  803.                         sleep(00 + random(00, 00));
  804.  
  805.                 }
  806.         }
  807.  
  808.         public void RandomWays() {
  809.                 int rr = random(1, 5);
  810.  
  811.                 if (rr == 1) {
  812.                         state = "Solving Sudoku Random Way";
  813.                         mouse.setSpeed(1);
  814.                         for (int k = 0; k < 9; k++) {
  815.                                 switch (k) {
  816.  
  817.                                 case 0:
  818.  
  819.                                         interfaces.getComponent(288, 205).doClick(true);
  820.                                         for (int r = 0; r < 9; r++) {
  821.                                                 for (int c = 0; c < 9; c++) {
  822.                                                         int i = (11 + c * 2 + r * 18);
  823.                                                         if ((sudokuGrid[r][c] == 1)
  824.                                                                         && !(interfaces.get(288).getComponent(i)
  825.                                                                                         .getModelID() == mindID)) {
  826.                                                                 interfaces.getComponent(288, i).doClick(true);
  827.  
  828.                                                         }
  829.                                                 }
  830.                                         }
  831.                                         break;
  832.                                 case 1:
  833.  
  834.                                         interfaces.getComponent(288, 204).doClick(true);
  835.                                         for (int r = 0; r < 9; r++) {
  836.                                                 for (int c = 0; c < 9; c++) {
  837.                                                         int i = (11 + c * 2 + r * 18);
  838.                                                         if (sudokuGrid[r][c] == 3
  839.                                                                         && !(interfaces.get(288).getComponent(i)
  840.                                                                                         .getModelID() == airID)) {
  841.                                                                 interfaces.getComponent(288, i).doClick(true);
  842.  
  843.                                                         }
  844.                                                 }
  845.                                         }
  846.                                         break;
  847.                                 case 2:
  848.  
  849.                                         interfaces.getComponent(288, 206).doClick(true);
  850.                                         for (int r = 0; r < 9; r++) {
  851.                                                 for (int c = 0; c < 9; c++) {
  852.                                                         int i = (11 + c * 2 + r * 18);
  853.                                                         if (sudokuGrid[r][c] == 2
  854.                                                                         && !(interfaces.get(288).getComponent(i)
  855.                                                                                         .getModelID() == fireID)) {
  856.                                                                 interfaces.getComponent(288, i).doClick(true);
  857.  
  858.                                                         }
  859.                                                 }
  860.                                         }
  861.                                         break;
  862.                                 case 3:
  863.  
  864.                                         interfaces.getComponent(288, 203).doClick(true);
  865.                                         for (int r = 0; r < 9; r++) {
  866.                                                 for (int c = 0; c < 9; c++) {
  867.                                                         int i = (11 + c * 2 + r * 18);
  868.                                                         if (sudokuGrid[r][c] == 4
  869.                                                                         && !(interfaces.get(288).getComponent(i)
  870.                                                                                         .getModelID() == waterID)) {
  871.                                                                 interfaces.getComponent(288, i).doClick(true);
  872.                                                         }
  873.                                                 }
  874.                                         }
  875.                                         break;
  876.                                 case 4:
  877.  
  878.                                         interfaces.getComponent(288, 207).doClick(true);
  879.                                         for (int r = 0; r < 9; r++) {
  880.                                                 for (int c = 0; c < 9; c++) {
  881.                                                         int i = (11 + c * 2 + r * 18);
  882.                                                         if (sudokuGrid[r][c] == 6
  883.                                                                         && !(interfaces.get(288).getComponent(i)
  884.                                                                                         .getModelID() == bodyID)) {
  885.                                                                 interfaces.getComponent(288, i).doClick(true);
  886.  
  887.                                                         }
  888.                                                 }
  889.                                         }
  890.                                         break;
  891.                                 case 5:
  892.  
  893.                                         interfaces.getComponent(288, 202).doClick(true);
  894.                                         for (int r = 0; r < 9; r++) {
  895.                                                 for (int c = 0; c < 9; c++) {
  896.                                                         int i = (11 + c * 2 + r * 18);
  897.                                                         if (sudokuGrid[r][c] == 5
  898.                                                                         && !(interfaces.get(288).getComponent(i)
  899.                                                                                         .getModelID() == earthID)) {
  900.                                                                 interfaces.getComponent(288, i).doClick(true);
  901.  
  902.                                                         }
  903.                                                 }
  904.                                         }
  905.                                         break;
  906.                                 case 6:
  907.  
  908.                                         interfaces.getComponent(288, 209).doClick(true);
  909.                                         for (int r = 0; r < 9; r++) {
  910.                                                 for (int c = 0; c < 9; c++) {
  911.                                                         int i = (11 + c * 2 + r * 18);
  912.                                                         if (sudokuGrid[r][c] == 8
  913.                                                                         && !(interfaces.get(288).getComponent(i)
  914.                                                                                         .getModelID() == chaosID)) {
  915.                                                                 interfaces.getComponent(288, i).doClick(true);
  916.                                                         }
  917.                                                 }
  918.                                         }
  919.                                         break;
  920.                                 case 7:
  921.  
  922.                                         interfaces.getComponent(288, 208).doClick(true);
  923.                                         for (int r = 0; r < 9; r++) {
  924.                                                 for (int c = 0; c < 9; c++) {
  925.                                                         int i = (11 + c * 2 + r * 18);
  926.                                                         if (sudokuGrid[r][c] == 7
  927.                                                                         && !(interfaces.get(288).getComponent(i)
  928.                                                                                         .getModelID() == deathID)) {
  929.                                                                 interfaces.getComponent(288, i).doClick(true);
  930.                                                         }
  931.                                                 }
  932.                                         }
  933.                                         break;
  934.                                 case 8:
  935.  
  936.                                         interfaces.getComponent(288, 210).doClick(true);
  937.                                         for (int r = 0; r < 9; r++) {
  938.                                                 for (int c = 0; c < 9; c++) {
  939.                                                         int i = (11 + c * 2 + r * 18);
  940.                                                         if (sudokuGrid[r][c] == 9
  941.                                                                         && !(interfaces.get(288).getComponent(i)
  942.                                                                                         .getModelID() == lawID)) {
  943.                                                                 interfaces.getComponent(288, i).doClick(true);
  944.                                                         }
  945.                                                 }
  946.                                         }
  947.                                         break;
  948.                                 }
  949.                         }
  950.                 }
  951.  
  952.                 if (rr == 2) {
  953.                         state = "Solving Sudoku Random Way";
  954.                         mouse.setSpeed(1);
  955.                         for (int k = 0; k < 9; k++) {
  956.                                 switch (k) {
  957.  
  958.                                 case 0:
  959.  
  960.                                         interfaces.getComponent(288, 205).doClick(true);
  961.                                         for (int r = 0; r < 9; r++) {
  962.                                                 for (int c = 0; c < 9; c++) {
  963.                                                         int i = (11 + c * 2 + r * 18);
  964.                                                         if ((sudokuGrid[r][c] == 1)
  965.                                                                         && !(interfaces.get(288).getComponent(i)
  966.                                                                                         .getModelID() == mindID)) {
  967.                                                                 interfaces.getComponent(288, i).doClick(true);
  968.  
  969.                                                         }
  970.                                                 }
  971.                                         }
  972.                                         break;
  973.                                 case 1:
  974.  
  975.                                         interfaces.getComponent(288, 204).doClick(true);
  976.                                         for (int r = 0; r < 9; r++) {
  977.                                                 for (int c = 0; c < 9; c++) {
  978.                                                         int i = (11 + c * 2 + r * 18);
  979.                                                         if (sudokuGrid[r][c] == 3
  980.                                                                         && !(interfaces.get(288).getComponent(i)
  981.                                                                                         .getModelID() == airID)) {
  982.                                                                 interfaces.getComponent(288, i).doClick(true);
  983.  
  984.                                                         }
  985.                                                 }
  986.                                         }
  987.                                         break;
  988.  
  989.                                 case 2:
  990.  
  991.                                         interfaces.getComponent(288, 206).doClick(true);
  992.                                         for (int r = 0; r < 9; r++) {
  993.                                                 for (int c = 0; c < 9; c++) {
  994.                                                         int i = (11 + c * 2 + r * 18);
  995.                                                         if (sudokuGrid[r][c] == 2
  996.                                                                         && !(interfaces.get(288).getComponent(i)
  997.                                                                                         .getModelID() == fireID)) {
  998.                                                                 interfaces.getComponent(288, i).doClick(true);
  999.  
  1000.                                                         }
  1001.                                                 }
  1002.                                         }
  1003.                                         break;
  1004.                                 case 3:
  1005.  
  1006.                                         interfaces.getComponent(288, 203).doClick(true);
  1007.                                         for (int r = 0; r < 9; r++) {
  1008.                                                 for (int c = 0; c < 9; c++) {
  1009.                                                         int i = (11 + c * 2 + r * 18);
  1010.                                                         if (sudokuGrid[r][c] == 4
  1011.                                                                         && !(interfaces.get(288).getComponent(i)
  1012.                                                                                         .getModelID() == waterID)) {
  1013.                                                                 interfaces.getComponent(288, i).doClick(true);
  1014.                                                         }
  1015.                                                 }
  1016.                                         }
  1017.                                         break;
  1018.                                 case 4:
  1019.  
  1020.                                         interfaces.getComponent(288, 207).doClick(true);
  1021.                                         for (int r = 0; r < 9; r++) {
  1022.                                                 for (int c = 0; c < 9; c++) {
  1023.                                                         int i = (11 + c * 2 + r * 18);
  1024.                                                         if (sudokuGrid[r][c] == 6
  1025.                                                                         && !(interfaces.get(288).getComponent(i)
  1026.                                                                                         .getModelID() == bodyID)) {
  1027.                                                                 interfaces.getComponent(288, i).doClick(true);
  1028.  
  1029.                                                         }
  1030.                                                 }
  1031.                                         }
  1032.                                         break;
  1033.                                 case 5:
  1034.                                         interfaces.getComponent(288, 209).doClick(true);
  1035.                                         for (int r = 0; r < 9; r++) {
  1036.                                                 for (int c = 0; c < 9; c++) {
  1037.                                                         int i = (11 + c * 2 + r * 18);
  1038.                                                         if (sudokuGrid[r][c] == 8
  1039.                                                                         && !(interfaces.get(288).getComponent(i)
  1040.                                                                                         .getModelID() == chaosID)) {
  1041.                                                                 interfaces.getComponent(288, i).doClick(true);
  1042.  
  1043.                                                         }
  1044.                                                 }
  1045.                                         }
  1046.                                         break;
  1047.                                 case 6:
  1048.                                         interfaces.getComponent(288, 202).doClick(true);
  1049.                                         for (int r = 0; r < 9; r++) {
  1050.                                                 for (int c = 0; c < 9; c++) {
  1051.                                                         int i = (11 + c * 2 + r * 18);
  1052.                                                         if (sudokuGrid[r][c] == 5
  1053.                                                                         && !(interfaces.get(288).getComponent(i)
  1054.                                                                                         .getModelID() == earthID)) {
  1055.                                                                 interfaces.getComponent(288, i).doClick(true);
  1056.  
  1057.                                                         }
  1058.                                                 }
  1059.                                         }
  1060.                                         break;
  1061.                                 case 7:
  1062.                                         interfaces.getComponent(288, 210).doClick(true);
  1063.                                         for (int r = 0; r < 9; r++) {
  1064.                                                 for (int c = 0; c < 9; c++) {
  1065.                                                         int i = (11 + c * 2 + r * 18);
  1066.                                                         if (sudokuGrid[r][c] == 9
  1067.                                                                         && !(interfaces.get(288).getComponent(i)
  1068.                                                                                         .getModelID() == lawID)) {
  1069.                                                                 interfaces.getComponent(288, i).doClick(true);
  1070.                                                         }
  1071.                                                 }
  1072.                                         }
  1073.  
  1074.                                         break;
  1075.                                 case 8:
  1076.                                         interfaces.getComponent(288, 208).doClick(true);
  1077.                                         for (int r = 0; r < 9; r++) {
  1078.                                                 for (int c = 0; c < 9; c++) {
  1079.                                                         int i = (11 + c * 2 + r * 18);
  1080.                                                         if (sudokuGrid[r][c] == 7
  1081.                                                                         && !(interfaces.get(288).getComponent(i)
  1082.                                                                                         .getModelID() == deathID)) {
  1083.                                                                 interfaces.getComponent(288, i).doClick(true);
  1084.                                                         }
  1085.                                                 }
  1086.                                         }
  1087.                                         break;
  1088.                                 }
  1089.                         }
  1090.                 }
  1091.  
  1092.                 if (rr == 3) {
  1093.                         state = "Solving Sudoku Normally";
  1094.                         mouse.setSpeed(1);
  1095.                         for (int k = 0; k < 9; k++) {
  1096.                                 switch (k) {
  1097.                                 case 0:
  1098.  
  1099.                                         interfaces.getComponent(288, 205).doClick(true);
  1100.                                         for (int r = 0; r < 9; r++) {
  1101.                                                 for (int c = 0; c < 9; c++) {
  1102.                                                         int i = (11 + c * 2 + r * 18);
  1103.                                                         if ((sudokuGrid[r][c] == 1)
  1104.                                                                         && !(interfaces.get(288).getComponent(i)
  1105.                                                                                         .getModelID() == mindID)) {
  1106.                                                                 interfaces.getComponent(288, i).doClick(true);
  1107.                                                                 sleep(00 + random(00, 00));
  1108.  
  1109.                                                         }
  1110.                                                 }
  1111.                                         }
  1112.                                         break;
  1113.                                 case 1:
  1114.  
  1115.                                         interfaces.getComponent(288, 206).doClick(true);
  1116.                                         for (int r = 0; r < 9; r++) {
  1117.                                                 for (int c = 0; c < 9; c++) {
  1118.                                                         int i = (11 + c * 2 + r * 18);
  1119.                                                         if (sudokuGrid[r][c] == 2
  1120.                                                                         && !(interfaces.get(288).getComponent(i)
  1121.                                                                                         .getModelID() == fireID)) {
  1122.                                                                 interfaces.getComponent(288, i).doClick(true);
  1123.  
  1124.                                                         }
  1125.                                                 }
  1126.                                         }
  1127.                                         break;
  1128.                                 case 2:
  1129.  
  1130.                                         interfaces.getComponent(288, 204).doClick(true);
  1131.                                         for (int r = 0; r < 9; r++) {
  1132.                                                 for (int c = 0; c < 9; c++) {
  1133.                                                         int i = (11 + c * 2 + r * 18);
  1134.                                                         if (sudokuGrid[r][c] == 3
  1135.                                                                         && !(interfaces.get(288).getComponent(i)
  1136.                                                                                         .getModelID() == airID)) {
  1137.                                                                 interfaces.getComponent(288, i).doClick(true);
  1138.  
  1139.                                                         }
  1140.                                                 }
  1141.                                         }
  1142.                                         break;
  1143.                                 case 3:
  1144.  
  1145.                                         interfaces.getComponent(288, 203).doClick(true);
  1146.                                         for (int r = 0; r < 9; r++) {
  1147.                                                 for (int c = 0; c < 9; c++) {
  1148.                                                         int i = (11 + c * 2 + r * 18);
  1149.                                                         if (sudokuGrid[r][c] == 4
  1150.                                                                         && !(interfaces.get(288).getComponent(i)
  1151.                                                                                         .getModelID() == waterID)) {
  1152.                                                                 interfaces.getComponent(288, i).doClick(true);
  1153.                                                         }
  1154.                                                 }
  1155.                                         }
  1156.                                         break;
  1157.                                 case 4:
  1158.  
  1159.                                         interfaces.getComponent(288, 202).doClick(true);
  1160.                                         for (int r = 0; r < 9; r++) {
  1161.                                                 for (int c = 0; c < 9; c++) {
  1162.                                                         int i = (11 + c * 2 + r * 18);
  1163.                                                         if (sudokuGrid[r][c] == 5
  1164.                                                                         && !(interfaces.get(288).getComponent(i)
  1165.                                                                                         .getModelID() == earthID)) {
  1166.                                                                 interfaces.getComponent(288, i).doClick(true);
  1167.  
  1168.                                                         }
  1169.                                                 }
  1170.                                         }
  1171.                                         break;
  1172.                                 case 5:
  1173.  
  1174.                                         interfaces.getComponent(288, 207).doClick(true);
  1175.                                         for (int r = 0; r < 9; r++) {
  1176.                                                 for (int c = 0; c < 9; c++) {
  1177.                                                         int i = (11 + c * 2 + r * 18);
  1178.                                                         if (sudokuGrid[r][c] == 6
  1179.                                                                         && !(interfaces.get(288).getComponent(i)
  1180.                                                                                         .getModelID() == bodyID)) {
  1181.                                                                 interfaces.getComponent(288, i).doClick(true);
  1182.  
  1183.                                                         }
  1184.                                                 }
  1185.                                         }
  1186.                                         break;
  1187.                                 case 6:
  1188.  
  1189.                                         interfaces.getComponent(288, 208).doClick(true);
  1190.                                         for (int r = 0; r < 9; r++) {
  1191.                                                 for (int c = 0; c < 9; c++) {
  1192.                                                         int i = (11 + c * 2 + r * 18);
  1193.                                                         if (sudokuGrid[r][c] == 7
  1194.                                                                         && !(interfaces.get(288).getComponent(i)
  1195.                                                                                         .getModelID() == deathID)) {
  1196.                                                                 interfaces.getComponent(288, i).doClick(true);
  1197.  
  1198.                                                         }
  1199.                                                 }
  1200.                                         }
  1201.                                         break;
  1202.                                 case 7:
  1203.  
  1204.                                         interfaces.getComponent(288, 209).doClick(true);
  1205.                                         for (int r = 0; r < 9; r++) {
  1206.                                                 for (int c = 0; c < 9; c++) {
  1207.                                                         int i = (11 + c * 2 + r * 18);
  1208.                                                         if (sudokuGrid[r][c] == 8
  1209.                                                                         && !(interfaces.get(288).getComponent(i)
  1210.                                                                                         .getModelID() == chaosID)) {
  1211.                                                                 interfaces.getComponent(288, i).doClick(true);
  1212.  
  1213.                                                         }
  1214.                                                 }
  1215.                                         }
  1216.                                         break;
  1217.                                 case 8:
  1218.  
  1219.                                         interfaces.getComponent(288, 210).doClick(true);
  1220.                                         for (int r = 0; r < 9; r++) {
  1221.                                                 for (int c = 0; c < 9; c++) {
  1222.                                                         int i = (11 + c * 2 + r * 18);
  1223.                                                         if (sudokuGrid[r][c] == 9
  1224.                                                                         && !(interfaces.get(288).getComponent(i)
  1225.                                                                                         .getModelID() == lawID)) {
  1226.                                                                 interfaces.getComponent(288, i).doClick(true);
  1227.  
  1228.                                                         }
  1229.                                                 }
  1230.                                         }
  1231.                                         break;
  1232.                                 }
  1233.                         }
  1234.                 }
  1235.                 if (rr == 4) {
  1236.  
  1237.                         state = "Solving Sudoku Normally";
  1238.                         mouse.setSpeed(1);
  1239.                         for (int k = 0; k < 9; k++) {
  1240.                                 switch (k) {
  1241.                                 case 0:
  1242.  
  1243.                                         interfaces.getComponent(288, 205).doClick(true);
  1244.                                         for (int r = 0; r < 9; r++) {
  1245.                                                 for (int c = 0; c < 9; c++) {
  1246.                                                         int i = (11 + c * 2 + r * 18);
  1247.                                                         if ((sudokuGrid[r][c] == 1)
  1248.                                                                         && !(interfaces.get(288).getComponent(i)
  1249.                                                                                         .getModelID() == mindID)) {
  1250.                                                                 interfaces.getComponent(288, i).doClick(true);
  1251.                                                                 sleep(00 + random(00, 00));
  1252.  
  1253.                                                         }
  1254.                                                 }
  1255.                                         }
  1256.                                         break;
  1257.                                 case 1:
  1258.  
  1259.                                         interfaces.getComponent(288, 206).doClick(true);
  1260.                                         for (int r = 0; r < 9; r++) {
  1261.                                                 for (int c = 0; c < 9; c++) {
  1262.                                                         int i = (11 + c * 2 + r * 18);
  1263.                                                         if (sudokuGrid[r][c] == 2
  1264.                                                                         && !(interfaces.get(288).getComponent(i)
  1265.                                                                                         .getModelID() == fireID)) {
  1266.                                                                 interfaces.getComponent(288, i).doClick(true);
  1267.  
  1268.                                                         }
  1269.                                                 }
  1270.                                         }
  1271.                                         break;
  1272.                                 case 2:
  1273.  
  1274.                                         interfaces.getComponent(288, 204).doClick(true);
  1275.                                         for (int r = 0; r < 9; r++) {
  1276.                                                 for (int c = 0; c < 9; c++) {
  1277.                                                         int i = (11 + c * 2 + r * 18);
  1278.                                                         if (sudokuGrid[r][c] == 3
  1279.                                                                         && !(interfaces.get(288).getComponent(i)
  1280.                                                                                         .getModelID() == airID)) {
  1281.                                                                 interfaces.getComponent(288, i).doClick(true);
  1282.  
  1283.                                                         }
  1284.                                                 }
  1285.                                         }
  1286.                                         break;
  1287.                                 case 3:
  1288.  
  1289.                                         interfaces.getComponent(288, 203).doClick(true);
  1290.                                         for (int r = 0; r < 9; r++) {
  1291.                                                 for (int c = 0; c < 9; c++) {
  1292.                                                         int i = (11 + c * 2 + r * 18);
  1293.                                                         if (sudokuGrid[r][c] == 4
  1294.                                                                         && !(interfaces.get(288).getComponent(i)
  1295.                                                                                         .getModelID() == waterID)) {
  1296.                                                                 interfaces.getComponent(288, i).doClick(true);
  1297.                                                         }
  1298.                                                 }
  1299.                                         }
  1300.                                         break;
  1301.                                 case 4:
  1302.  
  1303.                                         interfaces.getComponent(288, 202).doClick(true);
  1304.                                         for (int r = 0; r < 9; r++) {
  1305.                                                 for (int c = 0; c < 9; c++) {
  1306.                                                         int i = (11 + c * 2 + r * 18);
  1307.                                                         if (sudokuGrid[r][c] == 5
  1308.                                                                         && !(interfaces.get(288).getComponent(i)
  1309.                                                                                         .getModelID() == earthID)) {
  1310.                                                                 interfaces.getComponent(288, i).doClick(true);
  1311.  
  1312.                                                         }
  1313.                                                 }
  1314.                                         }
  1315.                                         break;
  1316.                                 case 5:
  1317.  
  1318.                                         interfaces.getComponent(288, 207).doClick(true);
  1319.                                         for (int r = 0; r < 9; r++) {
  1320.                                                 for (int c = 0; c < 9; c++) {
  1321.                                                         int i = (11 + c * 2 + r * 18);
  1322.                                                         if (sudokuGrid[r][c] == 6
  1323.                                                                         && !(interfaces.get(288).getComponent(i)
  1324.                                                                                         .getModelID() == bodyID)) {
  1325.                                                                 interfaces.getComponent(288, i).doClick(true);
  1326.  
  1327.                                                         }
  1328.                                                 }
  1329.                                         }
  1330.                                         break;
  1331.                                 case 6:
  1332.  
  1333.                                         interfaces.getComponent(288, 208).doClick(true);
  1334.                                         for (int r = 0; r < 9; r++) {
  1335.                                                 for (int c = 0; c < 9; c++) {