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

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 38.55 KB  |  hits: 26  |  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.BasicStroke;
  2. import java.awt.Color;
  3. import java.awt.Font;
  4. import java.awt.Graphics;
  5. import java.awt.Graphics2D;
  6. import java.awt.Image;
  7. import java.awt.Point;
  8. import java.awt.Rectangle;
  9. import java.awt.RenderingHints;
  10. import java.awt.event.MouseEvent;
  11. import java.awt.event.MouseListener;
  12. import java.io.IOException;
  13. import java.lang.reflect.InvocationTargetException;
  14. import java.net.URL;
  15. import java.util.ArrayList;
  16. import java.util.LinkedList;
  17.  
  18. import javax.imageio.ImageIO;
  19. import javax.swing.SwingUtilities;
  20.  
  21. import java.awt.*;
  22. import java.awt.event.*;
  23. import javax.swing.*;
  24. import javax.swing.event.ChangeEvent;
  25. import javax.swing.event.ChangeListener;
  26.  
  27. import com.rarebot.event.events.MessageEvent;
  28. import com.rarebot.event.listeners.MessageListener;
  29. import com.rarebot.event.listeners.PaintListener;
  30. import com.rarebot.script.Script;
  31. import com.rarebot.script.ScriptManifest;
  32. import com.rarebot.script.methods.Equipment;
  33. import com.rarebot.script.methods.Magic;
  34. import com.rarebot.script.methods.Skills;
  35. import com.rarebot.script.methods.Game.Tab;
  36. import com.rarebot.script.util.Filter;
  37. import com.rarebot.script.wrappers.RSArea;
  38. import com.rarebot.script.wrappers.RSComponent;
  39. import com.rarebot.script.wrappers.RSItem;
  40. import com.rarebot.script.wrappers.RSModel;
  41. import com.rarebot.script.wrappers.RSNPC;
  42. import com.rarebot.script.wrappers.RSObject;
  43. import com.rarebot.script.wrappers.RSPath;
  44. import com.rarebot.script.wrappers.RSTile;
  45. import com.rarebot.script.wrappers.RSTilePath;
  46.  
  47.         @ScriptManifest(authors = { "Magic" }, keywords = "RuneSpan Magician", name = "RuneSpan Magician", version = 1.2, description = "Makes Runes")
  48.         public class RuneSpanMagician extends Script implements PaintListener, MouseListener, MessageListener {
  49.                
  50.     public RuneSpanMagicianGUI GUI;
  51.    
  52.     ArrayList<Integer> NodeList = new ArrayList<Integer>();
  53.  
  54.         private String status = "";    
  55.        
  56.         public int Points = 0;
  57.         public int InitPoints = 0;
  58.         public int GainedPoints = 0;
  59.         public int PointsHour = 0;
  60.        
  61.         public boolean DoEssling = false;
  62.         public boolean DoHound = false;
  63.         public boolean DoEssWraith = false;
  64.         public boolean DoNode = false;
  65.        
  66.     public static class RuneSpan {     
  67.         public static int Essling = 0;
  68.         public static int Hound = 0;
  69.         public static int EssWraith = 0;
  70.         public static int Node = 0;
  71.        
  72.         public static int[]NodeMulti = {};
  73.     }
  74.    
  75.     private RSNPC InfoEssling() {
  76.                 return  npcs.getNearest(new Filter<RSNPC>(){
  77.                                 public boolean accept(RSNPC npc) {  
  78.                            return npc != null && npc.getID() == RuneSpan.Essling && npc.getAnimation() != 16541 && calc.distanceTo(npc.getLocation()) <= 10;
  79.                 }
  80.                 });
  81.     }
  82.     private RSNPC InfoHound() {
  83.                 return  npcs.getNearest(new Filter<RSNPC>(){
  84.                                 public boolean accept(RSNPC npc) {  
  85.                            return npc != null && npc.getID() == RuneSpan.Hound && npc.getAnimation() != 16661 && calc.distanceTo(npc.getLocation()) <= 10;
  86.                 }
  87.                 });
  88.     }
  89.     private RSNPC InfoEssWraith() {
  90.                 return  npcs.getNearest(new Filter<RSNPC>(){
  91.                                 public boolean accept(RSNPC npc) {  
  92.                            return npc != null && npc.getID() == RuneSpan.EssWraith && npc.getAnimation() != 16641 && calc.distanceTo(npc.getLocation()) <= 10;
  93.                 }
  94.                 });
  95.     }
  96.     private RSObject InfoNode() {
  97.                 return  objects.getNearest(new Filter<RSObject>(){
  98.                                 public boolean accept(RSObject o) {  
  99.                                            for (Integer i : RuneSpan.NodeMulti)
  100.                            if(o != null && o.getID() == i && calc.distanceTo(o.getLocation()) <= 10)
  101.                                            return true;
  102.                                            return false;
  103.                 }
  104.                 });
  105.     }
  106.    
  107.     private RSNPC InfoEsslingCurrent() {
  108.                 return  npcs.getNearest(new Filter<RSNPC>(){
  109.                                 public boolean accept(RSNPC npc) {  
  110.                            return npc != null && npc.getID() == RuneSpan.Essling && players.getMyPlayer().getAnimation() == 16596 && calc.distanceTo(npc.getLocation()) <= 10;
  111.                  }
  112.                 });
  113.      }
  114.     private RSNPC InfoHoundCurrent() {
  115.                 return  npcs.getNearest(new Filter<RSNPC>(){
  116.                                 public boolean accept(RSNPC npc) {  
  117.                            return npc != null && npc.getID() == RuneSpan.Hound && players.getMyPlayer().getAnimation() == 16596 && calc.distanceTo(npc.getLocation()) <= 10;
  118.                  }
  119.                 });
  120.      }
  121.     private RSNPC InfoEssWraithCurrent() {
  122.                 return  npcs.getNearest(new Filter<RSNPC>(){
  123.                                 public boolean accept(RSNPC npc) {  
  124.                            return npc != null && npc.getID() == RuneSpan.EssWraith && players.getMyPlayer().getAnimation() == 16596 && calc.distanceTo(npc.getLocation()) <= 10;
  125.                  }
  126.                 });
  127.      }
  128.          
  129.     private Image getImage(String url) {
  130.         try {
  131.             return ImageIO.read(new URL(url));
  132.         } catch(IOException e) {
  133.             return null;
  134.         }
  135.     }
  136.    
  137.     Rectangle close = new Rectangle(492, 343, 18, 20);
  138.         Point p;
  139.         boolean hide = false;
  140.        
  141.     public int[] SKILLS_ARRAY = new int[25];
  142.    
  143.     private final LinkedList<MousePathPoint> mousePath = new LinkedList<MousePathPoint>();
  144.        
  145.     public long startTime = System.currentTimeMillis();
  146.    
  147.     private final Color color1 = new Color(51, 51, 51, 197);
  148.     private final Color color2 = new Color(0, 0, 0);
  149.     private final Color color3 = new Color(51, 51, 51);    
  150.     private final Color color4 = new Color(51, 204, 0);
  151.     private final Color color5 = new Color(255, 0, 0, 197);
  152.     private final Color color6 = new Color(51, 51, 51, 197);
  153.     private final Color color7 = new Color(255, 255, 255);
  154.     private final Color color8 = new Color(0, 0, 0);
  155.    
  156.     private final BasicStroke stroke1 = new BasicStroke(2);
  157.     private final BasicStroke stroke2 = new BasicStroke(1);
  158.  
  159.     private final Font font1 = new Font("Lithos Pro", 0, 15);
  160.     private final Font font2 = new Font("Lithos Pro", 0, 11);
  161.     private final Font font10 = new Font("Heiti SC", 1, 14);
  162.    
  163.     Image img1;
  164.     Image img2;
  165.    
  166.     public boolean onStart() { 
  167.        
  168.                 log("Welcome to RuneSpan Magician");
  169.                
  170.             log("... Loading: Paint ...");
  171.         img1 = getImage("http://i46.tinypic.com/2aahtet.png");  
  172.         img2 = getImage("http://i41.tinypic.com/o85r4h.png");
  173.         log("... Paint: Loaded ...");
  174.                
  175.                 try {
  176.                         SwingUtilities.invokeAndWait(new Runnable()
  177.                         {
  178.                                 public void run()
  179.                                 {      
  180.                                         GUI = new RuneSpanMagicianGUI();
  181.                                         GUI.setVisible(true);
  182.                                 }
  183.                         });
  184.                        
  185.                 }
  186.                
  187.                 catch (InterruptedException e){}
  188.                 catch (InvocationTargetException e){}
  189.                
  190.                 while(GUI.isVisible())
  191.                 {
  192.                         status = "Settings";
  193.                         sleep(50);
  194.                 }
  195.  
  196.                 if (DoNode == true) {
  197.                
  198.                 if (RuneSpan.Node == 70455) {
  199.                         NodeList.add(70455);
  200.                 }
  201.                 if (RuneSpan.Node == 70456) {
  202.                         NodeList.add(70455);
  203.                         NodeList.add(70456);
  204.                 }
  205.                 if (RuneSpan.Node == 70457) {
  206.                         NodeList.add(70455);
  207.                         NodeList.add(70456);
  208.                         NodeList.add(70457);
  209.                 }
  210.                 if (RuneSpan.Node == 70458) {
  211.                         NodeList.add(70455);
  212.                         NodeList.add(70456);
  213.                         NodeList.add(70457);
  214.                         NodeList.add(70458);
  215.                 }
  216.                 if (RuneSpan.Node == 70459) {
  217.                         NodeList.add(70455);
  218.                         NodeList.add(70456);
  219.                         NodeList.add(70457);
  220.                         NodeList.add(70458);
  221.                         NodeList.add(70459);
  222.                 }
  223.                 if (RuneSpan.Node == 70460) {
  224.                         NodeList.add(70455);
  225.                         NodeList.add(70456);
  226.                         NodeList.add(70457);
  227.                         NodeList.add(70458);
  228.                         NodeList.add(70459);
  229.                         NodeList.add(70460);
  230.                 }
  231.                 if (RuneSpan.Node == 70461) {
  232.                         NodeList.add(70456);
  233.                         NodeList.add(70457);
  234.                         NodeList.add(70458);
  235.                         NodeList.add(70459);
  236.                         NodeList.add(70460);
  237.                         NodeList.add(70461);
  238.                 }
  239.                 if (RuneSpan.Node == 70462) {
  240.                         NodeList.add(70457);
  241.                         NodeList.add(70458);
  242.                         NodeList.add(70459);
  243.                         NodeList.add(70460);
  244.                         NodeList.add(70461);
  245.                         NodeList.add(70462);
  246.                 }
  247.                 if (RuneSpan.Node == 70463) {
  248.                         NodeList.add(70458);
  249.                         NodeList.add(70459);
  250.                         NodeList.add(70460);
  251.                         NodeList.add(70461);
  252.                         NodeList.add(70462);
  253.                         NodeList.add(70463);
  254.                 }
  255.                 if (RuneSpan.Node == 70464) {
  256.                         NodeList.add(70459);
  257.                         NodeList.add(70460);
  258.                         NodeList.add(70461);
  259.                         NodeList.add(70462);
  260.                         NodeList.add(70463);
  261.                         NodeList.add(70464);
  262.                 }
  263.                 if (RuneSpan.Node == 70465) {
  264.                         NodeList.add(70460);
  265.                         NodeList.add(70461);
  266.                         NodeList.add(70462);
  267.                         NodeList.add(70463);
  268.                         NodeList.add(70464);
  269.                         NodeList.add(70465);
  270.                 }
  271.                 if (RuneSpan.Node == 70466) {
  272.                         NodeList.add(70461);
  273.                     NodeList.add(70462);
  274.                         NodeList.add(70463);
  275.                         NodeList.add(70464);
  276.                         NodeList.add(70465);
  277.                         NodeList.add(70466);
  278.                 }
  279.                 if (RuneSpan.Node == 70467) {
  280.                     NodeList.add(70462);
  281.                     NodeList.add(70463);
  282.                         NodeList.add(70464);
  283.                         NodeList.add(70465);
  284.                         NodeList.add(70466);
  285.                         NodeList.add(70467);
  286.                 }      
  287.             if (RuneSpan.Node == 70468) {
  288.                 NodeList.add(70463);
  289.                         NodeList.add(70464);
  290.                         NodeList.add(70465);
  291.                         NodeList.add(70466);
  292.                         NodeList.add(70467);
  293.                     NodeList.add(70468);
  294.             }                  
  295.                 if (RuneSpan.Node == 70469) {
  296.                         NodeList.add(70464);
  297.                     NodeList.add(70465);
  298.                     NodeList.add(70466);
  299.                     NodeList.add(70467);
  300.                         NodeList.add(70468);
  301.                     NodeList.add(70469);
  302.                 }              
  303.             if (RuneSpan.Node == 70470) {
  304.                         NodeList.add(70465);
  305.                     NodeList.add(70466);
  306.                         NodeList.add(70467);
  307.                         NodeList.add(70468);
  308.                         NodeList.add(70469);
  309.                         NodeList.add(70470);
  310.             }  
  311.                 if (RuneSpan.Node == 70471) {
  312.                         NodeList.add(70466);
  313.                         NodeList.add(70467);
  314.                         NodeList.add(70468);
  315.                         NodeList.add(70469);
  316.                         NodeList.add(70470);
  317.                         NodeList.add(70471);
  318.                 }
  319.                 }
  320.                
  321.                 int[] ia = new int[NodeList.size()];
  322.                 for (int i=0; i<ia.length; i++) {
  323.                    ia[i] = NodeList.get(i);
  324.                 }
  325.                
  326.                 RuneSpan.NodeMulti = ia;
  327.  
  328.             while (!game.isLoggedIn()) {
  329.                            status = "Waiting...";
  330.                            sleep(50);
  331.             }
  332.            
  333.             try {
  334.             InitPoints = Integer.parseInt(interfaces.getComponent(1274, 2).getText());
  335.             }
  336.             catch (NullPointerException exception) {                   
  337.             }
  338.                
  339.                 getSkillData();
  340.                
  341.                 return true;
  342.         }
  343.     public void onFinish() {
  344.     log("Thanks for using RuneSpan Magician");
  345.     }
  346.    
  347.  
  348.         @Override
  349.         public int loop() {
  350.                
  351.                 final RSNPC Essling = InfoEssling();
  352.             final RSNPC Hound = InfoHound();
  353.             final RSNPC EssWraith = InfoEssWraith();
  354.             final RSObject Node = InfoNode();
  355.            
  356.             try {
  357.                
  358.             try {      
  359.             Points = Integer.parseInt(interfaces.getComponent(1274, 2).getText());     
  360.             }
  361.             catch (NullPointerException exception) {                   
  362.             }
  363.                
  364.             if (players.getMyPlayer().getAnimation() != -1) {
  365.                 for (int i = 0; i < 1000 && players.getMyPlayer().getAnimation() != -1 && game.isLoggedIn() && Node == null; i++) {
  366.                          status = "Waiting..";
  367.                          try {
  368.                          Points = Integer.parseInt(interfaces.getComponent(1274, 2).getText());
  369.                          }
  370.                          catch (NullPointerException exception) {                      
  371.                          }
  372.                              sleep(50);
  373.                 }
  374.                 return 0;
  375.             }
  376.             else if (Node != null && players.getMyPlayer().getAnimation() == -1 && DoNode == true) {
  377.                      if (Node.isOnScreen()) {
  378.                      status = "Interacting With " + Node.getName();
  379.                      if (interact("Siphon " + Node.getName(), Node)) {
  380.                              sleep(900, 1200);
  381.                              return 0;
  382.                  }
  383.              }
  384.              else if (!Node.isOnScreen()) {
  385.                       status = "Walking To " + Node.getName();
  386.                           for (int i = 0; i < 13 && !players.getMyPlayer().isMoving(); i++) {
  387.                                        walking.walkTileMM(Node.getLocation());
  388.                                        sleep(100);
  389.                           }
  390.                               for (int i = 0; i < 13 && !Node.isOnScreen(); i++) {
  391.                                                sleep(50);
  392.                               }
  393.             }
  394.             }
  395.             else if (Essling != null && players.getMyPlayer().getAnimation() == -1 && DoEssling == true) {
  396.                      if (Essling.isOnScreen()) {
  397.                      status = "Interacting With " + Essling.getName();
  398.                      if (interact("Siphon " + Essling.getName(), Essling)) {
  399.                              sleep(900, 1200);
  400.                              return 0;
  401.                  }
  402.              }
  403.              else if (!Essling.isOnScreen()) {
  404.                       status = "Walking To " + Essling.getName();
  405.                           for (int i = 0; i < 13 && !players.getMyPlayer().isMoving(); i++) {
  406.                                walking.walkTileMM(Essling.getLocation());
  407.                                sleep(100);
  408.                           }
  409.                       for (int i = 0; i < 13 && !Essling.isOnScreen(); i++) {
  410.                                        sleep(50);
  411.                       }
  412.             }
  413.             }
  414.             else if (EssWraith != null && players.getMyPlayer().getAnimation() == -1 && DoEssWraith == true) {
  415.                      if (EssWraith.isOnScreen()) {
  416.                      status = "Interacting With " + EssWraith.getName();
  417.                      if (interact("Siphon " + EssWraith.getName(), EssWraith)) {
  418.                              sleep(900, 1200);
  419.                              return 0;
  420.                  }
  421.              }
  422.              else if (!EssWraith.isOnScreen()) {
  423.                       status = "Walking To " + EssWraith.getName();
  424.                           for (int i = 0; i < 13 && !players.getMyPlayer().isMoving(); i++) {
  425.                                walking.walkTileMM(EssWraith.getLocation());
  426.                                sleep(100);
  427.                           }
  428.                       for (int i = 0; i < 13 && !EssWraith.isOnScreen(); i++) {
  429.                                        sleep(50);
  430.                       }
  431.             }
  432.             }
  433.             else if (Hound != null && players.getMyPlayer().getAnimation() == -1 && DoHound == true) {
  434.                      if (Hound.isOnScreen()) {
  435.                          status = "Interacting With " + Hound.getName();
  436.                          if (interact("Siphon " + Hound.getName(), Hound)) {
  437.                                      sleep(900, 1200);
  438.                                      return 0;
  439.                          }
  440.                      }
  441.                      else if (!Hound.isOnScreen()) {
  442.                               status = "Walking To " + Hound.getName();
  443.                                   for (int i = 0; i < 13 && !players.getMyPlayer().isMoving(); i++) {
  444.                                                walking.walkTileMM(Hound.getLocation());
  445.                                                sleep(100);
  446.                                   }
  447.                                           for (int i = 0; i < 13 && !Hound.isOnScreen(); i++) {
  448.                                                        sleep(50);
  449.                                           }
  450.                      }
  451.             }
  452.             }
  453.             catch (NullPointerException exception) {                   
  454.             }
  455.                 return random(500, 800);
  456.         }
  457.        
  458.        
  459.         public boolean interact(String action, RSNPC x) {
  460.         mouse.move(x.getModel().getPoint());
  461.         if (menu.contains(x.getName()) && !menu.contains(action))
  462.             return false;
  463.         else if (menu.isOpen() && !menu.contains(action))
  464.             mouse.moveRandomly(1000);
  465.         return menu.contains(action) && menu.doAction(action);
  466.     }
  467.         public boolean interact(String action, RSObject x) {
  468.                     mouse.move(x.getModel().getPoint());
  469.         if (menu.contains(x.getName()) && !menu.contains(action))
  470.             return false;
  471.         else if (menu.isOpen() && !menu.contains(action))
  472.             mouse.moveRandomly(1000);
  473.         return menu.contains(action) && menu.doAction(action);
  474.     }
  475.        
  476.        
  477.         public void highlightTile(final Graphics g, final RSTile t, final Color outline, final Color fill, final String name) {
  478.                 final Point pn = calc.tileToScreen(new RSTile(t.getX(), t.getY()), 0, 0, 0);
  479.                 final Point px = calc.tileToScreen(new RSTile(t.getX() + 1, t.getY()), 0, 0, 0);
  480.                 final Point py = calc.tileToScreen(new RSTile(t.getX(), t.getY() + 1), 0, 0, 0);
  481.                 final Point pxy = calc.tileToScreen(new RSTile(t.getX() + 1, t.getY() + 1), 0, 0, 0);
  482.                 if (py.x == -1 || pxy.x == -1 || px.x == -1 || pn.x == -1) {
  483.                         return;
  484.                 }
  485.                 g.setColor(outline);
  486.                 g.drawPolygon(new int[]{py.x, pxy.x, px.x, pn.x}, new int[]{py.y, pxy.y, px.y, pn.y}, 4);
  487.                 g.setColor(fill);
  488.                 g.fillPolygon(new int[]{py.x, pxy.x, px.x, pn.x}, new int[]{py.y, pxy.y, px.y, pn.y}, 4);
  489.                 g.setColor(new Color(0, 0, 0));
  490.                 g.drawString(name, px.x - 5, py.y);
  491.                 g.setColor(new Color(255, 255, 255));
  492.                 g.drawString(name, px.x - 5 - 1, py.y - 1);
  493.         }
  494.     public void highlightMap(final Graphics g, final RSTile t, final Color outline, final Color fill) {
  495.                 g.setColor(fill);
  496.                 g.fillRoundRect(calc.tileToMinimap(t).x - 3, calc.tileToMinimap(t).y - 3, 5, 5, 5, 5);
  497.                 g.setColor(outline);
  498.                 g.drawRoundRect(calc.tileToMinimap(t).x - 3, calc.tileToMinimap(t).y - 3, 5, 5, 5, 5);
  499.         }
  500.    
  501.        
  502.     @SuppressWarnings("serial")
  503.     private class MousePathPoint extends Point {
  504.                                    
  505.                                 private long finishTime;
  506.                                 @SuppressWarnings("unused")
  507.                                                 private double lastingTime;
  508.  
  509.                                 public MousePathPoint(int x, int y, int lastingTime) {
  510.                                         super(x, y);
  511.                                         this.lastingTime = lastingTime;
  512.                                         finishTime = System.currentTimeMillis() + lastingTime - 1500;
  513.                                 }
  514.  
  515.                                 public boolean isUp() {
  516.                                         return System.currentTimeMillis() > finishTime;
  517.                                 }
  518.                            }  
  519.     private void drawMouse(Graphics g) {
  520.                             ((Graphics2D) g).setRenderingHints(new RenderingHints(
  521.                                     RenderingHints.KEY_ANTIALIASING,
  522.                                     RenderingHints.VALUE_ANTIALIAS_ON));
  523.                             Point p = mouse.getLocation();
  524.                             Graphics2D spinG = (Graphics2D) g.create();
  525.                             Graphics2D spinGRev = (Graphics2D) g.create();
  526.                             spinG.setColor(MOUSE_BORDER_COLOR);
  527.                             spinGRev.setColor(MOUSE_COLOR);
  528.                             spinG.rotate(System.currentTimeMillis() % 2000d / 2000d * (360d) * 2
  529.                                     * Math.PI / 180.0, p.x, p.y);
  530.                             spinGRev.rotate(System.currentTimeMillis() % 2000d / 2000d * (-360d)
  531.                                     * 2 * Math.PI / 180.0, p.x, p.y);
  532.                             final int outerSize = 20;
  533.                             final int innerSize = 12;
  534.                             spinG.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  535.                                     BasicStroke.JOIN_ROUND));
  536.                             spinGRev.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
  537.                                     BasicStroke.JOIN_ROUND));
  538.                             spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
  539.                                     outerSize, 100, 75);
  540.                             spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
  541.                                     outerSize, -100, 75);
  542.                             spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
  543.                                     innerSize, innerSize, 100, 75);
  544.                             spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
  545.                                     innerSize, innerSize, -100, 75);
  546.                         }
  547.    
  548.    
  549.                 private static final Color MOUSE_COLOR = Color.CYAN,
  550.         MOUSE_BORDER_COLOR = new Color(255, 255, 255);
  551.                
  552.  
  553.     public void getSkillData() {
  554.         for (int counter = 0; counter <= 24; counter++) {
  555.             SKILLS_ARRAY[counter] = skills.getCurrentExp(counter);
  556.         }
  557.     }
  558.    
  559.    
  560.    
  561.     @Override
  562.     public void mouseClicked(MouseEvent e) {
  563.    
  564.         p = e.getPoint();
  565.        
  566.         if(close.contains(p) && !hide){
  567.             hide = true;
  568.         }
  569.         else if(close.contains(p) && hide){
  570.             hide = false;
  571.         }
  572.     }
  573.     @Override
  574.     public void mouseEntered(MouseEvent arg0) {
  575.     }
  576.     @Override
  577.     public void mouseExited(MouseEvent arg0) {
  578.     }
  579.     @Override
  580.     public void mousePressed(MouseEvent e) {   
  581.     }
  582.     @Override
  583.     public void mouseReleased(MouseEvent arg0) {       
  584.     }
  585.     @Override
  586.     public void messageReceived(MessageEvent m) {
  587.     }
  588.    
  589.    
  590.    
  591.     public enum EsslingToUse {
  592.  
  593.         Airessling("Air essling", 15403),
  594.         Mindessling("Mind essling", 15404),
  595.         Wateressling("Water essling", 15405),
  596.         Earthessling("Earth essling", 15406),
  597.         Fireessling("Fire essling", 15407);
  598.  
  599.             public String name;
  600.             public int itemId;
  601.  
  602.  
  603.             EsslingToUse(String name, int itemId) {
  604.                 this.name = name;
  605.                 this.itemId = itemId;
  606.             }
  607.  
  608.  
  609.             public String getName() {
  610.                 return name;
  611.             }
  612.  
  613.             public int getId() {
  614.                 return itemId;
  615.             }
  616.         }
  617.     public enum HoundToUse {
  618.  
  619.             Bodyesshound("Body esshound", 15408),
  620.             Cosmicesshound("Cosmic esshound", 15409),
  621.             Chaosesshound("Chaos esshound", 15410),
  622.             Astralesshound("Astral esshound", 15411),
  623.             Natureesshound("Nature esshound", 15412),
  624.             Lawesshound("Law esshound", 15413);
  625.  
  626.             public String name;
  627.             public int itemId;
  628.  
  629.  
  630.             HoundToUse(String name, int itemId) {
  631.                 this.name = name;
  632.                 this.itemId = itemId;
  633.             }
  634.  
  635.  
  636.             public String getName() {
  637.                 return name;
  638.             }
  639.  
  640.             public int getId() {
  641.                 return itemId;
  642.             }
  643.         }
  644.     public enum EssWraithToUse {
  645.  
  646.         Deathesswraith("Death esswraith", 15414),
  647.         Soulesswraith("Soul esswraith", 15416),
  648.         Bloodesswraith("Blood esswraith", 15415);
  649.  
  650.             public String name;
  651.             public int itemId;
  652.  
  653.  
  654.             EssWraithToUse(String name, int itemId) {
  655.                 this.name = name;
  656.                 this.itemId = itemId;
  657.             }
  658.  
  659.  
  660.             public String getName() {
  661.                 return name;
  662.             }
  663.  
  664.             public int getId() {
  665.                 return itemId;
  666.             }
  667.         }
  668.     public enum NodeToUse {
  669.  
  670.         Cyclone("Cyclone", 70455),
  671.         Mindstorm("Mind storm", 70456),
  672.         Waterpool("Water pool", 70457),
  673.         Rockfragment("Rock fragment", 70458),
  674.         Vine("Vine", 70459),
  675.         Fireball("Fireball", 70460),
  676.         Fleshygrowth("Fleshy growth", 70461),
  677.         Firestorm("Fire storm", 70462),
  678.         Chaoticcloud("Chaotic cloud", 70463),
  679.         Nebula("Nebula", 70464),
  680.         Shifter("Shifter", 70465),
  681.         Jumper("Jumper", 70466),
  682.         Skulls("Skulls", 70467),
  683.         Bloodpool("Blood pool", 70468),
  684.         Bloodyskulls("Bloody skulls", 70469),
  685.         Livingsoul("Living soul", 70470),
  686.         Undeadsoul("Undead soul", 70471);
  687.  
  688.             public String name;
  689.             public int itemId;
  690.  
  691.  
  692.             NodeToUse(String name, int itemId) {
  693.                 this.name = name;
  694.                 this.itemId = itemId;
  695.             }
  696.  
  697.  
  698.             public String getName() {
  699.                 return name;
  700.             }
  701.  
  702.             public int getId() {
  703.                 return itemId;
  704.             }
  705.         }
  706.    
  707.    
  708.     @SuppressWarnings("serial")
  709.         public class RuneSpanMagicianGUI extends JFrame {
  710.         public RuneSpanMagicianGUI() {
  711.                 initComponents();
  712.         }
  713.        
  714.         public void EsslingCheck(){
  715.             if (checkBox1.isSelected()) {
  716.                 label1.setEnabled(true);
  717.                 comboBox1.setEnabled(true);
  718.             } else {
  719.                 label1.setEnabled(false);
  720.                 comboBox1.setEnabled(false);
  721.             }
  722.         }
  723.         public void HoundCheck(){
  724.             if (checkBox2.isSelected()) {
  725.                 label2.setEnabled(true);
  726.                 comboBox2.setEnabled(true);
  727.             } else {
  728.                 label2.setEnabled(false);
  729.                 comboBox2.setEnabled(false);
  730.             }
  731.         }
  732.         public void EsswraithCheck(){
  733.             if (checkBox3.isSelected()) {
  734.                 label3.setEnabled(true);
  735.                 comboBox3.setEnabled(true);
  736.             } else {
  737.                 label3.setEnabled(false);
  738.                 comboBox3.setEnabled(false);
  739.             }
  740.         }
  741.         public void NodeCheck(){
  742.             if (checkBox4.isSelected()) {
  743.                 label4.setEnabled(true);
  744.                 comboBox4.setEnabled(true);
  745.             } else {
  746.                 label4.setEnabled(false);
  747.                 comboBox4.setEnabled(false);
  748.             }
  749.         }
  750.  
  751.         private void EsslingCheckStateChanged(ChangeEvent e) {
  752.             EsslingCheck();
  753.         }
  754.         private void HoundCheckStateChanged(ChangeEvent e) {
  755.             HoundCheck();
  756.         }
  757.         private void EsswraithCheckStateChanged(ChangeEvent e) {
  758.             EsswraithCheck();
  759.         }
  760.         private void NodeCheckStateChanged(ChangeEvent e) {
  761.             NodeCheck();
  762.         }
  763.        
  764.         private void button1ActionPerformed(ActionEvent e) {
  765.            
  766.             if (checkBox1.isSelected()) {
  767.                 DoEssling = true;
  768.             }
  769.             if (checkBox2.isSelected()) {
  770.                 DoHound = true;
  771.             }
  772.             if (checkBox3.isSelected()) {
  773.                 DoEssWraith = true;
  774.             }
  775.             if (checkBox4.isSelected()) {
  776.                 DoNode = true;
  777.             }
  778.            
  779.             for (EsslingToUse Objects : EsslingToUse.values()){
  780.                     if(comboBox1.getSelectedItem().toString().equals(Objects.getName())){
  781.                         RuneSpan.Essling = Objects.getId();
  782.                         dispose();
  783.                     }
  784.                 }
  785.             for (HoundToUse Objects : HoundToUse.values()){
  786.                     if(comboBox2.getSelectedItem().toString().equals(Objects.getName())){
  787.                         RuneSpan.Hound = Objects.getId();
  788.                         dispose();
  789.                     }
  790.                 }
  791.             for (EssWraithToUse Objects : EssWraithToUse.values()){
  792.                     if(comboBox3.getSelectedItem().toString().equals(Objects.getName())){
  793.                         RuneSpan.EssWraith = Objects.getId();
  794.                         dispose();
  795.                     }
  796.                 }
  797.             for (NodeToUse Objects : NodeToUse.values()){
  798.                     if(comboBox4.getSelectedItem().toString().equals(Objects.getName())){
  799.                         RuneSpan.Node = Objects.getId();
  800.                         dispose();
  801.                     }
  802.                 }
  803.         }
  804.  
  805.         private void initComponents() {
  806.                 // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
  807.                 // Generated using JFormDesigner Evaluation license - Jarno De Lacy
  808.                 button1 = new JButton();
  809.                 label2 = new JLabel();
  810.                 comboBox2 = new JComboBox();
  811.                 checkBox2 = new JCheckBox();
  812.                 checkBox1 = new JCheckBox();
  813.                 label1 = new JLabel();
  814.                 comboBox1 = new JComboBox();
  815.                 checkBox3 = new JCheckBox();
  816.                 label3 = new JLabel();
  817.                 comboBox3 = new JComboBox();
  818.                 checkBox4 = new JCheckBox();
  819.                 label4 = new JLabel();
  820.                 comboBox4 = new JComboBox();
  821.                 panel1 = new JPanel();
  822.  
  823.                 //======== this ========
  824.                 setTitle("RuneSpan Magician");
  825.                 Container contentPane = getContentPane();
  826.  
  827.                 //---- button1 ----
  828.                 button1.setText("Start");
  829.                 button1.setFont(new Font("Lithos Pro", Font.BOLD, 16));
  830.             button1.addActionListener(new ActionListener() {
  831.                 @Override
  832.                 public void actionPerformed(ActionEvent e) {
  833.                     button1ActionPerformed(e);
  834.                 }
  835.             });
  836.  
  837.                 //---- label2 ----
  838.                 label2.setText("Hound:");
  839.                 label2.setFont(new Font("Lithos Pro", Font.BOLD, 13));
  840.                 label2.setEnabled(false);
  841.  
  842.                 //---- comboBox2 ----
  843.                 comboBox2.setModel(new DefaultComboBoxModel(new String[] {
  844.                         "Body esshound",
  845.                         "Cosmic esshound",
  846.                         "Chaos esshound",
  847.                         "Astral esshound",
  848.                         "Nature esshound",
  849.                         "Law esshound"
  850.                 }));
  851.                 comboBox2.setEnabled(false);
  852.  
  853.                 //---- label1 ----
  854.                 label1.setText("essling");
  855.                 label1.setFont(new Font("Lithos Pro", Font.BOLD, 13));
  856.                 label1.setEnabled(false);
  857.  
  858.                 //---- comboBox1 ----
  859.                 comboBox1.setModel(new DefaultComboBoxModel(new String[] {
  860.                         "Air essling",
  861.                         "Mind essling",
  862.                         "Water essling",
  863.                         "Earth essling",
  864.                         "Fire essling"
  865.                 }));
  866.                 comboBox1.setEnabled(false);
  867.  
  868.                 //---- label3 ----
  869.                 label3.setText("esswraith:");
  870.                 label3.setFont(new Font("Lithos Pro", Font.BOLD, 13));
  871.                 label3.setEnabled(false);
  872.  
  873.                 //---- comboBox3 ----
  874.                 comboBox3.setModel(new DefaultComboBoxModel(new String[] {
  875.                         "Death esswraith",
  876.                         "Blood esswraith",
  877.                         "Soul esswraith"
  878.                 }));
  879.                 comboBox3.setEnabled(false);
  880.  
  881.                 //---- label4 ----
  882.                 label4.setText("Node:");
  883.                 label4.setFont(new Font("Lithos Pro", Font.BOLD, 13));
  884.                 label4.setEnabled(false);
  885.  
  886.                 //---- comboBox4 ----
  887.                 comboBox4.setModel(new DefaultComboBoxModel(new String[] {
  888.                         "Cyclone",
  889.                         "Mind storm",
  890.                         "Water pool",
  891.                         "Rock fragment",
  892.                         "Vine",
  893.                         "Fireball",
  894.                         "Fleshy growth",
  895.                         "Fire storm",
  896.                         "Chaotic cloud",
  897.                         "Nebula",
  898.                         "Shifter",
  899.                         "Jumper",
  900.                         "Skulls",
  901.                         "Blood pool",
  902.                         "Bloody skulls",
  903.                         "Living soul",
  904.                         "Undead soul"
  905.                 }));
  906.                 comboBox4.setEnabled(false);
  907.            
  908.             checkBox1.addChangeListener(new ChangeListener() {
  909.                 @Override
  910.                 public void stateChanged(ChangeEvent e) {
  911.                     EsslingCheckStateChanged(e);
  912.                 }
  913.             });
  914.             checkBox2.addChangeListener(new ChangeListener() {
  915.                 @Override
  916.                 public void stateChanged(ChangeEvent e) {
  917.                     HoundCheckStateChanged(e);
  918.                 }
  919.             });
  920.             checkBox3.addChangeListener(new ChangeListener() {
  921.                 @Override
  922.                 public void stateChanged(ChangeEvent e) {
  923.                     EsswraithCheckStateChanged(e);
  924.                 }
  925.             });
  926.             checkBox4.addChangeListener(new ChangeListener() {
  927.                 @Override
  928.                 public void stateChanged(ChangeEvent e) {
  929.                     NodeCheckStateChanged(e);
  930.                 }
  931.             });
  932.  
  933.                 GroupLayout contentPaneLayout = new GroupLayout(contentPane);
  934.                 contentPane.setLayout(contentPaneLayout);
  935.                 contentPaneLayout.setHorizontalGroup(
  936.                         contentPaneLayout.createParallelGroup()
  937.                                 .addGroup(contentPaneLayout.createSequentialGroup()
  938.                                         .addContainerGap()
  939.                                         .addGroup(contentPaneLayout.createParallelGroup()
  940.                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  941.                                                         .addGroup(contentPaneLayout.createParallelGroup()
  942.                                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  943.                                                                         .addComponent(checkBox2)
  944.                                                                         .addGap(18, 18, 18)
  945.                                                                         .addComponent(label2))
  946.                                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  947.                                                                         .addComponent(checkBox1)
  948.                                                                         .addGap(18, 18, 18)
  949.                                                                         .addComponent(label1))
  950.                                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  951.                                                                         .addComponent(checkBox3)
  952.                                                                         .addGap(18, 18, 18)
  953.                                                                         .addComponent(label3))
  954.                                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  955.                                                                         .addComponent(checkBox4)
  956.                                                                         .addGap(18, 18, 18)
  957.                                                                         .addComponent(label4)))
  958.                                                         .addGap(18, 18, 18)
  959.                                                         .addGroup(contentPaneLayout.createParallelGroup()
  960.                                                                 .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, 157, GroupLayout.PREFERRED_SIZE)
  961.                                                                 .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
  962.                                                                         .addComponent(comboBox2, 0, 157, Short.MAX_VALUE)
  963.                                                                         .addComponent(comboBox3, 0, 157, Short.MAX_VALUE)
  964.                                                                         .addComponent(comboBox1, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
  965.                                                 .addComponent(button1, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE))
  966.                                         .addContainerGap())
  967.                 );
  968.                 contentPaneLayout.setVerticalGroup(
  969.                         contentPaneLayout.createParallelGroup()
  970.                                 .addGroup(contentPaneLayout.createSequentialGroup()
  971.                                         .addGap(14, 14, 14)
  972.                                         .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
  973.                                                 .addComponent(checkBox1)
  974.                                                 .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  975.                                                         .addComponent(label1)
  976.                                                         .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
  977.                                         .addGap(18, 18, 18)
  978.                                         .addGroup(contentPaneLayout.createParallelGroup()
  979.                                                 .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  980.                                                         .addComponent(comboBox2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
  981.                                                         .addComponent(label2))
  982.                                                 .addComponent(checkBox2))
  983.                                         .addGap(18, 18, 18)
  984.                                         .addGroup(contentPaneLayout.createParallelGroup()
  985.                                                 .addComponent(checkBox3)
  986.                                                 .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
  987.                                                         .addComponent(label3)
  988.                                                         .addComponent(comboBox3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
  989.                                         .addGroup(contentPaneLayout.createParallelGroup()
  990.                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  991.                                                         .addGap(14, 14, 14)
  992.                                                         .addComponent(checkBox4))
  993.                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  994.                                                         .addGap(18, 18, 18)
  995.                                                         .addComponent(label4))
  996.                                                 .addGroup(contentPaneLayout.createSequentialGroup()
  997.                                                         .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
  998.                                                         .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
  999.                                         .addGap(18, 18, 18)
  1000.                                         .addComponent(button1)
  1001.                                         .addGap(39, 39, 39))
  1002.                 );
  1003.                 pack();
  1004.                 setLocationRelativeTo(getOwner());
  1005.  
  1006.                 //======== panel1 ========
  1007.                 {
  1008.                         GroupLayout panel1Layout = new GroupLayout(panel1);
  1009.                         panel1.setLayout(panel1Layout);
  1010.                         panel1Layout.setHorizontalGroup(
  1011.                                 panel1Layout.createParallelGroup()
  1012.                                         .addGap(0, 310, Short.MAX_VALUE)
  1013.                         );
  1014.                         panel1Layout.setVerticalGroup(
  1015.                                 panel1Layout.createParallelGroup()
  1016.                                         .addGap(0, 220, Short.MAX_VALUE)
  1017.                         );
  1018.                 }
  1019.                 // JFormDesigner - End of component initialization  //GEN-END:initComponents
  1020.         }
  1021.  
  1022.         // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
  1023.         // Generated using JFormDesigner Evaluation license - Jarno De Lacy
  1024.         private JButton button1;
  1025.         private JLabel label2;
  1026.         private JComboBox comboBox2;
  1027.         private JCheckBox checkBox2;
  1028.         private JCheckBox checkBox1;
  1029.         private JLabel label1;
  1030.         private JComboBox comboBox1;
  1031.         private JCheckBox checkBox3;
  1032.         private JLabel label3;
  1033.         private JComboBox comboBox3;
  1034.         private JCheckBox checkBox4;
  1035.         private JLabel label4;
  1036.         private JComboBox comboBox4;
  1037.         private JPanel panel1;
  1038.         // JFormDesigner - End of variables declaration  //GEN-END:variables
  1039.     }
  1040.    
  1041.    
  1042.         @Override
  1043.         public void onRepaint(Graphics g1) {
  1044.                 Graphics2D g = (Graphics2D)g1;
  1045.                
  1046.                   int counter = 0;
  1047.               int visible = 0;
  1048.              
  1049.               for (int i : SKILLS_ARRAY) {
  1050.               if (skills.getCurrentExp(counter) > i) {
  1051.                                          
  1052.                 int XP_CHANGE = (skills.getCurrentExp(counter) - i);  
  1053.                
  1054.                 int percent = skills.getPercentToNextLevel(counter);
  1055.                         int length = (percent * 505) / 100;
  1056.                        
  1057.                         int r = skills.getRealLevel(counter);
  1058.                        
  1059.                         if (skills.getRealLevel(counter) >= 99) {
  1060.                     r = 99;
  1061.                     length = (100 * 505) / 100;
  1062.                         }
  1063.                                  
  1064.                         g.setColor(color4);
  1065.                         g.fillRect(7, (320 + visible * 18), length, 16);
  1066.                         g.setColor(color5);
  1067.                         g.fillRect(7, (320 + visible * 18), length, 16);
  1068.                        
  1069.                         g.setColor(color6);
  1070.                         g.setStroke(stroke1);
  1071.                         g.drawRect(7, (320 + visible * 18), 505, 16);
  1072.                        
  1073.                         g.setFont(font2);
  1074.                         g.setColor(color7);
  1075.                 g.drawString("[" + Skills.getSkillName(counter).replaceFirst(Skills.getSkillName(counter).substring(0, 1), Skills.getSkillName(counter).substring(0, 1).toUpperCase()) + "] [ " + r + " ] | " + "XP: "  + XP_CHANGE / 1000 + "k | " + "XP/Hour: " + (int) (XP_CHANGE * 3600000D / 1000 / (System.currentTimeMillis() - startTime)) + "k " + "|", 11, (332 + visible * 18));
  1076.                 visible++;
  1077.               }
  1078.                 counter++;
  1079.           }
  1080.                
  1081.                 if (!hide) {
  1082.                        
  1083.             PointsHour = (int) ((3600000.0 / (double) (System.currentTimeMillis() - startTime)) * GainedPoints);
  1084.                
  1085.                 long millis = System.currentTimeMillis() - startTime;
  1086.                 long hours = millis / (1000 * 60 * 60);
  1087.                 millis -= hours * (1000 * 60 * 60);
  1088.                 long minutes = millis / (1000 * 60);
  1089.                 millis -= minutes * (1000 * 60);
  1090.                 long seconds = millis / 1000;
  1091.                
  1092.                 GainedPoints = Points - InitPoints;
  1093.                
  1094.                 g.setColor(color1);
  1095.                 g.fillRect(7, 345, 505, 128);
  1096.                 g.setColor(color2);
  1097.                 g.setStroke(stroke1);
  1098.                 g.drawRect(7, 345, 505, 128);
  1099.                 g.setColor(color3);
  1100.                 g.fillRect(9, 461, 500, 8);
  1101.                 g.setColor(color2);
  1102.                 g.setStroke(stroke2);
  1103.                 g.drawRect(9, 461, 500, 8);
  1104.                 g.setFont(font1);
  1105.                 g.setColor(color7);
  1106.                
  1107.         g.drawImage(img1, 1, 312, null);
  1108.        
  1109.                 g.setColor(color8);
  1110.                 g.setFont(font10);
  1111.                
  1112.                 g.drawString(status, 50, 395);
  1113.                 g.drawString(hours + " : " + minutes + " : " + seconds, 50, 425);
  1114.                 g.drawString("Points: " + Points + " +" + GainedPoints +" (P/h: " + PointsHour + ")", 50, 455);
  1115.        
  1116.                 }
  1117.        
  1118.         if(hide){
  1119.             g.drawImage(img2, 494, 344, null);
  1120.         }
  1121.        
  1122.         while (!mousePath.isEmpty() && mousePath.peek().isUp())
  1123.                
  1124.         mousePath.remove();
  1125.         Point clientCursor = mouse.getLocation();
  1126.         MousePathPoint mpp = new MousePathPoint(clientCursor.x,clientCursor.y, 3000);
  1127.                
  1128.        if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp))
  1129.            
  1130.        mousePath.add(mpp);
  1131.        MousePathPoint lastPoint = null;
  1132.            
  1133.        for (MousePathPoint a : mousePath) {
  1134.             if (lastPoint != null) {   
  1135.                
  1136.                 int Ran = random(1, 70);
  1137.                
  1138.                 if (Ran >= 1 && Ran <= 10) {
  1139.                 g.setColor(Color.RED);
  1140.                 }
  1141.                 else if (Ran > 10 && Ran <= 20) {
  1142.                 g.setColor(Color.ORANGE);      
  1143.                 }
  1144.                 else if (Ran > 20 && Ran <= 30) {
  1145.                     g.setColor(Color.YELLOW);  
  1146.                 }
  1147.                 else if (Ran > 30 && Ran <= 40) {
  1148.                     g.setColor(Color.GREEN);   
  1149.                 }
  1150.                 else if (Ran > 50 && Ran <= 60) {
  1151.                     g.setColor(Color.BLUE);    
  1152.                 }
  1153.                 else if (Ran > 60 && Ran <= 70) {
  1154.                         g.setColor(Color.MAGENTA);     
  1155.                 }
  1156.                 g.drawLine(a.x, a.y, lastPoint.x, lastPoint.y);
  1157.             }
  1158.             lastPoint = a;
  1159.        }
  1160.  
  1161.               g.setColor(color1);
  1162.                   drawMouse(g);
  1163.                  
  1164.               final RSNPC Essling = InfoEsslingCurrent();
  1165.                   final RSNPC Hound = InfoHoundCurrent();
  1166.                   final RSNPC EssWraith = InfoEssWraithCurrent();
  1167.                  
  1168.                   if (Essling != null && DoEssling == true) {
  1169.                       RSTile RevTile = Essling.getLocation();
  1170.                           highlightTile(g, RevTile, Color.green, new Color(0, 0, 0, 125), Essling.getName());
  1171.                       highlightMap(g, RevTile, Color.green, new Color(0, 0, 0, 125));
  1172.                   }
  1173.                   if (Hound != null && DoHound == true) {
  1174.                           RSTile RevTile = Hound.getLocation();
  1175.                           highlightTile(g, RevTile, Color.green, new Color(0, 0, 0, 125), Hound.getName());
  1176.                           highlightMap(g, RevTile, Color.green, new Color(0, 0, 0, 125));
  1177.                   }
  1178.                   if (EssWraith != null && DoEssWraith == true) {
  1179.                           RSTile RevTile = EssWraith.getLocation();
  1180.                           highlightTile(g, RevTile, Color.green, new Color(0, 0, 0, 125), EssWraith.getName());
  1181.                           highlightMap(g, RevTile, Color.green, new Color(0, 0, 0, 125));
  1182.                   }
  1183.         }