Guest User

idungeon pro

a guest
Apr 7th, 2012
939
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 421.95 KB | None | 0 0
  1. import java.awt.Color;
  2. import java.awt.Desktop;
  3. import java.awt.Font;
  4. import java.awt.Graphics;
  5. import java.awt.Graphics2D;
  6. import java.awt.Point;
  7. import java.awt.Polygon;
  8. import java.awt.Rectangle;
  9. import java.awt.RenderingHints;
  10. import java.awt.event.KeyEvent;
  11. import java.awt.event.KeyListener;
  12. import java.awt.event.MouseEvent;
  13. import
  14.  
  15. java.awt.event.MouseListener;
  16. import java.awt.event.MouseMotionListener;
  17. import java.awt.image.BufferedImage;
  18. import java.io.BufferedWriter;
  19. import java.io.File;
  20. import
  21.  
  22. java.io.FileInputStream;
  23. import java.io.FileWriter;
  24. import java.net.URI;
  25. import java.net.URL;
  26. import java.util.ArrayList;
  27. import
  28.  
  29. java.util.ArrayList<Lcom.rarebot.script.wrappers.RSTile;>;
  30. import java.util.Collection;
  31. import java.util.Iterator;
  32. import java.util.Properties;
  33. import
  34.  
  35. java.util.logging.Logger;
  36. import javax.imageio.ImageIO;
  37. import com.rarebot.event.events.MessageEvent;
  38. import com.rarebot.event.listeners.MessageListener;
  39. import
  40.  
  41. com.rarebot.event.listeners.PaintListener;
  42. import com.rarebot.script.Script;
  43. import com.rarebot.script.ScriptManifest;
  44. import com.rarebot.script.methods.Calculations;
  45. import com.rarebot.script.methods.Camera;
  46. import com.rarebot.script.methods.Combat;
  47. import com.rarebot.script.methods.Combat.Prayer;
  48. import
  49.  
  50. com.rarebot.script.methods.Environment;
  51. import com.rarebot.script.methods.Equipment;
  52. import com.rarebot.script.methods.Game;
  53. import
  54.  
  55. com.rarebot.script.methods.Game.CHAT_MODE;
  56. import com.rarebot.script.methods.GroundItems;
  57. import com.rarebot.script.methods.Interfaces;
  58. import
  59.  
  60. com.rarebot.script.methods.Inventory;
  61. import com.rarebot.script.methods.Menu;
  62. import com.rarebot.script.methods.Mouse;
  63. import com.rarebot.script.methods.NPCs;
  64. import
  65.  
  66. com.rarebot.script.methods.Objects;
  67. import com.rarebot.script.methods.Players;
  68. import com.rarebot.script.methods.Skills;
  69. import com.rarebot.script.methods.Walking;
  70. import
  71.  
  72. com.rarebot.script.util.Filter;
  73. import com.rarebot.script.util.Timer;
  74. import com.rarebot.script.wrappers.RSArea;
  75. import com.rarebot.script.wrappers.RSCharacter;
  76. import
  77.  
  78. com.rarebot.script.wrappers.RSComponent;
  79. import com.rarebot.script.wrappers.RSGroundItem;
  80. import com.rarebot.script.wrappers.RSInterface;
  81. import
  82.  
  83. com.rarebot.script.wrappers.RSItem;
  84. import com.rarebot.script.wrappers.RSModel;
  85. import com.rarebot.script.wrappers.RSNPC;
  86. import com.rarebot.script.wrappers.RSObject;
  87. import com.rarebot.script.wrappers.RSObject.Type;
  88. import com.rarebot.script.wrappers.RSObjectDef;
  89. import com.rarebot.script.wrappers.RSPlayer;
  90. import
  91.  
  92. com.rarebot.script.wrappers.RSTile;
  93.  
  94. @ScriptManifest(authors={"kiko"}, keywords={"Dungeoneering"}, name="iDungeon Pro", version=1.07D, description="The most advanced
  95.  
  96. Dungeoneering script in existence")
  97. public class iDungeonPro extends Script
  98.   implements KeyListener, MouseListener, MouseMotionListener, MessageListener, PaintListener
  99. {
  100.  
  101.  
  102.  final Rectangle lf = new Rectangle(273, 397, 12, 12);
  103.   private int re;
  104.   private final int[] pe = { 54013, 54014, 54015, 54016 };
  105.   private BufferedImage KG;
  106.   private
  107.  
  108. ArrayList<RSArea> aE = new ArrayList();
  109.   private int iE;
  110.   private int LE;
  111.   final Rectangle qf = new Rectangle(380, 389, 20, 15);
  112.   private int og;
  113.   private final int[]
  114.  
  115. wE = { 50240, 50241, 50242, 50243, 50244, 50245, 50246, 50247 };
  116.  
  117.   boolean xe = false;
  118.  
  119.   private final int[] Af = { 50323, 50324, 50325, 50326, 50327, 50328, 53968,
  120.  
  121. 53969 };
  122.  
  123.   private ArrayList<RSTile> fG = new ArrayList();
  124.  
  125.   final Rectangle vg = new Rectangle(175, 344, 222, 17);
  126.  
  127.   private ArrayList<RSTile> ig = new ArrayList();
  128.  
  129.  
  130.  
  131. private int bF = 0;
  132.   private boolean nE;
  133.   private final int[] jF = { 16295, 16361, 17490, 17678, 17754, 17794, 17796, 17883 };
  134.  
  135.   private final int Vg = 11007;
  136.   private
  137.  
  138. int Cg;
  139.   private ArrayList<RSTile> AG = new ArrayList();
  140.   private boolean Fg;
  141.   private BufferedImage We;
  142.   final Rectangle cf = new Rectangle(180, 396, 12, 12);
  143.  
  144.   final
  145.  
  146. Rectangle ff = new Rectangle(95, 385, 140, 18);
  147.  
  148.   private final int[] eG = { 49522, 49523, 49524, 49528, 49529, 49530, 49534, 49535, 49536 };
  149.   private int sg;
  150.   private
  151.  
  152. final int[] te = { 52206, 52207, 54282 };
  153.  
  154.   private ArrayList<RSTile> be = new ArrayList();
  155.  
  156.   private int[] VD = { 0, 0, 0, 0, 0, 0 };
  157.  
  158.   final Color Qf = new Color(0,
  159.  
  160. 255, 0, 200);
  161.  
  162.   private final int[] WD = { 50342, 50343, 50344, 53948, 50346, 50347, 50348, 53949 };
  163.  
  164.   boolean kf = false;
  165.  
  166.   private final int[] kg = { 49656, 49657,
  167.  
  168. 49658, 54308 };
  169.   private boolean XF;
  170.   private final String[] ME = { "Salve", "Wildercress", "Blightleaf", "Roseblood", "Bryll", "Duskweed", "Soulbell", "Ectograss",
  171.  
  172. "Runic", "Spiritbloom", "Celestial" };
  173.   private boolean Jg;
  174.   private int Gg;
  175.   private boolean JE;
  176.   private String Xf = "00:00:00";
  177.  
  178.   private Point YF = new Point(0, 0);
  179.  
  180.  
  181.  
  182.  String ce = "";
  183.  
  184.   final Color IG = new Color(0, 0, 0, 110);
  185.  
  186.   private final int[] Yf = { 50272, 50273, 50274, 50287, 50288, 50289, 50299, 50300, 50301, 50308, 50309,
  187.  
  188. 50310, 50317, 50318, 50319, 53951, 53960, 53963, 53966 };
  189.   private boolean Ke;
  190.   private final String[] ae = { "Novite", "Bathus", "Marmaros", "Kratonite", "Fractite",
  191.  
  192. "Zephyrium", "Argonite", "Katagon", "Gorgonite", "Promethium", "Primal" };
  193.  
  194.   private String SE = "";
  195.   private RSArea Sg;
  196.   final Rectangle qF = new Rectangle(273, 419,
  197.  
  198. 12, 12);
  199.  
  200.   final Rectangle Pf = new Rectangle(401, 344, 112, 19);
  201.  
  202.   private ArrayList<RSTile> vF = new ArrayList();
  203.   private int[] lG;
  204.   private final int[] QE = { 49688,
  205.  
  206. 49690, 54287 };
  207.  
  208.   boolean dg = false;
  209.  
  210.   private int xD = 3;
  211.  
  212.   final Rectangle bE = new Rectangle(180, 418, 12, 12);
  213.   private boolean gE;
  214.   private final int[] TF = {
  215.  
  216. 50224, 50225, 50226, 50227, 50228, 50229, 50230, 50231 };
  217.  
  218.   private final int[] nF = { 18218, 18220, 18222, 18224, 18226, 18228, 18230, 18232 };
  219.   private boolean FF;
  220.  
  221.  
  222. private final int[] XE = { 49462, 50342, 50343, 50344, 53948, 50350, 50351, 50352, 53950 };
  223.   private int yF;
  224.   private boolean le = true;
  225.  
  226.   private final int[] rg = {
  227.  
  228. 50332, 50333, 50334, 53971 };
  229.   private int KE;
  230.   private Point Xe = new Point(0, 0);
  231.  
  232.   final Rectangle[] df = new Rectangle[0];
  233.   private boolean Je;
  234.   private boolean BG
  235.  
  236. = true;
  237.  
  238.   private final int[][] Cf = { a.Ve, a.hc, a.TF, a.Hb, a.wE, a.vd, a.ED, a.TA };
  239.  
  240.   final Color ZE = new Color(0, 180, 0, 80);
  241.  
  242.   Filter<RSNPC> jE = new n(a);
  243.  
  244.  
  245.  
  246. private final int[] aF = { 10966, 10967, 10968, 12114 };
  247.  
  248.   private final int[] LG = { 50604, 51156, 51704, 54675, 56149 };
  249.  
  250.   final Rectangle Ag = new Rectangle(315, 390,
  251.  
  252. 12, 12);
  253.  
  254.   private ArrayList<RSTile> ue = new ArrayList();
  255.  
  256.   final Rectangle Ye = new Rectangle(373, 397, 12, 12);
  257.  
  258.   boolean xF = false;
  259.  
  260.   private ArrayList<RSArea> ke =
  261.  
  262. new ArrayList();
  263.   private BufferedImage iG;
  264.   private final String[] yf = { "Crawling hand", "Cave crawler", "Cave slime", "Pyrefiend", "Night spider", "Jelly",
  265.  
  266. "Spiritual guardian", "Seeker", "Nechryael", "Edimmu", "Soulgazer" };
  267.   private BufferedImage Hg;
  268.   private int ZF;
  269.   final Rectangle[] Sf = { a.gC, a.F, a.cf, a.bE,
  270.  
  271. a.wc, a.WB };
  272.   private int Zf;
  273.   private final int zf = 18175;
  274.  
  275.   private int mf = 144;
  276.   private int me;
  277.   final Rectangle JG = new Rectangle(373, 375, 12, 12);
  278.   private
  279.  
  280. int UE;
  281.   private double tE = 0.0D;
  282.  
  283.   final Rectangle ag = new Rectangle(495, 346, 18, 18);
  284.  
  285.   final Color wg = new Color(0, 255, 0, 130);
  286.   private RSTile vE;
  287.   private
  288.  
  289. final int dF = 11226;
  290.   private BufferedImage UF;
  291.   private ArrayList<RSTile> Ee = new ArrayList();
  292.  
  293.   final Rectangle Pg = new Rectangle(465, 346, 18, 18);
  294.   private
  295.  
  296. BufferedImage OE;
  297.   final Rectangle RE = new Rectangle(315, 413, 12, 12);
  298.  
  299.   final Rectangle lF = new Rectangle(193, 430, 12, 12);
  300.  
  301.   private final int[] Ve = { 50208,
  302.  
  303. 50209, 50210, 50211, 50212, 50213, 50214, 50215 };
  304.  
  305.   private final int[] Lc = { 18314, 18316, 18318, 18320, 18322, 18324, 18326, 18328 };
  306.  
  307.   private String tc = "";
  308.  
  309.  
  310.  
  311. private final int sd = 18163;
  312.  
  313.   private final int NC = 49341;
  314.   private int wb;
  315.   final Rectangle JD = new Rectangle(173, 375, 12, 12);
  316.  
  317.   private final int[] OB = { 10942,
  318.  
  319. 10943, 10944, 10945, 10946, 10947, 10948, 10949, 10950, 10951, 10952, 10953, 12117, 12118, 12119, 12120 };
  320.  
  321.   private final String[] Md = { "2", "6", "9", "12", "15",
  322.  
  323. "18", "21", "22", "23", "24", "26", "27", "28", "31", "32", "36", "39", "40", "42", "44", "45", "46", "48", "51", "52", "53", "54", "56", "58", "59", "60", "64", "65",
  324.  
  325. "66", "67", "68", "69", "70", "71", "72", "76", "77", "78", "79", "82", "83", "84", "85", "86", "88", "89", "91", "92", "97", "98", "99", "100", "103", "104", "112",
  326.  
  327. "114", "115", "116", "117", "119", "121", "124", "129", "130", "131", "132", "137", "138", "142", "143", "144", "145", "148", "151", "156", "157", "158", "159", "160",
  328.  
  329. "164", "166", "172" };
  330.   private boolean gd;
  331.   boolean BB = false;
  332.  
  333.   final Rectangle fD = new Rectangle(12, 437, 69, 16);
  334.  
  335.   boolean QC = false;
  336.   private int RB;
  337.   private
  338.  
  339. final int[] Yc = { 67, 188, 836, 843, 2958, 4653, 4668, 4673, 4917, 4918, 5329, 5491, 5503, 5534, 5542, 5569, 5575, 6564, 6576, 7937, 8078, 11642, 13407, 13062, 13153,
  340.  
  341. 13481, 13669, 13683, 13744, 13785, 14860 };
  342.   private int eB;
  343.   private ArrayList<Integer> ID = new ArrayList();
  344.   private RSTile[] Wd;
  345.   private int xB;
  346.   private String[]
  347.  
  348. Ec = a.ae;
  349.   private boolean Od;
  350.   private final int[] TB = { 11027, 11028, 11029, 11030, 11031, 11032, 11033, 11034, 11035 };
  351.  
  352.   private final int[] Xc = { 49507, 49508,
  353.  
  354. 49509, 49510, 49511, 49512, 54261 };
  355.   private int[] pb;
  356.   private int yB;
  357.   private final String oD = System.getProperty("user.home") + File.separator + "iDungeon";
  358.  
  359.  
  360.  
  361. boolean Fb = true;
  362.  
  363.   private final int YC = 18159;
  364.   private int bb;
  365.   boolean Ed = true;
  366.   private int qc;
  367.   private int TC;
  368.   private ArrayList<RSArea> cD = new ArrayList
  369.  
  370. ();
  371.   private int Ob;
  372.   private final int Nb = 18173;
  373.  
  374.   private final int[] xC = { 10981, 10983, 10985, 10987, 10989, 10991, 10993, 10995, 10997, 10999 };
  375.  
  376.   final
  377.  
  378. Rectangle gC = new Rectangle(373, 371, 12, 12);
  379.   private boolean eC;
  380.   final Rectangle mC = new Rectangle(33, 430, 12, 12);
  381.   private boolean rb;
  382.   private int pC;
  383.  
  384.  
  385. boolean gB = false;
  386.   private int Wb;
  387.   final Rectangle Ub = new Rectangle(121, 420, 20, 15);
  388.  
  389.   private final int[] vd = { 50248, 50249, 50250, 50251, 50252, 50253,
  390.  
  391. 50254, 50255 };
  392.  
  393.   final Rectangle[] nB = { a.wA, a.aB, a.G, a.mC, a.fC, a.lF, a.Ag, a.RE };
  394.   private String eb;
  395.   boolean qD = false;
  396.  
  397.   private final String[][] sB = { {
  398.  
  399. "full helm" }, { "platebody", "chainbody" }, { "kiteshield" }, { "platelegs", "plateskirt" }, { "gauntlets" }, { "boots" } };
  400.  
  401.   private final String[] PC = { "Forgotten
  402.  
  403. warrior", "Forgotten ranger", "Zombie", "Skeleton", "Giant skeleton", "Hill giant" };
  404.  
  405.   private final int[] sb = { 49306, 49335, 49336, 49337, 49338, 49375, 49376,
  406.  
  407. 49377, 49378, 49379, 49380, 49387, 49388, 49389, 49462, 49463, 49464, 49504, 49505, 49506, 49516, 49517, 49518, 49564, 49565, 49566, 49574, 49575, 49576, 49577, 49578,
  408.  
  409. 49579, 49603, 49604, 49605, 49606, 49607, 49608, 49625, 49626, 49627, 49644, 49645, 49646, 49650, 49651, 49652, 49677, 49678, 49679, 53987, 53988, 53989, 53990, 53992,
  410.  
  411. 54001, 54006, 54067, 54070, 54071, 54072, 54073, 54106, 54107, 54108, 54109, 54236, 54274, 54284, 54299, 54300, 54315, 54316, 54317, 54318, 54319, 54320, 54335, 54360,
  412.  
  413. 54361, 54362, 54363, 54404, 54417, 54620, 55478, 55479, 55480, 55481, 56079, 56081, 56526, 56527, 56528, 56529 };
  414.   private Timer hd;
  415.   private final int oB = 10058;
  416.  
  417.  
  418.  
  419. final Font Kb = new Font("Trebuchet MS", 0, 11);
  420.   private boolean kC;
  421.   private int[] UC;
  422.   private int ac;
  423.   private final int[] lC = { 49693 };
  424.  
  425.   final Color sc = new
  426.  
  427. Color(0, 0, 0);
  428.  
  429.   boolean od = false;
  430.  
  431.   final Rectangle tC = new Rectangle(6, 427, 81, 31);
  432.  
  433.   private ArrayList<RSArea> ic = new ArrayList();
  434.  
  435.   boolean Pb = false;
  436.  
  437.   final
  438.  
  439. Rectangle[] Jb = { a.JD, a.Mb, a.JG, a.Dc, a.lf, a.Ye, a.zd, a.qF, a.Cd };
  440.  
  441.   private final String[] Ad = { "Protoleather", "Subleather", "Paraleather", "Archleather",
  442.  
  443. "Dromoleather", "Spinoleather", "Gallileather", "Stegoleather", "Megaleather", "Tyrannoleather", "Sagittarian" };
  444.   private BufferedImage hb;
  445.   private int xb = -1;
  446.  
  447.  
  448.  
  449. final Color nd = new Color(0, 190, 255, 140);
  450.  
  451.   private final String jc = "1.07";
  452.  
  453.   private final int[] sC = { 49381, 49382, 49383, 54333 };
  454.  
  455.   private final int[] yb = {
  456.  
  457. 11036, 11037, 11038, 11039, 11040, 11041, 11042, 11043, 11044, 12094, 12095, 12096 };
  458.  
  459.   int uB = 0;
  460.   private int pd;
  461.   final Rectangle[][] ZC = { a.nB, a.Jb, a.Sf, a.df
  462.  
  463. };
  464.  
  465.   private ArrayList<RSTile> ob = new ArrayList();
  466.   private boolean Sd;
  467.   private boolean Xb;
  468.   private BufferedImage rD;
  469.   private int Zc = 6; private int dC = 6;
  470.  
  471.  
  472. private boolean Hc;
  473.   private final int Gc = 17566;
  474.  
  475.   boolean vC = false;
  476.   private boolean jD;
  477.   private int CD;
  478.   private int Ud = 0;
  479.   private int Rc;
  480.   private long dd =
  481.  
  482. 0L;
  483.  
  484.   private String fd = "00:00:00";
  485.  
  486.   private String uC = "";
  487.  
  488.   private final int Jc = 17789;
  489.   private int eD;
  490.   int DC = 1;
  491.  
  492.   final Rectangle Mb = new Rectangle(273,
  493.  
  494. 375, 12, 12);
  495.  
  496.   final Rectangle xd = new Rectangle(6, 363, 81, 32);
  497.  
  498.   private final int[] LD = { 35507, 35520, 35523, 35525, 35562, 35568, 35569, 35576 };
  499.  
  500.   private
  501.  
  502. ArrayList<RSTile> fc = new ArrayList();
  503.   private boolean iD;
  504.   private final String[][] lB = { { "hood" }, { "robe top" }, { "" }, { "robe bottom" }, { "gloves" }, {
  505.  
  506. "boots" } };
  507.  
  508.   final Rectangle wc = new Rectangle(420, 392, 12, 12);
  509.   private int pc;
  510.   private final int ed = 2;
  511.   private BufferedImage Dd;
  512.   final Color Cb = new Color
  513.  
  514. (255, 0, 0, 130);
  515.  
  516.   Filter<RSNPC> Fd = new x(a);
  517.  
  518.   private int tB = 113;
  519.  
  520.   private final String[] VB = { "Tangle gum", "Seeping elm", "Blood spindle", "Utuku",
  521.  
  522. "Spinebeam", "Bovistrangler", "Thigat", "Corpsethorn", "Entgallow", "Grave creeper", "Sagittarian" };
  523.   private int Qb;
  524.   private final int[] ED = { 50256, 50257, 50258,
  525.  
  526. 50259, 50260, 50261, 50262, 50263 };
  527.  
  528.   final Font SB = new Font("Impact", 1, 13);
  529.  
  530.   private final String[] Cc = { "Forgotten warrior", "Forgotten mage", "Forgotten
  531.  
  532. ranger", "Mysterious shade", "Dungeon spider", "Ghost", "Animated pickaxe", "Giant rat", "Giant bat", "Necromancer", "Thrower troll", "Hydra", "Cave crawler", "Guard
  533.  
  534. dog", "Nechryael", "Hobgoblin", "Lesser demon", "Greater demon", "Mercenary leader", "Hellhound" };
  535.  
  536.   private ArrayList<RSTile> uc = new ArrayList();
  537.  
  538.   private final
  539.  
  540. int[] CC = { 5, 10, 17, 30, 41, 52, 63, 71, 80, 90, 99 };
  541.  
  542.   final Rectangle aB = new Rectangle(113, 390, 12, 12);
  543.  
  544.   final Rectangle Ld = new Rectangle(367, 56, 100, 15);
  545.  
  546.  
  547.  
  548.  final Rectangle Rb = new Rectangle(425, 346, 18, 18);
  549.  
  550.   private final int oC = 17444;
  551.  
  552.   private ArrayList<RSArea> JB = new ArrayList();
  553.  
  554.   private final int[] Zb = {
  555.  
  556. 54110, 54111, 54112, 54113 };
  557.   private RSArea QB;
  558.   private boolean jC;
  559.   private String AB = "";
  560.  
  561.   private final int[] ab = { 50346, 50347, 50348, 53949 };
  562.  
  563.  
  564.  
  565. Filter<RSNPC> xc = new j(a);
  566.  
  567.   private final int[] hc = { 50216, 50217, 50218, 50219, 50220, 50221, 50222, 50223 };
  568.  
  569.   boolean UB = true;
  570.   private BufferedImage NB;
  571.  
  572.  
  573. private ArrayList<Integer> EB = new ArrayList();
  574.  
  575.   private final int[] Fc = { 39912, 39913, 39920, 39921, 39929, 39930, 39931 };
  576.  
  577.   private final int wB = 17489;
  578.   private
  579.  
  580. int vB;
  581.   final Color Oc = new Color(255, 255, 255, 100);
  582.   private int Pd;
  583.   private int Gd = -1;
  584.  
  585.   final Rectangle WB = new Rectangle(180, 440, 12, 12);
  586.  
  587.   private int jB
  588.  
  589. = 0;
  590.  
  591.   final Rectangle kB = new Rectangle(403, 440, 100, 18);
  592.   private int[] vc;
  593.   final Color bd = new Color(255, 255, 0, 180);
  594.  
  595.   private final int[] fB = { 18282,
  596.  
  597. 18284, 18286, 18288, 18290, 18292, 18294, 18296 };
  598.  
  599.   private final int[] Lb = { 50350, 50351, 50352, 53950 };
  600.  
  601.   final Rectangle Cd = new Rectangle(373, 419, 12, 12);
  602.  
  603.  
  604.  
  605. private ArrayList<RSTile> Tc = new ArrayList();
  606.  
  607.   private final int[] MD = { 18250, 18252, 18254, 18256, 18258, 18260, 18262, 18264 };
  608.   private String[] PB;
  609.   private
  610.  
  611. final int[] AC = { 12167, 12165, 12171, 12169, 12173 };
  612.   private int[] cB;
  613.   private int mc;
  614.   private BufferedImage gD;
  615.   private final int[] mD = { 50278, 50279, 50280,
  616.  
  617. 50305, 50306, 50307, 50314, 50315, 50316, 50329, 50330, 50331, 53953, 53962, 53965, 53970 };
  618.  
  619.   Filter<RSObject> cC = new e(a);
  620.  
  621.   private final int hD = 17415;
  622.  
  623.   private
  624.  
  625. int SD = -1;
  626.   private int Td;
  627.   private int Vc;
  628.   private boolean qB;
  629.   boolean qC = false;
  630.   private int Db;
  631.   private BufferedImage Kd;
  632.   Filter<RSNPC> bD = new h(a);
  633.  
  634.  
  635.  
  636. private double Ab = 0.0D;
  637.  
  638.   private ArrayList<RSArea> Nc = new ArrayList();
  639.   private int GC;
  640.   final Color ub = new Color(255, 255, 255);
  641.   private boolean MC;
  642.   private
  643.  
  644. boolean WC;
  645.   private String Nd = "";
  646.  
  647.   private final int[] Gb = { 39991, 40002, 40003 };
  648.  
  649.   private final int[] ad = { 49398, 49400, 49402, 49404, 49422, 49424, 49426,
  650.  
  651. 49428, 49446, 49448, 49450, 49452, 54344, 54346, 54348, 54350 };
  652.  
  653.   boolean Wc = false;
  654.  
  655.   final Rectangle Dc = new Rectangle(173, 397, 12, 12);
  656.  
  657.   private final int zb = 1;
  658.  
  659.  
  660.  
  661.  private final int kb = 18165;
  662.  
  663.   private ArrayList<RSTile> RD = new ArrayList();
  664.  
  665.   final Rectangle kc = new Rectangle(405, 346, 18, 18);
  666.  
  667.   private final String[] kD = {
  668.  
  669. "Hobgoblin", "Icefiend", "Brute", "Necromancer", "Hill giant", "Soulgazer", "Seeker", "Ice troll", "Frost dragon", "Iron dragon", "Green dragon", "Guard dog", "Earth
  670.  
  671. warrior", "Hellhound" };
  672.  
  673.   private final int vb = 18161;
  674.  
  675.   boolean Xd = false;
  676.  
  677.   private final int[] gb = { 49696, 49698, 49700, 53748 };
  678.  
  679.   private ArrayList<RSTile> id =
  680.  
  681. new ArrayList();
  682.   private int JC;
  683.   private final int[] aC = { 17670, 17672, 17674, 17676, 17671, 18830, 18831, 18833, 18834 };
  684.   private boolean GD;
  685.   private int bC =
  686.  
  687. -1;
  688.  
  689.   private String[][] wC = a.sB;
  690.  
  691.   final Rectangle qb = new Rectangle(403, 416, 100, 16);
  692.  
  693.   final Color Jd = new Color(255, 0, 255);
  694.   private BufferedImage BC;
  695.  
  696.  
  697. private final int[] Yd = { 49615, 49616, 49617, 49618 };
  698.  
  699.   private final int yC = 18169;
  700.  
  701.   private final int[] OC = { 49320, 49321, 49322, 49323 };
  702.  
  703.   private final int Pc
  704.  
  705. = 18177;
  706.  
  707.   final Rectangle oc = new Rectangle(7, 458, 100, 16);
  708.  
  709.   private String Qc = "Loading images...";
  710.   private int Rd;
  711.   final Color EC = new Color(255, 0, 0);
  712.  
  713.  
  714.  
  715. private final int ib = 18171;
  716.  
  717.   private final int[] Hd = { 53124, 53125, 53126, 7528 };
  718.  
  719.   private final int rd = 18201; private final int dD = 18829;
  720.  
  721.   private final int
  722.  
  723. [] Mc = { 40010, 40011, 54614 };
  724.  
  725.   private long HB = 999999L;
  726.   private int BD;
  727.   private int cc;
  728.   String Bc = "";
  729.   private Timer lc;
  730.   final Rectangle Vb = new Rectangle
  731.  
  732. (438, 437, 69, 16);
  733.   private Timer HD;
  734.   private final int[] Bb = { 49390, 49392, 49394, 49396, 49414, 49416, 49418, 49420, 49438, 49440, 49442, 49444, 54336, 54338,
  735.  
  736. 54340, 54342 };
  737.   private boolean md;
  738.   private boolean kd = true;
  739.  
  740.   final Color Eb = new Color(160, 0, 160, 160);
  741.  
  742.   final Rectangle iC = new Rectangle(6, 395, 81, 32);
  743.  
  744.  
  745.  
  746. Filter<RSNPC> CB = new f(a);
  747.  
  748.   private final int nC = 16295;
  749.   private boolean zB;
  750.   private final int[] mb = { 54237, 54238, 54239, 54240 };
  751.  
  752.   private final int[] tb = {
  753.  
  754. 49278, 49279, 49276, 49277, 49274, 49275 };
  755.   private boolean nc;
  756.   boolean[] YB = { a.E, a.Ed, a.od, a.M, a.RC, a.dg };
  757.  
  758.   final Rectangle fC = new Rectangle(113, 430,
  759.  
  760. 12, 12);
  761.   private int rC;
  762.   private int DD;
  763.   private int ld = 1;
  764.   private int sD;
  765.   private String cd = "Unknown";
  766.   private int ND;
  767.   final Color MB = new Color(0, 0, 0,
  768.  
  769. 200);
  770.   private int Ic;
  771.   private final int[] fb = { 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, 10964, 10965, 12121, 12122, 12123, 12124 };
  772.  
  773.  
  774. private int Sc;
  775.   boolean[] yc = { a.k, a.Xd, a.IB, a.i, a.BB, a.vC, a.XC, a.Yb };
  776.   private RSArea jb;
  777.   private int pB;
  778.   private boolean ZB = true;
  779.   private int db;
  780.  
  781.  
  782. private final int hC = 3;
  783.   private RSArea nb;
  784.   boolean ec = false;
  785.  
  786.   private int PD = -1;
  787.  
  788.   private final int[] wd = { 54078, 54079, 54080, 54081 };
  789.  
  790.   private final
  791.  
  792. String[] LC = { "Dungeon spider", "Cave crawler" };
  793.  
  794.   private final int[] DB = { 15707, 18817, 18818, 18819, 18820, 18821, 18822, 18823, 18824, 18825, 18826, 18827,
  795.  
  796. 18828 };
  797.  
  798.   final Color Qd = new Color(255, 255, 255, 215);
  799.   private boolean KD;
  800.   private ArrayList<RSObject> zc = new ArrayList();
  801.   private int SC;
  802.   boolean dc = false;
  803.  
  804.  
  805.  private boolean IC;
  806.   private final int[] Id = { 50342, 50343, 50344, 53948 };
  807.  
  808.   private final int[] tD = { 50281, 50282, 50283, 50293, 50294, 50295, 50335, 50336,
  809.  
  810. 50337, 53954, 53956, 53958, 53972 };
  811.  
  812.   private ArrayList<RSTile> gc = new ArrayList();
  813.  
  814.   Filter<RSGroundItem> lD = new w(a);
  815.  
  816.   private final int[] KC = { 18266, 18268,
  817.  
  818. 18270, 18272, 18274, 18276, 18278, 18280 };
  819.  
  820.   private int[] Sb = { 0, 0, 0, 0, 0, 0 };
  821.   private int zC;
  822.   final Rectangle zd = new Rectangle(173, 419, 12, 12);
  823.   private
  824.  
  825. BufferedImage Uc;
  826.   private final int[] OD = { 49406, 49408, 49410, 49412, 49430, 49432, 49434, 49436, 49454, 49456, 49458, 49460, 54352, 54354, 54356, 54358 };
  827.  
  828.  
  829. private boolean FD;
  830.   final Font jd = new Font("Trebuchet MS", 0, 15);
  831.  
  832.   final Rectangle lb = new Rectangle(310, 389, 20, 15);
  833.  
  834.   private final int[] bB = { 49665, 49666,
  835.  
  836. 49667, 54311 };
  837.  
  838.   private RSGroundItem yd = null;
  839.  
  840.   private int HC = 1;
  841.  
  842.   private final int iB = 12089;
  843.   private BufferedImage VC;
  844.   private boolean hB;
  845.   private final int
  846.  
  847. rB = 50552;
  848.  
  849.   final Color rc = new Color(180, 0, 0, 100);
  850.   private int Vd;
  851.   private final int[] Hb = { 50232, 50233, 50234, 50235, 50236, 50237, 50238, 50239 };
  852.  
  853.  
  854.  
  855. private final int FC = 19650;
  856.  
  857.   private final int[] mB = { 49315, 49316, 49317, 49318 };
  858.   private int aD;
  859.   Filter<RSGroundItem> Zd = new t(a);
  860.  
  861.   private
  862.  
  863. ArrayList<RSTile> Bd = new ArrayList();
  864.   private int Ac;
  865.   private String ud = "Unknown";
  866.  
  867.   private final int XB = 17363;
  868.  
  869.   private final int[] FB = { 18298, 18300,
  870.  
  871. 18302, 18304, 18306, 18308, 18310, 18312 };
  872.  
  873.   private final int LB = 11246;
  874.   private RSTile nD;
  875.   boolean Yb = false;
  876.   private RSArea Kc;
  877.   boolean XC = true;
  878.  
  879.   boolean dB
  880.  
  881. = false;
  882.  
  883.   private final int[] KB = { 49570, 49571, 49572, 54235 };
  884.   private int pD;
  885.   boolean IB = false;
  886.  
  887.   boolean RC = true;
  888.  
  889.   final Font cb = new Font("Arial", 1, 12);
  890.  
  891.  
  892.  
  893.  boolean qd = false;
  894.  
  895.   final Color QD = new Color(0, 0, 0, 225);
  896.  
  897.   private int[] Tb = { 0, 0, 0, 0, 0, 0 };
  898.  
  899.   private int td = 18;
  900.  
  901.   private ArrayList<RSTile> GB = new
  902.  
  903. ArrayList();
  904.  
  905.   boolean bc = false;
  906.   private BufferedImage Ib;
  907.   private final int[] AD = { 39915, 39924, 39935, 54643 };
  908.   private boolean NA;
  909.   private RSTile QA;
  910.  
  911.  
  912. private Timer sA;
  913.   private int RA;
  914.   private int vA;
  915.   private BufferedImage oA;
  916.   private final String rA = a.oD.concat(File.separator + "iDPSettings.ini");
  917.   private
  918.  
  919. RSArea ZA;
  920.   private final int SA = 11245;
  921.   private boolean UA;
  922.   private ArrayList<RSTile> qA = new ArrayList();
  923.  
  924.   int PA = -1;
  925.   private int uA;
  926.   final Color xA = new
  927.  
  928. Color(255, 215, 0, 140);
  929.  
  930.   final Color YA = new Color(160, 0, 160, 100);
  931.  
  932.   private String[] yA = null;
  933.  
  934.   private String pA = "";
  935.  
  936.   boolean zA = false;
  937.  
  938.   private final int[]
  939.  
  940. TA = { 50264, 50265, 50266, 50267, 50268, 50269, 50270, 50271 };
  941.   private int OA;
  942.   final Rectangle wA = new Rectangle(33, 390, 12, 12);
  943.   private int tA;
  944.   private
  945.  
  946. boolean nA;
  947.   private RSTile WA;
  948.   private final int XA = 18167;
  949.  
  950.   boolean VA = false;
  951.  
  952.   private final String EA = a.oD.concat(File.separator + "iDPLogin.ini");
  953.  
  954.   String bA
  955.  
  956. = "";
  957.   private Timer KA;
  958.   private int HA;
  959.   private ArrayList<RSArea> lA = new ArrayList();
  960.  
  961.   final Color MA = new Color(160, 0, 160, 40);
  962.   private int mA;
  963.   private int
  964.  
  965. IA;
  966.   private RSArea FA;
  967.   private final int[] gA = { 54241, 54242, 54243, 54244, 54245, 54246, 54247, 54248 };
  968.  
  969.   boolean iA = false;
  970.  
  971.   private RSNPC jA = null;
  972.   private
  973.  
  974. Timer hA;
  975.   final Color cA = new Color(255, 255, 255, 150);
  976.  
  977.   private final String[][] LA = { { "coif" }, { "body" }, { "" }, { "chaps" }, { "vambraces" }, { "boots" }
  978.  
  979. };
  980.  
  981.   Filter<RSNPC> CA = new a(a);
  982.   private int AA;
  983.   private int aA = 11;
  984.  
  985.   Filter<RSObject> dA = new z(a);
  986.  
  987.   private final int[] kA = { 18234, 18236, 18238, 18240, 18242,
  988.  
  989. 18244, 18246, 18248 };
  990.  
  991.   private final int GA = 48496;
  992.   private int JA;
  993.   final Color DA = new Color(0, 0, 255, 150);
  994.  
  995.   final Color eA = new Color(160, 0, 160);
  996.  
  997.   private
  998.  
  999. ArrayList<RSTile> fA = new ArrayList();
  1000.  
  1001.   boolean[] BA = { a.kf, a.ec, a.zA, a.VA, a.QC, a.xe, a.gB, a.bc, a.Fb };
  1002.  
  1003.   private final int[] P = { 18202, 18204, 18206,
  1004.  
  1005. 18208, 18210, 18212, 18214, 18216 };
  1006.  
  1007.   private boolean N = true;
  1008.  
  1009.   final Rectangle V = new Rectangle(121, 389, 20, 15);
  1010.   private int[] W;
  1011.   private ArrayList<RSTile> w =
  1012.  
  1013. new ArrayList();
  1014.  
  1015.   final Color R = new Color(0, 255, 0);
  1016.  
  1017.   private final int[][] x = { a.P, a.nF, a.kA, a.MD, a.KC, a.fB, a.FB, a.Lc };
  1018.  
  1019.   final Rectangle p = new
  1020.  
  1021. Rectangle(310, 420, 20, 15);
  1022.  
  1023.   private final RSTile y = new RSTile(0, 0);
  1024.  
  1025.   private final int[] s = { 54419, 54420, 54421, 54422 };
  1026.  
  1027.   boolean[][] O = { a.yc, a.BA, a.YB
  1028.  
  1029. };
  1030.  
  1031.   private int v = -1;
  1032.   private int t;
  1033.   private final String[] Y = { "Ice elemental", "Skeleton", "Giant skeleton", "Zombie", "Icefiend", "Giant bat", "Night spider",
  1034.  
  1035. "Ice spider", "Spiritual guardian", "Ice giant", "Fire giant", "Thrower troll", "Ice troll", "Iron dragon", "Earth warrior", "Ice warrior" };
  1036.   private int n;
  1037.   final
  1038.  
  1039. Rectangle o = new Rectangle(7, 458, 506, 16);
  1040.  
  1041.   final Rectangle S = new Rectangle(403, 395, 100, 16);
  1042.  
  1043.   private final int[] U = { 54190, 54191, 54192, 54193 };
  1044.   private
  1045.  
  1046. int T;
  1047.   private final String[] u = { "Forgotten ranger", "Forgotten mage", "Mysterious shade", "Zombie", "Hydra", "Icefiend", "Animated book", "Skeleton", "Thrower
  1048.  
  1049. troll", "Ice elemental", "Lesser demon", "Greater demon", "Necromancer", "Ghost" };
  1050.   private int q;
  1051.   private final int Z = 11010;
  1052.  
  1053.   final Rectangle Q = new Rectangle
  1054.  
  1055. (445, 346, 18, 18);
  1056.   private RSArea r;
  1057.   private boolean X;
  1058.   private Timer z = new Timer(0L);
  1059.   private int K;
  1060.   private int f;
  1061.   final Rectangle A = new Rectangle(570,
  1062.  
  1063. 235, 133, 12);
  1064.  
  1065.   int h = 1;
  1066.   private int L;
  1067.   final Color b = new Color(255, 255, 0);
  1068.  
  1069.   final Rectangle G = new Rectangle(193, 390, 12, 12);
  1070.  
  1071.   private ArrayList<RSTile> a
  1072.  
  1073. = new ArrayList();
  1074.  
  1075.   final Color C = new Color(0, 0, 0, 180);
  1076.  
  1077.   boolean E = false;
  1078.  
  1079.   final Rectangle D = new Rectangle(380, 420, 20, 15);
  1080.  
  1081.   private ArrayList<RSTile> J =
  1082.  
  1083. new ArrayList();
  1084.  
  1085.   boolean i = false;
  1086.  
  1087.   Filter<RSNPC> B = new p(a);
  1088.   private int e;
  1089.   private ArrayList<RSArea> l = new ArrayList();
  1090.  
  1091.   private final int[] I = { 54502,
  1092.  
  1093. 54544, 54621 };
  1094.  
  1095.   final Rectangle m = new Rectangle(91, 344, 80, 17);
  1096.  
  1097.   private final int[] d = { 12125, 12126, 12127, 12128, 12129, 12130, 12131, 12132, 12133, 12134,
  1098.  
  1099. 12135, 12136, 12137, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156 };
  1100.  
  1101.   boolean M
  1102.  
  1103. = true;
  1104.  
  1105.   final Rectangle H = new Rectangle(7, 344, 80, 17);
  1106.  
  1107.   private int g = 0;
  1108.  
  1109.   final Color j = new Color(0, 255, 0, 100);
  1110.  
  1111.   private final int[] c = { 10058, 11086,
  1112.  
  1113. 11087, 11088, 11089, 11090, 11091, 11092, 11093, 11094, 11095, 11226 };
  1114.  
  1115.   boolean k = true;
  1116.  
  1117.   final Rectangle F = new Rectangle(180, 374, 12, 12);
  1118.  
  1119.   private String A
  1120.  
  1121. (RSObject a)
  1122.   {
  1123.     if (a == null)
  1124.       return "";
  1125.     RSObjectDef localRSObjectDef;
  1126.     return (localRSObjectDef = a.getDef()) != null
  1127.        ? localRSObjectDef.getName()
  1128.  
  1129. : "";
  1130.   }
  1131.  
  1132.   private boolean JC()
  1133.   {
  1134.     if (!a.zB)
  1135.     {
  1136.       return false;
  1137.     }
  1138.  
  1139.     int i1 = a.combat.getHealth(); int i2 = a.random(89, 93);
  1140.  
  1141.     if ((i1 < 1) || (i1 > i2))
  1142.  
  1143.  
  1144.      return false;
  1145.     int i3;
  1146.     int i4 = a.vc[i3]; int i5 = i2 - i3 * 3;
  1147.  
  1148.     if (i1 > i5) {
  1149.       return false;
  1150.     }
  1151.  
  1152.     if (a.inventory.contains(i4)) {
  1153.       return a.l
  1154.  
  1155. (i4, "Eat");
  1156.     }
  1157.  
  1158.     i3++;
  1159.  
  1160.     return false;
  1161.   }
  1162.  
  1163.   private boolean i(int a)
  1164.   {
  1165.     if (a.HC == a) {
  1166.       return true;
  1167.     }
  1168.  
  1169.     int i1 = a.Vc; int i2 = a.eB;
  1170.  
  1171.     int i3 = i1;
  1172.  
  1173.  
  1174.  
  1175.    if (a != a.bb)
  1176.     {
  1177.       a.SA();
  1178.  
  1179.       i3 = i2;
  1180.     }
  1181.  
  1182.     if (!a.l(i3, "Wield")) {
  1183.       return false;
  1184.     }
  1185.  
  1186.     if ((a == 3) && (a.pB > 0) && (!a.l(a.pB, "Wield")))
  1187.     {
  1188.  
  1189.  
  1190.      return false;
  1191.     }
  1192.     a.HC = a;
  1193.  
  1194.     if (a == a.bb)
  1195.     {
  1196.       int i4 = a.v;
  1197.  
  1198.       a.SD = i4;
  1199.     }
  1200.     else if (a == 1)
  1201.     {
  1202.       a.SD = 1;
  1203.     }
  1204.     else if (a == 2)
  1205.    
  1206.  
  1207. {
  1208.       a.SD = 1;
  1209.     }
  1210.     else if (a == 3)
  1211.     {
  1212.       a.SD = 4;
  1213.  
  1214.       a.F();
  1215.     }
  1216.     return true;
  1217.   }
  1218.  
  1219.   private void KC()
  1220.   {
  1221.     a.DA();
  1222.  
  1223.     a.w();
  1224.   }
  1225.  
  1226.   private
  1227.  
  1228. ArrayList<RSTile> l(RSTile a, RSTile a, boolean a, int[] a)
  1229.   {
  1230.     ArrayList localArrayList1 = new ArrayList(); ArrayList localArrayList2 = new ArrayList();
  1231.  
  1232.     if ((a
  1233.  
  1234. == null) || (a == null))
  1235.     {
  1236.       return localArrayList1;
  1237.     }
  1238.     a.be.clear();
  1239.  
  1240.     Object localObject1 = a; Object localObject2 = null;
  1241.  
  1242.     a.f();
  1243.     RSObject[]
  1244.  
  1245. arrayOfRSObject;
  1246.     int i2 = (arrayOfRSObject = a.J(a)).length;
  1247.     int i3;
  1248.     RSTile[] arrayOfRSTile = arrayOfRSObject[i3]
  1249.       .getArea().getTileArray(); int i4 =
  1250.  
  1251. arrayOfRSTile.length; int i5 = 0; RSTile localRSTile = arrayOfRSTile[i5];
  1252.  
  1253.     a.be.remove(localRSTile);
  1254.  
  1255.     i5++;
  1256.  
  1257.     i3++;
  1258.  
  1259.     a.be.remove(a);
  1260.  
  1261.     int i1 = 0; i2 = 0;
  1262.  
  1263.    
  1264.  
  1265. localArrayList1.add(localObject1);
  1266.  
  1267.     while (!((RSTile)localObject1).equals(a))
  1268.     {
  1269.       double d1 = 99.989999999999995D;
  1270.  
  1271.       arrayOfRSTile = a.K((RSTile)
  1272.  
  1273. localObject1); i4 = arrayOfRSTile.length; i5 = 0; localRSTile = arrayOfRSTile[i5];
  1274.  
  1275.       if (((a) && (a.calc.distanceBetween(localRSTile, a) == 1.0D)) ||
  1276.  
  1277. (localRSTile.equals(a)))
  1278.       {
  1279.         localArrayList1.add(localRSTile);
  1280.  
  1281.         return a.a = localArrayList1;
  1282.       }
  1283.       double d2;
  1284.       if ((a.J(localRSTile, new
  1285.  
  1286. int[0])) && (!localArrayList2.contains(localRSTile)))
  1287.       {
  1288.         d2 = a.calc.distanceBetween(localRSTile, a);
  1289.  
  1290.         if (d2 < d1)
  1291.         {
  1292.           localObject2 =
  1293.  
  1294. localRSTile;
  1295.  
  1296.           d1 = d2;
  1297.         }
  1298.  
  1299.       }
  1300.  
  1301.       i5++;
  1302.  
  1303.       i1++;
  1304.  
  1305.       if ((localObject2 == null) || (i2 > 15))
  1306.       {
  1307.         return new ArrayList();
  1308.       }
  1309.       if
  1310.  
  1311. (localObject2.equals(a))
  1312.       {
  1313.         localArrayList1.add(localObject2);
  1314.  
  1315.         localObject1 = localObject2;
  1316.       }
  1317.       else
  1318.       {
  1319.         arrayOfRSTile = a.K
  1320.  
  1321. (localObject2); i4 = arrayOfRSTile.length; i5 = 0; localRSTile = arrayOfRSTile[i5];
  1322.  
  1323.         if ((a.J(localRSTile, new int[0])) && (!localArrayList2.contains
  1324.  
  1325. (localRSTile)))
  1326.         {
  1327.           d2 = a.calc.distanceBetween(localRSTile, a);
  1328.  
  1329.           if (d2 < d1)
  1330.           {
  1331.             localArrayList1.add(localObject2);
  1332.  
  1333.            
  1334.  
  1335.  localObject1 = localObject2;
  1336.  
  1337.             break label439;
  1338.           }
  1339.         }
  1340.         i5++;
  1341.  
  1342.         label439: if (!((RSTile)localObject1).equals(localObject2))
  1343.         {
  1344.    
  1345.  
  1346.        arrayOfRSTile = a.K(localObject2); i4 = arrayOfRSTile.length; i5 = 0; localRSTile = arrayOfRSTile[i5];
  1347.  
  1348.           if (localArrayList2.contains(localRSTile))
  1349.        
  1350.  
  1351.    {
  1352.             localArrayList1.add(localObject2);
  1353.  
  1354.             localObject1 = localObject2;
  1355.           }
  1356.           else
  1357.           {
  1358.             i5++;
  1359.           }
  1360.  
  1361.         }
  1362.  
  1363.      
  1364.  
  1365.    localArrayList2.add(localObject2);
  1366.       }
  1367.       if (i1 > 30)
  1368.       {
  1369.         i2++;
  1370.  
  1371.         localArrayList1.clear();
  1372.  
  1373.         localObject1 = a;
  1374.  
  1375.         localObject2 = null;
  1376.  
  1377.  
  1378.  
  1379.        i1 = 0;
  1380.       }
  1381.     }
  1382.     return (ArrayList<RSTile>)(a.a = localArrayList1);
  1383.   }
  1384.  
  1385.   private boolean Rc()
  1386.   {
  1387.     return (a.Y().isInCombat()) && (!a.d());
  1388.   }
  1389.  
  1390.   private
  1391.  
  1392. void K(boolean a)
  1393.   {
  1394.     a.l(a);
  1395.  
  1396.     if (a)
  1397.       if (a.npcs.getNearest(a.B) == null) {
  1398.         a.x();
  1399.       }
  1400.       else
  1401.       {
  1402.         a = false;
  1403.       }
  1404.     if ((a.Y
  1405.  
  1406. ().isMoving()) || ((a) && (a.Y().getAnimation() != -1)))
  1407.     {
  1408.       if (a.AA()) {
  1409.         return;
  1410.       }
  1411.  
  1412.       a.KA = new Timer(0L);
  1413.  
  1414.       if (a.FA != null);
  1415.       a.sleep
  1416.  
  1417. (150, 200);
  1418.     }
  1419.   }
  1420.  
  1421.   private boolean l(Combat.Prayer a)
  1422.   {
  1423.     int i1 = a.getIndex();
  1424.  
  1425.     if (a.interfaces.getComponent(271, 7).getComponents().length < 29)
  1426.     {
  1427.       i1
  1428.  
  1429. -= 10;
  1430.     }
  1431.     return a.interfaces.getComponent(271, 7).getComponent(i1).getBackgroundColor() != -1;
  1432.   }
  1433.  
  1434.   private boolean Ec()
  1435.   {
  1436.     if (a.Ed)
  1437.     {
  1438.       a.AB =
  1439.  
  1440. "Resetting prestige...";
  1441.  
  1442.       if (a.game.getCurrentTab() == 4)
  1443.       {
  1444.         if (a.inventory.containsOneOf(a.DB))
  1445.         {
  1446.           a.inventory.getItem(a.DB).doAction
  1447.  
  1448. ("Open party interface");
  1449.         }
  1450.  
  1451.       }
  1452.       else if (a.interfaces.get(213).isValid()) {
  1453.         a.interfaces.getComponent(213, 5).doAction("Continue");
  1454.       }
  1455.      
  1456.  
  1457. else if (a.interfaces.get(228).isValid()) {
  1458.         a.interfaces.getComponent(228, 2).doAction("Continue");
  1459.       }
  1460.       else
  1461.       {
  1462.         a.interfaces.getComponent
  1463.  
  1464. (939, 87).doAction("Reset");
  1465.       }
  1466.  
  1467.       a.sleep(1000, 1400);
  1468.  
  1469.       a.ad();
  1470.  
  1471.       a.re += 1;
  1472.  
  1473.       a.JE = false;
  1474.  
  1475.       a.AB = "";
  1476.  
  1477.       return true;
  1478.     }
  1479.     a.log("Last
  1480.  
  1481. floor reached, but prestiging is disabled! Shutting down script.");
  1482.  
  1483.     a.Od = false;
  1484.  
  1485.     return false;
  1486.   }
  1487.  
  1488.   private void F(Graphics a, Rectangle a)
  1489.   {
  1490.     a.fillRect(a.x,
  1491.  
  1492. a.y, a.width, a.height);
  1493.   }
  1494.  
  1495.   private boolean A(RSTile a, String a)
  1496.   {
  1497.     return a.l(a, a.random(0.35D, 0.65D), a.random(0.35D, 0.65D), 0, a);
  1498.   }
  1499.  
  1500.   private void eB()
  1501.   {
  1502.  
  1503.  
  1504.   int i1 = 0;
  1505.  
  1506.     a.Qc = "Beginning a new dungeon!";
  1507.  
  1508.     if ((a.jA()) || (a.CA())) {
  1509.       return;
  1510.     }
  1511.  
  1512.     RSObject localRSObject = a.objects.getNearest(a.LG);
  1513.  
  1514.     if
  1515.  
  1516. (a.M())
  1517.     {
  1518.       if (!a.C()) {
  1519.         return;
  1520.       }
  1521.  
  1522.       a.log("Exit ladder is null!");
  1523.     }
  1524.     else
  1525.     {
  1526.       i1++;
  1527.     }
  1528.  
  1529.     if (i1 > 10)
  1530.     {
  1531.       a.zB = false;
  1532.  
  1533.      
  1534.  
  1535.  return;
  1536.     }
  1537.     a.sleep(300, 500);
  1538.  
  1539.     if (a.E)
  1540.     {
  1541.       if (a.OA < a.td)
  1542.       {
  1543.         a.rb = true;
  1544.  
  1545.         if (a.Zc != a.ld)
  1546.         {
  1547.           a.nc = true;
  1548.         }
  1549.  
  1550.  
  1551.     }
  1552.       else
  1553.       {
  1554.         a.rb = false;
  1555.  
  1556.         if (!a.Ed)
  1557.         {
  1558.           a.Od = false;
  1559.  
  1560.           return;
  1561.         }
  1562.  
  1563.         if (a.Zc != a.dC)
  1564.           a.nc = true;
  1565.  
  1566.  
  1567.     }
  1568.     }
  1569.     if ((a.nc) || (!a.Od)) {
  1570.       return;
  1571.     }
  1572.  
  1573.     a.log("");
  1574.  
  1575.     a.log("Starting a new dungeon");
  1576.  
  1577.     a.T();
  1578.  
  1579.     a.walking.setRun(true);
  1580.  
  1581.     a.l(a.Vc, "Wield");
  1582.  
  1583.  
  1584.  
  1585.   a.N = false;
  1586.  
  1587.     if (a.jA())
  1588.       return;
  1589.     if (a.UA)
  1590.     {
  1591.       a.log("Reattempting to define the startroom area.");
  1592.     }
  1593.     a.sleep(500, 700);
  1594.  
  1595.     a.uA();
  1596.  
  1597.     a.jb =
  1598.  
  1599. a.FA;
  1600.     RSComponent localRSComponent;
  1601.     if (((localRSComponent = a.interfaces.getComponent(519, 1))
  1602.       .isValid()) && (localRSComponent.getText().indexOf(":") >
  1603.  
  1604. 0))
  1605.     {
  1606.       String str1 = localRSComponent.getText();
  1607.       String str2;
  1608.       if (Integer.parseInt(
  1609.         str2 = "" + str1.charAt(str1.indexOf(":") - 1)) < 7)
  1610.       {
  1611.  
  1612.  
  1613.        a.Zc = Integer.parseInt(str2);
  1614.  
  1615.         a.dC = a.Zc;
  1616.       }
  1617.     }
  1618.     else
  1619.     {
  1620.       if (!a.inventory.contains(18829)) { if (a.groundItems.getNearest(new int[] {
  1621.  
  1622. 18829 }) == null);
  1623.       }
  1624.       else
  1625.       {
  1626.         a.Zc = 6;
  1627.  
  1628.         a.dC = 6; break label572;
  1629.       }
  1630.  
  1631.       if (a.J(new String[] { "Summoning obelisk" }) != null)
  1632.       {
  1633.  
  1634.  
  1635.       a.Zc = 6;
  1636.  
  1637.         a.dC = 6;
  1638.       }
  1639.       else if (a.J(new String[] { "Spinning wheel" }) != null)
  1640.       {
  1641.         a.Zc = 4;
  1642.  
  1643.         a.dC = 4;
  1644.       }
  1645.       else if
  1646.  
  1647. (a.J(new String[] { "Runecrafting altar" }) != null)
  1648.       {
  1649.         a.Zc = 3;
  1650.  
  1651.         a.dC = 3;
  1652.       }
  1653.       else if (a.D(new int[] { 11226 }) != null)
  1654.       {
  1655.         a.Zc
  1656.  
  1657. = 1;
  1658.  
  1659.         a.dC = 1;
  1660.       }
  1661.     }
  1662.     label572: if (!a.C())
  1663.     {
  1664.       return;
  1665.     }
  1666.     switch (localRSObject.getID())
  1667.     {
  1668.     case 51156:
  1669.       a.ud = "Frozen";
  1670.  
  1671.       if
  1672.  
  1673. (a.bc)
  1674.       {
  1675.         if (a.Gd != -1)
  1676.         {
  1677.           a.log("Frozen floor, setting combat style to: Crush");
  1678.  
  1679.           a.SD = a.Gd;
  1680.         }
  1681.         else
  1682.         {
  1683.        
  1684.  
  1685.    a.SD = a.v;
  1686.         }
  1687.       }
  1688.       a.Sc = 145;
  1689.  
  1690.       break;
  1691.     case 50604:
  1692.       a.ud = "Abandoned";
  1693.  
  1694.       if (a.bc)
  1695.       {
  1696.         if (a.xb != -1)
  1697.         {
  1698.          
  1699.  
  1700. a.log("Abandoned floor, setting combat style to: Slash");
  1701.  
  1702.           a.SD = a.xb;
  1703.         }
  1704.         else if (a.bC != -1)
  1705.         {
  1706.           a.log("Abandoned floor, setting
  1707.  
  1708. combat style to: Stab");
  1709.  
  1710.           a.SD = a.bC;
  1711.         }
  1712.         else
  1713.         {
  1714.           a.SD = a.v;
  1715.         }
  1716.       }
  1717.       a.Sc = 209;
  1718.  
  1719.       break;
  1720.     case 51704:
  1721.       a.ud
  1722.  
  1723. = "Furnished";
  1724.  
  1725.       if (a.bc) {
  1726.         if (a.xb != -1)
  1727.         {
  1728.           a.log("Furnished floor, setting combat style to: Slash");
  1729.  
  1730.           a.SD = a.xb;
  1731.         }
  1732.        
  1733.  
  1734.  else if (a.Gd != -1)
  1735.         {
  1736.           a.log("Furnished floor, setting combat style to: Crush");
  1737.  
  1738.           a.SD = a.Gd;
  1739.         }
  1740.         else
  1741.         {
  1742.           a.SD =
  1743.  
  1744. a.v;
  1745.         }
  1746.  
  1747.       }
  1748.  
  1749.       a.Sc = 273;
  1750.  
  1751.       break;
  1752.     case 54675:
  1753.       a.ud = "Occult";
  1754.  
  1755.       if (a.xb != -1)
  1756.       {
  1757.         a.SD = a.xb;
  1758.  
  1759.         a.log("Occult floor,
  1760.  
  1761. setting combat style to: Slash");
  1762.       }
  1763.       else if (a.bC != -1)
  1764.       {
  1765.         a.SD = a.bC;
  1766.  
  1767.         a.log("Occult floor, setting combat style to: Stab");
  1768.       }
  1769.      
  1770.  
  1771. else
  1772.       {
  1773.         a.SD = a.v;
  1774.       }
  1775.  
  1776.       a.Sc = 3676;
  1777.  
  1778.       break;
  1779.     case 56149:
  1780.       while (0 != 0);
  1781.       a.ud = "Warped";
  1782.  
  1783.       a.Sc = 5467;
  1784.     default:
  1785.      
  1786.  
  1787. a.log.severe("This floor type is not yet supported, returning to a lower floor.");
  1788.  
  1789.       a.nc = true;
  1790.  
  1791.       return;
  1792.     }
  1793.  
  1794.     a.r();
  1795.  
  1796.     a.VA();
  1797.  
  1798.     if (a.gE)
  1799.     {
  1800.      
  1801.  
  1802. a.log.severe("Looks like a prayer door in the start room, trying another dungeon.");
  1803.  
  1804.       a.gE = true;
  1805.  
  1806.       a.aA();
  1807.  
  1808.       return;
  1809.     }
  1810.     a.KA = new Timer(0L);
  1811.  
  1812.     if
  1813.  
  1814. (a.jA())
  1815.       return;
  1816.     if (a.dC != a.Zc) {
  1817.       a.log.severe("Complexity mismatch - selected: " + a.dC + ", actual: " + a.Zc);
  1818.     }
  1819.  
  1820.     if (!a.bc)
  1821.     {
  1822.       a.SD =
  1823.  
  1824. a.v;
  1825.     }
  1826.  
  1827.     a.sA = new Timer(0L);
  1828.  
  1829.     if (a.Zc < 5) {
  1830.       a.MA();
  1831.     }
  1832.  
  1833.     a.camera.setPitch(100);
  1834.  
  1835.     if (a.Zc < 5) {
  1836.       a.MA();
  1837.     }
  1838.  
  1839.     a.A(true);
  1840.  
  1841.     if (a.VA) {
  1842.    
  1843.  
  1844.   a.game.openTab(6);
  1845.     }
  1846.  
  1847.     a.game.openTab(4);
  1848.  
  1849.     a.camera.setCompass('n');
  1850.  
  1851.     a.e();
  1852.  
  1853.     if (a.Zc > 4)
  1854.     {
  1855.       int i2 = -1; int i3 = 0;
  1856.       do
  1857.       {
  1858.         do {
  1859.    
  1860.  
  1861.        while (true)
  1862.           {
  1863.             a.AB = "Purchasing a toolkit";
  1864.  
  1865.             if (a.jA())
  1866.             {
  1867.               return;
  1868.             }
  1869.  
  1870.             a.l(a.Vc,
  1871.  
  1872. "Wield");
  1873.  
  1874.             if (!a.inventory.contains(19650))
  1875.               break;
  1876.             a.D(true);
  1877.  
  1878.             a.inventory.getItem(new int[] { 19650 }).doClick(true);
  1879.  
  1880.      
  1881.  
  1882.        if ((i4 = 0) < 10)
  1883.             {
  1884.               a.sleep(100, 130);
  1885.  
  1886.               i4++;
  1887.             }
  1888.  
  1889.           }
  1890.  
  1891.         }
  1892.  
  1893.         while (a.l(true, 1, i2));
  1894.  
  1895.         if
  1896.  
  1897. ((i4 = 0) >= 10)
  1898.           continue;
  1899.         a.sleep(60, 80);
  1900.  
  1901.         i4++;
  1902.       }
  1903.       while (!a.SE.contains("enough money"));
  1904.  
  1905.       i2 = -1;
  1906.  
  1907.       i3++;
  1908.  
  1909.       a.sleep(300,
  1910.  
  1911. 500);
  1912.  
  1913.       int i4 = a.inventory.getCount(); int i5 = a.inventory.getCount(a.pb);
  1914.       int i7;
  1915.       if ((i3 > 1) || (i5 >= i4))
  1916.       {
  1917.         int[] arrayOfInt;
  1918.        
  1919.  
  1920. int i6 = (arrayOfInt = a.vc).length; int i8 = arrayOfInt[i7];
  1921.  
  1922.         i2 = i8;
  1923.  
  1924.         i7++;
  1925.       }
  1926.  
  1927.       if ((i2 == -1) && (i3 > 2))
  1928.       {
  1929.         a.log("Unable to
  1930.  
  1931. purchase a toolkit, trying a new floor.");
  1932.  
  1933.         if (a.UA)
  1934.         {
  1935.           a.env.saveScreenshot(false);
  1936.         }
  1937.         a.nc = true;
  1938.  
  1939.         return;
  1940.       }
  1941.       a.SE
  1942.  
  1943. = "";
  1944.  
  1945.       a.AB = "";
  1946.     }
  1947.  
  1948.     a.Fg = true;
  1949.   }
  1950.  
  1951.   private boolean l(RSTile a, double a, double a, int a, String a)
  1952.   {
  1953.     int i1;
  1954.     Point localPoint;
  1955.     if ((localPoint =
  1956.  
  1957. a.calc.tileToScreen(a, a, a, a)).x !=
  1958.       -1)
  1959.     {
  1960.       a.mouse.move(localPoint);
  1961.  
  1962.       if (a.l(a))
  1963.       {
  1964.         return true;
  1965.       }
  1966.  
  1967.       if (!a.Y().isMoving()) {
  1968.    
  1969.  
  1970.     if ((!a.contains("Use")) && (a.menu.contains("Use")))
  1971.           a.l(a, 1);
  1972.         else {
  1973.           i1 += 4;
  1974.         }
  1975.  
  1976.       }
  1977.  
  1978.     }
  1979.     else if (!a.Y().isMoving())
  1980.     {
  1981.  
  1982.  
  1983.     a.A(a, 1);
  1984.     }
  1985.  
  1986.     i1++;
  1987.  
  1988.     return false;
  1989.   }
  1990.  
  1991.   private RSTile[] h(RSTile a)
  1992.   {
  1993.     int i1 = a.getX(); int i2 = a.getY();
  1994.  
  1995.     return new RSTile[] { new RSTile(i1 + 1,
  1996.  
  1997. i2), new RSTile(i1 - 1, i2), new RSTile(i1, i2 + 1), new RSTile(i1, i2 - 1) };
  1998.   }
  1999.  
  2000.   private boolean G(boolean a)
  2001.   {
  2002.     int i1 = 0;
  2003.  
  2004.     a.Hb();
  2005.     do
  2006.     {
  2007.       do
  2008.        
  2009.  
  2010. do {
  2011.           while (true)
  2012.           {
  2013.             if ((a.Zc()) || (!a.DD()))
  2014.             {
  2015.               return false;
  2016.             }
  2017.             a.yd =
  2018.  
  2019. a.groundItems.getNearest(new int[] { 18829 });
  2020.  
  2021.             if ((!a) || (a.yd == null))
  2022.               break;
  2023.             if (!a.l(a.yd))
  2024.             {
  2025.              
  2026.  
  2027. continue;
  2028.             }
  2029.  
  2030.             a.K(false);
  2031.           }
  2032.  
  2033.         }
  2034.  
  2035.         while (a.jb == null); while (a.jb.contains(new RSTile[] { a.X() }));
  2036.  
  2037.       if (a.GA())
  2038.       {
  2039.    
  2040.  
  2041.      a.sleep(800, 1700);
  2042.  
  2043.         a.F(false);
  2044.  
  2045.         a.K(true);
  2046.       }
  2047.       if ((!a.jb.contains(new RSTile[] { a.X() })) && (a.d())) {
  2048.         a.sleep(2000, 4000);
  2049.       }
  2050.  
  2051.  
  2052.  
  2053.      if ((i1 == 0) || (a.Y().getAnimation() != -1)) continue; if (a.jb.contains(new RSTile[] { a.X() }))
  2054.         continue;
  2055.       a.sleep(600, 800);
  2056.     }
  2057.  
  2058.     while (((i1
  2059.  
  2060. != 0) && (a.Y().getAnimation() != -1)) || (!a.F(24, "Cast")));
  2061.  
  2062.     i1 = 1;
  2063.  
  2064.     a.sleep(1100, 2500);
  2065.  
  2066.     a.game.openTab(4);
  2067.  
  2068.     a.K(true);
  2069.  
  2070.     a.uA();
  2071.  
  2072.     return true;
  2073.   }
  2074.  
  2075.  
  2076.  
  2077. private RSItem[] jb()
  2078.   {
  2079.     return new RSItem[] { a.equipment.getItem(8), a.equipment.getItem(20), a.equipment.getItem(23), a.equipment.getItem(26),
  2080.  
  2081. a.equipment.getItem(29), a.equipment.getItem(32) };
  2082.   }
  2083.  
  2084.   public void onRepaint(Graphics a)
  2085.   {
  2086.     ((Graphics2D)a).setRenderingHint(RenderingHints.KEY_ANTIALIASING,
  2087.  
  2088. RenderingHints.VALUE_ANTIALIAS_ON);
  2089.  
  2090.     if (a.game.isLoggedIn())
  2091.     {
  2092.       a.setFont(a.jd);
  2093.       Iterator localIterator2;
  2094.       Object localObject1;
  2095.       Object
  2096.  
  2097. localObject2;
  2098.       if ((a.M) && (a.zB) && (a.FA != null) && (a.r != null))
  2099.       {
  2100.         a.setColor(a.FA.equals(a.r) ? a.QD : a.IG);
  2101.         Iterator localIterator1;
  2102.    
  2103.  
  2104.     RSTile localRSTile1 = (RSTile)localIterator1.next();
  2105.  
  2106.         a.l(a, localRSTile1, 0.5D);
  2107.  
  2108.         a.setColor(a.Cb);
  2109.  
  2110.         localRSTile1 = (RSTile)localIterator1.next
  2111.  
  2112. ();
  2113.  
  2114.         a.l(a, localRSTile1, 0.5D);
  2115.  
  2116.         if (a.ke.contains(a.r)) {
  2117.           a.setColor(a.xA);
  2118.         }
  2119.         else if ((a.jb != null) && (a.r.equals(a.jb)))
  2120.        
  2121.  
  2122.    a.setColor(a.nd);
  2123.         else if ((a.l.contains(a.r)) || ((a.nb != null) && (a.r.equals(a.nb)))) {
  2124.           a.setColor(a.Cb);
  2125.         }
  2126.         else if
  2127.  
  2128. (a.ic.contains(a.r)) {
  2129.           a.setColor(a.Eb);
  2130.         }
  2131.         else if ((a.Ke) || (a.aE.contains(a.r)))
  2132.         {
  2133.           a.setColor(a.j);
  2134.         }
  2135.         else {
  2136.    
  2137.  
  2138.       a.setColor(a.DA);
  2139.         }
  2140.  
  2141.         localRSTile1 = (RSTile)localIterator1.next();
  2142.  
  2143.         a.l(a, localRSTile1, 0.5D);
  2144.  
  2145.         a.setColor(a.Qf);
  2146.  
  2147.         a.l(a, a.vE,
  2148.  
  2149. 0.5D);
  2150.  
  2151.         a.setColor(a.bd);
  2152.         int i1;
  2153.         if ((a.cB != null) && (a.Wd != null))
  2154.         {
  2155.           int i4;
  2156.           if ((i4 = a.cB[i1] - 1) !=
  2157.            
  2158.  
  2159. -1) {
  2160.             a.l(a, a.Wd[i4], 0.4D);
  2161.           }
  2162.  
  2163.           i1++;
  2164.         }
  2165.  
  2166.         for (localIterator2 = a.a.iterator(); localIterator2.hasNext(); )
  2167.         {
  2168.          
  2169.  
  2170. if (!(localObject1 = (RSTile)localIterator2.next())
  2171.             .equals(a.vE))
  2172.           {
  2173.             a.l(a, (RSTile)localObject1, 0.3D);
  2174.           }
  2175.         }
  2176.         for
  2177.  
  2178. (localIterator2 = a.fA.iterator(); localIterator2.hasNext(); ) { localObject1 = (RSTile)localIterator2.next();
  2179.  
  2180.           if ((a.calc.distanceBetween(a.X(), (RSTile)
  2181.  
  2182. localObject1) < 17.0D) && (
  2183.             (localObject2 = a.G((RSTile)localObject1)) != null))
  2184.           {
  2185.             if (a.fG.contains(localObject1))
  2186.             {
  2187.          
  2188.  
  2189.      a.setColor(a.Jd);
  2190.             }
  2191.             else if ((a.vF.contains(localObject1)) || (a.gc.contains(localObject1)))
  2192.             {
  2193.               a.setColor(a.EC);
  2194.      
  2195.  
  2196.        }
  2197.             else if (a.w.contains(localObject1)) {
  2198.               a.setColor(a.R);
  2199.             }
  2200.             else
  2201.             {
  2202.               a.setColor(a.b);
  2203.        
  2204.  
  2205.     }
  2206.             RSTile[] arrayOfRSTile;
  2207.             int i7 = (arrayOfRSTile = ((RSObject)localObject2).getArea().getTileArray()).length; RSTile localRSTile2 =
  2208.  
  2209. arrayOfRSTile[i8];
  2210.  
  2211.             a.l(a, localRSTile2, 0.5D);
  2212.  
  2213.             i8++;
  2214.           }
  2215.         }
  2216.         int i8;
  2217.         a.setColor(a.DA);
  2218.  
  2219.         for (localIterator2 =
  2220.  
  2221. a.uc.iterator(); localIterator2.hasNext(); )
  2222.         {
  2223.           if (!(localObject1 = (RSTile)localIterator2.next())
  2224.             .equals(a.vE))
  2225.           {
  2226.             a.l
  2227.  
  2228. (a, (RSTile)localObject1, 0.3D);
  2229.           }
  2230.         }
  2231.       }
  2232.       if (a.dg)
  2233.       {
  2234.         a.setColor(a.sc);
  2235.  
  2236.         a.F(a, a.oc);
  2237.  
  2238.         if (((a.nc) || (a.Qc.contains
  2239.  
  2240. ("Entering D"))) && (a.game.getCurrentTab() != 4))
  2241.         {
  2242.           a.F(a, a.A);
  2243.         }
  2244.  
  2245.         if ((a.Qc.contains("next dungeon...")) || ((a.N) && (a.pC != 0) &&
  2246.  
  2247. (a.jb == null))) {
  2248.           a.F(a, a.Ld);
  2249.         }
  2250.  
  2251.       }
  2252.  
  2253.       if (!a.iA)
  2254.       {
  2255.         if (a.o.contains(a.Xe))
  2256.         {
  2257.           a.setColor(a.sc);
  2258.  
  2259.          
  2260.  
  2261. a.drawString((a.bF != 0 ? "Highscores rank: " + a.bF + " || " : "") + (a.jB != 0 ? a.jB + " users online || " : "") + "by kiko & ShadowMoose", 92 + a.mf + a.tB, 472);
  2262.  
  2263.  
  2264.       }
  2265.         a.eb = (a.sA != null ? a.sA.toElapsedString() : "00:00:00");
  2266.  
  2267.         a.setColor(a.QD);
  2268.  
  2269.         if ((a.dc) && (a.uB != 1)) {
  2270.           a.fillRect(7, 363,
  2271.  
  2272. 80, 95);
  2273.         }
  2274.  
  2275.         a.fillRect(87, 363, 426, 95);
  2276.  
  2277.         a.setColor(a.sc);
  2278.  
  2279.         if (a.Wc)
  2280.         {
  2281.           a.setColor(a.IG);
  2282.         }
  2283.         else if
  2284.  
  2285. (a.o.contains(a.Xe))
  2286.         {
  2287.           a.setColor(a.MB);
  2288.         }
  2289.         a.F(a, a.o);
  2290.  
  2291.         a.setColor(a.cA);
  2292.  
  2293.         a.drawLine(6, 458, 512, 458);
  2294.  
  2295.         if ((a.UB)
  2296.  
  2297. || (a.qD) || ((a.dc) && (a.uB == 1)))
  2298.         {
  2299.           a.drawLine(87, 363, 87, 457);
  2300.  
  2301.           a.drawLine(87, a.xd.y, 511, a.xd.y);
  2302.         }
  2303.  
  2304.         if ((a.UB) && (!
  2305.  
  2306. a.dc))
  2307.         {
  2308.           double d1 = a.z.getElapsed();
  2309.  
  2310.           if ((a.nA) && (d1 != 0.0D))
  2311.           {
  2312.             a.ac = (a.skills.getCurrentExp(0) - a.CD);
  2313.  
  2314.            
  2315.  
  2316. a.rC = (a.skills.getCurrentExp(2) - a.q);
  2317.  
  2318.             a.TC = (a.skills.getCurrentExp(1) - a.Rc);
  2319.  
  2320.             a.T = (a.skills.getCurrentExp(3) - a.ZF);
  2321.  
  2322.             a.sD =
  2323.  
  2324. (a.skills.getCurrentExp(4) - a.xB);
  2325.  
  2326.             a.yB = (a.skills.getCurrentExp(6) - a.L);
  2327.  
  2328.             a.Vd = (a.skills.getCurrentExp(5) - a.pd);
  2329.  
  2330.             a.Db =
  2331.  
  2332. (a.skills.getCurrentExp(20) - a.og);
  2333.  
  2334.             a.sg = (a.skills.getCurrentExp(14) - a.vB);
  2335.  
  2336.             a.Ac = (a.skills.getCurrentExp(11) - a.aD);
  2337.  
  2338.             a.GC =
  2339.  
  2340. (a.skills.getCurrentExp(8) - a.K);
  2341.  
  2342.             a.mc = (a.skills.getCurrentExp(12) - a.Cg);
  2343.  
  2344.             a.UE = (a.skills.getCurrentExp(13) - a.RA);
  2345.  
  2346.             a.n =
  2347.  
  2348. (a.skills.getCurrentExp(16) - a.Gg);
  2349.  
  2350.             a.wb = (a.skills.getCurrentExp(17) - a.db);
  2351.  
  2352.             a.t = (a.skills.getCurrentExp(23) - a.ND);
  2353.  
  2354.             a.Zf =
  2355.  
  2356. (a.skills.getCurrentExp(15) - a.f);
  2357.  
  2358.             a.RB = (a.skills.getCurrentExp(22) - a.qc);
  2359.  
  2360.             a.AA = (a.skills.getCurrentExp(7) - a.pD);
  2361.  
  2362.             a.IA =
  2363.  
  2364. (a.skills.getCurrentExp(10) - a.vA);
  2365.  
  2366.             a.KE = (a.skills.getCurrentExp(18) - a.e);
  2367.  
  2368.             a.LE = (a.skills.getCurrentExp(24) - a.JC);
  2369.  
  2370.             a.zC =
  2371.  
  2372. (int)(3600000.0D / d1 * (a.ac + a.TC + a.rC + a.sD + a.yB + a.T + a.Vd));
  2373.  
  2374.             a.yF = (int)(3600000.0D / d1 * a.LE);
  2375.  
  2376.             a.HA = (int)(3600000.0D / d1 *
  2377.  
  2378. (a.Db + a.sg + a.Ac + a.GC + a.UE + a.mc + a.n + a.wb + a.t + a.Zf + a.RB + a.AA + a.IA + a.KE));
  2379.  
  2380.             a.Ab = (Math.rint(3600000.0D / d1 * a.pC * 10.0D) /
  2381.  
  2382. 10.0D);
  2383.           }
  2384.           if (a.h == 1)
  2385.           {
  2386.             a.setColor(a.QD);
  2387.  
  2388.             a.F(a, a.xd);
  2389.  
  2390.             a.setColor(a.iC.contains(a.Xe) ? a.C : a.MB);
  2391.  
  2392.      
  2393.  
  2394.        a.F(a, a.iC);
  2395.  
  2396.             a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
  2397.  
  2398.             a.F(a, a.tC);
  2399.  
  2400.             a.setColor(a.Qd);
  2401.  
  2402.             a.draw3DRect(a.xd.x,
  2403.  
  2404. a.xd.y, a.xd.width, a.xd.height, true);
  2405.  
  2406.             a.clearRect(a.xd.x + a.xd.width, a.xd.y + 1, 1, a.xd.height - 1);
  2407.  
  2408.             a.drawString("Total Time: " +
  2409.  
  2410. a.z.toElapsedString(), 93, 380);
  2411.  
  2412.             a.drawString("Dung. Level: " + a.JA + " (+" + (a.JA - a.me) + ")", 93, 398);
  2413.  
  2414.             a.drawString("Exp Gained: " + a.LE,
  2415.  
  2416. 93, 416);
  2417.  
  2418.             a.drawString("Exp per Hour: " + a.yF, 93, 434);
  2419.  
  2420.             a.drawString("Tokens Gained: " + a.Td, 93, 452);
  2421.  
  2422.             a.drawString("Dungeons
  2423.  
  2424. Completed: " + a.pC, 295, 380);
  2425.  
  2426.             a.drawString("Floors per Hour: " + a.Ab, 295, 398);
  2427.  
  2428.             a.drawString("Dungeons Aborted: " + a.Ic, 295, 416);
  2429.  
  2430.          
  2431.  
  2432.   a.drawString("Total Deaths: " + a.Pd, 295, 434);
  2433.  
  2434.             a.drawString("Time to Level: " + a.XA(), 295, 452);
  2435.           }
  2436.           else if (a.h == 2)
  2437.           {
  2438.      
  2439.  
  2440.        localObject2 = "N/A";
  2441.  
  2442.             if (a.Rd == 1) {
  2443.               localObject2 = "Start";
  2444.             }
  2445.             else if (a.FF) {
  2446.               localObject2 =
  2447.  
  2448. "Boss";
  2449.             }
  2450.             else if (a.Rd != 0)
  2451.               localObject2 = "" + a.Rd;
  2452.             a.setColor(a.xd.contains(a.Xe) ? a.C : a.MB);
  2453.  
  2454.             a.F(a,
  2455.  
  2456. a.xd);
  2457.  
  2458.             a.setColor(a.QD);
  2459.  
  2460.             a.F(a, a.iC);
  2461.  
  2462.             a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
  2463.  
  2464.             a.F(a, a.tC);
  2465.  
  2466.             a.setColor
  2467.  
  2468. (a.Qd);
  2469.  
  2470.             a.draw3DRect(a.iC.x, a.iC.y, a.iC.width, a.iC.height, true);
  2471.  
  2472.             a.clearRect(a.iC.x + a.iC.width, a.iC.y + 1, 1, a.iC.height - 1);
  2473.  
  2474.            
  2475.  
  2476. a.drawString("Floor Time: " + a.eb, 93, 380);
  2477.  
  2478.             a.drawString("Floor Type: " + a.ud, 93, 398);
  2479.  
  2480.             a.drawString("Floor Number: " + (a.Ud > 0 ?
  2481.  
  2482. Integer.valueOf(a.Ud) : "??") + " (C" + a.Zc + ")", 93, 416);
  2483.  
  2484.             a.drawString("Current Room: " + (String)localObject2 + " (of " + a.Nc.size() + ")", 93, 434);
  2485.  
  2486.  
  2487.  
  2488.           a.drawString("Prestige Count: " + a.re, 93, 452);
  2489.  
  2490.             a.drawString("Progress: " + (a.g > 0 ? a.OA + " of " + a.g + " floors" : "Unknown"), 295, 380);
  2491.  
  2492.  
  2493.  
  2494.           a.drawString("Avg. Floor Time: " + a.tE + " mins", 295, 398);
  2495.  
  2496.             a.drawString("Fastest Dungeon: " + a.Xf, 295, 416);
  2497.  
  2498.             a.drawString("Slowest
  2499.  
  2500. Dungeon: " + a.fd, 295, 434);
  2501.  
  2502.             a.drawString("Puzzles completed: " + a.uA, 295, 452);
  2503.           }
  2504.           else if (a.h == 3)
  2505.           {
  2506.             a.setColor
  2507.  
  2508. (a.xd.contains(a.Xe) ? a.C : a.MB);
  2509.  
  2510.             a.F(a, a.xd);
  2511.  
  2512.             a.setColor(a.iC.contains(a.Xe) ? a.C : a.MB);
  2513.  
  2514.             a.F(a, a.iC);
  2515.  
  2516.             a.setColor
  2517.  
  2518. (a.QD);
  2519.  
  2520.             a.F(a, a.tC);
  2521.  
  2522.             localObject2 = "";
  2523.  
  2524.             if (a.HC == 1)
  2525.             {
  2526.               if ((a.ac > 0) && (a.TC > 0))
  2527.                
  2528.  
  2529. localObject2 = "Controlled";
  2530.               else if (a.TC > 0)
  2531.               {
  2532.                 localObject2 = "Defensive";
  2533.               }
  2534.               else if (a.ac > 0) {
  2535.  
  2536.  
  2537.                localObject2 = "Accurate";
  2538.               }
  2539.               else if (a.rC > 0)
  2540.               {
  2541.                 localObject2 = "Aggressive";
  2542.               }
  2543.      
  2544.  
  2545.         else
  2546.               {
  2547.                 localObject2 = "Unknown";
  2548.               }
  2549.             }
  2550.             else if (a.HC == 2) {
  2551.               localObject2 = a.TC > 0
  2552.  
  2553. ? "Longrange" : "Ranged";
  2554.             }
  2555.  
  2556.             a.setColor(a.Qd);
  2557.  
  2558.             a.draw3DRect(a.tC.x, a.tC.y, a.tC.width, a.tC.height, true);
  2559.  
  2560.             a.clearRect
  2561.  
  2562. (a.tC.x + a.tC.width, a.tC.y + 1, 1, a.tC.height - 1);
  2563.  
  2564.             a.drawString("Cb Style: " + (String)localObject2, 93, 380);
  2565.  
  2566.             a.drawString("Cb exp/hr: " +
  2567.  
  2568. a.zC, 93, 398);
  2569.  
  2570.             a.drawString("Prayer gain: " + a.Vd, 93, 416);
  2571.  
  2572.             a.drawString("Skills exp/hr: " + a.HA, 93, 434);
  2573.  
  2574.             a.drawString("Total
  2575.  
  2576. exp/hr: " + (a.zC + a.yF + a.HA), 93, 452);
  2577.           }
  2578.           a.setFont(a.cb);
  2579.  
  2580.           a.setColor(a.Qd);
  2581.  
  2582.           a.drawString("Overview", 20, 384);
  2583.  
  2584.          
  2585.  
  2586. a.drawString("Dungeons", 18, 415);
  2587.  
  2588.           a.drawString("Misc.", 33, 446);
  2589.  
  2590.           a.setColor(a.MB);
  2591.  
  2592.           a.fillRect(7, 361, 80, 2);
  2593.         }
  2594.         else if
  2595.  
  2596. (a.H.contains(a.Xe))
  2597.         {
  2598.           a.setColor(a.sc);
  2599.  
  2600.           a.setFont(a.cb);
  2601.  
  2602.           a.drawString("Statistics", 21, 358);
  2603.  
  2604.           a.setFont(a.jd);
  2605.  
  2606.          
  2607.  
  2608. a.setColor(a.C);
  2609.         }
  2610.         else
  2611.         {
  2612.           a.setColor(a.QD);
  2613.         }
  2614.         a.F(a, a.H);
  2615.  
  2616.         if (a.qD)
  2617.         {
  2618.           a.setColor(a.MB);
  2619.  
  2620.          
  2621.  
  2622. a.fillRect(91, 361, 80, 2);
  2623.         }
  2624.         else if (a.m.contains(a.Xe))
  2625.         {
  2626.           a.setColor(a.sc);
  2627.  
  2628.           a.setFont(a.cb);
  2629.  
  2630.           a.drawString("Options",
  2631.  
  2632. 110, 358);
  2633.  
  2634.           a.setFont(a.jd);
  2635.  
  2636.           a.setColor(a.C);
  2637.         }
  2638.         else
  2639.         {
  2640.           a.setColor(a.QD);
  2641.         }
  2642.         a.F(a, a.m);
  2643.         int i2;
  2644.      
  2645.  
  2646.    if ((a.qD) || ((a.dc) && (a.uB < 2)))
  2647.         {
  2648.           if (a.O[a.DC][i2] != 0)
  2649.           {
  2650.             if (a.ZC[a.DC][i2].contains(a.Xe)) {
  2651.               a.setColor
  2652.  
  2653. (a.ZE);
  2654.             }
  2655.             else
  2656.             {
  2657.               a.setColor(a.wg);
  2658.             }
  2659.  
  2660.           }
  2661.           else if (a.ZC[a.DC][i2].contains(a.Xe)) {
  2662.            
  2663.  
  2664. a.setColor(a.rc);
  2665.           }
  2666.           else
  2667.           {
  2668.             a.setColor(a.Cb);
  2669.           }
  2670.  
  2671.           a.F(a, a.ZC[a.DC][i2]);
  2672.  
  2673.           a.setColor(a.Qd);
  2674.  
  2675.          
  2676.  
  2677. a.draw3DRect(a.ZC[a.DC][i2].x, a.ZC[a.DC][i2].y, a.ZC[a.DC][i2].width, a.ZC[a.DC][i2].height, true);
  2678.  
  2679.           i2++;
  2680.         }
  2681.  
  2682.         if ((a.qD) || (a.uB == 1))
  2683.         {
  2684.  
  2685.  
  2686.          if (a.DC == 1)
  2687.           {
  2688.             a.setColor(a.QD);
  2689.  
  2690.             a.F(a, a.xd);
  2691.  
  2692.             a.setColor(a.iC.contains(a.Xe) ? a.C : a.MB);
  2693.  
  2694.             a.F(a,
  2695.  
  2696. a.iC);
  2697.  
  2698.             a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
  2699.  
  2700.             a.F(a, a.tC);
  2701.  
  2702.             a.setColor(a.Qd);
  2703.  
  2704.             a.draw3DRect(a.xd.x, a.xd.y,
  2705.  
  2706. a.xd.width, a.xd.height, true);
  2707.  
  2708.             a.clearRect(a.xd.x + a.xd.width, a.xd.y + 1, 1, a.xd.height - 1);
  2709.  
  2710.             a.drawString("Bones", 190, 387);
  2711.  
  2712.            
  2713.  
  2714. a.drawString("Arrows", 290, 387);
  2715.  
  2716.             a.drawString("Heim crabs", 390, 387);
  2717.  
  2718.             a.drawString("Prayers", 190, 409);
  2719.  
  2720.             a.drawString("Quick pray",
  2721.  
  2722. 290, 409);
  2723.  
  2724.             a.drawString("Pray doors", 390, 409);
  2725.  
  2726.             a.drawString("Pure mode", 190, 431);
  2727.  
  2728.             a.drawString("Style swap", 290, 431);
  2729.  
  2730.            
  2731.  
  2732. a.drawString("Occult floors", 390, 431);
  2733.  
  2734.             a.setColor(a.ub);
  2735.  
  2736.             a.drawString("Pickup:", 118, 387);
  2737.  
  2738.             a.drawString("Prayer:", 118, 409);
  2739.  
  2740.        
  2741.  
  2742.      a.drawString("Other:", 123, 431);
  2743.           }
  2744.           else if (a.DC == 2)
  2745.           {
  2746.             a.setColor(a.xd.contains(a.Xe) ? a.C : a.MB);
  2747.  
  2748.             a.F(a,
  2749.  
  2750. a.xd);
  2751.  
  2752.             a.setColor(a.QD);
  2753.  
  2754.             a.F(a, a.iC);
  2755.  
  2756.             a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
  2757.  
  2758.             a.F(a, a.tC);
  2759.  
  2760.             a.setColor
  2761.  
  2762. (a.Qd);
  2763.  
  2764.             a.draw3DRect(a.iC.x, a.iC.y, a.iC.width, a.iC.height, true);
  2765.  
  2766.             a.clearRect(a.iC.x + a.iC.width, a.iC.y + 1, 1, a.iC.height - 1);
  2767.  
  2768.            
  2769.  
  2770. a.setColor(a.MA);
  2771.  
  2772.             a.fillRect(124, 403, 19, 19);
  2773.  
  2774.             a.fillRect(310, 403, 19, 19);
  2775.  
  2776.             a.fillRect(380, 403, 22, 19);
  2777.  
  2778.             a.setColor
  2779.  
  2780. (a.cA);
  2781.  
  2782.             a.draw3DRect(124, 403, 19, 19, true);
  2783.  
  2784.             a.draw3DRect(310, 403, 19, 19, true);
  2785.  
  2786.             a.draw3DRect(380, 403, 22, 19, true);
  2787.  
  2788.            
  2789.  
  2790. a.setColor(a.ub);
  2791.  
  2792.             a.drawString("Complexity:", 93, 382);
  2793.  
  2794.             a.drawString("Rush Settings:", 270, 382);
  2795.  
  2796.             a.drawString("" + a.dC, 130, 418);
  2797.  
  2798.    
  2799.  
  2800.          a.drawString("" + a.ld, 316, 418);
  2801.  
  2802.             a.drawString("" + a.td, a.td < 10 ? 387 : 383, 418);
  2803.  
  2804.             a.setColor(a.Qd);
  2805.  
  2806.             a.drawString
  2807.  
  2808. ("Enabled", 391, 383);
  2809.  
  2810.             a.drawString("Prestige", 197, 386);
  2811.  
  2812.             a.drawString("Medium", 197, 408);
  2813.  
  2814.             a.drawString("Debug", 197, 430);
  2815.  
  2816.          
  2817.  
  2818.   a.drawString("Recording", 197, 452);
  2819.  
  2820.             a.drawString("Complexity", 280, 452);
  2821.  
  2822.             a.drawString("To floor", 365, 452);
  2823.  
  2824.             a.drawString("Grab
  2825.  
  2826. food", 436, 404);
  2827.  
  2828.             a.drawImage(a.V.contains(a.Xe) ? a.OE : a.Dd, 124, 387, null);
  2829.  
  2830.             a.drawImage(a.Ub.contains(a.Xe) ? a.iG : a.gD, 124, 422, null);
  2831.  
  2832.  
  2833.  
  2834.           a.drawImage(a.lb.contains(a.Xe) ? a.OE : a.Dd, 310, 387, null);
  2835.  
  2836.             a.drawImage(a.p.contains(a.Xe) ? a.iG : a.gD, 310, 422, null);
  2837.  
  2838.            
  2839.  
  2840. a.drawImage(a.qf.contains(a.Xe) ? a.OE : a.Dd, 381, 387, null);
  2841.  
  2842.             a.drawImage(a.D.contains(a.Xe) ? a.iG : a.gD, 381, 422, null);
  2843.           }
  2844.           else if
  2845.  
  2846. ((a.DC == 3) && (!a.dc))
  2847.           {
  2848.             a.setColor(a.xd.contains(a.Xe) ? a.C : a.MB);
  2849.  
  2850.             a.F(a, a.xd);
  2851.  
  2852.             a.setColor(a.iC.contains(a.Xe) ? a.C :
  2853.  
  2854. a.MB);
  2855.  
  2856.             a.F(a, a.iC);
  2857.  
  2858.             a.setColor(a.QD);
  2859.  
  2860.             a.F(a, a.tC);
  2861.  
  2862.             a.setColor(a.ub);
  2863.  
  2864.             a.drawString("Loot item:", a.ff.x, a.ff.y
  2865.  
  2866. - 5);
  2867.  
  2868.             a.setColor(a.MA);
  2869.  
  2870.             a.F(a, a.ff);
  2871.  
  2872.             a.setColor(a.Qd);
  2873.  
  2874.             a.draw3DRect(a.tC.x, a.tC.y, a.tC.width, a.tC.height, true);
  2875.  
  2876.        
  2877.  
  2878.     a.clearRect(a.tC.x + a.tC.width, a.tC.y + 1, 1, a.tC.height - 1);
  2879.  
  2880.             a.drawString("You'll need an extra bound item slot to use this feature.", a.ff.x,
  2881.  
  2882. a.ff.y + 35);
  2883.  
  2884.             a.drawString("Type in the item name (case-insensitive) you wish to look for.", a.ff.x, a.ff.y + 50);
  2885.  
  2886.             a.l(a, a.ff);
  2887.  
  2888.             if
  2889.  
  2890. ((a.ce.isEmpty()) && (a.PA != 0))
  2891.             {
  2892.               a.setColor(a.Oc);
  2893.  
  2894.               a.drawString("Item name", a.ff.x + 4, a.ff.y + 14);
  2895.             }
  2896.            
  2897.  
  2898. else
  2899.             {
  2900.               a.drawString(a.PA == 0 ? a.ce + "_" : a.ce, a.ff.x + 4, a.ff.y + 15);
  2901.             }
  2902.  
  2903.           }
  2904.  
  2905.           a.setFont(a.cb);
  2906.  
  2907.          
  2908.  
  2909. a.setColor(a.Qd);
  2910.  
  2911.           a.drawString("General", 23, 383);
  2912.  
  2913.           a.drawString("Complexity", 15, 415);
  2914.  
  2915.           if (!a.dc) {
  2916.             a.drawString("Extras", 28,
  2917.  
  2918. 447);
  2919.           }
  2920.  
  2921.         }
  2922.  
  2923.         if (a.dc)
  2924.         {
  2925.           a.setFont(a.jd);
  2926.  
  2927.           if (a.uB > 0)
  2928.           {
  2929.             if (a.fD.contains(a.Xe))
  2930.             {
  2931.        
  2932.  
  2933.       a.setColor(a.QD);
  2934.  
  2935.               a.drawString("Back", 31, 450);
  2936.  
  2937.               a.setColor(a.Eb);
  2938.             }
  2939.             else
  2940.             {
  2941.               a.setColor
  2942.  
  2943. (a.YA);
  2944.             }
  2945.             a.F(a, a.fD);
  2946.  
  2947.             a.setColor(a.Qd);
  2948.  
  2949.             a.draw3DRect(a.fD.x, a.fD.y, a.fD.width, a.fD.height, true);
  2950.  
  2951.            
  2952.  
  2953. a.setColor(a.ub);
  2954.  
  2955.             a.drawString("Back", 32, 451);
  2956.           }
  2957.  
  2958.           if (a.Vb.contains(a.Xe))
  2959.           {
  2960.             a.setColor(a.QD);
  2961.  
  2962.            
  2963.  
  2964. a.drawString("Continue", 442, 450);
  2965.  
  2966.             a.setColor(a.Eb);
  2967.           }
  2968.           else
  2969.           {
  2970.             a.setColor(a.YA);
  2971.           }
  2972.  
  2973.           a.F(a, a.Vb);
  2974.  
  2975.      
  2976.  
  2977.      a.setColor(a.Qd);
  2978.  
  2979.           a.draw3DRect(a.Vb.x, a.Vb.y, a.Vb.width, a.Vb.height, true);
  2980.  
  2981.           a.setColor(a.ub);
  2982.  
  2983.           a.drawString("Continue", 443, 451);
  2984.  
  2985.    
  2986.  
  2987.       if (a.uB == 0)
  2988.           {
  2989.             a.setColor(a.ub);
  2990.  
  2991.             a.drawString("Choose your primary combat style", 15, 382);
  2992.  
  2993.             a.drawString("Choose your
  2994.  
  2995. secondary combat style", 15, 422);
  2996.  
  2997.             a.drawString("Settings options:", 300, 382);
  2998.  
  2999.             a.setColor(a.Qd);
  3000.  
  3001.             a.drawString("Melee", 50, 402);
  3002.  
  3003.      
  3004.  
  3005.       a.drawString("Range", 130, 402);
  3006.  
  3007.             a.drawString("Magic", 210, 402);
  3008.  
  3009.             a.drawString("Melee", 50, 442);
  3010.  
  3011.             a.drawString("Range", 130,
  3012.  
  3013. 442);
  3014.  
  3015.             a.drawString("Magic", 210, 442);
  3016.  
  3017.             a.drawString("Load settings on start", 333, 402);
  3018.  
  3019.             a.drawString("Save them for next time", 333,
  3020.  
  3021. 425);
  3022.           }
  3023.           else if (a.uB == 2)
  3024.           {
  3025.             if (a.IB)
  3026.             {
  3027.               a.setColor(a.ub);
  3028.  
  3029.               a.drawString("Wield your staff
  3030.  
  3031. and/or blastbox to use.", 15, 380);
  3032.  
  3033.               a.drawString("Then turn the spell you want to use to autocast.", 15, 395);
  3034.  
  3035.               if (a.k())
  3036.               {
  3037.      
  3038.  
  3039.           if (
  3040.                   (i2 = a.kA()) > 0)
  3041.                 {
  3042.                   a.Qb = i2;
  3043.                 }
  3044.                 a.setColor(a.Qd);
  3045.  
  3046.                
  3047.  
  3048. a.drawString("Spell selected: " + a.Qb, 15, 415);
  3049.               }
  3050.  
  3051.             }
  3052.             else if (a.Xd)
  3053.             {
  3054.               a.setColor(a.ub);
  3055.  
  3056.              
  3057.  
  3058. a.drawString("Bind and wield the arrows you would like to use.", 15, 380);
  3059.             }
  3060.             else
  3061.             {
  3062.               a.uB = (++a.uB);
  3063.             }
  3064.          
  3065.  
  3066.  }
  3067.           else if (a.uB == 3)
  3068.           {
  3069.             if (a.i)
  3070.             {
  3071.               String str1 = "";
  3072.  
  3073.               a.setColor(a.ub);
  3074.  
  3075.               if (a.k)
  3076.          
  3077.  
  3078.      {
  3079.                 a.drawString("You'll need a secondary crush weapon for this mode.", 15, 380);
  3080.  
  3081.                 a.drawString("Right click the item and select
  3082.  
  3083. 'Use'.", 15, 395);
  3084.               }
  3085.               else
  3086.               {
  3087.                 a.drawString("Select your backup Melee weapon.", 15, 380);
  3088.  
  3089.                
  3090.  
  3091. a.drawString("Right click the item and select 'Use'.", 15, 395);
  3092.               }
  3093.               if (a.game.getCurrentTab() == 4)
  3094.               {
  3095.                 if
  3096.  
  3097. ((localObject1 = a.inventory.getSelectedItem()) != null)
  3098.                 {
  3099.                   a.eB = ((RSItem)localObject1).getID();
  3100.  
  3101.                   str1 = a.l((RSItem)
  3102.  
  3103. localObject1);
  3104.                 }
  3105.  
  3106.               }
  3107.  
  3108.               if (a.eB > 0)
  3109.               {
  3110.                 a.setColor(a.Qd);
  3111.  
  3112.                 a.drawString("Secondary
  3113.  
  3114. Weapon: " + (!str1.isEmpty() ? str1 : Integer.valueOf(a.eB)), 15, 415);
  3115.               }
  3116.             }
  3117.             else if (a.vC)
  3118.             {
  3119.               a.setColor
  3120.  
  3121. (a.ub);
  3122.  
  3123.               a.drawString("You'll need a filled blastbox or combat runes to use secondary magic.", 15, 380);
  3124.  
  3125.               a.drawString("Autocast the spell to
  3126.  
  3127. use, then return the items to your inventory.", 15, 395);
  3128.  
  3129.               if (a.k())
  3130.               {
  3131.                 int i3;
  3132.                 if ((i3 = a.kA()) > 0) {
  3133.          
  3134.  
  3135.          a.Qb = i3;
  3136.                 }
  3137.  
  3138.                 if (a.game.getCurrentTab() == 4)
  3139.                 {
  3140.                   int i5 = a.inventory.getItemID("staff (b)");
  3141.      
  3142.  
  3143.              int i6;
  3144.                   if ((i6 = a.inventory.getItemID("blastbox (b)")) ==
  3145.                     -1) {
  3146.                     i6 = a.inventory.getItemID
  3147.  
  3148. ("surgebox (b)");
  3149.                   }
  3150.  
  3151.                   if (i6 > 0) {
  3152.                     a.pB = i6;
  3153.                   }
  3154.  
  3155.                   if (i5 > 0)
  3156.                   {
  3157.    
  3158.  
  3159.                 a.eB = i5;
  3160.                   }
  3161.                 }
  3162.                 a.setColor(a.Qd);
  3163.  
  3164.                 a.drawString("Spell selected: " + a.Qb + ", Staff: " +
  3165.  
  3166. ((a.eB > 0) && (a.game.getCurrentTab() == 4) ? a.J(a.l(a.inventory.getItem(new int[] { a.eB }))) : "None") + ", Blastbox: " + (a.pB > 0 ? "Yes" : "No"), 15, 415);
  3167.      
  3168.  
  3169.         }
  3170.  
  3171.             }
  3172.             else if (a.BB)
  3173.             {
  3174.               RSItem localRSItem = null;
  3175.  
  3176.               String str2 = "";
  3177.  
  3178.               a.setColor(a.ub);
  3179.  
  3180.      
  3181.  
  3182.          a.drawString("BIND the bow and arrows you would like to use.", 15, 380);
  3183.  
  3184.               a.drawString("Equip the arrows and leave the bow in your inventory.",
  3185.  
  3186. 15, 395);
  3187.  
  3188.               a.drawString("Right click the bow and select 'Use'.", 15, 410);
  3189.  
  3190.               if (a.game.getCurrentTab() == 4) {
  3191.                 localRSItem =
  3192.  
  3193. a.inventory.getSelectedItem();
  3194.               }
  3195.  
  3196.               if (localRSItem != null)
  3197.               {
  3198.                 a.eB = localRSItem.getID();
  3199.  
  3200.                 str2 =
  3201.  
  3202. a.l(localRSItem);
  3203.               }
  3204.  
  3205.               if (a.eB > 1) {
  3206.                 a.drawString("Secondary Weapon: " + str2, 15, 425);
  3207.               }
  3208.  
  3209.             }
  3210.            
  3211.  
  3212. else
  3213.             {
  3214.               a.uB = (++a.uB);
  3215.             }
  3216.           }
  3217.           else if (a.uB == 4)
  3218.           {
  3219.             a.setColor(a.ub);
  3220.  
  3221.             a.drawString
  3222.  
  3223. ("Be sure to bind and wield the primary weapon you would like to use.", 15, 380);
  3224.  
  3225.             a.drawString("Leave any unbound armor in your inventory.", 15, 395);
  3226.  
  3227.        
  3228.  
  3229.      a.drawString("Then press continue to finish the settings.", 15, 421);
  3230.           }
  3231.  
  3232.           a.setColor(a.QD);
  3233.  
  3234.           a.fillRect(175, 361, 222, 2);
  3235.         }
  3236.        
  3237.  
  3238. a.setColor(a.vg.contains(a.Xe) ? a.MB : a.QD);
  3239.  
  3240.         a.F(a, a.vg);
  3241.  
  3242.         if (a.vg.contains(a.Xe))
  3243.         {
  3244.           a.setColor(a.sc);
  3245.  
  3246.           if (!a.dc)
  3247.           {
  3248.  
  3249.  
  3250.           if ((!a.Pf.contains(a.Xe)) || (a.pA.isEmpty()))
  3251.             {
  3252.               if ((a.AB.isEmpty()) || (!a.ZB))
  3253.               {
  3254.                 a.drawString(a.Qc,
  3255.  
  3256. 181, 358);
  3257.               }
  3258.               else
  3259.               {
  3260.                 a.drawString("+ " + a.AB, 181, 358);
  3261.               }
  3262.  
  3263.             }
  3264.             else
  3265.             {
  3266.  
  3267.  
  3268.              a.drawString(a.pA, 181, 358);
  3269.             }
  3270.           }
  3271.           else {
  3272.             a.drawString(a.Nd, 181, 358);
  3273.           }
  3274.  
  3275.         }
  3276.  
  3277.         a.setColor
  3278.  
  3279. (a.eA);
  3280.  
  3281.         a.setFont(a.cb);
  3282.  
  3283.         a.drawString("Statistics", 20, 357);
  3284.  
  3285.         a.drawString("Options", 109, 357);
  3286.  
  3287.         if (!a.dc)
  3288.         {
  3289.           if
  3290.  
  3291. ((a.pA.isEmpty()) || (!a.Pf.contains(a.Xe)))
  3292.           {
  3293.             a.setColor(a.wg);
  3294.  
  3295.             a.drawString("+ " + a.AB, 180, 357);
  3296.           }
  3297.           else
  3298.          
  3299.  
  3300. {
  3301.             a.setColor(a.EC);
  3302.  
  3303.             a.drawString(a.pA, 180, 357);
  3304.           }
  3305.         }
  3306.         else
  3307.           a.drawString(a.Nd, 180, 357);
  3308.         a.setColor(a.eA);
  3309.  
  3310.  
  3311.  
  3312.        if (!a.le)
  3313.         {
  3314.           a.setFont(a.Kb);
  3315.  
  3316.           a.drawString("v1.07", 484, 455);
  3317.         }
  3318.  
  3319.         a.setFont(a.jd);
  3320.  
  3321.         a.drawString((a.bF != 0 ?
  3322.  
  3323. "Highscores rank: " + a.bF + " || " : "") + (a.jB != 0 ? a.jB + " users online || " : "") + "by kiko & ShadowMoose", 91 + a.mf + a.tB, 471);
  3324.       }
  3325.  
  3326.       a.setColor
  3327.  
  3328. (a.QD);
  3329.  
  3330.       a.setFont(a.SB);
  3331.  
  3332.       a.F(a, a.Pf);
  3333.  
  3334.       if (a.Pf.contains(a.Xe))
  3335.       {
  3336.         if (!a.qd)
  3337.         {
  3338.           a.drawImage(a.kc.contains(a.Xe) ? a.Ib :
  3339.  
  3340. a.Kd, a.kc.x, a.kc.y, null);
  3341.         }
  3342.         else {
  3343.           a.drawImage(a.kc.contains(a.Xe) ? a.VC : a.KG, a.kc.x, a.kc.y, null);
  3344.         }
  3345.  
  3346.         a.drawImage
  3347.  
  3348. (a.Rb.contains(a.Xe) ? a.Uc : a.oA, a.Rb.x, a.Rb.y, null);
  3349.  
  3350.         a.drawImage(a.Q.contains(a.Xe) ? a.hb : a.UF, a.Q.x, a.Q.y, null);
  3351.  
  3352.         a.drawImage(a.Pg.contains
  3353.  
  3354. (a.Xe) ? a.BC : a.We, a.Pg.x, a.Pg.y, null);
  3355.       }
  3356.       else
  3357.       {
  3358.         a.drawImage(a.Hg, a.Pf.x, a.Pf.y, null);
  3359.       }
  3360.  
  3361.       a.drawImage(a.ag.contains(a.Xe) ? a.rD
  3362.  
  3363. : a.NB, a.ag.x, a.ag.y, null);
  3364.     }
  3365.   }
  3366.  
  3367.   private boolean Hb()
  3368.   {
  3369.     return (a.combat.isPoisoned()) && (a.inventory.contains(17566)) && (a.F(a.LC) == null) && (a.l
  3370.  
  3371. (17566, "Drink"));
  3372.   }
  3373.  
  3374.   private void kD()
  3375.   {
  3376.     if (a.PB != null)
  3377.     {
  3378.       String[] arrayOfString;
  3379.       int i1 = (arrayOfString = a.PB).length;
  3380.       int i2;
  3381.      
  3382.  
  3383. String str;
  3384.       int i3;
  3385.       int i5;
  3386.       if ((
  3387.         (str = arrayOfString[i2]) != null) && (!str.isEmpty()) && ((i3 = a.inventory.getItemID(str)) > 0))
  3388.       {
  3389.        
  3390.  
  3391.  RSItem localRSItem = a.inventory.getItem(new int[] { i3 });
  3392.  
  3393.         int i4 = a.F(str);
  3394.  
  3395.         if ((localRSItem != null) && (i4 > 0))
  3396.         {
  3397.           if ((a.l(str,
  3398.  
  3399. a.wC[i5])) && (i4 > a.Sb[i5]) && (a.l(i3, "Wear")))
  3400.           {
  3401.             a.Sb[i5] = i4;
  3402.           }
  3403.           i5++;
  3404.         }
  3405.  
  3406.       }
  3407.  
  3408.       i2++;
  3409.  
  3410.       a.PB = new String
  3411.  
  3412. [a.Sb.length];
  3413.     }
  3414.   }
  3415.  
  3416.   private void Tb()
  3417.   {
  3418.     if (a.Yb)
  3419.     {
  3420.       try
  3421.       {
  3422.         BufferedWriter localBufferedWriter = new BufferedWriter(new FileWriter(a.rA));
  3423.  
  3424.    
  3425.  
  3426.     a.O[0][7] = 0;
  3427.         int i1;
  3428.         int i2;
  3429.         localBufferedWriter.write("" + i1 + i2 + "=" + a.O[i1][i2]);
  3430.  
  3431.         localBufferedWriter.newLine();
  3432.  
  3433.         i2++;
  3434.  
  3435.  
  3436.  
  3437.        i1++;
  3438.  
  3439.         localBufferedWriter.close();
  3440.       }
  3441.       catch (Exception localException1)
  3442.       {
  3443.         a.log.severe("Error saving settings");
  3444.       }
  3445.     }
  3446.   }
  3447.  
  3448.  
  3449.  
  3450. private void ad()
  3451.   {
  3452.     RSComponent localRSComponent;
  3453.     if ((localRSComponent = a.interfaces.getComponent(939, 83))
  3454.       .isValid())
  3455.     {
  3456.       a.OA =
  3457.  
  3458. Integer.parseInt(localRSComponent.getText().trim());
  3459.  
  3460.       a.Ud = (a.OA + 1);
  3461.     }
  3462.     else if ((localRSComponent = a.interfaces.getComponent(933, 240))
  3463.       .isValid())
  3464.  
  3465.  
  3466.    {
  3467.       try
  3468.       {
  3469.         a.OA = Integer.parseInt(localRSComponent.getText().replace("Floor ", "").replace(":", ""));
  3470.  
  3471.         a.Ud = (a.OA + 1);
  3472.       }
  3473.       catch
  3474.  
  3475. (Exception localException)
  3476.       {
  3477.         if (a.UA)
  3478.           a.log(localException);
  3479.       }
  3480.     }
  3481.     a.g = ((a.skills.getRealLevel(24) + 1) / 2);
  3482.  
  3483.     a.JA =
  3484.  
  3485. a.skills.getRealLevel(24);
  3486.  
  3487.     if (a.g > 35)
  3488.       if ((!a.kd) || (!a.Fb))
  3489.       {
  3490.         a.g = 35;
  3491.       }
  3492.       else if (a.g > 47)
  3493.       {
  3494.         a.g = 47;
  3495.       }
  3496.     if
  3497.  
  3498. ((!a.nA) && (a.g < 18))
  3499.     {
  3500.       a.td = a.g;
  3501.     }
  3502.   }
  3503.  
  3504.   private boolean rb()
  3505.   {
  3506.     a.uA();
  3507.  
  3508.     Object localObject1 = null;
  3509.  
  3510.     if ((a.FA != null) && (a.r != null) && (!
  3511.  
  3512. a.FA.equals(a.r)))
  3513.     {
  3514.       if (a.Zc())
  3515.       {
  3516.         return false;
  3517.       }
  3518.       if (a.nb != null) if (a.nb.contains(new RSTile[] { a.X() }))
  3519.         {
  3520.           a.l
  3521.  
  3522. (a.nb);
  3523.  
  3524.           a.FF = true;
  3525.  
  3526.           return false;
  3527.         }
  3528.       if (a.nD != null) if ((a.FA.contains(new RSTile[] { a.nD })) && ((a.Fg) || (a.AB.contains("dead
  3529.  
  3530. end")))) {
  3531.           return false;
  3532.         }
  3533.  
  3534.  
  3535.       if ((a.Qc.contains("Teleporting")) && (a.jb != null)) if (a.jb.contains(new RSTile[] { a.X() }))
  3536.           return false;
  3537.  
  3538.  
  3539.      if (a.nD != null) if (a.FA.contains(new RSTile[] { a.nD }))
  3540.         {
  3541.           localObject1 = a.nD; break label373;
  3542.         }
  3543.       for (Object localObject2 =
  3544.  
  3545. a.fA.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject2).next();
  3546.  
  3547.         if ((a.FA.contains(new RSTile[] { localRSTile
  3548.  
  3549. })) && (a.calc.distanceBetween(localRSTile, a.r.getNearestTile(localRSTile)) < 2.0D))
  3550.         {
  3551.           localObject1 = localRSTile;
  3552.  
  3553.           break;
  3554.         }
  3555.       }
  3556.      
  3557.  
  3558.  RSTile localRSTile;
  3559.       if (localObject1 == null)
  3560.       {
  3561.         for (localObject2 = a.fc.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile = (RSTile)
  3562.  
  3563. ((Iterator)localObject2).next();
  3564.  
  3565.           if ((a.FA.contains(new RSTile[] { localRSTile })) && (a.calc.distanceBetween(localRSTile, a.r.getNearestTile(localRSTile)) <
  3566.  
  3567. 2.0D))
  3568.           {
  3569.             localObject1 = localRSTile;
  3570.  
  3571.             break;
  3572.           }
  3573.  
  3574.         }
  3575.  
  3576.       }
  3577.  
  3578.       label373: if (localObject1 == null)
  3579.       {
  3580.         return
  3581.  
  3582. false;
  3583.       }
  3584.       a.log("Correcting an accidental backtrack");
  3585.  
  3586.       if (a.AB.contains("monsters"))
  3587.       {
  3588.         a.Ic();
  3589.       }
  3590.       if (localObject1 != null)
  3591.       {
  3592.  
  3593.  
  3594.       if (a.Zc()) {
  3595.           return true;
  3596.         }
  3597.  
  3598.         localObject2 = a.G((RSTile)localObject1);
  3599.  
  3600.         if (a.l((RSObject)localObject2))
  3601.         {
  3602.           a.K
  3603.  
  3604. (true);
  3605.         }
  3606.         a.sleep(400, 600);
  3607.  
  3608.         a.uA();
  3609.       }
  3610.  
  3611.     }
  3612.  
  3613.     return false;
  3614.   }
  3615.  
  3616.   private void D(RSNPC a)
  3617.   {
  3618.     if (a != null)
  3619.     {
  3620.       String str =
  3621.  
  3622. a.getName();
  3623.  
  3624.       if ((a.bC != -1) && (a.l(str, a.kD)))
  3625.       {
  3626.         a.PD = a.bC;
  3627.       }
  3628.       else if ((a.xb != -1) && (a.l(str, a.Cc)))
  3629.       {
  3630.         a.PD = a.xb;
  3631.    
  3632.  
  3633.   }
  3634.       else if ((a.Gd != -1) && (a.l(str, a.Y)))
  3635.       {
  3636.         a.PD = a.Gd;
  3637.       }
  3638.       else
  3639.         a.PD = -1;
  3640.     }
  3641.   }
  3642.  
  3643.   private boolean Ic()
  3644.   {
  3645.     String str = a.AB;
  3646.  
  3647.  
  3648.  
  3649.    a.AB = "Om nom nom!";
  3650.  
  3651.     if (!a.AB.equals(str))
  3652.     {
  3653.       a.AB = str;
  3654.  
  3655.       return true;
  3656.     }
  3657.  
  3658.     return false;
  3659.   }
  3660.  
  3661.   private void Qd()
  3662.   {
  3663.     RSNPC localRSNPC1 = a.i
  3664.  
  3665. (new String[] { "Rammernaut" });
  3666.  
  3667.     RSNPC localRSNPC2 = a.i(new String[] { "Stomp" });
  3668.  
  3669.     RSNPC localRSNPC3 = a.i(new String[] { "Riftsplitter" });
  3670.  
  3671.     RSNPC
  3672.  
  3673. localRSNPC4 = a.i(new String[] { "Lexicus" });
  3674.  
  3675.     RSNPC localRSNPC5 = a.i(new String[] { "Khighorahk" });
  3676.  
  3677.     a.l(a.UC, 50, 60);
  3678.     Object localObject1;
  3679.     int i2;
  3680.    
  3681.  
  3682. int i5;
  3683.     int i6;
  3684.     Object localObject7;
  3685.     Object localObject8;
  3686.     int i4;
  3687.     if ((a.tc.equals("Rammernaut")) || (localRSNPC1 != null))
  3688.     {
  3689.       localObject1 =
  3690.  
  3691. null;
  3692.  
  3693.       i2 = 0;
  3694.  
  3695.       a.Qc = "Killing Rammernaut!";
  3696.  
  3697.       if (a.tc.isEmpty())
  3698.       {
  3699.         a.log(a.Qc);
  3700.  
  3701.         a.tc = "Rammernaut";
  3702.       }
  3703.       a.l(a.QC,
  3704.  
  3705. Combat.Prayer.PROTECT_FROM_MELEE, true);
  3706.  
  3707.       if ((!a.iD) || (!a.i(3)))
  3708.       {
  3709.         a.PD = a.bC;
  3710.       }
  3711.       if (a.jA())
  3712.       {
  3713.         return;
  3714.       }
  3715.       if
  3716.  
  3717. (localRSNPC1 != null)
  3718.       {
  3719.         if ((localRSNPC1.getMessage() != null) && (localObject1 != null) && (((String)localObject1).equals(localRSNPC1.getMessage())))
  3720.      
  3721.  
  3722.   {
  3723.           i2 = 0;
  3724.         }
  3725.         else
  3726.         {
  3727.           localObject1 = localRSNPC1.getMessage();
  3728.  
  3729.           i2 = 1;
  3730.         }
  3731.  
  3732.         if ((i2 != 0) && (localObject1 !=
  3733.  
  3734. null) && (((String)localObject1).contains("CHAA")))
  3735.         {
  3736.           a.AB = "Running for cover!";
  3737.           RSObject[] arrayOfRSObject1;
  3738.           i5 =
  3739.  
  3740. (arrayOfRSObject1 = a.J(new int[] { 51762 })).length; if ((i6 = 0) < i5)
  3741.           {
  3742.             if (
  3743.               (localObject7 = arrayOfRSObject1[i6]) != null)
  3744.          
  3745.  
  3746.    {
  3747.               localObject8 = ((RSObject)localObject7).getLocation();
  3748.  
  3749.               a.vE = ((RSTile)localObject8);
  3750.             }
  3751.             i6++;
  3752.           }
  3753.          
  3754.  
  3755. if (a.vE != null)
  3756.           {
  3757.             a.l(a.vE, 1);
  3758.  
  3759.             if ((i4 = 0) < 10)
  3760.             {
  3761.               if (!a.JC())
  3762.               {
  3763.                 a.sleep(400,
  3764.  
  3765. 600);
  3766.               }
  3767.  
  3768.               i4++;
  3769.             }
  3770.             if ((i4 = 0) < 20)
  3771.             {
  3772.               a.sleep(200, 300);
  3773.  
  3774.               if ((localRSNPC1 == null)
  3775.  
  3776. || (localRSNPC1.getMessage() == null))
  3777.               {
  3778.                 i4++;
  3779.               }
  3780.  
  3781.             }
  3782.  
  3783.           }
  3784.  
  3785.           a.AB = "";
  3786.         }
  3787.         else if
  3788.  
  3789. (localRSNPC1.getAnimation() == 13705)
  3790.         {
  3791.           a.JC();
  3792.         }
  3793.         else if ((a.calc.distanceTo(localRSNPC1) < 3) && (!a.Y().isInCombat()) && (!
  3794.  
  3795. localRSNPC1.isInCombat()))
  3796.         {
  3797.           a.A(a.FA.getCentralTile(), 3);
  3798.         }
  3799.         a.i(localRSNPC1);
  3800.  
  3801.         a.l(a.UC, 50, 0);
  3802.       }
  3803.  
  3804.       a.sleep(100, 200);
  3805.    
  3806.  
  3807.  }
  3808.     else
  3809.     {
  3810.       int[][] arrayOfInt1;
  3811.       RSTile localRSTile3;
  3812.       Object localObject9;
  3813.       Object localObject10;
  3814.       if ((a.tc.equals("Stomp")) ||
  3815.  
  3816. (localRSNPC2 != null))
  3817.       {
  3818.         localObject1 = new ArrayList();
  3819.  
  3820.         i2 = 0; i4 = 0; i5 = 0; i6 = a.random(12, 15);
  3821.  
  3822.         localObject7 = new int[] { 49278,
  3823.  
  3824. 49279 };
  3825.  
  3826.         localObject8 = new int[] { 49276, 49277 };
  3827.  
  3828.         int[] arrayOfInt = { 49274, 49275 };
  3829.  
  3830.         arrayOfInt1 = new int[][] { localObject7, localObject8,
  3831.  
  3832. arrayOfInt };
  3833.  
  3834.         a.Qc = "Killing Stomp!";
  3835.  
  3836.         if (a.tc.isEmpty())
  3837.         {
  3838.           a.log(a.Qc);
  3839.  
  3840.           a.tc = "Stomp";
  3841.         }
  3842.  
  3843.         a.l(a.QC, null,
  3844.  
  3845. false);
  3846.  
  3847.         a.PD = a.bC;
  3848.  
  3849.         localRSTile3 = a.tA(); localObject9 = localRSNPC2.getLocation();
  3850.  
  3851.         if (localRSTile3 != null)
  3852.         {
  3853.           if
  3854.  
  3855. (localRSTile3.getX() - ((RSTile)localObject9).getX() > 3) {
  3856.             i4 = 1;
  3857.           }
  3858.           else if (localRSTile3.getX() - ((RSTile)localObject9).getX() < -3)
  3859.    
  3860.  
  3861.          i4 = -1;
  3862.           if (localRSTile3.getY() - ((RSTile)localObject9).getY() > 3)
  3863.           {
  3864.             i5 = 1;
  3865.           }
  3866.           else if (localRSTile3.getY()
  3867.  
  3868. - ((RSTile)localObject9).getY() < -3)
  3869.           {
  3870.             i5 = -1;
  3871.           }
  3872.         }
  3873.         RSObject[] arrayOfRSObject2;
  3874.         int i12 = (arrayOfRSObject2 = a.A
  3875.  
  3876. (new String[] { "lodestone" })).length;
  3877.         int i13;
  3878.         RSObject localRSObject2 = arrayOfRSObject2[i13];
  3879.  
  3880.         ((ArrayList)localObject1).add(new RSTile
  3881.  
  3882. (localRSObject2.getLocation().getX() + i4, localRSObject2.getLocation().getY() + i5));
  3883.  
  3884.         i13++;
  3885.  
  3886.         if (a.jA()) {
  3887.           return;
  3888.         }
  3889.  
  3890.         if (a.i
  3891.  
  3892. (a.tb) != null)
  3893.         {
  3894.           int i11 = 1;
  3895.  
  3896.           i12 = 2;
  3897.  
  3898.           Timer localTimer = new Timer(a.random(14000, 16000));
  3899.  
  3900.           a.RD.clear();
  3901.  
  3902.           i6 =
  3903.  
  3904. a.random(13, 17);
  3905.  
  3906.           a.sleep(500, 1000);
  3907.  
  3908.           if (a.objects.getNearest(arrayOfInt1[i14]) != null)
  3909.           {
  3910.             i2 = 1 + i14;
  3911.           }
  3912.          
  3913.  
  3914. else {
  3915.             i14++;
  3916.           }
  3917.  
  3918.           if (i2 < 1) {
  3919.             i2 = 1;
  3920.           }
  3921.  
  3922.           int i14 = 15749 + i2;
  3923.  
  3924.           a.Qc = ("Killing Stomp (stage " + i2 +
  3925.  
  3926. " of 3)");
  3927.  
  3928.           a.SE = "";
  3929.  
  3930.           for (Iterator localIterator2 = ((ArrayList)localObject1).iterator(); localIterator2.hasNext(); ) { localObject11 = (RSTile)
  3931.  
  3932. localIterator2.next();
  3933.  
  3934.             if ((!a.X().equals(localObject11)) && (a.G((RSTile)localObject11) != null)) {
  3935.               i12--;
  3936.             }
  3937.             else if (!
  3938.  
  3939. a.l((RSTile)localObject11, false))
  3940.             {
  3941.               a.log("This lodestone may be unreachable");
  3942.             }
  3943.           }
  3944.           Object localObject11;
  3945.          
  3946.  
  3947.  while (a.i(a.tb) != null)
  3948.           {
  3949.             if (a.jA())
  3950.             {
  3951.               return;
  3952.             }
  3953.             int i15 = 2;
  3954.  
  3955.             a.MC = false;
  3956.  
  3957.            
  3958.  
  3959. if ((i12 == 2) && (
  3960.               (localObject11 = a.J(a.tb)) != null))
  3961.             {
  3962.               i15 = localObject11.length;
  3963.             }
  3964.             if
  3965.  
  3966. (a.inventory.getCount(new int[] { i14 }) < i15)
  3967.             {
  3968.               if ((localObject11 = a.groundItems.getNearest(a.lD)) != null)
  3969.               {
  3970.                
  3971.  
  3972. if ((i11 != 0) && (a.l((RSGroundItem)localObject11)))
  3973.                 {
  3974.                   a.K(false);
  3975.                 }
  3976.                 if (a.MC)
  3977.                 {
  3978.          
  3979.  
  3980.         a.RD.add(((RSGroundItem)localObject11).getLocation());
  3981.                 }
  3982.               }
  3983.               else
  3984.               {
  3985.                 if ((a.calc.distanceTo
  3986.  
  3987. (localRSNPC2) > 4) && (!a.Y().isMoving()))
  3988.                   a.A(localRSNPC2.getLocation(), 1);
  3989.                 else if ((!a.JC()) && (!a.SE.contains("currently
  3990.  
  3991. invulnerable")))
  3992.                 {
  3993.                   a.F(localRSNPC2, "Attack");
  3994.                 }
  3995.                 a.K(false);
  3996.               }
  3997.  
  3998.             }
  3999.             else
  4000.  
  4001. if ((i12 == 2) && (localTimer != null) && (localTimer.isRunning()))
  4002.             {
  4003.               for (localObject11 = ((ArrayList)localObject1).iterator(); ((Iterator)
  4004.  
  4005. localObject11).hasNext(); ) { RSTile localRSTile5 = (RSTile)((Iterator)localObject11).next();
  4006.  
  4007.                 if ((!a.X().equals(localRSTile5)) && (a.G(localRSTile5) !=
  4008.  
  4009. null))
  4010.                 {
  4011.                   localTimer = null;
  4012.  
  4013.                   break;
  4014.                 }
  4015.  
  4016.               }
  4017.  
  4018.               if (localTimer != null)
  4019.                
  4020.  
  4021. if (
  4022.                   (localObject11 = a.i(a.tb)) != null)
  4023.                 {
  4024.                   a.vE = ((RSObject)localObject11).getLocation();
  4025.  
  4026.                   if (a.l
  4027.  
  4028. ((RSObject)localObject11, "Charge"))
  4029.                   {
  4030.                     a.K(false);
  4031.  
  4032.                     if (a.MC)
  4033.                     {
  4034.                       i12--;
  4035.  
  4036.    
  4037.  
  4038.                   a.vE = null;
  4039.                     }
  4040.                     else
  4041.                     {
  4042.                       localTimer.reset();
  4043.                     }
  4044.          
  4045.  
  4046.         }
  4047.                 }
  4048.             }
  4049.             else if ((a.calc.distanceTo(localRSNPC2) > 4) && (!a.Y().isMoving()))
  4050.             {
  4051.               a.A
  4052.  
  4053. (localRSNPC2.getLocation(), 1);
  4054.  
  4055.               a.sleep(300, 600);
  4056.             }
  4057.             else if ((!a.JC()) && (!a.SE.contains("currently invulnerable")) && (a.F
  4058.  
  4059. (localRSNPC2, "Attack")))
  4060.             {
  4061.               a.K(true);
  4062.             }
  4063.  
  4064.           }
  4065.  
  4066.           a.vE = null;
  4067.  
  4068.           a.RD.clear();
  4069.         }
  4070.         else
  4071.         {
  4072.        
  4073.  
  4074.    RSTile localRSTile4;
  4075.           if ((localRSNPC2 != null) && (i2 == 3) && (localRSNPC2.getAnimation() == 13449))
  4076.           {
  4077.             for (localObject10 =
  4078.  
  4079. ((ArrayList)localObject1).iterator(); ((Iterator)localObject10).hasNext(); ) { localRSTile4 = (RSTile)((Iterator)localObject10).next();
  4080.  
  4081.               if
  4082.  
  4083. (a.calc.distanceTo(localRSTile4) > 2)
  4084.               {
  4085.                 a.A(localRSTile4, 1);
  4086.  
  4087.                 a.sleep(600, 900);
  4088.  
  4089.                 break;
  4090.               }
  4091.        
  4092.  
  4093.     }
  4094.           }
  4095.           else if (a.J(new int[] { 49268 }).length > i6)
  4096.           {
  4097.             a.SE = "";
  4098.  
  4099.             localObject10 = a.i(new int[] { 49268 });
  4100.  
  4101.          
  4102.  
  4103.   a.A(a.HC == 1);
  4104.  
  4105.             if (localObject10 != null)
  4106.             {
  4107.               localRSTile4 = ((RSObject)localObject10).getLocation();
  4108.  
  4109.               if ((!a.Y
  4110.  
  4111. ().isMoving()) && ((a.calc.distanceTo(localRSTile4) > 1) || (localRSNPC2.isInCombat())))
  4112.               {
  4113.                 a.A(localRSTile4, 1);
  4114.               }
  4115.  
  4116.            
  4117.  
  4118. }
  4119.  
  4120.           }
  4121.           else
  4122.           {
  4123.             a.l(a.UC, 50, 50);
  4124.  
  4125.             a.A(true);
  4126.  
  4127.             if (!a.SE.contains("currently invulnerable"))
  4128.             {
  4129.          
  4130.  
  4131.      a.i(localRSNPC2);
  4132.             }
  4133.             else
  4134.             {
  4135.               a.JC();
  4136.             }
  4137.  
  4138.           }
  4139.  
  4140.         }
  4141.  
  4142.         a.sleep(200, 300);
  4143.       }
  4144.       else
  4145.      
  4146.  
  4147. {
  4148.         Object localObject3;
  4149.         Object localObject5;
  4150.         Object localObject6;
  4151.         if ((a.tc.equals("Har'laak the Riftsplitter")) || (localRSNPC3 != null))
  4152.    
  4153.  
  4154.      {
  4155.           int i1 = 0;
  4156.  
  4157.           localObject3 = null;
  4158.  
  4159.           localObject5 = new ArrayList();
  4160.  
  4161.           localObject6 = new ArrayList();
  4162.  
  4163.           a.Qc = "Killing
  4164.  
  4165. the Riftsplitter!";
  4166.  
  4167.           if (a.tc.isEmpty())
  4168.           {
  4169.             a.log(a.Qc);
  4170.  
  4171.             a.tc = "Har'laak the Riftsplitter";
  4172.           }
  4173.           a.l(a.QC,
  4174.  
  4175. Combat.Prayer.PROTECT_FROM_MAGIC, true);
  4176.  
  4177.           a.PD = (a.bC != -1 ? a.bC : a.xb);
  4178.  
  4179.           if (a.jA()) {
  4180.             return;
  4181.           }
  4182.  
  4183.           if (localRSNPC3 !=
  4184.  
  4185. null)
  4186.           {
  4187.             if ((localRSNPC3.getMessage() != null) && (localObject3 != null) && (((String)localObject3).equals(localRSNPC3.getMessage())))
  4188.             {
  4189.  
  4190.  
  4191.              i1 = 0;
  4192.             }
  4193.             else
  4194.             {
  4195.               localObject3 = localRSNPC3.getMessage();
  4196.  
  4197.               i1 = 1;
  4198.             }
  4199.  
  4200.             if
  4201.  
  4202. ((localObject3 != null) && (i1 != 0))
  4203.             {
  4204.               a.AB = "Look out for that portal!";
  4205.  
  4206.               RSTile localRSTile1 = a.X();
  4207.               int i10;
  4208.      
  4209.  
  4210.          if (((ArrayList)localObject6).isEmpty())
  4211.               {
  4212.                 ((ArrayList)localObject5).clear();
  4213.  
  4214.                 ((ArrayList)localObject5).add(new
  4215.  
  4216. RSArea(new RSTile(localRSTile1.getX() - 1, localRSTile1.getY() - 1), new RSTile(localRSTile1.getX() + 1, localRSTile1.getY() + 1)));
  4217.  
  4218.                 int i9 =
  4219.  
  4220. (localObject7 = a.J(new int[] { 51866 })).length;
  4221.  
  4222.                 localRSTile3 = (arrayOfInt1 = localObject7[i10])
  4223.                   .getLocation();
  4224.  
  4225.                
  4226.  
  4227. localObject9 = ((ArrayList)localObject5).iterator();
  4228.                 while (true) if (((Iterator)localObject9).hasNext())
  4229.                   {
  4230.                     if (
  4231.      
  4232.  
  4233.                  (localObject10 = (RSArea)((Iterator)localObject9).next()).contains(new RSTile[] { localRSTile3 }))
  4234.                     {
  4235.                       break;
  4236.    
  4237.  
  4238.                 }
  4239.  
  4240.                     continue;
  4241.                   }
  4242.                   else
  4243.                   {
  4244.                     ((ArrayList)localObject6).add
  4245.  
  4246. (arrayOfInt1.getLocation());
  4247.                   }
  4248.  
  4249.  
  4250.                 i10++;
  4251.               }
  4252.               else
  4253.               {
  4254.                 ((ArrayList)localObject5).add(new
  4255.  
  4256. RSArea(new RSTile(localRSTile1.getX() - 1, localRSTile1.getY() - 1), new RSTile(localRSTile1.getX() + 1, localRSTile1.getY() + 1)));
  4257.               }
  4258.               int i8
  4259.  
  4260. = 20;
  4261.  
  4262.               if (a.vE == null)
  4263.               {
  4264.                 for (RSTile localRSTile2 : (ArrayList)localObject6) {
  4265.                   if ((a.calc.distanceTo
  4266.  
  4267. (localRSTile2) > 2) && (a.calc.distanceTo(localRSTile2) < i8))
  4268.                   {
  4269.                     a.vE = localRSTile2;
  4270.  
  4271.                     i8 = a.calc.distanceTo
  4272.  
  4273. (localRSTile2);
  4274.                   }
  4275.  
  4276.                 }
  4277.  
  4278.               }
  4279.  
  4280.               if (a.vE != null)
  4281.               {
  4282.                 ((ArrayList)localObject6).remove(a.vE);
  4283.  
  4284.  
  4285.  
  4286.                a.i(a.vE, 0);
  4287.  
  4288.                 a.JC();
  4289.                 do
  4290.                 {
  4291.                   a.A(a.vE, 0);
  4292.                 }
  4293.                 while (a.JC());
  4294.  
  4295.    
  4296.  
  4297.              a.sleep(300, 400);
  4298.  
  4299.                 a.vE = null;
  4300.               }
  4301.               a.AB = "";
  4302.             }
  4303.             else
  4304.             {
  4305.               a.i
  4306.  
  4307. (localRSNPC3);
  4308.  
  4309.               a.l(a.lG, 50, 0);
  4310.  
  4311.               if ((a.calc.distanceTo(localRSNPC3) < 3) && (!a.Y().isInCombat()) && (!localRSNPC3.isInCombat()))
  4312.            
  4313.  
  4314.   {
  4315.                 a.l(a.FA.getCentralTile(), 1);
  4316.               }
  4317.             }
  4318.           }
  4319.           a.sleep(100, 200);
  4320.         }
  4321.         else
  4322.         {
  4323.           Object
  4324.  
  4325. localObject2;
  4326.           if ((a.tc.equals("Lexicus Runewright")) || (localRSNPC4 != null))
  4327.           {
  4328.             localObject2 = "";
  4329.  
  4330.             a.Qc = "Killing Lexicus
  4331.  
  4332. Runewright!";
  4333.  
  4334.             if (a.tc.isEmpty())
  4335.             {
  4336.               a.log(a.Qc);
  4337.  
  4338.               a.tc = "Lexicus Runewright";
  4339.             }
  4340.  
  4341.             a.l(false,
  4342.  
  4343. Combat.Prayer.PROTECT_FROM_MAGIC, true);
  4344.  
  4345.             if (a.Sd)
  4346.             {
  4347.               a.i(2);
  4348.             }
  4349.             else
  4350.               a.PD = a.xb;
  4351.             if
  4352.  
  4353. (a.jA())
  4354.             {
  4355.               return;
  4356.             }
  4357.             if (localRSNPC4 != null)
  4358.               if ((
  4359.                 (localObject2 = localRSNPC4.getMessage())
  4360.  
  4361. != null) && (((String)localObject2).contains("barrage")))
  4362.               {
  4363.                 if ((localObject3 = a.objects.getNearest(a.dA)) != null)
  4364.                 {
  4365.        
  4366.  
  4367.            a.vE = ((RSObject)localObject3).getLocation();
  4368.  
  4369.                   a.l(a.vE, 1);
  4370.  
  4371.                   if (!a.l(a.vc, 80, 80))
  4372.                   {
  4373.                    
  4374.  
  4375. a.sleep(500, 700);
  4376.                   }
  4377.                   a.sleep(600, 800);
  4378.  
  4379.                   a.F(localRSNPC4, "Attack");
  4380.  
  4381.                   a.vE = null;
  4382.                 }
  4383.    
  4384.  
  4385.              a.AB = "";
  4386.               }
  4387.               else if (a.i(new String[] { "Tome" }) != null)
  4388.               {
  4389.                 if (a.F(a.i(new String[] { "Tome" })))
  4390.  
  4391.  
  4392.                {
  4393.                   a.K(false);
  4394.  
  4395.                   a.l(a.UC, 40, 0);
  4396.                 }
  4397.                 else
  4398.                 {
  4399.                   a.sleep(300,
  4400.  
  4401. 500);
  4402.                 }
  4403.               }
  4404.               else
  4405.               {
  4406.                 int i3;
  4407.                 for (; (i3 = 0) < 15; tmpTernaryOp = 15) { if (a.AA())
  4408.      
  4409.  
  4410.                break;
  4411.                   if (a.i(new String[] { "Tome" }) != null)
  4412.                   {
  4413.                     break;
  4414.                   }
  4415.  
  4416.                   a.JC
  4417.  
  4418. ();
  4419.  
  4420.                   a.sleep(100, 200);
  4421.  
  4422.                   i3++;
  4423.                 }
  4424.                 (localRSNPC4.getAnimation() == 13499 ?
  4425.                   i3 : a.i
  4426.  
  4427. (localRSNPC4));
  4428.               }
  4429.             a.l(a.lG, 40, 0);
  4430.  
  4431.             a.sleep(100, 200);
  4432.           }
  4433.           else
  4434.           {
  4435.             if (!a.tc.equals("Sagittare"))
  4436.  
  4437.  
  4438.            {
  4439.               if (a.i(new int[] { 51887 }) == null);
  4440.             }
  4441.             else
  4442.             {
  4443.               a.Qc = "Killing Sagittare!";
  4444.  
  4445.               if
  4446.  
  4447. (a.tc.isEmpty())
  4448.               {
  4449.                 a.log(a.Qc);
  4450.  
  4451.                 a.tc = "Sagittare";
  4452.               }
  4453.  
  4454.               if (a.HC == 2)
  4455.               {
  4456.                
  4457.  
  4458. a.log("Swapping attack style for Sagittare!");
  4459.  
  4460.                 if (a.kC)
  4461.                 {
  4462.                   a.i(1);
  4463.                 }
  4464.                 else if (a.iD)
  4465.        
  4466.  
  4467.         {
  4468.                   a.i(3);
  4469.                 }
  4470.                 else
  4471.                 {
  4472.                   a.log.severe("We don't have a way to kill Sagittare, aborting
  4473.  
  4474. dungeon!");
  4475.  
  4476.                   a.nc = true;
  4477.  
  4478.                   return;
  4479.                 }
  4480.  
  4481.               }
  4482.  
  4483.               a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  4484.  
  4485.      
  4486.  
  4487.         a.PD = a.xb;
  4488.  
  4489.               while (a.objects.getNearest(a.gb) == null)
  4490.               {
  4491.                 if (a.jA())
  4492.                 {
  4493.                   return;
  4494.        
  4495.  
  4496.         }
  4497.  
  4498.                 if ((localObject2 = a.i(new String[] { "Sagittare" })) != null)
  4499.                 {
  4500.                   if ((a.SE.contains("stops you")) ||
  4501.  
  4502. (a.SE.contains("bound")))
  4503.                   {
  4504.                     a.JC();
  4505.                   }
  4506.                   Object localObject4;
  4507.                   if ((((RSNPC)
  4508.  
  4509. localObject2).getAnimation() == 13270) || (((RSNPC)localObject2).getMessage() != null))
  4510.                   {
  4511.                     if (a.calc.distanceTo
  4512.  
  4513. (a.FA.getCentralTile()) > 2)
  4514.                     {
  4515.                       a.vE = a.FA.getCentralTile();
  4516.                     }
  4517.                     else
  4518.                     {
  4519.  
  4520.  
  4521.                     localObject4 = a.objects.getNearest(new int[] { 50352 });
  4522.  
  4523.                       a.vE = (localObject4 != null ? ((RSObject)localObject4).getLocation
  4524.  
  4525. () : ((RSNPC)localObject2).getLocation());
  4526.                     }
  4527.  
  4528.                     a.l(a.vE, 1);
  4529.  
  4530.                     a.sleep(3000, 5000);
  4531.  
  4532.                     a.vE =
  4533.  
  4534. null;
  4535.                   }
  4536.                   else if ((a.HC != 3) && (a.calc.distanceTo((RSCharacter)localObject2) > 1))
  4537.                   {
  4538.                     if (a.Y
  4539.  
  4540. ().isMoving()) {
  4541.                       a.JC();
  4542.                     }
  4543.                     else
  4544.                     {
  4545.                       a.l(((RSNPC)
  4546.  
  4547. localObject2).getLocation(), 1);
  4548.                     }
  4549.                     if (((localObject4 = a.walking.getDestination()) != null) &&
  4550.                      
  4551.  
  4552. (a.calc.distanceBetween((RSTile)localObject4, ((RSNPC)localObject2).getLocation()) > 1.0D))
  4553.                     {
  4554.                       a.l(((RSNPC)
  4555.  
  4556. localObject2).getLocation(), 0);
  4557.  
  4558.                       a.l(false);
  4559.                     }
  4560.                   }
  4561.                   a.l(a.UC, 50, 50);
  4562.  
  4563.                   a.i
  4564.  
  4565. ((RSNPC)localObject2);
  4566.                 }
  4567.                 a.sleep(100, 200);
  4568.               }
  4569.  
  4570.             }
  4571.  
  4572.             if ((a.tc.equals("Night-gazer Khighorahk")) ||
  4573.  
  4574. (localRSNPC5 != null))
  4575.             {
  4576.               localObject2 = new int[] { 13426, 13427, 13428, 13429 };
  4577.  
  4578.               a.Qc = "Killing Night-gazer Khighorahk!";
  4579.  
  4580.        
  4581.  
  4582.       if (a.tc.isEmpty())
  4583.               {
  4584.                 a.log(a.Qc);
  4585.  
  4586.                 a.tc = "Night-gazer Khighorahk";
  4587.               }
  4588.               a.l(false,
  4589.  
  4590. Combat.Prayer.PROTECT_FROM_MAGIC, true);
  4591.  
  4592.               a.PD = (a.bC != -1 ? a.bC : a.xb);
  4593.  
  4594.               if (a.jA())
  4595.               {
  4596.                 return;
  4597.               }
  4598.  
  4599.  
  4600.             if ((localRSNPC5 = a.i(new String[] { "Khighorahk" })) != null)
  4601.               {
  4602.                 boolean bool = a.l(localRSNPC5.getAnimation(), localObject2);
  4603.  
  4604.  
  4605.  
  4606.                localObject5 = localRSNPC5.getLocation();
  4607.  
  4608.                 if ((bool) && (a.calc.distanceTo((RSTile)localObject5) < 6))
  4609.                 {
  4610.                  
  4611.  
  4612. if ((localObject6 = a.objects.getNearest(new bb(a, (RSTile)localObject5))) != null)
  4613.                   {
  4614.                     a.vE = ((RSObject)localObject6).getLocation
  4615.  
  4616. ();
  4617.  
  4618.                     a.l(a.vE, 1);
  4619.  
  4620.                     a.l(false);
  4621.                     int i7;
  4622.                     if ((i7 = 0) < 7)
  4623.                     {
  4624.                
  4625.  
  4626.       if (!a.AA())
  4627.                       {
  4628.                         RSObject localRSObject1;
  4629.                         if ((
  4630.                           (localRSObject1 = a.i
  4631.  
  4632. (new int[] { 49265 })) != null) && (a.calc.distanceTo(localRSObject1) < 4))
  4633.                         {
  4634.                           if (a.l(localRSObject1, "Light"))
  4635.          
  4636.  
  4637.                  {
  4638.                             a.sleep(800, 1100);
  4639.  
  4640.                             if ((a.Y().getAnimation() == 13355) && (a.Y().getAnimation() == 13354))
  4641.    
  4642.  
  4643.                           break label4150;
  4644.                             a.l(localRSObject1, "Light"); break label4150;
  4645.                           }
  4646.  
  4647.                        
  4648.  
  4649. }
  4650.                         else if (a.Y().getAnimation() == 10070)
  4651.                         {
  4652.                           a.log("Damn.. Got knocked by his special");
  4653.  
  4654.          
  4655.  
  4656.                 a.l(a.UC, 50, 40);
  4657.  
  4658.                           break label4150;
  4659.                         }
  4660.                         if (a.walking.isRunEnabled())
  4661.              
  4662.  
  4663.           {
  4664.                           a.sleep(200, 300);
  4665.                         }
  4666.                         else
  4667.                           if ((a.calc.distanceTo(a.vE) < 2)
  4668.  
  4669. || (a.calc.distanceTo(localRSNPC5.getLocation()) > 8))
  4670.                             break label4150;
  4671.                         if ((a.calc.distanceTo(a.vE) < 3) &&
  4672.  
  4673. (localRSNPC5.getAnimation() != 13429))
  4674.                         {
  4675.                           a.sleep(400, 600);
  4676.                         }
  4677.                         else
  4678.        
  4679.  
  4680.                 {
  4681.                           a.sleep(200, 250);
  4682.  
  4683.                           i7++;
  4684.                         }
  4685.                       }
  4686.                     }
  4687.        
  4688.  
  4689.              label4150: a.x();
  4690.  
  4691.                     a.sleep(500, 800);
  4692.  
  4693.                     i7++;
  4694.  
  4695.                     a.vE = null;
  4696.                   }
  4697.  
  4698.                 }
  4699.        
  4700.  
  4701.          else if ((
  4702.                   (localObject6 = a.J(new int[] { 49266, 49267 })) != null) && (localObject6.length < 2))
  4703.                 {
  4704.                   if (a.l
  4705.  
  4706. (a.objects.getNearest(new int[] { 49265 }), "Light"))
  4707.                     a.sleep(800, 1200);
  4708.                 }
  4709.                 else if (a.MC)
  4710.                 {
  4711.            
  4712.  
  4713.       a.JC();
  4714.                 }
  4715.                 else
  4716.                 {
  4717.                   a.l(a.UC, 50, 0);
  4718.  
  4719.                   a.i(localRSNPC5);
  4720.                 }
  4721.  
  4722.              
  4723.  
  4724. }
  4725.  
  4726.               a.sleep(100, 200);
  4727.             }
  4728.             else
  4729.             {
  4730.               a.Qc = "Killing an unknown boss...";
  4731.  
  4732.               a.log(a.Qc);
  4733.  
  4734.              
  4735.  
  4736. a.l(a.QC, null, false);
  4737.  
  4738.               if (!a.h())
  4739.               {
  4740.                 return;
  4741.               }
  4742.             }
  4743.           }
  4744.         }
  4745.       }
  4746.     }
  4747.     a.Ke = true;
  4748.   }
  4749.  
  4750.  
  4751.  
  4752. private boolean F(RSTile a, boolean a)
  4753.   {
  4754.     return (a.l(a, a)) || (!a.l(a.X(), a, a, new int[0]).isEmpty());
  4755.   }
  4756.  
  4757.   private boolean AD()
  4758.   {
  4759.     a.Qc = "Opening a skill
  4760.  
  4761. door";
  4762.  
  4763.     if (a.ZA != null);
  4764.     if (a.jA())
  4765.     {
  4766.       return false;
  4767.     }
  4768.  
  4769.     a.uA();
  4770.  
  4771.     if ((a.nD != null) && (a.FA != null)) if (a.FA.contains(new RSTile[] { a.nD }))
  4772.  
  4773.  
  4774.     {
  4775.         RSObject localRSObject = a.G(a.nD);
  4776.  
  4777.         if (a.l(localRSObject))
  4778.         {
  4779.           a.K(true);
  4780.  
  4781.           if ((a.ZA == null) && (a.Rc()) && ((a.l
  4782.  
  4783. (localRSObject.getID(), a.Yf)) || (a.l(localRSObject.getID(), a.tD))))
  4784.             a.l(a.vc, 70, 40);
  4785.           if (a.i(true)) {
  4786.             return true;
  4787.           }
  4788.  
  4789.        
  4790.  
  4791.  }
  4792.         else if (localRSObject != null)
  4793.         {
  4794.           a.sleep(100, 200);
  4795.         }
  4796.         if (!a.iD())
  4797.         {
  4798.           return true;
  4799.         }
  4800.       }
  4801.     a.sleep
  4802.  
  4803. (200, 400);
  4804.  
  4805.     a.QA = a.nD;
  4806.  
  4807.     return true;
  4808.   }
  4809.  
  4810.   private int Lb()
  4811.   {
  4812.     if (a.jA())
  4813.       return 2;
  4814.     a.jA = a.D(a.xC);
  4815.  
  4816.     if ((a.jA != null) && (!a.l(a.jA)))
  4817.     {
  4818.      
  4819.  
  4820. if ((a.HC == 1) && (a.calc.distanceTo(a.jA) > 4))
  4821.       {
  4822.         a.l(a.jA.getLocation(), 1);
  4823.       }
  4824.       else
  4825.       {
  4826.         a.F(a.jA);
  4827.       }
  4828.       a.sleep(800, 1300);
  4829.    
  4830.  
  4831.  }
  4832.  
  4833.     a.l(a.UC, 40, 50);
  4834.  
  4835.     a.sleep(100, 150);
  4836.  
  4837.     a.jA = null;
  4838.  
  4839.     return 1;
  4840.   }
  4841.  
  4842.   private boolean qb()
  4843.   {
  4844.     int i2;
  4845.     if ((a.kd) && (a.nb == null) && (!a.ud.equals
  4846.  
  4847. ("Frozen"))) if ((a.jb.contains(new RSTile[] { a.X() })) && (!a.inventory.contains(17566)))
  4848.       {
  4849.         int i1;
  4850.         i2 =
  4851.           (i1 = a.inventory.getCount
  4852.  
  4853. (true, new int[] { 18201 })) < 400 ? i1 / 200 : 2;
  4854.  
  4855.         if ((a.inventory.getCount() < 20) && (i2 > 0))
  4856.         {
  4857.           a.l(false, i2, -1);
  4858.         }
  4859.       }
  4860.     a.nD
  4861.  
  4862. = null;
  4863.  
  4864.     a.WA = null;
  4865.  
  4866.     a.ZA = null;
  4867.  
  4868.     a.Bd.removeAll(a.fG);
  4869.  
  4870.     a.Bd.removeAll(a.fc);
  4871.  
  4872.     a.J.removeAll(a.fG);
  4873.  
  4874.     a.J.removeAll(a.fc);
  4875.  
  4876.     a.J.removeAll(a.w);
  4877.  
  4878.    
  4879.  
  4880. a.w.removeAll(a.fG);
  4881.  
  4882.     RSTile localRSTile1 = a.tA();
  4883.     RSArea localRSArea;
  4884.     Iterator localIterator2;
  4885.     if (((localRSArea = (RSArea)a.aE.get(i2)) != null) &&
  4886.      
  4887.  
  4888. (!a.ic.contains(localRSArea)) && (!a.l(localRSArea, a.Bd)) && (!a.l(localRSArea, a.J)) && (!a.l(localRSArea, a.w)))
  4889.     {
  4890.       a.ic.add(localRSArea);
  4891.  
  4892.       for
  4893.  
  4894. (localIterator2 = a.fA.iterator(); localIterator2.hasNext(); )
  4895.       {
  4896.         RSTile localRSTile3;
  4897.         if ((
  4898.           (localRSTile3 = (RSTile)localIterator2.next())
  4899.  
  4900. != null) && (a.calc.distanceBetween(localRSTile3, localRSArea.getNearestTile(localRSTile3)) < 4.0D))
  4901.         {
  4902.           a.fG.add(localRSTile3);
  4903.         }
  4904.       }
  4905.     }
  4906.    
  4907.  
  4908. i2--;
  4909.  
  4910.     a.aE.removeAll(a.ic);
  4911.  
  4912.     a.w.removeAll(a.fG);
  4913.  
  4914.     a.Bd.removeAll(a.fG);
  4915.  
  4916.     a.Bd.removeAll(a.fc);
  4917.  
  4918.     a.J.removeAll(a.fG);
  4919.  
  4920.     a.J.removeAll(a.fc);
  4921.  
  4922.    
  4923.  
  4924. a.J.removeAll(a.w);
  4925.  
  4926.     if ((a.cD.contains(a.r)) && ((localRSTile1 == null) || (a.calc.distanceTo(localRSTile1) > 3)))
  4927.     {
  4928.       a.lA();
  4929.  
  4930.       if ((a.nD == null) ||
  4931.  
  4932. (a.calc.distanceTo(a.nD) > 4))
  4933.       {
  4934.         a.log("Can't reach the back door, teleporting back");
  4935.  
  4936.         a.G(true);
  4937.  
  4938.         a.l(a.jb);
  4939.  
  4940.         return true;
  4941.       }
  4942.  
  4943.     }
  4944.  
  4945.  
  4946.  
  4947.   a.vA();
  4948.  
  4949.     a.uA();
  4950.  
  4951.     if (a.FA != null)
  4952.     {
  4953.       a.SE = "";
  4954.  
  4955.       a.Sg = a.FA;
  4956.  
  4957.       if ((a.Zc > 4) && (!a.inventory.contains(18829)) && (a.Rd == 1) && (a.Nc.size() >
  4958.  
  4959. 1))
  4960.       {
  4961.         a.Qc = "Teleporting back to where we died";
  4962.  
  4963.         i2 = 0;
  4964.  
  4965.         a.uA();
  4966.  
  4967.         if (a.groundItems.getNearest(new int[] { 18829 }) != null);
  4968.        
  4969.  
  4970. if (a.jA()) {
  4971.           return false;
  4972.         }
  4973.  
  4974.         if (a.SE.contains("destination"))
  4975.         {
  4976.           i2 = 1;
  4977.         }
  4978.         else
  4979.         {
  4980.           if (!
  4981.  
  4982. a.jb.contains(new RSTile[] { a.X() }))
  4983.           {
  4984.             a.rb();
  4985.           }
  4986.           else if (a.fA()) {
  4987.             a.K(false);
  4988.           }
  4989.  
  4990.           a.sleep(300,
  4991.  
  4992. 400);
  4993.  
  4994.           a.uA();
  4995.         }
  4996.         if (i2 == 0)
  4997.         {
  4998.           a.l(a.QB != null ? a.QB : a.FA);
  4999.  
  5000.           a.QB = null;
  5001.  
  5002.           if (!a.r.equals(a.jb))
  5003.           {
  5004.  
  5005.  
  5006.            a.qA.clear();
  5007.             int i4;
  5008.             if ((a.l.contains(a.r)) || ((a.nb != null) && ((a.tc.equals("Sagittare")) || (a.tc.equals("Stomp")))))
  5009.            
  5010.  
  5011.  {
  5012.               a.l(a.groundItems.getNearest(new int[] { 18829 }));
  5013.  
  5014.               a.sleep(300, 600);
  5015.  
  5016.               i4++;
  5017.             }
  5018.  
  5019.             a.hB = true;
  5020.  
  5021.            
  5022.  
  5023. return true;
  5024.           }
  5025.         }
  5026.       }
  5027.       Iterator localIterator1;
  5028.       if ((a.nb != null) && (!a.ig.isEmpty()))
  5029.       {
  5030.         for (localIterator1 = a.ig.iterator
  5031.  
  5032. (); localIterator1.hasNext(); ) { localRSTile2 = (RSTile)localIterator1.next();
  5033.  
  5034.           if (a.FA.contains(new RSTile[] { localRSTile2 }))
  5035.           {
  5036.             a.nD =
  5037.  
  5038. localRSTile2;
  5039.  
  5040.             a.Qc = "Opening a door back to the Boss";
  5041.  
  5042.             return a.N();
  5043.           }
  5044.         }
  5045.       }
  5046.       RSTile localRSTile2;
  5047.       if ((a.QB !=
  5048.  
  5049. null) && (!a.qA.isEmpty()))
  5050.       {
  5051.         if (!a.FA.equals(a.QB))
  5052.         {
  5053.           for (localIterator1 = a.qA.iterator(); localIterator1.hasNext(); ) { localRSTile2 =
  5054.  
  5055. (RSTile)localIterator1.next();
  5056.  
  5057.             if (a.FA.contains(new RSTile[] { localRSTile2 }))
  5058.             {
  5059.               a.nD = localRSTile2;
  5060.  
  5061.               a.Qc = "Opening
  5062.  
  5063. a door back to where we died";
  5064.  
  5065.               return a.N();
  5066.             }
  5067.  
  5068.           }
  5069.  
  5070.         }
  5071.  
  5072.         a.qA.clear();
  5073.       }
  5074.  
  5075.       int i3 = a.lA();
  5076.  
  5077.       if (a.nD != null)
  5078.      
  5079.  
  5080.  {
  5081.         a.lc = new Timer(0L);
  5082.  
  5083.         a.A(a.WA != null ? a.WA : a.nD);
  5084.  
  5085.         if (a.M) {
  5086.           a.l(a.X(), a.WA != null ? a.WA : a.nD, true, new int[0]);
  5087.         }
  5088.  
  5089.    
  5090.  
  5091.      a.SE = "";
  5092.  
  5093.         switch (i3)
  5094.         {
  5095.         case 1:
  5096.           return a.zA();
  5097.         case 2:
  5098.           return a.UA();
  5099.         case 3:
  5100.           return a.u();
  5101.        
  5102.  
  5103. case 4:
  5104.           return a.AD();
  5105.         case 5:
  5106.           while (0 != 0);
  5107.           return a.N();
  5108.         }
  5109.       }
  5110.     }
  5111.     return false;
  5112.   }
  5113.  
  5114.   private boolean D(boolean a)
  5115.  
  5116.  
  5117. {
  5118.     if (!a.inventory.isFull())
  5119.       return true;
  5120.     if ((a.combat.getHealth() < 95) && (a.inventory.containsOneOf(a.vc)))
  5121.     {
  5122.       if (!a.l(a.W, 95, 50)) {
  5123.        
  5124.  
  5125. a.l(a.vc, 95, 50);
  5126.       }
  5127.  
  5128.     }
  5129.     else if (!a.S()) {
  5130.       if ((a) && (a.inventory.getCount() > a.inventory.getCount(a.l(a.EB))))
  5131.       {
  5132.         a.F(a.X(), 2);
  5133.  
  5134.        
  5135.  
  5136. a.MA();
  5137.       }
  5138.       else
  5139.       {
  5140.         a.l(a.vc, 101, 30);
  5141.       }
  5142.  
  5143.     }
  5144.  
  5145.     return !a.inventory.isFull();
  5146.   }
  5147.  
  5148.   private boolean l(RSComponent a, String a)
  5149.   {
  5150.     if (!
  5151.  
  5152. a.isValid())
  5153.     {
  5154.       return false;
  5155.     }
  5156.     Rectangle localRectangle;
  5157.     if ((localRectangle = a.getArea()).x ==
  5158.       -1)
  5159.       return false;
  5160.     int i1 =
  5161.  
  5162. localRectangle.x + 2; int i2 = localRectangle.y + 2; int i3 = localRectangle.width - 4; int i4 = localRectangle.height - 4;
  5163.  
  5164.     if ((
  5165.       new Rectangle(i1, i2, i3,
  5166.  
  5167. i4).contains(a.mouse.getLocation())) && (a.menu.contains(a)))
  5168.     {
  5169.       a.mouse.click(true);
  5170.  
  5171.       return true;
  5172.     }
  5173.  
  5174.     a.mouse.click(a.random(i1, i1 + i3), a.random
  5175.  
  5176. (i2, i2 + i4), true);
  5177.  
  5178.     return true;
  5179.   }
  5180.  
  5181.   private boolean Zc()
  5182.   {
  5183.     a.V();
  5184.  
  5185.     if (!a.Od) {
  5186.       return true;
  5187.     }
  5188.  
  5189.     if (a.hd != null)
  5190.     {
  5191.       if (!a.hd.isRunning
  5192.  
  5193. ())
  5194.       {
  5195.         return true;
  5196.       }
  5197.  
  5198.     }
  5199.     else if (!a.hA.isRunning())
  5200.       return true;
  5201.     return (!a.game.isLoggedIn()) || (a.AA()) || (!a.M());
  5202.   }
  5203.  
  5204.   private
  5205.  
  5206. boolean J(RSNPC a)
  5207.   {
  5208.     if ((a != null) && (a.isValid()) && ((a.isInCombat()) || (a.l(a))))
  5209.     {
  5210.       return !a.A(a);
  5211.     }
  5212.     return false;
  5213.   }
  5214.  
  5215.   private boolean DD()
  5216.  
  5217.  
  5218. {
  5219.     if ((a.jA()) || (a.l(a.FA, a.J)))
  5220.     {
  5221.       return false;
  5222.     }
  5223.     if (a.lA.contains(a.r))
  5224.     {
  5225.       a.log("Can't backtrack from this room, killing off enemies");
  5226.  
  5227.  
  5228.  
  5229.     if ((!a.QB()) || (!a.ZA())) {
  5230.         return false;
  5231.       }
  5232.  
  5233.     }
  5234.     else
  5235.     {
  5236.       a.log("We need to backtrack further before teleporting home");
  5237.  
  5238.       a.K();
  5239.     }
  5240.    
  5241.  
  5242. a.uA();
  5243.  
  5244.     a.uA();
  5245.  
  5246.     return true;
  5247.   }
  5248.  
  5249.   private int rd()
  5250.   {
  5251.     if (!a.UA)
  5252.     {
  5253.       a.uC = "Unknown layout";
  5254.  
  5255.       return -1;
  5256.     }
  5257.  
  5258.     a.A(a.X(), 10);
  5259.  
  5260.     a.sleep(30000,
  5261.  
  5262. 150000);
  5263.  
  5264.     int[] arrayOfInt1 = { 50687, 52075 };
  5265.  
  5266.     int[] arrayOfInt2 = { 52982, 51786 };
  5267.  
  5268.     RSObject localRSObject1 = a.i(new int[] { 49656, 49657, 49658, 54308 });
  5269.  
  5270.  
  5271.  
  5272.   RSObject localRSObject2 = a.J(new String[] { "Spinning blades" });
  5273.  
  5274.     RSObject localRSObject3 = a.J(new String[] { "Pendulum" });
  5275.  
  5276.     RSTile localRSTile1 = a.i(new
  5277.  
  5278. int[] { 49765 }).getLocation();
  5279.  
  5280.     RSTile localRSTile2 = a.l(new int[][] { arrayOfInt1, arrayOfInt2 });
  5281.  
  5282.     if ((localRSTile1 == null) || (localRSTile2 == null)) {
  5283.      
  5284.  
  5285. return -1;
  5286.     }
  5287.  
  5288.     RSTile localRSTile3 = a.i(new int[] { 49765 }).getLocation();
  5289.  
  5290.     RSTile localRSTile4 = a.tA();
  5291.  
  5292.     if (a.jA())
  5293.     {
  5294.       return 2;
  5295.     }
  5296.     if (!a.j
  5297.  
  5298. ())
  5299.     {
  5300.       return -1;
  5301.     }
  5302.     a.l(a.vc, 40, 50);
  5303.  
  5304.     a.jA = a.npcs.getNearest(a.B);
  5305.  
  5306.     a.yd = a.l(a.Zd);
  5307.  
  5308.     if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
  5309.    
  5310.  
  5311.  {
  5312.       a.F(a.jA);
  5313.     }
  5314.     else if ((a.yd != null) && (a.l(a.yd.getLocation(), false)))
  5315.       a.l(a.yd);
  5316.     else if (a.F(localRSObject2))
  5317.     {
  5318.       if
  5319.  
  5320. ((a.calc.distanceTo(localRSObject3.getLocation()) < 5) || (a.calc.distanceTo(localRSTile2) < 3))
  5321.       {
  5322.         a.A(localRSObject3.getLocation(), 0);
  5323.       }
  5324.       else
  5325.  
  5326. if (a.calc.distanceTo(localRSTile3) < 2)
  5327.         a.A(localRSTile2, 0);
  5328.       else {
  5329.         a.A(localRSTile3, 0);
  5330.       }
  5331.  
  5332.     }
  5333.     else if (a.F(localRSObject1))
  5334.       a.A
  5335.  
  5336. (localRSObject3.getLocation(), 1);
  5337.     else if (a.l(localRSTile4, true))
  5338.     {
  5339.       a.l(a.i(a.bB), "Step-onto");
  5340.     }
  5341.     else
  5342.     {
  5343.       a.A(a.nD, 1);
  5344.     }
  5345.     a.K(true);
  5346.  
  5347.  
  5348.  
  5349.   if (a.AA())
  5350.     {
  5351.       a.n();
  5352.     }
  5353.     else if (a.jA()) {
  5354.       return 2;
  5355.     }
  5356.  
  5357.     a.K(true);
  5358.  
  5359.     a.sleep(600, 900);
  5360.  
  5361.     return 1;
  5362.   }
  5363.  
  5364.   public void keyPressed(KeyEvent a)
  5365.  
  5366.  
  5367. {
  5368.   }
  5369.  
  5370.   private boolean iD()
  5371.   {
  5372.     if (((a.SE.contains("level of")) || (a.SE.contains("unable to"))) && (!a.oA()))
  5373.     {
  5374.       a.log("We don't have the level requirement
  5375.  
  5376. for this door, removing.");
  5377.  
  5378.       a.fG.add(a.nD);
  5379.  
  5380.       a.Bd.remove(a.nD);
  5381.  
  5382.       a.w.remove(a.nD);
  5383.  
  5384.       a.J.remove(a.nD);
  5385.  
  5386.       return false;
  5387.     }
  5388.  
  5389.     return true;
  5390.   }
  5391.  
  5392.  
  5393.  
  5394. private void J(boolean a)
  5395.   {
  5396.     if (a) {
  5397.       a.K(true);
  5398.     }
  5399.     else
  5400.     {
  5401.       a.sleep(400, 600);
  5402.     }
  5403.   }
  5404.  
  5405.   private boolean QB()
  5406.   {
  5407.     if (a.ic.contains(a.r))
  5408.     {
  5409.      
  5410.  
  5411.  return true;
  5412.     }
  5413.     if (a.npcs.getNearest(a.B) != null)
  5414.     {
  5415.       a.AB = "Clearing the room of monsters";
  5416.  
  5417.       if (a.jA())
  5418.       {
  5419.         return false;
  5420.       }
  5421.      
  5422.  
  5423. Object localObject;
  5424.       if (!a.J(a.jA))
  5425.         if (
  5426.           (localObject = a.npcs.getNearest(a.xc)) != null)
  5427.         {
  5428.           a.jA = ((RSNPC)localObject);
  5429.         }
  5430.  
  5431.  
  5432.       else
  5433.         {
  5434.           a.jA = a.npcs.getNearest(a.bD);
  5435.         }
  5436.       if (a.F(a.jA))
  5437.       {
  5438.         a.D(a.jA);
  5439.  
  5440.         a.F();
  5441.  
  5442.         a.sleep(900, 1700);
  5443.  
  5444.         if
  5445.  
  5446. (a.GD) {
  5447.           a.sleep(200, 300);
  5448.         }
  5449.  
  5450.       }
  5451.  
  5452.       if (a.Qc.contains(": Follow"))
  5453.       {
  5454.         if (((localObject = a.G(a.X())) != null) &&
  5455.           (a.l
  5456.  
  5457. (((RSObject)localObject).getID(), a.te)))
  5458.           a.F(a.X(), 2);
  5459.       }
  5460.       a.l(a.UC, 45, 55);
  5461.  
  5462.       a.sleep(200, 400);
  5463.  
  5464.       a.jA = null;
  5465.  
  5466.       double d1 = a.random(3,
  5467.  
  5468. 6);
  5469.       do
  5470.         if (a.jA())
  5471.         {
  5472.           return false;
  5473.         }
  5474.       while (a.JC());
  5475.  
  5476.       a.yd = a.l(a.Zd);
  5477.  
  5478.       a.K(false);
  5479.  
  5480.       a.sleep(300, 600);
  5481.  
  5482.       a.AB
  5483.  
  5484. = "";
  5485.     }
  5486.  
  5487.     return true;
  5488.   }
  5489.  
  5490.   private void l(Graphics a, RSTile a, double a)
  5491.   {
  5492.     if (a == null)
  5493.     {
  5494.       return;
  5495.     }
  5496.     int i1 = a.getX(); int i2 = a.getY();
  5497.  
  5498.    
  5499.  
  5500. Point localPoint1 = a.calc.worldToMinimap(i1 - a, i2 - a);
  5501.  
  5502.     Point localPoint2 = a.calc.worldToMinimap(i1 - a, i2 + a);
  5503.  
  5504.     Point localPoint3 = a.calc.worldToMinimap
  5505.  
  5506. (i1 + a, i2 + a);
  5507.  
  5508.     Point localPoint4 = a.calc.worldToMinimap(i1 + a, i2 - a);
  5509.  
  5510.     if ((localPoint1.x != -1) && (localPoint2.x != -1) && (localPoint3.x != -1) &&
  5511.  
  5512. (localPoint4.x != -1))
  5513.     {
  5514.       int[] arrayOfInt1 = { localPoint1.x, localPoint2.x, localPoint3.x, localPoint4.x };
  5515.  
  5516.       int[] arrayOfInt2 = { localPoint1.y,
  5517.  
  5518. localPoint2.y, localPoint3.y, localPoint4.y };
  5519.  
  5520.       a.fillPolygon(arrayOfInt1, arrayOfInt2, 4);
  5521.     }
  5522.   }
  5523.  
  5524.   private boolean F(int a, String a)
  5525.   {
  5526.     int i1;
  5527.     if
  5528.  
  5529. (a.game.getCurrentTab() != 7)
  5530.     {
  5531.       a.game.openTab(7);
  5532.  
  5533.       if ((i1 = 0) < 40)
  5534.       {
  5535.         a.sleep(40, 50);
  5536.  
  5537.         i1++;
  5538.       }
  5539.     }
  5540.     return
  5541.  
  5542. a.interfaces.getComponent(950, a).doAction(a);
  5543.   }
  5544.  
  5545.   private boolean oA()
  5546.   {
  5547.     int i1 = a.SE.indexOf("of ") + 3;
  5548.  
  5549.     if (a.SE.contains("of at least"))
  5550.     {
  5551.       i1 += 9;
  5552.  
  5553.  
  5554.    }
  5555.  
  5556.     try
  5557.     {
  5558.       String str = a.SE.substring(i1);
  5559.  
  5560.       int i2 = -1;
  5561.       int i3;
  5562.       if (
  5563.         (i3 = Integer.parseInt(str.substring(0, str.indexOf(" ")))) >
  5564.  
  5565. 99)
  5566.         return false;
  5567.       if ((a.SE.contains("Strength")) && (a.skills.getRealLevel(2) >= i3))
  5568.       {
  5569.         a.log("Our Strength level has been temporarily lowered
  5570.  
  5571. below " + i3 + ", waiting for it to regenerate");
  5572.  
  5573.         i2 = 2;
  5574.       }
  5575.       else if ((a.SE.contains("Magic")) && (a.skills.getRealLevel(6) >= i3))
  5576.       {
  5577.        
  5578.  
  5579. a.log("Our Magic level has been temporarily lowered below " + i3 + ", waiting for it to regenerate");
  5580.  
  5581.         i2 = 6;
  5582.       }
  5583.       if (i2 != -1)
  5584.       {
  5585.         int i4;
  5586.    
  5587.  
  5588.     if ((i4 = i3 - a.skills.getCurrentLevel(i2)) < 0)
  5589.         {
  5590.           return false;
  5591.         }
  5592.  
  5593.         if (i4 > 4)
  5594.         {
  5595.           i4 = 4;
  5596.         }
  5597.         int i5 =
  5598.  
  5599. a.random(i4 * 40000, i4 * 60000);
  5600.  
  5601.         a.sleep(i5);
  5602.  
  5603.         a.KA = new Timer(0L);
  5604.  
  5605.         if (a.hA != null) {
  5606.           a.hA.reset();
  5607.         }
  5608.  
  5609.         if (a.hd != null)
  5610.  
  5611.  
  5612.         a.hd.reset();
  5613.         if (a.lc != null)
  5614.         {
  5615.           a.lc = new Timer(0L);
  5616.         }
  5617.  
  5618.         a.SE = "";
  5619.  
  5620.         a.BG = true;
  5621.  
  5622.         return true;
  5623.       }
  5624.     }
  5625.    
  5626.  
  5627.  catch (Exception localException1)
  5628.     {
  5629.       if (a.UA)
  5630.         a.log(localException1);
  5631.     }
  5632.     return false;
  5633.   }
  5634.  
  5635.   private boolean F(RSNPC a, String a)
  5636.   {
  5637.     if ((a ==
  5638.  
  5639. null) || (!a.isValid())) {
  5640.       return false;
  5641.     }
  5642.  
  5643.     RSTile localRSTile = a.getLocation();
  5644.  
  5645.     if (!a.isOnScreen())
  5646.     {
  5647.       if (!a.Y().isMoving()) {
  5648.         if ((a.i
  5649.  
  5650. (localRSTile, 1)) && (a.calc.distanceTo(localRSTile) > 6))
  5651.           a.camera.turnToTile(localRSTile, a.random(5, 15));
  5652.         else {
  5653.           a.sleep(400, 600);
  5654.        
  5655.  
  5656. }
  5657.  
  5658.       }
  5659.  
  5660.       if (a != null)
  5661.       {
  5662.         a.sleep(50, 100);
  5663.       }
  5664.     }
  5665.     return a.l(a, a);
  5666.   }
  5667.  
  5668.   private int rA()
  5669.   {
  5670.     if (!a.UA)
  5671.     {
  5672.       a.uC = "Unsolvable
  5673.  
  5674. puzzle";
  5675.  
  5676.       return -1;
  5677.     }
  5678.  
  5679.     a.Q();
  5680.  
  5681.     while (!a.KD)
  5682.     {
  5683.       if (a.jA())
  5684.         return 2;
  5685.       if (!a.j())
  5686.         return -1;
  5687.     }
  5688.     return 1;
  5689.   }
  5690.  
  5691.   private
  5692.  
  5693. RSObject J(String[] a)
  5694.   {
  5695.     return a.objects.getNearest(new b(a, a));
  5696.   }
  5697.  
  5698.   private boolean l(String a, String[] a)
  5699.   {
  5700.     int i2;
  5701.     if ((a != null) && (a != null) &&
  5702.  
  5703. (!a.isEmpty()))
  5704.     {
  5705.       a = a.toLowerCase();
  5706.       String[] arrayOfString;
  5707.       int i1 = (arrayOfString = a).length;
  5708.       String str;
  5709.       if (((str = arrayOfString
  5710.  
  5711. [i2]) != null) &&
  5712.         (!str.isEmpty()) && (a.contains(str.toLowerCase()))) {
  5713.         return true;
  5714.       }
  5715.  
  5716.       i2++;
  5717.     }
  5718.  
  5719.     return false;
  5720.   }
  5721.  
  5722.   private boolean A(int
  5723.  
  5724. a)
  5725.   {
  5726.     if ((a < 4) && (a != a.combat.getFightMode()))
  5727.     {
  5728.       if ((a.k) && (a.i))
  5729.       {
  5730.         if (a == a.Gd)
  5731.         {
  5732.           return a.l(a.eB, "Wield");
  5733.        
  5734.  
  5735. }
  5736.         a.l(a.Vc, "Wield");
  5737.       }
  5738.  
  5739.       a.game.openTab(0);
  5740.  
  5741.       if (a == a.combat.getFightMode()) {
  5742.         return false;
  5743.       }
  5744.  
  5745.       if (a == 0)
  5746.         a.mouse.click
  5747.  
  5748. (577, 253, 55, 35, true);
  5749.       else if (a == 1)
  5750.       {
  5751.         a.mouse.click(661, 253, 55, 35, true);
  5752.       }
  5753.       else if (a == 2) {
  5754.         a.mouse.click(576, 306, 55,
  5755.  
  5756. 35, true);
  5757.       }
  5758.       else if (a == 3) {
  5759.         a.mouse.click(662, 308, 55, 35, true);
  5760.       }
  5761.  
  5762.       return true;
  5763.     }
  5764.  
  5765.     return false;
  5766.   }
  5767.  
  5768.   private String XA()
  5769.   {
  5770.     if
  5771.  
  5772. (a.yF == 0) {
  5773.       return "00:00:00";
  5774.     }
  5775.  
  5776.     StringBuilder localStringBuilder = new StringBuilder();
  5777.   }
  5778.  
  5779.   private boolean i(RSTile a, int a)
  5780.   {
  5781.     if (a != null)
  5782.     {
  5783.  
  5784.  
  5785.     if (a > 0)
  5786.         a = new RSTile(a.getX() + a.random(-a, a + 1), a.getY() + a.random(-a, a + 1));
  5787.       if (a.X().equals(a))
  5788.       {
  5789.         return false;
  5790.       }
  5791.      
  5792.  
  5793. if (a.calc.tileOnScreen(a))
  5794.         return a.A(a, "Walk here");
  5795.       Point localPoint;
  5796.       if ((localPoint = a.calc.tileToMinimap(a)).x ==
  5797.         -1)
  5798.       {
  5799.         if
  5800.  
  5801. (
  5802.           (a = a.walking.getClosestTileOnMap(a)) == null)
  5803.         {
  5804.           return false;
  5805.         }
  5806.         localPoint = a.calc.tileToMinimap(a);
  5807.       }
  5808.  
  5809.       if
  5810.  
  5811. (localPoint.x != -1)
  5812.       {
  5813.         a.mouse.move(localPoint);
  5814.  
  5815.         if ((localPoint = a.calc.tileToMinimap(a)).x !=
  5816.           -1)
  5817.         {
  5818.           a.mouse.click
  5819.  
  5820. (localPoint, true);
  5821.  
  5822.           return true;
  5823.         }
  5824.       }
  5825.     }
  5826.     return false;
  5827.   }
  5828.  
  5829.   private RSArea E(RSTile a)
  5830.   {
  5831.     if (a == null) {
  5832.       return null;
  5833.     }
  5834.  
  5835.     for
  5836.  
  5837. (RSArea localRSArea : a.Nc)
  5838.       if (a.calc.distanceBetween(a, localRSArea.getNearestTile(a)) < 3.0D)
  5839.       {
  5840.         return localRSArea;
  5841.       }
  5842.     return null;
  5843.   }
  5844.  
  5845.  
  5846.  
  5847. private boolean l(boolean a, Combat.Prayer a, boolean a)
  5848.   {
  5849.     if (((a) && (a.combat.getPrayerPoints() < 3)) || (!a.interfaces.get(749).isValid()))
  5850.     {
  5851.       return
  5852.  
  5853. false;
  5854.     }
  5855.     int i1;
  5856.     if ((a.QC) && (a.HC == a.bb))
  5857.     {
  5858.       if ((a.combat.isQuickPrayerOn() != a) && (a.interfaces.get(749).isValid()))
  5859.       {
  5860.         if (a.Zc())
  5861.  
  5862.  
  5863.          return false;
  5864.         if (a.l(a.interfaces.getComponent(749, 2), a ? "Turn quick prayers on" : "Turn prayers off"))
  5865.         {
  5866.           a.sleep(150, 200);
  5867.  
  5868.        
  5869.  
  5870.   i1++;
  5871.         }
  5872.  
  5873.         a.sleep(100, 200);
  5874.       }
  5875.     }
  5876.     if ((a != null) && (a.VA) && (a.getRequiredLevel() <= a.SC))
  5877.     {
  5878.       if ((a.combat.getPrayerPoints() > 0)
  5879.  
  5880. && (a.l(a) != a))
  5881.       {
  5882.         if (a.Zc()) {
  5883.           return false;
  5884.         }
  5885.  
  5886.         if (a.l(a, a))
  5887.         {
  5888.           a.sleep(100, 120);
  5889.  
  5890.           i1++;
  5891.         }
  5892.  
  5893.        
  5894.  
  5895. a.sleep(100, 200);
  5896.       }
  5897.     }
  5898.     return false;
  5899.   }
  5900.  
  5901.   private RSTile[] K(RSTile a)
  5902.   {
  5903.     int i1 = a.getX(); int i2 = a.getY();
  5904.  
  5905.     return new RSTile[] { new RSTile(i1 +
  5906.  
  5907. 1, i2 + 1), new RSTile(i1, i2 + 1), new RSTile(i1 - 1, i2 + 1), new RSTile(i1 - 1, i2), new RSTile(i1 - 1, i2 - 1), new RSTile(i1, i2 - 1), new RSTile(i1 + 1, i2 - 1),
  5908.  
  5909. new RSTile(i1 + 1, i2) };
  5910.   }
  5911.  
  5912.   private ArrayList<RSTile> l(RSTile a, RSTile a, int[] a)
  5913.   {
  5914.     ArrayList localArrayList = new ArrayList();
  5915.  
  5916.     a.l(a, a, false, a);
  5917.  
  5918.     int
  5919.  
  5920. i1 = -1;
  5921.     int i2;
  5922.     RSTile localRSTile1 = (RSTile)a.a.get(i2); RSTile localRSTile2 = (RSTile)a.a.get(i2 - 1);
  5923.  
  5924.     RSTile[] arrayOfRSTile = a.K(localRSTile2);
  5925.     int
  5926.  
  5927. i3;
  5928.     if (i1 == -1)
  5929.     {
  5930.       if (localRSTile1.equals(arrayOfRSTile[i3]))
  5931.       {
  5932.         i1 = i3;
  5933.       }
  5934.       else {
  5935.         i3++;
  5936.       }
  5937.  
  5938.     }
  5939.     else if (!
  5940.  
  5941. arrayOfRSTile[i1].equals(localRSTile1))
  5942.     {
  5943.       localArrayList.add(localRSTile2);
  5944.  
  5945.       i1 = -1;
  5946.  
  5947.       i2--;
  5948.     }
  5949.     i2++;
  5950.  
  5951.     localArrayList.add(a);
  5952.  
  5953.     return a.uc =
  5954.  
  5955. localArrayList;
  5956.   }
  5957.  
  5958.   private String J(String a)
  5959.   {
  5960.     if ((a == null) || (!a.contains(" "))) {
  5961.       return "";
  5962.     }
  5963.  
  5964.     return a.contains(">") ? a.substring(a.indexOf
  5965.  
  5966. (">") + 1, a.indexOf(" ")) : a.substring(0, a.indexOf(" "));
  5967.   }
  5968.  
  5969.   private int sA()
  5970.   {
  5971.     RSNPC localRSNPC = a.D(new int[] { 11007 });
  5972.     RSObject localRSObject;
  5973.     if
  5974.  
  5975. ((localRSObject = a.i(new int[] { 49555, 49556, 49557, 49558, 49559, 49560 })) == null)
  5976.     {
  5977.       return -1;
  5978.     }
  5979.  
  5980.     RSTile localRSTile = localRSObject.getLocation();
  5981.  
  5982.  
  5983.  
  5984.   int[] arrayOfInt = { 49546, 49547, 49548, 54293 };
  5985.  
  5986.     if (localRSNPC != null) if (!localRSNPC.getLocation().equals(localRSTile))
  5987.       {
  5988.         if (a.jA()) {
  5989.          
  5990.  
  5991. return 2;
  5992.         }
  5993.  
  5994.         if (!a.j()) {
  5995.           return -1;
  5996.         }
  5997.  
  5998.         a.l(a.vc, 50, 40);
  5999.  
  6000.         if ((localRSNPC = a.D(new int[] { 11007 })) != null)
  6001.         {
  6002.      
  6003.  
  6004.      int i1 = a.l(localRSNPC.getLocation(), localRSTile, arrayOfInt).size();
  6005.           Object localObject;
  6006.           if ((a.inventory.getCount(new int[] { 17375 }) < i1)
  6007.  
  6008. && (!a.inventory.isFull()))
  6009.           {
  6010.             localObject = a.J(new String[] { "Fire" });
  6011.  
  6012.             if (a.inventory.contains(17374)) if (a.calc.distanceTo
  6013.  
  6014. ((RSObject)localObject) >= 4)
  6015.               {
  6016.                 if (a.inventory.getCount(new int[] { 17374, 17375 }) <= i1 + 1);
  6017.               }
  6018.               else
  6019.            
  6020.  
  6021.    {
  6022.                 if (!a.l("Raw vile fish", (RSObject)localObject))
  6023.                   break label353;
  6024.                 a.K(true); break label353;
  6025.               }
  6026.  
  6027.  
  6028.          
  6029.  
  6030.    if (a.l(a.J(new String[] { "Fishing spot" }), "Fish"))
  6031.             {
  6032.               a.x();
  6033.  
  6034.               a.K(true);
  6035.             }
  6036.           }
  6037.           else
  6038.           {
  6039.      
  6040.  
  6041.        label353: while (a.inventory.contains(17375))
  6042.             {
  6043.               if (a.jA())
  6044.               {
  6045.                 return 2;
  6046.               }
  6047.               if (!
  6048.  
  6049. a.j())
  6050.               {
  6051.                 return -1;
  6052.               }
  6053.               if (localRSNPC == null)
  6054.               {
  6055.                 continue;
  6056.               }
  6057.  
  6058.              
  6059.  
  6060. if ((localObject = localRSNPC.getLocation()) != null)
  6061.               {
  6062.                 a.l((RSTile)localObject, localRSTile, arrayOfInt);
  6063.  
  6064.                 a.vE = ((RSTile)
  6065.  
  6066. a.uc.get(0));
  6067.  
  6068.                 if (a.vE != null) {
  6069.                   while ((a.inventory.contains(17375)) && (localRSNPC != null) && ((localRSNPC.isMoving()) ||
  6070.  
  6071. (localRSNPC.getLocation().equals(localObject))))
  6072.                   {
  6073.                     if (a.jA())
  6074.                     {
  6075.                       return 2;
  6076.                  
  6077.  
  6078.   }
  6079.                     if (!a.j())
  6080.                     {
  6081.                       return -1;
  6082.                     }
  6083.  
  6084.                     if ((localRSNPC = a.D(new int[] { 11007
  6085.  
  6086. })) == null)
  6087.                       continue;
  6088.                     if (localRSNPC.getLocation().equals(localRSTile))
  6089.                     {
  6090.                       break;
  6091.        
  6092.  
  6093.              }
  6094.  
  6095.                     RSItem localRSItem = a.inventory.getSelectedItem();
  6096.  
  6097.                     if ((!a.calc.tileOnScreen(a.vE)) && (!a.Y().isMoving()))
  6098.        
  6099.  
  6100.              {
  6101.                       a.i(a.vE, 1);
  6102.  
  6103.                       a.camera.turnToTile(a.vE, a.random(5, 15));
  6104.  
  6105.                       a.K(true);
  6106.                     }
  6107.  
  6108.  
  6109.                    else if ((localRSItem == null) || (localRSItem.getID() != 17375))
  6110.                     {
  6111.                       a.inventory.getItem(new int[] { 17375
  6112.  
  6113. }).doClick(true);
  6114.                     }
  6115.                     else if ((a.D(a.vE) == null) && (!a.Y().isMoving()) && (!localRSNPC.isMoving()) && (a.A(a.vE, "Use")))
  6116.        
  6117.  
  6118.             {
  6119.                       a.K(true);
  6120.  
  6121.                       a.sleep(2000, 3000);
  6122.                     }
  6123.  
  6124.                     a.sleep(200, 400);
  6125.  
  6126.                    
  6127.  
  6128. a.sleep(300, 400);
  6129.                   }
  6130.  
  6131.                 }
  6132.  
  6133.               }
  6134.  
  6135.             }
  6136.  
  6137.           }
  6138.  
  6139.         }
  6140.  
  6141.         a.sleep(100, 200);
  6142.       }
  6143.     return 1;
  6144.   }
  6145.  
  6146.   private
  6147.  
  6148. boolean ZA()
  6149.   {
  6150.     RSGroundItem localRSGroundItem;
  6151.     if ((
  6152.       (localRSGroundItem = a.l(a.Zd)) == null) || ((a.ic.contains(a.r)) && ((a.l.contains(a.r)) || (!a.l
  6153.  
  6154. (localRSGroundItem.getLocation(), false))))) {
  6155.       return true;
  6156.     }
  6157.  
  6158.     int i1 = 0;
  6159.  
  6160.     RSTile localRSTile = null;
  6161.  
  6162.     a.KC();
  6163.  
  6164.     if (a.AB.isEmpty())
  6165.     {
  6166.       a.AB =
  6167.  
  6168. "Picking up food & keys";
  6169.  
  6170.       if (a.kf) {
  6171.         a.AB += " & bones";
  6172.       }
  6173.  
  6174.       if (a.ec) {
  6175.         a.AB += " & arrows";
  6176.       }
  6177.  
  6178.     }
  6179.  
  6180.     a.KA.reset();
  6181.  
  6182.     a.MC = false;
  6183.  
  6184.  
  6185.  
  6186.    if (a.jA())
  6187.       return false;
  6188.     if (a.AB.contains("reengage")) {
  6189.       return true;
  6190.     }
  6191.  
  6192.     if ((localRSTile != null) && ((i1 > 6) || (a.KA.getElapsed() >
  6193.  
  6194. a.random(15000, 25000))))
  6195.     {
  6196.       if ((a.calc.distanceTo(localRSTile) > 1) || (a.Rd == 1)) if (a.l(localRSTile, a.Rd == 1))
  6197.         {
  6198.           if (a.Rd == 1)
  6199.          
  6200.  
  6201. {
  6202.             a.A(localRSTile, 1); break label307;
  6203.           }
  6204.  
  6205.           a.F(localRSTile); break label307;
  6206.         }
  6207.       a.RD.add(localRSTile);
  6208.  
  6209.       label307: a.KA.reset
  6210.  
  6211. ();
  6212.  
  6213.       i1 = 0;
  6214.     }
  6215.  
  6216.     a.yd = a.l(a.Zd);
  6217.  
  6218.     if (a.yd != null)
  6219.     {
  6220.       localRSTile = a.yd.getLocation();
  6221.  
  6222.       if (a.Nc.size() == 1)
  6223.       {
  6224.        
  6225.  
  6226. a.camera.setCompass('n');
  6227.       }
  6228.       else if ((!a.nE) && (a.inventory.getCount() > a.random(24, 26)) && (a.l(a.W, 101, 90)))
  6229.       {
  6230.         a.KA.reset();
  6231.  
  6232.         i1 =
  6233.  
  6234. 0;
  6235.       }
  6236.       a.D(!a.nE);
  6237.  
  6238.       int i2 = a.inventory.getCount();
  6239.       int i3;
  6240.       if (a.l(a.yd))
  6241.       {
  6242.         a.sleep(100, 200);
  6243.  
  6244.         a.sleep(0, 400);
  6245.  
  6246.         if
  6247.  
  6248. (a.MC)
  6249.         {
  6250.           a.l(localRSTile, 1);
  6251.  
  6252.           a.sleep(1000, 1500);
  6253.  
  6254.           a.MC = false;
  6255.         }
  6256.         else if (a.inventory.getCount() > i2)
  6257.         {
  6258.        
  6259.  
  6260.    a.KA.reset();
  6261.  
  6262.           a.KC();
  6263.  
  6264.           i1 = 0;
  6265.         }
  6266.         else
  6267.         {
  6268.           if (a.Y().isMoving())
  6269.           {
  6270.             a.KA.reset();
  6271.  
  6272.             i1 = 0;
  6273.  
  6274.  
  6275.         }
  6276.           else
  6277.           {
  6278.             i3++;
  6279.           }
  6280.  
  6281.           a.sleep(200, 250);
  6282.  
  6283.           i3++;
  6284.         }
  6285.       }
  6286.       else
  6287.       {
  6288.         i1++; i1 = !a.Y
  6289.  
  6290. ().isMoving() ? i1 : 0;
  6291.  
  6292.         a.uA();
  6293.       }
  6294.     }
  6295.     a.sleep(100, 300);
  6296.  
  6297.     a.kD();
  6298.  
  6299.     a.t();
  6300.  
  6301.     if ((!a.nE) && (a.inventory.getCount() > a.random(22, 26)) && (!a.l
  6302.  
  6303. (a.W, 101, a.combat.getHealth() + 15)))
  6304.     {
  6305.       a.MA();
  6306.     }
  6307.     a.yd = null;
  6308.  
  6309.     a.AB = "";
  6310.  
  6311.     return true;
  6312.   }
  6313.  
  6314.   private boolean UA()
  6315.   {
  6316.     a.Qc = "Opening a blocked
  6317.  
  6318. door";
  6319.     RSObject localRSObject;
  6320.     if (a.G(a.WA) != null)
  6321.     {
  6322.       if (a.jA())
  6323.         return false;
  6324.       localRSObject = a.G(a.WA);
  6325.  
  6326.       if (!a.iD())
  6327.       {
  6328.        
  6329.  
  6330. a.fG.add(a.WA);
  6331.  
  6332.         a.Bd.remove(a.WA);
  6333.  
  6334.         a.w.remove(a.WA);
  6335.  
  6336.         a.J.remove(a.WA);
  6337.  
  6338.         a.fA.remove(a.nD);
  6339.  
  6340.         return true;
  6341.       }
  6342.       if (a.l
  6343.  
  6344. (localRSObject))
  6345.       {
  6346.         a.K(false);
  6347.  
  6348.         a.l(a.vc, 50, 50);
  6349.       }
  6350.       else if (localRSObject != null)
  6351.       {
  6352.         a.sleep(100, 200);
  6353.       }
  6354.  
  6355.       if (a.Rc
  6356.  
  6357. ())
  6358.       {
  6359.         a.l(a.vc, 70, 50);
  6360.  
  6361.         a.sleep(900, 1500);
  6362.       }
  6363.       a.sleep(100, 200);
  6364.     }
  6365.  
  6366.     a.J.remove(a.WA);
  6367.  
  6368.     a.fA.remove(a.WA);
  6369.  
  6370.     a.Bd.remove(a.WA);
  6371.  
  6372.    
  6373.  
  6374. a.gc.remove(a.WA);
  6375.  
  6376.     a.w.remove(a.WA);
  6377.  
  6378.     if (a.ZA != null);
  6379.     if (a.jA())
  6380.     {
  6381.       return false;
  6382.     }
  6383.  
  6384.     a.uA();
  6385.  
  6386.     if ((a.nD != null) && (a.FA != null)) if
  6387.  
  6388. (a.FA.contains(new RSTile[] { a.nD }))
  6389.       {
  6390.         if ((
  6391.           (localRSObject = a.G(a.nD)) != null) && (a.MC))
  6392.         {
  6393.           localRSObject.doClick();
  6394.  
  6395.          
  6396.  
  6397. a.K(false);
  6398.  
  6399.           a.MC = false;
  6400.         }
  6401.  
  6402.         if (a.l(a.G(a.nD)))
  6403.         {
  6404.           a.K(false);
  6405.  
  6406.           if (a.i(false))
  6407.           {
  6408.             return true;
  6409.        
  6410.  
  6411.   }
  6412.         }
  6413.         else
  6414.         {
  6415.           a.sleep(100, 200);
  6416.         }
  6417.       }
  6418.     a.sleep(100, 200);
  6419.  
  6420.     return true;
  6421.   }
  6422.  
  6423.   private void wA()
  6424.   {
  6425.     RSNPC localRSNPC1 =
  6426.  
  6427. a.i(new String[] { "Gluttonous behemoth" });
  6428.  
  6429.     RSNPC localRSNPC2 = a.i(new String[] { "Bloodchiller" });
  6430.  
  6431.     RSNPC localRSNPC3 = a.i(new String[] { "Luminescent" });
  6432.  
  6433.    
  6434.  
  6435.  RSNPC localRSNPC4 = a.i(new String[] { "Lakhrahnaz" });
  6436.  
  6437.     RSObject localRSObject1 = a.objects.getNearest(new int[] { 49283 });
  6438.  
  6439.     a.l(a.UC, 50, 60);
  6440.     Object
  6441.  
  6442. localObject2;
  6443.     int i3;
  6444.     int i4;
  6445.     if (localRSObject1 != null)
  6446.     {
  6447.       a.Qc = "Killing the Gluttonous Behemoth!";
  6448.  
  6449.       if (a.tc.isEmpty())
  6450.       {
  6451.         a.log
  6452.  
  6453. (a.Qc);
  6454.  
  6455.         a.tc = "Gluttonous Behemoth";
  6456.       }
  6457.  
  6458.       a.PD = (a.bC != -1 ? a.bC : a.xb);
  6459.  
  6460.       a.A(true);
  6461.  
  6462.       RSTile localRSTile1 = localRSObject1.getLocation();
  6463.  
  6464.    
  6465.  
  6466.   if (
  6467.         (localObject2 = a.F(localRSTile1, new int[] { 51180 })) != null)
  6468.       {
  6469.         RSTile[] arrayOfRSTile;
  6470.         i3 = (arrayOfRSTile = a.h
  6471.  
  6472. (localRSTile1)).length; RSTile localRSTile2 = arrayOfRSTile[i4];
  6473.         int i7;
  6474.         if ((i7 = (int)a.calc.distanceBetween(localRSTile2, (RSTile)localObject2)) ==
  6475.    
  6476.  
  6477.        3)
  6478.         {
  6479.           a.vE = localRSTile2;
  6480.         }
  6481.         else {
  6482.           i4++;
  6483.         }
  6484.  
  6485.       }
  6486.  
  6487.       if (a.vE == null)
  6488.       {
  6489.         a.log.severe("Unable to
  6490.  
  6491. calculate the tile to protect");
  6492.  
  6493.         a.vE = localRSTile1;
  6494.       }
  6495.       a.l(a.vE, 0);
  6496.  
  6497.       a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  6498.  
  6499.       a.F();
  6500.  
  6501.       if
  6502.  
  6503. (a.jA())
  6504.       {
  6505.         return;
  6506.       }
  6507.       if ((localRSNPC1 != null) && (localRSNPC1.getAnimation() == 13720))
  6508.       {
  6509.         a.iE += 1;
  6510.  
  6511.         if (a.iE > 2)
  6512.         {
  6513.    
  6514.  
  6515.        a.log.severe("Unable to kill the Behemoth, aborting dungeon");
  6516.  
  6517.           a.nc = true;
  6518.  
  6519.           return;
  6520.         }
  6521.  
  6522.         if (localRSNPC1 != null)
  6523.         {
  6524.          
  6525.  
  6526. a.AB = "Waiting for the behemoth to eat";
  6527.  
  6528.           a.JC();
  6529.  
  6530.           a.sleep(300, 500);
  6531.         }
  6532.       }
  6533.       if (a.calc.distanceTo(a.vE) > 1)
  6534.       {
  6535.         a.AB =
  6536.  
  6537. "Repositioning to guard the food";
  6538.  
  6539.         if (!a.Y().isMoving())
  6540.         {
  6541.           a.A(a.vE, 0);
  6542.         }
  6543.         a.K(false);
  6544.  
  6545.         a.i(localRSNPC1);
  6546.  
  6547.         a.AB = "";
  6548.  
  6549.  
  6550.      }
  6551.  
  6552.       a.l(a.UC, 50, 60);
  6553.  
  6554.       a.sleep(200, 300);
  6555.     }
  6556.     else
  6557.     {
  6558.       if (!a.tc.equals("Astea Frostweb"))
  6559.       {
  6560.         if (a.i(new String[] { "Frostweb" }) ==
  6561.  
  6562. null);
  6563.       }
  6564.       else
  6565.       {
  6566.         int i1 = 0;
  6567.  
  6568.         a.Qc = "Killing Astea Frostweb!";
  6569.  
  6570.         if (a.tc.isEmpty())
  6571.         {
  6572.           a.log(a.Qc);
  6573.  
  6574.           a.tc =
  6575.  
  6576. "Astea Frostweb";
  6577.         }
  6578.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  6579.  
  6580.         if (a.Sd)
  6581.           a.i(2);
  6582.         else {
  6583.           a.PD = a.xb;
  6584.         }
  6585.  
  6586.      
  6587.  
  6588.    if (a.jA()) {
  6589.           return;
  6590.         }
  6591.  
  6592.         if ((localObject2 = a.i(new String[] { "Frostweb" })) != null)
  6593.         {
  6594.           int i2 = ((RSNPC)
  6595.  
  6596. localObject2).getID(); i3 = 1;
  6597.  
  6598.           i1 = 0;
  6599.  
  6600.           if (a.HC == 2)
  6601.           {
  6602.             i3 = 3;
  6603.           }
  6604.           else if (a.HC == 3) {
  6605.             i3 = 2;
  6606.      
  6607.  
  6608.     }
  6609.  
  6610.           if (i2 == i4) {
  6611.             i1 = 1;
  6612.           }
  6613.           else
  6614.           {
  6615.             i4 += 3;
  6616.           }
  6617.  
  6618.           a.AB = (i1 != 0 ? "Astea is protecting
  6619.  
  6620. against us!" : "");
  6621.  
  6622.           if (a.SE.contains("A magical force"))
  6623.           {
  6624.             a.SE = "";
  6625.  
  6626.             a.JC();
  6627.           }
  6628.           else
  6629.           {
  6630.            
  6631.  
  6632. RSNPC localRSNPC5;
  6633.             if (a.MC)
  6634.             {
  6635.               localRSNPC5 = a.i(new String[] { "spider" });
  6636.  
  6637.               if ((a.HC == 1) && (localRSNPC5 != null))
  6638.  
  6639.  
  6640.             {
  6641.                 if (a.F(localRSNPC5))
  6642.                 {
  6643.                   a.sleep(500, 800);
  6644.                 }
  6645.               }
  6646.               else if (a.JC())
  6647.    
  6648.  
  6649.            {
  6650.                 a.sleep(200, 300);
  6651.               }
  6652.               else if ((a.HC == 1) && (a.calc.distanceTo((RSCharacter)localObject2) > 1))
  6653.                
  6654.  
  6655. a.i((RSNPC)localObject2);
  6656.               a.MC = false;
  6657.             }
  6658.             else if (i1 != 0)
  6659.             {
  6660.               if (
  6661.                 (localRSNPC5 = a.i(new
  6662.  
  6663. String[] { "spider" })) != null)
  6664.               {
  6665.                 if (a.F(localRSNPC5))
  6666.                 {
  6667.                   a.sleep(500, 800);
  6668.                 }
  6669.              
  6670.  
  6671. }
  6672.               else if (a.JC())
  6673.               {
  6674.                 a.sleep(200, 300);
  6675.               }
  6676.               else if ((a.HC == 1) && (a.calc.distanceTo((RSCharacter)
  6677.  
  6678. localObject2) > 1))
  6679.               {
  6680.                 a.i((RSNPC)localObject2);
  6681.               }
  6682.               a.MC = false;
  6683.             }
  6684.             else
  6685.             {
  6686.          
  6687.  
  6688.      a.i((RSNPC)localObject2);
  6689.             }
  6690.           }
  6691.           a.l(a.UC, 50, 55);
  6692.         }
  6693.  
  6694.         a.sleep(200, 300);
  6695.  
  6696.         break label2523; } if (!a.tc.equals("Icy
  6697.  
  6698. Bones")) { if (a.i(new String[] { "Bones" }) == null);
  6699.       }
  6700.       else
  6701.       {
  6702.         a.Qc = "Killing Icy Bones!";
  6703.  
  6704.         if (a.tc.isEmpty())
  6705.         {
  6706.           a.log
  6707.  
  6708. (a.Qc);
  6709.  
  6710.           a.tc = "Icy Bones";
  6711.         }
  6712.  
  6713.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
  6714.  
  6715.         a.PD = a.Gd;
  6716.  
  6717.         if (a.h())
  6718.           break label2523;
  6719.  
  6720.  
  6721.        return;
  6722.       }
  6723.       Object localObject1;
  6724.       if ((a.tc.equals("Luminescent Icefiend")) || (localRSNPC3 != null))
  6725.       {
  6726.         localObject1 = null;
  6727.  
  6728.         a.Qc
  6729.  
  6730. = "Killing the Luminescent Icefiend!";
  6731.  
  6732.         if (a.tc.isEmpty())
  6733.         {
  6734.           a.log(a.Qc);
  6735.  
  6736.           a.tc = "Luminescent Icefiend";
  6737.         }
  6738.  
  6739.         a.vE = null;
  6740.  
  6741.    
  6742.  
  6743.      a.l(false, Combat.Prayer.PROTECT_FROM_MISSILES, true);
  6744.  
  6745.         a.PD = (a.bC != -1 ? a.bC : a.xb);
  6746.  
  6747.         if (a.jA()) {
  6748.           return;
  6749.         }
  6750.  
  6751.         if
  6752.  
  6753. ((localRSNPC3 = a.i(new String[] { "Luminescent" })) != null)
  6754.         {
  6755.           if (localRSNPC3.getAnimation() == 13338)
  6756.           {
  6757.             if ((
  6758.              
  6759.  
  6760. (localObject2 = a.i(new int[] { 51300 })) == null) || (a.walking.getEnergy() < a.random(8, 13)))
  6761.             {
  6762.               a.AB = (localObject2 != null ? "Out of run..
  6763.  
  6764. Eating after the attack" : "Eating after the attack");
  6765.             }
  6766.             while (localRSNPC3.getAnimation() == 13338)
  6767.             {
  6768.               a.sleep(100, 200);
  6769.  
  6770. continue;
  6771.               RSObject localRSObject2;
  6772.               if (
  6773.                 (localRSObject2 = a.l((RSObject)localObject2, new int[] { 51300 })) != null)
  6774.            
  6775.  
  6776.      localObject1 = localRSObject2.getLocation();
  6777.               a.AB = "Dodging the icicles!";
  6778.  
  6779.               if (!a.walking.isRunEnabled())
  6780.                
  6781.  
  6782. a.walking.setRun(true);
  6783.               else {
  6784.                 a.sleep(500, 700);
  6785.               }
  6786.  
  6787.               a.sleep(300, 400);
  6788.  
  6789.               a.vE = ((RSObject)
  6790.  
  6791. localObject2).getLocation();
  6792.               int i6;
  6793.               label1722: while ((localRSNPC3 != null) && (localRSNPC3.getAnimation() == 13338)) { if (!a.nb.contains
  6794.  
  6795. (new RSTile[] { a.X() }))
  6796.                   break;
  6797.                 if (a.jA())
  6798.                 {
  6799.                   return;
  6800.                 }
  6801.  
  6802.                 if (a.vE !=
  6803.  
  6804. null)
  6805.                 {
  6806.                   a.l(a.vE, 1);
  6807.  
  6808.                   a.l(true);
  6809.  
  6810.                   if ((!a.Y().isMoving()) || (a.Y().getAnimation() != -1))
  6811.              
  6812.  
  6813.      {
  6814.                     a.l(a.vE, 1);
  6815.  
  6816.                     a.sleep(500, 800);
  6817.                   }
  6818.                   a.sleep(30, 50);
  6819.                 }
  6820.  
  6821.                 if
  6822.  
  6823. (localRSNPC3.getAnimation() != 13338)
  6824.                   break;
  6825.                 RSObject[] arrayOfRSObject;
  6826.                 int i5 = (arrayOfRSObject = a.J(new int[] {
  6827.  
  6828. 51300 })).length;
  6829.                 RSObject localRSObject3;
  6830.                 if ((localRSObject3 = arrayOfRSObject[i6]) != null)
  6831.                 {
  6832.                   RSTile
  6833.  
  6834. localRSTile3 = localRSObject3.getLocation();
  6835.  
  6836.                   if (((localObject1 == null) || (!localRSTile3.equals(localObject1))) && ((a.vE == null) || ((!
  6837.  
  6838. localRSTile3.equals(a.vE)) && ((localRSTile3.getX() == a.vE.getX()) || (localRSTile3.getY() == a.vE.getY())))))
  6839.                   {
  6840.                     localObject1 =
  6841.  
  6842. a.vE;
  6843.  
  6844.                     a.vE = localRSTile3;
  6845.  
  6846.                     break label1722;
  6847.                   }
  6848.  
  6849.                 }
  6850.  
  6851.                 i6++;
  6852.               }
  6853.              
  6854.  
  6855. a.l(a.UC, 15, 15);
  6856.  
  6857.               if (localRSNPC3 != null) {
  6858.                 a.A(localRSNPC3.getLocation(), 1);
  6859.               }
  6860.  
  6861.               a.vE = null;
  6862.             }
  6863.      
  6864.  
  6865.       a.AB = "";
  6866.           }
  6867.           a.i(localRSNPC3);
  6868.  
  6869.           a.l(a.UC, 40, 40);
  6870.         }
  6871.         a.sleep(200, 300);
  6872.       }
  6873.       else if ((a.tc.equals("Plane-Freezer
  6874.  
  6875. Lakhrahnaz")) || (localRSNPC4 != null))
  6876.       {
  6877.         a.Qc = "Killing Plane-freezer Lakhrahnaz!";
  6878.  
  6879.         if (a.tc.isEmpty())
  6880.         {
  6881.           a.log(a.Qc);
  6882.  
  6883.          
  6884.  
  6885. a.tc = "Plane-Freezer Lakhrahnaz";
  6886.         }
  6887.  
  6888.         if (a.Sd)
  6889.           a.i(2);
  6890.         else {
  6891.           a.PD = (a.bC != -1 ? a.bC : a.xb);
  6892.         }
  6893.  
  6894.         a.l(false,
  6895.  
  6896. Combat.Prayer.PROTECT_FROM_MISSILES, true);
  6897.  
  6898.         if (a.jA()) {
  6899.           return;
  6900.         }
  6901.  
  6902.         if (
  6903.           (localRSNPC4 = a.i(new String[] { "Lakhrahnaz" })) !=
  6904.  
  6905. null)
  6906.         {
  6907.           if (((a.MC) || ((a.HC == 1) && (a.calc.distanceTo(localRSNPC4) > 2))) && (!a.Y().isMoving()))
  6908.           {
  6909.             a.A
  6910.  
  6911. (localRSNPC4.getLocation(), 0);
  6912.  
  6913.             a.MC = false;
  6914.           }
  6915.           localObject1 = a.objects.getNearest(new int[] { 49334 });
  6916.  
  6917.           if ((!a.l(localRSNPC4))
  6918.  
  6919. && (a.calc.distanceTo(localRSNPC4) < 3) && (!a.Y().isMoving()) && (localObject1 != null) && (a.calc.distanceTo((RSObject)localObject1) < 3))
  6920.           {
  6921.             a.A
  6922.  
  6923. (a.X(), 2);
  6924.  
  6925.             a.l(false);
  6926.           }
  6927.  
  6928.           a.i(localRSNPC4);
  6929.  
  6930.           a.l(a.UC, 45, 55);
  6931.         }
  6932.         a.sleep(100, 200);
  6933.  
  6934.         if ((localObject1 =
  6935.  
  6936. a.objects.getNearest(a.gb)) != null)
  6937.         {
  6938.           a.l(((RSObject)localObject1).getLocation(), 1);
  6939.  
  6940.           a.K(false);
  6941.  
  6942.           if ((localObject2 =
  6943.  
  6944. a.objects.getNearest(new int[] { 49334 })) != null)
  6945.           {
  6946.             a.AB = "Navigating to the nearest corner";
  6947.  
  6948.             while (localObject2 != null) { if
  6949.  
  6950. ((localObject1 == null) || (a.calc.distanceTo((RSObject)localObject1) <= 1))
  6951.                 break;
  6952.               if (a.jA())
  6953.               {
  6954.                 return;
  6955.        
  6956.  
  6957.        }
  6958.               if ((localObject2 = a.objects.getNearest(new int[] { 49334 })) == null)
  6959.               {
  6960.                 continue;
  6961.               }
  6962.  
  6963.               a.vE
  6964.  
  6965. = ((RSObject)localObject2).getLocation();
  6966.  
  6967.               if (!a.Y().isMoving())
  6968.               {
  6969.                 a.A(a.vE, 0);
  6970.               }
  6971.               if (!a.Y
  6972.  
  6973. ().isMoving())
  6974.                 a.A(a.X(), 5);
  6975.               a.sleep(300, 400);
  6976.             }
  6977.  
  6978.             a.l(((RSObject)localObject1).getLocation(), 0);
  6979.  
  6980.             a.AB =
  6981.  
  6982. "";
  6983.           }
  6984.         }
  6985.       }
  6986.       else
  6987.       {
  6988.         if ((a.tc.equals("Blood Chiller")) || (localRSNPC2 != null))
  6989.         {
  6990.           a.Qc = "Killing the Blood
  6991.  
  6992. Chiller!";
  6993.  
  6994.           if (a.tc.isEmpty())
  6995.           {
  6996.             a.log(a.Qc);
  6997.  
  6998.             a.tc = "Blood Chiller";
  6999.           }
  7000.           a.l(a.QC, null, false);
  7001.  
  7002.           a.PD
  7003.  
  7004. = (a.bC != -1 ? a.bC : a.Gd);
  7005.         }
  7006.         while (a.objects.getNearest(a.gb) == null)
  7007.         {
  7008.           if (a.jA()) {
  7009.             return;
  7010.           }
  7011.  
  7012.           if
  7013.  
  7014. (a.MC)
  7015.           {
  7016.             a.l(a.vc, 85, 30);
  7017.  
  7018.             a.MC = false;
  7019.           }
  7020.  
  7021.           a.i(localRSNPC2);
  7022.  
  7023.           a.l(a.UC, 50, 60);
  7024.  
  7025.           a.sleep(200, 300);
  7026.  
  7027. continue;
  7028.  
  7029.           a.Qc = "Killing an unknown boss...";
  7030.  
  7031.           a.log(a.Qc);
  7032.  
  7033.           a.l(a.QC, null, false);
  7034.  
  7035.           if (a.h())
  7036.             break;
  7037.           return;
  7038.    
  7039.  
  7040.      }
  7041.  
  7042.       }
  7043.  
  7044.     }
  7045.  
  7046.     label2523: a.Ke = true;
  7047.   }
  7048.  
  7049.   private int TA()
  7050.   {
  7051.     int[] arrayOfInt1 = null; int[] arrayOfInt2 = null;
  7052.  
  7053.     int i1 = 0;
  7054.  
  7055.     int i2 = 1; int i3 = 1;
  7056.  
  7057.  
  7058.  
  7059.   int[] arrayOfInt3 = { 49348, 49349, 49350, 54408 };
  7060.  
  7061.     RSObject localRSObject1 = a.i(new int[] { 49345, 49346, 49347, 49348, 49349, 49350, 54407, 54408 });
  7062.  
  7063.    
  7064.  
  7065. RSObject localRSObject2 = a.i(new int[] { 49351, 49352, 49353, 54409 });
  7066.  
  7067.     RSTile localRSTile1 = null;
  7068.  
  7069.     if ((localRSObject1 == null) || (localRSObject2 == null)) {
  7070.  
  7071.  
  7072.     return -1;
  7073.     }
  7074.  
  7075.     RSTile localRSTile2 = localRSObject1.getLocation();
  7076.  
  7077.     RSTile localRSTile3 = localRSObject2.getLocation();
  7078.  
  7079.     if (localRSTile2.getX() -
  7080.  
  7081. localRSTile3.getX() < -4)
  7082.     {
  7083.       i2 = 1;
  7084.  
  7085.       i3 = 1;
  7086.  
  7087.       localRSTile1 = a.r.getNearestTile(a.y);
  7088.     }
  7089.  
  7090.     if (localRSTile2.getX() - localRSTile3.getX() > 4)
  7091.     {
  7092.    
  7093.  
  7094.    i2 = -1;
  7095.  
  7096.       i3 = -1;
  7097.  
  7098.       localRSTile1 = a.r.getNearestTile(new RSTile(20000, 20000));
  7099.     }
  7100.     if (localRSTile2.getY() - localRSTile3.getY() < -4)
  7101.     {
  7102.       i2 =
  7103.  
  7104. -1;
  7105.  
  7106.       i3 = 1;
  7107.  
  7108.       localRSTile1 = a.r.getNearestTile(new RSTile(20000, 0));
  7109.  
  7110.       i1 = 1;
  7111.     }
  7112.     if (localRSTile2.getY() - localRSTile3.getY() > 4)
  7113.     {
  7114.       i2 =
  7115.  
  7116. 1;
  7117.  
  7118.       i3 = -1;
  7119.  
  7120.       localRSTile1 = a.r.getNearestTile(new RSTile(0, 20000));
  7121.  
  7122.       i1 = 1;
  7123.     }
  7124.     int i4 = 0; int i5 = 0;
  7125.  
  7126.     if (localRSTile1 == null)
  7127.       return -
  7128.  
  7129. 1;
  7130.     i4 = localRSTile1.getX();
  7131.  
  7132.     i5 = localRSTile1.getY();
  7133.  
  7134.     RSTile[] arrayOfRSTile1 = { new RSTile(i4 + 14 * i2, i5 + 5 * i3), new RSTile(i4 + 14 * i2, i5 + 7 *
  7135.  
  7136. i3), new RSTile(i4 + 14 * i2, i5 + 12 * i3), new RSTile(i4 + 13 * i2, i5 + 8 * i3), new RSTile(i4 + 13 * i2, i5 + 6 * i3), new RSTile(i4 + 11 * i2, i5 + 2 * i3), new
  7137.  
  7138. RSTile(i4 + 11 * i2, i5 + 7 * i3), new RSTile(i4 + 10 * i2, i5 + 3 * i3), new RSTile(i4 + 10 * i2, i5 + 8 * i3), new RSTile(i4 + 10 * i2, i5 + 13 * i3), new RSTile(i4
  7139.  
  7140. + 8 * i2, i5 + 1 * i3), new RSTile(i4 + 8 * i2, i5 + 4 * i3), new RSTile(i4 + 8 * i2, i5 + 10 * i3), new RSTile(i4 + 8 * i2, i5 + 14 * i3), new RSTile(i4 + 7 * i2, i5
  7141.  
  7142. + 5 * i3), new RSTile(i4 + 6 * i2, i5 + 3 * i3), new RSTile(i4 + 6 * i2, i5 + 11 * i3), new RSTile(i4 + 5 * i2, i5 + 2 * i3), new RSTile(i4 + 5 * i2, i5 + 7 * i3), new
  7143.  
  7144. RSTile(i4 + 5 * i2, i5 + 12 * i3), new RSTile(i4 + 4 * i2, i5 + 6 * i3), new RSTile(i4 + 4 * i2, i5 + 9 * i3), new RSTile(i4 + 4 * i2, i5 + 13 * i3), new RSTile(i4 + 4
  7145.  
  7146. * i2, i5 + 14 * i3), new RSTile(i4 + 3 * i2, i5 + 9 * i3), new RSTile(i4 + 2 * i2, i5 + 7 * i3), new RSTile(i4 + 1 * i2, i5 + 3 * i3), new RSTile(i4 + 1 * i2, i5 + 9 *
  7147.  
  7148. i3), new RSTile(i4 + 1 * i2, i5 + 11 * i3) };
  7149.  
  7150.     RSTile[] arrayOfRSTile2 = { new RSTile(i4 + 5 * i2, i5 + 14 * i3), new RSTile(i4 + 7 * i2, i5 + 14 * i3), new RSTile
  7151.  
  7152. (i4 + 12 * i2, i5 + 14 * i3), new RSTile(i4 + 8 * i2, i5 + 13 * i3), new RSTile(i4 + 6 * i2, i5 + 12 * i3), new RSTile(i4 + 2 * i2, i5 + 11 * i3), new RSTile(i4 + 7 *
  7153.  
  7154. i2, i5 + 11 * i3), new RSTile(i4 + 3 * i2, i5 + 10 * i3), new RSTile(i4 + 8 * i2, i5 + 10 * i3), new RSTile(i4 + 13 * i2, i5 + 10 * i3), new RSTile(i4 + 1 * i2, i5 + 8
  7155.  
  7156. * i3), new RSTile(i4 + 4 * i2, i5 + 8 * i3), new RSTile(i4 + 10 * i2, i5 + 8 * i3), new RSTile(i4 + 14 * i2, i5 + 8 * i3), new RSTile(i4 + 5 * i2, i5 + 7 * i3), new
  7157.  
  7158. RSTile(i4 + 3 * i2, i5 + 6 * i3), new RSTile(i4 + 11 * i2, i5 + 6 * i3), new RSTile(i4 + 2 * i2, i5 + 5 * i3), new RSTile(i4 + 7 * i2, i5 + 5 * i3), new RSTile(i4 + 12
  7159.  
  7160. * i2, i5 + 5 * i3), new RSTile(i4 + 6 * i2, i5 + 4 * i3), new RSTile(i4 + 9 * i2, i5 + 4 * i3), new RSTile(i4 + 13 * i2, i5 + 4 * i3), new RSTile(i4 + 14 * i2, i5 + 4
  7161.  
  7162. * i3), new RSTile(i4 + 9 * i2, i5 + 3 * i3), new RSTile(i4 + 7 * i2, i5 + 2 * i3), new RSTile(i4 + 3 * i2, i5 + 1 * i3), new RSTile(i4 + 9 * i2, i5 + 1 * i3), new
  7163.  
  7164. RSTile(i4 + 11 * i2, i5 + 1 * i3) };
  7165.     RSObject localRSObject3;
  7166.     RSObject localRSObject4;
  7167.     RSObject localRSObject5;
  7168.     RSObject localRSObject6;
  7169.     RSObject
  7170.  
  7171. localRSObject7;
  7172.     if (i1 != 0)
  7173.     {
  7174.       a.Wd = arrayOfRSTile1;
  7175.  
  7176.       localRSObject3 = a.G(new RSTile(i4 + 4 * i2, i5 + 5 * i3));
  7177.  
  7178.       localRSObject4 = a.G(new RSTile
  7179.  
  7180. (i4 + 9 * i2, i5 + 2 * i3));
  7181.  
  7182.       localRSObject5 = a.G(new RSTile(i4 + 5 * i2, i5 + 2 * i3));
  7183.  
  7184.       localRSObject6 = a.G(new RSTile(i4 + 3 * i2, i5 + 5 * i3));
  7185.  
  7186.      
  7187.  
  7188. localRSObject7 = a.G(new RSTile(i4 + 3 * i2, i5 + 1 * i3));
  7189.     }
  7190.     else
  7191.     {
  7192.       a.Wd = arrayOfRSTile2;
  7193.  
  7194.       localRSObject3 = a.G(new RSTile(i4 + 5 * i2, i5 + 4 *
  7195.  
  7196. i3));
  7197.  
  7198.       localRSObject4 = a.G(new RSTile(i4 + 2 * i2, i5 + 9 * i3));
  7199.  
  7200.       localRSObject5 = a.G(new RSTile(i4 + 2 * i2, i5 + 5 * i3));
  7201.  
  7202.       localRSObject6 = a.G(new
  7203.  
  7204. RSTile(i4 + 5 * i2, i5 + 3 * i3));
  7205.  
  7206.       localRSObject7 = a.G(new RSTile(i4 + 1 * i2, i5 + 3 * i3));
  7207.     }
  7208.  
  7209.     int[] arrayOfInt4 = { 54412, 54413, 54414, 54415, 54416 };
  7210.  
  7211.  
  7212.  
  7213.   if (((localRSObject3 != null) && (localRSObject3.getID() > 49359) && (localRSObject3.getID() < 49375)) || (a.l(localRSObject3.getID(), arrayOfInt4)))
  7214.     {
  7215.      
  7216.  
  7217. arrayOfInt1 = new int[] { 14, 29, 27, 26, 16, 7, 15 };
  7218.  
  7219.       arrayOfInt2 = new int[] { 15, 7, 16, 26, 27, 0, 29, 10, 4, 1, 0 };
  7220.     }
  7221.     else if (((localRSObject5 !=
  7222.  
  7223. null) && (localRSObject5.getID() > 49359) && (localRSObject5.getID() < 49375)) || (a.l(localRSObject5.getID(), arrayOfInt4)))
  7224.     {
  7225.       arrayOfInt1 = new int[] { 14,
  7226.  
  7227. 26, 16, 8, 4, 10, 20, 7, 13 };
  7228.  
  7229.       arrayOfInt2 = new int[] { 15, 7, 20, 10, 1, 0, 0, 11, 4, 8, 16, 26, 29, 0 };
  7230.     }
  7231.     else if (((localRSObject6 != null) &&
  7232.  
  7233. (localRSObject6.getID() > 49359) && (localRSObject6.getID() < 49375)) || (a.l(localRSObject6.getID(), arrayOfInt4)))
  7234.     {
  7235.       arrayOfInt1 = new int[] { 14, 24, 29,
  7236.  
  7237. 26, 10, 4, 8, 7, 15 };
  7238.  
  7239.       arrayOfInt2 = new int[] { 13, 7, 8, 4, 1, 0, 1, 10, 26, 27, 0, 0 };
  7240.     }
  7241.     else if (((localRSObject4 != null) && (localRSObject4.getID() >
  7242.  
  7243. 49359) && (localRSObject4.getID() < 49375)) || (a.l(localRSObject4.getID(), arrayOfInt4)))
  7244.     {
  7245.       arrayOfInt1 = new int[] { 14, 1, 11, 27, 29, 26, 16, 22, 13 };
  7246.  
  7247.      
  7248.  
  7249.  arrayOfInt2 = new int[] { 15, 22, 16, 26, 29, 0, 27, 11, 0, 0 };
  7250.     }
  7251.     else if (((localRSObject7 != null) && (localRSObject7.getID() > 49359) &&
  7252.  
  7253. (localRSObject7.getID() < 49375)) || (a.l(localRSObject7.getID(), arrayOfInt4)))
  7254.     {
  7255.       arrayOfInt1 = new int[] { 14, 29, 27, 4, 8, 22, 15 };
  7256.  
  7257.       arrayOfInt2 = new
  7258.  
  7259. int[] { 15, 22, 8, 4, 1, 0, 0, 11, 27, 0 };
  7260.     }
  7261.     else
  7262.     {
  7263.       return -1;
  7264.     }
  7265.  
  7266.     if (a.jA())
  7267.       return 2;
  7268.     a.l(a.G(localRSTile3), "Pull");
  7269.  
  7270.     a.K(false);
  7271.  
  7272.    
  7273.  
  7274. a.IC = false;
  7275.  
  7276.     while ((a.i(arrayOfInt3) == null) || (a.nD == null) || (!a.KD))
  7277.     {
  7278.       a.cB = arrayOfInt1;
  7279.  
  7280.       if (a.calc.distanceTo(localRSTile2) < 3)
  7281.       {
  7282.      
  7283.  
  7284.    a.cB = arrayOfInt2;
  7285.       }
  7286.       else
  7287.       {
  7288.         return a.calc.distanceTo(localRSTile3) < 4 ?
  7289.           a : -1;
  7290.       }
  7291.       int i6;
  7292.       if (a.AA()) {
  7293.         a.n
  7294.  
  7295. ();
  7296.       }
  7297.       else if (a.jA())
  7298.         return 2;
  7299.       Object localObject;
  7300.       int i8;
  7301.       if (a.cB[i6] == 0)
  7302.       {
  7303.         a.lA();
  7304.  
  7305.         if (a.nD == null) {
  7306.        
  7307.  
  7308.   return -1;
  7309.         }
  7310.  
  7311.         localObject = a.G(a.nD);
  7312.  
  7313.         a.vE = (localObject == null ? a.nD : ((RSObject)localObject).getArea().getNearestTile(a.X()));
  7314.  
  7315.         a.l
  7316.  
  7317. (a.vE, 1);
  7318.  
  7319.         a.l(false);
  7320.  
  7321.         a.K(false);
  7322.  
  7323.         if ((a.i(a.X())) && (a.calc.distanceTo(a.vE) < 3))
  7324.         {
  7325.           a.KD = true;
  7326.  
  7327.           break label3590;
  7328.      
  7329.  
  7330.    }
  7331.       }
  7332.       else
  7333.       {
  7334.         a.vE = a.Wd[(a.cB[i6] - 1)];
  7335.  
  7336.         if (a.cB == arrayOfInt2)
  7337.         {
  7338.           a.lA();
  7339.         }
  7340.  
  7341.         localObject = new Timer
  7342.  
  7343. (a.random(45000, 90000));
  7344.  
  7345.         while ((a.Y().getAnimation() != 9516) || (a.calc.distanceTo(a.vE) > 2))
  7346.         {
  7347.           if (!((Timer)localObject).isRunning())
  7348.        
  7349.  
  7350.    {
  7351.             a.uC = "We got stuck";
  7352.  
  7353.             return -1;
  7354.           }
  7355.  
  7356.           if (a.AA())
  7357.           {
  7358.             a.n();
  7359.           }
  7360.           else if (a.jA())
  7361.          
  7362.  
  7363. {
  7364.             return 2;
  7365.           }
  7366.  
  7367.           if ((a.Y().getAnimation() == -1) && (a.l(a.G(a.vE), "Go-through")))
  7368.           {
  7369.             a.sleep(100, 200);
  7370.  
  7371.             if
  7372.  
  7373. ((a.Y().getAnimation() == 9516) && (a.calc.distanceTo(a.vE) < 3))
  7374.               break;
  7375.             a.sleep(200, 300);
  7376.  
  7377.             i8++; continue;
  7378.           }
  7379.  
  7380.          
  7381.  
  7382. while ((!a.calc.tileOnScreen(a.vE)) && (a.Y().isMoving()) && (a.Y().getAnimation() == -1))
  7383.             a.sleep(200, 300);
  7384.         }
  7385.         a.K(true);
  7386.  
  7387.         a.sleep(300,
  7388.  
  7389. 400);
  7390.       }
  7391.  
  7392.       i6++;
  7393.       label3590: RSObject localRSObject8;
  7394.       if ((
  7395.         (localRSObject8 = a.i(new int[] { 49345, 49346, 49347, 54407 })) != null) &&
  7396.  
  7397. (a.calc.distanceTo(localRSObject8) < 3))
  7398.       {
  7399.         if (a.AA())
  7400.         {
  7401.           a.n();
  7402.         }
  7403.         else if (a.jA()) {
  7404.           return -1;
  7405.         }
  7406.  
  7407.         a.l
  7408.  
  7409. (a.i(new int[] { 49345, 49346, 49347, 54407 }), "Open");
  7410.  
  7411.         a.K(false);
  7412.  
  7413.         a.EA();
  7414.  
  7415.         if (a.yd != null)
  7416.         {
  7417.           int i7 = a.yd.getItem().getID();
  7418.  
  7419.  
  7420.  
  7421.         a.l(a.yd);
  7422.  
  7423.           a.sleep(400, 600);
  7424.  
  7425.           i8++;
  7426.         }
  7427.         a.K(false);
  7428.  
  7429.         a.lA();
  7430.       }
  7431.     }
  7432.     a.NA = true;
  7433.  
  7434.     return 1;
  7435.   }
  7436.  
  7437.   private boolean
  7438.  
  7439. l(int arg0, int arg1, int arg2, int arg3)
  7440.   {
  7441.     return true;
  7442.   }
  7443.  
  7444.   private int OA()
  7445.   {
  7446.     int[] arrayOfInt = { 39912, 39913, 39920, 39929, 39931 };
  7447.  
  7448.     boolean bool =
  7449.  
  7450. false;
  7451.  
  7452.     RSObject localRSObject1 = a.i(new int[] { 54565, 54567, 54645 });
  7453.  
  7454.     RSObject localRSObject2 = a.i(new int[] { 49934, 49935, 49936, 53749 });
  7455.  
  7456.     RSObject
  7457.  
  7458. localRSObject3 = a.i(new int[] { 39917, 39928, 39947, 54647 });
  7459.  
  7460.     RSObject localRSObject4 = a.i(new int[] { 54566, 54568, 54570, 54646 });
  7461.  
  7462.     RSObject localRSObject5
  7463.  
  7464. = a.i(new int[] { 54257, 54258, 54259, 54260 });
  7465.  
  7466.     a.jA = a.npcs.getNearest(a.B);
  7467.  
  7468.     if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
  7469.     {
  7470.      
  7471.  
  7472.  if ((!a.QB()) || ((a.HC == 1) && (!a.ZA())))
  7473.       {
  7474.         return 2;
  7475.       }
  7476.     }
  7477.     bool = a.F(a.u) == null;
  7478.  
  7479.     a.A(bool);
  7480.  
  7481.     if (a.hd == null)
  7482.     {
  7483.       a.hd = new
  7484.  
  7485. Timer(a.random(240000, 300000));
  7486.     }
  7487.  
  7488.     do
  7489.     {
  7490.       if (a.jA()) {
  7491.         return 2;
  7492.       }
  7493.  
  7494.       if (!a.j()) {
  7495.         return -1;
  7496.       }
  7497.  
  7498.       a.l(a.vc, 50, 50);
  7499.  
  7500.       if
  7501.  
  7502. (a.i(arrayOfInt) != null)
  7503.       {
  7504.         if (a.inventory.contains(19668))
  7505.         {
  7506.           if (a.l("Climbing hook", a.J(new String[] { "Bridge" })))
  7507.           {
  7508.          
  7509.  
  7510.    a.l(bool);
  7511.  
  7512.             a.K(true);
  7513.  
  7514.             a.sleep(300, 500);
  7515.           }
  7516.         }
  7517.         else if (a.inventory.containsAll(new int[] { 19667, 19664 }))
  7518.         {
  7519.      
  7520.  
  7521.      a.inventory.useItem(a.inventory.getItem(new int[] { 19667 }), a.inventory.getItem(new int[] { 19664 }));
  7522.         }
  7523.         else if ((a.inventory.contains(19665)) &&
  7524.  
  7525. (!a.inventory.contains(19667)))
  7526.         {
  7527.           a.l(localRSObject2, "Spin");
  7528.  
  7529.           a.K(true);
  7530.         }
  7531.         else if ((a.inventory.contains(19663)) && (!
  7532.  
  7533. a.inventory.contains(19664)))
  7534.         {
  7535.           a.l(localRSObject5, "Smith");
  7536.         }
  7537.         else if (!a.inventory.containsOneOf(new int[] { 19665, 19667 }))
  7538.         {
  7539.  
  7540.  
  7541.          a.l(localRSObject4, "Take-from");
  7542.         }
  7543.         else if (!a.inventory.containsOneOf(new int[] { 19663, 19664 }))
  7544.         {
  7545.           a.l(localRSObject1,
  7546.  
  7547. "Take-from");
  7548.         }
  7549.  
  7550.       }
  7551.       else if (a.l(localRSObject3, "Operate"))
  7552.       {
  7553.         a.x();
  7554.  
  7555.         a.K(true);
  7556.  
  7557.         a.sleep(2300, 2700);
  7558.       }
  7559.       a.K(bool);
  7560.    
  7561.  
  7562.  }
  7563.     while (!a.Rc());
  7564.  
  7565.     a.sleep(800, 1100);
  7566.  
  7567.     if (a.M)
  7568.     {
  7569.       a.f();
  7570.     }
  7571.     return 1;
  7572.   }
  7573.  
  7574.   public void mouseMoved(MouseEvent a)
  7575.   {
  7576.     a.Xe = a.getPoint();
  7577.  
  7578.     if
  7579.  
  7580. (a.Pf.contains(a.Xe))
  7581.     {
  7582.       if (a.kc.contains(a.Xe))
  7583.       {
  7584.         a.pA = ((!a.qd ? "Pause" : "Resume") + " iDungeon");
  7585.       }
  7586.       else if (a.Pg.contains(a.Xe)) {
  7587.  
  7588.  
  7589.        a.pA = "Terminate iDungeon";
  7590.       }
  7591.       else if (a.Rb.contains(a.Xe)) {
  7592.         a.pA = "Visit the iDungeon forums";
  7593.       }
  7594.       else if (a.Q.contains(a.Xe))
  7595.      
  7596.  
  7597.  {
  7598.         a.pA = "iDungeon help guide";
  7599.       }
  7600.       else if (a.ag.contains(a.Xe)) {
  7601.         a.pA = "Hide paint";
  7602.       }
  7603.       else
  7604.       {
  7605.         a.pA = "";
  7606.       }
  7607.     }
  7608.    
  7609.  
  7610.  else if (a.dc)
  7611.     {
  7612.       a.Nd = "Choose your settings!";
  7613.  
  7614.       if ((a.uB > 0) && (a.fD.contains(a.Xe))) {
  7615.         a.Nd = "<<< Previous page";
  7616.       }
  7617.       else if
  7618.  
  7619. (a.Vb.contains(a.Xe)) {
  7620.         a.Nd = (a.uB < 5 ? (a.Nd = "Next page >>>") : "Finish the settings");
  7621.       }
  7622.       else if (a.o.contains(a.Xe))
  7623.       {
  7624.         a.Nd =
  7625.  
  7626. "These guys kick ass!";
  7627.       }
  7628.       else if ((a.uB == 0) && (a.DC == 0))
  7629.       {
  7630.         if (a.wA.contains(a.Xe)) {
  7631.           a.Nd = "Set your primary combat to melee";
  7632.    
  7633.  
  7634.      }
  7635.         else if (a.aB.contains(a.Xe)) {
  7636.           a.Nd = "Set your primary combat to range";
  7637.         }
  7638.         else if (a.mC.contains(a.Xe))
  7639.         {
  7640.           a.Nd
  7641.  
  7642. = "Set your secondary combat to melee";
  7643.         }
  7644.         else if (a.fC.contains(a.Xe))
  7645.         {
  7646.           a.Nd = "Set your secondary combat to range";
  7647.         }
  7648.        
  7649.  
  7650. else if (a.lF.contains(a.Xe))
  7651.         {
  7652.           a.Nd = "Set your secondary combat to mage";
  7653.         }
  7654.         else if (a.Ag.contains(a.Xe))
  7655.         {
  7656.           a.Nd =
  7657.  
  7658. "Load your settings on startup";
  7659.         }
  7660.         else if (a.RE.contains(a.Xe)) {
  7661.           a.Nd = "Save your settings for next time";
  7662.         }
  7663.  
  7664.       }
  7665.       else if (a.uB
  7666.  
  7667. == 1)
  7668.       {
  7669.         if (a.xd.contains(a.Xe)) {
  7670.           a.Nd = "General script settings";
  7671.         }
  7672.         else if (a.iC.contains(a.Xe))
  7673.           a.Nd = "Advanced floor
  7674.  
  7675. settings & complexity";
  7676.         else if (a.DC == 1)
  7677.         {
  7678.           if (a.JD.contains(a.Xe)) {
  7679.             a.Nd = "Pick up and bury bones";
  7680.           }
  7681.           else if
  7682.  
  7683. (a.Mb.contains(a.Xe))
  7684.           {
  7685.             a.Nd = "Collect the arrows you use up";
  7686.           }
  7687.           else if (a.JG.contains(a.Xe))
  7688.             a.Nd = "Loot heim
  7689.  
  7690. crabs, for extra hp";
  7691.           else if (a.Dc.contains(a.Xe)) {
  7692.             a.Nd = "Enable protect prayers for bosses";
  7693.           }
  7694.           else if (a.lf.contains(a.Xe))
  7695.  
  7696. {
  7697.             a.Nd = "Use quick prayers in addition";
  7698.           }
  7699.           else if (a.Ye.contains(a.Xe))
  7700.             a.Nd = "Enable this to open prayer doors";
  7701.          
  7702.  
  7703. else if (a.zd.contains(a.Xe))
  7704.           {
  7705.             a.Nd = "Prevents defense training";
  7706.           }
  7707.           else if (a.qF.contains(a.Xe)) {
  7708.             a.Nd = "Switch
  7709.  
  7710. attack styles by weakness";
  7711.           }
  7712.           else if (a.Cd.contains(a.Xe))
  7713.           {
  7714.             a.Nd = "Venture into the Occult";
  7715.           }
  7716.         }
  7717.         else
  7718.  
  7719. if (a.DC == 2)
  7720.         {
  7721.           if ((a.V.contains(a.Xe)) || (a.Ub.contains(a.Xe))) {
  7722.             a.Nd = "Cycle the dungeon complexity";
  7723.           }
  7724.           else if
  7725.  
  7726. ((a.lb.contains(a.Xe)) || (a.p.contains(a.Xe))) {
  7727.             a.Nd = "Select the complexity to rush at";
  7728.           }
  7729.           else if ((a.qf.contains(a.Xe)) ||
  7730.  
  7731. (a.D.contains(a.Xe))) {
  7732.             a.Nd = "Select the floor to rush to";
  7733.           }
  7734.           else if (a.F.contains(a.Xe))
  7735.           {
  7736.             a.Nd = "Intelligently
  7737.  
  7738. reset your progress";
  7739.           }
  7740.           else if (a.bE.contains(a.Xe))
  7741.           {
  7742.             a.Nd = "Paint doors and rooms on the map";
  7743.           }
  7744.           else if
  7745.  
  7746. (a.WB.contains(a.Xe))
  7747.           {
  7748.             a.Nd = "Blacks out all usernames - BETA";
  7749.           }
  7750.           else if (a.gC.contains(a.Xe))
  7751.           {
  7752.             a.Nd =
  7753.  
  7754. "Enable rushing of certain floors";
  7755.           }
  7756.           else if (a.wc.contains(a.Xe))
  7757.           {
  7758.             a.Nd = "Enable food pickup when rushing";
  7759.           }
  7760.        
  7761.  
  7762. }
  7763.       }
  7764.     }
  7765.   }
  7766.  
  7767.   private int NA()
  7768.   {
  7769.     RSNPC localRSNPC = a.i(new String[] { "Mercenary leader" });
  7770.  
  7771.     a.XF = true;
  7772.  
  7773.     a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC,
  7774.  
  7775. true);
  7776.  
  7777.     a.A(false);
  7778.  
  7779.     if (a.jA())
  7780.     {
  7781.       return 2;
  7782.     }
  7783.  
  7784.     if ((
  7785.       (localRSNPC = a.i(new String[] { "Mercenary leader" })) != null) &&
  7786.  
  7787. (localRSNPC.getAnimation() == 710))
  7788.       a.F(localRSNPC, "Attack");
  7789.     else
  7790.       a.F(localRSNPC);
  7791.     if (a.MC)
  7792.     {
  7793.       if (!a.JC())
  7794.       {
  7795.         a.sleep(600, 900);
  7796.  
  7797.  
  7798.     }
  7799.       a.MC = false;
  7800.     }
  7801.  
  7802.     if (a.l(a.UC, 50, 55))
  7803.       a.F(localRSNPC, "Attack");
  7804.     a.sleep(500, 1000);
  7805.  
  7806.     if (a.jA())
  7807.     {
  7808.       return 2;
  7809.     }
  7810.     a.l(false,
  7811.  
  7812. Combat.Prayer.PROTECT_FROM_MAGIC, false);
  7813.  
  7814.     a.XF = false;
  7815.  
  7816.     return 1;
  7817.   }
  7818.  
  7819.   private int qA()
  7820.   {
  7821.     if ((!a.O()) || (!a.L())) {
  7822.       return -1;
  7823.     }
  7824.  
  7825.     int[]
  7826.  
  7827. arrayOfInt1 = { 54504, 54546, 54623 }; int[] arrayOfInt2 = { 54506, 54548, 54625 }; int[] arrayOfInt3 = { 54508, 54550, 54627 }; int[] arrayOfInt4 = { 54510, 54552,
  7828.  
  7829. 54629 };
  7830.  
  7831.     int[][] arrayOfInt5 = { arrayOfInt1, arrayOfInt2, arrayOfInt3, arrayOfInt4 };
  7832.  
  7833.     int[] arrayOfInt6 = { 19869, 19871, 19873, 19875 };
  7834.  
  7835.     String[]
  7836.  
  7837. arrayOfString = { "Blue", "Green", "Yellow", "Violet" };
  7838.  
  7839.     RSArea localRSArea = a.i(a.I).getArea();
  7840.  
  7841.     RSObject localRSObject1 = a.i(new int[] { 35241, 35242, 35243,
  7842.  
  7843. 35245 });
  7844.     int i6;
  7845.     while (!a.KD)
  7846.     {
  7847.       if (a.jA())
  7848.       {
  7849.         return 2;
  7850.       }
  7851.       int i1 = 1;
  7852.       Object localObject1;
  7853.       int i3 = (localObject1 =
  7854.  
  7855. arrayOfInt5).length;
  7856.       int i5;
  7857.       int[] arrayOfInt8 = localObject1[i5];
  7858.       RSObject[] arrayOfRSObject;
  7859.       int i9 = (arrayOfRSObject = a.J
  7860.  
  7861. (arrayOfInt8)).length;
  7862.       int i10;
  7863.       RSObject localRSObject3 = arrayOfRSObject[i10];
  7864.  
  7865.       if (a.D(localRSObject3.getLocation()) == null)
  7866.       {
  7867.         i1 = 0;
  7868.      
  7869.  
  7870.  }
  7871.       else
  7872.       {
  7873.         i10++;
  7874.  
  7875.         i5++;
  7876.       }
  7877.       Object localObject4;
  7878.       if (i1 != 0)
  7879.       {
  7880.         Object localObject2;
  7881.         Object localObject3;
  7882.        
  7883.  
  7884. while (!a.inventory.containsAll(arrayOfInt6))
  7885.         {
  7886.           if (a.jA())
  7887.           {
  7888.             return 2;
  7889.           }
  7890.           if (!a.j())
  7891.           {
  7892.            
  7893.  
  7894. return -1;
  7895.           }
  7896.           a.l(a.vc, 40, 40);
  7897.  
  7898.           localObject1 = "";
  7899.  
  7900.           localObject2 = localRSObject1.getLocation();
  7901.  
  7902.           int i7 = (localObject3 =
  7903.  
  7904. arrayOfString).length;
  7905.           int i8;
  7906.           localObject4 = localObject3[i8];
  7907.  
  7908.           if (a.inventory.getItemID((String)localObject4 + " vial") == -1)
  7909.           {
  7910.  
  7911.  
  7912.           localObject1 = localObject4;
  7913.           }
  7914.           else {
  7915.             i8++;
  7916.           }
  7917.  
  7918.           if (a.interfaces.get(238).isValid()) {
  7919.             a.l
  7920.  
  7921. (a.interfaces.get(238), new String[] { localObject1 });
  7922.           }
  7923.           else if (a.calc.distanceTo((RSTile)localObject2) > 3)
  7924.             a.F((RSTile)localObject2);
  7925.  
  7926.  
  7927.          else if (a.l(localRSObject1, "Take-bottle"))
  7928.           {
  7929.             a.K(true);
  7930.           }
  7931.         }
  7932.         while (a.inventory.containsOneOf(arrayOfInt6))
  7933.        
  7934.  
  7935. {
  7936.           int i2;
  7937.           if (a.jA())
  7938.           {
  7939.             return 2;
  7940.           }
  7941.           if ((localObject2 = a.i(arrayOfInt5[i2])) != null)
  7942.           {
  7943.            
  7944.  
  7945. a.vE = ((RSObject)localObject2).getLocation();
  7946.  
  7947.             if (((localObject3 = a.D(a.vE)) != null) &&
  7948.               (a.inventory.contains(arrayOfInt6[i2])))
  7949.            
  7950.  
  7951. {
  7952.               a.F(((RSNPC)localObject3).getLocation());
  7953.  
  7954.               a.l(arrayOfInt6[i2], (RSNPC)localObject3);
  7955.  
  7956.               a.K(false);
  7957.             }
  7958.           }
  7959.        
  7960.  
  7961.    i2++;
  7962.  
  7963.           a.sleep(200, 400);
  7964.         }
  7965.       }
  7966.       int[][] arrayOfInt7;
  7967.       int i4 = (arrayOfInt7 = arrayOfInt5).length; [I local[I = arrayOfInt7[i6];
  7968.      
  7969.  
  7970. RSObject localRSObject2;
  7971.       if ((localRSObject2 = a.i(local[I)) != null)
  7972.       {
  7973.         a.vE = localRSObject2.getLocation();
  7974.  
  7975.         localObject4 = a.l(a.vE, "block");
  7976.  
  7977.  
  7978.  
  7979.        while ((localObject4 != null) && (a.D(a.vE) == null))
  7980.         {
  7981.           if (a.jA())
  7982.             return 2;
  7983.           if (!a.j()) {
  7984.             return -1;
  7985.           }
  7986.  
  7987.  
  7988.  
  7989.          i10 = 1; int i11 = 1;
  7990.  
  7991.           RSTile localRSTile1 = null; RSTile localRSTile2 = null; RSTile localRSTile3 = null; RSTile localRSTile4 = null; RSTile
  7992.  
  7993. localRSTile5 = ((RSNPC)localObject4).getLocation();
  7994.  
  7995.           int i12 = 0; int i13 = 0; int i14 = localRSTile5.getX(); int i15 = localRSTile5.getY();
  7996.  
  7997.           if (i14 <
  7998.  
  7999. a.vE.getX())
  8000.           {
  8001.             localRSTile1 = new RSTile(i14 + 1, i15);
  8002.  
  8003.             localRSTile2 = new RSTile(i14 + 2, i15);
  8004.  
  8005.             i13 = 1;
  8006.           }
  8007.          
  8008.  
  8009. else if (i14 > a.vE.getX())
  8010.           {
  8011.             localRSTile1 = new RSTile(i14 - 1, i15);
  8012.  
  8013.             localRSTile2 = new RSTile(i14 - 2, i15);
  8014.  
  8015.             i13 = -1;
  8016.      
  8017.  
  8018.      }
  8019.           RSNPC localRSNPC;
  8020.           if (localRSTile1 != null)
  8021.           {
  8022.             i10 = 0;
  8023.  
  8024.             if ((localRSNPC = a.D(localRSTile1)) == null) {
  8025.          
  8026.  
  8027.     a.D(localRSTile2);
  8028.             }
  8029.  
  8030.             if (localRSNPC == null) { if (!localRSArea.contains(new RSTile[] { localRSTile1, localRSTile2 }));
  8031.             }
  8032.          
  8033.  
  8034.   else
  8035.             {
  8036.               a.log("The X pull is blocked!");
  8037.  
  8038.               i10 = 1;
  8039.             }
  8040.  
  8041.           }
  8042.  
  8043.           if (i15 < a.vE.getY())
  8044.           {
  8045.            
  8046.  
  8047. localRSTile3 = new RSTile(i14, i15 + 1);
  8048.  
  8049.             localRSTile4 = new RSTile(i14, i15 + 2);
  8050.  
  8051.             i12 = 1;
  8052.           }
  8053.           else if (i15 > a.vE.getY())
  8054.        
  8055.  
  8056.   {
  8057.             localRSTile3 = new RSTile(i14, i15 - 1);
  8058.  
  8059.             localRSTile4 = new RSTile(i14, i15 - 2);
  8060.  
  8061.             i12 = -1;
  8062.           }
  8063.           if (localRSTile3
  8064.  
  8065. != null)
  8066.           {
  8067.             i11 = 0;
  8068.  
  8069.             if (
  8070.               (localRSNPC = a.D(localRSTile3)) == null)
  8071.               a.D(localRSTile4);
  8072.             if
  8073.  
  8074. (localRSNPC == null)
  8075.             {
  8076.               if (!localRSArea.contains(new RSTile[] { localRSTile3, localRSTile4 }));
  8077.             }
  8078.             else
  8079.             {
  8080.        
  8081.  
  8082.        a.log("The Y pull is blocked!");
  8083.  
  8084.               i11 = 1;
  8085.             }
  8086.           }
  8087.           if (i10 == 0)
  8088.           {
  8089.             a.F(localRSTile5, i13, 0);
  8090.  
  8091.            
  8092.  
  8093.  if (a.l((RSNPC)localObject4, "Pull"))
  8094.             {
  8095.               a.l(true);
  8096.  
  8097.               a.K(true);
  8098.             }
  8099.             else
  8100.             {
  8101.               a.sleep(200,
  8102.  
  8103. 400);
  8104.             }
  8105.  
  8106.           }
  8107.           else if (i11 == 0)
  8108.           {
  8109.             a.F(localRSTile5, 0, i12);
  8110.  
  8111.             if (a.l((RSNPC)localObject4, "Pull"))
  8112.            
  8113.  
  8114. {
  8115.               a.l(true);
  8116.  
  8117.               a.K(true);
  8118.             }
  8119.             else
  8120.             {
  8121.               a.sleep(200, 400);
  8122.             }
  8123.  
  8124.           }
  8125.           else
  8126.        
  8127.  
  8128.    {
  8129.             a.log("No good pull tile found, trying another statue!");
  8130.  
  8131.             break;
  8132.           }
  8133.         }
  8134.       }
  8135.       i6++;
  8136.     }
  8137.  
  8138.     a.lA();
  8139.  
  8140.     a.F(a.nD);
  8141.  
  8142.    
  8143.  
  8144. return 1;
  8145.   }
  8146.  
  8147.   private void vA()
  8148.   {
  8149.     for (Iterator localIterator = a.ID.iterator(); localIterator.hasNext(); ) { int i1 = ((Integer)localIterator.next()).intValue();
  8150.  
  8151.  
  8152.     RSObject localRSObject;
  8153.       RSTile localRSTile = localRSObject.getLocation();
  8154.  
  8155.       if (!a.J.contains(localRSTile))
  8156.       {
  8157.         int i3;
  8158.         a.J.add
  8159.  
  8160. (localRSObject.getLocation());
  8161.  
  8162.         i3++;
  8163.  
  8164.         i2++;
  8165.       }
  8166.     }
  8167.     int i2;
  8168.   }
  8169.  
  8170.   private int xA()
  8171.   {
  8172.     int[] arrayOfInt = { 50762, 51313, 51861, 54889 };
  8173.  
  8174.     int i1
  8175.  
  8176. = 0; int i2 = 0; int i3 = 0;
  8177.     int i4;
  8178.     RSNPC localRSNPC1 = a.D(new int[] { a.fb[i4] });
  8179.  
  8180.     RSNPC localRSNPC2 = a.D(new int[] { a.OB[i4] });
  8181.     RSTile localRSTile1;
  8182.  
  8183.  
  8184.    int i6;
  8185.     if ((localRSNPC1 != null) && (localRSNPC2 != null))
  8186.     {
  8187.       localRSTile1 = a.l(localRSNPC2.getLocation(), arrayOfInt);
  8188.  
  8189.       RSTile localRSTile2 = a.l
  8190.  
  8191. (localRSNPC1.getLocation(), arrayOfInt);
  8192.  
  8193.       if ((localRSTile1 == null) || (localRSTile2 == null)) {
  8194.         return -1;
  8195.       }
  8196.  
  8197.       i6 = localRSTile1.getX() -
  8198.  
  8199. localRSTile2.getX();
  8200.  
  8201.       int i7 = localRSTile1.getY() - localRSTile2.getY();
  8202.  
  8203.       if (Math.abs(i6) > Math.abs(i7)) {
  8204.         i1 = i6 > 0 ? -7 : 7;
  8205.       }
  8206.       else if
  8207.  
  8208. (Math.abs(i6) < Math.abs(i7)) {
  8209.         i2 = i7 > 0 ? -7 : 7;
  8210.       }
  8211.       else
  8212.       {
  8213.         return -1;
  8214.       }
  8215.  
  8216.     }
  8217.     else
  8218.     {
  8219.       i4++;
  8220.     }
  8221.  
  8222.     while (!a.KD)
  8223.     {
  8224.    
  8225.  
  8226.    if (a.jA())
  8227.       {
  8228.         return 2;
  8229.       }
  8230.       localRSNPC1 = a.npcs.getNearest(new int[] { a.fb[i4] });
  8231.  
  8232.       localRSNPC2 = a.npcs.getNearest(new int[] { a.OB[i4]
  8233.  
  8234. });
  8235.  
  8236.       if ((localRSNPC1 != null) && (localRSNPC2 != null))
  8237.       {
  8238.         localRSTile1 = localRSNPC2.getLocation();
  8239.  
  8240.         a.vE = new RSTile(localRSTile1.getX() + i1,
  8241.  
  8242. localRSTile1.getY() + i2);
  8243.  
  8244.         if (localRSNPC1 != null)
  8245.         {
  8246.           if (a.jA()) {
  8247.             return 2;
  8248.           }
  8249.  
  8250.           if (a.KD)
  8251.             break;
  8252.          
  8253.  
  8254.  int i5 = 1; i6 = 1;
  8255.  
  8256.           RSTile localRSTile3 = null; RSTile localRSTile4 = null; RSTile localRSTile5 = null; RSTile localRSTile6 = null; RSTile localRSTile7 =
  8257.  
  8258. localRSNPC1.getLocation();
  8259.  
  8260.           int i8 = 0; int i9 = 0; int i10 = localRSTile7.getX(); int i11 = localRSTile7.getY();
  8261.  
  8262.           if (i10 < a.vE.getX())
  8263.           {
  8264.    
  8265.  
  8266.         localRSTile3 = new RSTile(i10 + 1, i11);
  8267.  
  8268.             localRSTile4 = new RSTile(i10 - 1, i11);
  8269.  
  8270.             i9 = -1;
  8271.           }
  8272.           else if (i10 > a.vE.getX
  8273.  
  8274. ())
  8275.           {
  8276.             localRSTile3 = new RSTile(i10 - 1, i11);
  8277.  
  8278.             localRSTile4 = new RSTile(i10 + 1, i11);
  8279.  
  8280.             i9 = 1;
  8281.           }
  8282.           RSNPC
  8283.  
  8284. localRSNPC3;
  8285.           RSNPC localRSNPC4;
  8286.           if (localRSTile3 != null)
  8287.           {
  8288.             i5 = 0;
  8289.  
  8290.             localRSNPC3 = a.D(localRSTile3); localRSNPC4 =
  8291.  
  8292. a.D(localRSTile4);
  8293.  
  8294.             if ((localRSNPC3 != null) || (localRSNPC4 != null))
  8295.               i5 = 1;
  8296.           }
  8297.           if (i11 < a.vE.getY())
  8298.           {
  8299.            
  8300.  
  8301. localRSTile5 = new RSTile(i10, i11 + 1);
  8302.  
  8303.             localRSTile6 = new RSTile(i10, i11 - 1);
  8304.  
  8305.             i8 = -1;
  8306.           }
  8307.           else if (i11 > a.vE.getY())
  8308.        
  8309.  
  8310.   {
  8311.             localRSTile5 = new RSTile(i10, i11 - 1);
  8312.  
  8313.             localRSTile6 = new RSTile(i10, i11 + 1);
  8314.  
  8315.             i8 = 1;
  8316.           }
  8317.  
  8318.           if (localRSTile5 !=
  8319.  
  8320. null)
  8321.           {
  8322.             i6 = 0;
  8323.  
  8324.             localRSNPC3 = a.D(localRSTile5); localRSNPC4 = a.D(localRSTile6);
  8325.  
  8326.             if ((localRSNPC3 != null) || (localRSNPC4
  8327.  
  8328. != null))
  8329.             {
  8330.               i6 = 1;
  8331.             }
  8332.           }
  8333.           if (i3 > 30)
  8334.           {
  8335.             a.uC = "No pushable statue found";
  8336.  
  8337.             return -
  8338.  
  8339. 1;
  8340.           }
  8341.  
  8342.           if (i5 == 0)
  8343.           {
  8344.             a.l(localRSTile7, i9, 0);
  8345.  
  8346.             if (a.l(localRSNPC1, "Push"))
  8347.             {
  8348.               a.K(true);
  8349.  
  8350.        
  8351.  
  8352.        i3 = 0;
  8353.             }
  8354.           }
  8355.           else if (i6 == 0)
  8356.           {
  8357.             a.l(localRSTile7, 0, i8);
  8358.  
  8359.             if (a.l(localRSNPC1, "Push"))
  8360.             {
  8361.  
  8362.  
  8363.              a.K(true);
  8364.  
  8365.               i3 = 0;
  8366.             }
  8367.           }
  8368.           else
  8369.           {
  8370.             i3++;
  8371.  
  8372.             break label798;
  8373.           }
  8374.  
  8375.           a.sleep
  8376.  
  8377. (300, 500);
  8378.         }
  8379.       }
  8380.       label798: i4++;
  8381.     }
  8382.  
  8383.     if (!a.ZA())
  8384.       return 2;
  8385.     return 1;
  8386.   }
  8387.  
  8388.   private void VA()
  8389.   {
  8390.     a.ob.clear();
  8391.  
  8392.     for (Object localObject1
  8393.  
  8394. = a.zc.iterator(); ((Iterator)localObject1).hasNext(); )
  8395.     {
  8396.       int i1 = (localObject2 = (RSObject)((Iterator)localObject1).next())
  8397.         .getID();
  8398.  
  8399.      
  8400.  
  8401. localObject3 = ((RSObject)localObject2).getLocation();
  8402.  
  8403.       a.fc.add(localObject3);
  8404.  
  8405.       a.ob.add(localObject3);
  8406.  
  8407.       a.J.add(localObject3);
  8408.  
  8409.       a.GB.add
  8410.  
  8411. (localObject3);
  8412.  
  8413.       a.ob.add(localObject3);
  8414.  
  8415.       a.J.add(localObject3);
  8416.  
  8417.       int i2 = (localObject4 = a.Cf).length;
  8418.       int i3;
  8419.       int[] arrayOfInt = localObject4
  8420.  
  8421. [i3];
  8422.  
  8423.       a.ob.add(localObject3);
  8424.  
  8425.       a.ID.add(Integer.valueOf(i1));
  8426.  
  8427.       a.vF.add(localObject3);
  8428.  
  8429.       i3++;
  8430.  
  8431.       if (a.Zc > 4)
  8432.       {
  8433.         if (a.l(i1, a.mD))
  8434.      
  8435.  
  8436.   {
  8437.           a.gc.add(localObject3);
  8438.         }
  8439.         else if (a.l(i1, a.Af))
  8440.         {
  8441.           if (a.kd)
  8442.             a.gc.add(localObject3);
  8443.           else {
  8444.            
  8445.  
  8446. a.fG.add(localObject3);
  8447.           }
  8448.  
  8449.         }
  8450.         else if (a.l(i1, a.rg))
  8451.         {
  8452.           if (!a.xe)
  8453.           {
  8454.             a.fG.add(localObject3);
  8455.  
  8456.             a.gE =
  8457.  
  8458. true;
  8459.           }
  8460.           else
  8461.           {
  8462.             a.gc.add(localObject3);
  8463.           }
  8464.         }
  8465.         else if (a.l(i1, a.Yf))
  8466.         {
  8467.           a.id.add
  8468.  
  8469. (localObject3);
  8470.  
  8471.           a.ob.add(localObject3);
  8472.  
  8473.           a.J.add(localObject3);
  8474.         }
  8475.         else if (a.l(i1, a.tD))
  8476.         {
  8477.           if (a.kd)
  8478.           {
  8479.          
  8480.  
  8481.    a.id.add(localObject3);
  8482.  
  8483.             a.ob.add(localObject3);
  8484.  
  8485.             a.J.add(localObject3);
  8486.           }
  8487.           else
  8488.           {
  8489.             a.fG.add(localObject3);
  8490.  
  8491.  
  8492.         }
  8493.  
  8494.         }
  8495.         else if (a.l(i1, a.sb))
  8496.         {
  8497.           a.ob.add(localObject3);
  8498.  
  8499.           a.J.add(localObject3);
  8500.         }
  8501.       }
  8502.     }
  8503.     Object
  8504.  
  8505. localObject3;
  8506.     Object localObject4;
  8507.     a.AG.clear();
  8508.  
  8509.     a.zc.clear();
  8510.  
  8511.     localObject1 = new ArrayList();
  8512.  
  8513.     for (Object localObject2 = a.fG.iterator(); ((Iterator)
  8514.  
  8515. localObject2).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject2).next();
  8516.  
  8517.       if (a.ZA.contains(new RSTile[] { localRSTile }))
  8518.       {
  8519.         for
  8520.  
  8521. (localObject3 = a.ob.iterator(); ((Iterator)localObject3).hasNext(); ) { localObject4 = (RSTile)((Iterator)localObject3).next();
  8522.  
  8523.           if (a.calc.distanceBetween
  8524.  
  8525. ((RSTile)localObject4, localRSTile) < 4.0D)
  8526.             ((ArrayList)localObject1).add(localObject4);
  8527.         }
  8528.       }
  8529.     }
  8530.     RSTile localRSTile;
  8531.     a.fG.addAll
  8532.  
  8533. ((Collection)localObject1);
  8534.  
  8535.     a.fA.addAll((Collection)localObject1);
  8536.  
  8537.     a.ob.removeAll(a.fG);
  8538.  
  8539.     a.J.removeAll(a.fG);
  8540.  
  8541.     a.fA.addAll(a.gc);
  8542.  
  8543.     a.fA.addAll(a.vF);
  8544.  
  8545.    
  8546.  
  8547. a.fA.addAll(a.ob);
  8548.  
  8549.     a.Bd.addAll(a.ob);
  8550.  
  8551.     if (a.nD != null)
  8552.     {
  8553.       a.w.add(a.nD);
  8554.  
  8555.       a.J.remove(a.nD);
  8556.  
  8557.       a.QA = a.nD;
  8558.     }
  8559.     else if (a.Nc.size() > 1)
  8560.     {
  8561.  
  8562.  
  8563.     a.log.severe("Near door was null when reassigning.");
  8564.     }
  8565.   }
  8566.  
  8567.   private int yA()
  8568.   {
  8569.     int[] arrayOfInt1 = { 12125, 12133, 12141, 12149 }; int[] arrayOfInt2 = {
  8570.  
  8571. 12126, 12134, 12142, 12150 }; int[] arrayOfInt3 = { 12127, 12135, 12143, 12151 };
  8572.  
  8573.     int[] arrayOfInt4 = { 12128, 12136, 12144, 12152 }; int[] arrayOfInt5 = { 12129,
  8574.  
  8575. 12137, 12145, 12153 }; int[] arrayOfInt6 = { 12130, 12138, 12146, 12154 };
  8576.  
  8577.     int[] arrayOfInt7 = { 12131, 12139, 12147, 12155 }; int[] arrayOfInt8 = { 12132, 12140,
  8578.  
  8579. 12148, 12156 }; Object localObject = null;
  8580.  
  8581.     int[][] arrayOfInt9 = { arrayOfInt1, arrayOfInt2, arrayOfInt3 };
  8582.  
  8583.     int[][] arrayOfInt10 = { arrayOfInt4, arrayOfInt5,
  8584.  
  8585. arrayOfInt6 };
  8586.  
  8587.     int[][] arrayOfInt11 = { arrayOfInt7, arrayOfInt8, localObject };
  8588.  
  8589.     int[][][] arrayOfInt = { arrayOfInt9, arrayOfInt10, arrayOfInt11 };
  8590.  
  8591.     int[]
  8592.  
  8593. arrayOfInt12 = { 54321, 54322, 54323 };
  8594.     RSTile localRSTile1;
  8595.     if (
  8596.       (localRSTile1 = a.F(a.y, arrayOfInt12)) == null) {
  8597.       return -1;
  8598.     }
  8599.  
  8600.     int i1 =
  8601.  
  8602. localRSTile1.getX(); int i2 = localRSTile1.getY();
  8603.  
  8604.     RSTile[] arrayOfRSTile1 = { new RSTile(i1 + 1, i2 + 5), new RSTile(i1 + 3, i2 + 5), new RSTile(i1 + 5, i2 + 5) };
  8605.  
  8606.  
  8607.  
  8608.    RSTile[] arrayOfRSTile2 = { new RSTile(i1 + 1, i2 + 3), new RSTile(i1 + 3, i2 + 3), new RSTile(i1 + 5, i2 + 3) };
  8609.  
  8610.     RSTile[] arrayOfRSTile3 = { new RSTile(i1 + 1,
  8611.  
  8612. i2 + 1), new RSTile(i1 + 3, i2 + 1), new RSTile(i1 + 5, i2 + 1) };
  8613.  
  8614.     RSTile[][] arrayOfRSTile; = { arrayOfRSTile1, arrayOfRSTile2, arrayOfRSTile3 };
  8615.  
  8616.     if (a.jA())
  8617.    
  8618.  
  8619. {
  8620.       return 2;
  8621.     }
  8622.  
  8623.     if (!a.j()) {
  8624.       return -1;
  8625.     }
  8626.  
  8627.     a.l(a.vc, 40, 50);
  8628.     int i3;
  8629.     if ((i3 = 0) < arrayOfRSTile;.length)
  8630.     {
  8631.       int i4;
  8632.       RSTile
  8633.  
  8634. localRSTile2 = arrayOfRSTile;[i3][i4];
  8635.  
  8636.       if (a.D(localRSTile2) == null)
  8637.       {
  8638.         a.vE = localRSTile2;
  8639.  
  8640.         a.A(a.vE, "Move");
  8641.  
  8642.         RSNPC localRSNPC = a.D
  8643.  
  8644. (arrayOfInt[i3][i4]);
  8645.  
  8646.         if (a.F(localRSNPC, "Move"))
  8647.         {
  8648.           a.K(true);
  8649.           while (true) {
  8650.             a.sleep(200, 300);
  8651.           }
  8652.  
  8653.         }
  8654.  
  8655.       }
  8656.  
  8657.  
  8658.      else
  8659.       {
  8660.         i4++;
  8661.  
  8662.         i3++;
  8663.       }
  8664.  
  8665.     }
  8666.  
  8667.     a.sleep(200, 300);
  8668.  
  8669.     return 1;
  8670.   }
  8671.  
  8672.   private int nA()
  8673.   {
  8674.     RSObject localRSObject = a.i(new int[] { 49543,
  8675.  
  8676. 49544, 49545, 53995 });
  8677.  
  8678.     String str = "";
  8679.  
  8680.     if (a.jA())
  8681.     {
  8682.       return 2;
  8683.     }
  8684.     if (!a.j()) {
  8685.       return -1;
  8686.     }
  8687.  
  8688.     int i1 = a.inventory.getItemID("Spare
  8689.  
  8690. construct " + str + " (u)");
  8691.  
  8692.     RSNPC localRSNPC2 = a.i(new String[] { "Dormant construct" });
  8693.  
  8694.     a.l(a.vc, 50, 55);
  8695.  
  8696.     if (str.isEmpty())
  8697.     {
  8698.       if (!
  8699.  
  8700. a.SE.contains("missing")) if (a.F(a.i(new String[] { "construct" }), "Examine"))
  8701.         {
  8702.           a.K(true);
  8703.         }
  8704.  
  8705.  
  8706.       if (a.SE.contains("arm"))
  8707.         str =
  8708.  
  8709. "arm";
  8710.       else if (a.SE.contains("leg"))
  8711.       {
  8712.         str = "leg";
  8713.       }
  8714.       else if (a.SE.contains("head"))
  8715.       {
  8716.         str = "head";
  8717.       }
  8718.  
  8719.       if (!
  8720.  
  8721. str.isEmpty())
  8722.       {
  8723.         a.log("Construct is missing its " + str + ".");
  8724.       }
  8725.     }
  8726.     else if (localRSNPC2 != null)
  8727.     {
  8728.       if (a.F(localRSNPC2, "Charge"))
  8729.      
  8730.  
  8731.  {
  8732.         a.K(true);
  8733.  
  8734.         a.sleep(1000, 1500);
  8735.       }
  8736.  
  8737.     }
  8738.     else if ((i1 > 0) && (a.inventory.contains(i1)))
  8739.     {
  8740.       a.inventory.getItem(new int[] { i1
  8741.  
  8742. }).doAction("Imbue");
  8743.     }
  8744.     else if (a.inventory.getItemID("Spare construct " + str) != -1)
  8745.     {
  8746.       if (a.F(a.i(new String[] { "construct" }), "Repair"))
  8747.       {
  8748.    
  8749.  
  8750.     a.K(true);
  8751.  
  8752.         a.sleep(1000, 1500);
  8753.       }
  8754.  
  8755.     }
  8756.     else if (a.interfaces.get(451).isValid())
  8757.     {
  8758.       if (a.l(a.interfaces.get(451), new String[] { str }))
  8759.      
  8760.  
  8761.  {
  8762.         a.sleep(400, 600);
  8763.       }
  8764.  
  8765.     }
  8766.     else if (a.inventory.containsAll(new int[] { 17364, 17444 }))
  8767.     {
  8768.       a.inventory.getItem(new int[] { 17364 }).doAction
  8769.  
  8770. ("Carve");
  8771.  
  8772.       a.sleep(400, 600);
  8773.     }
  8774.     else if (!a.inventory.contains(17444))
  8775.     {
  8776.       a.l(a.groundItems.getNearest(new int[] { 17444 }));
  8777.     }
  8778.     else if (!
  8779.  
  8780. a.inventory.contains(17364))
  8781.     {
  8782.       a.l(localRSObject, "Take");
  8783.  
  8784.       a.sleep(400, 600);
  8785.     }
  8786.     a.K(true);
  8787.  
  8788.     a.lA();
  8789.  
  8790.     RSNPC localRSNPC1 = a.i(new String[] {
  8791.  
  8792. "Magic construct" });
  8793.     int i2;
  8794.     if ((i2 = 0) < 40)
  8795.     {
  8796.       if ((localRSNPC1 == null) || (a.nD == null))
  8797.       {
  8798.         if (i2 > 20)
  8799.         {
  8800.           break
  8801.  
  8802. label800;
  8803.         }
  8804.       }
  8805.       else
  8806.       {
  8807.         RSTile localRSTile;
  8808.         if (a.calc.distanceTo(localRSTile) > a.random(5, 8))
  8809.         {
  8810.           a.A(localRSTile,
  8811.  
  8812. 1);
  8813.         }
  8814.         else if (!a.JC()) {
  8815.           a.sleep(400, 1000);
  8816.         }
  8817.  
  8818.       }
  8819.  
  8820.       a.sleep(600, 800);
  8821.  
  8822.       i2++;
  8823.     }
  8824.  
  8825.     label800: return 1;
  8826.   }
  8827.  
  8828.   private int QA
  8829.  
  8830. ()
  8831.   {
  8832.     int[] arrayOfInt1 = { 49619, 49620, 49621, 49622, 49623, 49624 };
  8833.  
  8834.     int[] arrayOfInt2 = { 49609, 49610, 49611 };
  8835.  
  8836.     RSTile localRSTile1 = a.tA();
  8837.  
  8838.     a.lA();
  8839.  
  8840.  
  8841.  
  8842.   if ((localRSTile1 == null) || (a.nD == null))
  8843.     {
  8844.       return -1;
  8845.     }
  8846.  
  8847.     RSTile localRSTile2 = a.r.getCentralTile();
  8848.  
  8849.     if (a.jA())
  8850.     {
  8851.       return 2;
  8852.     }
  8853.     if
  8854.  
  8855. (!a.j())
  8856.     {
  8857.       return -1;
  8858.     }
  8859.     a.l(a.vc, 40, 50);
  8860.  
  8861.     a.EA();
  8862.  
  8863.     if (a.AB.contains("reengage"))
  8864.     {
  8865.       a.lA();
  8866.     }
  8867.     if ((a.yd != null) && (a.l
  8868.  
  8869. (a.yd.getLocation(), false)))
  8870.     {
  8871.       a.l(a.yd);
  8872.     }
  8873.     else
  8874.     {
  8875.       RSObject localRSObject1;
  8876.       RSObject localRSObject2;
  8877.       RSObject localRSObject3;
  8878.       if
  8879.  
  8880. ((a.calc.distanceTo(a.nD) > 4) && (!a.l(localRSTile2, false)))
  8881.       {
  8882.         a.vE = localRSTile2;
  8883.  
  8884.         if ((localRSObject1 = a.l(arrayOfInt2)) != null)
  8885.         {
  8886.      
  8887.  
  8888.     if (a.kd)
  8889.           {
  8890.             a.l(localRSObject1, "Repair");
  8891.  
  8892.             if ((!a.x()) && (!a.x())) {
  8893.               a.l(localRSObject1, "Repair");
  8894.             }
  8895.  
  8896.      
  8897.  
  8898.     }
  8899.           else
  8900.           {
  8901.             a.A(localRSTile2, 1);
  8902.           }
  8903.         }
  8904.         else if (
  8905.           (localRSObject2 = a.i(localRSTile1, arrayOfInt1)) !=
  8906.  
  8907. null)
  8908.         {
  8909.           a.l(localRSObject2, "Destroy");
  8910.         }
  8911.         else if (
  8912.           (localRSObject3 = a.i(localRSTile1, a.Yd)) != null)
  8913.         {
  8914.           a.l
  8915.  
  8916. (localRSObject3, "Destroy");
  8917.  
  8918.           if ((a.x()) || (a.x()))
  8919.           {
  8920.             localRSObject1 = a.i(arrayOfInt2);
  8921.  
  8922.             if ((a.kd) && (localRSObject1 !=
  8923.  
  8924. null) && (a.calc.distanceTo(localRSObject1.getLocation()) < 3))
  8925.             {
  8926.               a.l(localRSObject1, "Repair");
  8927.  
  8928.               if (!a.x())
  8929.               {
  8930.        
  8931.  
  8932.         a.l(localRSObject1, "Repair");
  8933.               }
  8934.             }
  8935.             else
  8936.             {
  8937.               a.A(localRSTile2, 1);
  8938.             }
  8939.  
  8940.           }
  8941.  
  8942.         }
  8943.  
  8944.      
  8945.  
  8946.  }
  8947.       else
  8948.       {
  8949.         a.vE = a.nD;
  8950.  
  8951.         if (((localRSObject1 = a.i(a.vE, arrayOfInt1)) == null) ||
  8952.           (!a.F(localRSObject1)))
  8953.         {
  8954.           if (
  8955.      
  8956.  
  8957.       (localRSObject2 = a.i(a.vE, a.Yd)) != null)
  8958.           {
  8959.             a.l(localRSObject2, "Destroy");
  8960.  
  8961.             a.K(true);
  8962.  
  8963.             localRSObject3 = a.l
  8964.  
  8965. (arrayOfInt2);
  8966.  
  8967.             if ((a.kd) && (localRSObject3 != null))
  8968.             {
  8969.               a.l(localRSObject3, "Repair");
  8970.  
  8971.               a.sleep(400, 600);
  8972.  
  8973.              
  8974.  
  8975. a.l(localRSObject3, "Repair");
  8976.             }
  8977.             else
  8978.             {
  8979.               a.l(localRSObject1, "Destroy");
  8980.             }
  8981.           }
  8982.         }
  8983.         else if
  8984.  
  8985. (a.l(localRSObject1, "Destroy")) {
  8986.           a.K(true);
  8987.         }
  8988.         else
  8989.         {
  8990.           a.A(a.vE, 1);
  8991.         }
  8992.       }
  8993.     }
  8994.     a.K(true);
  8995.  
  8996.     a.NA = true;
  8997.  
  8998.    
  8999.  
  9000. return 1;
  9001.   }
  9002.  
  9003.   private boolean l(int a, int[] a)
  9004.   {
  9005.     int i2;
  9006.     if ((a != null) && (a > 0))
  9007.     {
  9008.       int[] arrayOfInt;
  9009.       int i1 = (arrayOfInt = a).length; int i3
  9010.  
  9011. = arrayOfInt[i2];
  9012.  
  9013.       if (a == i3)
  9014.         return true;
  9015.       i2++;
  9016.     }
  9017.  
  9018.     return false;
  9019.   }
  9020.  
  9021.   private RSTile tA()
  9022.   {
  9023.     Object localObject;
  9024.     if (!a.fc.isEmpty()) {
  9025.    
  9026.  
  9027.   for (localObject = a.fc.iterator(); ((Iterator)localObject).hasNext(); ) { RSTile localRSTile = (RSTile)((Iterator)localObject).next();
  9028.  
  9029.         if (a.r.contains(new
  9030.  
  9031. RSTile[] { localRSTile })) {
  9032.           return localRSTile;
  9033.         }
  9034.  
  9035.       }
  9036.  
  9037.     }
  9038.     else if ((localObject = a.i(a.XE)) != null) {
  9039.       return ((RSObject)
  9040.  
  9041. localObject).getLocation();
  9042.     }
  9043.  
  9044.     return (RSTile)null;
  9045.   }
  9046.  
  9047.   private boolean zA()
  9048.   {
  9049.     a.Qc = "Opening a standard door";
  9050.  
  9051.     if (a.ZA != null);
  9052.     if ((a.jA()) ||
  9053.  
  9054. (a.nD == null)) {
  9055.       return false;
  9056.     }
  9057.  
  9058.     a.uA();
  9059.  
  9060.     if (a.FA != null) if (a.FA.contains(new RSTile[] { a.nD }))
  9061.       {
  9062.         if (a.calc.distanceTo(a.nD) > 4)
  9063.      
  9064.  
  9065.   {
  9066.           a.SE = "";
  9067.         }
  9068.         else if (a.SE.contains("guardians"))
  9069.         {
  9070.           if (a.npcs.getNearest(a.B) != null)
  9071.           {
  9072.             if ((!a.QB())
  9073.  
  9074. || (!a.ZA())) {
  9075.               return false;
  9076.             }
  9077.  
  9078.           }
  9079.           else
  9080.           {
  9081.             a.log("Undetectable Guardians, removing door.");
  9082.  
  9083.            
  9084.  
  9085. a.fG.add(a.nD);
  9086.  
  9087.             a.Bd.remove(a.nD);
  9088.  
  9089.             a.w.remove(a.nD);
  9090.  
  9091.             a.J.remove(a.nD);
  9092.  
  9093.             return true;
  9094.           }
  9095.  
  9096.           a.SE = "";
  9097.         }
  9098.  
  9099.  
  9100.        else if ((a.MC) && (a.calc.tileOnScreen(a.nD)))
  9101.         {
  9102.           if (a.calc.distanceTo(a.nD) < 4)
  9103.           {
  9104.             a.camera.moveRandomly(a.random(800,
  9105.  
  9106. 1400));
  9107.  
  9108.             a.A(a.nD, "");
  9109.           }
  9110.           else
  9111.           {
  9112.             a.l(a.nD, 1);
  9113.           }
  9114.           a.MC = false;
  9115.         }
  9116.         else
  9117.         {
  9118.          
  9119.  
  9120. if ((a.SE.contains("not open")) || (a.SE.contains("won't open")))
  9121.           {
  9122.             a.log("Undetected puzzle door, removing!");
  9123.  
  9124.             if (a.UA)
  9125.             {
  9126.    
  9127.  
  9128.            a.env.saveScreenshot(false);
  9129.             }
  9130.  
  9131.             a.fG.add(a.nD);
  9132.  
  9133.             a.Bd.remove(a.nD);
  9134.  
  9135.             a.J.remove(a.nD);
  9136.  
  9137.             a.Q();
  9138.  
  9139.            
  9140.  
  9141. return true;
  9142.           }
  9143.           if (a.SE.contains("don't have the correct"))
  9144.           {
  9145.             a.log.severe("Hmm.. we got tricked, we don't have the right key!");
  9146.  
  9147.  
  9148.  
  9149.            a.fG.add(a.nD);
  9150.  
  9151.             a.fG.add(a.WA);
  9152.  
  9153.             a.J.remove(a.nD);
  9154.  
  9155.             return true;
  9156.           }
  9157.         }
  9158.         if (a.l(a.G(a.nD)))
  9159.         {
  9160.      
  9161.  
  9162.     a.K(false);
  9163.  
  9164.           if (a.i(false))
  9165.           {
  9166.             return true;
  9167.           }
  9168.         }
  9169.         else
  9170.         {
  9171.           a.sleep(100, 200);
  9172.         }
  9173.  
  9174.       }
  9175.  
  9176.  
  9177.    
  9178.  
  9179. a.sleep(100, 200);
  9180.  
  9181.     return true;
  9182.   }
  9183.  
  9184.   private boolean A(RSTile a, int a)
  9185.   {
  9186.     if (a.i(a, a))
  9187.     {
  9188.       a.l(false);
  9189.  
  9190.       return true;
  9191.     }
  9192.  
  9193.     return false;
  9194.   }
  9195.  
  9196.  
  9197.  
  9198. private boolean l(RSInterface a, String[] a)
  9199.   {
  9200.     int i2;
  9201.     if ((a != null) && (a.isValid()))
  9202.     {
  9203.       RSComponent[] arrayOfRSComponent;
  9204.       int i1 =
  9205.  
  9206. (arrayOfRSComponent = a.getComponents()).length; RSComponent localRSComponent = arrayOfRSComponent[i2];
  9207.       String[] arrayOfString;
  9208.       int i3 = (arrayOfString =
  9209.  
  9210. a).length;
  9211.       int i4;
  9212.       String str = arrayOfString[i4];
  9213.  
  9214.       if (localRSComponent.getText().toLowerCase().contains(str.toLowerCase()))
  9215.       {
  9216.         return
  9217.  
  9218. localRSComponent.doClick();
  9219.       }
  9220.       i4++;
  9221.  
  9222.       i2++;
  9223.     }
  9224.     return false;
  9225.   }
  9226.  
  9227.   private boolean PA()
  9228.   {
  9229.     if ((!a.Y().isMoving()) && (a.FA != null))
  9230.     {
  9231.       if
  9232.  
  9233. ((a.Qc.contains("Opening")) && (a.nD != null) && (a.calc.distanceTo(a.nD) < 6)) {
  9234.         return false;
  9235.       }
  9236.  
  9237.       RSTile localRSTile1 = null; RSTile localRSTile2 =
  9238.  
  9239. null;
  9240.  
  9241.       if (a.jA != null)
  9242.       {
  9243.         if (a.jA.isInCombat()) {
  9244.           return false;
  9245.         }
  9246.  
  9247.         localRSTile1 = a.jA.getLocation();
  9248.  
  9249.         if
  9250.  
  9251. (a.calc.distanceBetween(a.X(), localRSTile1) <= 1.0D) {
  9252.           return false;
  9253.         }
  9254.  
  9255.       }
  9256.  
  9257.       if (a.yd != null)
  9258.       {
  9259.         localRSTile2 = a.yd.getLocation();
  9260.  
  9261.  
  9262.  
  9263.       if (a.calc.distanceBetween(a.X(), localRSTile2) <= 1.0D)
  9264.         {
  9265.           return false;
  9266.         }
  9267.       }
  9268.       Object localObject;
  9269.       RSTile localRSTile3;
  9270.      
  9271.  
  9272. RSObject localRSObject;
  9273.       if ((a.i(a.X())) || (a.i(localRSTile1)) || (a.i(localRSTile2)))
  9274.       {
  9275.         for (localObject = a.vF.iterator(); ((Iterator)
  9276.  
  9277. localObject).hasNext(); ) { localRSTile3 = (RSTile)((Iterator)localObject).next();
  9278.  
  9279.           if ((a.FA.contains(new RSTile[] { localRSTile3 })) && (a.fA.contains
  9280.  
  9281. (localRSTile3)))
  9282.           {
  9283.             if ((
  9284.               (localRSObject = a.G(localRSTile3)) != null) && (a.calc.distanceTo(localRSObject.getArea().getNearestTile
  9285.  
  9286. (a.X())) < 2))
  9287.             {
  9288.               a.l(a.FA.getCentralTile(), 3);
  9289.  
  9290.               return (a.l(false)) || ((a.l(a.X(), 4)) && (a.l(false)));
  9291.             }
  9292.  
  9293.           }
  9294.  
  9295.  
  9296.  
  9297.       }
  9298.  
  9299.         if (a.Zc > 4)
  9300.           for (localObject = a.gc.iterator(); ((Iterator)localObject).hasNext(); ) { localRSTile3 = (RSTile)((Iterator)localObject).next();
  9301.  
  9302.  
  9303.  
  9304.            if ((a.FA.contains(new RSTile[] { localRSTile3 })) && (a.fA.contains(localRSTile3)))
  9305.             {
  9306.               if (((localRSObject = a.G(localRSTile3)) !=
  9307.  
  9308. null) &&
  9309.                 (a.calc.distanceTo(localRSObject.getArea().getNearestTile(a.X())) < 2))
  9310.               {
  9311.                 a.l(a.FA.getCentralTile(), 3);
  9312.  
  9313.            
  9314.  
  9315.      return (a.l(false)) || ((a.l(a.X(), 4)) && (a.l(false)));
  9316.               }
  9317.             }
  9318.           }
  9319.       }
  9320.       if ((a.Qc.contains("Sliding Statues")) &&
  9321.  
  9322. (a.AB.contains("Picking")))
  9323.       {
  9324.         if (((localObject = a.D(a.fb)) == null) ||
  9325.           (a.calc.distanceBetween(a.X(), ((RSNPC)localObject).getLocation()) !=
  9326.  
  9327. 1.0D))
  9328.         {
  9329.           localObject = a.D(a.OB);
  9330.         }
  9331.         if ((localObject != null) && (a.calc.distanceBetween(a.X(), ((RSNPC)localObject).getLocation()) ==
  9332.  
  9333. 1.0D)) {
  9334.           a.l(((RSNPC)localObject).getLocation(), a.random(-1, 2), a.random(-1, 2));
  9335.         }
  9336.  
  9337.       }
  9338.  
  9339.     }
  9340.  
  9341.     return false;
  9342.   }
  9343.  
  9344.   private void F(RSTile a, int a)
  9345.  
  9346.  
  9347. {
  9348.     do
  9349.     {
  9350.       do
  9351.         if (a.Zc())
  9352.         {
  9353.           return;
  9354.         }
  9355.       while (a.Y().isMoving());
  9356.  
  9357.       a.i(a, a);
  9358.     }
  9359.  
  9360.     while (!a.l(false));
  9361.     a.l(a.vc, 15,
  9362.  
  9363. 15);
  9364.  
  9365.     a.K(false);
  9366.   }
  9367.  
  9368.   private RSNPC D(int[] a)
  9369.   {
  9370.     return a.npcs.getNearest(new y(a, a));
  9371.   }
  9372.  
  9373.   private int YA()
  9374.   {
  9375.     if (!a.O())
  9376.       return -1;
  9377.     if (a.jA())
  9378.    
  9379.  
  9380. {
  9381.       return 2;
  9382.     }
  9383.     if (!a.j())
  9384.     {
  9385.       return -1;
  9386.     }
  9387.  
  9388.     RSObject localRSObject1 = a.i(new int[] { 49528, 49529, 49530 });
  9389.  
  9390.     RSObject localRSObject2 = a.i
  9391.  
  9392. (new int[] { 49534, 49535, 49536 });
  9393.  
  9394.     RSObject localRSObject3 = a.i(new int[] { 49522, 49523, 49524 });
  9395.  
  9396.     if (localRSObject1 != null)
  9397.     {
  9398.       if (a.l
  9399.  
  9400. (localRSObject1, "Smith-battleaxes")) {
  9401.         a.K(false);
  9402.       }
  9403.  
  9404.     }
  9405.     else if (localRSObject3 != null)
  9406.     {
  9407.       if (a.l(localRSObject3, "Cook-fish"))
  9408.       {
  9409.        
  9410.  
  9411.  a.K(false);
  9412.       }
  9413.  
  9414.     }
  9415.     else if ((localRSObject2 != null) && (a.l(localRSObject2, "Fletch-bows")))
  9416.     {
  9417.       a.K(false);
  9418.     }
  9419.  
  9420.     a.sleep(400, 600);
  9421.  
  9422.     return 1;
  9423.   }
  9424.  
  9425.  
  9426.  
  9427.  private RSObject G(RSTile a)
  9428.   {
  9429.     try
  9430.     {
  9431.       return a.objects.getTopAt(a);
  9432.     }
  9433.     catch (Exception localException)
  9434.     {
  9435.       if (a != null)
  9436.       {
  9437.        
  9438.  
  9439. a.log.severe("Nullpointer getting the object at " + a);
  9440.       }
  9441.  
  9442.     }
  9443.  
  9444.     return null;
  9445.   }
  9446.  
  9447.   private void uA()
  9448.   {
  9449.     int i1;
  9450.     if (a.FA != null) { if (a.FA.contains(new
  9451.  
  9452. RSTile[] { a.X() }));
  9453.     }
  9454.     else
  9455.     {
  9456.       if (((RSArea)a.Nc.get(i1)).contains(new RSTile[] { a.X() }))
  9457.       {
  9458.         a.FA = ((RSArea)a.Nc.get(i1));
  9459.  
  9460.         a.Rd =
  9461.  
  9462. (i1 + 1);
  9463.  
  9464.         return;
  9465.       }i1++;
  9466.     }
  9467.   }
  9468.  
  9469.   private void SA()
  9470.   {
  9471.     if (!a.qB)
  9472.     {
  9473.       RSItem[] arrayOfRSItem;
  9474.       int i1 = (arrayOfRSItem = a.jb()).length;
  9475.      
  9476.  
  9477. int i2;
  9478.       RSItem localRSItem;
  9479.       if ((
  9480.         (localRSItem = arrayOfRSItem[i2]) != null) && (localRSItem.getID() > 0) && (localRSItem.doAction("Remove")))
  9481.       {
  9482.  
  9483.  
  9484.       a.sleep(500, 800);
  9485.       }
  9486.       i2++;
  9487.  
  9488.       a.qB = true;
  9489.     }
  9490.   }
  9491.  
  9492.   private int pA()
  9493.   {
  9494.     if (!a.O())
  9495.       return -1;
  9496.     boolean bool = false;
  9497.     int[] arrayOfInt1
  9498.  
  9499. = { 54130, 54131, 54132, 54133, 54134, 541325, 54138, 54139, 54140, 54141, 54142 };
  9500.  
  9501.     int[] arrayOfInt2 = { 54118, 54122, 54123, 54124, 54125, 54126 };
  9502.  
  9503.     RSObject
  9504.  
  9505. localRSObject1 = null; RSObject localRSObject2 = null;
  9506.  
  9507.     if (a.jA()) {
  9508.       return 2;
  9509.     }
  9510.  
  9511.     if (!a.j()) {
  9512.       return -1;
  9513.     }
  9514.  
  9515.     a.l(a.vc, 40, 50);
  9516.  
  9517.     bool =
  9518.  
  9519. false;
  9520.  
  9521.     localRSObject1 = a.i(arrayOfInt1);
  9522.  
  9523.     localRSObject2 = a.i(arrayOfInt2);
  9524.  
  9525.     if ((localRSObject1 != null) && (localRSObject2 != null))
  9526.     {
  9527.       bool =
  9528.  
  9529. a.calc.distanceTo(localRSObject1) < a.calc.distanceTo(localRSObject2) ? a.l(localRSObject1, "Mine") : a.l(localRSObject2, "Fix");
  9530.     }
  9531.     else if (localRSObject1 ==
  9532.  
  9533. null) {
  9534.       bool = a.l(localRSObject2, "Fix");
  9535.     }
  9536.     else
  9537.     {
  9538.       bool = a.l(localRSObject1, "Mine");
  9539.     }
  9540.  
  9541.     a.J(bool);
  9542.  
  9543.     return 1;
  9544.   }
  9545.  
  9546.   private RSObject[] J
  9547.  
  9548. (int[] a)
  9549.   {
  9550.     return a.objects.getAll(new l(a, a));
  9551.   }
  9552.  
  9553.   private int RA()
  9554.   {
  9555.     int[][] arrayOfInt1 = { a.Bb, a.ad, a.OD };
  9556.  
  9557.     RSObject localRSObject1 = a.i(a.OD);
  9558.  
  9559.    
  9560.  
  9561. RSTile localRSTile1 = a.tA();
  9562.  
  9563.     if ((localRSObject1 == null) || (localRSTile1 == null))
  9564.     {
  9565.       return -1;
  9566.     }
  9567.     int i1 = localRSTile1.getX(); int i2 =
  9568.  
  9569. localRSTile1.getY(); int i3 = localRSObject1.getLocation().getX(); int i4 = localRSObject1.getLocation().getY();
  9570.  
  9571.     RSTile localRSTile2 = new RSTile(i3 + (i3 - i1) /
  9572.  
  9573. 2, i4 + (i4 - i2) / 2);
  9574.     int[][] arrayOfInt2;
  9575.     int i5 = (arrayOfInt2 = arrayOfInt1).length;
  9576.     int i6;
  9577.     [I local[I = arrayOfInt2[i6];
  9578.  
  9579.     if (a.jA())
  9580.       return
  9581.  
  9582. 2;
  9583.     RSObject localRSObject2;
  9584.     if (
  9585.       (localRSObject2 = a.i(local[I)) == null) {
  9586.       return -1;
  9587.     }
  9588.  
  9589.     a.vE = localRSObject2.getLocation();
  9590.  
  9591.     int i7 =
  9592.  
  9593. localRSObject2.getID();
  9594.  
  9595.     a.l(a.vc, 45, 50);
  9596.  
  9597.     if (a.jA())
  9598.       return 2;
  9599.     RSObject localRSObject3;
  9600.     if (((localRSObject3 = a.G(a.vE)) != null) &&
  9601.      
  9602.  
  9603. (localRSObject3.getID() != i7) && ((localRSObject2 = a.i(local[I)) != null))
  9604.     {
  9605.       a.vE = localRSObject2.getLocation();
  9606.     }
  9607.     if (a.X().equals(a.vE))
  9608.     {
  9609.      
  9610.  
  9611. a.A(localRSTile2, 2);
  9612.  
  9613.       a.K(false);
  9614.     }
  9615.     else if ((a.Y().getAnimation() != 1114) && (!a.Y().isMoving()))
  9616.     {
  9617.       int i8 = 0;
  9618.  
  9619.       if (a.l(localRSObject2,
  9620.  
  9621. "Step-onto"))
  9622.       {
  9623.         if (a.Y().getAnimation() == 1114)
  9624.           i8 = 1;
  9625.         a.sleep(300, 400);
  9626.         int i9;
  9627.         if ((i9 = 0) < 10)
  9628.         {
  9629.           if
  9630.  
  9631. (a.Y().getAnimation() == 1114) {
  9632.             i8 = 1;
  9633.           }
  9634.  
  9635.           a.sleep(150, 200);
  9636.  
  9637.           i9++;
  9638.         }
  9639.         a.sleep(200, 400);
  9640.  
  9641.         if ((localRSObject3
  9642.  
  9643. = a.G(a.vE)) != null) {
  9644.           if (
  9645.             (localRSObject2 = a.i(local[I)) != null)
  9646.           {
  9647.             a.vE = localRSObject2.getLocation();
  9648.  
  9649.             if
  9650.  
  9651. (a.A(localRSTile2, 2)) {
  9652.               a.K(false);
  9653.             }
  9654.  
  9655.           }
  9656.  
  9657.         }
  9658.  
  9659.       }
  9660.  
  9661.     }
  9662.  
  9663.     a.sleep(100, 200);
  9664.  
  9665.     i6++;
  9666.  
  9667.     a.NA = true;
  9668.  
  9669.     return 1;
  9670.   }
  9671.  
  9672.   private
  9673.  
  9674. int WA()
  9675.   {
  9676.     int[] arrayOfInt1 = { 11036, 11037, 11038, 12094 };
  9677.  
  9678.     int[] arrayOfInt2 = { 11039, 11040, 11041, 12095 };
  9679.  
  9680.     int[] arrayOfInt3 = { 11042, 11043, 11044,
  9681.  
  9682. 12096 };
  9683.  
  9684.     RSNPC localRSNPC = null;
  9685.  
  9686.     String str = "";
  9687.  
  9688.     if (a.D(arrayOfInt1) != null)
  9689.     {
  9690.       a.log("Equipping the meleer");
  9691.  
  9692.       localRSNPC = a.D(arrayOfInt1);
  9693.  
  9694.  
  9695.  
  9696.     str = "Sword";
  9697.     }
  9698.     else if (a.D(arrayOfInt2) != null)
  9699.     {
  9700.       a.log("Equipping the ranger");
  9701.  
  9702.       localRSNPC = a.D(arrayOfInt2);
  9703.  
  9704.       str = "Bow";
  9705.     }
  9706.    
  9707.  
  9708. else if (a.D(arrayOfInt3) != null)
  9709.     {
  9710.       a.log("Equipping the mager");
  9711.  
  9712.       localRSNPC = a.D(arrayOfInt3);
  9713.  
  9714.       str = "Staff";
  9715.     }
  9716.     if (localRSNPC == null)
  9717.     {
  9718.  
  9719.  
  9720.      return -1;
  9721.     }
  9722.     RSObject localRSObject = a.i(new int[] { 49647, 49648, 49649, 53991 });
  9723.     do
  9724.     {
  9725.       if (a.jA())
  9726.       {
  9727.         return 2;
  9728.       }
  9729.  
  9730.       if (!
  9731.  
  9732. a.j()) {
  9733.         return -1;
  9734.       }
  9735.  
  9736.       if ((!a.l(a.vc, 40, 50)) && (!a.inventory.contains(17444))) {
  9737.         a.l(a.groundItems.getNearest(new int[] { 17444 }));
  9738.       }
  9739.  
  9740.  
  9741.     else if (a.inventory.getItemID("Stone " + str.toLowerCase()) != -1)
  9742.         a.F(localRSNPC, "Arm");
  9743.       else if (a.interfaces.get(451).isValid())
  9744.       {
  9745.        
  9746.  
  9747. a.l(a.interfaces.get(451), new String[] { str });
  9748.       }
  9749.       else if (a.inventory.contains(17415))
  9750.       {
  9751.         a.inventory.getItem(new int[] { 17415 }).doAction
  9752.  
  9753. ("Carve");
  9754.       }
  9755.       else if ((!a.inventory.contains(17415)) && (a.l(localRSObject, "Mine")))
  9756.       {
  9757.         a.l(true);
  9758.       }
  9759.  
  9760.       a.K(true);
  9761.     }
  9762.  
  9763.     while (!a.Y
  9764.  
  9765. ().isInCombat());
  9766.  
  9767.     if (!a.JC())
  9768.       a.sleep(800, 1000);
  9769.     a.K(true);
  9770.  
  9771.     return 1;
  9772.   }
  9773.  
  9774.   private boolean i(RSNPC a)
  9775.   {
  9776.     if (a == null) {
  9777.       a = a.npcs.getNearest
  9778.  
  9779. (a.jE);
  9780.     }
  9781.  
  9782.     if ((a == null) || ((a.l(a) == 0) && (a.getAnimation() != -1))) {
  9783.       return false;
  9784.     }
  9785.  
  9786.     if (!a.l(a))
  9787.       if (a.l(a, "Attack " + a.getName()))
  9788.      
  9789.  
  9790.  {
  9791.         a.sleep(1000, 1400);
  9792.       }
  9793.       else if (!a.isOnScreen())
  9794.       {
  9795.         if (!a.Y().isMoving())
  9796.         {
  9797.           if (a.calc.distanceTo(a) < 10)
  9798.           {
  9799.    
  9800.  
  9801.          a.l(a.getLocation());
  9802.           }
  9803.           else
  9804.           {
  9805.             a.l(a.getLocation(), 1);
  9806.           }
  9807.  
  9808.           a.l(false);
  9809.         }
  9810.         if (a.F(a))
  9811.      
  9812.  
  9813.   {
  9814.           int i1;
  9815.           if ((i1 = 0) < (a.GD ? 18 : 15))
  9816.           {
  9817.             a.sleep(100, 200);
  9818.  
  9819.             i1++;
  9820.           }
  9821.  
  9822.           return true;
  9823.         }
  9824.      
  9825.  
  9826. }
  9827.     return false;
  9828.   }
  9829.  
  9830.   private int HA()
  9831.   {
  9832.     int[] arrayOfInt1 = { 54365, 54367, 54369, 54371, 54373, 54375, 54377, 54379, 54381, 54383, 54385, 54387, 54389, 54391,
  9833.  
  9834. 54393, 54395, 54397, 54399, 54401, 54403 };
  9835.  
  9836.     int[] arrayOfInt2 = { 54364, 54366, 54368, 54370 }; int[] arrayOfInt3 = { 54372, 54374, 54376, 54378 }; int[]
  9837.  
  9838. arrayOfInt4 = { 54380, 54382, 54384, 54386 }; int[] arrayOfInt5 = { 54388, 54390, 54392, 54394 }; int[] arrayOfInt6 = { 54396, 54398, 54400, 54402 };
  9839.  
  9840.     int[][]
  9841.  
  9842. arrayOfInt = { arrayOfInt3, arrayOfInt2, arrayOfInt5, arrayOfInt4, arrayOfInt6 };
  9843.     int i1;
  9844.     while (a.npcs.getNearest(a.AC) != null)
  9845.     {
  9846.       int i2 = 0;
  9847.  
  9848.      
  9849.  
  9850. RSNPC localRSNPC = a.npcs.getNearest(new int[] { a.AC[i1] });
  9851.  
  9852.       RSObject localRSObject = a.i(arrayOfInt[i1]);
  9853.  
  9854.       if ((localRSNPC != null) && (localRSObject !=
  9855.  
  9856. null))
  9857.       {
  9858.         a.vE = localRSObject.getLocation();
  9859.  
  9860.         while ((localRSNPC != null) && (!localRSNPC.getLocation().equals(a.vE)))
  9861.         {
  9862.           if (a.jA())
  9863.  
  9864. {
  9865.             return 2;
  9866.           }
  9867.  
  9868.           RSTile localRSTile1 = null; RSTile localRSTile2 = null; RSTile localRSTile3 = null;
  9869.  
  9870.           int i3 = 1; int i4 = 1;
  9871.  
  9872.          
  9873.  
  9874.  int i5 = localRSNPC.getLocation().getX(); int i6 = localRSNPC.getLocation().getY();
  9875.  
  9876.           if (i5 > a.vE.getX())
  9877.           {
  9878.             localRSTile1 = new RSTile(i5
  9879.  
  9880. - 1, i6);
  9881.  
  9882.             localRSTile2 = new RSTile(i5 + 2, i6);
  9883.  
  9884.             if (!a.J(localRSTile2, arrayOfInt1))
  9885.             {
  9886.               localRSTile2 = new RSTile(i5 + 1,
  9887.  
  9888. i6);
  9889.             }
  9890.           }
  9891.           else if (i5 < a.vE.getX())
  9892.           {
  9893.             localRSTile1 = new RSTile(i5 + 1, i6);
  9894.  
  9895.             localRSTile2 = new RSTile(i5 -
  9896.  
  9897. 2, i6);
  9898.  
  9899.             if (!a.J(localRSTile2, arrayOfInt1))
  9900.             {
  9901.               localRSTile2 = new RSTile(i5 - 1, i6);
  9902.             }
  9903.           }
  9904.           if ((a.J
  9905.  
  9906. (localRSTile1, arrayOfInt1)) && (a.J(localRSTile2, arrayOfInt1)))
  9907.           {
  9908.             i3 = 0;
  9909.           }
  9910.  
  9911.           if (i6 > a.vE.getY())
  9912.           {
  9913.            
  9914.  
  9915. localRSTile1 = new RSTile(i5, i6 - 1);
  9916.  
  9917.             localRSTile3 = new RSTile(i5, i6 + 2);
  9918.  
  9919.             if (!a.J(localRSTile3, arrayOfInt1)) {
  9920.               localRSTile3 =
  9921.  
  9922. new RSTile(i5, i6 + 1);
  9923.             }
  9924.  
  9925.           }
  9926.           else if (i6 < a.vE.getY())
  9927.           {
  9928.             localRSTile1 = new RSTile(i5, i6 + 1);
  9929.  
  9930.            
  9931.  
  9932. localRSTile3 = new RSTile(i5, i6 - 2);
  9933.  
  9934.             if (!a.J(localRSTile3, arrayOfInt1))
  9935.             {
  9936.               localRSTile3 = new RSTile(i5, i6 - 1);
  9937.             }
  9938.  
  9939.    
  9940.  
  9941.       }
  9942.  
  9943.           if ((a.J(localRSTile1, arrayOfInt1)) && (a.J(localRSTile3, arrayOfInt1))) {
  9944.             i4 = 0;
  9945.           }
  9946.  
  9947.           if (i3 == 0)
  9948.           {
  9949.            
  9950.  
  9951. if (!a.X().equals(localRSTile2))
  9952.             {
  9953.               a.A(localRSTile2, 0);
  9954.  
  9955.               i2 = 0;
  9956.             }
  9957.             else
  9958.             {
  9959.               i2++;
  9960.      
  9961.  
  9962.       }
  9963.  
  9964.           }
  9965.           else if (i4 == 0)
  9966.           {
  9967.             if (!a.X().equals(localRSTile3))
  9968.             {
  9969.               a.A(localRSTile3, 0);
  9970.  
  9971.               i2 =
  9972.  
  9973. 0;
  9974.             }
  9975.             else
  9976.             {
  9977.               i2++;
  9978.             }
  9979.           }
  9980.           else
  9981.           {
  9982.             a.F(localRSNPC, "Scare");
  9983.  
  9984.             a.K
  9985.  
  9986. (true);
  9987.           }
  9988.  
  9989.           a.sleep(500, 800);
  9990.  
  9991.           i2++;
  9992.  
  9993.           a.sleep(300, 500);
  9994.  
  9995.           if (i2 > 8)
  9996.           {
  9997.             a.F(localRSNPC, "Scare");
  9998.  
  9999.          
  10000.  
  10001.   a.sleep(400, 800);
  10002.  
  10003.             a.A(localRSNPC.getLocation(), 0);
  10004.  
  10005.             a.K(false);
  10006.  
  10007.             i2 = 0;
  10008.           }
  10009.         }
  10010.       }
  10011.       i1++;
  10012.     }
  10013.  
  10014.     return 1;
  10015.   }
  10016.  
  10017.  
  10018.  
  10019. private boolean l(RSGroundItem a)
  10020.   {
  10021.     if (a == null)
  10022.     {
  10023.       return false;
  10024.     }
  10025.     String str = a.getItem().getName();
  10026.  
  10027.     RSTile localRSTile = a.getLocation();
  10028.  
  10029.    
  10030.  
  10031. double d1 = 0.45D; double d2 = 0.55D; double d3 = 0.4D; double d4 = 0.6D;
  10032.  
  10033.     if ((!a.isOnScreen()) && (!a.Y().isMoving()))
  10034.     {
  10035.       a.l(localRSTile, 1);
  10036.  
  10037.       if (!
  10038.  
  10039. a.l(false)) {
  10040.         a.PA();
  10041.       }
  10042.       else
  10043.       {
  10044.         while (!a.isOnScreen())
  10045.         {
  10046.           if (a.JC())
  10047.           {
  10048.             continue;
  10049.           }
  10050.  
  10051.          
  10052.  
  10053. a.sleep(300, 500);
  10054.         }
  10055.  
  10056.       }
  10057.  
  10058.     }
  10059.  
  10060.     if ((a.Rd == 1) && (!a.J(localRSTile, new int[0])))
  10061.     {
  10062.       d1 = 0.35D;
  10063.  
  10064.       d2 = 0.65D;
  10065.  
  10066.       d3 = 0.75D;
  10067.  
  10068.       d4 = 0.95D;
  10069.  
  10070.  
  10071.    }
  10072.  
  10073.     return a.l(localRSTile, a.random(d1, d2), a.random(d3, d4), 0, "Take " + str);
  10074.   }
  10075.  
  10076.   private ArrayList<RSTile> F(RSArea a)
  10077.   {
  10078.     a.a.clear();
  10079.  
  10080.     Object
  10081.  
  10082. localObject = null;
  10083.  
  10084.     RSArea localRSArea = a;
  10085.  
  10086.     int i1 = 0;
  10087.  
  10088.     while ((localRSArea != null) && (!localRSArea.equals(a.jb)))
  10089.     {
  10090.       for (Iterator localIterator =
  10091.  
  10092. a.fc.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
  10093.  
  10094.         if (localRSArea.contains(new RSTile[] { localRSTile }))
  10095.         {
  10096.        
  10097.  
  10098.    localObject = localRSTile;
  10099.  
  10100.           break;
  10101.         }
  10102.       }
  10103.       RSTile localRSTile;
  10104.       if (localObject != null)
  10105.       {
  10106.         if ((localRSArea = a.E(localObject))
  10107.  
  10108. != null)
  10109.           for (localIterator = a.w.iterator(); localIterator.hasNext(); )
  10110.           {
  10111.             if (((localRSTile = (RSTile)localIterator.next()) != null) &&
  10112.  
  10113.  
  10114.             (a.calc.distanceBetween(localRSTile, localObject) < 4.0D))
  10115.             {
  10116.               a.a.add(localRSTile);
  10117.  
  10118.               break;
  10119.             }
  10120.           }
  10121.      
  10122.  
  10123. }
  10124.       i1++;
  10125.  
  10126.       if (i1 <= 25)
  10127.         continue;
  10128.       a.log.severe("Unable to generate path.");
  10129.  
  10130.       return a.a;
  10131.     }
  10132.     return a.a;
  10133.   }
  10134.  
  10135.   public void keyTyped(KeyEvent
  10136.  
  10137. a)
  10138.   {
  10139.     if ((!a.iA) && (a.qD) && (a.DC == 3))
  10140.     {
  10141.       char c1;
  10142.       if (((c1 = a.getKeyChar()) ==
  10143.         '\n') || (c1 == '\t'))
  10144.       {
  10145.         a.PA = (a.PA == -1 ?
  10146.  
  10147. ++a.PA : -1);
  10148.       }
  10149.       else if (a.PA == 0)
  10150.         if ((c1 == '\b') && (a.ce.length() > 0))
  10151.         {
  10152.           a.ce = a.ce.substring(0, a.ce.length() - 1);
  10153.         }
  10154.    
  10155.  
  10156.      else if ((c1 != '\b') && (a.ce.length() < 25))
  10157.         {
  10158.           a.ce += c1;
  10159.         }
  10160.     }
  10161.   }
  10162.  
  10163.   private int KA()
  10164.   {
  10165.     RSNPC localRSNPC;
  10166.     if (
  10167.       (localRSNPC =
  10168.  
  10169. a.npcs.getNearest(a.aF)) == null)
  10170.     {
  10171.       if (a.jA())
  10172.         return 2;
  10173.       return -1;
  10174.     }
  10175.  
  10176.     a.vE = a.F(localRSNPC.getLocation(), a.te);
  10177.  
  10178.     while
  10179.  
  10180. (a.npcs.getNearest(a.aF) != null)
  10181.     {
  10182.       localRSNPC = a.npcs.getNearest(a.aF);
  10183.  
  10184.       if (a.jA()) {
  10185.         return 2;
  10186.       }
  10187.  
  10188.       a.A(a.vE, 0);
  10189.  
  10190.       a.K(false);
  10191.  
  10192.      
  10193.  
  10194. if ((localRSNPC == null) || (localRSNPC.getAnimation() == -1))
  10195.       {
  10196.         continue;
  10197.       }
  10198.  
  10199.       int i1 = localRSNPC.getAnimation();
  10200.  
  10201.       if (a.interfaces.get
  10202.  
  10203. (238).isValid())
  10204.       {
  10205.         String str = "";
  10206.  
  10207.         if (i1 == 855)
  10208.         {
  10209.           str = "Nod head";
  10210.         }
  10211.         else if (i1 == 856) {
  10212.           str = "Shake
  10213.  
  10214. head";
  10215.         }
  10216.         else if (i1 == 860) {
  10217.           str = "Cry";
  10218.         }
  10219.         else if (i1 == 861)
  10220.           str = "Laugh";
  10221.         else if (i1 == 863)
  10222.         {
  10223.      
  10224.  
  10225.     str = "Wave";
  10226.         }
  10227.         if (str.isEmpty())
  10228.         {
  10229.           a.F(a.vE, 1);
  10230.         }
  10231.         else
  10232.         {
  10233.           a.sleep(700, 1400);
  10234.  
  10235.           if (a.l
  10236.  
  10237. (a.interfaces.get(238), new String[] { str }))
  10238.           {
  10239.             a.sleep(400, 800);
  10240.  
  10241.             a.sleep(300, 400);
  10242.           }
  10243.         }
  10244.       }
  10245.     }
  10246.     return 1;
  10247.   }
  10248.  
  10249.  
  10250.  
  10251. private RSObject i(int[] a)
  10252.   {
  10253.     return a.objects.getNearest(new r(a, a));
  10254.   }
  10255.  
  10256.   private String l(RSItem a)
  10257.   {
  10258.     if (a == null)
  10259.       return "";
  10260.     String str;
  10261.     int
  10262.  
  10263. i1;
  10264.     if ((i1 =
  10265.       (str = a.getName()).indexOf(">")) > 0)
  10266.     {
  10267.       str = str.substring(i1 + 1);
  10268.     }
  10269.     int i2;
  10270.     if ((i2 = str.indexOf(" (")) > 0)
  10271.     {
  10272.       str
  10273.  
  10274. = str.substring(0, i2);
  10275.     }
  10276.     return str;
  10277.   }
  10278.  
  10279.   private int gA()
  10280.   {
  10281.     if (!a.O())
  10282.     {
  10283.       return -1;
  10284.     }
  10285.     boolean bool1 = false; boolean bool2 = false;
  10286.  
  10287.    
  10288.  
  10289. RSObject localRSObject1 = a.i(new int[] { 54251 });
  10290.  
  10291.     RSObject localRSObject2 = a.i(new int[] { 49934, 49935, 49936, 53749 });
  10292.  
  10293.     RSObject localRSObject3 = a.i(new
  10294.  
  10295. int[] { 54255 });
  10296.  
  10297.     RSObject localRSObject4 = a.i(new int[] { 54256, 54257, 54258, 54259 });
  10298.  
  10299.     RSObject localRSObject5 = a.i(a.mb);
  10300.  
  10301.     a.jA = a.npcs.getNearest(a.B);
  10302.  
  10303.  
  10304.  
  10305.    if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
  10306.     {
  10307.       if ((!a.QB()) || ((a.HC == 1) && (!a.ZA())))
  10308.       {
  10309.         return 2;
  10310.       }
  10311.     }
  10312.  
  10313.  
  10314.   if (a.hd == null)
  10315.     {
  10316.       a.hd = new Timer(a.random(240000, 300000));
  10317.     }
  10318.     bool1 = a.F(a.u) == null;
  10319.  
  10320.     a.A(bool1);
  10321.     do
  10322.     {
  10323.       if (a.jA())
  10324.       {
  10325.        
  10326.  
  10327. return 2;
  10328.       }
  10329.       if (!a.j()) {
  10330.         return -1;
  10331.       }
  10332.  
  10333.       a.yd = a.l(a.Zd);
  10334.  
  10335.       if ((a.yd != null) && (a.l(a.yd.getLocation(), false)))
  10336.       {
  10337.         bool2 =
  10338.  
  10339. a.l(a.yd);
  10340.       }
  10341.       else if (a.SE.contains("re-attach"))
  10342.       {
  10343.         a.A(new int[] { 19663, 19664, 19665, 19667, 19668 });
  10344.       }
  10345.       if (a.inventory.contains
  10346.  
  10347. (19668))
  10348.       {
  10349.         bool2 = a.l(localRSObject5, "Grapple");
  10350.       }
  10351.       else if (a.inventory.containsAll(new int[] { 19667, 19664 }))
  10352.       {
  10353.        
  10354.  
  10355. a.inventory.useItem(a.inventory.getItem(new int[] { 19667 }), a.inventory.getItem(new int[] { 19664 }));
  10356.       }
  10357.       else if ((a.inventory.contains(19665)) && (!
  10358.  
  10359. a.inventory.contains(19667)))
  10360.         bool2 = a.l(localRSObject2, "Spin");
  10361.       else if ((a.inventory.contains(19663)) && (!a.inventory.contains(19664)))
  10362.         bool2 =
  10363.  
  10364. a.l(localRSObject4, "Smith");
  10365.       else if (!a.inventory.containsOneOf(new int[] { 19665, 19667 }))
  10366.       {
  10367.         bool2 = a.l(localRSObject3, "Plunder");
  10368.       }
  10369.      
  10370.  
  10371. else if (!a.inventory.containsOneOf(new int[] { 19663, 19664 }))
  10372.         bool2 = a.l(localRSObject1, "Retrieve");
  10373.       if (bool2)
  10374.       {
  10375.         a.K(bool1);
  10376.       }
  10377.      
  10378.  
  10379. else {
  10380.         a.sleep(300, 600);
  10381.       }
  10382.  
  10383.     }
  10384.  
  10385.     while (!a.Rc());
  10386.  
  10387.     a.sleep(800, 1100);
  10388.  
  10389.     a.lA();
  10390.  
  10391.     a.jA = a.npcs.getNearest(a.B);
  10392.  
  10393.     if (!a.inventory.contains
  10394.  
  10395. (18829))
  10396.     {
  10397.       if (a.jA())
  10398.         return 2;
  10399.       RSGroundItem localRSGroundItem;
  10400.       if (a.l(localRSGroundItem))
  10401.       {
  10402.         a.K(false);
  10403.       }
  10404.       a.sleep
  10405.  
  10406. (300, 500);
  10407.     }
  10408.     return a.A(a.nD);
  10409.   }
  10410.  
  10411.   private String i(String a)
  10412.   {
  10413.     if (a == null)
  10414.       return "";
  10415.     int i1;
  10416.     if (
  10417.       (i1 = a.indexOf(" ")) > -1)
  10418.     {
  10419.      
  10420.  
  10421. a = a.substring(i1 + 1);
  10422.     }
  10423.     int i2;
  10424.     if (
  10425.       (i2 = a.indexOf(" (")) > 0)
  10426.     {
  10427.       a = a.substring(0, i2);
  10428.     }
  10429.     return a;
  10430.   }
  10431.  
  10432.   private RSNPC i(String[] a)
  10433.  
  10434.  
  10435. {
  10436.     return a.npcs.getNearest(new k(a, a));
  10437.   }
  10438.  
  10439.   private boolean IA()
  10440.   {
  10441.     a.nE = false;
  10442.  
  10443.     a.VA();
  10444.  
  10445.     a.lc = null;
  10446.  
  10447.     if (a.ZA == null) {
  10448.       a.ZA = a.r;
  10449.     }
  10450.  
  10451.     if
  10452.  
  10453. (a.ob.size() == 0)
  10454.     {
  10455.       RSObject localRSObject1 = a.i(a.gb);
  10456.  
  10457.       RSObject localRSObject2 = a.i(a.Lb);
  10458.  
  10459.       if (localRSObject1 != null)
  10460.       {
  10461.         a.log
  10462.  
  10463. ("Dungeon exit ahead!");
  10464.  
  10465.         a.s();
  10466.  
  10467.         return true;
  10468.       }
  10469.       if (localRSObject2 != null)
  10470.       {
  10471.         if (a.nb == null)
  10472.         {
  10473.           a.nb = a.ZA;
  10474.  
  10475.        
  10476.  
  10477.    a.fc.add(localRSObject2.getLocation());
  10478.  
  10479.           a.ig = a.F(a.nb);
  10480.  
  10481.           a.HD = new Timer(0L);
  10482.  
  10483.           a.PD = -1;
  10484.         }
  10485.         if (!a.nb.contains(new RSTile
  10486.  
  10487. [] { a.X() }))
  10488.         {
  10489.           a.AB = "Preparing for the boss battle";
  10490.  
  10491.           if (a.D(new int[] { 10058 }) == null)
  10492.           {
  10493.             a.Ic();
  10494.           }
  10495.        
  10496.  
  10497.   if (a.i(new int[] { 51300 }) != null)
  10498.           {
  10499.             if ((a.walking.getEnergy() < a.random(85, 90)) && (!a.d()))
  10500.             {
  10501.               a.AB = "Resting up
  10502.  
  10503. for the Icefiend!";
  10504.  
  10505.               a.walking.rest(100);
  10506.             }
  10507.           }
  10508.           else if (a.i(new int[] { 51887 }) != null)
  10509.           {
  10510.             if (a.HC == 2)
  10511.  
  10512.  
  10513.           {
  10514.               a.log("Swapping attack style for Sagittare!");
  10515.  
  10516.               if (a.kC)
  10517.               {
  10518.                 a.i(1);
  10519.               }
  10520.               else
  10521.  
  10522. if (a.iD)
  10523.               {
  10524.                 a.i(3);
  10525.               }
  10526.               else
  10527.               {
  10528.                 a.log.severe("We don't have a way to kill Sagittare,
  10529.  
  10530. aborting dungeon!");
  10531.  
  10532.                 a.nc = true;
  10533.  
  10534.                 return false;
  10535.               }
  10536.             }
  10537.           }
  10538.           else if (a.i(new String[] {
  10539.  
  10540. "Riftsplitter" }) != null)
  10541.           {
  10542.             if (a.iD)
  10543.             {
  10544.               a.AB = "Swapping combat style to magic";
  10545.  
  10546.               a.i(3);
  10547.             }
  10548.          
  10549.  
  10550.  }
  10551.           else if (a.i(new int[] { 54475 }) != null)
  10552.           {
  10553.             if (a.HC == 1)
  10554.               if (a.Sd)
  10555.               {
  10556.                 a.AB = "Swapping
  10557.  
  10558. combat style to range";
  10559.  
  10560.                 a.i(2);
  10561.               }
  10562.               else if (a.iD)
  10563.               {
  10564.                 a.AB = "Swapping combat style to magic";
  10565.  
  10566.        
  10567.  
  10568.         a.i(3);
  10569.               }
  10570.               else
  10571.               {
  10572.                 a.log.severe("We can't kill this boss with melee, aborting dungeon");
  10573.  
  10574.                
  10575.  
  10576. a.Ic += 1;
  10577.  
  10578.                 a.nc = true;
  10579.  
  10580.                 return false;
  10581.               }
  10582.           }
  10583.           else if (a.npcs.getNearest(new String[] { "Sagittare" }) !=
  10584.  
  10585. null)
  10586.           {
  10587.             if (a.HC == 2)
  10588.             {
  10589.               a.AB = "Swapping combat style to melee";
  10590.  
  10591.               if (!a.i(1))
  10592.               {
  10593.                
  10594.  
  10595. a.log("We don't have a backup weapon for Saggitare, aborting dungeon.");
  10596.  
  10597.                 a.nc = true;
  10598.  
  10599.                 return false;
  10600.               }
  10601.             }
  10602.          
  10603.  
  10604. }
  10605.           else if (a.npcs.getNearest(new String[] { "Rammernaut" }) != null)
  10606.           {
  10607.             if ((a.HC != 3) && (a.iD))
  10608.             {
  10609.               a.AB =
  10610.  
  10611. "Swapping combat style to magic";
  10612.  
  10613.               a.i(3);
  10614.             }
  10615.           }
  10616.           a.AB = "";
  10617.         }
  10618.         a.ic.remove(a.ZA);
  10619.  
  10620.         a.Fg = false;
  10621.  
  10622.         a.hB
  10623.  
  10624. = false;
  10625.  
  10626.         a.X = false;
  10627.  
  10628.         a.FF = true;
  10629.  
  10630.         return true;
  10631.       }
  10632.       RSTile localRSTile = a.EA();
  10633.  
  10634.       if (a.yd != null)
  10635.       {
  10636.         if (a.r.contains(new
  10637.  
  10638. RSTile[] { a.X() }))
  10639.         {
  10640.           a.l(localRSTile, 1);
  10641.         }
  10642.         if ((a.HC == 1) && (a.calc.distanceTo(localRSTile) > a.random(5, 7)) && (a.i(a.u) != null))
  10643.  
  10644.  
  10645.        {
  10646.           a.A(false);
  10647.         }
  10648.  
  10649.         a.game.openTab(4);
  10650.  
  10651.         a.nE = true;
  10652.  
  10653.         a.AB = "Grabbing a key from the dead end";
  10654.  
  10655.         return true;
  10656.       }
  10657.      
  10658.  
  10659. a.fG.add(a.nD);
  10660.  
  10661.       a.w.removeAll(a.fG);
  10662.  
  10663.       a.J.removeAll(a.fG);
  10664.  
  10665.       a.Bd.removeAll(a.fG);
  10666.  
  10667.       a.nE = true;
  10668.  
  10669.       a.AB = "Skipping the dead end";
  10670.  
  10671.       return
  10672.  
  10673. false;
  10674.     }
  10675.     return true;
  10676.   }
  10677.  
  10678.   private void BA()
  10679.   {
  10680.     int i1;
  10681.     int i2 =
  10682.       i1 = a.dC;
  10683.  
  10684.     a.gd = false;
  10685.  
  10686.     a.nc = false;
  10687.  
  10688.     RSObject localRSObject =
  10689.  
  10690. a.objects.getNearest(new int[] { 48496 });
  10691.  
  10692.     a.Qc = "Entering Daemonheim...";
  10693.  
  10694.     localRSObject = a.objects.getNearest(new int[] { 48496 });
  10695.  
  10696.     if (a.jA()) {
  10697.      
  10698.  
  10699. return;
  10700.     }
  10701.  
  10702.     a.ad();
  10703.  
  10704.     i2 =
  10705.       i1 = a.dC;
  10706.  
  10707.     if ((a.E) && (a.OA < a.td))
  10708.     {
  10709.       i2 =
  10710.         a.ld;
  10711.     }
  10712.     if (a.interfaces.getComponent(210, 2).isValid())
  10713.    
  10714.  
  10715.  {
  10716.       a.interfaces.getComponent(210, 2).doClick();
  10717.     }
  10718.     else if (a.interfaces.get(236).isValid())
  10719.     {
  10720.       a.interfaces.getComponent(236, (a.od) &&
  10721.  
  10722. (a.interfaces.getComponent(236, 0).containsText("size")) && ((!a.E) || (a.Ud > a.td)) ? 2 : 1).doClick();
  10723.     }
  10724.     else if (a.interfaces.getComponent(947, 608).isValid
  10725.  
  10726. ())
  10727.     {
  10728.       a.ad();
  10729.  
  10730.       if ((a.OA >= a.g) || ((a.JE) && (a.OA + 2 > a.g)))
  10731.       {
  10732.         if (!a.Ec()) {
  10733.           return;
  10734.         }
  10735.  
  10736.       }
  10737.  
  10738.       if (a.iA()) {
  10739.        
  10740.  
  10741. while (a.interfaces.getComponent(947, 608).isValid())
  10742.         {
  10743.           if (a.interfaces.getComponent(947, 765).getText().contains("" + a.Ud))
  10744.           {
  10745.            
  10746.  
  10747. a.interfaces.getComponent(947, 761).doAction("Confirm");
  10748.           }
  10749.           else
  10750.           {
  10751.             a.interfaces.getComponent(947, 608 + a.OA).doAction("Select-
  10752.  
  10753. floor");
  10754.           }
  10755.           a.sleep(700, 1000);
  10756.         }
  10757.  
  10758.       }
  10759.  
  10760.       a.mouse.moveRandomly(200);
  10761.     }
  10762.     else
  10763.     {
  10764.       if (a.interfaces.getComponent(938, 42).isValid
  10765.  
  10766. ())
  10767.       {
  10768.         a.SE = "";
  10769.  
  10770.         while (a.interfaces.getComponent(938, 42).isValid())
  10771.         {
  10772.           if (a.SE.contains("access complexity"))
  10773.           {
  10774.            
  10775.  
  10776.  i2--;
  10777.  
  10778.             a.SE = "";
  10779.           }
  10780.  
  10781.           if (!a.interfaces.getComponent(938, 42).getText().contains("" + i2)) {
  10782.             a.interfaces.getComponent(938, 55 +
  10783.  
  10784. 5 * i2).doAction("Select-complexity");
  10785.           }
  10786.           else
  10787.           {
  10788.             a.interfaces.getComponent(938, 37).doAction("Confirm");
  10789.           }
  10790.          
  10791.  
  10792. a.sleep(600, 800);
  10793.         }
  10794.  
  10795.       }
  10796.  
  10797.       if ((a.interfaces.get(939).isValid()) && ((a.OA >= a.g) || ((a.JE) && (a.OA + 2 > a.g))))
  10798.       {
  10799.         if (!a.Ec())
  10800.         {
  10801.    
  10802.  
  10803.        return;
  10804.         }
  10805.       }
  10806.       else if (localRSObject != null)
  10807.       {
  10808.         a.l(localRSObject, "Climb-down");
  10809.  
  10810.         a.K(false);
  10811.       }
  10812.  
  10813.     }
  10814.  
  10815.     a.sleep(600,
  10816.  
  10817. 1000);
  10818.  
  10819.     a.N = true;
  10820.  
  10821.     a.zB = true;
  10822.  
  10823.     a.Zc = i2;
  10824.   }
  10825.  
  10826.   private boolean A(int[] a)
  10827.   {
  10828.     if (a.inventory.containsOneOf(a))
  10829.     {
  10830.       int i1 = a.mouse.getSpeed();
  10831.  
  10832.      
  10833.  
  10834. a.mouse.setSpeed(i1 + a.random(1, 4));
  10835.  
  10836.       while (a.inventory.containsOneOf(a))
  10837.       {
  10838.         if (a.Zc())
  10839.         {
  10840.           return false;
  10841.         }
  10842.         RSItem
  10843.  
  10844. localRSItem;
  10845.         if (((localRSItem = a.inventory.getItem(a)) != null) &&
  10846.           (localRSItem.doAction("Drop"))) {
  10847.           a.sleep(400, 600);
  10848.         }
  10849.  
  10850.       }
  10851.  
  10852.      
  10853.  
  10854.  a.mouse.setSpeed(i1);
  10855.  
  10856.       return true;
  10857.     }
  10858.  
  10859.     return false;
  10860.   }
  10861.  
  10862.   private RSTile EA()
  10863.   {
  10864.     int[][] arrayOfInt;
  10865.     int i1 = (arrayOfInt = a.x).length;
  10866.     int i2;
  10867.    
  10868.  
  10869. int[] arrayOfInt1 = arrayOfInt[i2];
  10870.  
  10871.     a.yd = a.groundItems.getNearest(arrayOfInt1);
  10872.  
  10873.     if (a.yd != null) if (a.r.contains(new RSTile[] { a.yd.getLocation() }))
  10874.       {
  10875.  
  10876.  
  10877.        return a.yd.getLocation();
  10878.       }
  10879.     i2++;
  10880.  
  10881.     a.yd = null;
  10882.  
  10883.     return null;
  10884.   }
  10885.  
  10886.   private RSNPC D(RSTile a)
  10887.   {
  10888.     if (a == null) {
  10889.       return null;
  10890.     }
  10891.  
  10892.     return
  10893.  
  10894. a.npcs.getNearest(new c(a, a));
  10895.   }
  10896.  
  10897.   private boolean cA()
  10898.   {
  10899.     int i1 = 0;
  10900.     RSObject[] arrayOfRSObject;
  10901.     int i4;
  10902.     Object localObject;
  10903.     if ((a.FA != null) &&
  10904.  
  10905. (a.nD != null))
  10906.     {
  10907.       i3 = (arrayOfRSObject = a.objects.getAll()).length; localObject = arrayOfRSObject[i4];
  10908.  
  10909.       if ((a.l(((RSObject)localObject).getID(), a.XE))
  10910.  
  10911. && (a.calc.distanceBetween(((RSObject)localObject).getLocation(), a.nD) < 3.0D)) if (!a.FA.contains(new RSTile[] { ((RSObject)localObject).getLocation() }))
  10912.         {
  10913.    
  10914.  
  10915.        i1 = 1;
  10916.  
  10917.           break label115;
  10918.         }
  10919.       i4++;
  10920.     }
  10921.     label115: if ((i1 == 0) && (a.Nc.size() > 0))
  10922.     {
  10923.       return false;
  10924.     }
  10925.     if
  10926.  
  10927. (a.game.getClientState() == 11)
  10928.     {
  10929.       a.sleep(200, 300);
  10930.  
  10931.       a.sleep(300);
  10932.     }
  10933.  
  10934.     a.sleep(400);
  10935.  
  10936.     int i3 = (arrayOfRSObject = a.objects.getAll(a.cC)).length;
  10937.  
  10938.    
  10939.  
  10940. RSTile localRSTile =
  10941.       (localObject = arrayOfRSObject[i4]).getLocation();
  10942.  
  10943.     if (!a.Ee.contains(localRSTile))
  10944.     {
  10945.       if (((RSObject)localObject).getType() ==
  10946.  
  10947. RSObject.Type.BOUNDARY)
  10948.       {
  10949.         a.Tc.add(localRSTile);
  10950.       }
  10951.       a.AG.add(localRSTile);
  10952.  
  10953.       a.zc.add(localObject);
  10954.     }
  10955.  
  10956.     i4++;
  10957.  
  10958.     if (a.AG.size() > 60)
  10959.     {
  10960.  
  10961.  
  10962.      int i2 = 20000; i3 = 20000;
  10963.  
  10964.       for (Iterator localIterator = a.AG.iterator(); localIterator.hasNext(); )
  10965.       {
  10966.         if (((localObject = (RSTile)
  10967.  
  10968. localIterator.next())
  10969.           .getX() <= i2) && (((RSTile)localObject).getY() <= i3))
  10970.         {
  10971.           i2 = ((RSTile)localObject).getX();
  10972.  
  10973.           i3 = ((RSTile)
  10974.  
  10975. localObject).getY();
  10976.         }
  10977.       }
  10978.       a.ZA = new RSArea(i2, i3, i2 + 15, i3 + 15);
  10979.  
  10980.       a.Nc.add(a.ZA);
  10981.  
  10982.       a.a.clear();
  10983.  
  10984.       if ((a.A(new int[] { 17363 })) &&
  10985.  
  10986. (a.EB.contains(Integer.valueOf(17363)))) {
  10987.         a.EB.remove(Integer.valueOf(17363));
  10988.       }
  10989.  
  10990.       a.l(a.ZA);
  10991.  
  10992.       a.Ee.addAll(a.AG);
  10993.  
  10994.       a.Wb = 0;
  10995.  
  10996.       a.BD = 0;
  10997.  
  10998.      
  10999.  
  11000.  a.hA.reset();
  11001.  
  11002.       a.lc = null;
  11003.  
  11004.       return true;
  11005.     }
  11006.     return false;
  11007.   }
  11008.  
  11009.   private boolean MA()
  11010.   {
  11011.     int[] arrayOfInt = a.l(a.EB);
  11012.  
  11013.     int i1 = a.mouse.getSpeed();
  11014.  
  11015.    
  11016.  
  11017.  a.mouse.setSpeed(i1 + a.random(1, 4));
  11018.  
  11019.     if (a.Zc())
  11020.       return false;
  11021.     int i2;
  11022.     int i3;
  11023.     int i4;
  11024.     if ((
  11025.       (i4 = a.inventory.getItems()[(i2 + i3 *
  11026.  
  11027. 4)].getID()) > 0) && (!a.l(i4, arrayOfInt)))
  11028.     {
  11029.       a.inventory.dropItem(i2, i3);
  11030.     }
  11031.  
  11032.     i3++;
  11033.  
  11034.     i2++;
  11035.  
  11036.     a.sleep(a.random(500, 800));
  11037.  
  11038.     a.mouse.setSpeed(i1);
  11039.  
  11040.    
  11041.  
  11042. return true;
  11043.   }
  11044.  
  11045.   private int hA()
  11046.   {
  11047.     RSNPC localRSNPC = null;
  11048.  
  11049.     u localu = new u(a);
  11050.  
  11051.     if (a.jA())
  11052.     {
  11053.       return 2;
  11054.     }
  11055.  
  11056.     if (!a.j())
  11057.       return -1;
  11058.     int
  11059.  
  11060. i1;
  11061.     if (localRSNPC == null)
  11062.     {
  11063.       localRSNPC = a.npcs.getNearest(localu);
  11064.     }
  11065.     else if (a.walking.getEnergy() < a.random(15, 25))
  11066.     {
  11067.       a.walking.rest
  11068.  
  11069. (a.random(50, 80));
  11070.     }
  11071.     else if (a.F(localRSNPC, "Catch"))
  11072.     {
  11073.       a.sleep(600, 800);
  11074.  
  11075.       if ((i1 = 0) < 15)
  11076.       {
  11077.         a.sleep(250, 300);
  11078.  
  11079.         i1++;
  11080.      
  11081.  
  11082. }
  11083.  
  11084.     }
  11085.  
  11086.     a.sleep(100, 200);
  11087.  
  11088.     return 1;
  11089.   }
  11090.  
  11091.   private void LA()
  11092.   {
  11093.     RSNPC localRSNPC1 = a.D(new int[] { 10058 });
  11094.  
  11095.     RSNPC localRSNPC2 = a.i(new String[] {
  11096.  
  11097. "Geomancer" });
  11098.  
  11099.     RSNPC localRSNPC3 = a.i(new String[] { "Ihlakhizan" });
  11100.  
  11101.     RSNPC localRSNPC4 = a.i(new String[] { "Pummeller" });
  11102.  
  11103.     a.l(a.UC, 50, 70);
  11104.     int i1;
  11105.    
  11106.  
  11107.  Object localObject1;
  11108.     Object localObject2;
  11109.     if ((a.tc.equals("Skeletal Hoarde")) || (localRSNPC1 != null))
  11110.     {
  11111.       i1 = 0;
  11112.  
  11113.       localObject1 = null;
  11114.  
  11115.       a.Qc =
  11116.  
  11117. "Killing the Skeletal Hoarde!";
  11118.  
  11119.       if (a.tc.isEmpty())
  11120.       {
  11121.         a.log(a.Qc);
  11122.  
  11123.         a.tc = "Skeletal Hoarde";
  11124.       }
  11125.       a.A(a.HC != 1);
  11126.  
  11127.       a.l(false,
  11128.  
  11129. Combat.Prayer.PROTECT_FROM_MISSILES, true);
  11130.  
  11131.       a.PD = a.Gd;
  11132.  
  11133.       a.F();
  11134.  
  11135.       a.game.openTab(4);
  11136.  
  11137.       if (a.jA()) {
  11138.         return;
  11139.       }
  11140.  
  11141.       if (localRSNPC1 !=
  11142.  
  11143. null)
  11144.       {
  11145.         if ((
  11146.           (localObject2 = localRSNPC1.getMessage()) != null) && (!((String)localObject2).contains("Chat later")))
  11147.         {
  11148.           i1 = 1;
  11149.    
  11150.  
  11151.     }
  11152.  
  11153.         localObject1 = a.J(new String[] { "Tunnel" });
  11154.  
  11155.         if (i1 != 0)
  11156.         {
  11157.           a.AB = "Blocking the next tunnel!";
  11158.  
  11159.           if (localObject1 !=
  11160.  
  11161. null)
  11162.           {
  11163.             a.vE = ((RSObject)localObject1).getLocation();
  11164.  
  11165.             a.SE = "";
  11166.  
  11167.             a.l((RSObject)localObject1, "Block");
  11168.  
  11169.             a.l
  11170.  
  11171. (false);
  11172.  
  11173.             if (localObject1 != null)
  11174.             {
  11175.               if (a.jA()) {
  11176.                 return;
  11177.               }
  11178.  
  11179.               if (!a.SE.contains("fully
  11180.  
  11181. powered"))
  11182.               {
  11183.                 if (a.calc.distanceTo(a.vE) > 4)
  11184.                 {
  11185.                   a.A(a.vE, 1);
  11186.                 }
  11187.  
  11188.                 if (a.l
  11189.  
  11190. ((RSObject)localObject1, "Block"))
  11191.                   a.sleep(500, 1000);
  11192.                 a.l(a.UC, 20, 20);
  11193.  
  11194.                 localObject1 = a.G(a.vE);
  11195.  
  11196.                
  11197.  
  11198. a.sleep(50, 100);
  11199.               }
  11200.             }
  11201.             a.AB = "";
  11202.  
  11203.             if (!a.SE.contains("fully powered"))
  11204.             {
  11205.               if (a.DD < 5) {
  11206.            
  11207.  
  11208.      a.DD += 1;
  11209.               }
  11210.  
  11211.               a.Qc = ("Skeletal Hoarde: " + a.DD + " of 5 blocked");
  11212.             }
  11213.             a.SE = "";
  11214.  
  11215.             a.vE = null;
  11216.  
  11217.            
  11218.  
  11219.  if (a.combat.getHealth() > 40) {
  11220.               a.F(a.npcs.getNearest(a.B), "Attack");
  11221.             }
  11222.  
  11223.             i1 = 0;
  11224.           }
  11225.         }
  11226.         if ((localObject1 ==
  11227.  
  11228. null) && (a.npcs.getNearest(a.B) == null))
  11229.         {
  11230.           a.F(localRSNPC1, "Talk-To");
  11231.  
  11232.           a.sleep(700, 1100);
  11233.         }
  11234.         else if (a.combat.getHealth() <
  11235.  
  11236. 30 + a.npcs.getAll(a.B).length * 3 + a.Zc + a.calc.distanceTo(localRSNPC1) / 3)
  11237.         {
  11238.           a.vE = localRSNPC1.getLocation();
  11239.  
  11240.           if (a.combat.getHealth() <
  11241.  
  11242. 95)
  11243.           {
  11244.             if (a.jA())
  11245.               return;
  11246.             if (((localObject2 = localRSNPC1.getMessage()) != null) &&
  11247.               (!((String)
  11248.  
  11249. localObject2).contains("Chat later")))
  11250.             {
  11251.               i1 = 1;
  11252.             }
  11253.             a.jA = a.npcs.getNearest(a.B);
  11254.  
  11255.             a.l(a.UC, 20, 20);
  11256.  
  11257.            
  11258.  
  11259.  if ((a.calc.distanceTo(localRSNPC1) > 3) || (a.X().equals(a.vE))) {
  11260.               a.F(a.vE, 2);
  11261.             }
  11262.             else if ((a.jA != null) &&
  11263.  
  11264. (a.calc.distanceBetween(a.vE, a.jA.getLocation()) < 5.0D)) {
  11265.               a.i(a.jA);
  11266.             }
  11267.  
  11268.             a.sleep(300, 600);
  11269.           }
  11270.           a.sleep(1400,
  11271.  
  11272. 1800);
  11273.  
  11274.           a.vE = null;
  11275.         }
  11276.  
  11277.       }
  11278.  
  11279.       a.i(a.npcs.getNearest(a.B));
  11280.  
  11281.       a.l(a.UC, 20, 20);
  11282.     }
  11283.     else
  11284.     {
  11285.       if ((a.tc.equals("Hobgoblin Geomancer"))
  11286.  
  11287. || (localRSNPC2 != null))
  11288.       {
  11289.         a.Qc = "Killing the Hobgoblin Geomancer!";
  11290.  
  11291.         if (a.tc.isEmpty())
  11292.         {
  11293.           a.log(a.Qc);
  11294.  
  11295.           a.tc = "Hobgoblin
  11296.  
  11297. Geomancer";
  11298.         }
  11299.  
  11300.         a.l(a.QC, null, false);
  11301.  
  11302.         a.PD = a.xb;
  11303.       }
  11304.       while (a.objects.getNearest(a.gb) == null)
  11305.       {
  11306.         if (a.jA()) {
  11307.          
  11308.  
  11309. return;
  11310.         }
  11311.  
  11312.         a.i(localRSNPC2);
  11313.  
  11314.         if (a.MC)
  11315.         {
  11316.           a.JC();
  11317.  
  11318.           if (!a.JC()) {
  11319.             a.sleep(1000, 2000);
  11320.           }
  11321.  
  11322.          
  11323.  
  11324. a.sleep(1000, 2000);
  11325.  
  11326.           a.MC = false;
  11327.         }
  11328.  
  11329.         a.l(a.UC, 50, 60);
  11330.  
  11331.         a.sleep(200, 300); continue;
  11332.  
  11333.         if (!a.tc.equals("Bulwark Beast")) { if (a.i
  11334.  
  11335. (new String[] { "Bulwark beast" }) == null);
  11336.         }
  11337.         else
  11338.         {
  11339.           i1 = 0;
  11340.  
  11341.           a.Qc = "Killing the Bulwark Beast!";
  11342.  
  11343.           if (a.tc.isEmpty())
  11344.  
  11345.  
  11346.         {
  11347.             a.log(a.Qc);
  11348.  
  11349.             a.tc = "Bulwark Beast";
  11350.           }
  11351.           localObject1 = a.i(new String[] { "Bulwark beast" });
  11352.  
  11353.           if (a.Ob < 1)
  11354.    
  11355.  
  11356.        {
  11357.             a.Ob = ((RSNPC)localObject1).getID();
  11358.           }
  11359.           a.l(false, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  11360.  
  11361.           a.PD = (a.bC != -1 ? a.bC :
  11362.  
  11363. a.Gd);
  11364.  
  11365.           if (a.jA())
  11366.           {
  11367.             return;
  11368.           }
  11369.           if ((
  11370.             (localObject1 = a.i(new String[] { "Bulwark beast" })) != null) && (a.HC
  11371.  
  11372. != 3))
  11373.           {
  11374.             localObject2 = a.inventory.getItem(new int[] { a.Vc });
  11375.  
  11376.             if (((RSNPC)localObject1).getID() == a.Ob)
  11377.             {
  11378.              
  11379.  
  11380. RSItem localRSItem = a.inventory.getItem(new int[] { 16295 });
  11381.  
  11382.               if ((i1 == 0) && (localRSItem == null))
  11383.               {
  11384.                 if
  11385.  
  11386. (a.equipment.containsAll(new int[] { 16295 }))
  11387.                 {
  11388.                   i1 = 1;
  11389.                 }
  11390.                 else
  11391.                 {
  11392.                   a.AB =
  11393.  
  11394. "Grabbing a pickaxe to mine his armor";
  11395.  
  11396.                   a.A(false);
  11397.                   RSObject localRSObject2;
  11398.                   if (
  11399.                     (localRSObject2
  11400.  
  11401. = a.objects.getNearest(new int[] { 49295 })) != null)
  11402.                   {
  11403.                     a.l(localRSObject2, "Take-pickaxe");
  11404.  
  11405.                     a.sleep(500, 800);
  11406.  
  11407.  
  11408.                 }
  11409.  
  11410.                   a.AB = "";
  11411.                 }
  11412.               }
  11413.               if ((localRSItem != null) && (localObject2 == null))
  11414.               {
  11415.          
  11416.  
  11417.       if ((a.l(16295, "")) || (a.inventory.contains(a.Vc)))
  11418.                 {
  11419.                   i1 = 1;
  11420.                 }
  11421.               }
  11422.             }
  11423.             else if
  11424.  
  11425. ((localObject2 != null) && (((RSItem)localObject2).doClick(true)))
  11426.             {
  11427.               a.sleep(700, 900);
  11428.             }
  11429.  
  11430.           }
  11431.  
  11432.           if (a.i((RSNPC)
  11433.  
  11434. localObject1))
  11435.             a.A(true);
  11436.           a.l(a.UC, 50, 60);
  11437.  
  11438.           a.sleep(200, 300);
  11439.  
  11440.           break; } if (!a.tc.equals("Unholy Cursebearer")) { if (a.i(new
  11441.  
  11442. String[] { "cursebearer" }) == null);
  11443.         }
  11444.         else
  11445.         {
  11446.           a.Qc = "Killing the Unholy Cursebearer!";
  11447.  
  11448.           if (a.tc.isEmpty())
  11449.           {
  11450.          
  11451.  
  11452.   a.log(a.Qc);
  11453.  
  11454.             a.tc = "Unholy Cursebearer";
  11455.           }
  11456.  
  11457.           a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
  11458.  
  11459.           a.PD = a.Gd;
  11460.  
  11461.           if (a.h())
  11462.  
  11463.  
  11464.          {
  11465.             break;
  11466.           }
  11467.  
  11468.           return;
  11469.         }
  11470.         RSObject localRSObject1;
  11471.         if (!a.tc.equals("Shadow-Forger Ihlakhizan")) { if (a.i(new
  11472.  
  11473. String[] { "Ihlakhizan" }) == null);
  11474.         }
  11475.         else
  11476.         {
  11477.           a.Qc = "Killing Shadow-Forger Ihlakhizan!";
  11478.  
  11479.           if (a.tc.isEmpty())
  11480.           {
  11481.          
  11482.  
  11483.    a.log(a.Qc);
  11484.  
  11485.             a.tc = "Shadow-Forger Ihlakhizan";
  11486.           }
  11487.  
  11488.           a.l(a.QC, null, false);
  11489.  
  11490.           a.PD = a.bC;
  11491.  
  11492.           while (a.objects.getNearest
  11493.  
  11494. (a.gb) == null)
  11495.           {
  11496.             if (a.jA())
  11497.               return;
  11498.             if ((a.vE == null) || (a.calc.distanceTo(a.vE) > 3))
  11499.             {
  11500.              
  11501.  
  11502. localRSObject1 = a.i(new int[] { 51110 }); localObject1 = a.i(new int[] { 50749 });
  11503.  
  11504.               if ((localRSObject1 != null) && (localObject1 != null))
  11505.               {
  11506.  
  11507.  
  11508.                int i2 = localRSObject1.getLocation().getX();
  11509.  
  11510.                 int i3 = localRSObject1.getLocation().getY();
  11511.  
  11512.                 int i4 = ((RSObject)
  11513.  
  11514. localObject1).getLocation().getX();
  11515.  
  11516.                 int i5 = ((RSObject)localObject1).getLocation().getY();
  11517.  
  11518.                 a.vE = new RSTile(i2 + (i4 - i2) / 4, i3 +
  11519.  
  11520. (i5 - i3) / 4);
  11521.               }
  11522.  
  11523.             }
  11524.  
  11525.             a.A(a.vE, a.random(0, 2));
  11526.             do {
  11527.               a.sleep(300, 500);
  11528.             }
  11529.  
  11530.             while
  11531.  
  11532. ((a.calc.distanceTo(a.vE) <= 1) || (!a.A(a.vE, a.random(0, 2))));
  11533.  
  11534.             a.sleep(600, 800);
  11535.  
  11536.             a.F(localRSNPC3, "Attack");
  11537.  
  11538.             a.i(localRSNPC3);
  11539.  
  11540.      
  11541.  
  11542.        if (a.l(a.UC, 50, 0))
  11543.               continue;
  11544.             a.sleep(200, 300);
  11545.           }
  11546.  
  11547.         }
  11548.  
  11549.         if (!a.tc.equals("Bal'lak the Pummeller")) { if (a.i(new
  11550.  
  11551. String[] { "Pummeller" }) == null);
  11552.         }
  11553.         else
  11554.         {
  11555.           a.Qc = "Killing Bal'lak the Pummeller!";
  11556.  
  11557.           if (a.tc.isEmpty())
  11558.           {
  11559.            
  11560.  
  11561. a.log(a.Qc);
  11562.  
  11563.             a.tc = "Bal'lak the Pummeller";
  11564.           }
  11565.  
  11566.           a.l(a.QC, null, false);
  11567.  
  11568.           a.PD = (a.bC != -1 ? a.bC : a.xb);
  11569.  
  11570.           while
  11571.  
  11572. (a.objects.getNearest(a.gb) == null)
  11573.           {
  11574.             if (a.jA())
  11575.             {
  11576.               return;
  11577.             }
  11578.             if (localRSNPC4 != null)
  11579.             {
  11580.  
  11581.  
  11582.             if ((
  11583.                 (localRSObject1 = a.i(new int[] { 49298 })) != null) && (a.calc.distanceTo(localRSObject1) < 3))
  11584.               {
  11585.                 if (!
  11586.  
  11587. a.Y().isMoving())
  11588.                   a.l(localRSNPC4.getLocation(), 1);
  11589.               }
  11590.               else if (a.interfaces.getComponent(945, 17).getRelativeX() < 100)
  11591.      
  11592.  
  11593.          {
  11594.                 a.l(a.lG, 50, 60);
  11595.               }
  11596.  
  11597.               a.i(localRSNPC4);
  11598.             }
  11599.             a.sleep(100, 200);
  11600.           }
  11601.         }
  11602.         a.Qc =
  11603.  
  11604. "Killing an unknown boss...";
  11605.  
  11606.         a.log(a.Qc);
  11607.  
  11608.         a.l(a.QC, null, false);
  11609.  
  11610.         if (a.h())
  11611.           break;
  11612.         return;
  11613.       }
  11614.  
  11615.     }
  11616.  
  11617.     a.Ke = true;
  11618.   }
  11619.  
  11620.  
  11621.  
  11622. private boolean J(RSTile a, int[] a)
  11623.   {
  11624.     if ((a != null) && (!a.be.contains(a))) { if (a.r.contains(new RSTile[] { a }));
  11625.     }
  11626.     else
  11627.       return false;
  11628.    
  11629.  
  11630. RSObject[] arrayOfRSObject;
  11631.     int i1 = (arrayOfRSObject = a.objects.getAllAt(a)).length;
  11632.     int i2;
  11633.     RSObject localRSObject = arrayOfRSObject[i2];
  11634.  
  11635.     if (a.l
  11636.  
  11637. (localRSObject.getID(), a))
  11638.     {
  11639.       return false;
  11640.     }
  11641.     i2++;
  11642.  
  11643.     return !a.ue.contains(a);
  11644.   }
  11645.  
  11646.   private boolean l(RSArea a, ArrayList<RSTile> a)
  11647.   {
  11648.     if ((a !=
  11649.  
  11650. null) && (a != null)) {
  11651.       for (RSTile localRSTile : a)
  11652.       {
  11653.         if (a.contains(new RSTile[] { localRSTile })) {
  11654.           return true;
  11655.         }
  11656.  
  11657.       }
  11658.  
  11659.     }
  11660.  
  11661.    
  11662.  
  11663. return false;
  11664.   }
  11665.  
  11666.   private RSNPC[] F(int[] a)
  11667.   {
  11668.     return a.npcs.getAll(new m(a, a));
  11669.   }
  11670.  
  11671.   private boolean fA()
  11672.   {
  11673.     RSObject localRSObject;
  11674.     if ((localRSObject =
  11675.  
  11676. a.objects.getNearest(a.Hd)) != null)
  11677.     {
  11678.       if (a.jb.contains(new RSTile[] { a.X() }))
  11679.       {
  11680.         Object localObject = localRSObject.getLocation();
  11681.  
  11682.         if
  11683.  
  11684. (a.calc.distanceTo((RSTile)localObject) < 3) {
  11685.           return a.l(localRSObject, "Enter");
  11686.         }
  11687.  
  11688.         double d1 = 0.0D;
  11689.         RSTile[] arrayOfRSTile;
  11690.         int
  11691.  
  11692. i1 = (arrayOfRSTile = localRSObject.getArea().getTileArray()).length;
  11693.         int i2;
  11694.         RSTile localRSTile = arrayOfRSTile[i2];
  11695.         double d2;
  11696.         if (
  11697.        
  11698.  
  11699.    (d2 = a.calc.distanceBetween(a.jb.getCentralTile(), localRSTile)) > d1)
  11700.         {
  11701.           localObject = localRSTile;
  11702.  
  11703.           d1 = d2;
  11704.         }
  11705.  
  11706.         i2++;
  11707.  
  11708.        
  11709.  
  11710. if (a.calc.distanceTo((RSTile)localObject) > 3)
  11711.         {
  11712.           if (a.Y().getAnimation() == -1) { if (a.jb.contains(new RSTile[] { a.X() }));
  11713.           }
  11714.          
  11715.  
  11716. else
  11717.           {
  11718.             a.uA();
  11719.  
  11720.             return false;
  11721.           }
  11722.  
  11723.           if (!a.Y().isMoving())
  11724.           {
  11725.             a.i((RSTile)localObject, 1);
  11726.  
  11727.             if
  11728.  
  11729. (a.calc.distanceTo((RSTile)localObject) > a.random(6, 8))
  11730.             {
  11731.               a.camera.turnToTile((RSTile)localObject, a.random(5, 15));
  11732.             }
  11733.            
  11734.  
  11735. else {
  11736.               a.l(false);
  11737.             }
  11738.  
  11739.           }
  11740.  
  11741.         }
  11742.  
  11743.         a.sleep(100, 200);
  11744.  
  11745.         return a.A((RSTile)localObject, "Enter");
  11746.       }
  11747.  
  11748.     }
  11749.  
  11750.     return
  11751.  
  11752. false;
  11753.   }
  11754.  
  11755.   private boolean GA()
  11756.   {
  11757.     return a.interfaces.get(942).isValid();
  11758.   }
  11759.  
  11760.   private boolean jA()
  11761.   {
  11762.     if (!a.bA())
  11763.     {
  11764.       a.KA = new Timer(0L);
  11765.     }
  11766.  
  11767.     a.V
  11768.  
  11769. ();
  11770.  
  11771.     if (!a.Od)
  11772.     {
  11773.       a.log("Shutting down iDungeon");
  11774.  
  11775.       return true;
  11776.     }
  11777.  
  11778.     if (a.game.getClientState() != 10)
  11779.     {
  11780.       if (a.game.getClientState() != 11)
  11781.  
  11782.  
  11783.     {
  11784.         a.log("Oops.. We got logged out somehow :S");
  11785.  
  11786.         if (a.interfaces.get(596).isValid())
  11787.         {
  11788.           a.log("Exited to main screen, ceding control
  11789.  
  11790. to LoginBot.");
  11791.  
  11792.           return true;
  11793.         }
  11794.         if (a.l(a.interfaces.getComponent(906, 171), ""))
  11795.         {
  11796.           a.sleep(4000, 8000);
  11797.         }
  11798.         a.sleep
  11799.  
  11800. (300, 600);
  11801.  
  11802.         if ((a.game.isLoggedIn()) && (a.zB))
  11803.         {
  11804.           if (a.Zc())
  11805.           {
  11806.             return true;
  11807.           }
  11808.           a.uA();
  11809.  
  11810.           a.sleep
  11811.  
  11812. (100, 200);
  11813.  
  11814.           a.log("Logged back in, attempting to correct.");
  11815.  
  11816.           a.yd = a.groundItems.getNearest(new int[] { 18829 });
  11817.  
  11818.           RSTile localRSTile = a.yd
  11819.  
  11820. != null ? a.yd.getLocation() : null;
  11821.  
  11822.           if (localRSTile != null)
  11823.           {
  11824.             if (a.Zc()) {
  11825.               return true;
  11826.             }
  11827.  
  11828.             if (!
  11829.  
  11830. a.r.contains(new RSTile[] { a.X() })) {
  11831.               a.rb();
  11832.             }
  11833.             else
  11834.             {
  11835.               a.A(localRSTile, "Take");
  11836.             }
  11837.  
  11838.            
  11839.  
  11840. a.sleep(400, 800);
  11841.  
  11842.             a.uA();
  11843.  
  11844.             if (a.nb != null) { if (a.nb.contains(new RSTile[] { a.X() }));
  11845.             }
  11846.             else
  11847.             {
  11848.              
  11849.  
  11850. if ((!a.QB()) || (!a.ZA()))
  11851.               {
  11852.                 return false;
  11853.               }
  11854.               if (a.Rd != 1)
  11855.               {
  11856.                 a.QB = a.FA;
  11857.  
  11858.            
  11859.  
  11860.      a.A(new int[] { 18829 });
  11861.  
  11862.                 a.G(false);
  11863.  
  11864.                 a.l(a.jb);
  11865.  
  11866.                 a.ZA();
  11867.  
  11868.                 a.l(a.QB);
  11869.  
  11870.                 a.n();
  11871.  
  11872.              
  11873.  
  11874.   (a.Zc > 4 ? a.FA :
  11875.                   a.rb());
  11876.               }
  11877.             }
  11878.           }
  11879.         }
  11880.       }
  11881.       else
  11882.       {
  11883.         a.sleep(100, 1000);
  11884.       }
  11885.  
  11886.       return
  11887.  
  11888. false;
  11889.     }
  11890.     if (a.CA())
  11891.       return true;
  11892.     if (a.zB)
  11893.     {
  11894.       int i1;
  11895.       if (a.AA())
  11896.       {
  11897.         if ((a.Qc.contains("locked")) && (a.Hc))
  11898.         {
  11899.          
  11900.  
  11901. a.log("Posthumosly assigning the lockdown");
  11902.  
  11903.           a.J.add(a.nD);
  11904.  
  11905.           a.Hc = true;
  11906.         }
  11907.  
  11908.         a.Qc = "Oh dear...";
  11909.  
  11910.         a.AB = "";
  11911.  
  11912.         a.QB = (!
  11913.  
  11914. a.r.equals(a.jb) ? a.r : null);
  11915.  
  11916.         a.sleep(300, 500);
  11917.  
  11918.         a.hA = new Timer(a.random(360000, 480000));
  11919.  
  11920.         a.log("Died, walking back..");
  11921.  
  11922.         a.vE = null;
  11923.  
  11924.  
  11925.  
  11926.       a.Pd += 1;
  11927.  
  11928.         a.nD = null;
  11929.  
  11930.         a.WA = null;
  11931.  
  11932.         a.yd = null;
  11933.  
  11934.         a.jA = null;
  11935.  
  11936.         a.qA = a.F(a.QB);
  11937.  
  11938.         a.Fg = true;
  11939.  
  11940.         a.jC = false;
  11941.  
  11942.      
  11943.  
  11944.   a.FF = false;
  11945.  
  11946.         a.X = false;
  11947.  
  11948.         a.hB = false;
  11949.  
  11950.         a.l(a.jb);
  11951.  
  11952.         if (a.nb != null)
  11953.         {
  11954.           if ((a.tc.equals("Bal'lak the Pummeller")) &&
  11955.  
  11956. (a.interfaces.get(945).isValid()))
  11957.           {
  11958.             a.AB = "Allowing his defense to degenerate";
  11959.  
  11960.             i1 = a.interfaces.getComponent(945, 17).getRelativeX()
  11961.  
  11962. - 15;
  11963.  
  11964.             int i3 = a.ig.size();
  11965.  
  11966.             if ((a.Zc > 4) || (i3 < 1))
  11967.             {
  11968.               i3 = 1;
  11969.             }
  11970.             int i4 = 200 * i1 - i3 * 7000;
  11971.  
  11972.  
  11973.  
  11974.           if (i3 == 1) {
  11975.               i4 += a.random(2000, 3000);
  11976.             }
  11977.  
  11978.             if (i4 > 0) {
  11979.               a.sleep(i4, (int)(i4 * 1.1D));
  11980.             }
  11981.  
  11982.        
  11983.  
  11984.   }
  11985.  
  11986.         }
  11987.         else if (a.XF)
  11988.         {
  11989.           a.AB = "Waiting for mercenaries to disperse";
  11990.  
  11991.           a.sleep(7000, 11000);
  11992.         }
  11993.  
  11994.         a.AB = "";
  11995.  
  11996.         if
  11997.  
  11998. (a.CA())
  11999.         {
  12000.           return true;
  12001.         }
  12002.         a.uA();
  12003.  
  12004.         a.sleep(200, 300);
  12005.  
  12006.         if ((a.VA) && ((a.nb != null) || (a.l.contains(a.QB))))
  12007.         {
  12008.        
  12009.  
  12010.    a.game.openTab(6);
  12011.         }
  12012.         a.F();
  12013.  
  12014.         a.game.openTab(4);
  12015.  
  12016.         if (a.HC == a.bb)
  12017.         {
  12018.           a.l(a.Vc, "Wield");
  12019.         }
  12020.         a.walking.setRun
  12021.  
  12022. (true);
  12023.  
  12024.         return true;
  12025.       }
  12026.  
  12027.       if ((a.nb != null) && (a.HD != null)) if ((!a.nb.contains(new RSTile[] { a.X() })) && (a.HD.getElapsed() > a.random(1500000,
  12028.  
  12029. 1800000)))
  12030.         {
  12031.           a.log.severe("Took too long to kill " + a.tc + ", trying a new dungeon.");
  12032.  
  12033.           if (a.UA)
  12034.           {
  12035.             a.env.saveScreenshot
  12036.  
  12037. (false);
  12038.           }
  12039.  
  12040.           a.gd = true;
  12041.  
  12042.           a.Ic += 1;
  12043.  
  12044.           a.nc = true;
  12045.  
  12046.           return true;
  12047.         }
  12048.  
  12049.  
  12050.       if ((a.hd != null) && (!a.hd.isRunning()))
  12051.      
  12052.  
  12053. {
  12054.         a.uC = "Timed out";
  12055.  
  12056.         return true;
  12057.       }
  12058.  
  12059.       if ((a.nb == null) && (a.hd == null) && (a.hA != null) && (!a.hA.isRunning()))
  12060.       {
  12061.         if (!a.gd)
  12062.    
  12063.  
  12064.     {
  12065.           a.log.severe("Took too long to complete this dungeon, trying a new one");
  12066.  
  12067.           if (a.UA)
  12068.           {
  12069.             a.env.saveScreenshot(false);
  12070.          
  12071.  
  12072. }
  12073.  
  12074.           a.gd = true;
  12075.  
  12076.           a.Ic += 1;
  12077.         }
  12078.  
  12079.         a.nc = true;
  12080.  
  12081.         return true;
  12082.       }
  12083.  
  12084.       if ((a.lc != null) && (a.lc.getElapsed() > a.random(10000,
  12085.  
  12086. 15000)))
  12087.       {
  12088.         if (a.lc.getElapsed() < a.random(45000, 90000))
  12089.         {
  12090.           if ((!a.Y().isMoving()) && (a.calc.distanceTo(a.nD) > 3))
  12091.           {
  12092.            
  12093.  
  12094.  a.F(a.nD);
  12095.           }
  12096.         }
  12097.         else
  12098.         {
  12099.           a.log.severe("Took too long to open this door");
  12100.  
  12101.           if (a.UA)
  12102.           {
  12103.            
  12104.  
  12105. a.env.saveScreenshot(false);
  12106.           }
  12107.  
  12108.           a.lc = null;
  12109.  
  12110.           if (a.r.contains(new RSTile[] { a.X() }))
  12111.           {
  12112.             if (a.nD != null)
  12113.             {
  12114.    
  12115.  
  12116.            a.fG.add(a.nD);
  12117.  
  12118.               a.J.remove(a.nD);
  12119.  
  12120.               a.Bd.remove(a.nD);
  12121.             }
  12122.             if (a.WA != null)
  12123.             {
  12124.               a.fG.add
  12125.  
  12126. (a.WA);
  12127.  
  12128.               a.J.remove(a.WA);
  12129.  
  12130.               a.Bd.remove(a.WA);
  12131.             }
  12132.  
  12133.           }
  12134.           else
  12135.           {
  12136.             a.uA();
  12137.  
  12138.             a.l(a.FA);
  12139.  
  12140.        
  12141.  
  12142.     if (a.nD != null)
  12143.             {
  12144.               a.J.remove(a.nD);
  12145.  
  12146.               a.Bd.remove(a.nD);
  12147.  
  12148.               a.w.add(a.nD);
  12149.             }
  12150.             if (a.WA != null)
  12151.  
  12152.  
  12153.            {
  12154.               a.J.remove(a.WA);
  12155.  
  12156.               a.Bd.remove(a.WA);
  12157.  
  12158.               a.w.add(a.WA);
  12159.             }
  12160.           }
  12161.           return true;
  12162.         }
  12163.  
  12164.       }
  12165.    
  12166.  
  12167.    else if ((a.KA != null) && (a.KA.getElapsed() > a.random(10000, 20000)))
  12168.       {
  12169.         if (a.KA.getElapsed() > a.random(90000, 180000))
  12170.         {
  12171.           a.AB =
  12172.  
  12173. "Attempting to reengage...";
  12174.  
  12175.           a.log.severe("We've been standing still for too long, lets try to do something!");
  12176.  
  12177.           if (a.r != null)
  12178.             a.A
  12179.  
  12180. (a.r.getCentralTile(), 1);
  12181.           if (a.hd != null)
  12182.           {
  12183.             i1 = (int)a.hd.getRemaining() - a.random(90000, 120000);
  12184.  
  12185.             a.hd.setEndIn(i1);
  12186.      
  12187.  
  12188.     }
  12189.           else if (a.hA != null)
  12190.           {
  12191.             int i2 = (int)a.hA.getRemaining() - a.random(90000, 120000);
  12192.  
  12193.             a.hA.setEndIn(i2);
  12194.           }
  12195.        
  12196.  
  12197.    a.KA = new Timer(0L);
  12198.  
  12199.           if (a.r != null)
  12200.           {
  12201.             a.uA();
  12202.  
  12203.             if (!a.r.contains(new RSTile[] { a.X() }))
  12204.             {
  12205.               a.l
  12206.  
  12207. (a.FA);
  12208.  
  12209.               a.Fg = true;
  12210.             }
  12211.           }
  12212.         }
  12213.         else
  12214.         {
  12215.           a.camera.moveRandomly(2000);
  12216.         }
  12217.  
  12218.       }
  12219.       else if ((!
  12220.  
  12221. a.walking.isRunEnabled()) && (a.walking.getEnergy() > a.random(10, 30)))
  12222.       {
  12223.         a.walking.setRun(true);
  12224.  
  12225.         a.sleep(500, 700);
  12226.       }
  12227.       else if (a.nA)
  12228.      
  12229.  
  12230.  {
  12231.         if (a.WC)
  12232.         {
  12233.           if (a.HC == 2)
  12234.           {
  12235.             a.log("Out of arrows! Re-equipping or wielding a backup weapon.");
  12236.  
  12237.             if
  12238.  
  12239. (a.inventory.getCount(true, new int[] { a.cc }) > a.random(4, 10))
  12240.             {
  12241.               a.l(a.cc, "Wield");
  12242.             }
  12243.             else
  12244.             {
  12245.              
  12246.  
  12247. if (a.kC)
  12248.               {
  12249.                 a.i(1);
  12250.               }
  12251.               else if (a.iD)
  12252.               {
  12253.                 a.i(3);
  12254.               }
  12255.               else
  12256.        
  12257.  
  12258.        {
  12259.                 a.nc = true;
  12260.  
  12261.                 return true;
  12262.               }a.Sd = false;
  12263.             }
  12264.           }
  12265.           else if (a.HC == 3)
  12266.           {
  12267.            
  12268.  
  12269. a.log("Out of Runes! Wielding our backup weapon.");
  12270.  
  12271.             if (a.kC)
  12272.             {
  12273.               a.i(1);
  12274.             }
  12275.             else if (a.Sd)
  12276.             {
  12277.          
  12278.  
  12279.     a.i(2);
  12280.             }
  12281.             else
  12282.             {
  12283.               a.nc = true;
  12284.  
  12285.               return true;
  12286.             }
  12287.  
  12288.             a.iD = false;
  12289.           }
  12290.  
  12291.          
  12292.  
  12293. a.WC = false;
  12294.         }
  12295.         if ((a.Qc.contains("Opening a")) && (a.nD != null) && (a.calc.distanceTo(a.nD) < 6))
  12296.         {
  12297.           return false;
  12298.         }
  12299.         if
  12300.  
  12301. (a.Qc.contains("Backtracking")) if (a.r.contains(new RSTile[] { a.X() }))
  12302.           {
  12303.             return false;
  12304.           }
  12305.         if ((a.F()) || (a.F(false)) || (a.PA())
  12306.  
  12307. || (a.Hb())) {
  12308.           return false;
  12309.         }
  12310.  
  12311.         if (a.game.getCurrentTab() == 4)
  12312.         {
  12313.           if ((!a.ce.isEmpty()) && (a.l(a.inventory.getItemID(a.ce),
  12314.  
  12315. "Bind"))) {
  12316.             a.ce = "";
  12317.           }
  12318.  
  12319.           a.D(false);
  12320.         }
  12321.         if ((a.Rd == 1) && (a.interfaces.get(79).isValid()))
  12322.           a.l
  12323.  
  12324. (a.interfaces.getComponent(79, 7), "Close");
  12325.         return a.rb();
  12326.       }
  12327.  
  12328.     }
  12329.  
  12330.     return false;
  12331.   }
  12332.  
  12333.   private boolean mA()
  12334.   {
  12335.     this.Od = true;
  12336.     JA();
  12337.     log("Cracked
  12338.  
  12339. by Contra. Visit RECoders.org for free cracks and more!");
  12340.     return true;
  12341.   }
  12342.  
  12343.   private void l(RSArea a)
  12344.   {
  12345.     if ((a != null) && ((a.r == null) || (!a.r.equals(a))))
  12346.    
  12347.  
  12348.  {
  12349.       a.r = a;
  12350.  
  12351.       a.Tc.addAll(a.ue);
  12352.  
  12353.       a.ue.clear();
  12354.  
  12355.       for (RSTile localRSTile : a.Tc)
  12356.         if (a.r.contains(new RSTile[] { localRSTile }))
  12357.         {
  12358.        
  12359.  
  12360.   a.ue.add(localRSTile);
  12361.         }
  12362.       a.Tc.removeAll(a.ue);
  12363.  
  12364.       a.f();
  12365.     }
  12366.   }
  12367.  
  12368.   private boolean AA()
  12369.   {
  12370.     return (a.jC) || (a.Y().getAnimation() == 836);
  12371.   }
  12372.  
  12373.  
  12374.  
  12375. private RSTile[] J(RSTile a)
  12376.   {
  12377.     int i1 = a.getX(); int i2 = a.getY();
  12378.  
  12379.     return new RSTile[] { new RSTile(i1 + 1, i2 + 1), new RSTile(i1 - 1, i2 + 1), new RSTile(i1
  12380.  
  12381. - 1, i2 - 1), new RSTile(i1 + 1, i2 - 1) };
  12382.   }
  12383.  
  12384.   private void aA()
  12385.   {
  12386.     a.Qc = "Exiting dungeon...";
  12387.  
  12388.     a.game.openTab(4);
  12389.  
  12390.     a.nc = true;
  12391.  
  12392.     if ((!a.Od) || (!
  12393.  
  12394. a.game.isLoggedIn()))
  12395.       return;
  12396.     a.V();
  12397.  
  12398.     if (a.Y().isInCombat())
  12399.     {
  12400.       a.uA();
  12401.  
  12402.       a.l(a.FA);
  12403.  
  12404.       if ((a.npcs.getNearest(a.B) != null) ||
  12405.  
  12406. (a.npcs.getNearest(a.Fd) != null)) {
  12407.         a.K();
  12408.       }
  12409.  
  12410.     }
  12411.     else if ((a.game.getCurrentTab() == 4) || (a.game.getCurrentTab() == 5))
  12412.     {
  12413.       if
  12414.  
  12415. (a.equipment.containsOneOf(a.DB))
  12416.       {
  12417.         if (a.equipment.getItem(35).doAction("Open party interface"))
  12418.         {
  12419.           int i1;
  12420.           if ((i1 = 0) < 10)
  12421.      
  12422.  
  12423.      {
  12424.             a.sleep(100, 200);
  12425.  
  12426.             i1++;
  12427.           }
  12428.           if (a.game.getCurrentTab() == 5)
  12429.           {
  12430.             a.mouse.moveRandomly(200);
  12431.           }
  12432.  
  12433.  
  12434.  
  12435.       }
  12436.         else
  12437.         {
  12438.           a.mouse.moveRandomly(50);
  12439.         }
  12440.       }
  12441.       else if (a.inventory.containsOneOf(a.DB))
  12442.       {
  12443.         a.inventory.getItem
  12444.  
  12445. (a.DB).doAction("Open party interface");
  12446.       }
  12447.       a.sleep(600, 800);
  12448.     }
  12449.     else if (a.interfaces.get(236).isValid())
  12450.     {
  12451.       a.interfaces.getComponent(236,
  12452.  
  12453. 1).doAction("Continue");
  12454.     }
  12455.     else if (a.interfaces.get(211).isValid())
  12456.     {
  12457.       a.interfaces.getComponent(211, 3).doAction("Continue");
  12458.     }
  12459.     else if
  12460.  
  12461. (a.interfaces.getComponent(939, 34).isValid())
  12462.     {
  12463.       a.interfaces.getComponent(939, 34).doAction("Leave-party");
  12464.     }
  12465.     a.sleep(1100, 1500);
  12466.  
  12467.     a.T();
  12468.  
  12469.     a.ud =
  12470.  
  12471. "Outside";
  12472.  
  12473.     a.zB = false;
  12474.   }
  12475.  
  12476.   private boolean i(RSTile a)
  12477.   {
  12478.     if ((a == null) || (a.FA == null))
  12479.     {
  12480.       return false;
  12481.     }
  12482.  
  12483.     int i1 = a.getX(); int i2 =
  12484.  
  12485. a.getY(); int i3 = a.FA.getX(); int i4 = a.FA.getY(); int i5 = i3 + 15; int i6 = i4 + 15;
  12486.  
  12487.     return (Math.abs(i1 - i3) == 1) || (Math.abs(i1 - i5) == 1) || (Math.abs
  12488.  
  12489. (i2 - i4) == 1) || (Math.abs(i2 - i6) == 1);
  12490.   }
  12491.  
  12492.   private boolean F(RSObject a, String a)
  12493.   {
  12494.     if (a == null)
  12495.       return false;
  12496.     RSModel localRSModel;
  12497.     return
  12498.  
  12499. (localRSModel = a.getModel()) != null
  12500.        ? a.l(localRSModel, a) : a.A(a.getLocation(), a);
  12501.   }
  12502.  
  12503.   public void mouseDragged(MouseEvent a)
  12504.   {
  12505.   }
  12506.  
  12507.   private void JA()
  12508.   {
  12509.    
  12510.  
  12511. new i(a).start();
  12512.   }
  12513.  
  12514.   private int dA()
  12515.   {
  12516.     int[] arrayOfInt1 = { 52046 };
  12517.  
  12518.     int[] arrayOfInt2 = { 50663, 51762, 53750 };
  12519.  
  12520.     RSObject localRSObject1 = a.J(new
  12521.  
  12522. String[] { "Spinning blades" });
  12523.  
  12524.     RSTile localRSTile1 = a.tA();
  12525.  
  12526.     if (localRSObject1 == null)
  12527.     {
  12528.       return -1;
  12529.     }
  12530.     RSTile localRSTile2 = a.F
  12531.  
  12532. (localRSObject1.getLocation(), arrayOfInt2);
  12533.  
  12534.     RSTile localRSTile3 = a.F(localRSTile1, a.lC); RSTile localRSTile4 = a.F(a.nD, a.lC);
  12535.  
  12536.     if ((localRSTile3 == null) ||
  12537.  
  12538. (localRSTile4 == null)) {
  12539.       return -1;
  12540.     }
  12541.  
  12542.     if ((!a.l(localRSTile3, true)) || (!a.l(localRSTile4, true)))
  12543.     {
  12544.       if (a.jA()) {
  12545.         return 2;
  12546.       }
  12547.  
  12548.       if
  12549.  
  12550. (!a.j())
  12551.         return -1;
  12552.       RSObject localRSObject2 = a.J(new String[] { "Pendulum" });
  12553.  
  12554.       RSObject localRSObject3 = a.i(a.kg);
  12555.  
  12556.       a.l(a.vc, 40, 50);
  12557.  
  12558.       a.jA
  12559.  
  12560. = a.npcs.getNearest(a.B);
  12561.  
  12562.       a.yd = a.l(a.Zd);
  12563.  
  12564.       if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
  12565.       {
  12566.         a.F(a.jA);
  12567.       }
  12568.       else if ((a.yd !=
  12569.  
  12570. null) && (a.l(a.yd.getLocation(), false)))
  12571.       {
  12572.         a.l(a.yd);
  12573.       }
  12574.       else if (a.F(localRSObject2))
  12575.       {
  12576.         a.A(localRSObject2.getLocation(), 1);
  12577.      
  12578.  
  12579. }
  12580.       else if ((localRSObject2 != null) && (a.calc.distanceTo(a.nD) < 4))
  12581.       {
  12582.         a.A(localRSObject2.getLocation(), 1);
  12583.       }
  12584.       else if (a.F(a.J(new String
  12585.  
  12586. [] { "Spinning blades" })))
  12587.       {
  12588.         if (a.calc.distanceTo(localRSTile2) > 1)
  12589.         {
  12590.           if (!a.i(a.X()))
  12591.           {
  12592.             RSObject localRSObject4 =
  12593.  
  12594. a.i(arrayOfInt2);
  12595.  
  12596.             a.A(localRSObject4 != null ? localRSObject4.getLocation() : a.X(), localRSObject4 != null ? 1 : 3);
  12597.           }
  12598.           else
  12599.           {
  12600.    
  12601.  
  12602.         a.A(localRSTile2, 1);
  12603.           }
  12604.         }
  12605.         else if (localRSObject2 != null) {
  12606.           a.l(localRSObject2.getLocation(), 1);
  12607.         }
  12608.  
  12609.       }
  12610.       else if
  12611.  
  12612. (a.F(localRSObject3))
  12613.       {
  12614.         a.A(localRSObject3.getLocation(), 1);
  12615.  
  12616.         a.K(true);
  12617.       }
  12618.       else if (a.l(localRSTile1, true))
  12619.       {
  12620.         a.l(a.i(a.bB),
  12621.  
  12622. "Step-onto");
  12623.       }
  12624.  
  12625.       a.K(false);
  12626.     }
  12627.     if (a.jA())
  12628.       return 2;
  12629.     if (a.l(a.i(a.lC), "Open"))
  12630.     {
  12631.       a.K(true);
  12632.     }
  12633.  
  12634.     a.sleep(200, 400);
  12635.  
  12636.     return 1;
  12637.   }
  12638.  
  12639.  
  12640.  
  12641.  private boolean l(String a, RSObject a)
  12642.   {
  12643.     int i1;
  12644.     if ((
  12645.       (i1 = a.inventory.getItemID(a)) > 0) && (a != null))
  12646.     {
  12647.       String str = a.A(a);
  12648.  
  12649.       RSTile
  12650.  
  12651. localRSTile = a.getLocation();
  12652.  
  12653.       if (a.calc.distanceTo(localRSTile) > 4)
  12654.       {
  12655.         a.l(localRSTile, 1);
  12656.       }
  12657.       if (a.F(i1))
  12658.       {
  12659.         if (str.isEmpty
  12660.  
  12661. ())
  12662.         {
  12663.           a.camera.turnToTile(localRSTile, a.random(5, 15));
  12664.         }
  12665.         a.sleep(200, 400);
  12666.  
  12667.         return a.doAction("Use " + a + " -> " + str);
  12668.       }
  12669.  
  12670.  
  12671.    }
  12672.     return false;
  12673.   }
  12674.  
  12675.   public void onFinish()
  12676.   {
  12677.     a.Od = false;
  12678.  
  12679.     a.iA = false;
  12680.  
  12681.     a.M = true;
  12682.  
  12683.     if ((a.pC > 1) && (a.FD))
  12684.     {
  12685.       a.FD = false;
  12686.  
  12687.       a.log
  12688.  
  12689. ("Thanks for using iDungeon Pro v1.07");
  12690.  
  12691.       a.env.saveScreenshot(true);
  12692.  
  12693.       a.log("We completed " + a.pC + " dungeons for " + a.Td + " tokens!");
  12694.     }
  12695.   }
  12696.  
  12697.   public
  12698.  
  12699. void mouseEntered(MouseEvent a)
  12700.   {
  12701.   }
  12702.  
  12703.   private RSObject l(RSObject a, int[] a)
  12704.   {
  12705.     double d1 = 99.989999999999995D;
  12706.  
  12707.     Object localObject = null;
  12708.     int i2;
  12709.     if (a
  12710.  
  12711. != null)
  12712.     {
  12713.       RSObject[] arrayOfRSObject;
  12714.       int i1 = (arrayOfRSObject = a.J(a)).length;
  12715.       RSObject localRSObject;
  12716.       double d2;
  12717.       if ((!
  12718.        
  12719.  
  12720. (localRSObject = arrayOfRSObject[i2]).equals(a)) && (
  12721.         (d2 = a.calc.distanceBetween(a.X(), localRSObject.getLocation())) < d1))
  12722.       {
  12723.         d1 = d2;
  12724.  
  12725.        
  12726.  
  12727. localObject = localRSObject;
  12728.       }
  12729.  
  12730.       i2++;
  12731.     }
  12732.     return localObject;
  12733.   }
  12734.  
  12735.   private int kA()
  12736.   {
  12737.     int i1;
  12738.     if (a.interfaces.get(950).isValid())
  12739.     {
  12740.       Point
  12741.  
  12742. localPoint;
  12743.       if (((localPoint = a.interfaces.getComponent(950, 67).getCenter()).x >
  12744.         560) || (localPoint.y > 220))
  12745.       {
  12746.         RSComponent
  12747.  
  12748. localRSComponent;
  12749.         if ((
  12750.           (localRSComponent = a.interfaces.getComponent(950, i1)).isValid()) && (localRSComponent.getArea().contains(localPoint)))
  12751.        
  12752.  
  12753. {
  12754.           return i1;
  12755.         }
  12756.         i1++;
  12757.       }
  12758.  
  12759.     }
  12760.  
  12761.     return -1;
  12762.   }
  12763.  
  12764.   private boolean bA()
  12765.   {
  12766.     RSPlayer localRSPlayer;
  12767.     return ((localRSPlayer = a.Y()) !=
  12768.  
  12769. null) &&
  12770.       (!localRSPlayer.isMoving()) && (localRSPlayer.getAnimation() == -1);
  12771.   }
  12772.  
  12773.   private int eA()
  12774.   {
  12775.     if (!a.O())
  12776.     {
  12777.       return -1;
  12778.     }
  12779.  
  12780.     RSObject
  12781.  
  12782. localRSObject1 = a.J(new String[] { "Unfinished bridge" });
  12783.  
  12784.     RSObject localRSObject2 = a.i(new int[] { 54021, 54022, 54023, 54024 });
  12785.  
  12786.     RSTile localRSTile = a.tA();
  12787.  
  12788.  
  12789.  
  12790.    if (a.hd == null)
  12791.     {
  12792.       a.hd = new Timer(a.random(480000, 600000));
  12793.     }
  12794.  
  12795.     if (a.jA())
  12796.       return 2;
  12797.     if (!a.j())
  12798.     {
  12799.       a.A(a.tA());
  12800.  
  12801.       return -1;
  12802.    
  12803.  
  12804. }
  12805.  
  12806.     a.jA = a.npcs.getNearest(a.B);
  12807.  
  12808.     if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
  12809.     {
  12810.       if ((!a.QB()) || (!a.ZA())) {
  12811.         return 2;
  12812.       }
  12813.  
  12814.      
  12815.  
  12816. a.hd = new Timer(a.random(240000, 300000));
  12817.     }
  12818.  
  12819.     if (a.l(localRSTile, true))
  12820.     {
  12821.       if (a.l(localRSObject1, "Jump"))
  12822.       {
  12823.         a.l(false);
  12824.  
  12825.         a.K(false);
  12826.  
  12827.  
  12828.      }
  12829.  
  12830.     }
  12831.     else
  12832.     {
  12833.       if (!a.kd)
  12834.       {
  12835.         a.lA.add(a.r);
  12836.  
  12837.         return 1;
  12838.       }
  12839.       if (a.inventory.getCount(new int[] { 19651 }) < 5)
  12840.       {
  12841.         if
  12842.  
  12843. (a.l(localRSObject2, "Raid"))
  12844.         {
  12845.           a.K(false);
  12846.         }
  12847.       }
  12848.       else if (a.l(localRSObject1, "Repair"))
  12849.       {
  12850.         a.K(true);
  12851.       }
  12852.  
  12853.     }
  12854.  
  12855.    
  12856.  
  12857. a.sleep(300, 500);
  12858.  
  12859.     return 1;
  12860.   }
  12861.  
  12862.   private boolean l(boolean a, int a, int a)
  12863.   {
  12864.     RSNPC localRSNPC;
  12865.     if (
  12866.       (localRSNPC = a.D(new int[] { 11226 })) != null)
  12867.    
  12868.  
  12869. {
  12870.       a.SE = "";
  12871.  
  12872.       if (a.F(localRSNPC, "Trade"))
  12873.       {
  12874.         a.K(false);
  12875.       }
  12876.  
  12877.       a.sleep(600, 800);
  12878.       int i2;
  12879.       if ((!a) || ((!a.inventory.contains
  12880.  
  12881. (19650)) && (!a.inventory.containsAll(a.jF))))
  12882.       {
  12883.         Object localObject1;
  12884.         Object localObject2;
  12885.         if (a)
  12886.         {
  12887.           i1 = (localObject1 =
  12888.  
  12889. a.inventory.getItems(a.jF)).length;
  12890.  
  12891.           if ((localObject2 = localObject1[i2])
  12892.             .doAction("Sell 50"))
  12893.           {
  12894.             a.sleep(100, 300);
  12895.           }
  12896.  
  12897.  
  12898.          i2++;
  12899.         }
  12900.  
  12901.         int i1 = (localObject1 = a.inventory.getItems()).length;
  12902.         int i4;
  12903.         int i5;
  12904.         if ((i4 =
  12905.           (localObject2 =
  12906.  
  12907. localObject1[i2]).getID()) >=
  12908.           1) if ((!a.l(i4, new int[] { 18201, 19650 })) && ((i4 == a) || (!a.l(i4, a.pb))))
  12909.           {
  12910.             if ((i5 = 0) < 3)
  12911.        
  12912.  
  12913.      {
  12914.               if (localObject2.doAction("Sell 50"))
  12915.               {
  12916.                 a.sleep(50, 300);
  12917.  
  12918.                 a.sleep(50, 300);
  12919.               }
  12920.              
  12921.  
  12922. else
  12923.               {
  12924.                 i5++;
  12925.               }
  12926.  
  12927.             }
  12928.  
  12929.           }
  12930.  
  12931.  
  12932.         i2++;
  12933.  
  12934.         a.mouse.click(486, 270, 5, 10, true);
  12935.  
  12936.         a.sleep(400, 600);
  12937.  
  12938.      
  12939.  
  12940.    if ((localObject1 = a.interfaces.getComponent(956, 25))
  12941.           .isValid())
  12942.         {
  12943.           a.mouse.click(((RSComponent)localObject1).getComponent(3).getCenter
  12944.  
  12945. ().x, ((RSComponent)localObject1).getComponent(5).getAbsoluteY() - 15, 4, 10, true);
  12946.  
  12947.           a.sleep(200, 300);
  12948.         }
  12949.  
  12950.         a.sleep(250, 400);
  12951.  
  12952.         i1 = a.kd ?
  12953.  
  12954. 200 : 100;
  12955.  
  12956.         if (!a)
  12957.           i1 -= 50;
  12958.         a.mouse.click(i1, 275, 10, 10, false);
  12959.         int i3;
  12960.         if ((i3 = 0) < 5)
  12961.         {
  12962.           a.sleep(80, 120);
  12963.  
  12964.  
  12965.  
  12966.         i3++;
  12967.         }
  12968.  
  12969.         a.l("Buy 1");
  12970.  
  12971.         i2++;
  12972.       }
  12973.  
  12974.       a.interfaces.getComponent(956, 18).doAction("Close");
  12975.  
  12976.       a.sleep(700, 1000);
  12977.     }
  12978.     return
  12979.  
  12980. (a.inventory.contains(19650)) || (a.inventory.containsAll(a.jF));
  12981.   }
  12982.  
  12983.   private boolean iA()
  12984.   {
  12985.     if (a.Ud < 13) {
  12986.       return true;
  12987.     }
  12988.  
  12989.     RSComponent
  12990.  
  12991. localRSComponent1 = a.interfaces.getComponent(947, 608 + a.OA);
  12992.  
  12993.     RSComponent localRSComponent2 = a.interfaces.getComponent(947, 47);
  12994.  
  12995.     if ((!
  12996.  
  12997. localRSComponent1.isValid()) || (!localRSComponent2.isValid()))
  12998.     {
  12999.       return false;
  13000.     }
  13001.     if (localRSComponent2.getComponents().length != 6)
  13002.     {
  13003.       return
  13004.  
  13005. true;
  13006.     }
  13007.     RSComponent localRSComponent3;
  13008.     if (
  13009.       (localRSComponent3 = localRSComponent1).getScrollableContentHeight() == 0);
  13010.     if
  13011.  
  13012. (localRSComponent3.getScrollableContentHeight() == 0)
  13013.     {
  13014.       return false;
  13015.     }
  13016.     int i1 = localRSComponent3.getAbsoluteY();
  13017.  
  13018.     int i2 =
  13019.  
  13020. localRSComponent3.getRealHeight();
  13021.  
  13022.     if ((localRSComponent1.getAbsoluteY() >= i1) && (localRSComponent1.getAbsoluteY() <= i1 + i2 - localRSComponent1.getRealHeight
  13023.  
  13024. ()))
  13025.     {
  13026.       return true;
  13027.     }
  13028.     RSComponent localRSComponent4 = localRSComponent2.getComponent(0);
  13029.  
  13030.     int i3 = localRSComponent3.getScrollableContentHeight();
  13031.    
  13032.  
  13033. int i4;
  13034.     if ((i4 = (int)(localRSComponent4.getRealHeight() / i3 * (localRSComponent1.getRelativeY() + a.random(-i2 / 2, i2 / 2 - localRSComponent1.getRealHeight
  13035.  
  13036. ())))) < 0)
  13037.     {
  13038.       i4 = 0;
  13039.     }
  13040.     else if (i4 >= localRSComponent4.getRealHeight())
  13041.       i4 = localRSComponent4.getRealHeight() - 1;
  13042.     a.mouse.click
  13043.  
  13044. (localRSComponent4.getAbsoluteX() + a.random(0, localRSComponent4.getRealWidth()), localRSComponent4.getAbsoluteY() + i4, true);
  13045.  
  13046.     a.sleep(100, 300);
  13047.  
  13048.     if
  13049.  
  13050. (localRSComponent1.isValid())
  13051.     {
  13052.       a.l(localRSComponent2.getComponent(localRSComponent1.getAbsoluteY() < i1 ? 4 : 5), "");
  13053.  
  13054.       a.sleep(50, 200);
  13055.     }
  13056.  
  13057.     return
  13058.  
  13059. (localRSComponent1.isValid()) && (localRSComponent1.getAbsoluteY() >= i1) && (localRSComponent1.getAbsoluteY() <= i1 + i2 - localRSComponent1.getRealHeight());
  13060.   }
  13061.  
  13062.  
  13063.  
  13064. private int FA()
  13065.   {
  13066.     String str = "";
  13067.  
  13068.     if (!a.O())
  13069.     {
  13070.       return -1;
  13071.     }
  13072.     int i1 = 0; int i2 = 0;
  13073.  
  13074.     RSNPC localRSNPC = a.i(new String[] { "hoardstalker" });
  13075.  
  13076.  
  13077.  
  13078.    if (!a.KD)
  13079.     {
  13080.       if (a.jA())
  13081.       {
  13082.         return 2;
  13083.       }
  13084.       if (!a.j())
  13085.       {
  13086.         return -1;
  13087.       }
  13088.       RSObject localRSObject = a.i(new int[] {
  13089.  
  13090. 49600, 49601, 49602 });
  13091.       Object localObject2;
  13092.       if (i1 < 1)
  13093.       {
  13094.         RSComponent localRSComponent;
  13095.         if (!
  13096.           (localRSComponent =
  13097.  
  13098. a.interfaces.getComponent(242, 4)).isValid())
  13099.         {
  13100.           localRSComponent = a.interfaces.getComponent(241, 4);
  13101.         }
  13102.  
  13103.         if (localRSComponent.isValid())
  13104.    
  13105.  
  13106.      {
  13107.           if (
  13108.             (localObject2 = localRSComponent.getText()).contains("yetsan"))
  13109.           {
  13110.             a.uC = "Summoning requirement not met";
  13111.  
  13112.            
  13113.  
  13114.  return -1;
  13115.           }
  13116.           if (((String)localObject2).contains("a deathslinger"))
  13117.           {
  13118.             i1 = 17389;
  13119.           }
  13120.           else if (((String)
  13121.  
  13122. localObject2).contains("cannot illuminate"))
  13123.           {
  13124.             i1 = 17393;
  13125.           }
  13126.           else if (((String)localObject2).contains("blunt force"))
  13127.           {
  13128.  
  13129.  
  13130.           i1 = 17401;
  13131.           }
  13132.           else if (((String)localObject2).contains("make you dead"))
  13133.           {
  13134.             i1 = 17403;
  13135.           }
  13136.           else if
  13137.  
  13138. (((String)localObject2).contains("lost in winds"))
  13139.           {
  13140.             i1 = 17379;
  13141.           }
  13142.           else if (((String)localObject2).contains("stones may"))
  13143.        
  13144.  
  13145.   {
  13146.             i1 = 17387;
  13147.           }
  13148.           else if (((String)localObject2).contains("friends fly"))
  13149.           {
  13150.             i1 = 17405;
  13151.           }
  13152.           else
  13153.      
  13154.  
  13155.     {
  13156.             i2 = 1;
  13157.  
  13158.             if (((String)localObject2).contains("veins I flow"))
  13159.             {
  13160.               i1 = 17385;
  13161.  
  13162.               str = "rune";
  13163.             }
  13164.  
  13165.  
  13166.           else if (((String)localObject2).contains("get you almost"))
  13167.             {
  13168.               i1 = 17391;
  13169.  
  13170.               str = "Coins";
  13171.             }
  13172.             else if
  13173.  
  13174. (((String)localObject2).contains("denizens"))
  13175.             {
  13176.               i1 = 17399;
  13177.  
  13178.               str = "rod";
  13179.             }
  13180.             else if (((String)
  13181.  
  13182. localObject2).contains("one eye"))
  13183.             {
  13184.               i1 = 17409;
  13185.  
  13186.               str = "Needle";
  13187.             }
  13188.             else if (((String)localObject2).contains
  13189.  
  13190. ("demonstrate faith"))
  13191.             {
  13192.               i1 = 17383;
  13193.  
  13194.               str = "symbol";
  13195.             }
  13196.             else
  13197.             {
  13198.               i2 = 2;
  13199.  
  13200.              
  13201.  
  13202. if (((String)localObject2).contains("yellow skin"))
  13203.               {
  13204.                 i1 = 17381;
  13205.  
  13206.                 str = "Banana";
  13207.               }
  13208.               else if
  13209.  
  13210. (((String)localObject2).contains("water that"))
  13211.               {
  13212.                 i1 = 17395;
  13213.  
  13214.                 str = "whiskey";
  13215.               }
  13216.               else if
  13217.  
  13218. (((String)localObject2).contains("many call"))
  13219.               {
  13220.                 i1 = 17407;
  13221.  
  13222.                 str = "Mushroom";
  13223.               }
  13224.               else if
  13225.  
  13226. (((String)localObject2).contains("you cannot"))
  13227.               {
  13228.                 i1 = 17413;
  13229.  
  13230.                 str = "water";
  13231.               }
  13232.               else if (((String)
  13233.  
  13234. localObject2).contains("slowest of"))
  13235.               {
  13236.                 i1 = 17411;
  13237.  
  13238.                 str = "Poison";
  13239.               }
  13240.               else if (((String)
  13241.  
  13242. localObject2).contains("serpent am I"))
  13243.               {
  13244.                 i1 = 17397;
  13245.  
  13246.                 str = "eel";
  13247.               }
  13248.  
  13249.             }
  13250.  
  13251.           }
  13252.  
  13253.           if (i1 <
  13254.  
  13255. 1)
  13256.           {
  13257.             a.uC = "Uknown riddle";
  13258.  
  13259.             return -1;
  13260.           }
  13261.           a.log("Fetching item: " + i1 + "; Location: " + i2);
  13262.         }
  13263.         else
  13264.    
  13265.  
  13266.     {
  13267.           a.F(localRSNPC, "Get-Riddle");
  13268.         }
  13269.       }
  13270.       else
  13271.       {
  13272.         if (a.inventory.contains(i1))
  13273.         {
  13274.           int i3 = a.inventory.getCount(new
  13275.  
  13276. int[] { i1 });
  13277.  
  13278.           for (; ; a.sleep(200, 400))
  13279.           {
  13280.             if (a.jA()) {
  13281.               return 2;
  13282.             }
  13283.  
  13284.             a.K(false);
  13285.           }
  13286.         }
  13287.  
  13288.  
  13289.       if (localRSObject != null)
  13290.         {
  13291.           a.l(localRSObject, "Open");
  13292.         }
  13293.         else if (i2 == 0)
  13294.         {
  13295.           a.l(a.groundItems.getNearest(new
  13296.  
  13297. int[] { i1 }));
  13298.         }
  13299.         else if (i2 == 1)
  13300.         {
  13301.           if (a.interfaces.get(238).isValid())
  13302.             a.l(a.interfaces.get(238), new String[] { str });
  13303.    
  13304.  
  13305.        else {
  13306.             a.l(a.i(new int[] { 49594, 49595, 49596 }), "Search");
  13307.           }
  13308.  
  13309.         }
  13310.         else if (i2 == 2)
  13311.         {
  13312.           Object localObject1 =
  13313.  
  13314. null;
  13315.  
  13316.           int i4 = (localObject2 = a.J(new int[] { 49597, 49598, 49599 })).length;
  13317.           int i5;
  13318.           Object localObject3;
  13319.           RSTile localRSTile =
  13320.    
  13321.  
  13322.          (localObject3 = localObject2[i5]).getLocation();
  13323.  
  13324.           if ((!a.i(localRSTile)) && (a.l(localRSTile, true)))
  13325.           {
  13326.             localObject1 =
  13327.  
  13328. localObject3;
  13329.           }
  13330.           else
  13331.             i5++;
  13332.           if (localObject1 == null)
  13333.           {
  13334.             if ((localObject2 = a.J(new String[] { "range" })) ==
  13335.  
  13336. null)
  13337.             {
  13338.               return -1;
  13339.             }
  13340.  
  13341.             a.A(((RSObject)localObject2).getLocation(), 1);
  13342.           }
  13343.           else if (a.interfaces.get
  13344.  
  13345. (237).isValid())
  13346.           {
  13347.             a.l(a.interfaces.get(237), new String[] { str, "More" });
  13348.           }
  13349.           else
  13350.           {
  13351.             a.l(localObject1,
  13352.  
  13353. "Search");
  13354.           }
  13355.         }
  13356.       }
  13357.       a.K(true);
  13358.     }
  13359.  
  13360.     return 1;
  13361.   }
  13362.  
  13363.   private int A(RSTile a)
  13364.   {
  13365.     a.BG = true;
  13366.     RSObject localRSObject;
  13367.     if ((a != null) &&
  13368.  
  13369. (!a.l(a, true)))
  13370.     {
  13371.       localRSObject = a.i(a.gA);
  13372.  
  13373.       String str = "Cross-the";
  13374.  
  13375.       if (localRSObject == null)
  13376.       {
  13377.         localRSObject = a.J(new String[] {
  13378.  
  13379. "Unfinished bridge" });
  13380.  
  13381.         str = "Jump";
  13382.       }
  13383.  
  13384.       if (localRSObject != null)
  13385.       {
  13386.         if (a.Zc())
  13387.           return 2;
  13388.         if (!a.j())
  13389.         {
  13390.          
  13391.  
  13392. return -1;
  13393.         }
  13394.  
  13395.         if (a.l(localRSObject, str))
  13396.         {
  13397.           a.K(true);
  13398.         }
  13399.         a.K(true);
  13400.       }
  13401.     }
  13402.     return 1;
  13403.   }
  13404.  
  13405.   private void DA()
  13406.   {
  13407.    
  13408.  
  13409. RSGroundItem[] arrayOfRSGroundItem1 = new RSGroundItem[a.Sb.length];
  13410.  
  13411.     if (a.PB == null)
  13412.       a.PB = new String[a.Sb.length];
  13413.     RSGroundItem[] arrayOfRSGroundItem2;
  13414.  
  13415.  
  13416.   int i2 = (arrayOfRSGroundItem2 = a.groundItems.getAll()).length;
  13417.     int i3;
  13418.     RSGroundItem localRSGroundItem2 = arrayOfRSGroundItem2[i3];
  13419.     int i5;
  13420.     if
  13421.  
  13422. (a.r.contains(new RSTile[] { localRSGroundItem2.getLocation() }))
  13423.     {
  13424.       String str2 = localRSGroundItem2.getItem().getName();
  13425.       int i4;
  13426.       if ((
  13427.         (i4 =
  13428.  
  13429. a.F(str2)) > 0) && (i4 <= a.tA))
  13430.       {
  13431.         if ((a.l(str2, a.wC[i5])) && (i4 > a.Tb[i5]) && ((!a.wC[i5][0].equals("kiteshield")) || ((!a.GD) && (!str2.contains
  13432.  
  13433. ("(o)")))))
  13434.         {
  13435.           a.Tb[i5] = i4;
  13436.  
  13437.           arrayOfRSGroundItem1[i5] = localRSGroundItem2;
  13438.         }
  13439.  
  13440.         i5++;
  13441.       }
  13442.     }
  13443.     i3++;
  13444.     int i1;
  13445.    
  13446.  
  13447. RSGroundItem localRSGroundItem1;
  13448.     if (
  13449.       (localRSGroundItem1 = arrayOfRSGroundItem1[i1]) != null)
  13450.     {
  13451.       String str1 = localRSGroundItem1.getItem().getName();
  13452.  
  13453.  
  13454.  
  13455.     if ((a.PB[i1] == null) || (!str1.equals(a.PB[i1])))
  13456.       {
  13457.         a.log("Improving equipment with: " + str1);
  13458.  
  13459.         a.PB[i1] = str1;
  13460.       }
  13461.  
  13462.     }
  13463.  
  13464.     i1++;
  13465.   }
  13466.  
  13467.  
  13468.  
  13469. private boolean l(RSObject a, String a)
  13470.   {
  13471.     if (a == null) {
  13472.       return false;
  13473.     }
  13474.  
  13475.     int i1 = 0;
  13476.  
  13477.     RSTile localRSTile = a.getLocation();
  13478.     Object localObject;
  13479.    
  13480.  
  13481.  if ((a.game.getCurrentTab() == 4) && (
  13482.       (localObject = a.inventory.getSelectedItem()) != null))
  13483.       ((RSItem)localObject).doClick(true);
  13484.     if (a.F(a, a))
  13485.     {
  13486.    
  13487.  
  13488.    localObject = a.X();
  13489.  
  13490.       double d1 = a.calc.distanceBetween(a.X(), localRSTile);
  13491.  
  13492.       a.sleep((int)d1 * 200, (int)d1 * 220);
  13493.  
  13494.       i1 = (a.Y().isMoving()) ||
  13495.  
  13496. (a.calc.distanceTo(localRSTile) < 4) || (!((RSTile)localObject).equals(a.X())) ? 1 : 0;
  13497.     }
  13498.  
  13499.     if ((!a.Y().isMoving()) && (a.calc.distanceTo(localRSTile) > 4))
  13500.     {
  13501.    
  13502.  
  13503.    a.i(localRSTile, 1);
  13504.  
  13505.       if ((a.Qc.contains("Backtracking")) && (!a.combat.isAutoRetaliateEnabled()) && (a.game.getCurrentTab() != 0))
  13506.         a.game.openTab(0);
  13507.    
  13508.  
  13509.   else if (a.calc.distanceTo(localRSTile) > a.random(6, 8))
  13510.       {
  13511.         a.camera.turnToTile(localRSTile, a.random(5, 15));
  13512.       }
  13513.       else {
  13514.         a.l(false);
  13515.      
  13516.  
  13517. }
  13518.  
  13519.     }
  13520.  
  13521.     while ((a.game.getCurrentTab() == 4) && (!a.equals("Pull")) && (!a.Ke) && (a.JC()));
  13522.     a.sleep(100, 200);
  13523.  
  13524.     return i1 != 0 ? true : a.F(a, a);
  13525.   }
  13526.  
  13527.   private
  13528.  
  13529. boolean A(RSNPC a)
  13530.   {
  13531.     if ((a == null) || (a.l(a.getAnimation(), a.Yc))) {
  13532.       return true;
  13533.     }
  13534.  
  13535.     return (a.isInCombat()) && (a.l(a) == 0) && (!a.l(a));
  13536.   }
  13537.  
  13538.  
  13539.  
  13540. private boolean i(boolean a)
  13541.   {
  13542.     if (a.ZA == null)
  13543.     {
  13544.       RSObject localRSObject;
  13545.       if ((a.r.contains(new RSTile[] { a.X() })) && (
  13546.         (localRSObject =
  13547.  
  13548. a.G(a.nD)) != null))
  13549.       {
  13550.         int i2 = 0;
  13551.         RSTile[] arrayOfRSTile;
  13552.         int i3 = (arrayOfRSTile = localRSObject.getArea().getTileArray()).length;
  13553.        
  13554.  
  13555. int i4;
  13556.         RSTile localRSTile = arrayOfRSTile[i4];
  13557.  
  13558.         if (a.calc.distanceBetween(a.X(), localRSTile) == 1.0D)
  13559.         {
  13560.           i2 = 1;
  13561.         }
  13562.         else
  13563.    
  13564.  
  13565.       i4++;
  13566.         if (i2 == 0)
  13567.         {
  13568.           return false;
  13569.         }
  13570.       }
  13571.     }
  13572.     int i1;
  13573.     if (a.ZA == null)
  13574.     {
  13575.       if (a.game.getClientState() == 11)
  13576.      
  13577.  
  13578. {
  13579.         a.sleep(100, 200);
  13580.  
  13581.         i1--;
  13582.       }
  13583.       else
  13584.       {
  13585.         if ((a) && (!a.iD())) {
  13586.           return true;
  13587.         }
  13588.  
  13589.         if (a.cA())
  13590.         {
  13591.          
  13592.  
  13593. return !a.IA();
  13594.         }
  13595.       }
  13596.     }
  13597.     else if (a.ZA.contains(new RSTile[] { a.X() }))
  13598.       return true;
  13599.     a.sleep(200, 400);
  13600.  
  13601.     i1++;
  13602.  
  13603.     return false;
  13604.   }
  13605.  
  13606.   private
  13607.  
  13608. int lA()
  13609.   {
  13610.     double d1 = 99.989999999999995D;
  13611.  
  13612.     int i1 = -1;
  13613.  
  13614.     Object localObject1 = null;
  13615.  
  13616.     a.nD = null;
  13617.  
  13618.     a.WA = null;
  13619.  
  13620.     ArrayList localArrayList = new
  13621.  
  13622. ArrayList();
  13623.  
  13624.     for (Iterator localIterator = a.J.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
  13625.  
  13626.       if (a.r.contains(new
  13627.  
  13628. RSTile[] { localRSTile }))
  13629.       {
  13630.         localArrayList.add(localRSTile);
  13631.       }
  13632.     }
  13633.     RSTile localRSTile;
  13634.     Object localObject2;
  13635.     if (!localArrayList.isEmpty())
  13636.  
  13637.  
  13638.   {
  13639.       for (localIterator = localArrayList.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
  13640.  
  13641.         localObject2 = a.G
  13642.  
  13643. (localRSTile);
  13644.  
  13645.         double d2 = a.calc.distanceBetween(a.X(), localRSTile);
  13646.  
  13647.         if ((localObject2 != null) && (d2 < d1))
  13648.         {
  13649.           i1 = 0;
  13650.  
  13651.           d1 =
  13652.  
  13653. d2;
  13654.  
  13655.           i1 = ((RSObject)localObject2).getID();
  13656.  
  13657.           localObject1 = localRSTile;
  13658.         }
  13659.  
  13660.       }
  13661.  
  13662.       if ((localObject1 != null) && (i1 > 0))
  13663.       {
  13664.         for
  13665.  
  13666. (localIterator = a.gc.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
  13667.  
  13668.           if (a.calc.distanceBetween(localObject1,
  13669.  
  13670. localRSTile) < 3.0D)
  13671.           {
  13672.             a.nD = localObject1;
  13673.  
  13674.             a.WA = localRSTile;
  13675.  
  13676.             return 2;
  13677.           }
  13678.         }
  13679.         for (localIterator =
  13680.  
  13681. a.vF.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
  13682.  
  13683.           if (a.calc.distanceBetween(localObject1, localRSTile) < 3.0D)
  13684.        
  13685.  
  13686.   {
  13687.             a.nD = localObject1;
  13688.  
  13689.             a.WA = localRSTile;
  13690.  
  13691.             return 3;
  13692.           }
  13693.         }
  13694.         if (a.l(i1, a.WD))
  13695.         {
  13696.           a.nD =
  13697.  
  13698. localObject1;
  13699.  
  13700.           return 1;
  13701.         }
  13702.  
  13703.         if (a.id.contains(localObject1))
  13704.         {
  13705.           a.nD = localObject1;
  13706.  
  13707.           return 4;
  13708.         }
  13709.         if (a.l(i1,
  13710.  
  13711. a.sb))
  13712.         {
  13713.           a.nD = localObject1;
  13714.  
  13715.           return 1;
  13716.         }
  13717.       }
  13718.     }
  13719.     for (localIterator = a.w.iterator(); localIterator.hasNext(); ) { localRSTile
  13720.  
  13721. = (RSTile)localIterator.next();
  13722.  
  13723.       if ((a.r.contains(new RSTile[] { localRSTile })) && ((a.QA == null) || (!localRSTile.equals(a.QA)))) {
  13724.         for (localObject2 =
  13725.  
  13726. a.Nc.iterator(); ((Iterator)localObject2).hasNext(); ) { RSArea localRSArea = (RSArea)((Iterator)localObject2).next();
  13727.  
  13728.           if (a.calc.distanceBetween(localRSTile,
  13729.  
  13730. localRSArea.getNearestTile(localRSTile)) < 3.0D)
  13731.           {
  13732.             if ((!a.l(localRSArea, a.J)) && (!a.l(localRSArea, a.w)))
  13733.               break;
  13734.             a.nD =
  13735.  
  13736. localRSTile;
  13737.  
  13738.             return 5;
  13739.           }
  13740.  
  13741.         }
  13742.  
  13743.       }
  13744.  
  13745.     }
  13746.  
  13747.     return 0;
  13748.   }
  13749.  
  13750.   public void keyReleased(KeyEvent a)
  13751.   {
  13752.   }
  13753.  
  13754.   private RSGroundItem l
  13755.  
  13756. (Filter<RSGroundItem> a)
  13757.   {
  13758.     double d1 = 99.989999999999995D;
  13759.  
  13760.     Object localObject = null;
  13761.     int i3;
  13762.     if (a.r != null)
  13763.     {
  13764.       int i1 = a.r.getX(); int i2 =
  13765.  
  13766. a.r.getY();
  13767.       int i4;
  13768.       RSTile localRSTile = new RSTile(i3, i4);
  13769.       double d2;
  13770.       int i6;
  13771.       if (
  13772.         (d2 = a.calc.distanceBetween(a.X(), localRSTile))
  13773.  
  13774. < d1)
  13775.       {
  13776.         RSGroundItem[] arrayOfRSGroundItem;
  13777.         int i5 = (arrayOfRSGroundItem = a.groundItems.getAllAt(i3, i4)).length; RSGroundItem localRSGroundItem =
  13778.  
  13779. arrayOfRSGroundItem[i6];
  13780.  
  13781.         if (a.accept(localRSGroundItem))
  13782.         {
  13783.           d1 = d2;
  13784.  
  13785.           localObject = localRSGroundItem;
  13786.         }
  13787.         else
  13788.         {
  13789.      
  13790.  
  13791.      i6++;
  13792.         }
  13793.       }
  13794.       i4++;
  13795.  
  13796.       i3++;
  13797.     }
  13798.     return localObject;
  13799.   }
  13800.  
  13801.   private boolean F(RSNPC a)
  13802.   {
  13803.     if ((a == null) || (!a.isValid()) || (a.l(a))) {
  13804.      
  13805.  
  13806. return false;
  13807.     }
  13808.  
  13809.     if (a.l(a, "Attack " + a.getName()))
  13810.     {
  13811.       if (a.tc.isEmpty())
  13812.       {
  13813.         a.D(a);
  13814.  
  13815.         if (!a.F())
  13816.         {
  13817.           a.sleep(200, 400);
  13818.  
  13819.  
  13820.       }
  13821.       }
  13822.       return true;
  13823.     }
  13824.     int i1;
  13825.     if (!a.isOnScreen())
  13826.     {
  13827.       if (!a.Y().isMoving())
  13828.       {
  13829.         a.l(a.getLocation(), 1);
  13830.  
  13831.         a.sleep(200,
  13832.  
  13833. 400);
  13834.       }
  13835.       if ((i1 = 0) < 10)
  13836.       {
  13837.         a.sleep(100, 150);
  13838.  
  13839.         i1++;
  13840.       }
  13841.  
  13842.     }
  13843.  
  13844.     return (a.l(a)) || (a.l(a, "Attack"));
  13845.   }
  13846.  
  13847.   private RSTile F(RSTile a,
  13848.  
  13849. String a)
  13850.   {
  13851.     double d1 = 99999.990000000005D;
  13852.  
  13853.     Object localObject = null;
  13854.     int i2;
  13855.     if (a != null)
  13856.     {
  13857.       RSObject[] arrayOfRSObject;
  13858.       int i1 =
  13859.  
  13860. (arrayOfRSObject = a.objects.getAll()).length;
  13861.       RSObject localRSObject;
  13862.       RSTile localRSTile =
  13863.         (localRSObject = arrayOfRSObject[i2]).getLocation();
  13864.      
  13865.  
  13866. double d2;
  13867.       if ((
  13868.         (d2 = a.calc.distanceBetween(localRSTile, a)) < d1) && (a.A(localRSObject).contains(a)))
  13869.       {
  13870.         d1 = d2;
  13871.  
  13872.         localObject =
  13873.  
  13874. localRSTile;
  13875.       }
  13876.       i2++;
  13877.     }
  13878.  
  13879.     return localObject;
  13880.   }
  13881.  
  13882.   private boolean CA()
  13883.   {
  13884.     if ((a.nA) && (a.zB) && (!a.nc) && (!a.Qc.startsWith("Entering")) && (!a.M
  13885.  
  13886. ()))
  13887.     {
  13888.       a.log.severe("Oops.. We ended up outside somehow :S");
  13889.  
  13890.       a.T();
  13891.  
  13892.       a.ud = "Outside";
  13893.  
  13894.       a.zB = false;
  13895.  
  13896.       a.N = false;
  13897.  
  13898.       return true;
  13899.     }
  13900.    
  13901.  
  13902. return false;
  13903.   }
  13904.  
  13905.   private void V()
  13906.   {
  13907.     if (a.qd)
  13908.     {
  13909.       a.log("Pausing iDungeon...");
  13910.  
  13911.       if (!a.Od)
  13912.       {
  13913.         return;
  13914.       }
  13915.  
  13916.       a.sleep(400, 600);
  13917.  
  13918.      
  13919.  
  13920. a.KA = new Timer(0L);
  13921.     }
  13922.   }
  13923.  
  13924.   private boolean l(RSTile a, boolean a)
  13925.   {
  13926.     RSTile localRSTile;
  13927.     if ((
  13928.       (localRSTile = a.X()) == null) || (a == null))
  13929.      
  13930.  
  13931. return false;
  13932.     int i1 = localRSTile.getX() - a.game.getBaseX(); int i2 = localRSTile.getY() - a.game.getBaseY();
  13933.  
  13934.     int i3 = a.getX() - a.game.getBaseX(); int i4 =
  13935.  
  13936. a.getY() - a.game.getBaseY();
  13937.  
  13938.     int[][] arrayOfInt1 = new int[104][104]; int[][] arrayOfInt2 = new int[104][104];
  13939.  
  13940.     int[] arrayOfInt3 = new int[4000]; int[]
  13941.  
  13942. arrayOfInt4 = new int[4000];
  13943.  
  13944.     arrayOfInt1[i5][i6] = 0;
  13945.  
  13946.     arrayOfInt2[i5][i6] = 99999999;
  13947.  
  13948.     i6++;
  13949.  
  13950.     i5++;
  13951.  
  13952.     int i5 = i1; int i6 = i2;
  13953.  
  13954.     arrayOfInt1[i1][i2] = 99;
  13955.  
  13956.  
  13957.  
  13958.    arrayOfInt2[i1][i2] = 0;
  13959.  
  13960.     int i7 = 0; int i8 = 0;
  13961.  
  13962.     arrayOfInt3[i7] = i1;
  13963.  
  13964.     arrayOfInt4[(i7++)] = i2;
  13965.  
  13966.     int[][] arrayOfInt5 = a.walking.getCollisionFlags
  13967.  
  13968. (a.game.getPlane());
  13969.  
  13970.     int i9 = arrayOfInt3.length;
  13971.  
  13972.     while (i8 != i7)
  13973.     {
  13974.       i5 = arrayOfInt3[i8];
  13975.  
  13976.       i6 = arrayOfInt4[i8];
  13977.  
  13978.       if (a)
  13979.       {
  13980.         if
  13981.  
  13982. (Math.abs(i6 - i4) + Math.abs(i5 - i3) == 1) {
  13983.           return true;
  13984.         }
  13985.  
  13986.       }
  13987.       else if ((i5 == i3) && (i6 == i4))
  13988.         return true;
  13989.       i8 = (i8 + 1) %
  13990.  
  13991. i9;
  13992.  
  13993.       int i10 = arrayOfInt2[i5][i6] + 1;
  13994.  
  13995.       if ((i6 > 0) && (arrayOfInt1[i5][(i6 - 1)] == 0) && ((arrayOfInt5[(i5 + 1)][i6] & 0x1280102) == 0))
  13996.       {
  13997.        
  13998.  
  13999. arrayOfInt3[i7] = i5;
  14000.  
  14001.         arrayOfInt4[i7] = (i6 - 1);
  14002.  
  14003.         i7 = (i7 + 1) % i9;
  14004.  
  14005.         arrayOfInt1[i5][(i6 - 1)] = 1;
  14006.  
  14007.         arrayOfInt2[i5][(i6 - 1)] = i10;
  14008.      
  14009.  
  14010. }
  14011.       if ((i5 > 0) && (arrayOfInt1[(i5 - 1)][i6] == 0) && ((arrayOfInt5[i5][(i6 + 1)] & 0x1280108) == 0))
  14012.       {
  14013.         arrayOfInt3[i7] = (i5 - 1);
  14014.  
  14015.        
  14016.  
  14017. arrayOfInt4[i7] = i6;
  14018.  
  14019.         i7 = (i7 + 1) % i9;
  14020.  
  14021.         arrayOfInt1[(i5 - 1)][i6] = 2;
  14022.  
  14023.         arrayOfInt2[(i5 - 1)][i6] = i10;
  14024.       }
  14025.       if ((i6 < 103) &&
  14026.  
  14027. (arrayOfInt1[i5][(i6 + 1)] == 0) && ((arrayOfInt5[(i5 + 1)][(i6 + 2)] & 0x1280120) == 0))
  14028.       {
  14029.         arrayOfInt3[i7] = i5;
  14030.  
  14031.         arrayOfInt4[i7] = (i6 + 1);
  14032.  
  14033.        
  14034.  
  14035. i7 = (i7 + 1) % i9;
  14036.  
  14037.         arrayOfInt1[i5][(i6 + 1)] = 4;
  14038.  
  14039.         arrayOfInt2[i5][(i6 + 1)] = i10;
  14040.       }
  14041.       if ((i5 < 103) && (arrayOfInt1[(i5 + 1)][i6] == 0) &&
  14042.  
  14043. ((arrayOfInt5[(i5 + 2)][(i6 + 1)] & 0x1280180) == 0))
  14044.       {
  14045.         arrayOfInt3[i7] = (i5 + 1);
  14046.  
  14047.         arrayOfInt4[i7] = i6;
  14048.  
  14049.         i7 = (i7 + 1) % i9;
  14050.  
  14051.        
  14052.  
  14053. arrayOfInt1[(i5 + 1)][i6] = 8;
  14054.  
  14055.         arrayOfInt2[(i5 + 1)][i6] = i10;
  14056.       }
  14057.       if ((i5 > 0) && (i6 > 0) && (arrayOfInt1[(i5 - 1)][(i6 - 1)] == 0) && ((arrayOfInt5
  14058.  
  14059. [i5][i6] & 0x128010E) == 0) && ((arrayOfInt5[i5][(i6 + 1)] & 0x1280108) == 0) && ((arrayOfInt5[(i5 + 1)][i6] & 0x1280102) == 0))
  14060.       {
  14061.         arrayOfInt3[i7] = (i5 -
  14062.  
  14063. 1);
  14064.  
  14065.         arrayOfInt4[i7] = (i6 - 1);
  14066.  
  14067.         i7 = (i7 + 1) % i9;
  14068.  
  14069.         arrayOfInt1[(i5 - 1)][(i6 - 1)] = 3;
  14070.  
  14071.         arrayOfInt2[(i5 - 1)][(i6 - 1)] = i10;
  14072.       }
  14073.      
  14074.  
  14075. if ((i5 > 0) && (i6 < 103) && (arrayOfInt1[(i5 - 1)][(i6 + 1)] == 0) && ((arrayOfInt5[i5][(i6 + 2)] & 0x1280138) == 0) && ((arrayOfInt5[i5][(i6 + 1)] & 0x1280108) ==
  14076.  
  14077. 0) && ((arrayOfInt5[(i5 + 1)][(i6 + 2)] & 0x1280120) == 0))
  14078.       {
  14079.         arrayOfInt3[i7] = (i5 - 1);
  14080.  
  14081.         arrayOfInt4[i7] = (i6 + 1);
  14082.  
  14083.         i7 = (i7 + 1) % i9;
  14084.  
  14085.      
  14086.  
  14087.    arrayOfInt1[(i5 - 1)][(i6 + 1)] = 6;
  14088.  
  14089.         arrayOfInt2[(i5 - 1)][(i6 + 1)] = i10;
  14090.       }
  14091.  
  14092.       if ((i5 < 103) && (i6 > 0) && (arrayOfInt1[(i5 + 1)][(i6 - 1)] == 0)
  14093.  
  14094. && ((arrayOfInt5[(i5 + 2)][i6] & 0x1280183) == 0) && ((arrayOfInt5[(i5 + 2)][(i6 + 1)] & 0x1280180) == 0) && ((arrayOfInt5[(i5 + 1)][i6] & 0x1280102) == 0))
  14095.       {
  14096.      
  14097.  
  14098.    arrayOfInt3[i7] = (i5 + 1);
  14099.  
  14100.         arrayOfInt4[i7] = (i6 - 1);
  14101.  
  14102.         i7 = (i7 + 1) % i9;
  14103.  
  14104.         arrayOfInt1[(i5 + 1)][(i6 - 1)] = 9;
  14105.  
  14106.         arrayOfInt2[(i5 + 1)]
  14107.  
  14108. [(i6 - 1)] = i10;
  14109.       }
  14110.  
  14111.       if ((i5 < 103) && (i6 < 103) && (arrayOfInt1[(i5 + 1)][(i6 + 1)] == 0) && ((arrayOfInt5[(i5 + 2)][(i6 + 2)] & 0x12801E0) == 0) &&
  14112.  
  14113. ((arrayOfInt5[(i5 + 2)][(i6 + 1)] & 0x1280180) == 0) && ((arrayOfInt5[(i5 + 1)][(i6 + 2)] & 0x1280120) == 0))
  14114.       {
  14115.         arrayOfInt3[i7] = (i5 + 1);
  14116.  
  14117.        
  14118.  
  14119. arrayOfInt4[i7] = (i6 + 1);
  14120.  
  14121.         i7 = (i7 + 1) % i9;
  14122.  
  14123.         arrayOfInt1[(i5 + 1)][(i6 + 1)] = 12;
  14124.  
  14125.         arrayOfInt2[(i5 + 1)][(i6 + 1)] = i10;
  14126.       }
  14127.     }
  14128.     return
  14129.  
  14130. false;
  14131.   }
  14132.  
  14133.   private int y()
  14134.   {
  14135.     if (!a.O()) {
  14136.       return -1;
  14137.     }
  14138.  
  14139.     RSTile localRSTile = a.tA();
  14140.  
  14141.     RSObject localRSObject = a.J(new String[] { "Spinning blades"
  14142.  
  14143. });
  14144.  
  14145.     a.lA();
  14146.  
  14147.     if ((localRSObject == null) || (localRSTile == null) || (a.nD == null))
  14148.     {
  14149.       return -1;
  14150.     }
  14151.     if (a.calc.distanceBetween(localRSTile,
  14152.  
  14153. localRSObject.getLocation()) < 8.0D)
  14154.     {
  14155.       a.log("Agility course layout 1");
  14156.  
  14157.       return a.a();
  14158.     }
  14159.  
  14160.     if (a.calc.distanceBetween(a.r.getCentralTile(),
  14161.  
  14162. localRSObject.getLocation()) < 4.0D)
  14163.     {
  14164.       a.log("Agility course layout 3");
  14165.  
  14166.       return a.rd();
  14167.     }
  14168.  
  14169.     a.log("Agility course layout 2");
  14170.  
  14171.     return a.dA();
  14172.   }
  14173.  
  14174.  
  14175.  
  14176. private int l(RSCharacter a)
  14177.   {
  14178.     try
  14179.     {
  14180.       return a.getHPPercent();
  14181.     }
  14182.     catch (Exception localException)
  14183.     {
  14184.       if (a.UA)
  14185.        
  14186.  
  14187. localException.printStackTrace();
  14188.     }
  14189.     return 100;
  14190.   }
  14191.  
  14192.   private boolean A(RSTile a, int a, int a)
  14193.   {
  14194.     if (a == null)
  14195.     {
  14196.       return false;
  14197.     }
  14198.     RSTile
  14199.  
  14200. localRSTile1 = a.X(); RSTile localRSTile2 = new RSTile(a.getX() + a, a.getY() + a);
  14201.  
  14202.     if (localRSTile1.equals(localRSTile2))
  14203.       return true;
  14204.     int i3;
  14205.     if
  14206.  
  14207. (a.calc.distanceTo(localRSTile2) > 1)
  14208.     {
  14209.       RSTile[] arrayOfRSTile;
  14210.       int i2 = (arrayOfRSTile = a.h(a)).length; RSTile localRSTile3 = arrayOfRSTile[i3];
  14211.  
  14212.       if
  14213.  
  14214. ((a.G(localRSTile3) == null) && (!localRSTile3.equals(localRSTile2)) && (a.calc.distanceBetween(localRSTile3, localRSTile2) < 2.0D))
  14215.       {
  14216.         a.A(localRSTile3,
  14217.  
  14218. 0);
  14219.  
  14220.         a.K(false);
  14221.       }
  14222.       else
  14223.       {
  14224.         i3++;
  14225.       }
  14226.     }
  14227.     a.A(localRSTile2, 0);
  14228.  
  14229.     a.K(false);
  14230.  
  14231.     if (a.X().equals(localRSTile1))
  14232.     {
  14233.       int i1;
  14234.    
  14235.  
  14236.   a.A(a.X(), i1);
  14237.  
  14238.       a.K(false);
  14239.  
  14240.       i1++;
  14241.  
  14242.       a.A(localRSTile2, 0);
  14243.  
  14244.       a.K(false);
  14245.     }
  14246.     return a.X().equals(localRSTile2);
  14247.   }
  14248.  
  14249.   private void r()
  14250.   {
  14251.    
  14252.  
  14253. a.EB.clear();
  14254.  
  14255.     a.SC = a.skills.getRealLevel(5);
  14256.     int i1;
  14257.     Object localObject1;
  14258.     int i10;
  14259.     if (a.le)
  14260.     {
  14261.       if (!a.Od) {
  14262.         return;
  14263.       }
  14264.  
  14265.       a.CD =
  14266.  
  14267. a.skills.getCurrentExp(0);
  14268.  
  14269.       a.q = a.skills.getCurrentExp(2);
  14270.  
  14271.       a.Rc = a.skills.getCurrentExp(1);
  14272.  
  14273.       a.ZF = a.skills.getCurrentExp(3);
  14274.  
  14275.       a.xB =
  14276.  
  14277. a.skills.getCurrentExp(4);
  14278.  
  14279.       a.L = a.skills.getCurrentExp(6);
  14280.  
  14281.       a.pd = a.skills.getCurrentExp(5);
  14282.  
  14283.       a.JC = a.skills.getCurrentExp(24);
  14284.  
  14285.       a.og =
  14286.  
  14287. a.skills.getCurrentExp(20);
  14288.  
  14289.       a.vB = a.skills.getCurrentExp(14);
  14290.  
  14291.       a.aD = a.skills.getCurrentExp(11);
  14292.  
  14293.       a.K = a.skills.getCurrentExp(8);
  14294.  
  14295.       a.RA =
  14296.  
  14297. a.skills.getCurrentExp(13);
  14298.  
  14299.       a.Cg = a.skills.getCurrentExp(12);
  14300.  
  14301.       a.Gg = a.skills.getCurrentExp(16);
  14302.  
  14303.       a.db = a.skills.getCurrentExp(17);
  14304.  
  14305.       a.ND =
  14306.  
  14307. a.skills.getCurrentExp(23);
  14308.  
  14309.       a.f = a.skills.getCurrentExp(15);
  14310.  
  14311.       a.qc = a.skills.getCurrentExp(22);
  14312.  
  14313.       a.pD = a.skills.getCurrentExp(7);
  14314.  
  14315.       a.vA =
  14316.  
  14317. a.skills.getCurrentExp(10);
  14318.  
  14319.       a.e = a.skills.getCurrentExp(18);
  14320.  
  14321.       a.me = a.skills.getRealLevel(24);
  14322.  
  14323.       a.JA = a.me;
  14324.  
  14325.       if (!a.H())
  14326.       {
  14327.         if (a.SC >
  14328.  
  14329. 10)
  14330.         {
  14331.           a.O[1][5] = 1;
  14332.  
  14333.           a.xe = a.O[1][5];
  14334.  
  14335.           if (a.SC > 36)
  14336.           {
  14337.             a.O[1][3] = 1;
  14338.  
  14339.             a.VA = a.O[1][3];
  14340.           }
  14341.    
  14342.  
  14343.     }
  14344.         if (a.skills.getRealLevel(3) < 60)
  14345.         {
  14346.           a.zA = true;
  14347.  
  14348.           a.O[1][2] = 1;
  14349.         }
  14350.         if (a.skills.getRealLevel(1) < 20)
  14351.         {
  14352.      
  14353.  
  14354.     a.gB = true;
  14355.  
  14356.           a.O[1][6] = a.gB;
  14357.         }
  14358.         else
  14359.         {
  14360.           a.bc = true;
  14361.  
  14362.           a.O[1][7] = a.bc;
  14363.         }
  14364.  
  14365.       }
  14366.  
  14367.       a.kd = false;
  14368.       int
  14369.  
  14370. i6;
  14371.       if (a.groundItems.getNearest(new int[] { 18177, 18175, 18173, 18171, 18169 }) != null)
  14372.       {
  14373.         a.kd = true;
  14374.       }
  14375.       else
  14376.       {
  14377.        
  14378.  
  14379. a.game.openTab(9);
  14380.  
  14381.         a.game.openTab(4);
  14382.         String str1;
  14383.         if (!(str1 = a.interfaces.getComponent(550, 6).getText())
  14384.           .isEmpty())
  14385.         {
  14386.          
  14387.  
  14388.  str1 = str1.concat(".");
  14389.           String[] arrayOfString;
  14390.           int i4 = (arrayOfString = a.Md).length; localObject2 = arrayOfString[i6];
  14391.  
  14392.           if
  14393.  
  14394. (str1.contains(" " + (String)localObject2 + ".")) {
  14395.             a.kd = true;
  14396.           }
  14397.           else
  14398.           {
  14399.             i6++;
  14400.           }
  14401.         }
  14402.       }
  14403.       a.log
  14404.  
  14405. ("Members world: " + a.kd);
  14406.  
  14407.       a.DC = 0;
  14408.  
  14409.       a.iA = false;
  14410.  
  14411.       a.UB = false;
  14412.  
  14413.       a.qD = false;
  14414.  
  14415.       a.dc = true;
  14416.  
  14417.       a.game.setChatOption(3,
  14418.  
  14419. Game.CHAT_MODE.VIEW);
  14420.  
  14421.       a.env.setUserInput(3);
  14422.  
  14423.       if (!a.Od)
  14424.       {
  14425.         return;
  14426.       }
  14427.       a.sleep(300, 600);
  14428.  
  14429.       a.env.setUserInput(2);
  14430.  
  14431.       a.UB = true;
  14432.  
  14433.    
  14434.  
  14435.   a.qD = false;
  14436.  
  14437.       a.v = a.combat.getFightMode();
  14438.  
  14439.       if (a.IB) {
  14440.         a.v = 4;
  14441.       }
  14442.       else if (a.v == 4)
  14443.         a.v = 1;
  14444.       if ((a.gB) && ((a.v == a.xD)
  14445.  
  14446. || (a.v == 3)))
  14447.       {
  14448.         a.v = 1;
  14449.       }
  14450.  
  14451.       a.SD = a.v;
  14452.  
  14453.       a.sleep(200, 400);
  14454.  
  14455.       i1 = a.skills.getRealLevel(0); i3 = a.skills.getRealLevel(1);
  14456.  
  14457.       a.tA =
  14458.  
  14459. (i3 == 99 ? 11 : i3 / 10 + 1);
  14460.  
  14461.       a.mA = (i1 == 99 ? 11 : i1 / 10 + 1);
  14462.       RSItem localRSItem1;
  14463.       if (((localRSItem1 = a.equipment.getItem(17)) != null) &&
  14464.      
  14465.  
  14466.    (localRSItem1.getID() > 0))
  14467.       {
  14468.         a.Vc = localRSItem1.getID();
  14469.  
  14470.         localObject1 = a.l(localRSItem1);
  14471.  
  14472.         localObject2 = a.J((String)localObject1);
  14473.  
  14474.      
  14475.  
  14476.    a.aA = a.F((String)localObject1);
  14477.  
  14478.         a.cd = a.i((String)localObject1);
  14479.  
  14480.         if (a.cd.equals("maul"))
  14481.         {
  14482.           i10 = a.skills.getRealLevel(2);
  14483.  
  14484.          
  14485.  
  14486.  a.mA = (i10 == 99 ? 11 : i10 / 10 + 1);
  14487.         }
  14488.         else if ((a.cd.equals("dagger")) || (a.cd.equals("rapier")))
  14489.         {
  14490.           if (((String)
  14491.  
  14492. localObject2).equals("Hailstorm"))
  14493.           {
  14494.             a.aA = 11;
  14495.           }
  14496.  
  14497.           a.Gd = -1;
  14498.  
  14499.           a.xb = 2;
  14500.  
  14501.           a.bC = 1;
  14502.         }
  14503.         else if
  14504.  
  14505. (a.cd.equals("longsword"))
  14506.         {
  14507.           a.Gd = -1;
  14508.  
  14509.           a.xb = 1;
  14510.  
  14511.           a.bC = 2;
  14512.         }
  14513.         else if ((a.cd.equals("battleaxe")) || (a.cd.equals("2h
  14514.  
  14515. sword")))
  14516.         {
  14517.           a.Gd = 2;
  14518.  
  14519.           a.xb = 1;
  14520.  
  14521.           a.bC = -1;
  14522.         }
  14523.         else if (a.cd.equals("spear"))
  14524.         {
  14525.           a.Gd = 2;
  14526.  
  14527.           a.xb =
  14528.  
  14529. 1;
  14530.  
  14531.           a.bC = 0;
  14532.         }
  14533.         if ((a.cd.equals("longsword")) || (a.cd.equals("warhammer")) || (a.cd.equals("maul")))
  14534.         {
  14535.           a.xD = 2;
  14536.         }
  14537.        
  14538.  
  14539.  if ((a.cd.equals("2h sword")) || (a.cd.equals("maul")) || (a.cd.equals("spear")) || (a.cd.contains("bow")))
  14540.         {
  14541.           a.GD = true;
  14542.         }
  14543.         if (a.aA ==
  14544.  
  14545. 0)
  14546.         {
  14547.           a.aA = 11;
  14548.         }
  14549.         a.log("Weapon - Metal: " + (String)localObject2 + "; Type: " + a.cd);
  14550.  
  14551.         a.log("Weapon tier: " + a.aA + ", Max
  14552.  
  14553. weapon tier: " + a.mA + ", Two-handed: " + (a.GD ? "Yes" : "No"));
  14554.       }
  14555.       if ((
  14556.         (localObject1 = a.equipment.getItem(38)) != null) && (((RSItem)
  14557.  
  14558. localObject1).getID() > 0))
  14559.       {
  14560.         a.cc = ((RSItem)localObject1).getID();
  14561.       }
  14562.       Object localObject2 = a.jb();
  14563.       RSItem localRSItem2;
  14564.       if
  14565.  
  14566. (((localRSItem2 = localObject2[i10]) != null) &&
  14567.         (localRSItem2.getID() > 0))
  14568.       {
  14569.         String str3 = a.l(localRSItem2);
  14570.  
  14571.         if ((i10 == 0) &&
  14572.  
  14573. (str3.contains("silk hood")))
  14574.         {
  14575.           a.VD[i10] = 11;
  14576.  
  14577.           a.Xb = true;
  14578.         }
  14579.         else if ((i10 == 2) && ((str3.contains("blastbox")) ||
  14580.  
  14581. (str3.contains("surgebox"))))
  14582.         {
  14583.           a.pB = localRSItem2.getID();
  14584.  
  14585.           a.VD[i10] = 11;
  14586.  
  14587.           a.GD = true;
  14588.         }
  14589.         else
  14590.         {
  14591.          
  14592.  
  14593. a.VD[i10] = a.F(str3);
  14594.         }
  14595.         a.log("Equipped: " + str3 + "; initial tier: " + a.VD[i10] + "; hooded: " + a.Xb);
  14596.       }
  14597.  
  14598.       i10++;
  14599.     }
  14600.     int i3 = a.VD[i1];
  14601.  
  14602.  
  14603.  
  14604.    a.Tb[i1] = i3;
  14605.  
  14606.     i1++;
  14607.     RSItem[] arrayOfRSItem;
  14608.     i3 = (arrayOfRSItem = a.inventory.getItems()).length;
  14609.     int i12;
  14610.     if (
  14611.       (localObject1 = arrayOfRSItem
  14612.  
  14613. [i5]) != null)
  14614.     {
  14615.       int i8 = ((RSItem)localObject1).getID();
  14616.       String str2;
  14617.       if (((str2 = a.l((RSItem)localObject1)) != null) &&
  14618.         (i8 > 0) && ((i12
  14619.  
  14620. = a.F(str2)) > 0))
  14621.       {
  14622.         if ((a.l(str2, a.wC[i13])) && (i12 > a.Tb[i13]))
  14623.         {
  14624.           int i15;
  14625.           if ((i15 = 0) < 5)
  14626.           {
  14627.            
  14628.  
  14629. a.inventory.getItem(new int[] { i8 }).doClick(true);
  14630.  
  14631.             a.sleep(800, 1000);
  14632.  
  14633.             i15++;
  14634.           }
  14635.           a.Tb[i13] = i12;
  14636.         }
  14637.         i13++;
  14638.      
  14639.  
  14640. }
  14641.  
  14642.     }
  14643.  
  14644.     i5++;
  14645.  
  14646.     if ((a.k) || ((a.i) && (a.eB > 0)))
  14647.       a.kC = true;
  14648.     if ((a.Xd) || ((a.BB) && (a.eB > 0) && (a.cc > 0)))
  14649.     {
  14650.       a.Sd = true;
  14651.     }
  14652.  
  14653.     if
  14654.  
  14655. ((a.IB) || ((a.vC) && ((a.eB > 0) || (a.pB > 0)))) {
  14656.       a.iD = true;
  14657.     }
  14658.  
  14659.     i3 = a.Tb[i2];
  14660.  
  14661.     a.Sb[i2] = i3;
  14662.  
  14663.     i2++;
  14664.  
  14665.     a.vc = new int[] { 18159, 18161, 18163,
  14666.  
  14667. 18165, 18167, 18169, 18171, 18173, 18175, 18177 };
  14668.  
  14669.     a.vc = new int[] { 18161, 18163, 18165, 18167, 18169, 18171, 18173, 18175, a.zA ?
  14670.       i15 :
  14671.       18177 };
  14672.  
  14673.    
  14674.  
  14675. int i2 = a.skills.getRealLevel(3) / (a.kd ? 23 : 34);
  14676.  
  14677.     i3 = a.vc.length - i2; int i5 = i2 + (a.kd ? 3 : 1);
  14678.  
  14679.     int i7 = a.vc.length - i5;
  14680.  
  14681.     a.UC = new int[i3];
  14682.  
  14683.    
  14684.  
  14685. a.lG = new int[i7];
  14686.  
  14687.     System.arraycopy(a.vc, i2, a.UC, 0, i3);
  14688.  
  14689.     System.arraycopy(a.vc, i5, a.lG, 0, i7);
  14690.  
  14691.     a.W = new int[] { 18159, a.kd ? new int[] { 18159,
  14692.  
  14693. 18161, 18163 } : 18161 };
  14694.     Object localObject3;
  14695.     int i11 = (localObject3 = a.vc).length; int i13 = localObject3[i12];
  14696.  
  14697.     a.EB.add(Integer.valueOf(i13));
  14698.  
  14699.     i12++;
  14700.  
  14701.  
  14702.  
  14703.   if (a.kf)
  14704.     {
  14705.       i11 = (localObject3 = a.aC).length; i13 = localObject3[i12];
  14706.  
  14707.       a.EB.add(Integer.valueOf(i13));
  14708.  
  14709.       i12++;
  14710.     }
  14711.  
  14712.     if (a.Vc > 0)
  14713.     {
  14714.      
  14715.  
  14716. a.EB.add(Integer.valueOf(a.Vc));
  14717.     }
  14718.     if (a.eB > 0)
  14719.     {
  14720.       a.EB.add(Integer.valueOf(a.eB));
  14721.     }
  14722.  
  14723.     if (a.pB > 0) {
  14724.       a.EB.add(Integer.valueOf(a.pB));
  14725.     }
  14726.  
  14727.    
  14728.  
  14729. if (a.cc > 0) {
  14730.       a.EB.add(Integer.valueOf(a.cc));
  14731.     }
  14732.  
  14733.     i11 = (localObject3 = a.x).length;
  14734.     Object localObject4;
  14735.     Object localObject6;
  14736.     int i16 =
  14737.      
  14738.  
  14739. (localObject6
  14740.        = localObject4 = localObject3[i12]).length;
  14741.     int i17;
  14742.     int i18 = localObject6[i17];
  14743.  
  14744.     a.EB.add(Integer.valueOf(i18));
  14745.  
  14746.     i17++;
  14747.  
  14748.     i12++;
  14749.  
  14750.    
  14751.  
  14752. if (a.Zc > 4)
  14753.     {
  14754.       i11 = (localObject3 = a.jF).length; int i14 = localObject3[i12];
  14755.  
  14756.       a.EB.add(Integer.valueOf(i14));
  14757.  
  14758.       i12++;
  14759.  
  14760.       a.EB.add
  14761.  
  14762. (Integer.valueOf(18829));
  14763.  
  14764.       a.EB.add(Integer.valueOf(17789));
  14765.  
  14766.       if (!a.kd)
  14767.       {
  14768.         a.EB.remove(Integer.valueOf(17490));
  14769.  
  14770.         a.EB.remove(Integer.valueOf
  14771.  
  14772. (17754));
  14773.       }
  14774.       else
  14775.       {
  14776.         a.EB.add(Integer.valueOf(17566));
  14777.       }
  14778.  
  14779.     }
  14780.     else if (a.Ud > 11)
  14781.     {
  14782.       a.EB.add(Integer.valueOf(16295));
  14783.     }
  14784.  
  14785.     if
  14786.  
  14787. ((a.E) && (a.OA < 1))
  14788.     {
  14789.       if ((a.game.getCurrentTab() == 4) || (a.game.getCurrentTab() == 5))
  14790.       {
  14791.         if (a.equipment.containsOneOf(a.DB)) {
  14792.          
  14793.  
  14794. a.equipment.getItem(35).doAction("Open party interface");
  14795.         }
  14796.         else if (a.inventory.containsOneOf(a.DB))
  14797.           a.inventory.getItem(a.DB).doAction("Open
  14798.  
  14799. party interface");
  14800.         a.sleep(800, 1200);
  14801.       }
  14802.  
  14803.       a.sleep(300, 500);
  14804.  
  14805.       a.ad();
  14806.     }
  14807.     i11 = (localObject3 = a.inventory.getItems()).length;
  14808.     Object
  14809.  
  14810. localObject5;
  14811.     if ((
  14812.       (localObject5 = localObject3[i12]) != null) && (localObject5.getName().contains("(b)"))) {
  14813.       a.EB.add(Integer.valueOf
  14814.  
  14815. (localObject5.getID()));
  14816.     }
  14817.  
  14818.     i12++;
  14819.  
  14820.     a.pb = new int[a.EB.size()];
  14821.     int i9;
  14822.     a.pb[i9] = ((Integer)a.EB.get(i9)).intValue();
  14823.  
  14824.     i9++;
  14825.  
  14826.     if (a.k)
  14827.     {
  14828.      
  14829.  
  14830. a.HC = 1;
  14831.     }
  14832.     else if (a.Xd)
  14833.     {
  14834.       a.HC = 2;
  14835.  
  14836.       a.l(a.cc, "Wield");
  14837.     }
  14838.     else if (a.IB)
  14839.     {
  14840.       a.HC = 3;
  14841.  
  14842.       a.l(a.pB, "Wield");
  14843.  
  14844.       if (a.F(a.Qb,
  14845.  
  14846. "Autocast"))
  14847.       {
  14848.         a.sleep(300, 600);
  14849.       }
  14850.       a.sleep(100, 200);
  14851.     }
  14852.  
  14853.     a.bb = a.HC;
  14854.  
  14855.     if (a.le)
  14856.     {
  14857.       a.log("Settings complete!");
  14858.  
  14859.       a.Tb();
  14860.  
  14861.      
  14862.  
  14863. if (a.Xd)
  14864.       {
  14865.         a.Ec = a.Ad;
  14866.  
  14867.         a.yA = a.VB;
  14868.  
  14869.         a.wC = a.LA;
  14870.       }
  14871.       else if (a.IB)
  14872.       {
  14873.         a.Ec = a.ME;
  14874.  
  14875.         a.wC = a.lB;
  14876.       }
  14877.  
  14878.       a.z
  14879.  
  14880. = new Timer(0L);
  14881.  
  14882.       a.le = false;
  14883.     }
  14884.  
  14885.     a.hA = new Timer(a.random(360000, 480000));
  14886.   }
  14887.  
  14888.   private void R()
  14889.   {
  14890.     int i2;
  14891.     if (a.aA < a.mA)
  14892.     {
  14893.       RSItem[]
  14894.  
  14895. arrayOfRSItem;
  14896.       int i1 = (arrayOfRSItem = a.inventory.getItems()).length;
  14897.       RSItem localRSItem;
  14898.       if (
  14899.         (localRSItem = arrayOfRSItem[i2]) != null)
  14900.      
  14901.  
  14902. {
  14903.         String str;
  14904.         if (((str = a.l(localRSItem)) != null) &&
  14905.           (!str.isEmpty()) && (str.contains(a.cd)))
  14906.         {
  14907.           int i3;
  14908.           if ((
  14909.      
  14910.  
  14911.       (i3 = a.F(str)) > a.aA) && (i3 <= a.mA))
  14912.           {
  14913.             a.pc = localRSItem.getID();
  14914.  
  14915.             return;
  14916.           }
  14917.  
  14918.         }
  14919.  
  14920.       }
  14921.  
  14922.       i2++;
  14923.     }
  14924.   }
  14925.  
  14926.  
  14927.  
  14928. private boolean S()
  14929.   {
  14930.     if ((a.kf) && ((a.inventory.getCount(a.aC) > a.random(1, 4)) || ((a.inventory.containsOneOf(a.aC)) && (a.inventory.getCount() > 22 +
  14931.  
  14932. a.random(0, 5)))))
  14933.     {
  14934.       int i2;
  14935.       while (a.inventory.containsOneOf(a.aC))
  14936.       {
  14937.         RSItem[] arrayOfRSItem;
  14938.         int i1 = (arrayOfRSItem =
  14939.  
  14940. a.inventory.getItems(a.aC)).length;
  14941.         RSItem localRSItem;
  14942.         if (((localRSItem = arrayOfRSItem[i2]) != null) &&
  14943.           (localRSItem.doAction("Bury")))
  14944.      
  14945.  
  14946.     a.sleep(800, 1200);
  14947.         i2++;
  14948.       }
  14949.  
  14950.       return true;
  14951.     }
  14952.  
  14953.     return false;
  14954.   }
  14955.  
  14956.   private boolean F(RSTile a, int a, int a)
  14957.   {
  14958.     if (a == null)
  14959.     {
  14960.       return
  14961.  
  14962. false;
  14963.     }
  14964.     RSTile localRSTile = new RSTile(a.getX() + a, a.getY() + a);
  14965.     int i1;
  14966.     while (!a.X().equals(localRSTile))
  14967.     {
  14968.       if ((a.Zc()) || (a.D
  14969.  
  14970. (localRSTile) != null))
  14971.       {
  14972.         return false;
  14973.       }
  14974.       if (a.X().equals(localRSTile))
  14975.       {
  14976.         return true;
  14977.       }
  14978.       if (a.A(localRSTile, 0))
  14979.       {
  14980.    
  14981.  
  14982.      a.K(false);
  14983.  
  14984.         if (!a.X().equals(localRSTile))
  14985.         {
  14986.           a.A(a.X(), i1);
  14987.  
  14988.           a.K(false);
  14989.         }
  14990.  
  14991.       }
  14992.  
  14993.       a.sleep(300, 400);
  14994.  
  14995.       i1++;
  14996.     }
  14997.  
  14998.  
  14999.   return true;
  15000.   }
  15001.  
  15002.   private RSObject[] A(String[] a)
  15003.   {
  15004.     return a.objects.getAll(new q(a, a));
  15005.   }
  15006.  
  15007.   private RSTile l(RSTile a, ArrayList<RSTile> a)
  15008.   {
  15009.     double d1 =
  15010.  
  15011. 99999.990000000005D;
  15012.  
  15013.     Object localObject = null;
  15014.  
  15015.     if (a != null)
  15016.     {
  15017.       for (RSTile localRSTile : a)
  15018.       {
  15019.         double d2;
  15020.         if ((d2 =
  15021.  
  15022. a.calc.distanceBetween(a, localRSTile)) <
  15023.           d1)
  15024.         {
  15025.           localObject = localRSTile;
  15026.  
  15027.           d1 = d2;
  15028.         }
  15029.  
  15030.       }
  15031.  
  15032.     }
  15033.  
  15034.     return localObject;
  15035.   }
  15036.  
  15037.  
  15038.  
  15039. private RSObject i(RSTile a, int[] a)
  15040.   {
  15041.     return a.objects.getNearest(new d(a, a, a));
  15042.   }
  15043.  
  15044.   private void T()
  15045.   {
  15046.     a.gc.clear();
  15047.  
  15048.     a.Bd.clear();
  15049.  
  15050.     a.J.clear();
  15051.  
  15052.    
  15053.  
  15054. a.ob.clear();
  15055.  
  15056.     a.w.clear();
  15057.  
  15058.     a.vF.clear();
  15059.  
  15060.     a.fc.clear();
  15061.  
  15062.     a.fG.clear();
  15063.  
  15064.     a.fA.clear();
  15065.  
  15066.     a.qA.clear();
  15067.  
  15068.     a.ig.clear();
  15069.  
  15070.     a.Ee.clear();
  15071.  
  15072.     a.AG.clear();
  15073.  
  15074.    
  15075.  
  15076.  a.zc.clear();
  15077.  
  15078.     a.Nc.clear();
  15079.  
  15080.     a.ic.clear();
  15081.  
  15082.     a.l.clear();
  15083.  
  15084.     a.aE.clear();
  15085.  
  15086.     a.ke.clear();
  15087.  
  15088.     a.JB.clear();
  15089.  
  15090.     a.lA.clear();
  15091.  
  15092.     a.cD.clear();
  15093.  
  15094.     a.a.clear();
  15095.  
  15096.    
  15097.  
  15098.  a.uc.clear();
  15099.  
  15100.     a.RD.clear();
  15101.  
  15102.     a.ID.clear();
  15103.  
  15104.     a.Tc.clear();
  15105.  
  15106.     a.ue.clear();
  15107.  
  15108.     a.jb = null;
  15109.  
  15110.     a.FA = null;
  15111.  
  15112.     a.r = null;
  15113.  
  15114.     a.QB = null;
  15115.  
  15116.     a.Sg = null;
  15117.  
  15118.    
  15119.  
  15120. a.nb = null;
  15121.  
  15122.     a.jA = null;
  15123.  
  15124.     a.nD = null;
  15125.  
  15126.     a.WA = null;
  15127.  
  15128.     a.vE = null;
  15129.  
  15130.     a.yd = null;
  15131.  
  15132.     a.Wd = null;
  15133.  
  15134.     a.cB = null;
  15135.  
  15136.     a.QA = null;
  15137.  
  15138.     a.hd = null;
  15139.  
  15140.     a.Rd =
  15141.  
  15142. 0;
  15143.  
  15144.     a.Ob = 0;
  15145.  
  15146.     a.BD = 0;
  15147.  
  15148.     a.Wb = 0;
  15149.  
  15150.     a.Sc = 0;
  15151.  
  15152.     a.DD = 0;
  15153.  
  15154.     a.iE = 0;
  15155.  
  15156.     a.PD = -1;
  15157.  
  15158.     a.tc = "";
  15159.  
  15160.     a.AB = "";
  15161.  
  15162.     a.ud = "Determining";
  15163.  
  15164.     a.gd = false;
  15165.  
  15166.    
  15167.  
  15168. a.X = false;
  15169.  
  15170.     a.hB = false;
  15171.  
  15172.     a.Fg = false;
  15173.  
  15174.     a.FF = false;
  15175.  
  15176.     a.Ke = false;
  15177.  
  15178.     a.nc = false;
  15179.  
  15180.     a.nE = false;
  15181.  
  15182.     a.gE = false;
  15183.  
  15184.     a.XF = false;
  15185.  
  15186.     a.jC = false;
  15187.  
  15188.    
  15189.  
  15190.  a.WC = false;
  15191.  
  15192.     a.qB = false;
  15193.  
  15194.     a.N = true;
  15195.  
  15196.     a.hA = new Timer(a.random(360000, 480000));
  15197.  
  15198.     a.KA = new Timer(0L);
  15199.  
  15200.     if (a.k)
  15201.     {
  15202.       a.HC = 1;
  15203.     }
  15204.     else if
  15205.  
  15206. (a.Xd)
  15207.     {
  15208.       a.HC = 2;
  15209.     }
  15210.     else if (a.IB)
  15211.     {
  15212.       a.HC = 3;
  15213.     }
  15214.   }
  15215.  
  15216.   private int P()
  15217.   {
  15218.     RSTile localRSTile1 = a.tA();
  15219.     RSTile localRSTile2;
  15220.     if
  15221.  
  15222. ((localRSTile2 = a.F(localRSTile1, a.sC)) == null)
  15223.     {
  15224.       return -1;
  15225.     }
  15226.  
  15227.     a.mouse.setSpeed(a.random(3, 5));
  15228.  
  15229.     if (a.jA())
  15230.     {
  15231.       return 2;
  15232.     }
  15233.  
  15234.     if (!a.Je)
  15235.  
  15236.  
  15237.      if (a.walking.getEnergy() < a.random(25, 30))
  15238.       {
  15239.         a.walking.rest(a.random(90, 100));
  15240.       }
  15241.       else if (a.calc.distanceTo(localRSTile2) > 1)
  15242.       {
  15243.    
  15244.  
  15245.     a.A(localRSTile2, 1);
  15246.       }
  15247.       else if (a.J(a.sC).length == 5)
  15248.       {
  15249.         a.l(a.G(localRSTile2), "Pull");
  15250.  
  15251.         if (!a.KD)
  15252.         {
  15253.           if (a.jA()) {
  15254.    
  15255.  
  15256.          return 2;
  15257.           }
  15258.  
  15259.           RSObject localRSObject1 = a.i(a.sC); RSObject localRSObject2 = a.l(localRSObject1, a.sC);
  15260.  
  15261.           if (localRSObject1 != null)
  15262.    
  15263.  
  15264.        {
  15265.             a.vE = localRSObject1.getLocation();
  15266.  
  15267.             if (a.l(localRSObject1, "Pull"))
  15268.             {
  15269.               int i1;
  15270.               if
  15271.  
  15272. (a.calc.distanceTo(a.vE) < 4)
  15273.               {
  15274.                 if ((localRSObject2 != null) && (!a.Y().isMoving()) && (a.calc.distanceBetween(a.X(), a.vE) == 1.0D))
  15275.        
  15276.  
  15277.          {
  15278.                   a.A(localRSObject2.getLocation(), 1);
  15279.                 }
  15280.                 else
  15281.                 {
  15282.                   a.sleep(50, 100);
  15283.  
  15284.              
  15285.  
  15286.     i1++;
  15287.                 }
  15288.               }
  15289.               else
  15290.               {
  15291.                 a.l(false);
  15292.  
  15293.                 while ((a.Y().isMoving()) && (a.calc.distanceTo
  15294.  
  15295. (localRSObject1) > 2)) {
  15296.                   a.sleep(100, 200);
  15297.                 }
  15298.  
  15299.               }
  15300.  
  15301.             }
  15302.             else if (!a.Je)
  15303.             {
  15304.               a.sleep
  15305.  
  15306. (50, 100);
  15307.             }
  15308.           }
  15309.           a.sleep(50, 100);
  15310.         }
  15311.       }
  15312.     if (a.Je)
  15313.     {
  15314.       a.log("Failed to pull the switches in time, restarting.");
  15315.  
  15316.      
  15317.  
  15318. a.Je = false;
  15319.  
  15320.       a.i(localRSTile2, 1);
  15321.  
  15322.       a.l(a.vc, 80, 80);
  15323.     }
  15324.     a.K(false);
  15325.  
  15326.     return 1;
  15327.   }
  15328.  
  15329.   private RSTile A(RSTile a, int[] a)
  15330.   {
  15331.     RSObject[]
  15332.  
  15333. arrayOfRSObject;
  15334.     int i1 = (arrayOfRSObject = a.J(a)).length;
  15335.     int i2;
  15336.     RSObject localRSObject;
  15337.     if ((
  15338.       (localRSObject = arrayOfRSObject[i2]) != null) &&
  15339.  
  15340. (a.l(localRSObject.getID(), a)))
  15341.     {
  15342.       RSTile localRSTile = localRSObject.getLocation();
  15343.  
  15344.       if ((a.calc.distanceBetween(localRSTile, a) > 2.0D) &&
  15345.  
  15346. (a.calc.distanceTo(localRSTile) < 7)) {
  15347.         return localRSTile;
  15348.       }
  15349.  
  15350.     }
  15351.  
  15352.     i2++;
  15353.  
  15354.     return null;
  15355.   }
  15356.  
  15357.   private boolean l(RSModel a, Point a)
  15358.   {
  15359.     Polygon[]
  15360.  
  15361. arrayOfPolygon;
  15362.     int i1 = (arrayOfPolygon = a.getTriangles()).length;
  15363.     int i2;
  15364.     if (arrayOfPolygon[i2]
  15365.       .contains(a))
  15366.       return true;
  15367.     i2++;
  15368.  
  15369.     return
  15370.  
  15371. false;
  15372.   }
  15373.  
  15374.   private RSTile F(RSTile a, int[] a)
  15375.   {
  15376.     double d1 = 99999.990000000005D;
  15377.  
  15378.     Object localObject = null;
  15379.     int i2;
  15380.     if (a != null)
  15381.     {
  15382.       RSObject[]
  15383.  
  15384. arrayOfRSObject;
  15385.       int i1 = (arrayOfRSObject = a.J(a)).length;
  15386.  
  15387.       RSTile localRSTile = arrayOfRSObject[i2]
  15388.         .getLocation();
  15389.  
  15390.       double d2 =
  15391.  
  15392. a.calc.distanceBetween(localRSTile, a);
  15393.  
  15394.       if (d2 < d1)
  15395.       {
  15396.         d1 = d2;
  15397.  
  15398.         localObject = localRSTile;
  15399.       }
  15400.       i2++;
  15401.     }
  15402.     return localObject;
  15403.   }
  15404.  
  15405.  
  15406.  
  15407. private boolean l(Combat.Prayer a, boolean a)
  15408.   {
  15409.     a.game.openTab(6);
  15410.  
  15411.     int i1 = a.getIndex();
  15412.  
  15413.     if (a.interfaces.getComponent(271, 7).getComponents().length < 29)
  15414.  
  15415.  
  15416.   {
  15417.       i1 -= 10;
  15418.     }
  15419.     RSComponent localRSComponent;
  15420.     if ((
  15421.       (localRSComponent = a.interfaces.getComponent(271, 7).getComponent(i1)).getBackgroundColor() ==
  15422.  
  15423. -1) == a);
  15424.     return a.l(localRSComponent, a ? "Activate" : "Deactivate");
  15425.   }
  15426.  
  15427.   private boolean A(String a)
  15428.   {
  15429.     int i1;
  15430.     if (a.kd)
  15431.     {
  15432.       if (a.equals(a.yf[i1]))
  15433.  
  15434.  
  15435.      {
  15436.         return a.skills.getRealLevel(18) >= a.CC[i1];
  15437.       }
  15438.       i1++;
  15439.     }
  15440.     return true;
  15441.   }
  15442.  
  15443.   private RSNPC F(String[] a)
  15444.   {
  15445.     if (a.r == null) {
  15446.       return
  15447.  
  15448. null;
  15449.     }
  15450.  
  15451.     return a.npcs.getNearest(new s(a, a));
  15452.   }
  15453.  
  15454.   private boolean F(RSObject a)
  15455.   {
  15456.     int i2;
  15457.     if (a != null)
  15458.     {
  15459.       RSTile[] arrayOfRSTile;
  15460.       int i1 =
  15461.  
  15462. (arrayOfRSTile = a.getArea().getTileArray()).length; RSTile localRSTile = arrayOfRSTile[i2];
  15463.  
  15464.       if (a.l(localRSTile, true))
  15465.       {
  15466.         return true;
  15467.       }
  15468.  
  15469.      
  15470.  
  15471. i2++;
  15472.     }
  15473.     return false;
  15474.   }
  15475.  
  15476.   private int Z()
  15477.   {
  15478.     a.uC = "Undeterminable components";
  15479.  
  15480.     a.SE = "";
  15481.  
  15482.     a.BG = true;
  15483.  
  15484.     a.MC = false;
  15485.  
  15486.     a.vE = null;
  15487.  
  15488.     if (a.jA())
  15489.  
  15490.  
  15491.    {
  15492.       return 2;
  15493.     }
  15494.  
  15495.     if (a.i(a.lC) != null)
  15496.     {
  15497.       a.Qc = "Puzzle room: Agility Maze";
  15498.  
  15499.       if (!a.l.contains(a.r)) {
  15500.         a.l.add(a.r);
  15501.       }
  15502.  
  15503.       if (!
  15504.  
  15505. a.ZA())
  15506.         return 2;
  15507.       if (a.hd == null)
  15508.       {
  15509.         a.hd = new Timer(a.random(480000, 600000));
  15510.       }
  15511.  
  15512.       return a.y();
  15513.     }
  15514.     if (a.i(a.QE) != null)
  15515.     {
  15516.  
  15517.  
  15518.      a.Qc = "Puzzle room: Barrels";
  15519.  
  15520.       if (!a.l.contains(a.r))
  15521.       {
  15522.         a.l.add(a.r);
  15523.       }
  15524.       if (!a.QB())
  15525.       {
  15526.         return 2;
  15527.       }
  15528.  
  15529.       if (a.hd ==
  15530.  
  15531. null) {
  15532.         a.hd = new Timer(a.random(480000, 600000));
  15533.       }
  15534.  
  15535.       return a.W();
  15536.     }
  15537.  
  15538.     if (a.i(a.Zb) != null)
  15539.     {
  15540.       a.Qc = "Puzzle room: Blood Fountain";
  15541.  
  15542.      
  15543.  
  15544.  if (!a.l.contains(a.r)) {
  15545.         a.l.add(a.r);
  15546.       }
  15547.  
  15548.       if ((!a.QB()) || (!a.ZA())) {
  15549.         return 2;
  15550.       }
  15551.  
  15552.       if (a.hd == null) {
  15553.         a.hd = new Timer
  15554.  
  15555. (a.random(240000, 300000));
  15556.       }
  15557.  
  15558.       return a.pA();
  15559.     }
  15560.  
  15561.     if (a.i(a.s) != null)
  15562.     {
  15563.       a.Qc = "Puzzle room: Bookcases";
  15564.  
  15565.       if (!a.l.contains(a.r)) {
  15566.        
  15567.  
  15568. a.l.add(a.r);
  15569.       }
  15570.  
  15571.       if ((!a.QB()) || (!a.ZA())) {
  15572.         return 2;
  15573.       }
  15574.  
  15575.       if (a.hd == null)
  15576.         a.hd = new Timer(a.random(480000, 600000));
  15577.       return
  15578.  
  15579. a.rA();
  15580.     }
  15581.     if (a.D(a.AC) != null)
  15582.     {
  15583.       a.Qc = "Puzzle room: Colored Ferrets";
  15584.  
  15585.       if (!a.l.contains(a.r))
  15586.       {
  15587.         a.l.add(a.r);
  15588.       }
  15589.       if ((!
  15590.  
  15591. a.QB()) || (!a.ZA()))
  15592.       {
  15593.         return 2;
  15594.       }
  15595.       if (a.hd == null)
  15596.       {
  15597.         a.hd = new Timer(a.random(480000, 600000));
  15598.       }
  15599.       return a.HA();
  15600.     }
  15601.  
  15602.    
  15603.  
  15604.  if (a.i(a.I) != null)
  15605.     {
  15606.       a.Qc = "Puzzle room: Colored Recesses";
  15607.  
  15608.       if (!a.l.contains(a.r))
  15609.       {
  15610.         a.l.add(a.r);
  15611.       }
  15612.  
  15613.       if ((!a.QB()) || (!a.ZA
  15614.  
  15615. ())) {
  15616.         return 2;
  15617.       }
  15618.  
  15619.       if (a.hd == null) {
  15620.         a.hd = new Timer(a.random(480000, 600000));
  15621.       }
  15622.  
  15623.       return a.qA();
  15624.     }
  15625.     if (a.i(a.Yd) != null)
  15626.    
  15627.  
  15628. {
  15629.       a.Qc = "Puzzle room: Collapsing Room";
  15630.  
  15631.       if (!a.l.contains(a.r))
  15632.       {
  15633.         a.l.add(a.r);
  15634.  
  15635.         a.lA.add(a.r);
  15636.       }
  15637.       if (a.hd == null) {
  15638.        
  15639.  
  15640. a.hd = new Timer(a.random(480000, 600000));
  15641.       }
  15642.  
  15643.       return a.QA();
  15644.     }
  15645.  
  15646.     if (a.i(a.Xc) != null)
  15647.     {
  15648.       a.Qc = "Puzzle room: Crystal Lights";
  15649.  
  15650.       if (!
  15651.  
  15652. a.l.contains(a.r))
  15653.       {
  15654.         a.l.add(a.r);
  15655.       }
  15656.  
  15657.       if ((!a.QB()) || (!a.ZA()))
  15658.         return 2;
  15659.       if (a.hd == null)
  15660.         a.hd = new Timer(a.random(480000,
  15661.  
  15662. 600000));
  15663.       return a.I();
  15664.     }
  15665.  
  15666.     if (a.J(new String[] { "Damaged Bridge" }) != null)
  15667.     {
  15668.       a.Qc = "Puzzle room: Damaged Bridge";
  15669.  
  15670.       if (!a.l.contains(a.r))
  15671.    
  15672.  
  15673.    {
  15674.         a.l.add(a.r);
  15675.       }
  15676.       if (!a.ZA())
  15677.       {
  15678.         return 2;
  15679.       }
  15680.       return a.q();
  15681.     }
  15682.     if (a.i(new String[] { "Damaged construct" }) != null)
  15683.    
  15684.  
  15685. {
  15686.       a.Qc = "Puzzle room: Damaged Construct";
  15687.  
  15688.       if (!a.l.contains(a.r))
  15689.       {
  15690.         a.l.add(a.r);
  15691.       }
  15692.       if ((!a.QB()) || (!a.ZA()))
  15693.       {
  15694.         return
  15695.  
  15696. 2;
  15697.       }
  15698.       if (a.hd == null)
  15699.       {
  15700.         a.hd = new Timer(a.random(480000, 600000));
  15701.       }
  15702.       return a.nA();
  15703.     }
  15704.     if (a.D(new int[] { 11007 }) != null)
  15705.    
  15706.  
  15707. {
  15708.       a.Qc = "Puzzle room: Fishing for Ferrets";
  15709.  
  15710.       if (!a.l.contains(a.r))
  15711.       {
  15712.         a.l.add(a.r);
  15713.       }
  15714.       if ((!a.QB()) || (!a.ZA())) {
  15715.         return 2;
  15716.    
  15717.  
  15718.    }
  15719.  
  15720.       if (a.hd == null)
  15721.       {
  15722.         a.hd = new Timer(a.random(480000, 600000));
  15723.       }
  15724.  
  15725.       return a.sA();
  15726.     }
  15727.     if (a.J(new String[] { "Green tile" }) !=
  15728.  
  15729. null) if (a.J(new String[] { "Yellow tile" }) != null)
  15730.       {
  15731.         a.Qc = "Puzzle room: Flip Tiles";
  15732.  
  15733.         if (!a.l.contains(a.r))
  15734.         {
  15735.           a.l.add(a.r);
  15736.    
  15737.  
  15738.      }
  15739.  
  15740.         if ((!a.QB()) || (!a.ZA())) {
  15741.           return 2;
  15742.         }
  15743.  
  15744.         if (a.hd == null)
  15745.           a.hd = new Timer(a.random(240000, 300000));
  15746.         return
  15747.  
  15748. a.D();
  15749.       }
  15750.  
  15751.  
  15752.     if (a.D(a.aF) != null)
  15753.     {
  15754.       a.Qc = "Puzzle room: Follow the Leader";
  15755.  
  15756.       if (!a.l.contains(a.r))
  15757.         a.l.add(a.r);
  15758.       if ((!a.QB()) || (!
  15759.  
  15760. a.ZA()))
  15761.       {
  15762.         return 2;
  15763.       }
  15764.  
  15765.       if (a.hd == null)
  15766.         a.hd = new Timer(a.random(240000, 300000));
  15767.       return a.KA();
  15768.     }
  15769.  
  15770.     if (a.i(a.eG) != null)
  15771.    
  15772.  
  15773. {
  15774.       a.Qc = "Puzzle room: Fremennik Camp";
  15775.  
  15776.       if (!a.l.contains(a.r))
  15777.       {
  15778.         a.l.add(a.r);
  15779.       }
  15780.       if (!a.ZA()) {
  15781.         return 2;
  15782.       }
  15783.  
  15784.       if (a.hd
  15785.  
  15786. == null)
  15787.       {
  15788.         a.hd = new Timer(a.random(240000, 300000));
  15789.       }
  15790.       return a.YA();
  15791.     }
  15792.     if (a.D(a.xC) != null)
  15793.     {
  15794.       a.Qc = "Puzzle room: Ghosts";
  15795.  
  15796.    
  15797.  
  15798.   if (!a.l.contains(a.r)) {
  15799.         a.l.add(a.r);
  15800.       }
  15801.  
  15802.       if (!a.ZA())
  15803.       {
  15804.         return 2;
  15805.       }
  15806.       if (a.hd == null)
  15807.       {
  15808.         a.hd = new Timer
  15809.  
  15810. (a.random(480000, 600000));
  15811.       }
  15812.  
  15813.       return a.Lb();
  15814.     }
  15815.     if ((a.i(a.mb) != null) || (a.i(a.gA) != null))
  15816.     {
  15817.       a.Qc = "Puzzle room: Grapple Chasm";
  15818.  
  15819.       if
  15820.  
  15821. (!a.l.contains(a.r)) {
  15822.         a.l.add(a.r);
  15823.       }
  15824.  
  15825.       if (!a.ZA())
  15826.       {
  15827.         return 2;
  15828.       }
  15829.  
  15830.       return a.gA();
  15831.     }
  15832.  
  15833.     if (a.i(new String[] { "hoardstalker"
  15834.  
  15835. }) != null)
  15836.     {
  15837.       a.Qc = "Puzzle room: Enigmatic Hoardstalker";
  15838.  
  15839.       if (!a.l.contains(a.r))
  15840.         a.l.add(a.r);
  15841.       if ((!a.QB()) || (!a.ZA())) {
  15842.         return
  15843.  
  15844. 2;
  15845.       }
  15846.  
  15847.       if (a.hd == null) {
  15848.         a.hd = new Timer(a.random(240000, 300000));
  15849.       }
  15850.  
  15851.       return a.FA();
  15852.     }
  15853.     if (a.D(new int[] { 11010 }) != null)
  15854.     {
  15855.      
  15856.  
  15857.  a.Qc = "Puzzle room: Hunter Ferret";
  15858.  
  15859.       if (!a.l.contains(a.r))
  15860.       {
  15861.         a.l.add(a.r);
  15862.       }
  15863.       if ((!a.QB()) || (!a.ZA()))
  15864.       {
  15865.         return 2;
  15866.       }
  15867.    
  15868.  
  15869.    if (a.hd == null)
  15870.       {
  15871.         a.hd = new Timer(a.random(480000, 600000));
  15872.       }
  15873.  
  15874.       return a.m();
  15875.     }
  15876.     if (a.i(a.OC) != null)
  15877.     {
  15878.       a.Qc = "Puzzle room:
  15879.  
  15880. Icy Pads";
  15881.  
  15882.       if (!a.l.contains(a.r))
  15883.       {
  15884.         a.l.add(a.r);
  15885.       }
  15886.  
  15887.       if (!a.ZA())
  15888.         return 2;
  15889.       if (a.hd == null)
  15890.       {
  15891.         a.hd = new Timer
  15892.  
  15893. (a.random(480000, 600000));
  15894.       }
  15895.  
  15896.       return a.b();
  15897.     }
  15898.  
  15899.     if (a.i(a.KB) != null)
  15900.     {
  15901.       a.Qc = "Puzzle room: Lodestone Power";
  15902.  
  15903.       if (!a.l.contains(a.r)) {
  15904.    
  15905.  
  15906.     a.l.add(a.r);
  15907.       }
  15908.  
  15909.       if ((!a.QB()) || (!a.ZA()))
  15910.       {
  15911.         return 2;
  15912.       }
  15913.       if (a.hd == null)
  15914.       {
  15915.         a.hd = new Timer(a.random(480000,
  15916.  
  15917. 600000));
  15918.       }
  15919.       return a.z();
  15920.     }
  15921.  
  15922.     if (a.i(new int[] { 49341 }) != null)
  15923.     {
  15924.       a.Qc = "Puzzle room: Maze";
  15925.  
  15926.       if (!a.l.contains(a.r))
  15927.       {
  15928.        
  15929.  
  15930. a.l.add(a.r);
  15931.  
  15932.         a.lA.add(a.r);
  15933.  
  15934.         a.cD.add(a.r);
  15935.       }
  15936.  
  15937.       if (a.hd == null) {
  15938.         a.hd = new Timer(a.random(240000, 300000));
  15939.       }
  15940.  
  15941.       return a.TA();
  15942.  
  15943.  
  15944.    }
  15945.     if (a.i(new String[] { "Mercenary leader" }) != null)
  15946.     {
  15947.       a.Qc = "Puzzle room: Mercenary Leader";
  15948.  
  15949.       if (!a.l.contains(a.r))
  15950.         a.l.add(a.r);
  15951.      
  15952.  
  15953. if (!a.ZA())
  15954.       {
  15955.         return 2;
  15956.       }
  15957.  
  15958.       if (a.hd == null)
  15959.         a.hd = new Timer(a.random(480000, 600000));
  15960.       return a.NA();
  15961.     }
  15962.  
  15963.     if (a.i(new String[]
  15964.  
  15965. { "Monolith" }) != null)
  15966.     {
  15967.       a.Qc = "Puzzle room: Monolith";
  15968.  
  15969.       if (!a.l.contains(a.r))
  15970.         a.l.add(a.r);
  15971.       if (!a.ZA())
  15972.       {
  15973.         return 2;
  15974.       }
  15975.    
  15976.  
  15977.    if (a.hd == null) {
  15978.         a.hd = new Timer(a.random(480000, 600000));
  15979.       }
  15980.  
  15981.       return a.B();
  15982.     }
  15983.  
  15984.     if (a.i(a.wd) != null)
  15985.     {
  15986.       a.Qc = "Puzzle room:
  15987.  
  15988. Poltergeist";
  15989.  
  15990.       if (!a.l.contains(a.r))
  15991.       {
  15992.         a.l.add(a.r);
  15993.       }
  15994.  
  15995.       if ((!a.QB()) || (!a.ZA()))
  15996.         return 2;
  15997.       if (a.hd == null)
  15998.       {
  15999.        
  16000.  
  16001. a.hd = new Timer(a.random(240000, 300000));
  16002.       }
  16003.  
  16004.       return a.p();
  16005.     }
  16006.     if (a.D(new int[] { 12089 }) != null)
  16007.     {
  16008.       a.Qc = "Puzzle room: Pond Skaters";
  16009.  
  16010.      
  16011.  
  16012. if (!a.l.contains(a.r))
  16013.       {
  16014.         a.l.add(a.r);
  16015.       }
  16016.       if ((!a.QB()) || (!a.ZA()))
  16017.       {
  16018.         return 2;
  16019.       }
  16020.       a.hd = new Timer(a.random(240000,
  16021.  
  16022. 300000));
  16023.  
  16024.       return a.hA();
  16025.     }
  16026.  
  16027.     if (a.i(new String[] { "bloodrager" }) != null)
  16028.     {
  16029.       a.Qc = "Puzzle room: Ramokee Familiars";
  16030.  
  16031.       if (!a.l.contains(a.r))
  16032.    
  16033.  
  16034.    {
  16035.         a.l.add(a.r);
  16036.       }
  16037.       if (a.hd == null)
  16038.         a.hd = new Timer(a.random(480000, 600000));
  16039.       return a.J();
  16040.     }
  16041.     if (a.i(new String[] { "Seeker
  16042.  
  16043. sentinel" }) != null)
  16044.     {
  16045.       a.Qc = "Puzzle room: Seeker Sentinel";
  16046.  
  16047.       if (!a.l.contains(a.r))
  16048.       {
  16049.         a.l.add(a.r);
  16050.  
  16051.         a.lA.add(a.r);
  16052.       }
  16053.       if
  16054.  
  16055. (a.hd == null) {
  16056.         a.hd = new Timer(a.random(240000, 300000));
  16057.       }
  16058.  
  16059.       return a.E();
  16060.     }
  16061.     if (a.i(a.mB) != null)
  16062.     {
  16063.       a.Qc = "Puzzle room: Sleeping
  16064.  
  16065. Guards";
  16066.  
  16067.       if (!a.l.contains(a.r))
  16068.       {
  16069.         a.l.add(a.r);
  16070.       }
  16071.       if (!a.ZA())
  16072.       {
  16073.         return 2;
  16074.       }
  16075.       if (a.hd == null)
  16076.         a.hd = new
  16077.  
  16078. Timer(a.random(480000, 600000));
  16079.       return a.v();
  16080.     }
  16081.  
  16082.     if (a.D(a.d) != null)
  16083.     {
  16084.       a.Qc = "Puzzle room: Slider Puzzle";
  16085.  
  16086.       if (!a.l.contains(a.r))
  16087.       {
  16088.    
  16089.  
  16090.     a.l.add(a.r);
  16091.       }
  16092.       if ((!a.QB()) || (!a.ZA())) {
  16093.         return 2;
  16094.       }
  16095.  
  16096.       if (a.hd == null) {
  16097.         a.hd = new Timer(a.random(240000, 300000));
  16098.       }
  16099.  
  16100.  
  16101.  
  16102.     return a.yA();
  16103.     }
  16104.  
  16105.     if (a.D(a.fb) != null)
  16106.     {
  16107.       a.Qc = "Puzzle room: Sliding Statues";
  16108.  
  16109.       if (!a.l.contains(a.r))
  16110.       {
  16111.         a.l.add(a.r);
  16112.       }
  16113.  
  16114.      
  16115.  
  16116. if (!a.QB()) {
  16117.         return 2;
  16118.       }
  16119.  
  16120.       if (a.hd == null) {
  16121.         a.hd = new Timer(a.random(480000, 600000));
  16122.       }
  16123.  
  16124.       return a.xA();
  16125.     }
  16126.     if (a.i(a.Gb) !=
  16127.  
  16128. null)
  16129.     {
  16130.       a.Qc = "Puzzle room: Statue Bridge";
  16131.  
  16132.       if (!a.l.contains(a.r))
  16133.       {
  16134.         a.l.add(a.r);
  16135.       }
  16136.       if (!a.ZA()) {
  16137.         return 2;
  16138.       }
  16139.  
  16140.      
  16141.  
  16142. return a.c();
  16143.     }
  16144.  
  16145.     if (a.i(a.LD) != null)
  16146.     {
  16147.       a.Qc = "Puzzle room: Strange Flowers";
  16148.  
  16149.       if (!a.l.contains(a.r))
  16150.       {
  16151.         a.l.add(a.r);
  16152.       }
  16153.  
  16154.       if
  16155.  
  16156. (a.hd == null) {
  16157.         a.hd = new Timer(a.random(480000, 600000));
  16158.       }
  16159.  
  16160.       return a.o();
  16161.     }
  16162.  
  16163.     if (a.i(a.Bb) != null)
  16164.     {
  16165.       a.Qc = "Puzzle room: Suspicious
  16166.  
  16167. Grooves";
  16168.  
  16169.       if (!a.l.contains(a.r))
  16170.       {
  16171.         a.l.add(a.r);
  16172.  
  16173.         a.lA.add(a.r);
  16174.       }
  16175.  
  16176.       if (a.hd == null)
  16177.         a.hd = new Timer(a.random(240000,
  16178.  
  16179. 300000));
  16180.       return a.RA();
  16181.     }
  16182.  
  16183.     if (a.D(a.TB) != null)
  16184.     {
  16185.       a.Qc = "Puzzle room: Ten Statues";
  16186.  
  16187.       if (!a.l.contains(a.r))
  16188.       {
  16189.         a.l.add(a.r);
  16190.      
  16191.  
  16192. }
  16193.       if ((!a.QB()) || (!a.ZA()))
  16194.       {
  16195.         return 2;
  16196.       }
  16197.       if (a.hd == null)
  16198.       {
  16199.         a.hd = new Timer(a.random(480000, 600000));
  16200.       }
  16201.  
  16202.       return
  16203.  
  16204. a.U();
  16205.     }
  16206.     if (a.D(a.yb) != null)
  16207.     {
  16208.       a.Qc = "Puzzle room: Three Statues";
  16209.  
  16210.       if (!a.l.contains(a.r)) {
  16211.         a.l.add(a.r);
  16212.       }
  16213.  
  16214.       if ((!a.QB()) ||
  16215.  
  16216. (!a.ZA()))
  16217.         return 2;
  16218.       if (a.hd == null)
  16219.       {
  16220.         a.hd = new Timer(a.random(240000, 300000));
  16221.       }
  16222.       return a.WA();
  16223.     }
  16224.  
  16225.     if (a.i(a.sC) != null)
  16226.  
  16227.  
  16228.   {
  16229.       a.Qc = "Puzzle room: Timed Switches";
  16230.  
  16231.       if (!a.l.contains(a.r))
  16232.       {
  16233.         a.l.add(a.r);
  16234.       }
  16235.  
  16236.       if ((!a.QB()) || (!a.ZA()))
  16237.       {
  16238.         return 2;
  16239.  
  16240.  
  16241.      }
  16242.       if (a.hd == null) {
  16243.         a.hd = new Timer(a.random(480000, 600000));
  16244.       }
  16245.  
  16246.       return a.P();
  16247.     }
  16248.  
  16249.     if (a.J(new String[] { "Unfinished bridge" }) !=
  16250.  
  16251. null)
  16252.     {
  16253.       a.Qc = "Puzzle room: Unfinished Bridge";
  16254.  
  16255.       if (!a.l.contains(a.r)) {
  16256.         a.l.add(a.r);
  16257.       }
  16258.  
  16259.       if (!a.ZA()) {
  16260.         return 2;
  16261.       }
  16262.  
  16263.      
  16264.  
  16265. return a.eA();
  16266.     }
  16267.     if (a.D(new int[] { 11246 }) != null)
  16268.     {
  16269.       a.Qc = "Puzzle room: Unhappy Ghost";
  16270.  
  16271.       if (!a.l.contains(a.r)) {
  16272.         a.l.add(a.r);
  16273.       }
  16274.  
  16275.  
  16276.  
  16277.     if ((!a.QB()) || (!a.ZA()))
  16278.       {
  16279.         return 2;
  16280.       }
  16281.       if (a.hd == null)
  16282.       {
  16283.         a.hd = new Timer(a.random(240000, 300000));
  16284.       }
  16285.       return a.G
  16286.  
  16287. ();
  16288.     }
  16289.  
  16290.     if (a.i(a.Fc) != null)
  16291.     {
  16292.       a.Qc = "Puzzle room: Winch Bridge";
  16293.  
  16294.       if (!a.l.contains(a.r))
  16295.       {
  16296.         a.l.add(a.r);
  16297.       }
  16298.  
  16299.       if (!a.ZA())
  16300.      
  16301.  
  16302. {
  16303.         return 2;
  16304.       }
  16305.       return a.OA();
  16306.     }
  16307.  
  16308.     return 0;
  16309.   }
  16310.  
  16311.   private void s()
  16312.   {
  16313.     a.Qc = "Completing the dungeon...";
  16314.  
  16315.     a.vE = null;
  16316.     RSObject
  16317.  
  16318. localRSObject;
  16319.     if (
  16320.       (localRSObject = a.objects.getNearest(a.gb)) != null)
  16321.     {
  16322.       a.vE = localRSObject.getLocation();
  16323.  
  16324.       a.log("Exit found, completing
  16325.  
  16326. dungeon.");
  16327.  
  16328.       a.HD = null;
  16329.  
  16330.       a.hA.reset();
  16331.  
  16332.       if (a.nb == null) {
  16333.         a.nb = a.r;
  16334.       }
  16335.  
  16336.       if (!a.interfaces.get(933).isValid())
  16337.       {
  16338.         if (a.jA
  16339.  
  16340. ()) {
  16341.           return;
  16342.         }
  16343.  
  16344.         if (localRSObject != null)
  16345.         {
  16346.           if (a.nb.contains(new RSTile[] { localRSObject.getLocation() }));
  16347.         }
  16348.        
  16349.  
  16350. else if ((localRSObject = a.i(a.gb)) == null)
  16351.         {
  16352.           localRSObject = a.G(a.vE);
  16353.         }
  16354.         int i1;
  16355.         if (a.jD)
  16356.         {
  16357.           a.R();
  16358.  
  16359.          
  16360.  
  16361. a.t();
  16362.  
  16363.           a.jD = false;
  16364.         }
  16365.         else if (!a.interfaces.get(236).isValid())
  16366.         {
  16367.           if (localRSObject != null)
  16368.           {
  16369.             if
  16370.  
  16371. (a.calc.distanceTo(localRSObject) < 3) {
  16372.               a.A(localRSObject.getLocation(), 0);
  16373.             }
  16374.  
  16375.             if (a.l(localRSObject, "End-dungeon"))
  16376.             {
  16377.  
  16378.  
  16379.             a.K(true);
  16380.             }
  16381.             else
  16382.             {
  16383.               a.sleep(400, 600);
  16384.             }
  16385.           }
  16386.         }
  16387.         else
  16388.         {
  16389.          
  16390.  
  16391. a.interfaces.getComponent(236, 1).doClick();
  16392.  
  16393.           a.sleep(200, 300);
  16394.  
  16395.           i1++;
  16396.         }
  16397.         a.sleep(200, 300);
  16398.       }
  16399.       a.Qc = "Waiting for the next
  16400.  
  16401. dungeon...";
  16402.  
  16403.       a.pC += 1;
  16404.  
  16405.       a.Ud += 1;
  16406.  
  16407.       a.OA += 1;
  16408.       long l1;
  16409.       if (
  16410.         (l1 = a.sA.getElapsed()) < a.HB)
  16411.       {
  16412.         if (a.dd == 0L)
  16413.         {
  16414.      
  16415.  
  16416.      long l2 = a.HB;
  16417.  
  16418.           String str1 = a.Xf;
  16419.  
  16420.           a.dd = l2;
  16421.  
  16422.           a.fd = str1;
  16423.         }
  16424.  
  16425.         a.HB = l1;
  16426.  
  16427.         a.Xf = a.sA.toElapsedString();
  16428.       }
  16429.      
  16430.  
  16431.  else if (l1 > a.dd)
  16432.       {
  16433.         a.dd = l1;
  16434.  
  16435.         a.fd = a.sA.toElapsedString();
  16436.       }
  16437.       a.tE = (Math.rint(a.z.getElapsed() * 10L / a.pC / 60000L) / 10.0D);
  16438.  
  16439.      
  16440.  
  16441.  int i2 = (int)(l1 / 1000L);
  16442.  
  16443.       int i3 = a.re - a.eD;
  16444.  
  16445.       a.eD = a.re;
  16446.  
  16447.       a.T();
  16448.  
  16449.       a.ad();
  16450.  
  16451.       if (((a.interfaces.get(519).isValid()) && (a.interfaces.get
  16452.  
  16453. (519).getText().toLowerCase().contains("not available at"))) || (a.Ud > a.g))
  16454.       {
  16455.         a.log("Last floor reached, prestiging!");
  16456.  
  16457.         if (a.OA + 3 >= a.g)
  16458.        
  16459.  
  16460.  {
  16461.           a.JE = true;
  16462.         }
  16463.         a.nc = true;
  16464.       }
  16465.       int i4 = a.Td; int i5 = 0; int i6 = 0;
  16466.  
  16467.       if (a.interfaces.get(933).isValid())
  16468.       {
  16469.         RSNPC
  16470.  
  16471. localRSNPC;
  16472.         if ((
  16473.           (localRSNPC = a.npcs.getNearest(new int[] { 11226 })) == null) || (a.calc.distanceTo(localRSNPC) >= 4))
  16474.         {
  16475.           if
  16476.  
  16477. (a.interfaces.getComponent(933, 13).doClick())
  16478.           {
  16479.             a.sleep(200, 400);
  16480.  
  16481.             a.ad();
  16482.  
  16483.             a.interfaces.getComponent(933, 13).doClick();
  16484.      
  16485.  
  16486.      }
  16487.           int i7;
  16488.           if (a.interfaces.getComponent(933, 322).doClick())
  16489.           {
  16490.             a.sleep(700, 900);
  16491.  
  16492.             if (a.Td == i4)
  16493.             {
  16494.    
  16495.  
  16496.           String str2 = a.interfaces.getComponent(933, 41).getText().replace("%", "").trim();
  16497.  
  16498.               String str3 = a.interfaces.getComponent(933, 39).getText
  16499.  
  16500. ().replace("%", "").trim();
  16501.  
  16502.               if (!str2.isEmpty())
  16503.               {
  16504.                 i5 = Integer.parseInt(str2);
  16505.               }
  16506.  
  16507.               if (!str3.isEmpty
  16508.  
  16509. ())
  16510.                 i6 = Integer.parseInt(str3);
  16511.               a.Td += i5;
  16512.  
  16513.               if ((i2 > 0) && (i6 > 0) && (i5 > 0))
  16514.               {
  16515.                 a.l(i2, i6,
  16516.  
  16517. i5, i3);
  16518.               }
  16519.               else
  16520.               {
  16521.                 a.log("Stat uploading failed!");
  16522.               }
  16523.             }
  16524.             a.camera.setCompass
  16525.  
  16526. ('n');
  16527.  
  16528.             if (a.interfaces.get(933).isValid())
  16529.             {
  16530.               a.sleep(300, 400);
  16531.  
  16532.               i7++;
  16533.             }
  16534.           }
  16535.           else
  16536.           {
  16537.  
  16538.  
  16539.            a.sleep(100, 200);
  16540.           }
  16541.         }
  16542.       }
  16543.       if (a.jA())
  16544.       {
  16545.         return;
  16546.       }
  16547.  
  16548.       a.N = true;
  16549.     }
  16550.   }
  16551.  
  16552.   private boolean l(int a, int a, int a)
  16553.  
  16554.  
  16555.  {
  16556.     return (a >= a) && (a <= a);
  16557.   }
  16558.  
  16559.   private RSObject l(int[] a)
  16560.   {
  16561.     return a.objects.getNearest(new o(a, a));
  16562.   }
  16563.  
  16564.   private int F(String a)
  16565.   {
  16566.     int i1;
  16567.     if ((a
  16568.  
  16569. != null) && (!a.isEmpty()))
  16570.     {
  16571.       String str = a.J(a);
  16572.  
  16573.       if (a.Ec[i1].equals(str)) {
  16574.         return i1 + 1;
  16575.       }
  16576.  
  16577.       i1++;
  16578.  
  16579.       if (a.yA != null)
  16580.       {
  16581.        
  16582.  
  16583.  if (a.yA[i1].equals(str)) {
  16584.           return i1 + 1;
  16585.         }
  16586.  
  16587.         i1++;
  16588.       }
  16589.     }
  16590.     return 0;
  16591.   }
  16592.  
  16593.   private int o()
  16594.   {
  16595.     if (!a.O())
  16596.       return -1;
  16597.     int[]
  16598.  
  16599. arrayOfInt = { 35507, 35523, 35562, 35569 };
  16600.  
  16601.     String[] arrayOfString = { "blue", "purple", "red", "yellow" };
  16602.  
  16603.     if (a.jA())
  16604.     {
  16605.       return 2;
  16606.     }
  16607.     if (!a.j())
  16608.  
  16609.  
  16610.   {
  16611.       return -1;
  16612.     }
  16613.  
  16614.     RSObject localRSObject1 = a.i(a.LD);
  16615.  
  16616.     a.l(a.vc, 40, 50);
  16617.  
  16618.     a.jA = a.npcs.getNearest(a.B);
  16619.     int i2;
  16620.     if ((a.jA != null) &&
  16621.  
  16622. (a.calc.distanceTo(a.jA) < 5) && (a.l(a.jA.getLocation(), false)))
  16623.     {
  16624.       if (!a.QB())
  16625.       {
  16626.         return 2;
  16627.       }
  16628.  
  16629.     }
  16630.     else if (localRSObject1 != null) {
  16631.      
  16632.  
  16633.  if (a.Jg)
  16634.       {
  16635.         a.x();
  16636.  
  16637.         a.K(true);
  16638.  
  16639.         a.sleep(500, 800);
  16640.  
  16641.         a.l(localRSObject1.getLocation(), 1);
  16642.  
  16643.         a.Jg = false;
  16644.       }
  16645.       else if (a.F
  16646.  
  16647. (localRSObject1))
  16648.       {
  16649.         if (a.l(localRSObject1, "Uproot"))
  16650.         {
  16651.           a.K(true);
  16652.         }
  16653.       }
  16654.       else
  16655.       {
  16656.         int i1 = localRSObject1.getID
  16657.  
  16658. ();
  16659.  
  16660.         if ((i2 = 0) < arrayOfInt.length)
  16661.         {
  16662.           if (i1 == arrayOfInt[i2])
  16663.           {
  16664.             String str = arrayOfString[i2];
  16665.             RSObject
  16666.  
  16667. localRSObject2;
  16668.             if (
  16669.               (localRSObject2 = a.l(new String[] { "Strange " + str + " plant" })) != null) {
  16670.               a.K(true);
  16671.             }
  16672.        
  16673.  
  16674.      else
  16675.             {
  16676.               a.JC();
  16677.             }
  16678.           }
  16679.           else
  16680.           {
  16681.             i2++;
  16682.           }
  16683.  
  16684.         }
  16685.  
  16686.       }
  16687.  
  16688.     }
  16689.  
  16690.     a.sleep(400, 800);
  16691.  
  16692.    
  16693.  
  16694. return 1;
  16695.   }
  16696.  
  16697.   private boolean O()
  16698.   {
  16699.     if (!a.kd)
  16700.     {
  16701.       a.uC = "Members-only";
  16702.  
  16703.       return false;
  16704.     }
  16705.     return true;
  16706.   }
  16707.  
  16708.   private int z()
  16709.   {
  16710.     int[] arrayOfInt1
  16711.  
  16712. = { 17376, 18635 };
  16713.  
  16714.     int[] arrayOfInt2 = { 50795, 51889, 54844 };
  16715.  
  16716.     RSTile[] arrayOfRSTile = null;
  16717.  
  16718.     RSTile localRSTile1 = a.tA(); RSTile localRSTile2 = null;
  16719.    
  16720.  
  16721. RSObject localRSObject1;
  16722.     if ((localRSObject1 = a.i(a.KB)) == null)
  16723.     {
  16724.       return -1;
  16725.     }
  16726.  
  16727.     RSTile localRSTile3 = localRSObject1.getLocation();
  16728.     int i2;
  16729.     if
  16730.  
  16731. (localRSTile1.getX() - localRSTile3.getX() > 4)
  16732.     {
  16733.       if (
  16734.         (localRSTile2 = a.F(new RSTile(20000, 20000), arrayOfInt2)) == null) {
  16735.         return -1;
  16736.       }
  16737.  
  16738.    
  16739.  
  16740.    i1 = localRSTile2.getX(); i2 = localRSTile2.getY();
  16741.  
  16742.       arrayOfRSTile = new RSTile[] { new RSTile(i1 - 1, i2), new RSTile(i1 - 2, i2 - 1), new RSTile(i1 - 2, i2 -
  16743.  
  16744. 3), new RSTile(i1 - 2, i2 - 5), new RSTile(i1 - 3, i2 - 6), new RSTile(i1 - 5, i2 - 6), new RSTile(i1 - 8, i2 - 3) };
  16745.     }
  16746.     else if (localRSTile1.getX() -
  16747.  
  16748. localRSTile3.getX() < -4)
  16749.     {
  16750.       if (
  16751.         (localRSTile2 = a.F(new RSTile(20000, 0), arrayOfInt2)) == null)
  16752.         return -1;
  16753.       i1 = localRSTile2.getX(); i2 =
  16754.  
  16755. localRSTile2.getY();
  16756.  
  16757.       arrayOfRSTile = new RSTile[] { new RSTile(i1 + 1, i2), new RSTile(i1 + 2, i2 + 1), new RSTile(i1 + 2, i2 + 3), new RSTile(i1 + 2, i2 + 5),
  16758.  
  16759. new RSTile(i1 + 3, i2 + 6), new RSTile(i1 + 5, i2 + 6), new RSTile(i1 + 8, i2 + 3) };
  16760.     }
  16761.     else if (localRSTile1.getY() - localRSTile3.getY() < -4)
  16762.     {
  16763.       if (
  16764.    
  16765.  
  16766.      (localRSTile2 = a.F(new RSTile(20000, 0), arrayOfInt2)) == null)
  16767.         return -1;
  16768.       i1 = localRSTile2.getX(); i2 = localRSTile2.getY();
  16769.  
  16770.       arrayOfRSTile =
  16771.  
  16772. new RSTile[] { new RSTile(i1, i2 + 1), new RSTile(i1 - 1, i2 + 2), new RSTile(i1 - 3, i2 + 2), new RSTile(i1 - 5, i2 + 2), new RSTile(i1 - 6, i2 + 3), new RSTile(i1 -
  16773.  
  16774. 6, i2 + 5), new RSTile(i1 - 3, i2 + 8) };
  16775.     }
  16776.     else if (localRSTile1.getY() - localRSTile3.getY() > 4)
  16777.     {
  16778.       if ((localRSTile2 = a.F(a.y, arrayOfInt2)) == null)
  16779.  
  16780.  
  16781.      {
  16782.         return -1;
  16783.       }
  16784.       i1 = localRSTile2.getX(); i2 = localRSTile2.getY();
  16785.  
  16786.       arrayOfRSTile = new RSTile[] { new RSTile(i1, i2 - 1), new RSTile(i1 + 1,
  16787.  
  16788. i2 - 2), new RSTile(i1 + 3, i2 - 2), new RSTile(i1 + 5, i2 - 2), new RSTile(i1 + 6, i2 - 3), new RSTile(i1 + 6, i2 - 5), new RSTile(i1 + 3, i2 - 8) };
  16789.     }
  16790.     a.A(new
  16791.  
  16792. int[] { 18829 });
  16793.  
  16794.     int i1 = 0;
  16795.  
  16796.     if (a.jA())
  16797.     {
  16798.       if ((!a.hd.isRunning()) && (a.l.contains(a.r)))
  16799.       {
  16800.         a.lA.add(a.r);
  16801.       }
  16802.  
  16803.       return 2;
  16804.     }
  16805.    
  16806.  
  16807. a.l(a.vc, 50, 50);
  16808.  
  16809.     if (!a.inventory.containsOneOf(arrayOfInt1))
  16810.     {
  16811.       a.l(a.groundItems.getNearest(arrayOfInt1));
  16812.     }
  16813.     else
  16814.     {
  16815.       RSObject localRSObject2
  16816.  
  16817. = null;
  16818.  
  16819.       if (i1 != 0) if (a.i(new String[] { "Guardian sphere" }) == null)
  16820.           i1 = 0;
  16821.       Object localObject1;
  16822.       if (i1 != 0)
  16823.       {
  16824.         double d1 =
  16825.  
  16826. 10.0D;
  16827.  
  16828.         if (
  16829.           (localObject1 = a.i(arrayOfInt2)) != null)
  16830.         {
  16831.           RSTile localRSTile4 = ((RSObject)localObject1).getLocation();
  16832.  
  16833.           int i4
  16834.  
  16835. = (localObject2 = a.h(a.X())).length;
  16836.           int i5;
  16837.           RSTile localRSTile5 = localObject2[i5];
  16838.           double d2;
  16839.           if ((d2 = a.calc.distanceBetween
  16840.  
  16841. (localRSTile5, localRSTile4)) <
  16842.             d1)
  16843.           {
  16844.             d1 = d2;
  16845.  
  16846.             a.vE = localRSTile5;
  16847.           }
  16848.  
  16849.           i5++;
  16850.  
  16851.           Object localObject2 =
  16852.  
  16853. a.G(a.vE);
  16854.  
  16855.           if (a.l((RSObject)localObject2, "Jump-over"))
  16856.           {
  16857.             a.K(true);
  16858.           }
  16859.  
  16860.         }
  16861.  
  16862.       }
  16863.       else
  16864.       {
  16865.         String str =
  16866.  
  16867. "Jump-over";
  16868.  
  16869.         a.vE = null;
  16870.         int i3;
  16871.         if (a.l(localRSTile3, true))
  16872.         {
  16873.           localObject1 = arrayOfRSTile[i3];
  16874.  
  16875.           if (a.calc.distanceTo
  16876.  
  16877. ((RSTile)localObject1) == 1)
  16878.           {
  16879.             if ((i3 == 5) && ((a.calc.distanceBetween(a.X(), localRSObject1.getLocation()) < 4.5D) || (a.F(localRSObject1))))
  16880.    
  16881.  
  16882.         {
  16883.               localObject1 = arrayOfRSTile[(i3 + 1)];
  16884.  
  16885.               str = "Unlock";
  16886.             }
  16887.  
  16888.             a.vE = ((RSTile)localObject1);
  16889.  
  16890.            
  16891.  
  16892. localRSObject2 = a.G((RSTile)localObject1);
  16893.           }
  16894.  
  16895.           i3++;
  16896.         }
  16897.         if (localRSObject2 != null)
  16898.         {
  16899.           if (a.l(localRSObject2, str))
  16900.        
  16901.  
  16902.    {
  16903.             switch (a.Y().getAnimation())
  16904.             {
  16905.             case 769:
  16906.               break;
  16907.             case 846:
  16908.               i1 = 1;
  16909.  
  16910.               break;
  16911.        
  16912.  
  16913.      case 13493:
  16914.               while (0 != 0);
  16915.               a.log("Damn, we got hit by the orb");
  16916.  
  16917.               break;
  16918.             default:
  16919.               a.sleep(200,
  16920.  
  16921. 300);
  16922.  
  16923.               i3++;
  16924.             }
  16925.  
  16926.             a.K(true);
  16927.           }
  16928.         }
  16929.         else if (!a.X().equals(localRSTile2))
  16930.         {
  16931.           a.A(localRSTile2, 0);
  16932.  
  16933.    
  16934.  
  16935.       a.K(false);
  16936.         }
  16937.  
  16938.       }
  16939.  
  16940.     }
  16941.  
  16942.     a.sleep(400, 600);
  16943.  
  16944.     return !a.l() ? 2 : 1;
  16945.   }
  16946.  
  16947.   public void messageReceived(MessageEvent a)
  16948.   {
  16949.     int i1 = a.getID();
  16950.  
  16951.    
  16952.  
  16953. String str = a.getMessage();
  16954.  
  16955.     if (i1 == 0)
  16956.     {
  16957.       if (str.contains("Oh dear")) {
  16958.         a.jC = true;
  16959.       }
  16960.       else if (str.contains("ou unlock the door"))
  16961.      
  16962.  
  16963. {
  16964.         a.Hc = true;
  16965.       }
  16966.       else if ((str.contains("been frozen")) || (str.contains("force prevents")) || (str.contains("force stops")) || (str.contains("You're
  16967.  
  16968. stunned"))) {
  16969.         a.MC = true;
  16970.       }
  16971.       else if ((str.contains("hear a click")) || (str.contains("now unlocked")) || (str.contains("act of simply")) ||
  16972.  
  16973. (str.contains("challenge room has already")))
  16974.       {
  16975.         a.KD = true;
  16976.       }
  16977.       else if (str.contains("cannot teleport"))
  16978.       {
  16979.         a.Ke = true;
  16980.       }
  16981.      
  16982.  
  16983. else if (((str.contains("You need a")) || (str.contains("require a"))) && (str.contains("level of")))
  16984.         a.BG = false;
  16985.       else if ((str.contains("need at least
  16986.  
  16987. ")) && (str.contains("to do that")))
  16988.         a.BG = false;
  16989.       else if (str.contains("toggle back off"))
  16990.       {
  16991.         a.Je = true;
  16992.       }
  16993.       else if (str.contains
  16994.  
  16995. ("both the chest in"))
  16996.       {
  16997.         a.IC = true;
  16998.       }
  16999.       else if (str.contains("cut down the flower"))
  17000.       {
  17001.         a.Jg = true;
  17002.       }
  17003.       else if
  17004.  
  17005. (str.contains("received item: "))
  17006.       {
  17007.         a.jD = true;
  17008.       }
  17009.       else if ((a.HC == 2) && (str.contains("ammo left in")))
  17010.         a.WC = true;
  17011.       else if
  17012.  
  17013. ((a.HC == 3) && (a.k()) && (str.contains("runes to cast ")))
  17014.       {
  17015.         a.WC = true;
  17016.       }
  17017.       else if (str.contains(" pull")) {
  17018.         a.md = true;
  17019.       }
  17020.  
  17021.     }
  17022.    
  17023.  
  17024.  else if ((i1 == 4) && (str.contains("can't reach")))
  17025.       a.MC = true;
  17026.     if ((i1 == 0) || (i1 == 28) || (i1 == 109))
  17027.     {
  17028.       a.SE = str;
  17029.     }
  17030.   }
  17031.  
  17032.   private boolean
  17033.  
  17034. n()
  17035.   {
  17036.     if ((a.Nc.size() == 1) || (a.inventory.contains(18829))) {
  17037.       return true;
  17038.     }
  17039.  
  17040.     a.AB = "Teleporting back...";
  17041.  
  17042.     a.qA.clear();
  17043.  
  17044.     if (a.AA())
  17045.     {
  17046.      
  17047.  
  17048. a.Pd += 1;
  17049.  
  17050.       a.sleep(200, 300);
  17051.     }
  17052.  
  17053.     a.uA();
  17054.  
  17055.     a.jC = false;
  17056.  
  17057.     if (a.groundItems.getNearest(new int[] { 18829 }) != null);
  17058.     if (a.Zc())
  17059.     {
  17060.       return
  17061.  
  17062. false;
  17063.     }
  17064.     if (a.fA()) {
  17065.       a.K(false);
  17066.     }
  17067.  
  17068.     a.sleep(300, 400);
  17069.  
  17070.     a.uA();
  17071.     int i1;
  17072.     if ((i1 = 0) < 10)
  17073.     {
  17074.       if (a.l(a.groundItems.getNearest(new
  17075.  
  17076. int[] { 18829 })))
  17077.       {
  17078.         a.sleep(500, 800);
  17079.       }
  17080.       a.sleep(300, 600);
  17081.  
  17082.       i1++;
  17083.     }
  17084.  
  17085.     a.jC = false;
  17086.  
  17087.     a.AB = "";
  17088.  
  17089.     return true;
  17090.   }
  17091.  
  17092.   private int v()
  17093.  
  17094.  
  17095. {
  17096.     if (!a.EB.contains(Integer.valueOf(17363))) {
  17097.       a.EB.add(Integer.valueOf(17363));
  17098.     }
  17099.  
  17100.     if (a.jA())
  17101.     {
  17102.       return 2;
  17103.     }
  17104.  
  17105.     a.yd =
  17106.  
  17107. a.groundItems.getNearest(new int[] { 17363 });
  17108.  
  17109.     if (a.yd != null)
  17110.     {
  17111.       a.l(a.yd);
  17112.     }
  17113.     else if (a.npcs.getNearest(a.B) == null)
  17114.     {
  17115.       a.A
  17116.  
  17117. (a.r.getCentralTile(), 1);
  17118.  
  17119.       a.K(false);
  17120.     }
  17121.     else if (!a.QB())
  17122.     {
  17123.       return 2;
  17124.     }
  17125.     a.K(false);
  17126.  
  17127.     return 1;
  17128.   }
  17129.  
  17130.   private RSTile l(int[][] a)
  17131.   {
  17132.    
  17133.  
  17134. RSTile[] arrayOfRSTile;
  17135.     int i1 = (arrayOfRSTile = a.r.getTileArray()).length;
  17136.     int i2;
  17137.     RSTile localRSTile = arrayOfRSTile[i2];
  17138.  
  17139.     int i3 = 0;
  17140.     RSObject[]
  17141.  
  17142. arrayOfRSObject;
  17143.     int i4 = (arrayOfRSObject = a.objects.getAllAt(localRSTile)).length;
  17144.     int i5;
  17145.     RSObject localRSObject = arrayOfRSObject[i5];
  17146.     int[][]
  17147.  
  17148. arrayOfInt;
  17149.     int i6 = (arrayOfInt = a).length;
  17150.     int i7;
  17151.     int[] arrayOfInt1 = arrayOfInt[i7];
  17152.  
  17153.     if (a.l(localRSObject.getID(), arrayOfInt1))
  17154.     {
  17155.       i3++;
  17156.     }
  17157.  
  17158.  
  17159.    else {
  17160.       i7++;
  17161.     }
  17162.  
  17163.     i5++;
  17164.  
  17165.     if (i3 == a.length)
  17166.       return localRSTile;
  17167.     i2++;
  17168.  
  17169.     return null;
  17170.   }
  17171.  
  17172.   private int U()
  17173.   {
  17174.     int[] arrayOfInt1 = { 11015,
  17175.  
  17176. 11016, 11017 };
  17177.  
  17178.     int[] arrayOfInt2 = { 11012, 11013, 11014 };
  17179.  
  17180.     int[] arrayOfInt3 = { 11027, 11028, 11029 };
  17181.  
  17182.     int[] arrayOfInt4 = { 11030, 11031, 11032 };
  17183.  
  17184.     int
  17185.  
  17186. [] arrayOfInt5 = { 11033, 11034, 11035 };
  17187.  
  17188.     int[][] arrayOfInt = { arrayOfInt3, arrayOfInt4, arrayOfInt5 };
  17189.  
  17190.     RSObject localRSObject = a.i(new int[] { 49647, 49648,
  17191.  
  17192. 49649, 53991 });
  17193.  
  17194.     int i1 = a.F(arrayOfInt3).length;
  17195.  
  17196.     int i2 = a.F(arrayOfInt4).length;
  17197.  
  17198.     int i3 = a.F(arrayOfInt5).length;
  17199.     do
  17200.     {
  17201.       if (a.jA())
  17202.       {
  17203.      
  17204.  
  17205.   return 2;
  17206.       }
  17207.       if (!a.j()) {
  17208.         return -1;
  17209.       }
  17210.  
  17211.       if (a.l(a.vc, 40, 50))
  17212.         a.sleep(300, 600);
  17213.       Object localObject1;
  17214.       if
  17215.  
  17216. (a.inventory.getCount(new int[] { 17416, 17418, 17420 }) < a.F(arrayOfInt2).length)
  17217.       {
  17218.         localObject1 = "";
  17219.  
  17220.         if (!a.inventory.contains(17444))
  17221.         {
  17222.  
  17223.  
  17224.         a.l(a.groundItems.getNearest(new int[] { 17444 }));
  17225.         }
  17226.         else
  17227.         {
  17228.           if (a.inventory.getCount(new int[] { 17420 }) < i1)
  17229.            
  17230.  
  17231. localObject1 = "Staff";
  17232.           else if (a.inventory.getCount(new int[] { 17416 }) < i2) {
  17233.             localObject1 = "Sword";
  17234.           }
  17235.           else if
  17236.  
  17237. (a.inventory.getCount(new int[] { 17418 }) < i3) {
  17238.             localObject1 = "Bow";
  17239.           }
  17240.  
  17241.           if (a.interfaces.get(451).isValid())
  17242.           {
  17243.             a.l
  17244.  
  17245. (a.interfaces.get(451), new String[] { localObject1 });
  17246.           }
  17247.           else if (a.inventory.contains(17415))
  17248.           {
  17249.             if (a.inventory.getItem(new
  17250.  
  17251. int[] { 17415 }).doAction("Carve")) {
  17252.               a.K(true);
  17253.             }
  17254.  
  17255.           }
  17256.           else if (a.l(localRSObject, "Mine"))
  17257.           {
  17258.             a.K(true);
  17259.    
  17260.  
  17261.       }
  17262.  
  17263.         }
  17264.  
  17265.       }
  17266.       else if (
  17267.         (localObject1 = a.D(arrayOfInt2)) != null)
  17268.       {
  17269.         RSNPC localRSNPC = null;
  17270.  
  17271.         a.vE = ((RSNPC)
  17272.  
  17273. localObject1).getLocation();
  17274.  
  17275.         int i4 = a.vE.getX(); int i5 = a.vE.getY();
  17276.  
  17277.         Object localObject2 =
  17278.           { new RSTile(i4 - 4, i5), new RSTile(i4 + 4,
  17279.  
  17280. i5), new RSTile(i4, i5 - 4), new RSTile(i4, i5 + 4) };
  17281.  
  17282.         int i6 = localObject2.length; int i7 = 0; if (i7 < i6) { RSTile localRSTile = localObject2[i7];
  17283.  
  17284.          
  17285.  
  17286. localRSNPC = a.D(localRSTile);
  17287.  
  17288.           if (localRSNPC != null)
  17289.             localRSNPC = null;
  17290.           i7++;
  17291.         }
  17292.  
  17293.         if (localRSNPC != null)
  17294.         {
  17295.          
  17296.  
  17297. localObject2 = "";
  17298.  
  17299.           i6 = 0; if (i6 < arrayOfInt.length) {
  17300.             if (a.l(localRSNPC.getID(), arrayOfInt[i6]))
  17301.             {
  17302.               localObject2 =
  17303.  
  17304. "Staff";
  17305.  
  17306.               if (i6 == 1)
  17307.               {
  17308.                 localObject2 = "Sword";
  17309.               }
  17310.               else {
  17311.                 localObject2 = "Bow";
  17312.        
  17313.  
  17314.       }
  17315.  
  17316.             }
  17317.             else
  17318.             {
  17319.               i6++;
  17320.             }
  17321.  
  17322.           }
  17323.  
  17324.           if ((a.inventory.getItemID("Stone " + ((String)
  17325.  
  17326. localObject2).toLowerCase()) != -1) && (a.F((RSNPC)localObject1, "Arm")))
  17327.           {
  17328.             a.K(true);
  17329.  
  17330.             if ((!a.interfaces.get(236).isValid()) && (!
  17331.  
  17332. a.interfaces.get(451).isValid())) {
  17333.               a.sleep(700, 800);
  17334.             }
  17335.  
  17336.             if (a.l(a.interfaces.get(236), new String[] { localObject2 }))
  17337.             {
  17338.  
  17339.  
  17340.              a.sleep(400, 600);
  17341.  
  17342.               if (a.interfaces.get(451).isValid())
  17343.                 if (a.l(a.interfaces.get(451), new String[] { localObject2 }))
  17344.          
  17345.  
  17346.        {
  17347.                   a.sleep(400, 600);
  17348.                 }
  17349.             }
  17350.           }
  17351.         }
  17352.       }
  17353.       a.sleep(500, 800);
  17354.     }
  17355.  
  17356.     while (!a.Y().isInCombat());
  17357.  
  17358.    
  17359.  
  17360. if (!a.JC()) {
  17361.       a.sleep(800, 1000);
  17362.     }
  17363.  
  17364.     a.K(true);
  17365.  
  17366.     if (!a.ZA()) {
  17367.       return 2;
  17368.     }
  17369.  
  17370.     a.lA();
  17371.  
  17372.     a.F(a.nD);
  17373.  
  17374.     return 1;
  17375.   }
  17376.  
  17377.   private boolean l(int[] a,
  17378.  
  17379. int a, int a)
  17380.   {
  17381.     if ((a.inventory.containsOneOf(a)) && (a.combat.getHealth() < a))
  17382.     {
  17383.       do
  17384.       {
  17385.         if (((a.nb != null) && (a.objects.getNearest(a.gb) !=
  17386.  
  17387. null)) || (a.Zc()))
  17388.           return false;
  17389.         int[] arrayOfInt;
  17390.         int i1 = (arrayOfInt = a).length;
  17391.         int i2;
  17392.         if ((i2 = 0) < i1) { int i3 =
  17393.  
  17394. arrayOfInt[i2];
  17395.           RSItem localRSItem;
  17396.           if ((localRSItem = a.inventory.getItem(new int[] { i3 })) != null)
  17397.             a.sleep(300, 600);
  17398.           else {
  17399.  
  17400.  
  17401.           i2++;
  17402.           }
  17403.  
  17404.         }
  17405.  
  17406.         a.sleep(50, 100);
  17407.       }
  17408.       while ((a.inventory.containsOneOf(a)) && (a.combat.getHealth() < a));
  17409.  
  17410.       return true;
  17411.     }
  17412.    
  17413.  
  17414.  return false;
  17415.   }
  17416.  
  17417.   private void Q()
  17418.   {
  17419.     if (a.UA)
  17420.     {
  17421.       do
  17422.       {
  17423.         if (!a.game.isLoggedIn())
  17424.         {
  17425.           return;
  17426.         }
  17427.         a.sleep(10000,
  17428.  
  17429. 30000);
  17430.       }
  17431.       while (a.random(0, 4) != 0);
  17432.  
  17433.       a.A(a.X(), 10);
  17434.     }
  17435.   }
  17436.  
  17437.   private boolean N()
  17438.   {
  17439.     if (!a.Qc.contains("Opening")) {
  17440.       a.Qc = "Opening an old
  17441.  
  17442. door";
  17443.     }
  17444.  
  17445.     a.lc = new Timer(0L);
  17446.  
  17447.     for (Iterator localIterator = a.Nc.iterator(); localIterator.hasNext(); )
  17448.     {
  17449.       RSArea localRSArea;
  17450.       if ((
  17451.        
  17452.  
  17453. (localRSArea = (RSArea)localIterator.next()) != null) && (!localRSArea.equals(a.Sg)) && (a.calc.distanceBetween(a.nD, localRSArea.getNearestTile(a.nD)) < 3.0D))
  17454.       {
  17455.  
  17456.  
  17457.        a.ZA = localRSArea;
  17458.  
  17459.         break;
  17460.       }
  17461.     }
  17462.     if (a.ZA == null)
  17463.     {
  17464.       return false;
  17465.     }
  17466.     if (!a.ZA.contains(new RSTile[] { a.X() }))
  17467.     {
  17468.       if
  17469.  
  17470. (a.jA()) {
  17471.         return false;
  17472.       }
  17473.  
  17474.       a.uA();
  17475.  
  17476.       if ((a.nD != null) && (a.FA != null)) if (a.FA.contains(new RSTile[] { a.nD }))
  17477.         {
  17478.           int i1;
  17479.      
  17480.  
  17481.     if (a.l(a.G(a.nD)))
  17482.           {
  17483.             a.K(false);
  17484.  
  17485.             a.sleep(200, 250);
  17486.  
  17487.             i1++;
  17488.           }
  17489.           else
  17490.           {
  17491.             a.JC();
  17492.  
  17493.          
  17494.  
  17495.    a.sleep(100, 200);
  17496.           }
  17497.  
  17498.         }
  17499.  
  17500.  
  17501.       a.sleep(200, 400);
  17502.     }
  17503.     a.l(a.ZA);
  17504.  
  17505.     a.ZA = null;
  17506.  
  17507.     a.w.remove(a.nD);
  17508.  
  17509.     a.w.add(a.nD);
  17510.  
  17511.     a.QA = a.nD;
  17512.  
  17513.     return
  17514.  
  17515. true;
  17516.   }
  17517.  
  17518.   private boolean A(boolean a)
  17519.   {
  17520.     if (a.combat.isAutoRetaliateEnabled() != a)
  17521.     {
  17522.       RSTile localRSTile = a.walking.getDestination();
  17523.       int i1;
  17524.      
  17525.  
  17526. while (a.combat.isAutoRetaliateEnabled() != a)
  17527.       {
  17528.         if (a.Zc())
  17529.           return false;
  17530.         a.combat.setAutoRetaliate(a);
  17531.  
  17532.         if ((i1 = 0) < 10)
  17533.         {
  17534.  
  17535.  
  17536.          a.sleep(100, 150);
  17537.  
  17538.           i1++;
  17539.         }
  17540.       }
  17541.       a.F();
  17542.  
  17543.       if ((localRSTile != null) && (!a.calc.tileOnScreen(localRSTile)))
  17544.         a.l(localRSTile,
  17545.  
  17546. 1);
  17547.       return true;
  17548.     }
  17549.  
  17550.     return false;
  17551.   }
  17552.  
  17553.   private int W()
  17554.   {
  17555.     if (!a.O())
  17556.       return -1;
  17557.     int[] arrayOfInt = { 49689, 49692, 54288 };
  17558.     RSObject
  17559.  
  17560. localRSObject1;
  17561.     if (
  17562.       (localRSObject1 = a.i(a.te)) == null)
  17563.     {
  17564.       return -1;
  17565.     }
  17566.     RSTile localRSTile1 = localRSObject1.getLocation(); RSTile localRSTile2
  17567.  
  17568. = a.r.getCentralTile(); RSTile localRSTile3 = a.tA();
  17569.  
  17570.     int i1 = Math.abs(localRSTile2.getY() - localRSTile3.getY()) > 4 ? 1 : 0;
  17571.  
  17572.     Object localObject1 = null;
  17573.  
  17574. RSTile localRSTile4 = null;
  17575.  
  17576.     RSObject localRSObject2 = a.i(new int[] { 50962, 50965, 52059, 54986 });
  17577.     RSObject[] arrayOfRSObject;
  17578.     int i3 = (arrayOfRSObject =
  17579.  
  17580. a.J(new int[] { 50849, 51943, 54765 })).length;
  17581.     int i4;
  17582.     Object localObject4 = (localObject3 = arrayOfRSObject[i4])
  17583.       .getLocation();
  17584.  
  17585.     if ((a.D((RSTile)
  17586.  
  17587. localObject4) != null) && (a.calc.distanceBetween((RSTile)localObject4, localRSTile3) < 6.0D))
  17588.     {
  17589.       localObject1 = localObject4;
  17590.     }
  17591.     else
  17592.     {
  17593.       i4++;
  17594.     }
  17595.  
  17596.  
  17597.    int i2 = 0; i3 = 0;
  17598.  
  17599.     Object localObject2 = null; Object localObject3 = null; localObject4 = null; Object localObject5 = null; Object localObject6 = null;
  17600.  
  17601.    
  17602.  
  17603. Object localObject7 = null; Object localObject8 = null; Object localObject9 = null; Object localObject10 = null; Object localObject11 = null;
  17604.     int i5;
  17605.     int i6;
  17606.    
  17607.  
  17608. Object localObject12;
  17609.     Object localObject13;
  17610.     Object localObject14;
  17611.     int i8;
  17612.     int i9;
  17613.     RSTile localRSTile6;
  17614.     RSNPC localRSNPC2;
  17615.     if (localObject1 !=
  17616.  
  17617. null)
  17618.     {
  17619.       i2 = 1;
  17620.  
  17621.       localObject3 = a.D(localObject1);
  17622.  
  17623.       localObject8 = localObject1;
  17624.  
  17625.       i5 = localObject1.getX(); i6 = localObject1.getY();
  17626.  
  17627.      
  17628.  
  17629. localObject12 = new RSTile[] { new RSTile(i5 - 2, i6), new RSTile(i5 + 2, i6), new RSTile(i5, i6 - 2), new RSTile(i5, i6 + 2) };
  17630.  
  17631.       localObject13 = new RSTile[] {
  17632.  
  17633. new RSTile(i5 - 1, i6), new RSTile(i5 + 1, i6), new RSTile(i5, i6 - 1), new RSTile(i5, i6 + 1) };
  17634.  
  17635.       i8 = (localObject14 = localObject12).length; localRSTile6 =
  17636.  
  17637. localObject14[i9];
  17638.  
  17639.       if ((localRSNPC2 = a.D(localRSTile6)) != null)
  17640.       {
  17641.         localObject2 = localRSNPC2;
  17642.  
  17643.         localObject7 = localRSTile6;
  17644.       }
  17645.       else
  17646.    
  17647.  
  17648.    {
  17649.         i9++;
  17650.       }
  17651.       i8 = (localObject14 = localObject13).length; localRSTile6 = localObject14[i9];
  17652.  
  17653.       if (
  17654.         (localRSNPC2 = a.D(localRSTile6)) !=
  17655.  
  17656. null)
  17657.       {
  17658.         localObject4 = localRSNPC2;
  17659.  
  17660.         localObject9 = localRSTile6;
  17661.       }
  17662.       else
  17663.       {
  17664.         i9++;
  17665.       }
  17666.     }
  17667.     if (localRSObject2 != null)
  17668.    
  17669.  
  17670. {
  17671.       i3 = 1;
  17672.  
  17673.       i5 =
  17674.         (localRSTile4 = localRSObject2.getLocation()).getX(); i6 = localRSTile4.getY();
  17675.  
  17676.       localObject12 = new RSTile[] { new RSTile(i5 - 1,
  17677.  
  17678. i6), new RSTile(i5 + 1, i6), new RSTile(i5, i6 - 1), new RSTile(i5, i6 + 1) };
  17679.  
  17680.       localObject13 = new RSTile[] { new RSTile(i5 - 2, i6), new RSTile(i5 + 2, i6), new
  17681.  
  17682. RSTile(i5, i6 - 2), new RSTile(i5, i6 + 2) };
  17683.  
  17684.       i8 = (localObject14 = localObject12).length; localRSTile6 = localObject14[i9];
  17685.  
  17686.       if ((localRSNPC2 = a.D
  17687.  
  17688. (localRSTile6)) != null)
  17689.       {
  17690.         localObject5 = localRSNPC2;
  17691.  
  17692.         localObject10 = localRSTile6;
  17693.       }
  17694.       else
  17695.       {
  17696.         i9++;
  17697.       }
  17698.  
  17699.       i8 =
  17700.  
  17701. (localObject14 = localObject13).length; localRSTile6 = localObject14[i9];
  17702.  
  17703.       if (
  17704.         (localRSNPC2 = a.D(localRSTile6)) != null)
  17705.       {
  17706.         localObject6 =
  17707.  
  17708. localRSNPC2;
  17709.  
  17710.         localObject11 = localRSTile6;
  17711.       }
  17712.       else
  17713.       {
  17714.         i9++;
  17715.       }
  17716.     }
  17717.     if (localObject1 != null)
  17718.     {
  17719.       i2 = 1;
  17720.  
  17721.       localObject3 =
  17722.  
  17723. a.D(localObject1);
  17724.  
  17725.       localObject8 = localObject1;
  17726.  
  17727.       i5 = localObject1.getX(); i6 = localObject1.getY();
  17728.  
  17729.       localObject12 = new RSNPC[] { a.D(new RSTile(i5 - 2,
  17730.  
  17731. i6)), a.D(new RSTile(i5 + 2, i6)), a.D(new RSTile(i5, i6 - 2)), a.D(new RSTile(i5, i6 + 2)) };
  17732.  
  17733.       localObject13 = new RSNPC[] { a.D(new RSTile(i5 - 1, i6)), a.D(new
  17734.  
  17735. RSTile(i5 + 1, i6)), a.D(new RSTile(i5, i6 - 1)), a.D(new RSTile(i5, i6 + 1)) };
  17736.  
  17737.       i8 = (localObject14 = localObject12).length;
  17738.  
  17739.       if ((localRSTile6 =
  17740.  
  17741. localObject14[i9]) != null)
  17742.       {
  17743.         localObject2 = localRSTile6;
  17744.  
  17745.         localObject7 = localRSTile6.getLocation();
  17746.       }
  17747.       else
  17748.       {
  17749.         i9++;
  17750.       }
  17751.  
  17752.    
  17753.  
  17754.   i8 = (localObject14 = localObject13).length;
  17755.  
  17756.       if ((localRSTile6 = localObject14[i9]) != null)
  17757.       {
  17758.         localObject4 = localRSTile6;
  17759.  
  17760.         localObject9 =
  17761.  
  17762. localRSTile6.getLocation();
  17763.       }
  17764.       else
  17765.       {
  17766.         i9++;
  17767.       }
  17768.     }
  17769.     RSObject localRSObject3;
  17770.     if ((localRSObject3 = a.i(arrayOfInt)) != null)
  17771.     {
  17772.      
  17773.  
  17774. a.camera.turnToObject(localRSObject3);
  17775.     }
  17776.     if (!a.j()) {
  17777.       return -1;
  17778.     }
  17779.  
  17780.     if (a.jA()) {
  17781.       return 2;
  17782.     }
  17783.  
  17784.     RSNPC localRSNPC1 = a.D(new int[] { 11073 });
  17785.  
  17786.  
  17787.    int i10;
  17788.     if (a.interfaces.getComponent(945, 17).getRelativeX() == 200)
  17789.     {
  17790.       a.vE = localRSTile1;
  17791.  
  17792.       if (localRSNPC1 != null)
  17793.       {
  17794.         localObject12 =
  17795.  
  17796. localRSNPC1.getLocation();
  17797.  
  17798.         localObject13 = localRSTile1;
  17799.  
  17800.         int i7 = ((RSTile)localObject12).getX(); i8 = ((RSTile)localObject12).getY(); i9 = ((RSTile)
  17801.  
  17802. localObject13).getX(); i10 = ((RSTile)localObject13).getY();
  17803.  
  17804.         boolean bool1 = false;
  17805.  
  17806.         if (i1 != 0)
  17807.         {
  17808.           if (i7 != i9)
  17809.           {
  17810.            
  17811.  
  17812. bool1 = i7 > i9 ? a.A((RSTile)localObject12, 1, 0) : a.A((RSTile)localObject12, -1, 0);
  17813.           }
  17814.  
  17815.         }
  17816.         else if (i8 != i10)
  17817.           bool1 = i8 > i10 ? a.A
  17818.  
  17819. ((RSTile)localObject12, 0, 1) : a.A((RSTile)localObject12, 0, -1);
  17820.         if ((bool1) && (a.F(localRSNPC1, "Push")))
  17821.         {
  17822.           a.K(true);
  17823.         }
  17824.  
  17825.       }
  17826.  
  17827.     }
  17828.  
  17829.  
  17830.   else
  17831.     {
  17832.       localObject12 = a.D(new int[] { 11075 });
  17833.  
  17834.       localRSObject3 = a.i(arrayOfInt);
  17835.  
  17836.       if ((localRSNPC1 != null) && (localRSObject3 != null))
  17837.       {
  17838.    
  17839.  
  17840.     localObject13 = localRSNPC1.getLocation();
  17841.  
  17842.         RSTile localRSTile5 = localRSObject3.getLocation();
  17843.  
  17844.         i8 = ((RSTile)localObject13).getX(); i9 = ((RSTile)
  17845.  
  17846. localObject13).getY(); i10 = localRSTile5.getX(); int i11 = localRSTile5.getY();
  17847.         boolean bool2;
  17848.         if (i1 != 0)
  17849.         {
  17850.           if (i8 != i10)
  17851.           {
  17852.  
  17853.  
  17854.           bool2 = i8 > i10 ? a.A((RSTile)localObject13, 1, 0) : a.A((RSTile)localObject13, -1, 0);
  17855.  
  17856.             if ((bool2) && (a.F(localRSNPC1, "Push")))
  17857.             {
  17858.    
  17859.  
  17860.            a.K(true);
  17861.  
  17862.               localObject13 = localRSNPC1.getLocation();
  17863.  
  17864.               localRSTile5 = localRSObject3.getLocation();
  17865.  
  17866.               i8 = ((RSTile)
  17867.  
  17868. localObject13).getX();
  17869.  
  17870.               i9 = ((RSTile)localObject13).getY();
  17871.  
  17872.               i10 = localRSTile5.getX();
  17873.  
  17874.               i11 = localRSTile5.getY();
  17875.  
  17876.              
  17877.  
  17878. if (i8 == i10)
  17879.               {
  17880.                 a.A(new RSTile(i8, i9 + i9 - i11), 0);
  17881.               }
  17882.             }
  17883.           }
  17884.         }
  17885.         else if (i9 != i11)
  17886.         {
  17887.  
  17888.  
  17889.          bool2 = i9 > i11 ? a.A((RSTile)localObject13, 0, 1) : a.A((RSTile)localObject13, 0, -1);
  17890.  
  17891.           if ((bool2) && (a.F(localRSNPC1, "Push")))
  17892.           {
  17893.        
  17894.  
  17895.     a.K(true);
  17896.  
  17897.             localObject13 = localRSNPC1.getLocation();
  17898.  
  17899.             localRSTile5 = localRSObject3.getLocation();
  17900.  
  17901.             i8 = ((RSTile)
  17902.  
  17903. localObject13).getX();
  17904.  
  17905.             i9 = ((RSTile)localObject13).getY();
  17906.  
  17907.             i10 = localRSTile5.getX();
  17908.  
  17909.             i11 = localRSTile5.getY();
  17910.  
  17911.             if (i9 ==
  17912.  
  17913. i11)
  17914.             {
  17915.               a.A(new RSTile(i8 + i8 - i10, i9), 0);
  17916.             }
  17917.           }
  17918.         }
  17919.       }
  17920.       else if (i2 != 0)
  17921.       {
  17922.         if (a.D((RSTile)
  17923.  
  17924. localObject7) != null)
  17925.         {
  17926.           if (a.F(localObject2, "Push"))
  17927.             a.K(true);
  17928.         }
  17929.         else if (a.D(localObject8) != null)
  17930.         {
  17931.           if
  17932.  
  17933. (a.F((RSNPC)localObject3, "Push")) {
  17934.             a.K(true);
  17935.           }
  17936.  
  17937.         }
  17938.         else if (a.D((RSTile)localObject9) != null)
  17939.         {
  17940.           if (a.F((RSNPC)
  17941.  
  17942. localObject4, "Push"))
  17943.           {
  17944.             a.K(true);
  17945.           }
  17946.         }
  17947.         else
  17948.           i2 = 0;
  17949.       }
  17950.       else if (i3 != 0)
  17951.       {
  17952.         if (a.D
  17953.  
  17954. (localObject10) != null)
  17955.         {
  17956.           if (a.F(localObject5, "Push"))
  17957.           {
  17958.             a.K(true);
  17959.           }
  17960.  
  17961.         }
  17962.         else if (a.D(localObject11) !=
  17963.  
  17964. null)
  17965.         {
  17966.           if (a.F(localObject6, "Push")) {
  17967.             a.K(true);
  17968.           }
  17969.  
  17970.         }
  17971.         else
  17972.         {
  17973.           i3 = 0;
  17974.         }
  17975.  
  17976.       }
  17977.       else if
  17978.  
  17979. (localObject12 != null)
  17980.       {
  17981.         if (a.inventory.contains(17422))
  17982.         {
  17983.           if (a.calc.distanceTo(((RSNPC)localObject12).getLocation()) > 1)
  17984.           {
  17985.    
  17986.  
  17987.         a.l(localRSTile4, 1);
  17988.  
  17989.             a.l(false);
  17990.  
  17991.             a.K(false);
  17992.           }
  17993.  
  17994.           if (a.F((RSNPC)localObject12, "Fix"))
  17995.             a.K(true);
  17996.         }
  17997.    
  17998.  
  17999.     else
  18000.         {
  18001.           a.EA();
  18002.  
  18003.           if (!a.l(a.yd))
  18004.           {
  18005.             a.l(a.groundItems.getNearest(new int[] { 17422 }));
  18006.           }
  18007.  
  18008.         }
  18009.  
  18010.       }
  18011.  
  18012.     }
  18013.  
  18014.    
  18015.  
  18016.  a.sleep(300, 500);
  18017.  
  18018.     a.A(a.nD, 2);
  18019.  
  18020.     a.K(false);
  18021.  
  18022.     if (a.jA())
  18023.     {
  18024.       return 2;
  18025.     }
  18026.     a.A(a.calc.distanceTo(localRSTile4) > 2 ? localRSTile4 : a.nD, 3);
  18027.  
  18028.     if
  18029.  
  18030. (!a.Y().isMoving()) {
  18031.       a.A(a.nD, 3);
  18032.     }
  18033.  
  18034.     a.K(false);
  18035.  
  18036.     return 1;
  18037.   }
  18038.  
  18039.   private boolean F(boolean a)
  18040.   {
  18041.     if (a)
  18042.     {
  18043.       if ((!a.GA()) && (a.interfaces.get
  18044.  
  18045. (548).isValid()))
  18046.       {
  18047.         a.log("Checking the dungeon map.");
  18048.  
  18049.         a.l(a.interfaces.getComponent(548, 179), "");
  18050.  
  18051.         a.sleep(400, 600);
  18052.  
  18053.         return true;
  18054.  
  18055.  
  18056.     }
  18057.     }
  18058.     else if (a.GA())
  18059.     {
  18060.       a.log("Closing the dungeon map.");
  18061.  
  18062.       return a.l(a.interfaces.getComponent(942, 6), "");
  18063.     }
  18064.     return false;
  18065.   }
  18066.  
  18067.   private
  18068.  
  18069. void t()
  18070.   {
  18071.     if (a.pc > 0)
  18072.     {
  18073.       RSItem localRSItem = a.inventory.getItem(new int[] { a.pc });
  18074.  
  18075.       String str = a.l(localRSItem);
  18076.       int i1;
  18077.       if ((i1 =
  18078.  
  18079. a.F(str)) > 0)
  18080.       {
  18081.         a.log("Upgrading our " + a.cd + " to " + a.J(str));
  18082.  
  18083.         int i2 = a.Vc;
  18084.  
  18085.         a.aA = 0;
  18086.  
  18087.         if (a.Zc())
  18088.         {
  18089.           return;
  18090.    
  18091.  
  18092.     }
  18093.         int i3;
  18094.         if ((i3 = a.inventory.getItemID(str + " (b)")) > 0)
  18095.         {
  18096.           a.Vc = i3;
  18097.         }
  18098.         else if (a.interfaces.get(94).isValid())
  18099.    
  18100.  
  18101.      {
  18102.           a.interfaces.getComponent(94, 3).doClick();
  18103.         }
  18104.         else if (a.inventory.contains(a.Vc))
  18105.           a.inventory.getItem(new int[] { a.Vc
  18106.  
  18107. }).doAction("Destroy");
  18108.         else if ((a.equipment.getItem(17) != null) && (a.equipment.getItem(17).getID() > 0))
  18109.         {
  18110.           a.equipment.getItem(17).doClick
  18111.  
  18112. (true);
  18113.         }
  18114.         else if (a.inventory.contains(a.pc)) {
  18115.           a.l(a.pc, "Bind");
  18116.         }
  18117.         else if (a.l(a.groundItems.getNearest(new int[] { a.pc })))
  18118.  
  18119.  
  18120.         a.K(false);
  18121.         a.sleep(400, 800);
  18122.  
  18123.         a.l(a.Vc, "Wield");
  18124.  
  18125.         a.aA = i1;
  18126.  
  18127.         if (a.EB.contains(Integer.valueOf(a.pc))) {
  18128.           a.EB.remove
  18129.  
  18130. (Integer.valueOf(a.pc));
  18131.         }
  18132.  
  18133.         a.pc = -1;
  18134.       }
  18135.     }
  18136.   }
  18137.  
  18138.   private boolean u()
  18139.   {
  18140.     a.Qc = "Opening a locked door";
  18141.  
  18142.     a.Hc = false;
  18143.  
  18144.     if (!a.Hc)
  18145.     {
  18146.      
  18147.  
  18148. if (a.jA()) {
  18149.         return false;
  18150.       }
  18151.  
  18152.       if (a.Y().getAnimation() != 13798)
  18153.       {
  18154.         RSObject localRSObject = a.G(a.WA);
  18155.  
  18156.         if (a.SE.contains("don't
  18157.  
  18158. have the correct"))
  18159.         {
  18160.           a.log.severe("Hmm.. we got tricked, we don't have the right key!");
  18161.  
  18162.           a.J.remove(a.nD);
  18163.  
  18164.           a.J.remove(a.WA);
  18165.  
  18166.          
  18167.  
  18168.  return true;
  18169.         }
  18170.  
  18171.         if (a.l(localRSObject)) {
  18172.           a.K(false);
  18173.         }
  18174.         else if (localRSObject != null)
  18175.         {
  18176.           a.sleep(100, 200);
  18177.        
  18178.  
  18179.  }
  18180.         a.sleep(200, 400);
  18181.       }
  18182.     }
  18183.     a.Hc = false;
  18184.  
  18185.     a.J.remove(a.WA);
  18186.  
  18187.     a.fA.remove(a.WA);
  18188.  
  18189.     a.Bd.remove(a.WA);
  18190.  
  18191.     a.vF.remove(a.WA);
  18192.  
  18193.     if (a.ZA != null);
  18194.  
  18195.  
  18196.   if (a.jA())
  18197.     {
  18198.       return false;
  18199.     }
  18200.     a.uA();
  18201.  
  18202.     if (a.l(a.G(a.nD)))
  18203.     {
  18204.       a.K(false);
  18205.  
  18206.       if (a.i(false))
  18207.       {
  18208.         return true;
  18209.       }
  18210.     }
  18211.    
  18212.  
  18213. a.sleep(200, 400);
  18214.  
  18215.     return true;
  18216.   }
  18217.  
  18218.   private RSTile X()
  18219.   {
  18220.     RSPlayer localRSPlayer;
  18221.     return (localRSPlayer = a.Y()) != null
  18222.        ? localRSPlayer.getLocation() :
  18223.  
  18224. a.y;
  18225.   }
  18226.  
  18227.   private RSPlayer Y()
  18228.   {
  18229.     return a.players.getMyPlayer();
  18230.   }
  18231.  
  18232.   private boolean x()
  18233.   {
  18234.     int i1;
  18235.     if (a.Y().getAnimation() != -1)
  18236.       return true;
  18237.    
  18238.  
  18239. a.sleep(80, 120);
  18240.  
  18241.     i1++;
  18242.  
  18243.     return false;
  18244.   }
  18245.  
  18246.   private int p()
  18247.   {
  18248.     if ((!a.O()) || (!a.A()) || (!a.L())) {
  18249.       return -1;
  18250.     }
  18251.  
  18252.     boolean bool = false;
  18253.  
  18254.     int[]
  18255.  
  18256. arrayOfInt1 = { 54082, 54083, 54084, 54085 };
  18257.  
  18258.     int[] arrayOfInt2 = { 54095, 54096, 54097, 54098 };
  18259.  
  18260.     int[] arrayOfInt3 = { 54099, 54100, 54101, 54102 };
  18261.  
  18262.     int[]
  18263.  
  18264. arrayOfInt4 = { 54074, 54075, 54076 };
  18265.  
  18266.     int i1 = -1;
  18267.  
  18268.     String str = "";
  18269.  
  18270.     while (a.i(arrayOfInt1) == null)
  18271.     {
  18272.       if (a.jA()) {
  18273.         return 2;
  18274.       }
  18275.  
  18276.       if
  18277.  
  18278. (!a.j())
  18279.       {
  18280.         return -1;
  18281.       }
  18282.       a.l(a.vc, 40, 50);
  18283.  
  18284.       if (a.inventory.getItemID("Consecrated herb") > 0)
  18285.       {
  18286.         i1 = a.inventory.getItemID
  18287.  
  18288. ("Consecrated herb");
  18289.       }
  18290.       int i2 = a.inventory.getItemID(str);
  18291.  
  18292.       RSObject localRSObject1 = a.i(arrayOfInt2);
  18293.  
  18294.       RSObject localRSObject2 = a.i
  18295.  
  18296. (arrayOfInt3);
  18297.  
  18298.       RSObject localRSObject3 = a.i(arrayOfInt4);
  18299.  
  18300.       if (a.D(new int[] { 11245 }) != null)
  18301.       {
  18302.         if (str.isEmpty())
  18303.         {
  18304.           if (a.l
  18305.  
  18306. (a.i(a.wd), "Read"))
  18307.           {
  18308.             a.K(true);
  18309.             RSComponent localRSComponent;
  18310.             if ((localRSComponent = a.interfaces.getComponent(211, 2))
  18311.    
  18312.  
  18313.           .isValid())
  18314.               if (localRSComponent.containsText("corianger"))
  18315.               {
  18316.                 str = "Corianger";
  18317.               }
  18318.               else if
  18319.  
  18320. (localRSComponent.containsText("explosemary")) {
  18321.                 str = "Explosemary";
  18322.               }
  18323.               else if (localRSComponent.containsText("parslay"))
  18324.      
  18325.  
  18326.            str = "Parslay";
  18327.               else if (localRSComponent.containsText("cardamaim"))
  18328.               {
  18329.                 str = "Cardamaim";
  18330.               }
  18331.            
  18332.  
  18333.    else if (localRSComponent.containsText("papreaper")) {
  18334.                 str = "Papreaper";
  18335.               }
  18336.               else if (localRSComponent.containsText
  18337.  
  18338. ("slaughtercress"))
  18339.                 str = "Slaughtercress";
  18340.           }
  18341.           if (!str.isEmpty())
  18342.           {
  18343.             a.log("Honoring Lief with " + str);
  18344.           }
  18345.  
  18346.  
  18347.  
  18348.        }
  18349.         else if (a.interfaces.get(232).isValid())
  18350.         {
  18351.           a.l(a.interfaces.get(232), new String[] { str, "More herbs" });
  18352.         }
  18353.         else if
  18354.  
  18355. (localRSObject2 != null)
  18356.         {
  18357.           bool = a.l(localRSObject2, "Light");
  18358.         }
  18359.         else if ((i2 > 0) && (a.inventory.contains(i2)))
  18360.         {
  18361.          
  18362.  
  18363. a.inventory.getItem(new int[] { i2 }).doClick(true);
  18364.         }
  18365.         else if (localRSObject3 != null)
  18366.         {
  18367.           bool = a.l(localRSObject3, "Harvest");
  18368.         }
  18369.  
  18370.  
  18371.        else if ((i1 > 0) && (a.inventory.contains(i1)) && (localRSObject1 != null))
  18372.         {
  18373.           bool = a.l("Consecrated herb", localRSObject1);
  18374.         }
  18375.  
  18376.       }
  18377.    
  18378.  
  18379.    else
  18380.       {
  18381.         bool = a.l(a.i(a.wd), "Open");
  18382.       }
  18383.       if (bool)
  18384.       {
  18385.         a.K(false);
  18386.       }
  18387.       else {
  18388.         a.sleep(200, 300);
  18389.       }
  18390.  
  18391.     }
  18392.  
  18393.     return
  18394.  
  18395. 1;
  18396.   }
  18397.  
  18398.   private boolean F(int a)
  18399.   {
  18400.     RSItem localRSItem1 = a.inventory.getSelectedItem(); RSItem localRSItem2 = a.inventory.getItem(new int[] { a });
  18401.  
  18402.     if
  18403.  
  18404. ((localRSItem1 != null) && (localRSItem1.getID() == a)) {
  18405.       return true;
  18406.     }
  18407.  
  18408.     if ((localRSItem2 == null) || (!localRSItem2.doAction("Use")))
  18409.       return false;
  18410.    
  18411.  
  18412.  a.sleep(600, 800);
  18413.     int i1;
  18414.     a.sleep(200, 300);
  18415.  
  18416.     i1++;
  18417.  
  18418.     return ((localRSItem1 = a.inventory.getSelectedItem()) != null) &&
  18419.       (localRSItem1.getID() == a);
  18420.  
  18421.  
  18422. }
  18423.  
  18424.   private boolean l(RSObject a)
  18425.   {
  18426.     if (a == null) {
  18427.       return false;
  18428.     }
  18429.  
  18430.     String str1 = "";
  18431.     RSObjectDef localRSObjectDef;
  18432.     int i2;
  18433.     if
  18434.  
  18435. ((localRSObjectDef = a.getDef()) != null)
  18436.     {
  18437.       String[] arrayOfString;
  18438.       int i1 = (arrayOfString = localRSObjectDef.getActions()).length;
  18439.       String str2;
  18440.      
  18441.  
  18442.  if ((
  18443.         (str2 = arrayOfString[i2]) != null) && (!str2.isEmpty()) && (!str2.contains("Examine")) && (!str2.equals("Walk here")) && (!str2.equals("Cancel")))
  18444.      
  18445.  
  18446. {
  18447.         str1 = str2 + " " + localRSObjectDef.getName();
  18448.       }
  18449.       else
  18450.       {
  18451.         i2++;
  18452.       }
  18453.     }
  18454.     if ((str1.isEmpty()) && (a.calc.distanceTo(a) > 4)) {
  18455.      
  18456.  
  18457. a.A(a.getLocation(), 1);
  18458.     }
  18459.  
  18460.     return a.l(a, str1);
  18461.   }
  18462.  
  18463.   private boolean l(String a)
  18464.   {
  18465.     int i1;
  18466.     if (
  18467.       (i1 = a.menu.getIndex(a.toLowerCase())) == -1)
  18468.     {
  18469.    
  18470.  
  18471.   a.mouse.moveRandomly(700);
  18472.  
  18473.       a.sleep(a.random(150, 400));
  18474.  
  18475.       return false;
  18476.     }
  18477.  
  18478.     if (!a.menu.isOpen())
  18479.     {
  18480.       if (i1 == 0)
  18481.       {
  18482.         a.mouse.click
  18483.  
  18484. (true);
  18485.  
  18486.         return true;
  18487.       }
  18488.       a.mouse.click(false);
  18489.     }
  18490.     int i2;
  18491.     if ((i2 = 0) < 4)
  18492.     {
  18493.       a.sleep(10, 30);
  18494.  
  18495.       i2++;
  18496.     }
  18497.  
  18498.     if (!a.menu.isOpen())
  18499.  
  18500.  
  18501.     return false;
  18502.     String[] arrayOfString;
  18503.     if ((arrayOfString = a.menu.getItems()).length <=
  18504.       i1)
  18505.     {
  18506.       i1 = a.menu.getIndex(a.toLowerCase());
  18507.  
  18508.       if
  18509.  
  18510. ((arrayOfString.length <= i1) || (i1 == -1)) {
  18511.         return false;
  18512.       }
  18513.  
  18514.     }
  18515.  
  18516.     int i3 = a.mouse.getSpeed();
  18517.  
  18518.     a.mouse.setSpeed(i3 + a.random(1, 3));
  18519.  
  18520.     Point
  18521.  
  18522. localPoint = a.menu.getLocation();
  18523.  
  18524.     int i4 = a.random(4, arrayOfString[i1].length() * 4);
  18525.  
  18526.     int i5 = 21 + 16 * i1 + a.random(3, 12);
  18527.  
  18528.     a.mouse.move(localPoint.x +
  18529.  
  18530. i4, localPoint.y + i5, 2, 2);
  18531.  
  18532.     a.mouse.setSpeed(i3);
  18533.  
  18534.     if (a.menu.isOpen())
  18535.     {
  18536.       a.mouse.click(true);
  18537.  
  18538.       return true;
  18539.     }
  18540.  
  18541.     return false;
  18542.   }
  18543.  
  18544.   private void
  18545.  
  18546. w()
  18547.   {
  18548.     int i3;
  18549.     if (a.aA < a.mA)
  18550.     {
  18551.       int i1 =
  18552.         a.aA;
  18553.  
  18554.       RSGroundItem[] arrayOfRSGroundItem = a.groundItems.getAll(); int i2 =
  18555.  
  18556. arrayOfRSGroundItem.length; i3 = 0; RSGroundItem localRSGroundItem = arrayOfRSGroundItem[i3];
  18557.  
  18558.       if ((localRSGroundItem != null) && (a.r != null)) if (a.r.contains
  18559.  
  18560. (new RSTile[] { localRSGroundItem.getLocation() }))
  18561.         {
  18562.           String str = localRSGroundItem.getItem().getName();
  18563.  
  18564.           if ((str != null) && (!str.isEmpty
  18565.  
  18566. ()) && (str.contains(a.cd)))
  18567.           {
  18568.             int i4 = a.F(str);
  18569.  
  18570.             if ((i4 > i1) && (i4 <= a.mA))
  18571.             {
  18572.               i1 = i4;
  18573.  
  18574.               a.pc =
  18575.  
  18576. localRSGroundItem.getItem().getID();
  18577.  
  18578.               a.EB.add(Integer.valueOf(a.pc));
  18579.             }
  18580.           }
  18581.         }
  18582.       i3++;
  18583.     }
  18584.   }
  18585.  
  18586.   private int l(RSTile a,
  18587.  
  18588. RSObject a)
  18589.   {
  18590.     if (a == null)
  18591.     {
  18592.       return 0;
  18593.     }
  18594.     return 5 - (int)a.calc.distanceBetween(a, a.getLocation());
  18595.   }
  18596.  
  18597.   private int q()
  18598.   {
  18599.     if (!a.O()) {
  18600.      
  18601.  
  18602. return -1;
  18603.     }
  18604.  
  18605.     boolean bool = false;
  18606.  
  18607.     RSObject localRSObject1 = a.i(new int[] { 54182, 54183, 54184, 54185 });
  18608.  
  18609.     RSObject localRSObject2 = a.J(new String[] {
  18610.  
  18611. "Damaged bridge" });
  18612.  
  18613.     a.jA = a.npcs.getNearest(a.B);
  18614.  
  18615.     if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
  18616.     {
  18617.       if ((!a.QB()) || ((a.HC ==
  18618.  
  18619. 1) && (!a.ZA()))) {
  18620.         return 2;
  18621.       }
  18622.  
  18623.     }
  18624.  
  18625.     if (a.hd == null)
  18626.     {
  18627.       a.hd = new Timer(a.random(240000, 300000));
  18628.     }
  18629.     bool = a.F(a.u) == null;
  18630.  
  18631.     a.A
  18632.  
  18633. (bool);
  18634.     do
  18635.     {
  18636.       if (a.jA())
  18637.       {
  18638.         return 2;
  18639.       }
  18640.  
  18641.       if (!a.j()) {
  18642.         return -1;
  18643.       }
  18644.  
  18645.       if (a.objects.getNearest(new String[] { "Damaged
  18646.  
  18647. bridge" }) != null)
  18648.         if (!a.inventory.contains(17444))
  18649.         {
  18650.           a.l(a.groundItems.getNearest(new int[] { 17444 }));
  18651.         }
  18652.         else if
  18653.  
  18654. (a.inventory.contains(19661))
  18655.         {
  18656.           a.l(localRSObject2, "Repair");
  18657.         }
  18658.         else if (a.inventory.contains(19660))
  18659.         {
  18660.          
  18661.  
  18662. a.inventory.getItem(new int[] { 19660 }).doClick(true);
  18663.         }
  18664.         else if (!a.inventory.containsOneOf(new int[] { 19660, 19661 }))
  18665.         {
  18666.           a.l
  18667.  
  18668. (localRSObject1, "Mine");
  18669.         }
  18670.       a.K(bool);
  18671.     }
  18672.     while (!a.Rc());
  18673.  
  18674.     a.sleep(800, 1100);
  18675.  
  18676.     if (a.M) {
  18677.       a.f();
  18678.     }
  18679.  
  18680.     return 1;
  18681.   }
  18682.  
  18683.   public boolean
  18684.  
  18685. onStart()
  18686.   {
  18687.     try
  18688.     {
  18689.       a.Hg = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/proLogo.png"));
  18690.  
  18691.       a.NB = ImageIO.read(new URL
  18692.  
  18693. ("http://shadowscripting.com/iDungeon/Resources/hide.png"));
  18694.  
  18695.       a.rD = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/hide_s.png"));
  18696.  
  18697.       a.Dd =
  18698.  
  18699. ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/arrowUp.png"));
  18700.  
  18701.       a.OE = ImageIO.read(new URL
  18702.  
  18703. ("http://shadowscripting.com/iDungeon/Resources/arrowUp_s.png"));
  18704.  
  18705.       a.gD = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/arrowDown.png"));
  18706.  
  18707.      
  18708.  
  18709.  a.iG = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/arrowDown_s.png"));
  18710.  
  18711.       a.Kd = ImageIO.read(new URL
  18712.  
  18713. ("http://shadowscripting.com/iDungeon/Resources/play.png"));
  18714.  
  18715.       a.Ib = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/play_s.png"));
  18716.  
  18717.       a.KG =
  18718.  
  18719. ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/pause.png"));
  18720.  
  18721.       a.VC = ImageIO.read(new URL
  18722.  
  18723. ("http://shadowscripting.com/iDungeon/Resources/pause_s.png"));
  18724.  
  18725.       a.oA = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/info.png"));
  18726.  
  18727.       a.Uc
  18728.  
  18729. = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/info_s.png"));
  18730.  
  18731.       a.UF = ImageIO.read(new URL
  18732.  
  18733. ("http://shadowscripting.com/iDungeon/Resources/help.png"));
  18734.  
  18735.       a.hb = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/help_s.png"));
  18736.  
  18737.       a.We =
  18738.  
  18739. ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/stop.png"));
  18740.  
  18741.       a.BC = ImageIO.read(new URL
  18742.  
  18743. ("http://shadowscripting.com/iDungeon/Resources/stop_s.png"));
  18744.     }
  18745.     catch (Exception localException)
  18746.     {
  18747.       a.log("Unable to load images. Try reloading the
  18748.  
  18749. script if some are missing.");
  18750.     }
  18751.  
  18752.     a.H();
  18753.  
  18754.     return a.mA();
  18755.   }
  18756.  
  18757.   private boolean d()
  18758.   {
  18759.     return (a.Y().isInCombat()) && (a.Y().getInteracting() != null);
  18760.   }
  18761.  
  18762.  
  18763.  
  18764. private boolean H()
  18765.   {
  18766.     try
  18767.     {
  18768.       File localFile;
  18769.       if (!(localFile = new File(a.rA))
  18770.         .exists())
  18771.         return false;
  18772.       Properties localProperties;
  18773.  
  18774.  
  18775.     (localProperties = new Properties()).load(new FileInputStream(a.rA));
  18776.  
  18777.       if ((localProperties != null) && (localProperties.getProperty("06") != null) &&
  18778.  
  18779. (localProperties.getProperty("06").equals("true")))
  18780.       {
  18781.         int i1;
  18782.         int i2;
  18783.         a.O[i1][i2] = localProperties.getProperty("" + i1 + i2).equals("true");
  18784.  
  18785.  
  18786.  
  18787.        i2++;
  18788.  
  18789.         i1++;
  18790.  
  18791.         a.k = a.O[0][0];
  18792.  
  18793.         a.Xd = a.O[0][1];
  18794.  
  18795.         a.IB = a.O[0][2];
  18796.  
  18797.         a.i = a.O[0][3];
  18798.  
  18799.         a.BB = a.O[0][4];
  18800.  
  18801.         a.vC = a.O
  18802.  
  18803. [0][5];
  18804.  
  18805.         a.XC = a.O[0][6];
  18806.  
  18807.         a.Yb = a.O[0][7];
  18808.  
  18809.         a.kf = a.O[1][0];
  18810.  
  18811.         a.ec = a.O[1][1];
  18812.  
  18813.         a.zA = a.O[1][2];
  18814.  
  18815.         a.VA = a.O[1][3];
  18816.  
  18817.        
  18818.  
  18819. a.QC = a.O[1][4];
  18820.  
  18821.         a.xe = a.O[1][5];
  18822.  
  18823.         a.gB = a.O[1][6];
  18824.  
  18825.         a.bc = a.O[1][7];
  18826.  
  18827.         a.Fb = a.O[1][8];
  18828.  
  18829.         a.E = a.O[2][0];
  18830.  
  18831.         a.Ed = a.O[2][1];
  18832.  
  18833.  
  18834.  
  18835.       a.od = a.O[2][2];
  18836.  
  18837.         a.M = a.O[2][3];
  18838.  
  18839.         a.RC = a.O[2][4];
  18840.  
  18841.         a.dg = a.O[2][5];
  18842.  
  18843.         return true;
  18844.       }
  18845.     }
  18846.     catch (Exception localException1)
  18847.  
  18848.  
  18849.   {
  18850.       a.log("Unable to load settings");
  18851.     }
  18852.  
  18853.     return false;
  18854.   }
  18855.  
  18856.   private int[] l(ArrayList<Integer> a)
  18857.   {
  18858.     int[] arrayOfInt = new int[a.size()];
  18859.     int i1;
  18860.    
  18861.  
  18862. arrayOfInt[i1] = ((Integer)a.get(i1)).intValue();
  18863.  
  18864.     i1++;
  18865.  
  18866.     return arrayOfInt;
  18867.   }
  18868.  
  18869.   private void g()
  18870.   {
  18871.     if (a.nb != null) if (a.nb.contains(new RSTile[] { a.X()
  18872.  
  18873. }))
  18874.       {
  18875.         a.FF = true;
  18876.  
  18877.         return;
  18878.       }
  18879.     int i1 = 0;
  18880.  
  18881.     a.BD += 1;
  18882.  
  18883.     a.Wb += 1;
  18884.  
  18885.     a.Bd.removeAll(a.fG);
  18886.  
  18887.     a.Bd.removeAll(a.fc);
  18888.  
  18889.     a.J.removeAll
  18890.  
  18891. (a.fG);
  18892.  
  18893.     a.J.removeAll(a.fc);
  18894.  
  18895.     if (a.i(a.gb) != null)
  18896.     {
  18897.       a.Ke = true;
  18898.  
  18899.       return;
  18900.     }
  18901.     if ((a.npcs.getNearest(a.B) == null) && (!a.ZA())) {
  18902.       return;
  18903.  
  18904.  
  18905.    }
  18906.  
  18907.     if (a.Kc != null)
  18908.     {
  18909.       for (localObject1 = a.J.iterator(); ((Iterator)localObject1).hasNext(); ) { RSTile localRSTile1 = (RSTile)((Iterator)
  18910.  
  18911. localObject1).next();
  18912.  
  18913.         if (a.Kc.contains(new RSTile[] { localRSTile1 }))
  18914.         {
  18915.           a.log("Gatestone teleporting to the next good door");
  18916.           int i3;
  18917.  
  18918.  
  18919.          if (a.Kc.contains(new RSTile[] { a.X() }))
  18920.           {
  18921.             a.Kc = null;
  18922.  
  18923.             return;
  18924.           }
  18925.  
  18926.           if (a.F(39, "Cast"))
  18927.           {
  18928.            
  18929.  
  18930.  a.K(true);
  18931.           }
  18932.           i3++;
  18933.  
  18934.           a.Kc = null;
  18935.  
  18936.           return;
  18937.         }
  18938.  
  18939.       }
  18940.  
  18941.     }
  18942.  
  18943.     if ((a.Wb > 2) && (a.nb == null))
  18944.     {
  18945.       if ((a.Rd == 1) && (!
  18946.  
  18947. a.qA.isEmpty()))
  18948.       {
  18949.         a.qA.clear();
  18950.       }
  18951.       else {
  18952.         a.log("Remaining good doors: " + a.J.size());
  18953.       }
  18954.  
  18955.       a.vA();
  18956.  
  18957.       if (a.J.isEmpty())
  18958.       {
  18959.  
  18960.  
  18961.        if (a.gE)
  18962.         {
  18963.           a.log("A prayer door is preventing us from solving this dungeon");
  18964.         }
  18965.         else if (a.XF)
  18966.         {
  18967.           a.log("Too-
  18968.  
  18969. powerful mercenaries prevent us from solving this dungeon");
  18970.         }
  18971.         else
  18972.         {
  18973.           a.log.severe("No good doors remain.. Aborting dungeon");
  18974.  
  18975.          
  18976.  
  18977. a.Ic += 1;
  18978.         }
  18979.  
  18980.         a.aA();
  18981.  
  18982.         return;
  18983.       }
  18984.  
  18985.       if (a.Rd == 1)
  18986.         a.A(a.FA.getCentralTile(), 3);
  18987.       if (a.jb != null) if (a.jb.contains(new RSTile
  18988.  
  18989. [] { a.X() }))
  18990.         {
  18991.           a.QA = null;
  18992.  
  18993.           a.Fg = true;
  18994.  
  18995.           return;
  18996.         }
  18997.       if (a.BD > a.random(a.Zc + 5, a.Zc + 8))
  18998.       {
  18999.         a.log.severe
  19000.  
  19001. ("Restarted too many times.. Aborting dungeon");
  19002.  
  19003.         a.Ic += 1;
  19004.  
  19005.         a.aA();
  19006.  
  19007.         return;
  19008.       }
  19009.       if (!a.DD())
  19010.         return;
  19011.       a.Wb = 0;
  19012.  
  19013.       i1 = 1;
  19014.    
  19015.  
  19016. }
  19017.     else if (a.lA.contains(a.FA))
  19018.     {
  19019.       i1 = 1;
  19020.     }
  19021.  
  19022.     a.Qc = "Backtracking through the dungeon...";
  19023.  
  19024.     a.uA();
  19025.  
  19026.     if (a.FA == null)
  19027.       return;
  19028.     if
  19029.  
  19030. ((a.r.contains(new RSTile[] { a.X() })) && (!a.ic.contains(a.FA)) && (a.Rd != 1))
  19031.     {
  19032.       if ((a.skills.getRealLevel(6) >= 32) && (!a.inventory.contains(17489))) if
  19033.  
  19034. (a.inventory.getCount(true, new int[] { 17789 }) > 2)
  19035.         {
  19036.           if (a.F(38, "Cast"))
  19037.             a.K(true);
  19038.         }
  19039.       if ((a.inventory.contains(17489)) &&
  19040.  
  19041. (a.l(17489, "Drop"))) {
  19042.         a.Kc = a.r;
  19043.       }
  19044.  
  19045.     }
  19046.  
  19047.     a.J.removeAll(a.fc);
  19048.  
  19049.     a.J.removeAll(a.w);
  19050.  
  19051.     a.nD = null;
  19052.  
  19053.     a.WA = null;
  19054.  
  19055.     Object localObject1 = null;
  19056.  
  19057.    
  19058.  
  19059. int i2 = 0;
  19060.  
  19061.     if ((a.npcs.getNearest(a.B) != null) || (a.npcs.getNearest(a.Fd) != null))
  19062.       if (a.lA.contains(a.r))
  19063.       {
  19064.         if ((!a.QB()) || (!a.ZA())) {
  19065.      
  19066.  
  19067.     return;
  19068.         }
  19069.  
  19070.       }
  19071.       else
  19072.       {
  19073.         i2 = 1;
  19074.  
  19075.         i1 = 0;
  19076.       }
  19077.     Object localObject2;
  19078.     RSTile localRSTile2;
  19079.     if ((a.r != null) && (i1 == 0))
  19080.    
  19081.  
  19082. {
  19083.       if ((a.nE) || (i2 != 0))
  19084.       {
  19085.         for (localObject2 = a.fc.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile2 = (RSTile)((Iterator)
  19086.  
  19087. localObject2).next();
  19088.  
  19089.           if (a.r.contains(new RSTile[] { localRSTile2 }))
  19090.           {
  19091.             localObject1 = localRSTile2;
  19092.  
  19093.             break;
  19094.           }
  19095.  
  19096.        
  19097.  
  19098. }
  19099.  
  19100.       }
  19101.       else
  19102.       {
  19103.         for (localObject2 = a.fc.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile2 = (RSTile)((Iterator)localObject2).next();
  19104.  
  19105.    
  19106.  
  19107.        if (a.r.contains(new RSTile[] { localRSTile2 }))
  19108.           {
  19109.             for (localIterator1 = a.Nc.iterator(); localIterator1.hasNext(); ) { localRSArea =
  19110.  
  19111. (RSArea)localIterator1.next();
  19112.  
  19113.               if (a.calc.distanceBetween(localRSTile2, localRSArea.getNearestTile(localRSTile2)) < 3.0D)
  19114.               {
  19115.                 if
  19116.  
  19117. (localRSArea.equals(a.jb))
  19118.                 {
  19119.                   localObject1 = localRSTile2;
  19120.  
  19121.                   break label1099;
  19122.                 }
  19123.  
  19124.                 for (RSTile
  19125.  
  19126. localRSTile3 : a.J)
  19127.                 {
  19128.                   if (localRSArea.contains(new RSTile[] { localRSTile3 }))
  19129.                   {
  19130.                     localObject1 =
  19131.  
  19132. localRSTile2;
  19133.  
  19134.                     break label1099;
  19135.                   }
  19136.                 }
  19137.               }
  19138.             }
  19139.           }
  19140.         }
  19141.       }
  19142.     }
  19143.     Iterator
  19144.  
  19145. localIterator1;
  19146.     RSArea localRSArea;
  19147.     label1099: a.uA();
  19148.  
  19149.     if ((a.FA != null) && (a.Rd != 1))
  19150.     {
  19151.       if (localObject1 != null)
  19152.       {
  19153.         a.A((RSTile)
  19154.  
  19155. localObject1);
  19156.  
  19157.         if (a.M) {
  19158.           a.l(a.X(), (RSTile)localObject1, true, new int[0]);
  19159.         }
  19160.  
  19161.       }
  19162.  
  19163.       if (a.FA != null);
  19164.       if (localObject1 == null) {
  19165.  
  19166.  
  19167.       if (a.npcs.getNearest(a.B) != null)
  19168.         {
  19169.           a.log("Finishing off monsters before restarting");
  19170.  
  19171.           if ((!a.QB()) || (!a.ZA()))
  19172.             return;
  19173.  
  19174.  
  19175.       }
  19176.         else if (a.npcs.getNearest(a.Fd) != null)
  19177.         {
  19178.           a.log("Bad monster found, backtracking.");
  19179.  
  19180.           localObject1 = a.tA();
  19181.         }
  19182.  
  19183.       }
  19184.  
  19185.    
  19186.  
  19187.    if (localObject1 != null)
  19188.       {
  19189.         if ((localObject2 = a.G((RSTile)localObject1)) != null)
  19190.         {
  19191.           if (a.l((RSObject)localObject2, "Enter"))
  19192.          
  19193.  
  19194. {
  19195.             if (!a.combat.isAutoRetaliateEnabled()) {
  19196.               a.game.openTab(0);
  19197.             }
  19198.  
  19199.             a.sleep(600, 800);
  19200.  
  19201.             if (a.Y().isMoving()) {
  19202.    
  19203.  
  19204.           a.sleep(100, 200);
  19205.             }
  19206.  
  19207.             a.sleep(400, 500);
  19208.           }
  19209.  
  19210.         }
  19211.         else
  19212.         {
  19213.           localObject1 = null;
  19214.         }
  19215.       }
  19216.      
  19217.  
  19218. else {
  19219.         a.G(true);
  19220.       }
  19221.  
  19222.       a.sleep(100, 200);
  19223.  
  19224.       a.uA();
  19225.     }
  19226.  
  19227.     a.a.clear();
  19228.  
  19229.     if (a.i(a.u) == null)
  19230.       a.A(true);
  19231.     a.l(a.FA);
  19232.  
  19233.     a.hB = true;
  19234.  
  19235.    
  19236.  
  19237. a.nE = false;
  19238.   }
  19239.  
  19240.   private boolean j()
  19241.   {
  19242.     if (((!a.BG) && (!a.oA())) || (a.interfaces.get(210).isValid()))
  19243.     {
  19244.       a.uC = "Level requirements";
  19245.  
  19246.       return false;
  19247.  
  19248.  
  19249.   }
  19250.  
  19251.     return true;
  19252.   }
  19253.  
  19254.   private int I()
  19255.   {
  19256.     int[] arrayOfInt1 = { 49468, 49469, 49470, 49477, 49478, 49479, 49486, 49487, 49488, 54262, 54265, 54268 };
  19257.  
  19258.     int[]
  19259.  
  19260. arrayOfInt2 = { 49495, 49496, 49497, 54271 };
  19261.  
  19262.     int[] arrayOfInt3 = { 49513, 49514, 49515, 54277 };
  19263.  
  19264.     ArrayList localArrayList = new ArrayList();
  19265.  
  19266.     RSObject
  19267.  
  19268. localRSObject1 = a.J(new String[] { "Large crystal" }); RSObject localRSObject2 = null;
  19269.  
  19270.     if (localRSObject1 == null) {
  19271.       return -1;
  19272.     }
  19273.  
  19274.     RSTile localRSTile1 =
  19275.  
  19276. localRSObject1.getLocation(); Object localObject1 = null;
  19277.     Object localObject2;
  19278.     int i1 = (localObject2 = a.J(a.te)).length;
  19279.     int i2;
  19280.     RSObject[]
  19281.  
  19282. arrayOfRSObject = localObject2[i2];
  19283.  
  19284.     localArrayList.add(arrayOfRSObject.getLocation());
  19285.  
  19286.     i2++;
  19287.     RSTile localRSTile2;
  19288.     while (true)
  19289.     {
  19290.       if (localObject1
  19291.  
  19292. != null) if (a.J(new String[] { "Inactive lodestone" }) == null)
  19293.           break;
  19294.       if (a.jA())
  19295.       {
  19296.         return 2;
  19297.       }
  19298.       if (!a.j()) {
  19299.         return -1;
  19300.    
  19301.  
  19302.    }
  19303.  
  19304.       if (a.l(a.J(new String[] { "Inactive lodestone" }), "Power-up"))
  19305.         a.K(true);
  19306.       if (
  19307.         (localRSObject2 = a.i(arrayOfInt2)) == null)
  19308.       {
  19309.        
  19310.  
  19311.  continue;
  19312.       }
  19313.  
  19314.       for (localObject2 = localArrayList.iterator(); ((Iterator)localObject2).hasNext(); )
  19315.         if ((
  19316.           (localRSTile2 = (RSTile)((Iterator)
  19317.  
  19318. localObject2).next()) != null) && (a.calc.distanceBetween(localRSTile2, localRSObject2.getLocation()) < 3.0D))
  19319.         {
  19320.           localObject1 = localRSTile2;
  19321.  
  19322.          
  19323.  
  19324. break;
  19325.         }
  19326.     }
  19327.     localArrayList.remove(localObject1);
  19328.  
  19329.     label789: while (a.i(arrayOfInt3) == null)
  19330.       for (localObject2 = localArrayList.iterator();
  19331.  
  19332. ((Iterator)localObject2).hasNext(); ) { localRSTile2 = (RSTile)((Iterator)localObject2).next();
  19333.  
  19334.         i2 = 0;
  19335.  
  19336.         a.vE = localRSTile2;
  19337.  
  19338.         if (i2 == 0)
  19339.         {
  19340.  
  19341.  
  19342.          if (a.jA()) {
  19343.             return 2;
  19344.           }
  19345.  
  19346.           int i4 = (arrayOfRSObject = a.J(arrayOfInt1)).length;
  19347.           int i5;
  19348.           RSObject
  19349.  
  19350. localRSObject3;
  19351.           if (((localRSObject3 = arrayOfRSObject[i5]) != null) &&
  19352.             (a.calc.distanceBetween(a.vE, localRSObject3.getLocation()) < 3.0D)) {
  19353.      
  19354.  
  19355.        i2 = localRSObject3.getID();
  19356.           }
  19357.  
  19358.           i5++;
  19359.  
  19360.           a.sleep(100, 200);
  19361.         }
  19362.         a.F(a.vE, 1);
  19363.  
  19364.         if (a.jA())
  19365.         {
  19366.           return 2;
  19367.  
  19368.  
  19369.       }
  19370.         if ((a.i(new int[] { i2 }) != null) || (!a.X().equals(a.vE)))
  19371.         {
  19372.           if (a.jA())
  19373.           {
  19374.             return 2;
  19375.           }
  19376.  
  19377.           if (a.i
  19378.  
  19379. (arrayOfInt3) == null)
  19380.           {
  19381.             if (a.X().equals(a.vE))
  19382.             {
  19383.               if (a.i(new int[] { i2 }) == null)
  19384.               {
  19385.                 break
  19386.  
  19387. label789;
  19388.               }
  19389.  
  19390.               a.F(a.vE, 1);
  19391.             }
  19392.             else if (a.l(localRSTile1, a.i(new int[] { i2 })) == 3)
  19393.             {
  19394.               a.A(a.vE,
  19395.  
  19396. 0);
  19397.  
  19398.               a.K(false);
  19399.             }
  19400.             a.sleep(100, 200);
  19401.           }
  19402.         }
  19403.         if (a.X().equals(a.vE))
  19404.         {
  19405.           if (a.l(localRSTile1, a.i
  19406.  
  19407. (arrayOfInt2)) == 3)
  19408.           {
  19409.             a.l(localRSTile1, 1);
  19410.  
  19411.             a.l(false);
  19412.           }
  19413.           a.sleep(30, 50);
  19414.         }
  19415.         int i3;
  19416.         for (; (i3
  19417.  
  19418. = 0) < 10; tmpTernaryOp = 10)
  19419.         {
  19420.           if (a.l(localRSTile1, a.i(arrayOfInt2)) == a.l(localRSTile1, a.i(new int[] { i2 })))
  19421.           {
  19422.             a.log("Let
  19423.  
  19424. the light go at the proper position.");
  19425.  
  19426.             a.vE = null;
  19427.  
  19428.             break;
  19429.           }
  19430.           if ((a.i(arrayOfInt3) != null) || (a.AA()))
  19431.           {
  19432.            
  19433.  
  19434. break;
  19435.           }
  19436.  
  19437.           a.sleep(100, 150);
  19438.  
  19439.           i3++;
  19440.         }
  19441.       }
  19442.     return 1;
  19443.   }
  19444.  
  19445.   private boolean C()
  19446.   {
  19447.     if ((!a.nA) && (a.objects.getAll().length >
  19448.  
  19449. 200))
  19450.     {
  19451.       a.log("This dungeon appears to have already been explored.");
  19452.  
  19453.       a.jC = false;
  19454.  
  19455.       a.nc = true;
  19456.  
  19457.       return false;
  19458.     }
  19459.     return true;
  19460.   }
  19461.  
  19462.   private
  19463.  
  19464. boolean l(int a, RSNPC a)
  19465.   {
  19466.     RSItem localRSItem = a.inventory.getItem(new int[] { a });
  19467.  
  19468.     if ((a == null) || (localRSItem == null)) {
  19469.       return false;
  19470.     }
  19471.  
  19472.     if
  19473.  
  19474. (a.calc.distanceTo(a) > 4)
  19475.     {
  19476.       a.l(a.getLocation(), 1);
  19477.     }
  19478.     if (!a.F(a))
  19479.     {
  19480.       return false;
  19481.     }
  19482.  
  19483.     a.sleep(200, 400);
  19484.  
  19485.     return
  19486.  
  19487. (a.inventory.getSelectedItem() != null) && (a.doAction("Use"));
  19488.   }
  19489.  
  19490.   private boolean l(RSTile a, int a, int a)
  19491.   {
  19492.     if (a == null)
  19493.     {
  19494.       return false;
  19495.     }
  19496.    
  19497.  
  19498. RSTile localRSTile1 = a.X(); RSTile localRSTile2 = new RSTile(a.getX() + a, a.getY() + a);
  19499.  
  19500.     if (localRSTile1.equals(localRSTile2))
  19501.     {
  19502.       return true;
  19503.     }
  19504.     int
  19505.  
  19506. i3;
  19507.     if (a.calc.distanceTo(localRSTile2) > 1)
  19508.     {
  19509.       RSTile[] arrayOfRSTile;
  19510.       int i2 = (arrayOfRSTile = a.h(a)).length; RSTile localRSTile3 = arrayOfRSTile
  19511.  
  19512. [i3];
  19513.  
  19514.       if ((a.D(localRSTile3) == null) && (!localRSTile3.equals(localRSTile2)) && (a.calc.distanceBetween(localRSTile3, localRSTile2) < 2.0D))
  19515.       {
  19516.         a.A
  19517.  
  19518. (localRSTile3, 0);
  19519.  
  19520.         a.K(false);
  19521.       } else {
  19522.         i3++;
  19523.       }
  19524.  
  19525.     }
  19526.  
  19527.     a.A(localRSTile2, 0);
  19528.  
  19529.     a.K(false);
  19530.  
  19531.     if (a.X().equals(localRSTile1))
  19532.     {
  19533.       int
  19534.  
  19535. i1;
  19536.       a.A(a.X(), i1);
  19537.  
  19538.       a.K(false);
  19539.  
  19540.       i1++;
  19541.  
  19542.       a.A(localRSTile2, 0);
  19543.  
  19544.       a.K(false);
  19545.     }
  19546.     return a.X().equals(localRSTile2);
  19547.   }
  19548.  
  19549.   private int B()
  19550.   {
  19551.    
  19552.  
  19553. a.A(false);
  19554.  
  19555.     a.PD = a.xb;
  19556.  
  19557.     g localg = new g(a);
  19558.  
  19559.     if (a.i(new String[] { "Monolith" }) != null);
  19560.     if (a.jA())
  19561.     {
  19562.       return 2;
  19563.     }
  19564.     RSNPC localRSNPC;
  19565.    
  19566.  
  19567. if (
  19568.       (localRSNPC = a.i(new String[] { "Monolith" })) != null) {
  19569.       if (a.npcs.getNearest(new int[] { 10978, 10979, 10980, 12176 }) == null)
  19570.       {
  19571.         a.vE =
  19572.  
  19573. localRSNPC.getLocation();
  19574.  
  19575.         if ((!a.Y().isMoving()) && (a.calc.distanceTo(a.vE) > 3))
  19576.           a.A(a.vE, 2);
  19577.         if (a.F(localRSNPC, "Activate"))
  19578.         {
  19579.      
  19580.  
  19581.     a.K(false);
  19582.         }
  19583.       }
  19584.       else
  19585.       {
  19586.         a.jA = a.npcs.getNearest(localg);
  19587.  
  19588.         if (a.jA == null)
  19589.         {
  19590.           a.jA = a.npcs.getNearest(a.B);
  19591.      
  19592.  
  19593.    }
  19594.         if (a.F(a.jA))
  19595.         {
  19596.           a.vE = null;
  19597.  
  19598.           a.sleep(500, 800);
  19599.         }
  19600.         else if (a.jA == null)
  19601.         {
  19602.           a.vE =
  19603.  
  19604. localRSNPC.getLocation();
  19605.  
  19606.           if ((a.calc.distanceTo(localRSNPC) > 2) && (!a.Y().isMoving()))
  19607.             a.l(localRSNPC.getLocation(), 1);
  19608.           if (!a.JC()) {
  19609.  
  19610.  
  19611.            a.sleep(300, 400);
  19612.           }
  19613.  
  19614.         }
  19615.  
  19616.         a.l(a.vc, 50, 50);
  19617.       }
  19618.  
  19619.     }
  19620.  
  19621.     a.sleep(100, 200);
  19622.  
  19623.     a.A(true);
  19624.  
  19625.     return 1;
  19626.   }
  19627.  
  19628.   private boolean l(RSTile
  19629.  
  19630. a, int a)
  19631.   {
  19632.     if (a != null)
  19633.     {
  19634.       if (a > 0) {
  19635.         a = new RSTile(a.getX() + a.random(-a, a + 1), a.getY() + a.random(-a, a + 1));
  19636.       }
  19637.  
  19638.       if (a.X
  19639.  
  19640. ().equals(a))
  19641.         return false;
  19642.       Point localPoint;
  19643.       if (
  19644.         (localPoint = a.calc.tileToMinimap(a)).x == -1)
  19645.       {
  19646.         if ((a =
  19647.  
  19648. a.walking.getClosestTileOnMap(a)) == null)
  19649.         {
  19650.           return false;
  19651.         }
  19652.  
  19653.         localPoint = a.calc.tileToMinimap(a);
  19654.       }
  19655.  
  19656.       if (localPoint.x != -1)
  19657.    
  19658.  
  19659.   {
  19660.         a.mouse.move(localPoint);
  19661.  
  19662.         if (
  19663.           (localPoint = a.calc.tileToMinimap(a)).x != -1)
  19664.         {
  19665.           a.mouse.click(localPoint, true);
  19666.  
  19667.          
  19668.  
  19669. return true;
  19670.         }
  19671.       }
  19672.     }
  19673.     return false;
  19674.   }
  19675.  
  19676.   private int c()
  19677.   {
  19678.     if (!a.O())
  19679.     {
  19680.       return -1;
  19681.     }
  19682.     int[] arrayOfInt = { 13070, 13071, 13072, 13073,
  19683.  
  19684. 13074, 13075, 13076, 13077, 13078, 13079, 13080, 13081, 13082, 13083, 13084, 13085, 13086, 13087 };
  19685.  
  19686.     boolean bool = false;
  19687.  
  19688.     RSObject localRSObject1 = a.i(new int[]
  19689.  
  19690. { 39980, 39988, 54490, 54496, 54613 });
  19691.  
  19692.     a.jA = a.npcs.getNearest(a.B);
  19693.  
  19694.     if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
  19695.     {
  19696.       if ((!
  19697.  
  19698. a.QB()) || ((a.HC == 1) && (!a.ZA())))
  19699.         return 2;
  19700.     }
  19701.     if (a.hd == null)
  19702.     {
  19703.       a.hd = new Timer(a.random(240000, 300000));
  19704.     }
  19705.     bool = a.F(a.u) ==
  19706.  
  19707. null;
  19708.  
  19709.     a.A(bool);
  19710.  
  19711.     while (a.i(a.Mc) == null)
  19712.     {
  19713.       if (a.jA())
  19714.       {
  19715.         return 2;
  19716.       }
  19717.       if (!a.j())
  19718.       {
  19719.         return -1;
  19720.       }
  19721.       RSObject
  19722.  
  19723. localRSObject2 = a.i(new int[] { 40157, 40158, 54617, 54618 });
  19724.  
  19725.       RSNPC localRSNPC = a.D(arrayOfInt);
  19726.  
  19727.       a.l(a.vc, 40, 50);
  19728.  
  19729.       if (localRSNPC != null)
  19730.       {
  19731.    
  19732.  
  19733.     if (a.SE.contains("cannot push"))
  19734.         {
  19735.           RSObject localRSObject3;
  19736.           if ((localRSObject3 = a.J(new String[] { "Statue" })) == null)
  19737.           {
  19738.      
  19739.  
  19740.        a.A(a.X(), 4);
  19741.           }
  19742.           else
  19743.             a.F(localRSObject3.getLocation());
  19744.           a.SE = "";
  19745.         }
  19746.         else
  19747.         {
  19748.           a.F(localRSNPC,
  19749.  
  19750. "Push");
  19751.         }
  19752.       }
  19753.       else if ((a.inventory.contains(19877)) && (localRSObject2 != null))
  19754.       {
  19755.         if (a.l(localRSObject2, "Repair"))
  19756.         {
  19757.          
  19758.  
  19759. a.K(false);
  19760.  
  19761.           a.K(false);
  19762.         }
  19763.       }
  19764.       else if (!a.inventory.contains(19877))
  19765.         a.l(localRSObject1, "Mine");
  19766.       a.K(bool);
  19767.  
  19768.       if (a.Rc())
  19769.      
  19770.  
  19771. {
  19772.         a.sleep(800, 1100);
  19773.       }
  19774.  
  19775.     }
  19776.  
  19777.     if (a.M)
  19778.     {
  19779.       a.f();
  19780.     }
  19781.     return 1;
  19782.   }
  19783.  
  19784.   public void mouseClicked(MouseEvent a)
  19785.   {
  19786.     Point localPoint = a.getPoint
  19787.  
  19788. ();
  19789.  
  19790.     a.YF = a.getPoint();
  19791.  
  19792.     if (a.vg.contains(localPoint))
  19793.     {
  19794.       if (a.qC)
  19795.       {
  19796.         a.Od = false;
  19797.  
  19798.         a.Qc = "Shutting down iDungeon Pro";
  19799.  
  19800.         a.AB =
  19801.  
  19802. "";
  19803.       }
  19804.       else if (a.AB.isEmpty())
  19805.       {
  19806.         a.ZB = true;
  19807.       }
  19808.       else
  19809.       {
  19810.         a.ZB = (!a.ZB);
  19811.       }
  19812.     }
  19813.     else if (a.kc.contains(localPoint))
  19814.    
  19815.  
  19816.  {
  19817.       a.qd = (!a.qd);
  19818.     }
  19819.     else if (a.Pg.contains(localPoint))
  19820.     {
  19821.       a.qC = (!a.qC);
  19822.  
  19823.       a.ZB = true;
  19824.  
  19825.       a.AB = (a.qC ? "Click here to confirm shutdown" :
  19826.  
  19827. "");
  19828.     }
  19829.     else if (a.Rb.contains(localPoint))
  19830.     {
  19831.       try
  19832.       {
  19833.         Desktop.getDesktop().browse(new URI("http://shadowscripting.com/forums/viewforum.php?
  19834.  
  19835. f=2"));
  19836.       }
  19837.       catch (Exception localException)
  19838.       {
  19839.         a.log("Unable to load the forums :(");
  19840.       }
  19841.     }
  19842.     else if (a.Q.contains(localPoint))
  19843.     {
  19844.      
  19845.  
  19846. try
  19847.       {
  19848.         Desktop.getDesktop().browse(new URI("http://shadowscripting.wordpress.com/idungeon-users-guide/"));
  19849.       }
  19850.       catch (Exception localException1)
  19851.      
  19852.  
  19853.  {
  19854.         a.log("Unable to load the help manual :(");
  19855.       }
  19856.     }
  19857.     else if (a.ag.contains(localPoint))
  19858.     {
  19859.       a.iA = (!a.iA);
  19860.     }
  19861.     else if (!a.iA)
  19862.     {
  19863.       if
  19864.  
  19865. (a.o.contains(localPoint))
  19866.       {
  19867.         a.Wc = (!a.Wc);
  19868.       }
  19869.       else if ((a.H.contains(localPoint)) && (!a.dc))
  19870.       {
  19871.         a.UB = true;
  19872.  
  19873.         a.qD = false;
  19874.    
  19875.  
  19876.   }
  19877.       else if ((a.m.contains(localPoint)) && (!a.dc))
  19878.       {
  19879.         a.UB = false;
  19880.  
  19881.         a.qD = true;
  19882.       }
  19883.       else if ((a.dc) && (a.uB == 0))
  19884.       {
  19885.         if
  19886.  
  19887. (a.wA.contains(localPoint))
  19888.         {
  19889.           a.O[0][0] = 1;
  19890.  
  19891.           a.O[0][1] = 0;
  19892.  
  19893.           a.O[0][2] = 0;
  19894.  
  19895.           a.O[0][3] = 0;
  19896.  
  19897.           a.O[1][1] = 0;
  19898.  
  19899.          
  19900.  
  19901. a.k = true;
  19902.  
  19903.           a.Xd = false;
  19904.  
  19905.           a.IB = false;
  19906.  
  19907.           a.i = false;
  19908.  
  19909.           a.ec = false;
  19910.         }
  19911.         else if (a.aB.contains(localPoint))
  19912.         {
  19913.      
  19914.  
  19915.      a.O[0][0] = 0;
  19916.  
  19917.           a.O[0][1] = 1;
  19918.  
  19919.           a.O[0][2] = 0;
  19920.  
  19921.           if (a.O[0][5] == 0)
  19922.           {
  19923.             a.O[0][3] = 1;
  19924.  
  19925.             a.i = true;
  19926.           }
  19927.  
  19928.  
  19929.  
  19930.          a.O[0][4] = 0;
  19931.  
  19932.           a.O[1][1] = 1;
  19933.  
  19934.           a.k = false;
  19935.  
  19936.           a.Xd = true;
  19937.  
  19938.           a.IB = false;
  19939.  
  19940.           a.BB = false;
  19941.  
  19942.           a.ec = true;
  19943.        
  19944.  
  19945. }
  19946.         else if (a.G.contains(localPoint))
  19947.         {
  19948.           a.O[0][0] = 0;
  19949.  
  19950.           a.O[0][1] = 0;
  19951.  
  19952.           a.O[0][2] = 1;
  19953.  
  19954.           if (a.O[0][4] == 0)
  19955.           {
  19956.    
  19957.  
  19958.         a.O[0][3] = 1;
  19959.  
  19960.             a.i = true;
  19961.           }
  19962.  
  19963.           a.O[0][5] = 0;
  19964.  
  19965.           a.O[1][1] = 0;
  19966.  
  19967.           a.k = false;
  19968.  
  19969.           a.Xd = false;
  19970.  
  19971.           a.IB =
  19972.  
  19973. false;
  19974.  
  19975.           a.vC = false;
  19976.  
  19977.           a.ec = false;
  19978.         }
  19979.         else if (a.mC.contains(localPoint))
  19980.         {
  19981.           a.O[0][3] = (a.O[0][3] == 0 ? 1 : 0);
  19982.  
  19983.        
  19984.  
  19985.   a.i = a.O[0][3];
  19986.  
  19987.           if (a.i)
  19988.           {
  19989.             a.O[0][4] = 0;
  19990.  
  19991.             a.O[0][5] = 0;
  19992.  
  19993.             a.BB = false;
  19994.  
  19995.             a.vC = false;
  19996.           }
  19997.  
  19998.        
  19999.  
  20000. }
  20001.         else if ((a.fC.contains(localPoint)) && (!a.Xd))
  20002.         {
  20003.           a.O[0][4] = (a.O[0][4] == 0 ? 1 : 0);
  20004.  
  20005.           a.BB = a.O[0][4];
  20006.  
  20007.           if (a.BB)
  20008.          
  20009.  
  20010.  {
  20011.             a.O[0][3] = 0;
  20012.  
  20013.             a.O[0][5] = 0;
  20014.  
  20015.             a.i = false;
  20016.  
  20017.             a.vC = false;
  20018.           }
  20019.  
  20020.         }
  20021.         else if ((a.lF.contains(localPoint))
  20022.  
  20023. && (!a.IB))
  20024.         {
  20025.           a.O[0][5] = (a.O[0][5] == 0 ? 1 : 0);
  20026.  
  20027.           a.vC = a.O[0][5];
  20028.  
  20029.           if (a.vC)
  20030.           {
  20031.             a.O[0][3] = 0;
  20032.  
  20033.             a.O
  20034.  
  20035. [0][4] = 0;
  20036.  
  20037.             a.i = false;
  20038.  
  20039.             a.BB = false;
  20040.           }
  20041.  
  20042.         }
  20043.         else if (a.Ag.contains(localPoint))
  20044.         {
  20045.           a.O[0][6] = (a.O[0][6] ==
  20046.  
  20047. 0 ? 1 : 0);
  20048.  
  20049.           a.XC = a.O[0][6];
  20050.         }
  20051.         else if (a.RE.contains(localPoint))
  20052.         {
  20053.           a.O[0][7] = (a.O[0][7] == 0 ? 1 : 0);
  20054.  
  20055.           a.Yb = a.O
  20056.  
  20057. [0][7];
  20058.         }
  20059.       }
  20060.       else if (((a.dc) && (a.uB == 1)) || (a.qD))
  20061.       {
  20062.         if (a.xd.contains(localPoint)) {
  20063.           a.DC = 1;
  20064.         }
  20065.         else if
  20066.  
  20067. (a.iC.contains(localPoint))
  20068.         {
  20069.           a.DC = 2;
  20070.         }
  20071.         else if ((!a.dc) && (a.tC.contains(localPoint)))
  20072.           a.DC = 3;
  20073.         else if (a.DC == 1)
  20074.  
  20075.  
  20076.       {
  20077.           if (a.JD.contains(localPoint))
  20078.           {
  20079.             a.O[1][0] = (a.O[1][0] == 0 ? 1 : 0);
  20080.  
  20081.             a.kf = a.O[1][0];
  20082.           }
  20083.           else if
  20084.  
  20085. ((a.Mb.contains(localPoint)) && ((a.Xd) || (a.BB)))
  20086.           {
  20087.             a.O[1][1] = (a.O[1][1] == 0 ? 1 : 0);
  20088.  
  20089.             a.ec = a.O[1][1];
  20090.           }
  20091.           else
  20092.  
  20093. if (a.JG.contains(localPoint))
  20094.           {
  20095.             a.O[1][2] = (a.O[1][2] == 0 ? 1 : 0);
  20096.  
  20097.             a.zA = a.O[1][2];
  20098.           }
  20099.           else if (a.Dc.contains
  20100.  
  20101. (localPoint))
  20102.           {
  20103.             a.O[1][3] = (a.O[1][3] == 0 ? 1 : 0);
  20104.  
  20105.             a.VA = a.O[1][3];
  20106.           }
  20107.           else if (a.lf.contains(localPoint))
  20108.          
  20109.  
  20110. {
  20111.             a.O[1][4] = (a.O[1][4] == 0 ? 1 : 0);
  20112.  
  20113.             a.QC = a.O[1][4];
  20114.           }
  20115.           else if (a.Ye.contains(localPoint))
  20116.           {
  20117.             a.O[1][5]
  20118.  
  20119. = (a.O[1][5] == 0 ? 1 : 0);
  20120.  
  20121.             a.xe = a.O[1][5];
  20122.  
  20123.             if (!a.xe)
  20124.               a.log.severe("Warning! Disabling prayer doors will force the bot to abort
  20125.  
  20126. many dungeons");
  20127.           }
  20128.           else if (a.zd.contains(localPoint))
  20129.           {
  20130.             a.O[1][6] = (a.O[1][6] == 0 ? 1 : 0);
  20131.  
  20132.             a.gB = a.O[1][6];
  20133.        
  20134.  
  20135.    }
  20136.           else if (a.qF.contains(localPoint))
  20137.           {
  20138.             a.O[1][7] = (a.O[1][7] == 0 ? 1 : 0);
  20139.  
  20140.             a.bc = a.O[1][7];
  20141.           }
  20142.           else if
  20143.  
  20144. (a.Cd.contains(localPoint))
  20145.           {
  20146.             a.O[1][8] = (a.O[1][8] == 0 ? 1 : 0);
  20147.  
  20148.             a.Fb = a.O[1][8];
  20149.           }
  20150.  
  20151.         }
  20152.         else if (a.DC == 2)
  20153.      
  20154.  
  20155.    {
  20156.           if (a.V.contains(localPoint))
  20157.           {
  20158.             if (a.dC < 6) {
  20159.               a.dC += 1;
  20160.             }
  20161.             else
  20162.             {
  20163.               a.dC =
  20164.  
  20165. 1;
  20166.             }
  20167.           }
  20168.           else if (a.Ub.contains(localPoint))
  20169.           {
  20170.             if (a.dC > 1)
  20171.               a.dC -= 1;
  20172.             else {
  20173.               a.dC
  20174.  
  20175. = 6;
  20176.             }
  20177.  
  20178.           }
  20179.           else if (a.lb.contains(localPoint))
  20180.           {
  20181.             if (a.ld != 6) {
  20182.               a.ld += 1;
  20183.             }
  20184.             else
  20185.    
  20186.  
  20187.          {
  20188.               a.ld = 1;
  20189.             }
  20190.           }
  20191.           else if (a.p.contains(localPoint))
  20192.           {
  20193.             if (a.ld != 1)
  20194.             {
  20195.              
  20196.  
  20197. a.ld -= 1;
  20198.             }
  20199.             else
  20200.               a.ld = 6;
  20201.           }
  20202.           else if (a.qf.contains(localPoint))
  20203.           {
  20204.             if (a.g > 0)
  20205.             {
  20206.  
  20207.  
  20208.             a.td = (a.td < a.g ? ++a.td : 1);
  20209.             }
  20210.             else if (a.td < 35)
  20211.             {
  20212.               a.td += 1;
  20213.             }
  20214.             else
  20215.            
  20216.  
  20217. {
  20218.               a.td = 1;
  20219.             }
  20220.           }
  20221.           else if (a.D.contains(localPoint))
  20222.           {
  20223.             if (a.td > 1)
  20224.             {
  20225.               a.td -= 1;
  20226.    
  20227.  
  20228.          }
  20229.             else if (a.g > 0)
  20230.             {
  20231.               a.td = a.g;
  20232.             }
  20233.             else
  20234.             {
  20235.               a.td = 35;
  20236.             }
  20237.           }
  20238.  
  20239.  
  20240.          else if (a.gC.contains(localPoint))
  20241.           {
  20242.             a.O[2][0] = (a.O[2][0] == 0 ? 1 : 0);
  20243.  
  20244.             a.E = a.O[2][0];
  20245.           }
  20246.           else if
  20247.  
  20248. (a.F.contains(localPoint))
  20249.           {
  20250.             a.O[2][1] = (a.O[2][1] == 0 ? 1 : 0);
  20251.  
  20252.             a.Ed = a.O[2][1];
  20253.           }
  20254.           else if (a.cf.contains
  20255.  
  20256. (localPoint))
  20257.           {
  20258.             a.O[2][2] = (a.O[2][2] == 0 ? 1 : 0);
  20259.  
  20260.             a.od = a.O[2][2];
  20261.           }
  20262.           else if (a.bE.contains(localPoint))
  20263.          
  20264.  
  20265. {
  20266.             a.O[2][3] = (a.O[2][3] == 0 ? 1 : 0);
  20267.  
  20268.             a.M = a.O[2][3];
  20269.           }
  20270.           else if (a.wc.contains(localPoint))
  20271.           {
  20272.             a.O[2][4]
  20273.  
  20274. = (a.O[2][4] == 0 ? 1 : 0);
  20275.  
  20276.             a.RC = a.O[2][4];
  20277.           }
  20278.           else if (a.WB.contains(localPoint))
  20279.           {
  20280.             a.O[2][5] = (a.O[2][5] == 0 ? 1
  20281.  
  20282. : 0);
  20283.  
  20284.             a.dg = a.O[2][5];
  20285.           }
  20286.  
  20287.         }
  20288.         else if ((!a.dc) && (a.DC == 3)) {
  20289.           if (a.ff.contains(localPoint)) {
  20290.             a.PA = 0;
  20291.          
  20292.  
  20293.  }
  20294.           else
  20295.           {
  20296.             a.PA = -1;
  20297.           }
  20298.  
  20299.         }
  20300.  
  20301.       }
  20302.  
  20303.       if (a.dc)
  20304.       {
  20305.         if (a.Vb.contains(localPoint))
  20306.         {
  20307.           if (a.uB ==
  20308.  
  20309. 0) {
  20310.             a.DC = 1;
  20311.           }
  20312.  
  20313.           a.Pb = false;
  20314.  
  20315.           a.uB += 1;
  20316.  
  20317.           if (a.uB > 4)
  20318.           {
  20319.             a.dc = false;
  20320.  
  20321.             a.nA = true;
  20322.      
  20323.  
  20324.     }
  20325.         }
  20326.         else if ((a.fD.contains(localPoint)) && (a.uB > 0))
  20327.         {
  20328.           if (a.uB == 1)
  20329.             a.DC = 0;
  20330.           a.Pb = true;
  20331.  
  20332.           a.uB -=
  20333.  
  20334. 1;
  20335.         }
  20336.       }
  20337.       else if (a.UB)
  20338.       {
  20339.         if (a.xd.contains(localPoint))
  20340.           a.h = 1;
  20341.         else if (a.iC.contains(localPoint))
  20342.         {
  20343.           a.h
  20344.  
  20345. = 2;
  20346.         }
  20347.         else if (a.tC.contains(localPoint))
  20348.           a.h = 3;
  20349.       }
  20350.     }
  20351.   }
  20352.  
  20353.   private int l(int a)
  20354.   {
  20355.     return Skills.XP_TABLE[(a.skills.getRealLevel(a)
  20356.  
  20357. + 1)] - a.skills.getCurrentExp(a);
  20358.   }
  20359.  
  20360.   private boolean L()
  20361.   {
  20362.     if (a.F(a.yf) != null)
  20363.     {
  20364.       a.uC = "Unkillable slayer monster";
  20365.  
  20366.       return false;
  20367.     }
  20368.  
  20369.     return
  20370.  
  20371. true;
  20372.   }
  20373.  
  20374.   private RSNPC l(RSTile a, String a)
  20375.   {
  20376.     double d1 = 99999.990000000005D;
  20377.  
  20378.     Object localObject = null;
  20379.     int i2;
  20380.     if (a != null)
  20381.     {
  20382.       RSNPC[]
  20383.  
  20384. arrayOfRSNPC;
  20385.       int i1 = (arrayOfRSNPC = a.npcs.getAll()).length;
  20386.       RSNPC localRSNPC;
  20387.       RSTile localRSTile =
  20388.         (localRSNPC = arrayOfRSNPC
  20389.  
  20390. [i2]).getLocation();
  20391.       double d2;
  20392.       if (
  20393.         (d2 = a.calc.distanceBetween(localRSTile, a)) < d1)
  20394.       {
  20395.         if (localRSNPC.getName().toLowerCase
  20396.  
  20397. ().contains(a.toLowerCase()))
  20398.         {
  20399.           d1 = d2;
  20400.  
  20401.           localObject = localRSNPC;
  20402.         }
  20403.  
  20404.       }
  20405.  
  20406.       i2++;
  20407.     }
  20408.     return localObject;
  20409.   }
  20410.  
  20411.   private int m()
  20412.  
  20413.  
  20414. {
  20415.     int[] arrayOfInt = { 50663, 51762, 54785 };
  20416.  
  20417.     if (!a.O())
  20418.       return -1;
  20419.     if (a.jA()) {
  20420.       return 2;
  20421.     }
  20422.  
  20423.     if (!a.j())
  20424.     {
  20425.       return -1;
  20426.     }
  20427.     RSNPC
  20428.  
  20429. localRSNPC = a.D(new int[] { 11010 });
  20430.  
  20431.     RSObject localRSObject = a.i(new int[] { 49589, 49590, 49591, 54005 });
  20432.     int i1;
  20433.     if (
  20434.       (i1 = a.J(new int[] { 49592
  20435.  
  20436. }).length) < 3)
  20437.     {
  20438.       if (a.inventory.getCount(new int[] { 17377, 17378 }) < 3 - i1)
  20439.       {
  20440.         if (a.l(localRSObject, "Chop")) {
  20441.           a.K(true);
  20442.         }
  20443.  
  20444.    
  20445.  
  20446.    }
  20447.       else if (a.inventory.contains(17378))
  20448.       {
  20449.         Object localObject1 = null;
  20450.  
  20451.         a.vE = null;
  20452.  
  20453.         if (a.calc.distanceTo(a.r.getCentralTile()) > 6)
  20454.    
  20455.  
  20456.      {
  20457.           a.A(a.r.getCentralTile(), 3);
  20458.  
  20459.           a.K(false);
  20460.         }
  20461.         Object localObject2;
  20462.         int i2 = (localObject2 = a.J(arrayOfInt)).length;
  20463.        
  20464.  
  20465. int i3;
  20466.         Object localObject3;
  20467.         RSTile localRSTile1 = (localObject3 = localObject2[i3])
  20468.           .getLocation();
  20469.         RSTile localRSTile2;
  20470.         if ((
  20471.    
  20472.  
  20473.       (localRSTile2 = a.F(localRSTile1, new int[] { 49592 })) == null) || (a.calc.distanceBetween(localRSTile1, localRSTile2) > 3.0D))
  20474.         {
  20475.           localObject1 =
  20476.  
  20477. localRSTile1;
  20478.         }
  20479.         else {
  20480.           i3++;
  20481.         }
  20482.  
  20483.         if (localObject1 != null)
  20484.         {
  20485.           localObject2 = null;
  20486.           RSTile[] arrayOfRSTile;
  20487.    
  20488.  
  20489.        i3 = (arrayOfRSTile = a.J(localObject1)).length;
  20490.           int i4;
  20491.           localRSTile1 = arrayOfRSTile[i4];
  20492.  
  20493.           if ((a.r.contains(new RSTile[] {
  20494.  
  20495. localRSTile1 })) && (a.G(localRSTile1) == null)) {
  20496.             localObject2 = localRSTile1;
  20497.           }
  20498.           else
  20499.           {
  20500.             i4++;
  20501.           }
  20502.  
  20503.           if
  20504.  
  20505. (localObject2 != null)
  20506.           {
  20507.             i3 = (arrayOfRSTile = a.h((RSTile)localObject2)).length; localRSTile1 = arrayOfRSTile[i4];
  20508.  
  20509.             if (a.G
  20510.  
  20511. (localRSTile1) == null)
  20512.               a.vE = localRSTile1;
  20513.             else {
  20514.               i4++;
  20515.             }
  20516.  
  20517.             if ((a.vE != null) && (a.inventory.contains
  20518.  
  20519. (17378)))
  20520.             {
  20521.               if (!a.X().equals(a.vE))
  20522.               {
  20523.                 if (a.jA()) {
  20524.                   return 2;
  20525.                 }
  20526.  
  20527.                
  20528.  
  20529. a.i(a.vE, 0);
  20530.  
  20531.                 if (!a.inventory.contains(17378))
  20532.                 {
  20533.                   a.inventory.getItem(new int[] { 17377 }).doClick(true);
  20534.  
  20535.                
  20536.  
  20537.   a.sleep(400, 700);
  20538.                 }
  20539.                 a.K(false);
  20540.               }
  20541.  
  20542.               if (a.l(17378, "Lay"))
  20543.               {
  20544.                 a.sleep(1000, 1300);
  20545.  
  20546.  
  20547.  
  20548.               a.K(true);
  20549.               }
  20550.             }
  20551.           }
  20552.         }
  20553.       }
  20554.       else if (a.inventory.contains(17377))
  20555.       {
  20556.         a.inventory.getItem(new int[]
  20557.  
  20558. { 17377 }).doClick(true);
  20559.  
  20560.         a.sleep(700, 900);
  20561.       }
  20562.     }
  20563.     else
  20564.     {
  20565.       if (localRSNPC != null) {
  20566.         a.vE = localRSNPC.getLocation();
  20567.       }
  20568.  
  20569.       a.l
  20570.  
  20571. (a.vE, 2);
  20572.     }
  20573.     a.K(false);
  20574.  
  20575.     if (a.jA()) {
  20576.       return 2;
  20577.     }
  20578.  
  20579.     if (a.l(a.i(new int[] { 49593 }), "Pick-up"))
  20580.       a.K(true);
  20581.     a.sleep(400, 600);
  20582.  
  20583.     return 1;
  20584.  
  20585.  
  20586.  }
  20587.  
  20588.   private boolean k()
  20589.   {
  20590.     return a.combat.getFightMode() == 4;
  20591.   }
  20592.  
  20593.   private int b()
  20594.   {
  20595.     ArrayList localArrayList = new ArrayList();
  20596.  
  20597.     if (a.jA())
  20598.     {
  20599.      
  20600.  
  20601. return 2;
  20602.     }
  20603.     localArrayList.clear();
  20604.     RSObject[] arrayOfRSObject;
  20605.     int i3 = (arrayOfRSObject = a.J(a.OC)).length;
  20606.     int i4;
  20607.     Object localObject1 =
  20608.  
  20609. arrayOfRSObject[i4];
  20610.  
  20611.     localArrayList.add(((RSObject)localObject1).getLocation());
  20612.  
  20613.     i4++;
  20614.  
  20615.     int i1 = 4 - localArrayList.size();
  20616.  
  20617.     a.Qc = ("Puzzle room: Icy Pads
  20618.  
  20619. (" + i1 + " of 4)");
  20620.  
  20621.     int i2 = a.X().getX(); i3 = a.X().getY();
  20622.  
  20623.     for (Iterator localIterator = localArrayList.iterator(); localIterator.hasNext(); ) { localObject1
  20624.  
  20625. = (RSTile)localIterator.next();
  20626.  
  20627.       if (a.l(a.X(), (RSTile)localObject1))
  20628.       {
  20629.         a.vE = ((RSTile)localObject1);
  20630.  
  20631.         a.log("Good pad found!");
  20632.  
  20633.         break;
  20634.  
  20635.  
  20636.     }
  20637.     }
  20638.     int i5;
  20639.     int i11;
  20640.     if (a.vE != null)
  20641.     {
  20642.       a.A(a.vE, 0);
  20643.  
  20644.       a.K(false);
  20645.  
  20646.       if (a.X().equals(a.vE))
  20647.       {
  20648.         a.log("Sucessfully pressed a
  20649.  
  20650. pad!");
  20651.       }
  20652.       a.vE = null;
  20653.     }
  20654.     else if (
  20655.       (i5 = a.random(0, 13)) == 0)
  20656.     {
  20657.       if (a.A(a.r.getCentralTile(), 0))
  20658.       {
  20659.         a.K(true);
  20660.       }
  20661.     }
  20662.    
  20663.  
  20664.  else if (i5 == 1)
  20665.     {
  20666.       int i6 = a.random(-1, 2); int i8 = a.random(-1, 2);
  20667.  
  20668.       RSTile localRSTile1 = new RSTile(i2 + i6, i3 + i8);
  20669.  
  20670.       if ((a.J(localRSTile1,
  20671.  
  20672. new int[0])) && (a.A(localRSTile1, 0)))
  20673.       {
  20674.         a.K(true);
  20675.       }
  20676.     }
  20677.     else
  20678.     {
  20679.       Object localObject2;
  20680.       RSTile localRSTile5;
  20681.       if (i5 > 9)
  20682.       {
  20683.    
  20684.  
  20685.      localObject2 = null;
  20686.         RSTile[] arrayOfRSTile1;
  20687.         i11 = (arrayOfRSTile1 = a.J(a.X())).length;
  20688.         int i12;
  20689.         localRSTile5 = arrayOfRSTile1[i12];
  20690.  
  20691.  
  20692.  
  20693.        if (a.J(localRSTile5, new int[0])) {
  20694.           localObject2 = localRSTile5;
  20695.         }
  20696.  
  20697.         i12++;
  20698.  
  20699.         if (a.A((RSTile)localObject2, 0)) {
  20700.           a.K(true);
  20701.  
  20702.  
  20703.        }
  20704.  
  20705.       }
  20706.       else if (i5 > 6)
  20707.       {
  20708.         int i9 = (localObject2 = a.J(a.X())).length; RSTile localRSTile3 = localObject2[i11];
  20709.  
  20710.         if ((a.J(localRSTile3,
  20711.  
  20712. new int[0])) && (a.A(localRSTile3, 0)))
  20713.         {
  20714.           a.K(true);
  20715.         }
  20716.         else
  20717.           i11++;
  20718.       }
  20719.       else if (i5 > 4)
  20720.       {
  20721.         localObject2 =
  20722.  
  20723. null;
  20724.         RSTile[] arrayOfRSTile2;
  20725.         i11 = (arrayOfRSTile2 = a.h(a.X())).length;
  20726.         int i13;
  20727.         localRSTile5 = arrayOfRSTile2[i13];
  20728.  
  20729.         if (a.J
  20730.  
  20731. (localRSTile5, new int[0])) {
  20732.           localObject2 = localRSTile5;
  20733.         }
  20734.  
  20735.         i13++;
  20736.  
  20737.         if (a.A((RSTile)localObject2, 0))
  20738.         {
  20739.           a.K(true);
  20740.        
  20741.  
  20742. }
  20743.  
  20744.       }
  20745.       else
  20746.       {
  20747.         int i10 = (localObject2 = a.h(a.X())).length; RSTile localRSTile4 = localObject2[i11];
  20748.  
  20749.         if ((a.J(localRSTile4, new int[0])) &&
  20750.  
  20751. (a.A(localRSTile4, 0))) {
  20752.           a.K(true);
  20753.         }
  20754.         else
  20755.         {
  20756.           i11++;
  20757.         }
  20758.       }
  20759.     }
  20760.     a.sleep(100, 400);
  20761.     RSObject localRSObject;
  20762.     if
  20763.  
  20764. (
  20765.       (localRSObject = a.i(new int[] { 49334 })) != null)
  20766.     {
  20767.       a.AB = "Navigating to the nearest corner";
  20768.  
  20769.       a.vE = localRSObject.getLocation();
  20770.  
  20771.       a.A(a.vE,
  20772.  
  20773. 0);
  20774.  
  20775.       a.K(false);
  20776.       RSGroundItem[] arrayOfRSGroundItem;
  20777.       i5 = (arrayOfRSGroundItem = a.groundItems.getAll()).length;
  20778.       int i7;
  20779.       RSGroundItem
  20780.  
  20781. localRSGroundItem;
  20782.       RSTile localRSTile2 = (localRSGroundItem = arrayOfRSGroundItem[i7])
  20783.         .getLocation();
  20784.  
  20785.       if (!a.RD.contains(localRSTile2)) if
  20786.  
  20787. (a.r.contains(new RSTile[] { localRSTile2 }))
  20788.         {
  20789.           a.RD.add(localRSTile2);
  20790.         }
  20791.       i7++;
  20792.  
  20793.       a.lA();
  20794.  
  20795.       a.l(a.nD, 0);
  20796.     }
  20797.  
  20798.     return 1;
  20799.   }
  20800.  
  20801.  
  20802.  
  20803. private void f()
  20804.   {
  20805.     ArrayList localArrayList = new ArrayList();
  20806.     try
  20807.     {
  20808.       int[][] arrayOfInt = a.walking.getCollisionFlags(a.game.getPlane());
  20809.  
  20810.       int i1 =
  20811.  
  20812. a.game.getBaseX(); int i2 = a.game.getBaseY();
  20813.  
  20814.       int i3 = a.r.getX() - i1; int i4 = a.r.getY() - i2;
  20815.       int i5;
  20816.       int i6;
  20817.       if ((arrayOfInt[(i5 + 1)][(i6 +
  20818.  
  20819. 1)] & 0x1280100) != 0)
  20820.       {
  20821.         localArrayList.add(new RSTile(i5 + i1, i6 + i2));
  20822.       }
  20823.  
  20824.       i6++;
  20825.  
  20826.       i5++;
  20827.  
  20828.       localArrayList.removeAll(a.ue);
  20829.     }
  20830.     catch
  20831.  
  20832. (Exception localException1)
  20833.     {
  20834.     }
  20835.  
  20836.     a.be = localArrayList;
  20837.   }
  20838.  
  20839.   private boolean F(RSTile a)
  20840.   {
  20841.     if (a == null)
  20842.       return false;
  20843.     int i1;
  20844.     while
  20845.  
  20846. (a.calc.distanceTo(a) > 1)
  20847.     {
  20848.       if ((a.lc != null) && (a.lc.getElapsed() > 30000L) && (!a.l(a.nD, true))) {
  20849.         return false;
  20850.       }
  20851.  
  20852.       if (a.Zc())
  20853.       {
  20854.    
  20855.  
  20856.     return false;
  20857.       }
  20858.       if (a.calc.distanceTo(a) < 2)
  20859.       {
  20860.         return true;
  20861.       }
  20862.       if (a.A(a, 1))
  20863.       {
  20864.         a.K(false);
  20865.  
  20866.         if
  20867.  
  20868. (a.calc.distanceTo(a) > 1)
  20869.         {
  20870.           a.A(a.X(), i1);
  20871.  
  20872.           a.K(false);
  20873.         }
  20874.  
  20875.       }
  20876.  
  20877.       a.sleep(300, 400);
  20878.  
  20879.       i1++;
  20880.     }
  20881.  
  20882.     return true;
  20883.   }
  20884.  
  20885.   public
  20886.  
  20887. int loop()
  20888.   {
  20889.     if (!a.Od)
  20890.     {
  20891.       return -1;
  20892.     }
  20893.  
  20894.     if (a.game.isLoggedIn())
  20895.     {
  20896.       a.mouse.setSpeed(a.random(5, 8));
  20897.  
  20898.       if (a.zB)
  20899.       {
  20900.         a.uA();
  20901.  
  20902.      
  20903.  
  20904.   if (a.nc)
  20905.         {
  20906.           a.aA();
  20907.  
  20908.           a.nc = false;
  20909.         }
  20910.         else if (a.Ke)
  20911.         {
  20912.           a.s();
  20913.  
  20914.           a.Ke = false;
  20915.         }
  20916.         else if
  20917.  
  20918. (a.N)
  20919.         {
  20920.           a.eB();
  20921.  
  20922.           a.N = false;
  20923.         }
  20924.         else if (a.nA)
  20925.         {
  20926.           if (a.FF)
  20927.           {
  20928.             a.vE = null;
  20929.  
  20930.             if (a.i
  20931.  
  20932. (a.gb) != null)
  20933.             {
  20934.               a.Ke = true;
  20935.             }
  20936.             else if (a.ud.equals("Frozen")) {
  20937.               a.wA();
  20938.             }
  20939.             else if
  20940.  
  20941. (a.ud.equals("Abandoned"))
  20942.               a.LA();
  20943.             else if (a.ud.equals("Furnished")) {
  20944.               a.Qd();
  20945.             }
  20946.             else if (a.ud.equals
  20947.  
  20948. ("Occult")) {
  20949.               a.i();
  20950.             }
  20951.             else
  20952.             {
  20953.               a.h();
  20954.             }
  20955.             a.FF = false;
  20956.  
  20957.             a.X = false;
  20958.          
  20959.  
  20960. }
  20961.           else if (a.hB)
  20962.           {
  20963.             a.e();
  20964.  
  20965.             a.hB = false;
  20966.           }
  20967.           else if (a.Fg)
  20968.           {
  20969.             if (a.qb())
  20970.             {
  20971.        
  20972.  
  20973.        a.hB = true;
  20974.             }
  20975.             else
  20976.               a.X = true;
  20977.             a.nD = null;
  20978.  
  20979.             a.lc = null;
  20980.  
  20981.             a.Fg = false;
  20982.           }
  20983.          
  20984.  
  20985. else if (a.X)
  20986.           {
  20987.             a.g();
  20988.  
  20989.             a.X = false;
  20990.           }
  20991.           else
  20992.           {
  20993.             if (a.jA())
  20994.             {
  20995.               return 100;
  20996.      
  20997.  
  20998.        }
  20999.             if (a.UA) {
  21000.               a.AB = "Hmm... Looks like we're stuck";
  21001.             }
  21002.  
  21003.             a.sleep(200, 400);
  21004.  
  21005.             a.g();
  21006.           }
  21007.         }
  21008.    
  21009.  
  21010.    }
  21011.       else
  21012.       {
  21013.         RSObject localRSObject1 = a.objects.getNearest(new int[] { 50552 });
  21014.  
  21015.         RSObject localRSObject2 = a.objects.getNearest(new int[] {
  21016.  
  21017. 48496 });
  21018.  
  21019.         a.uA();
  21020.  
  21021.         if ((a.N) && (a.M()))
  21022.         {
  21023.           a.Qc = "Starting a new dungeon!";
  21024.  
  21025.           a.zB = true;
  21026.  
  21027.           a.eB();
  21028.         }
  21029.         else
  21030.  
  21031. if (localRSObject1 != null)
  21032.         {
  21033.           a.Qc = "Jumping down the stairs...";
  21034.  
  21035.           if (a.l(localRSObject1, "Jump-down"))
  21036.           {
  21037.             a.K(true);
  21038.  
  21039.      
  21040.  
  21041.       a.K(true);
  21042.           }
  21043.         }
  21044.         else if (localRSObject2 != null)
  21045.         {
  21046.           a.BA();
  21047.         }
  21048.         else
  21049.         {
  21050.           if (a.jA())
  21051.           {
  21052.    
  21053.  
  21054.         return 100;
  21055.           }
  21056.  
  21057.           a.AB = "We don't know what to do :(";
  21058.         }
  21059.  
  21060.       }
  21061.  
  21062.     }
  21063.     else
  21064.     {
  21065.       a.camera.setPitch(true);
  21066.     }
  21067.     return a.random
  21068.  
  21069. (0, 10);
  21070.   }
  21071.  
  21072.   private void e()
  21073.   {
  21074.     if (a.nb != null) if (a.nb.contains(new RSTile[] { a.X() }))
  21075.       {
  21076.         a.X = false;
  21077.  
  21078.         a.FF = true;
  21079.  
  21080.         return;
  21081.       }
  21082.  
  21083.  
  21084.    
  21085.  
  21086.  a.eC = ((a.Xb) && (!a.l(a.r, a.GB)));
  21087.  
  21088.     a.a.clear();
  21089.  
  21090.     a.uc.clear();
  21091.  
  21092.     if (a.Nc.size() > 1)
  21093.     {
  21094.       a.Qc = (a.ZA != null ? "Exploring a new room" : "Exploring an
  21095.  
  21096. old room");
  21097.     }
  21098.     a.ZA = null;
  21099.  
  21100.     int i1 = 0;
  21101.  
  21102.     int i2 = 0;
  21103.  
  21104.     a.uA();
  21105.     Object localObject;
  21106.     if ((a.Zc > 4) && (!a.JB.contains(a.r)) && (!a.ic.contains(a.r)))
  21107.    
  21108.  
  21109.    for (localObject = a.fA.iterator(); ((Iterator)localObject).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject).next();
  21110.  
  21111.         if ((a.r.contains(new
  21112.  
  21113. RSTile[] { localRSTile })) && (!a.fG.contains(localRSTile)))
  21114.         {
  21115.           i1 = 1;
  21116.  
  21117.           break;
  21118.         }
  21119.       }
  21120.     RSTile localRSTile;
  21121.     if (i1 != 0)
  21122.     {
  21123.      
  21124.  
  21125. a.KD = false;
  21126.  
  21127.       a.NA = false;
  21128.  
  21129.       i2 = a.Z();
  21130.  
  21131.       localObject = a.Qc.contains("Puzzle room: ") ? a.Qc.substring(a.Qc.indexOf(":") + 2) : "Unknown puzzle";
  21132.  
  21133.       if
  21134.  
  21135. ((i2 == 1) || (a.KD))
  21136.       {
  21137.         a.log("Puzzle: " + (String)localObject + " completed successfully" + (a.hd != null ? " in " + a.hd.toElapsedString() : "") + "!");
  21138.  
  21139.  
  21140.  
  21141.       a.vE = null;
  21142.  
  21143.         a.uA += 1;
  21144.  
  21145.         a.l.remove(a.r);
  21146.  
  21147.         a.aE.add(a.r);
  21148.  
  21149.         a.hA = new Timer(a.random(360000, 480000));
  21150.  
  21151.         a.KA = new Timer(0L);
  21152.  
  21153.      
  21154.  
  21155.   a.ic.remove(a.r);
  21156.  
  21157.         a.qA.clear();
  21158.       }
  21159.       else
  21160.       {
  21161.         if (i2 == 2)
  21162.         {
  21163.           if (a.nc) {
  21164.             return;
  21165.           }
  21166.  
  21167.           if ((a.hd !=
  21168.  
  21169. null) && ((!a.hd.isRunning()) || (a.Qc.contains("reengage"))))
  21170.           {
  21171.             a.log.severe("Took too long to solve Puzzle: " + (String)localObject + " (" +
  21172.  
  21173. (a.hd != null ? a.hd.toElapsedString() : "unknown time") + ")");
  21174.  
  21175.             if (a.UA) {
  21176.               a.env.saveScreenshot(false);
  21177.             }
  21178.  
  21179.             a.X = true;
  21180.  
  21181.    
  21182.  
  21183.          a.PD = -1;
  21184.  
  21185.             a.fG.addAll(a.ob);
  21186.  
  21187.             a.ic.add(a.r);
  21188.  
  21189.             a.J.removeAll(a.fG);
  21190.  
  21191.             a.Bd.removeAll(a.fG);
  21192.  
  21193.             a.nE = true;
  21194.  
  21195.    
  21196.  
  21197.         a.hd = null;
  21198.  
  21199.             a.qA.clear();
  21200.  
  21201.             a.G(true);
  21202.  
  21203.             a.AB = "";
  21204.           }
  21205.           else
  21206.           {
  21207.             a.Fg = true;
  21208.           }
  21209.  
  21210.        
  21211.  
  21212.   a.vE = null;
  21213.  
  21214.           a.hA = new Timer(a.random(360000, 480000));
  21215.  
  21216.           a.KA = new Timer(0L);
  21217.  
  21218.           return;
  21219.         }
  21220.         if (i2 == -1)
  21221.         {
  21222.          
  21223.  
  21224. a.log("Unable to complete Puzzle: " + (String)localObject + "; Reason: " + a.uC + ".");
  21225.  
  21226.           a.vE = null;
  21227.  
  21228.           a.X = true;
  21229.  
  21230.           a.PD = -1;
  21231.  
  21232.          
  21233.  
  21234. a.fG.addAll(a.ob);
  21235.  
  21236.           a.ic.add(a.r);
  21237.  
  21238.           a.J.removeAll(a.fG);
  21239.  
  21240.           a.Bd.removeAll(a.fG);
  21241.  
  21242.           a.nE = true;
  21243.  
  21244.           a.hA = new Timer(a.random
  21245.  
  21246. (360000, 480000));
  21247.  
  21248.           a.KA = new Timer(0L);
  21249.  
  21250.           a.qA.clear();
  21251.         }
  21252.  
  21253.       }
  21254.  
  21255.       if (!a.NA) {
  21256.         a.JB.add(a.r);
  21257.       }
  21258.  
  21259.       a.hd = null;
  21260.     }
  21261.     if
  21262.  
  21263. (a.ke.contains(a.r)) {
  21264.       a.nE = true;
  21265.     }
  21266.  
  21267.     if ((a.Qc.contains("new room")) && (!a.L()))
  21268.     {
  21269.       for (localObject = a.GB.iterator(); ((Iterator)
  21270.  
  21271. localObject).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject).next();
  21272.  
  21273.         if (a.r.contains(new RSTile[] { localRSTile }))
  21274.         {
  21275.           a.fG.add
  21276.  
  21277. (localRSTile);
  21278.  
  21279.           a.Bd.remove(localRSTile);
  21280.  
  21281.           a.J.remove(localRSTile);
  21282.         }
  21283.       }
  21284.     }
  21285.     a.GB.removeAll(a.fG);
  21286.  
  21287.     if (a.l(a.r, a.GB))
  21288.     {
  21289.       if
  21290.  
  21291. (a.nE)
  21292.       {
  21293.         a.log("We can't skip through this room!");
  21294.  
  21295.         a.ke.remove(a.r);
  21296.  
  21297.         a.nE = false;
  21298.       }
  21299.  
  21300.     }
  21301.  
  21302.     if (a.nE)
  21303.     {
  21304.       if (!a.ZA())
  21305.       {
  21306.    
  21307.  
  21308.     return;
  21309.       }
  21310.  
  21311.     }
  21312.     else if (i2 != -1)
  21313.     {
  21314.       a.A(true);
  21315.  
  21316.       if ((a.nb == null) && (!a.QB())) {
  21317.         return;
  21318.       }
  21319.  
  21320.       if (!a.ZA())
  21321.         return;
  21322.      
  21323.  
  21324. a.l(a.vc, a.random(50, 60), a.random(50, 60));
  21325.  
  21326.       a.S();
  21327.  
  21328.       if (a.Xd) if (a.inventory.getCount(true, new int[] { a.cc }) > a.random(10, 40)) {
  21329.          
  21330.  
  21331. a.inventory.getItem(new int[] { a.cc }).doAction("Wield");
  21332.         }
  21333.  
  21334.  
  21335.       if (!a.ZA()) {
  21336.         return;
  21337.       }
  21338.  
  21339.       a.uA();
  21340.     }
  21341.  
  21342.     a.Bd.removeAll(a.fc);
  21343.  
  21344.    
  21345.  
  21346. a.J.removeAll(a.fc);
  21347.  
  21348.     a.J.removeAll(a.w);
  21349.  
  21350.     if ((i2 < 1) && (a.Nc.size() > 1) && (a.nb == null))
  21351.       if ((i2 == -1) || ((!a.l(a.r, a.Bd)) && (!a.l(a.r, a.J)) &&
  21352.  
  21353. (!a.l(a.r, a.w))))
  21354.       {
  21355.         a.ic.add(a.r);
  21356.  
  21357.         for (localObject = a.fA.iterator(); ((Iterator)localObject).hasNext(); ) { localRSTile = (RSTile)((Iterator)
  21358.  
  21359. localObject).next();
  21360.  
  21361.           if (a.calc.distanceBetween(localRSTile, a.r.getNearestTile(localRSTile)) < 3.0D)
  21362.           {
  21363.             a.fG.add(localRSTile);
  21364.           }
  21365.  
  21366.  
  21367.  
  21368.       }
  21369.  
  21370.       }
  21371.       else if (!a.aE.contains(a.r))
  21372.       {
  21373.         a.aE.add(a.r);
  21374.       }
  21375.     a.Bd.removeAll(a.fG);
  21376.  
  21377.     a.J.removeAll(a.fG);
  21378.  
  21379.     a.w.removeAll(a.fG);
  21380.  
  21381.     a.AB
  21382.  
  21383. = "";
  21384.  
  21385.     if (a.ic.contains(a.r))
  21386.     {
  21387.       if (i2 == 1)
  21388.         a.log.severe("We successfully completed the puzzle, but the room is assigned as finished?");
  21389.       a.X =
  21390.  
  21391. true;
  21392.     }
  21393.     else
  21394.     {
  21395.       a.Fg = true;
  21396.     }
  21397.     a.ZA = null;
  21398.  
  21399.     a.eC = false;
  21400.   }
  21401.  
  21402.   private boolean M()
  21403.   {
  21404.     if ((a.interfaces.get(945).isValid()) || (!
  21405.  
  21406. a.game.isLoggedIn()))
  21407.     {
  21408.       return true;
  21409.     }
  21410.  
  21411.     if (a.objects.getNearest(new int[] { 50552 }) == null);
  21412.     return a.objects.getNearest(new int[] { 48496 }) ==
  21413.  
  21414. null;
  21415.   }
  21416.  
  21417.   private boolean l(int a, String a)
  21418.   {
  21419.     if (!a.inventory.contains(a)) {
  21420.       return true;
  21421.     }
  21422.  
  21423.     int i1 = a.inventory.getCount(new int[] { a });
  21424.     int i2;
  21425.  
  21426.  
  21427.    if ((i2 = 0) < 6)
  21428.     {
  21429.       RSItem localRSItem;
  21430.       if ((localRSItem = a.inventory.getItem(new int[] { a })) != null)
  21431.       {
  21432.         localRSItem.doAction(a);
  21433.  
  21434.        
  21435.  
  21436. a.sleep(1000, 1300);
  21437.  
  21438.         a.sleep(100, 200);
  21439.  
  21440.         i2++;
  21441.       }
  21442.  
  21443.     }
  21444.  
  21445.     return i1 > a.inventory.getCount(new int[] { a });
  21446.   }
  21447.  
  21448.   private int a()
  21449.   {
  21450.     RSObject
  21451.  
  21452. localRSObject1;
  21453.     if ((localRSObject1 = a.i(new int[] { 52041, 54907, 54908 })) == null)
  21454.     {
  21455.       return -1;
  21456.     }
  21457.     RSTile localRSTile1 =
  21458.  
  21459. localRSObject1.getLocation();
  21460.  
  21461.     RSTile localRSTile2 = a.tA();
  21462.  
  21463.     if (a.jA())
  21464.       return 2;
  21465.     if (!a.j())
  21466.     {
  21467.       return -1;
  21468.     }
  21469.     RSObject localRSObject2 = a.J
  21470.  
  21471. (new String[] { "Spinning blades" });
  21472.  
  21473.     RSObject localRSObject3 = a.J(new String[] { "Pendulum" });
  21474.  
  21475.     a.l(a.vc, 40, 50);
  21476.  
  21477.     a.jA = a.npcs.getNearest(a.B);
  21478.  
  21479.     a.yd =
  21480.  
  21481. a.l(a.Zd);
  21482.  
  21483.     if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
  21484.     {
  21485.       a.F(a.jA);
  21486.     }
  21487.     else if ((a.yd != null) && (a.l(a.yd.getLocation(), false)))
  21488.     {
  21489.    
  21490.  
  21491.   a.l(a.yd);
  21492.     }
  21493.     else if (a.F(localRSObject2))
  21494.     {
  21495.       if ((a.calc.distanceTo(localRSTile1) < 2) || (a.calc.distanceTo(localRSObject2) > 5)) {
  21496.         a.A(a.nD,
  21497.  
  21498. 1);
  21499.       }
  21500.       else
  21501.       {
  21502.         a.A(localRSTile1, 0);
  21503.       }
  21504.     }
  21505.     else if (a.F(localRSObject3)) {
  21506.       a.A(localRSObject3.getLocation(), 0);
  21507.     }
  21508.     else if
  21509.  
  21510. (a.F(a.i(a.kg)))
  21511.     {
  21512.       a.A(localRSObject3.getLocation(), 1);
  21513.     }
  21514.     else if (a.l(localRSTile2, true))
  21515.       a.l(a.i(a.bB), "Step-onto");
  21516.     else
  21517.       a.A(a.nD, 1);
  21518.  
  21519.  
  21520.    a.K(true);
  21521.  
  21522.     if (a.AA()) {
  21523.       a.n();
  21524.     }
  21525.     else if (a.jA()) {
  21526.       return 2;
  21527.     }
  21528.  
  21529.     if (a.l(a.i(a.lC), "Open"))
  21530.       a.K(true);
  21531.     a.sleep(200, 400);
  21532.  
  21533.    
  21534.  
  21535. return 1;
  21536.   }
  21537.  
  21538.   public void mouseReleased(MouseEvent a)
  21539.   {
  21540.   }
  21541.  
  21542.   private boolean h()
  21543.   {
  21544.     if (a.jA())
  21545.     {
  21546.       return false;
  21547.     }
  21548.  
  21549.     a.i(a.npcs.getNearest(a.jE));
  21550.  
  21551.    
  21552.  
  21553. a.l(a.UC, 50, 60);
  21554.  
  21555.     a.sleep(400, 800);
  21556.  
  21557.     return true;
  21558.   }
  21559.  
  21560.   private int E()
  21561.   {
  21562.     a.EA();
  21563.  
  21564.     a.lA();
  21565.  
  21566.     if (a.nD != null) { if (a.yd != null) if (a.r.contains(new
  21567.  
  21568. RSTile[] { a.yd.getLocation() }))
  21569.         {
  21570.           break label63;
  21571.         }
  21572.  
  21573.  
  21574.       label63: if (a.jA()) {
  21575.         return 2;
  21576.       }
  21577.  
  21578.       RSTile localRSTile = a.EA();
  21579.  
  21580.      
  21581.  
  21582. if (a.yd != null)
  21583.       {
  21584.         if (a.calc.distanceTo(localRSTile) > 3)
  21585.         {
  21586.           a.l(localRSTile, 1);
  21587.         }
  21588.         else {
  21589.           a.l(a.yd);
  21590.         }
  21591.  
  21592.      
  21593.  
  21594. }
  21595.       else
  21596.       {
  21597.         a.A(a.nD, 2);
  21598.       }
  21599.       a.K(true);
  21600.  
  21601.       a.K(true);
  21602.  
  21603.       a.lA();
  21604.     }
  21605.  
  21606.     a.NA = true;
  21607.  
  21608.     return 1;
  21609.   }
  21610.  
  21611.   public void mouseExited(MouseEvent a)
  21612.  
  21613.  
  21614.  {
  21615.   }
  21616.  
  21617.   private boolean l(RSModel a, String a)
  21618.   {
  21619.     if (a == null)
  21620.       return false;
  21621.     int i1;
  21622.     if (a.l(a, a.mouse.getLocation()))
  21623.     {
  21624.       if (a.l(a))
  21625.        
  21626.  
  21627. return true;
  21628.       if (!a.menu.contains(a))
  21629.       {
  21630.         if (!a.Y().isMoving())
  21631.         {
  21632.           i1 += 2;
  21633.         }
  21634.         i1 += 2;
  21635.       }
  21636.  
  21637.     }
  21638.  
  21639.     a.mouse.move
  21640.  
  21641. (a.getPoint());
  21642.  
  21643.     i1++;
  21644.  
  21645.     return false;
  21646.   }
  21647.  
  21648.   private boolean l(RSNPC a, String a)
  21649.   {
  21650.     if (a == null)
  21651.       return false;
  21652.     RSModel localRSModel;
  21653.     return
  21654.  
  21655. (localRSModel = a.getModel()) != null
  21656.        ? a.l(localRSModel, a) : a.A(a.getLocation(), a);
  21657.   }
  21658.  
  21659.   private boolean l(boolean a)
  21660.   {
  21661.     int i1;
  21662.     if ((a.Y().isMoving())
  21663.  
  21664. || ((a) && (a.Y().getAnimation() != -1)))
  21665.     {
  21666.       return true;
  21667.     }
  21668.  
  21669.     a.sleep(100, 150);
  21670.  
  21671.     i1++;
  21672.  
  21673.     return false;
  21674.   }
  21675.  
  21676.   private boolean l(RSTile a, RSTile a)
  21677.   {
  21678.    
  21679.  
  21680. int i1 = a.getX(); int i2 = a.getY(); int i3 = a.getX(); int i4 = a.getY();
  21681.  
  21682.     return (i1 == i3) || (i2 == i4) || (Math.abs((i1 - i3) * 100 / (i2 - i4)) == 100);
  21683.   }
  21684.  
  21685.  
  21686.  
  21687. private boolean K()
  21688.   {
  21689.     RSTile localRSTile;
  21690.     if (
  21691.       (localRSTile = a.tA()) != null)
  21692.     {
  21693.       if (a.FA != null);
  21694.       if ((!a.M()) || (!a.game.isLoggedIn()))
  21695.    
  21696.  
  21697.     return false;
  21698.       RSObject localRSObject;
  21699.       if ((localRSObject = a.G(localRSTile)) == null)
  21700.       {
  21701.         return false;
  21702.       }
  21703.       RSGroundItem
  21704.  
  21705. localRSGroundItem;
  21706.       if ((
  21707.         (localRSGroundItem = a.groundItems.getNearest(new int[] { 18829 })) != null) && (a.l(localRSGroundItem.getLocation(), false)))
  21708.      
  21709.  
  21710.  {
  21711.         a.l(localRSGroundItem);
  21712.       }
  21713.       else if (a.l(localRSObject, "Enter"))
  21714.       {
  21715.         if (!a.combat.isAutoRetaliateEnabled())
  21716.           a.game.openTab(0);
  21717.    
  21718.  
  21719.      a.sleep(600, 800);
  21720.  
  21721.         if (a.Y().isMoving()) {
  21722.           a.sleep(100, 200);
  21723.         }
  21724.  
  21725.       }
  21726.  
  21727.       a.sleep(100, 200);
  21728.  
  21729.       a.uA();
  21730.  
  21731.       a.l(a.FA);
  21732.     }
  21733.  
  21734.     return
  21735.  
  21736. false;
  21737.   }
  21738.  
  21739.   private void l(Graphics a, Rectangle a)
  21740.   {
  21741.     a.draw3DRect(a.x, a.y, a.width, a.height, true);
  21742.   }
  21743.  
  21744.   private int G()
  21745.   {
  21746.     if ((!a.O()) || (!a.A()))
  21747.      
  21748.  
  21749. return -1;
  21750.     boolean bool = false;
  21751.  
  21752.     while (a.D(new int[] { 11246 }) != null)
  21753.     {
  21754.       if (a.jA()) {
  21755.         return 2;
  21756.       }
  21757.  
  21758.       if (!a.j())
  21759.       {
  21760.         return
  21761.  
  21762. -1;
  21763.       }
  21764.       RSObject localRSObject1 = a.i(new int[] { 40181, 54571, 54593 });
  21765.  
  21766.       RSObject localRSObject2 = a.i(new int[] { 54572, 54594, 55451 });
  21767.  
  21768.       RSObject
  21769.  
  21770. localRSObject3 = a.i(new int[] { 54576, 54598, 55453 });
  21771.  
  21772.       RSObject localRSObject4 = a.i(new int[] { 54580, 54602, 55457 });
  21773.  
  21774.       RSObject localRSObject5 = a.i(new
  21775.  
  21776. int[] { 54577, 54599, 55455 });
  21777.  
  21778.       RSGroundItem localRSGroundItem = a.groundItems.getNearest(new int[] { 19879 });
  21779.  
  21780.       if (localRSObject2 != null)
  21781.       {
  21782.        
  21783.  
  21784. bool = a.l(localRSObject2, "Bless-remains");
  21785.       }
  21786.       else if (localRSObject1 != null)
  21787.       {
  21788.         bool = a.l(localRSObject1, "Unlock");
  21789.       }
  21790.       else if
  21791.  
  21792. (localRSObject4 != null)
  21793.       {
  21794.         bool = a.l(localRSObject4, "Repair");
  21795.       }
  21796.       else if (localRSGroundItem != null)
  21797.       {
  21798.         bool = a.l
  21799.  
  21800. (localRSGroundItem);
  21801.       }
  21802.       else if (localRSObject3 != null)
  21803.       {
  21804.         if (!a.Y().isMoving()) {
  21805.           a.A(localRSObject3.getLocation(), 1);
  21806.         }
  21807.  
  21808.        
  21809.  
  21810. bool = a.l(localRSObject3, "Fill");
  21811.       }
  21812.       else if (localRSObject5 != null)
  21813.       {
  21814.         if (!a.Y().isMoving())
  21815.         {
  21816.           a.A(localRSObject5.getLocation
  21817.  
  21818. (), 1);
  21819.         }
  21820.         bool = a.l(localRSObject5, "Repair");
  21821.       }
  21822.  
  21823.       if (bool) {
  21824.         a.K(false);
  21825.       }
  21826.       else
  21827.       {
  21828.         a.sleep(200, 400);
  21829.       }
  21830.  
  21831.     }
  21832.  
  21833.  
  21834.  
  21835.   return 1;
  21836.   }
  21837.  
  21838.   private RSTile l(RSTile a, int[] a)
  21839.   {
  21840.     double d1 = 99999.990000000005D;
  21841.  
  21842.     Object localObject = null;
  21843.     int i1;
  21844.     if (a != null)
  21845.     {
  21846.       int i2;
  21847.  
  21848.  
  21849.      RSObject localRSObject;
  21850.       int i5;
  21851.       if ((localRSObject = a.G(new RSTile(i1, i2))) != null)
  21852.       {
  21853.         int i3 = localRSObject.getID();
  21854.         int[]
  21855.  
  21856. arrayOfInt;
  21857.         int i4 = (arrayOfInt = a).length;
  21858.  
  21859.         if (arrayOfInt[i5] ==
  21860.           i3)
  21861.         {
  21862.           RSTile localRSTile = localRSObject.getLocation();
  21863.  
  21864.      
  21865.  
  21866.      double d2 = a.calc.distanceBetween(a, localRSTile);
  21867.  
  21868.           if (d2 < d1)
  21869.           {
  21870.             localObject = localRSTile;
  21871.  
  21872.             d1 = d2;
  21873.           }
  21874.  
  21875.         }
  21876.  
  21877.  
  21878.  
  21879.        i5++;
  21880.       }
  21881.  
  21882.       i2++;
  21883.  
  21884.       i1++;
  21885.     }
  21886.  
  21887.     return localObject;
  21888.   }
  21889.  
  21890.   private int D()
  21891.   {
  21892.     String str1 = "Yellow";
  21893.  
  21894.     String str2 = "Green";
  21895.     RSTile
  21896.  
  21897. localRSTile1;
  21898.     if ((localRSTile1 = a.F(new RSTile(0, 20000), "tile")) == null) {
  21899.       return -1;
  21900.     }
  21901.  
  21902.     if (a.random(0, 2) == 1)
  21903.     {
  21904.       str1 = "Green";
  21905.  
  21906.       str2
  21907.  
  21908. = "Yellow";
  21909.     }
  21910.  
  21911.     a.log("Flipping the tiles to " + str1.toLowerCase());
  21912.     int i1;
  21913.     RSTile localRSTile2 = new RSTile(localRSTile1.getX(), localRSTile1.getY() -
  21914.  
  21915. i1);
  21916.     int i2;
  21917.     RSTile localRSTile3 = new RSTile(localRSTile2.getX() + i2, localRSTile2.getY());
  21918.  
  21919.     a.vE = new RSTile(localRSTile3.getX(), localRSTile3.getY() - 1);
  21920.  
  21921.  
  21922.  
  21923.    if (a.jA())
  21924.     {
  21925.       return 2;
  21926.     }
  21927.  
  21928.     if (!a.j())
  21929.     {
  21930.       return -1;
  21931.     }
  21932.     if (a.calc.distanceTo(a.vE) > 4)
  21933.     {
  21934.       a.l(a.vE, 1);
  21935.  
  21936.       a.K(false);
  21937.     }
  21938.    
  21939.  
  21940. int i3;
  21941.     if ((a.A(a.vE, "Imbue")) && (a.l(true)))
  21942.     {
  21943.       if (!a.x())
  21944.       {
  21945.         a.x();
  21946.       }
  21947.  
  21948.       if ((i3 = 0) < 8)
  21949.       {
  21950.         a.sleep(150, 250);
  21951.  
  21952.        
  21953.  
  21954. i3++;
  21955.       }
  21956.     }
  21957.     a.sleep(100, 200);
  21958.  
  21959.     i2++;
  21960.  
  21961.     i1++;
  21962.     RSObject[] arrayOfRSObject;
  21963.     if ((arrayOfRSObject = a.A(new String[] { str2 + " tile" })) != null)
  21964.     {
  21965.  
  21966.  
  21967.     a.log("Matched the first four rows. Forcing " + arrayOfRSObject.length + " remaining tiles.");
  21968.  
  21969.       if (a.jA()) {
  21970.         return 2;
  21971.       }
  21972.  
  21973.       if (a.l(a.J(new
  21974.  
  21975. String[] { str2 + " tile" }), "Force " + str2))
  21976.       {
  21977.         a.x();
  21978.  
  21979.         a.K(!a.l(a.vc, 80, 30));
  21980.       }
  21981.       a.sleep(500, 600);
  21982.     }
  21983.  
  21984.     return 1;
  21985.   }
  21986.  
  21987.   private
  21988.  
  21989. RSObject l(String[] a)
  21990.   {
  21991.     return a.objects.getNearest(new v(a, a));
  21992.   }
  21993.  
  21994.   private int J()
  21995.   {
  21996.     Combat.Prayer localPrayer = Combat.Prayer.PROTECT_FROM_MAGIC;
  21997.  
  21998.     if
  21999.  
  22000. (a.jA())
  22001.     {
  22002.       return 2;
  22003.     }
  22004.     a.l(a.QC, localPrayer, true);
  22005.  
  22006.     RSNPC localRSNPC1 = a.i(new String[] { "skinweaver" });
  22007.  
  22008.     RSNPC localRSNPC2 = a.i(new String[] {
  22009.  
  22010. "bloodrager" });
  22011.  
  22012.     RSNPC localRSNPC3 = a.i(new String[] { "deathslinger" });
  22013.  
  22014.     RSNPC localRSNPC4 = a.i(new String[] { "stormbringer" });
  22015.  
  22016.     a.jA = a.npcs.getNearest
  22017.  
  22018. (a.B);
  22019.  
  22020.     if ((a.jA != null) && (!a.jA.getName().contains("Ramokee")))
  22021.     {
  22022.       if (a.F(a.jA))
  22023.       {
  22024.         a.K(false);
  22025.       }
  22026.  
  22027.     }
  22028.     else if (localRSNPC1 != null)
  22029.  
  22030.  
  22031.   {
  22032.       if (a.F(localRSNPC1)) {
  22033.         a.K(false);
  22034.       }
  22035.  
  22036.     }
  22037.     else if (localRSNPC4 != null)
  22038.     {
  22039.       if (a.F(localRSNPC4)) {
  22040.         a.K(false);
  22041.       }
  22042.  
  22043.     }
  22044.    
  22045.  
  22046. else if (localRSNPC3 != null)
  22047.     {
  22048.       localPrayer = Combat.Prayer.PROTECT_FROM_MISSILES;
  22049.  
  22050.       if (a.F(localRSNPC3))
  22051.       {
  22052.         a.K(false);
  22053.       }
  22054.  
  22055.     }
  22056.     else if
  22057.  
  22058. (localRSNPC2 != null)
  22059.     {
  22060.       localPrayer = Combat.Prayer.PROTECT_FROM_MELEE;
  22061.  
  22062.       if (a.F(localRSNPC2)) {
  22063.         a.K(false);
  22064.       }
  22065.  
  22066.     }
  22067.  
  22068.     a.l(a.lG, 50, 40);
  22069.  
  22070.    
  22071.  
  22072. a.sleep(200, 300);
  22073.  
  22074.     a.l(false, localPrayer, false);
  22075.  
  22076.     return 1;
  22077.   }
  22078.  
  22079.   private boolean l(RSTile a)
  22080.   {
  22081.     RSTile localRSTile;
  22082.     return (localRSTile =
  22083.  
  22084. a.calc.getTileOnScreen(a)) != null
  22085.        ? a.A(localRSTile, "Walk ") : a.A(a, 0);
  22086.   }
  22087.  
  22088.   public void mousePressed(MouseEvent a)
  22089.   {
  22090.   }
  22091.  
  22092.   private boolean l(RSNPC a)
  22093.   {
  22094.     if
  22095.  
  22096. ((a == null) || (!a.isValid()))
  22097.       return false;
  22098.     if (a.l(a.getAnimation(), a.Yc))
  22099.     {
  22100.       return true;
  22101.     }
  22102.     RSCharacter localRSCharacter;
  22103.     return
  22104.  
  22105. ((localRSCharacter = a.Y().getInteracting()) != null) &&
  22106.       (localRSCharacter.equals(a));
  22107.   }
  22108.  
  22109.   private void i()
  22110.   {
  22111.     RSNPC localRSNPC1 = a.i(new String[] {
  22112.  
  22113. "Gravecreeper" });
  22114.  
  22115.     RSNPC localRSNPC2 = a.i(new String[] { "Runebound behemoth" });
  22116.  
  22117.     RSNPC localRSNPC3 = a.i(new String[] { "Necrolord" });
  22118.  
  22119.     RSNPC localRSNPC4 =
  22120.  
  22121. a.i(new String[] { "Flesh-Spoiler" });
  22122.  
  22123.     RSNPC localRSNPC5 = a.i(new String[] { "Yk'Lagor the Thunderous" });
  22124.  
  22125.     a.l(a.UC, 50, 60);
  22126.  
  22127.     if (!a.tc.equals("Skeletal
  22128.  
  22129. Trio")) if (a.i(new String[] { "Skeletal warrior" }) == null) if (a.i(new String[] { "Skeletal sorcerer" }) == null) if (a.i(new String[] { "Skeletal archer" }) ==
  22130.  
  22131. null)
  22132.             break label921;
  22133.     Object localObject4 = null;
  22134.  
  22135.     a.Qc = "Killing the Skeletal Trio!";
  22136.  
  22137.     if (a.tc.isEmpty())
  22138.     {
  22139.       a.log(a.Qc);
  22140.  
  22141.       a.tc =
  22142.  
  22143. "Skeletal Trio";
  22144.     }
  22145.  
  22146.     RSNPC localRSNPC6 = a.i(new String[] { "Skeletal warrior" }); RSNPC localRSNPC7 = a.i(new String[] { "Skeletal archer" }); RSNPC localRSNPC8 =
  22147.  
  22148. a.i(new String[] { "Skeletal sorcerer" });
  22149.  
  22150.     if (a.jA())
  22151.     {
  22152.       return;
  22153.     }
  22154.     localRSNPC6 = a.i(new String[] { "Skeletal warrior" });
  22155.  
  22156.     localRSNPC7 = a.i(new
  22157.  
  22158. String[] { "Skeletal archer" });
  22159.  
  22160.     localRSNPC8 = a.i(new String[] { "Skeletal sorcerer" });
  22161.  
  22162.     localObject4 = null;
  22163.  
  22164.     int i1 = 1;
  22165.  
  22166.     int i2 = 1;
  22167.  
  22168.     int i3 = 1;
  22169.    
  22170.  
  22171. int i9;
  22172.     int i11;
  22173.     if (localRSNPC6 != null)
  22174.     {
  22175.       i9 = localRSNPC6.getID();
  22176.  
  22177.       i1 = 0;
  22178.  
  22179.       if (i9 == i11) {
  22180.         i1 = 1;
  22181.       }
  22182.       else
  22183.       {
  22184.        
  22185.  
  22186. i11 += 3;
  22187.       }
  22188.     }
  22189.     if (localRSNPC7 != null)
  22190.     {
  22191.       i9 = localRSNPC7.getID();
  22192.  
  22193.       i2 = 0;
  22194.  
  22195.       if (i9 == i11) {
  22196.         i2 = 1;
  22197.       }
  22198.       else
  22199.       {
  22200.        
  22201.  
  22202. i11 += 3;
  22203.       }
  22204.  
  22205.     }
  22206.  
  22207.     if (localRSNPC8 != null)
  22208.     {
  22209.       i9 = localRSNPC8.getID();
  22210.  
  22211.       i3 = 0;
  22212.  
  22213.       if (i9 == i11) {
  22214.         i3 = 1;
  22215.       }
  22216.       else
  22217.       {
  22218.        
  22219.  
  22220. i11 += 3;
  22221.       }
  22222.  
  22223.     }
  22224.  
  22225.     if (a.HC == 1)
  22226.     {
  22227.       if (localRSNPC8 != null) {
  22228.         a.l(a.QC, a.HC != 1 ? Combat.Prayer.PROTECT_FROM_MISSILES :
  22229.  
  22230. Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22231.       }
  22232.       else if (localRSNPC7 != null) {
  22233.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MISSILES, true);
  22234.       }
  22235.       else
  22236.      
  22237.  
  22238. {
  22239.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
  22240.       }
  22241.  
  22242.       if (i2 == 0)
  22243.       {
  22244.         localObject4 = localRSNPC7;
  22245.  
  22246.         a.PD = a.xb;
  22247.       }
  22248.       else if
  22249.  
  22250. (i3 == 0)
  22251.       {
  22252.         localObject4 = localRSNPC8;
  22253.  
  22254.         a.PD = a.xb;
  22255.       }
  22256.       else if (i1 == 0)
  22257.       {
  22258.         localObject4 = localRSNPC6;
  22259.       }
  22260.  
  22261.       if
  22262.  
  22263. ((localRSNPC7 == null) && (localRSNPC8 == null)) {
  22264.         if (a.iD)
  22265.         {
  22266.           a.i(3);
  22267.         }
  22268.         else {
  22269.           a.PD = a.Gd;
  22270.         }
  22271.  
  22272.       }
  22273.  
  22274.     }
  22275.     else
  22276.  
  22277. if (a.HC == 2)
  22278.     {
  22279.       if (localRSNPC6 != null)
  22280.       {
  22281.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
  22282.       }
  22283.       else if (localRSNPC8 != null)
  22284.       {
  22285.      
  22286.  
  22287.    a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22288.       }
  22289.       else
  22290.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MISSILES, true);
  22291.       if (i3 == 0)
  22292.       {
  22293.        
  22294.  
  22295. localObject4 = localRSNPC8;
  22296.       }
  22297.       else if (i1 == 0) {
  22298.         localObject4 = localRSNPC6;
  22299.       }
  22300.       else if (i2 == 0)
  22301.       {
  22302.         localObject4 = localRSNPC7;
  22303.  
  22304.  
  22305.     }
  22306.     }
  22307.     else if (a.HC == 3)
  22308.     {
  22309.       if (localRSNPC7 != null)
  22310.       {
  22311.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MISSILES, true);
  22312.       }
  22313.       else if
  22314.  
  22315. (localRSNPC6 != null) {
  22316.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
  22317.       }
  22318.       else
  22319.       {
  22320.         a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22321.      
  22322.  
  22323.  }
  22324.  
  22325.       if (i1 == 0)
  22326.         localObject4 = localRSNPC6;
  22327.       else if (i2 == 0) {
  22328.         localObject4 = localRSNPC7;
  22329.       }
  22330.       else if (i3 == 0)
  22331.       {
  22332.        
  22333.  
  22334. localObject4 = localRSNPC8;
  22335.       }
  22336.     }
  22337.     if (localObject4 != null)
  22338.     {
  22339.       a.F((RSNPC)localObject4);
  22340.  
  22341.       if (!a.l(a.UC, 50, 50))
  22342.         a.sleep(400, 600);
  22343.     }
  22344.    
  22345.  
  22346. else if (!a.JC())
  22347.     {
  22348.       a.sleep(600, 800);
  22349.     }
  22350.  
  22351.     a.sleep(200, 300);
  22352.  
  22353.     break label3638;
  22354.     label921: int i7;
  22355.     int i8;
  22356.     if ((a.tc.equals("Runebound
  22357.  
  22358. Behemoth")) || (localRSNPC2 != null))
  22359.     {
  22360.       localObject4 = new int[] { 53977, 53979, 53978 };
  22361.  
  22362.       int i6 = 0; i7 = 0; i8 = 0;
  22363.  
  22364.       if (a.kC) {
  22365.         i6 = 1;
  22366.      
  22367.  
  22368. }
  22369.  
  22370.       if (a.Sd) {
  22371.         i7 = 1;
  22372.       }
  22373.  
  22374.       if (a.iD)
  22375.       {
  22376.         i8 = 1;
  22377.       }
  22378.  
  22379.       boolean[] arrayOfBoolean1 = { i6, i7, i8 };
  22380.  
  22381.       a.Qc = "Killing the
  22382.  
  22383. Runebound Behemoth!";
  22384.  
  22385.       if (a.tc.isEmpty())
  22386.       {
  22387.         a.log(a.Qc);
  22388.  
  22389.         a.tc = "Runebound Behemoth";
  22390.       }
  22391.       a.PD = a.Gd;
  22392.  
  22393.       if (a.Ob < 1)
  22394.         a.Ob =
  22395.  
  22396. localRSNPC2.getID();
  22397.       a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22398.  
  22399.       if (a.jA())
  22400.       {
  22401.         return;
  22402.       }
  22403.  
  22404.       if (localRSNPC2 != null)
  22405.         if
  22406.  
  22407. ((localRSNPC2.getAnimation() == 14440) || (localRSNPC2.getMessage() != null))
  22408.         {
  22409.           a.AB = "Dodging the lightning!";
  22410.  
  22411.           RSObject localRSObject2 =
  22412.  
  22413. a.i(new int[] { 54786 });
  22414.  
  22415.           a.l(a.calc.distanceTo(localRSObject2) > 4 ? localRSObject2.getLocation() : a.nb.getCentralTile());
  22416.  
  22417.           if (!a.l(a.vc, 80, 30))
  22418.  
  22419. {
  22420.             a.sleep(400, 600);
  22421.           }
  22422.  
  22423.           a.AB = "";
  22424.         }
  22425.         else
  22426.         {
  22427.           int i12 = a.Ob - localRSNPC2.getID();
  22428.  
  22429.           int i13 = 1; int
  22430.  
  22431. i14 = 1; int i15 = 1;
  22432.  
  22433.           if (i12 == 15)
  22434.           {
  22435.             i13 = 0;
  22436.           }
  22437.           else if (i12 == 30)
  22438.           {
  22439.             i14 = 0;
  22440.           }
  22441.          
  22442.  
  22443. else if (i12 == 60)
  22444.           {
  22445.             i15 = 0;
  22446.           }
  22447.           else if (i12 == -15)
  22448.           {
  22449.             i13 = 0;
  22450.  
  22451.             i15 = 0;
  22452.           }
  22453.           else
  22454.  
  22455. if (i12 == -30)
  22456.           {
  22457.             i14 = 0;
  22458.  
  22459.             i13 = 0;
  22460.           }
  22461.           else if (i12 == -45)
  22462.           {
  22463.             i14 = 0;
  22464.  
  22465.             i15 = 0;
  22466.          
  22467.  
  22468. }
  22469.           boolean[] arrayOfBoolean2 = { i13, i14, i15 };
  22470.  
  22471.           int i16 = a.HC - 1;
  22472.  
  22473.           if (arrayOfBoolean2[i16] == 0)
  22474.           {
  22475.             a.i(localRSNPC2);
  22476.  
  22477.  
  22478.         }
  22479.           else if (a.i(new int[] { localObject4[i16] }) != null)
  22480.           {
  22481.             if (a.combat.getHealth() > a.random(8, 15)) if (a.l(a.i(new int[] {
  22482.  
  22483. localObject4[i16] }), "Deactivate")) {
  22484.                 a.K(false);
  22485.               }
  22486.  
  22487.  
  22488.           }
  22489.           else
  22490.           {
  22491.             int i17 = 0;
  22492.             int i18;
  22493.        
  22494.  
  22495.     int i19 = i18 + 1;
  22496.  
  22497.             if ((a.HC != i19) && (arrayOfBoolean1[i18] != 0)) if (arrayOfBoolean2[i18] != 0) { if (a.i(new int[] { localObject4[i18] }) == null);
  22498.  
  22499.  
  22500.              }
  22501.               else
  22502.               {
  22503.                 RSObject localRSObject3;
  22504.                 if ((localRSObject3 = a.i(new int[] { localObject4[i18] })) !=
  22505.  
  22506. null)
  22507.                 {
  22508.                   a.i(localRSObject3.getLocation(), 1);
  22509.                 }
  22510.                 a.i(i19);
  22511.  
  22512.                 i17 = 1;
  22513.  
  22514.                 break
  22515.  
  22516. label1554;
  22517.               }
  22518.  
  22519.  
  22520.             i18++;
  22521.  
  22522.             label1554: if (i17 == 0)
  22523.             {
  22524.               a.JC();
  22525.             }
  22526.           }
  22527.         }
  22528.       a.l(a.lG, 50,
  22529.  
  22530. 0);
  22531.  
  22532.       a.sleep(100, 200);
  22533.     }
  22534.     else
  22535.     {
  22536.       Object localObject1;
  22537.       Object localObject2;
  22538.       RSTile localRSTile1;
  22539.       if ((a.tc.equals("Gravecreeper")) ||
  22540.  
  22541. (localRSNPC1 != null))
  22542.       {
  22543.         localObject1 = new int[] { 54443, 54449, 54457 };
  22544.  
  22545.         localObject2 = new int[] { 54444, 54450, 54458 };
  22546.  
  22547.         a.Qc = "Killing
  22548.  
  22549. the Gravecreeper!";
  22550.  
  22551.         if (a.tc.isEmpty())
  22552.         {
  22553.           a.log(a.Qc);
  22554.  
  22555.           a.tc = "Gravecreeper";
  22556.         }
  22557.  
  22558.         if ((a.HC == 2) && (a.kC))
  22559.         {
  22560.        
  22561.  
  22562.    a.i(1);
  22563.         }
  22564.         a.PD = (a.xb != -1 ? a.xb : a.Gd);
  22565.  
  22566.         a.l(a.QC, a.k ? Combat.Prayer.PROTECT_FROM_MELEE : Combat.Prayer.PROTECT_FROM_MISSILES, true);
  22567.  
  22568.      
  22569.  
  22570.    if (a.jA()) {
  22571.           return;
  22572.         }
  22573.  
  22574.         if ((localRSNPC1 = a.i(new String[] { a.tc })) != null)
  22575.         {
  22576.           RSObject localRSObject1 = a.i
  22577.  
  22578. (localObject2);
  22579.  
  22580.           if ((localObject4 = localRSNPC1.getMessage()) != null)
  22581.           {
  22582.             if (((String)localObject4).equals("Burrrn"))
  22583.             {
  22584.          
  22585.  
  22586.      a.AB = "Dodging the burn spots!";
  22587.  
  22588.               localRSTile1 = localRSNPC1.getLocation();
  22589.  
  22590.               a.vE = a.A(localRSTile1, localObject1);
  22591.  
  22592.               if
  22593.  
  22594. ((a.vE != null) && (localRSTile1 != null))
  22595.               {
  22596.                 if (a.calc.distanceTo(localRSTile1) < 2)
  22597.                 {
  22598.                   a.A(a.vE, 1);
  22599.  
  22600.        
  22601.  
  22602.            i7++;
  22603.                 }
  22604.                 else if (a.JC())
  22605.                 {
  22606.                   i7++;
  22607.                 }
  22608.  
  22609.                 a.sleep(400, 500);
  22610.  
  22611.            
  22612.  
  22613.     i7++;
  22614.               }
  22615.               a.AB = "";
  22616.             }
  22617.             else if (((String)localObject4).contains("Buuu"))
  22618.             {
  22619.               a.Ic();
  22620.            
  22621.  
  22622. }
  22623.             else if (((String)localObject4).contains("Diii"))
  22624.             {
  22625.               a.Ic();
  22626.             }
  22627.             else if (((String)localObject4).contains
  22628.  
  22629. ("Braa"))
  22630.             {
  22631.               a.Ic();
  22632.             }
  22633.  
  22634.           }
  22635.           else if ((localRSObject1 != null) && (a.calc.distanceTo(localRSObject1) < 2))
  22636.           {
  22637.    
  22638.  
  22639.          a.vE = a.A(localRSNPC1.getLocation(), localObject1);
  22640.  
  22641.             if (a.vE != null)
  22642.             {
  22643.               a.A(a.vE, 1);
  22644.             }
  22645.             else {
  22646.        
  22647.  
  22648.        a.l(a.nb.getCentralTile());
  22649.             }
  22650.  
  22651.             a.sleep(600, 1000);
  22652.           }
  22653.           else
  22654.           {
  22655.             a.i(localRSNPC1);
  22656.  
  22657.             a.l(a.lG,
  22658.  
  22659. 50, 0);
  22660.           }
  22661.         }
  22662.         a.sleep(100, 200);
  22663.       }
  22664.       else
  22665.       {
  22666.         if ((a.tc.equals("Necrolord")) || (localRSNPC3 != null))
  22667.         {
  22668.           a.Qc =
  22669.  
  22670. "Killing the Necrolord!";
  22671.  
  22672.           if (a.tc.isEmpty())
  22673.           {
  22674.             a.log(a.Qc);
  22675.  
  22676.             a.tc = "Necrolord";
  22677.           }
  22678.           if (a.HC == 1)
  22679.           {
  22680.  
  22681.  
  22682.           if (a.Sd)
  22683.             {
  22684.               a.i(2);
  22685.             }
  22686.             else if (a.iD)
  22687.             {
  22688.               a.i(3);
  22689.             }
  22690.             else
  22691.            
  22692.  
  22693. {
  22694.               a.log.severe("We can't kill this boss with melee, aborting dungeon");
  22695.  
  22696.               a.Ic += 1;
  22697.  
  22698.               a.nc = true;
  22699.  
  22700.               return;
  22701.            
  22702.  
  22703. }
  22704.           }
  22705.           if ((localRSNPC3 != null) && (a.calc.distanceTo(localRSNPC3) > 3))
  22706.           {
  22707.             a.l(localRSNPC3.getLocation(), 1);
  22708.           }
  22709.         }
  22710.    
  22711.  
  22712.      while (a.objects.getNearest(a.gb) == null)
  22713.         {
  22714.           localObject1 = a.i(new String[] { "Skeletal minion" });
  22715.  
  22716.           a.l(a.QC, (localObject1 != null) &&
  22717.  
  22718. (a.calc.distanceTo((RSCharacter)localObject1) < 4) ? Combat.Prayer.PROTECT_FROM_MELEE : Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22719.  
  22720.           if (a.jA()) {
  22721.            
  22722.  
  22723. return;
  22724.           }
  22725.  
  22726.           if (a.HC == 1)
  22727.           {
  22728.             a.log.severe("We can't kill this boss with melee, aborting dungeon");
  22729.  
  22730.             a.nc = true;
  22731.  
  22732.          
  22733.  
  22734.   return;
  22735.           }
  22736.           if (a.MC)
  22737.           {
  22738.             a.JC();
  22739.           }
  22740.           if ((a.F(localRSNPC3)) && (a.HC == 3))
  22741.           {
  22742.             a.sleep(400,
  22743.  
  22744. 600);
  22745.  
  22746.             if (!localRSNPC3.isInCombat()) {
  22747.               a.F(a.Qb, "Cast");
  22748.             }
  22749.  
  22750.           }
  22751.  
  22752.           a.l(a.UC, 50, 60);
  22753.  
  22754.           a.sleep(200, 400);
  22755.  
  22756.        
  22757.  
  22758.    continue;
  22759.  
  22760.           if ((a.tc.equals("Flesh-Spoiler Haasghenahk")) || (localRSNPC4 != null))
  22761.           {
  22762.             a.Qc = "Killing the Flesh-Spoiler!";
  22763.  
  22764.             if
  22765.  
  22766. (a.tc.isEmpty())
  22767.             {
  22768.               a.log(a.Qc);
  22769.  
  22770.               a.tc = "Flesh-Spoiler Haasghenahk";
  22771.             }
  22772.             a.PD = (a.bC != -1 ? a.bC : a.xb);
  22773.  
  22774.      
  22775.  
  22776.        a.l(a.QC, null, false);
  22777.           }
  22778.           while (a.objects.getNearest(a.gb) == null)
  22779.           {
  22780.             if (a.jA())
  22781.             {
  22782.               return;
  22783.        
  22784.  
  22785.      }
  22786.             localRSNPC4 = a.i(new String[] { a.tc });
  22787.  
  22788.             if (a.VA) if ((a.i(new String[] { "spawn" }) != null) && (a.skills.getRealLevel(5) > 42)) {
  22789.      
  22790.  
  22791.           a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
  22792.               }
  22793.  
  22794.  
  22795.             if (a.F(localRSNPC4)) {
  22796.               a.sleep(800, 1200);
  22797.             }
  22798.  
  22799.            
  22800.  
  22801. a.l(a.UC, 50, 50); continue;
  22802.  
  22803.             if ((a.tc.equals("Yk'Lagor the Thunderous")) || (localRSNPC5 != null))
  22804.             {
  22805.               a.Qc = "Killing Yk'Lagor the
  22806.  
  22807. Thunderous!";
  22808.  
  22809.               if (a.iD)
  22810.               {
  22811.                 a.i(3);
  22812.               }
  22813.               if (a.tc.isEmpty())
  22814.               {
  22815.                 a.log(a.Qc);
  22816.  
  22817.    
  22818.  
  22819.              a.tc = "Yk'Lagor the Thunderous";
  22820.               }
  22821.               a.PD = (a.bC != -1 ? a.bC : a.xb);
  22822.  
  22823.               localObject1 = new ArrayList();
  22824.  
  22825.              
  22826.  
  22827. int i4 = (localObject2 = a.J(new int[] { 55057 })).length;
  22828.               int i5;
  22829.               localRSTile1 = localObject2[i5];
  22830.               RSTile[] arrayOfRSTile;
  22831.      
  22832.  
  22833.         i8 = (arrayOfRSTile = a.h(localRSTile1.getLocation())).length;
  22834.               int i10;
  22835.               RSTile localRSTile2 = arrayOfRSTile[i10];
  22836.  
  22837.               if
  22838.  
  22839. (a.i(localRSTile2))
  22840.               {
  22841.                 ((ArrayList)localObject1).add(localRSTile2);
  22842.               }
  22843.               else
  22844.               {
  22845.                 i10++;
  22846.    
  22847.  
  22848.           }
  22849.               i5++;
  22850.  
  22851.               a.l(false, Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22852.  
  22853.               if (a.i(new String[] { "Mysterious mage" }) != null)
  22854.        
  22855.  
  22856.        {
  22857.                 a.AB = "Freeing Yk'Lagor from the mages";
  22858.  
  22859.                 a.i(a.nb.getCentralTile(), 2);
  22860.  
  22861.                 a.A(false);
  22862.  
  22863.                 if (a.jA())
  22864.    
  22865.  
  22866.              {
  22867.                   return;
  22868.                 }
  22869.                 a.vE = a.l(a.X(), (ArrayList)localObject1);
  22870.  
  22871.                 a.A(a.vE, 0);
  22872.  
  22873.                 a.K
  22874.  
  22875. (false);
  22876.  
  22877.                 if (a.F(a.npcs.getNearest(a.CB)))
  22878.                 {
  22879.                   a.sleep(600, 800);
  22880.                 }
  22881.                 a.l(a.UC, 50, 50);
  22882.  
  22883.        
  22884.  
  22885.          a.AB = "";
  22886.  
  22887.                 if (a.X().equals(a.vE)) {
  22888.                   a.Ic();
  22889.                 }
  22890.  
  22891.                 a.A(true);
  22892.               }
  22893.               a.l(a.QC,
  22894.  
  22895. a.HC == 1 ? Combat.Prayer.PROTECT_FROM_MELEE : Combat.Prayer.PROTECT_FROM_MAGIC, true);
  22896.  
  22897.               if (a.jA())
  22898.               {
  22899.                 return;
  22900.               }
  22901.    
  22902.  
  22903.            if (
  22904.                 (localRSNPC5 = a.i(new String[] { a.tc })) != null)
  22905.               {
  22906.                 Object localObject3;
  22907.                 if ((localObject2
  22908.  
  22909. = localRSNPC5.getMessage()) != null)
  22910.                 {
  22911.                   if (((String)localObject2).contains("This is"))
  22912.                   {
  22913.                     a.AB =
  22914.  
  22915. "Taking cover from the quake!";
  22916.  
  22917.                     a.vE = a.l(a.X(), (ArrayList)localObject1);
  22918.  
  22919.                     localObject3 = new Timer(a.random(3800, 4500));
  22920.  
  22921.        
  22922.  
  22923.              if (a.vE != null)
  22924.                     {
  22925.                       if ((!a.X().equals(a.vE)) && (!a.AA()))
  22926.                       {
  22927.                         if
  22928.  
  22929. (a.jA())
  22930.                         {
  22931.                           return;
  22932.                         }
  22933.  
  22934.                         a.K(false);
  22935.  
  22936.                         a.JC();
  22937.            
  22938.  
  22939.            }
  22940.  
  22941.                       if (a.X().equals(a.vE)) {
  22942.                         a.Ic();
  22943.                       }
  22944.  
  22945.                     }
  22946.  
  22947.                     a.AB = "";
  22948.    
  22949.  
  22950.               }
  22951.                   else if (((String)localObject2).contains("Come"))
  22952.                   {
  22953.                     a.AB = "Dodging his grasp!";
  22954.  
  22955.                    
  22956.  
  22957.  a.vE = a.l(a.X(), (ArrayList)localObject1);
  22958.  
  22959.                     localObject3 = new Timer(a.random(3500, 4500));
  22960.  
  22961.                     if (a.vE != null)
  22962.                    
  22963.  
  22964. {
  22965.                       a.md = false;
  22966.  
  22967.                       if (((Timer)localObject3).isRunning())
  22968.                       {
  22969.                         if (a.jA())
  22970.              
  22971.  
  22972.           {
  22973.                           return;
  22974.                         }
  22975.                         if (a.md)
  22976.                         {
  22977.                           a.log("Damn
  22978.  
  22979. it.. Got sucked in.");
  22980.  
  22981.                           a.sleep(4000, 6000);
  22982.                         }
  22983.                         else
  22984.                         {
  22985.                      
  22986.  
  22987.     a.K(false);
  22988.  
  22989.                           a.JC();
  22990.                         }
  22991.  
  22992.                       }
  22993.  
  22994.                       if (a.X().equals(a.vE)) {
  22995.                        
  22996.  
  22997. a.Ic();
  22998.                       }
  22999.  
  23000.                     }
  23001.  
  23002.                     a.AB = "";
  23003.                   }
  23004.                 }
  23005.                 else
  23006.                 {
  23007.              
  23008.  
  23009.     if (!a.Y().isMoving())
  23010.                   {
  23011.                     localObject3 = a.l(a.X(), (ArrayList)localObject1);
  23012.  
  23013.                     if (a.calc.distanceTo((RSTile)
  23014.  
  23015. localObject3) > (a.HC == 1 ? 4 : 3))
  23016.                     {
  23017.                       a.l((RSTile)localObject3);
  23018.  
  23019.                       a.l(false);
  23020.                     }
  23021.          
  23022.  
  23023.            else
  23024.                     {
  23025.                       a.i(localRSNPC5);
  23026.                     }
  23027.                   }
  23028.                   else
  23029.                   {
  23030.            
  23031.  
  23032.         a.i(localRSNPC5);
  23033.                   }
  23034.  
  23035.                   a.l(a.UC, 50, 40);
  23036.                 }
  23037.               }
  23038.               a.sleep(200, 400);
  23039.             }
  23040.            
  23041.  
  23042.  else
  23043.             {
  23044.               a.Qc = "Killing an unknown boss...";
  23045.  
  23046.               a.log(a.Qc);
  23047.  
  23048.               a.l(a.QC, null, false);
  23049.  
  23050.               if (a.h())
  23051.              
  23052.  
  23053.  {
  23054.                 break;
  23055.               }
  23056.  
  23057.               return;
  23058.             }
  23059.  
  23060.           }
  23061.  
  23062.         }
  23063.  
  23064.       }
  23065.  
  23066.     }
  23067.  
  23068.     label3638: a.Ke = true;
  23069.   }
  23070.  
  23071.   private boolean A()
  23072.   {
  23073.     if
  23074.  
  23075. (!a.xe)
  23076.     {
  23077.       a.uC = "Gains Prayer experience";
  23078.  
  23079.       a.gE = true;
  23080.  
  23081.       return false;
  23082.     }
  23083.  
  23084.     return true;
  23085.   }
  23086.  
  23087.   private boolean F()
  23088.   {
  23089.     if ((a.zB) && (a.nA) &&
  23090.  
  23091. (a.v != -1))
  23092.     {
  23093.       if ((a.nb == null) && (a.game.getCurrentTab() == 4) && (((a.k) && (a.HC == 1)) || ((a.Xd) && (a.HC == 2)) || ((a.IB) && (a.HC == 3) &&
  23094.  
  23095. (a.inventory.contains(a.Vc))))) {
  23096.         a.l(a.Vc, "Wield");
  23097.       }
  23098.  
  23099.       if (a.HC == 3)
  23100.       {
  23101.         if (a.Qb < 1)
  23102.         {
  23103.           a.iD = false;
  23104.  
  23105.           a.i(a.bb);
  23106.  
  23107.  
  23108.  
  23109.          return false;
  23110.         }
  23111.  
  23112.         if (a.SE.contains("runes to cast"))
  23113.         {
  23114.           a.l(a.IB ? a.Vc : a.eB, "Wield");
  23115.  
  23116.           if (a.pB > 0)
  23117.           {
  23118.        
  23119.  
  23120.     a.l(a.pB, "Wield");
  23121.           }
  23122.  
  23123.         }
  23124.  
  23125.         if ((!a.k()) && (a.F(a.Qb, "Autocast")))
  23126.         {
  23127.           a.sleep(400, 600);
  23128.         }
  23129.       }
  23130.       else if (a.HC ==
  23131.  
  23132. 1)
  23133.       {
  23134.         if (a.gB)
  23135.         {
  23136.           if ((a.SD == a.xD) || (a.SD == 3)) {
  23137.             a.SD = 1;
  23138.           }
  23139.  
  23140.           if ((a.combat.getFightMode() == a.xD) ||
  23141.  
  23142. (a.combat.getFightMode() == 3))
  23143.           {
  23144.             a.A(a.SD);
  23145.  
  23146.             a.sleep(400, 600);
  23147.           }
  23148.         }
  23149.         if (a.bc)
  23150.         {
  23151.           if ((a.gB) &&
  23152.  
  23153. ((a.PD == a.xD) || (a.PD == 3))) {
  23154.             a.PD = -1;
  23155.           }
  23156.           else
  23157.           {
  23158.             a.A(a.PD != -1 ? a.PD : a.SD);
  23159.           }
  23160.  
  23161.         }
  23162.         else
  23163.  
  23164.  
  23165.       {
  23166.           a.A(a.v);
  23167.         }
  23168.       }
  23169.     }
  23170.     return a.game.getCurrentTab() == 0;
  23171.   }
  23172.  
  23173.   private boolean l()
  23174.   {
  23175.     int i1;
  23176.     if (
  23177.       (i1 = a.inventory.getItemID
  23178.  
  23179. ("Law rune")) > 0) {
  23180.       if (a.inventory.getCount(new int[] { i1 }) > 2)
  23181.       {
  23182.         if (!a.F(40, "Cast")) {
  23183.           a.sleep(300, 600);
  23184.         }
  23185.  
  23186.         a.K(true);
  23187.  
  23188.  
  23189.  
  23190.       a.K(true);
  23191.         RSGroundItem localRSGroundItem;
  23192.         if (((localRSGroundItem = a.groundItems.getNearest(new int[] { 18829 })) != null) &&
  23193.           (a.l
  23194.  
  23195. (localRSGroundItem.getLocation(), false))) {
  23196.           return true;
  23197.         }
  23198.  
  23199.       }
  23200.  
  23201.     }
  23202.  
  23203.     return (a.G(false)) && (a.n());
  23204.   }
  23205. }
Advertisement
Add Comment
Please, Sign In to add comment