Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Desktop;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.Point;
- import java.awt.Polygon;
- import java.awt.Rectangle;
- import java.awt.RenderingHints;
- import java.awt.event.KeyEvent;
- import java.awt.event.KeyListener;
- import java.awt.event.MouseEvent;
- import
- java.awt.event.MouseListener;
- import java.awt.event.MouseMotionListener;
- import java.awt.image.BufferedImage;
- import java.io.BufferedWriter;
- import java.io.File;
- import
- java.io.FileInputStream;
- import java.io.FileWriter;
- import java.net.URI;
- import java.net.URL;
- import java.util.ArrayList;
- import
- java.util.ArrayList<Lcom.rarebot.script.wrappers.RSTile;>;
- import java.util.Collection;
- import java.util.Iterator;
- import java.util.Properties;
- import
- java.util.logging.Logger;
- import javax.imageio.ImageIO;
- import com.rarebot.event.events.MessageEvent;
- import com.rarebot.event.listeners.MessageListener;
- import
- com.rarebot.event.listeners.PaintListener;
- import com.rarebot.script.Script;
- import com.rarebot.script.ScriptManifest;
- import com.rarebot.script.methods.Calculations;
- import com.rarebot.script.methods.Camera;
- import com.rarebot.script.methods.Combat;
- import com.rarebot.script.methods.Combat.Prayer;
- import
- com.rarebot.script.methods.Environment;
- import com.rarebot.script.methods.Equipment;
- import com.rarebot.script.methods.Game;
- import
- com.rarebot.script.methods.Game.CHAT_MODE;
- import com.rarebot.script.methods.GroundItems;
- import com.rarebot.script.methods.Interfaces;
- import
- com.rarebot.script.methods.Inventory;
- import com.rarebot.script.methods.Menu;
- import com.rarebot.script.methods.Mouse;
- import com.rarebot.script.methods.NPCs;
- import
- com.rarebot.script.methods.Objects;
- import com.rarebot.script.methods.Players;
- import com.rarebot.script.methods.Skills;
- import com.rarebot.script.methods.Walking;
- import
- com.rarebot.script.util.Filter;
- import com.rarebot.script.util.Timer;
- import com.rarebot.script.wrappers.RSArea;
- import com.rarebot.script.wrappers.RSCharacter;
- import
- com.rarebot.script.wrappers.RSComponent;
- import com.rarebot.script.wrappers.RSGroundItem;
- import com.rarebot.script.wrappers.RSInterface;
- import
- com.rarebot.script.wrappers.RSItem;
- import com.rarebot.script.wrappers.RSModel;
- import com.rarebot.script.wrappers.RSNPC;
- import com.rarebot.script.wrappers.RSObject;
- import com.rarebot.script.wrappers.RSObject.Type;
- import com.rarebot.script.wrappers.RSObjectDef;
- import com.rarebot.script.wrappers.RSPlayer;
- import
- com.rarebot.script.wrappers.RSTile;
- @ScriptManifest(authors={"kiko"}, keywords={"Dungeoneering"}, name="iDungeon Pro", version=1.07D, description="The most advanced
- Dungeoneering script in existence")
- public class iDungeonPro extends Script
- implements KeyListener, MouseListener, MouseMotionListener, MessageListener, PaintListener
- {
- final Rectangle lf = new Rectangle(273, 397, 12, 12);
- private int re;
- private final int[] pe = { 54013, 54014, 54015, 54016 };
- private BufferedImage KG;
- private
- ArrayList<RSArea> aE = new ArrayList();
- private int iE;
- private int LE;
- final Rectangle qf = new Rectangle(380, 389, 20, 15);
- private int og;
- private final int[]
- wE = { 50240, 50241, 50242, 50243, 50244, 50245, 50246, 50247 };
- boolean xe = false;
- private final int[] Af = { 50323, 50324, 50325, 50326, 50327, 50328, 53968,
- 53969 };
- private ArrayList<RSTile> fG = new ArrayList();
- final Rectangle vg = new Rectangle(175, 344, 222, 17);
- private ArrayList<RSTile> ig = new ArrayList();
- private int bF = 0;
- private boolean nE;
- private final int[] jF = { 16295, 16361, 17490, 17678, 17754, 17794, 17796, 17883 };
- private final int Vg = 11007;
- private
- int Cg;
- private ArrayList<RSTile> AG = new ArrayList();
- private boolean Fg;
- private BufferedImage We;
- final Rectangle cf = new Rectangle(180, 396, 12, 12);
- final
- Rectangle ff = new Rectangle(95, 385, 140, 18);
- private final int[] eG = { 49522, 49523, 49524, 49528, 49529, 49530, 49534, 49535, 49536 };
- private int sg;
- private
- final int[] te = { 52206, 52207, 54282 };
- private ArrayList<RSTile> be = new ArrayList();
- private int[] VD = { 0, 0, 0, 0, 0, 0 };
- final Color Qf = new Color(0,
- 255, 0, 200);
- private final int[] WD = { 50342, 50343, 50344, 53948, 50346, 50347, 50348, 53949 };
- boolean kf = false;
- private final int[] kg = { 49656, 49657,
- 49658, 54308 };
- private boolean XF;
- private final String[] ME = { "Salve", "Wildercress", "Blightleaf", "Roseblood", "Bryll", "Duskweed", "Soulbell", "Ectograss",
- "Runic", "Spiritbloom", "Celestial" };
- private boolean Jg;
- private int Gg;
- private boolean JE;
- private String Xf = "00:00:00";
- private Point YF = new Point(0, 0);
- String ce = "";
- final Color IG = new Color(0, 0, 0, 110);
- private final int[] Yf = { 50272, 50273, 50274, 50287, 50288, 50289, 50299, 50300, 50301, 50308, 50309,
- 50310, 50317, 50318, 50319, 53951, 53960, 53963, 53966 };
- private boolean Ke;
- private final String[] ae = { "Novite", "Bathus", "Marmaros", "Kratonite", "Fractite",
- "Zephyrium", "Argonite", "Katagon", "Gorgonite", "Promethium", "Primal" };
- private String SE = "";
- private RSArea Sg;
- final Rectangle qF = new Rectangle(273, 419,
- 12, 12);
- final Rectangle Pf = new Rectangle(401, 344, 112, 19);
- private ArrayList<RSTile> vF = new ArrayList();
- private int[] lG;
- private final int[] QE = { 49688,
- 49690, 54287 };
- boolean dg = false;
- private int xD = 3;
- final Rectangle bE = new Rectangle(180, 418, 12, 12);
- private boolean gE;
- private final int[] TF = {
- 50224, 50225, 50226, 50227, 50228, 50229, 50230, 50231 };
- private final int[] nF = { 18218, 18220, 18222, 18224, 18226, 18228, 18230, 18232 };
- private boolean FF;
- private final int[] XE = { 49462, 50342, 50343, 50344, 53948, 50350, 50351, 50352, 53950 };
- private int yF;
- private boolean le = true;
- private final int[] rg = {
- 50332, 50333, 50334, 53971 };
- private int KE;
- private Point Xe = new Point(0, 0);
- final Rectangle[] df = new Rectangle[0];
- private boolean Je;
- private boolean BG
- = true;
- private final int[][] Cf = { a.Ve, a.hc, a.TF, a.Hb, a.wE, a.vd, a.ED, a.TA };
- final Color ZE = new Color(0, 180, 0, 80);
- Filter<RSNPC> jE = new n(a);
- private final int[] aF = { 10966, 10967, 10968, 12114 };
- private final int[] LG = { 50604, 51156, 51704, 54675, 56149 };
- final Rectangle Ag = new Rectangle(315, 390,
- 12, 12);
- private ArrayList<RSTile> ue = new ArrayList();
- final Rectangle Ye = new Rectangle(373, 397, 12, 12);
- boolean xF = false;
- private ArrayList<RSArea> ke =
- new ArrayList();
- private BufferedImage iG;
- private final String[] yf = { "Crawling hand", "Cave crawler", "Cave slime", "Pyrefiend", "Night spider", "Jelly",
- "Spiritual guardian", "Seeker", "Nechryael", "Edimmu", "Soulgazer" };
- private BufferedImage Hg;
- private int ZF;
- final Rectangle[] Sf = { a.gC, a.F, a.cf, a.bE,
- a.wc, a.WB };
- private int Zf;
- private final int zf = 18175;
- private int mf = 144;
- private int me;
- final Rectangle JG = new Rectangle(373, 375, 12, 12);
- private
- int UE;
- private double tE = 0.0D;
- final Rectangle ag = new Rectangle(495, 346, 18, 18);
- final Color wg = new Color(0, 255, 0, 130);
- private RSTile vE;
- private
- final int dF = 11226;
- private BufferedImage UF;
- private ArrayList<RSTile> Ee = new ArrayList();
- final Rectangle Pg = new Rectangle(465, 346, 18, 18);
- private
- BufferedImage OE;
- final Rectangle RE = new Rectangle(315, 413, 12, 12);
- final Rectangle lF = new Rectangle(193, 430, 12, 12);
- private final int[] Ve = { 50208,
- 50209, 50210, 50211, 50212, 50213, 50214, 50215 };
- private final int[] Lc = { 18314, 18316, 18318, 18320, 18322, 18324, 18326, 18328 };
- private String tc = "";
- private final int sd = 18163;
- private final int NC = 49341;
- private int wb;
- final Rectangle JD = new Rectangle(173, 375, 12, 12);
- private final int[] OB = { 10942,
- 10943, 10944, 10945, 10946, 10947, 10948, 10949, 10950, 10951, 10952, 10953, 12117, 12118, 12119, 12120 };
- private final String[] Md = { "2", "6", "9", "12", "15",
- "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",
- "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",
- "114", "115", "116", "117", "119", "121", "124", "129", "130", "131", "132", "137", "138", "142", "143", "144", "145", "148", "151", "156", "157", "158", "159", "160",
- "164", "166", "172" };
- private boolean gd;
- boolean BB = false;
- final Rectangle fD = new Rectangle(12, 437, 69, 16);
- boolean QC = false;
- private int RB;
- private
- 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,
- 13481, 13669, 13683, 13744, 13785, 14860 };
- private int eB;
- private ArrayList<Integer> ID = new ArrayList();
- private RSTile[] Wd;
- private int xB;
- private String[]
- Ec = a.ae;
- private boolean Od;
- private final int[] TB = { 11027, 11028, 11029, 11030, 11031, 11032, 11033, 11034, 11035 };
- private final int[] Xc = { 49507, 49508,
- 49509, 49510, 49511, 49512, 54261 };
- private int[] pb;
- private int yB;
- private final String oD = System.getProperty("user.home") + File.separator + "iDungeon";
- boolean Fb = true;
- private final int YC = 18159;
- private int bb;
- boolean Ed = true;
- private int qc;
- private int TC;
- private ArrayList<RSArea> cD = new ArrayList
- ();
- private int Ob;
- private final int Nb = 18173;
- private final int[] xC = { 10981, 10983, 10985, 10987, 10989, 10991, 10993, 10995, 10997, 10999 };
- final
- Rectangle gC = new Rectangle(373, 371, 12, 12);
- private boolean eC;
- final Rectangle mC = new Rectangle(33, 430, 12, 12);
- private boolean rb;
- private int pC;
- boolean gB = false;
- private int Wb;
- final Rectangle Ub = new Rectangle(121, 420, 20, 15);
- private final int[] vd = { 50248, 50249, 50250, 50251, 50252, 50253,
- 50254, 50255 };
- final Rectangle[] nB = { a.wA, a.aB, a.G, a.mC, a.fC, a.lF, a.Ag, a.RE };
- private String eb;
- boolean qD = false;
- private final String[][] sB = { {
- "full helm" }, { "platebody", "chainbody" }, { "kiteshield" }, { "platelegs", "plateskirt" }, { "gauntlets" }, { "boots" } };
- private final String[] PC = { "Forgotten
- warrior", "Forgotten ranger", "Zombie", "Skeleton", "Giant skeleton", "Hill giant" };
- private final int[] sb = { 49306, 49335, 49336, 49337, 49338, 49375, 49376,
- 49377, 49378, 49379, 49380, 49387, 49388, 49389, 49462, 49463, 49464, 49504, 49505, 49506, 49516, 49517, 49518, 49564, 49565, 49566, 49574, 49575, 49576, 49577, 49578,
- 49579, 49603, 49604, 49605, 49606, 49607, 49608, 49625, 49626, 49627, 49644, 49645, 49646, 49650, 49651, 49652, 49677, 49678, 49679, 53987, 53988, 53989, 53990, 53992,
- 54001, 54006, 54067, 54070, 54071, 54072, 54073, 54106, 54107, 54108, 54109, 54236, 54274, 54284, 54299, 54300, 54315, 54316, 54317, 54318, 54319, 54320, 54335, 54360,
- 54361, 54362, 54363, 54404, 54417, 54620, 55478, 55479, 55480, 55481, 56079, 56081, 56526, 56527, 56528, 56529 };
- private Timer hd;
- private final int oB = 10058;
- final Font Kb = new Font("Trebuchet MS", 0, 11);
- private boolean kC;
- private int[] UC;
- private int ac;
- private final int[] lC = { 49693 };
- final Color sc = new
- Color(0, 0, 0);
- boolean od = false;
- final Rectangle tC = new Rectangle(6, 427, 81, 31);
- private ArrayList<RSArea> ic = new ArrayList();
- boolean Pb = false;
- final
- Rectangle[] Jb = { a.JD, a.Mb, a.JG, a.Dc, a.lf, a.Ye, a.zd, a.qF, a.Cd };
- private final String[] Ad = { "Protoleather", "Subleather", "Paraleather", "Archleather",
- "Dromoleather", "Spinoleather", "Gallileather", "Stegoleather", "Megaleather", "Tyrannoleather", "Sagittarian" };
- private BufferedImage hb;
- private int xb = -1;
- final Color nd = new Color(0, 190, 255, 140);
- private final String jc = "1.07";
- private final int[] sC = { 49381, 49382, 49383, 54333 };
- private final int[] yb = {
- 11036, 11037, 11038, 11039, 11040, 11041, 11042, 11043, 11044, 12094, 12095, 12096 };
- int uB = 0;
- private int pd;
- final Rectangle[][] ZC = { a.nB, a.Jb, a.Sf, a.df
- };
- private ArrayList<RSTile> ob = new ArrayList();
- private boolean Sd;
- private boolean Xb;
- private BufferedImage rD;
- private int Zc = 6; private int dC = 6;
- private boolean Hc;
- private final int Gc = 17566;
- boolean vC = false;
- private boolean jD;
- private int CD;
- private int Ud = 0;
- private int Rc;
- private long dd =
- 0L;
- private String fd = "00:00:00";
- private String uC = "";
- private final int Jc = 17789;
- private int eD;
- int DC = 1;
- final Rectangle Mb = new Rectangle(273,
- 375, 12, 12);
- final Rectangle xd = new Rectangle(6, 363, 81, 32);
- private final int[] LD = { 35507, 35520, 35523, 35525, 35562, 35568, 35569, 35576 };
- private
- ArrayList<RSTile> fc = new ArrayList();
- private boolean iD;
- private final String[][] lB = { { "hood" }, { "robe top" }, { "" }, { "robe bottom" }, { "gloves" }, {
- "boots" } };
- final Rectangle wc = new Rectangle(420, 392, 12, 12);
- private int pc;
- private final int ed = 2;
- private BufferedImage Dd;
- final Color Cb = new Color
- (255, 0, 0, 130);
- Filter<RSNPC> Fd = new x(a);
- private int tB = 113;
- private final String[] VB = { "Tangle gum", "Seeping elm", "Blood spindle", "Utuku",
- "Spinebeam", "Bovistrangler", "Thigat", "Corpsethorn", "Entgallow", "Grave creeper", "Sagittarian" };
- private int Qb;
- private final int[] ED = { 50256, 50257, 50258,
- 50259, 50260, 50261, 50262, 50263 };
- final Font SB = new Font("Impact", 1, 13);
- private final String[] Cc = { "Forgotten warrior", "Forgotten mage", "Forgotten
- ranger", "Mysterious shade", "Dungeon spider", "Ghost", "Animated pickaxe", "Giant rat", "Giant bat", "Necromancer", "Thrower troll", "Hydra", "Cave crawler", "Guard
- dog", "Nechryael", "Hobgoblin", "Lesser demon", "Greater demon", "Mercenary leader", "Hellhound" };
- private ArrayList<RSTile> uc = new ArrayList();
- private final
- int[] CC = { 5, 10, 17, 30, 41, 52, 63, 71, 80, 90, 99 };
- final Rectangle aB = new Rectangle(113, 390, 12, 12);
- final Rectangle Ld = new Rectangle(367, 56, 100, 15);
- final Rectangle Rb = new Rectangle(425, 346, 18, 18);
- private final int oC = 17444;
- private ArrayList<RSArea> JB = new ArrayList();
- private final int[] Zb = {
- 54110, 54111, 54112, 54113 };
- private RSArea QB;
- private boolean jC;
- private String AB = "";
- private final int[] ab = { 50346, 50347, 50348, 53949 };
- Filter<RSNPC> xc = new j(a);
- private final int[] hc = { 50216, 50217, 50218, 50219, 50220, 50221, 50222, 50223 };
- boolean UB = true;
- private BufferedImage NB;
- private ArrayList<Integer> EB = new ArrayList();
- private final int[] Fc = { 39912, 39913, 39920, 39921, 39929, 39930, 39931 };
- private final int wB = 17489;
- private
- int vB;
- final Color Oc = new Color(255, 255, 255, 100);
- private int Pd;
- private int Gd = -1;
- final Rectangle WB = new Rectangle(180, 440, 12, 12);
- private int jB
- = 0;
- final Rectangle kB = new Rectangle(403, 440, 100, 18);
- private int[] vc;
- final Color bd = new Color(255, 255, 0, 180);
- private final int[] fB = { 18282,
- 18284, 18286, 18288, 18290, 18292, 18294, 18296 };
- private final int[] Lb = { 50350, 50351, 50352, 53950 };
- final Rectangle Cd = new Rectangle(373, 419, 12, 12);
- private ArrayList<RSTile> Tc = new ArrayList();
- private final int[] MD = { 18250, 18252, 18254, 18256, 18258, 18260, 18262, 18264 };
- private String[] PB;
- private
- final int[] AC = { 12167, 12165, 12171, 12169, 12173 };
- private int[] cB;
- private int mc;
- private BufferedImage gD;
- private final int[] mD = { 50278, 50279, 50280,
- 50305, 50306, 50307, 50314, 50315, 50316, 50329, 50330, 50331, 53953, 53962, 53965, 53970 };
- Filter<RSObject> cC = new e(a);
- private final int hD = 17415;
- private
- int SD = -1;
- private int Td;
- private int Vc;
- private boolean qB;
- boolean qC = false;
- private int Db;
- private BufferedImage Kd;
- Filter<RSNPC> bD = new h(a);
- private double Ab = 0.0D;
- private ArrayList<RSArea> Nc = new ArrayList();
- private int GC;
- final Color ub = new Color(255, 255, 255);
- private boolean MC;
- private
- boolean WC;
- private String Nd = "";
- private final int[] Gb = { 39991, 40002, 40003 };
- private final int[] ad = { 49398, 49400, 49402, 49404, 49422, 49424, 49426,
- 49428, 49446, 49448, 49450, 49452, 54344, 54346, 54348, 54350 };
- boolean Wc = false;
- final Rectangle Dc = new Rectangle(173, 397, 12, 12);
- private final int zb = 1;
- private final int kb = 18165;
- private ArrayList<RSTile> RD = new ArrayList();
- final Rectangle kc = new Rectangle(405, 346, 18, 18);
- private final String[] kD = {
- "Hobgoblin", "Icefiend", "Brute", "Necromancer", "Hill giant", "Soulgazer", "Seeker", "Ice troll", "Frost dragon", "Iron dragon", "Green dragon", "Guard dog", "Earth
- warrior", "Hellhound" };
- private final int vb = 18161;
- boolean Xd = false;
- private final int[] gb = { 49696, 49698, 49700, 53748 };
- private ArrayList<RSTile> id =
- new ArrayList();
- private int JC;
- private final int[] aC = { 17670, 17672, 17674, 17676, 17671, 18830, 18831, 18833, 18834 };
- private boolean GD;
- private int bC =
- -1;
- private String[][] wC = a.sB;
- final Rectangle qb = new Rectangle(403, 416, 100, 16);
- final Color Jd = new Color(255, 0, 255);
- private BufferedImage BC;
- private final int[] Yd = { 49615, 49616, 49617, 49618 };
- private final int yC = 18169;
- private final int[] OC = { 49320, 49321, 49322, 49323 };
- private final int Pc
- = 18177;
- final Rectangle oc = new Rectangle(7, 458, 100, 16);
- private String Qc = "Loading images...";
- private int Rd;
- final Color EC = new Color(255, 0, 0);
- private final int ib = 18171;
- private final int[] Hd = { 53124, 53125, 53126, 7528 };
- private final int rd = 18201; private final int dD = 18829;
- private final int
- [] Mc = { 40010, 40011, 54614 };
- private long HB = 999999L;
- private int BD;
- private int cc;
- String Bc = "";
- private Timer lc;
- final Rectangle Vb = new Rectangle
- (438, 437, 69, 16);
- private Timer HD;
- private final int[] Bb = { 49390, 49392, 49394, 49396, 49414, 49416, 49418, 49420, 49438, 49440, 49442, 49444, 54336, 54338,
- 54340, 54342 };
- private boolean md;
- private boolean kd = true;
- final Color Eb = new Color(160, 0, 160, 160);
- final Rectangle iC = new Rectangle(6, 395, 81, 32);
- Filter<RSNPC> CB = new f(a);
- private final int nC = 16295;
- private boolean zB;
- private final int[] mb = { 54237, 54238, 54239, 54240 };
- private final int[] tb = {
- 49278, 49279, 49276, 49277, 49274, 49275 };
- private boolean nc;
- boolean[] YB = { a.E, a.Ed, a.od, a.M, a.RC, a.dg };
- final Rectangle fC = new Rectangle(113, 430,
- 12, 12);
- private int rC;
- private int DD;
- private int ld = 1;
- private int sD;
- private String cd = "Unknown";
- private int ND;
- final Color MB = new Color(0, 0, 0,
- 200);
- private int Ic;
- private final int[] fb = { 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, 10964, 10965, 12121, 12122, 12123, 12124 };
- private int Sc;
- boolean[] yc = { a.k, a.Xd, a.IB, a.i, a.BB, a.vC, a.XC, a.Yb };
- private RSArea jb;
- private int pB;
- private boolean ZB = true;
- private int db;
- private final int hC = 3;
- private RSArea nb;
- boolean ec = false;
- private int PD = -1;
- private final int[] wd = { 54078, 54079, 54080, 54081 };
- private final
- String[] LC = { "Dungeon spider", "Cave crawler" };
- private final int[] DB = { 15707, 18817, 18818, 18819, 18820, 18821, 18822, 18823, 18824, 18825, 18826, 18827,
- 18828 };
- final Color Qd = new Color(255, 255, 255, 215);
- private boolean KD;
- private ArrayList<RSObject> zc = new ArrayList();
- private int SC;
- boolean dc = false;
- private boolean IC;
- private final int[] Id = { 50342, 50343, 50344, 53948 };
- private final int[] tD = { 50281, 50282, 50283, 50293, 50294, 50295, 50335, 50336,
- 50337, 53954, 53956, 53958, 53972 };
- private ArrayList<RSTile> gc = new ArrayList();
- Filter<RSGroundItem> lD = new w(a);
- private final int[] KC = { 18266, 18268,
- 18270, 18272, 18274, 18276, 18278, 18280 };
- private int[] Sb = { 0, 0, 0, 0, 0, 0 };
- private int zC;
- final Rectangle zd = new Rectangle(173, 419, 12, 12);
- private
- BufferedImage Uc;
- private final int[] OD = { 49406, 49408, 49410, 49412, 49430, 49432, 49434, 49436, 49454, 49456, 49458, 49460, 54352, 54354, 54356, 54358 };
- private boolean FD;
- final Font jd = new Font("Trebuchet MS", 0, 15);
- final Rectangle lb = new Rectangle(310, 389, 20, 15);
- private final int[] bB = { 49665, 49666,
- 49667, 54311 };
- private RSGroundItem yd = null;
- private int HC = 1;
- private final int iB = 12089;
- private BufferedImage VC;
- private boolean hB;
- private final int
- rB = 50552;
- final Color rc = new Color(180, 0, 0, 100);
- private int Vd;
- private final int[] Hb = { 50232, 50233, 50234, 50235, 50236, 50237, 50238, 50239 };
- private final int FC = 19650;
- private final int[] mB = { 49315, 49316, 49317, 49318 };
- private int aD;
- Filter<RSGroundItem> Zd = new t(a);
- private
- ArrayList<RSTile> Bd = new ArrayList();
- private int Ac;
- private String ud = "Unknown";
- private final int XB = 17363;
- private final int[] FB = { 18298, 18300,
- 18302, 18304, 18306, 18308, 18310, 18312 };
- private final int LB = 11246;
- private RSTile nD;
- boolean Yb = false;
- private RSArea Kc;
- boolean XC = true;
- boolean dB
- = false;
- private final int[] KB = { 49570, 49571, 49572, 54235 };
- private int pD;
- boolean IB = false;
- boolean RC = true;
- final Font cb = new Font("Arial", 1, 12);
- boolean qd = false;
- final Color QD = new Color(0, 0, 0, 225);
- private int[] Tb = { 0, 0, 0, 0, 0, 0 };
- private int td = 18;
- private ArrayList<RSTile> GB = new
- ArrayList();
- boolean bc = false;
- private BufferedImage Ib;
- private final int[] AD = { 39915, 39924, 39935, 54643 };
- private boolean NA;
- private RSTile QA;
- private Timer sA;
- private int RA;
- private int vA;
- private BufferedImage oA;
- private final String rA = a.oD.concat(File.separator + "iDPSettings.ini");
- private
- RSArea ZA;
- private final int SA = 11245;
- private boolean UA;
- private ArrayList<RSTile> qA = new ArrayList();
- int PA = -1;
- private int uA;
- final Color xA = new
- Color(255, 215, 0, 140);
- final Color YA = new Color(160, 0, 160, 100);
- private String[] yA = null;
- private String pA = "";
- boolean zA = false;
- private final int[]
- TA = { 50264, 50265, 50266, 50267, 50268, 50269, 50270, 50271 };
- private int OA;
- final Rectangle wA = new Rectangle(33, 390, 12, 12);
- private int tA;
- private
- boolean nA;
- private RSTile WA;
- private final int XA = 18167;
- boolean VA = false;
- private final String EA = a.oD.concat(File.separator + "iDPLogin.ini");
- String bA
- = "";
- private Timer KA;
- private int HA;
- private ArrayList<RSArea> lA = new ArrayList();
- final Color MA = new Color(160, 0, 160, 40);
- private int mA;
- private int
- IA;
- private RSArea FA;
- private final int[] gA = { 54241, 54242, 54243, 54244, 54245, 54246, 54247, 54248 };
- boolean iA = false;
- private RSNPC jA = null;
- private
- Timer hA;
- final Color cA = new Color(255, 255, 255, 150);
- private final String[][] LA = { { "coif" }, { "body" }, { "" }, { "chaps" }, { "vambraces" }, { "boots" }
- };
- Filter<RSNPC> CA = new a(a);
- private int AA;
- private int aA = 11;
- Filter<RSObject> dA = new z(a);
- private final int[] kA = { 18234, 18236, 18238, 18240, 18242,
- 18244, 18246, 18248 };
- private final int GA = 48496;
- private int JA;
- final Color DA = new Color(0, 0, 255, 150);
- final Color eA = new Color(160, 0, 160);
- private
- ArrayList<RSTile> fA = new ArrayList();
- boolean[] BA = { a.kf, a.ec, a.zA, a.VA, a.QC, a.xe, a.gB, a.bc, a.Fb };
- private final int[] P = { 18202, 18204, 18206,
- 18208, 18210, 18212, 18214, 18216 };
- private boolean N = true;
- final Rectangle V = new Rectangle(121, 389, 20, 15);
- private int[] W;
- private ArrayList<RSTile> w =
- new ArrayList();
- final Color R = new Color(0, 255, 0);
- private final int[][] x = { a.P, a.nF, a.kA, a.MD, a.KC, a.fB, a.FB, a.Lc };
- final Rectangle p = new
- Rectangle(310, 420, 20, 15);
- private final RSTile y = new RSTile(0, 0);
- private final int[] s = { 54419, 54420, 54421, 54422 };
- boolean[][] O = { a.yc, a.BA, a.YB
- };
- private int v = -1;
- private int t;
- private final String[] Y = { "Ice elemental", "Skeleton", "Giant skeleton", "Zombie", "Icefiend", "Giant bat", "Night spider",
- "Ice spider", "Spiritual guardian", "Ice giant", "Fire giant", "Thrower troll", "Ice troll", "Iron dragon", "Earth warrior", "Ice warrior" };
- private int n;
- final
- Rectangle o = new Rectangle(7, 458, 506, 16);
- final Rectangle S = new Rectangle(403, 395, 100, 16);
- private final int[] U = { 54190, 54191, 54192, 54193 };
- private
- int T;
- private final String[] u = { "Forgotten ranger", "Forgotten mage", "Mysterious shade", "Zombie", "Hydra", "Icefiend", "Animated book", "Skeleton", "Thrower
- troll", "Ice elemental", "Lesser demon", "Greater demon", "Necromancer", "Ghost" };
- private int q;
- private final int Z = 11010;
- final Rectangle Q = new Rectangle
- (445, 346, 18, 18);
- private RSArea r;
- private boolean X;
- private Timer z = new Timer(0L);
- private int K;
- private int f;
- final Rectangle A = new Rectangle(570,
- 235, 133, 12);
- int h = 1;
- private int L;
- final Color b = new Color(255, 255, 0);
- final Rectangle G = new Rectangle(193, 390, 12, 12);
- private ArrayList<RSTile> a
- = new ArrayList();
- final Color C = new Color(0, 0, 0, 180);
- boolean E = false;
- final Rectangle D = new Rectangle(380, 420, 20, 15);
- private ArrayList<RSTile> J =
- new ArrayList();
- boolean i = false;
- Filter<RSNPC> B = new p(a);
- private int e;
- private ArrayList<RSArea> l = new ArrayList();
- private final int[] I = { 54502,
- 54544, 54621 };
- final Rectangle m = new Rectangle(91, 344, 80, 17);
- private final int[] d = { 12125, 12126, 12127, 12128, 12129, 12130, 12131, 12132, 12133, 12134,
- 12135, 12136, 12137, 12138, 12139, 12140, 12141, 12142, 12143, 12144, 12145, 12146, 12147, 12148, 12149, 12150, 12151, 12152, 12153, 12154, 12155, 12156 };
- boolean M
- = true;
- final Rectangle H = new Rectangle(7, 344, 80, 17);
- private int g = 0;
- final Color j = new Color(0, 255, 0, 100);
- private final int[] c = { 10058, 11086,
- 11087, 11088, 11089, 11090, 11091, 11092, 11093, 11094, 11095, 11226 };
- boolean k = true;
- final Rectangle F = new Rectangle(180, 374, 12, 12);
- private String A
- (RSObject a)
- {
- if (a == null)
- return "";
- RSObjectDef localRSObjectDef;
- return (localRSObjectDef = a.getDef()) != null
- ? localRSObjectDef.getName()
- : "";
- }
- private boolean JC()
- {
- if (!a.zB)
- {
- return false;
- }
- int i1 = a.combat.getHealth(); int i2 = a.random(89, 93);
- if ((i1 < 1) || (i1 > i2))
- return false;
- int i3;
- int i4 = a.vc[i3]; int i5 = i2 - i3 * 3;
- if (i1 > i5) {
- return false;
- }
- if (a.inventory.contains(i4)) {
- return a.l
- (i4, "Eat");
- }
- i3++;
- return false;
- }
- private boolean i(int a)
- {
- if (a.HC == a) {
- return true;
- }
- int i1 = a.Vc; int i2 = a.eB;
- int i3 = i1;
- if (a != a.bb)
- {
- a.SA();
- i3 = i2;
- }
- if (!a.l(i3, "Wield")) {
- return false;
- }
- if ((a == 3) && (a.pB > 0) && (!a.l(a.pB, "Wield")))
- {
- return false;
- }
- a.HC = a;
- if (a == a.bb)
- {
- int i4 = a.v;
- a.SD = i4;
- }
- else if (a == 1)
- {
- a.SD = 1;
- }
- else if (a == 2)
- {
- a.SD = 1;
- }
- else if (a == 3)
- {
- a.SD = 4;
- a.F();
- }
- return true;
- }
- private void KC()
- {
- a.DA();
- a.w();
- }
- private
- ArrayList<RSTile> l(RSTile a, RSTile a, boolean a, int[] a)
- {
- ArrayList localArrayList1 = new ArrayList(); ArrayList localArrayList2 = new ArrayList();
- if ((a
- == null) || (a == null))
- {
- return localArrayList1;
- }
- a.be.clear();
- Object localObject1 = a; Object localObject2 = null;
- a.f();
- RSObject[]
- arrayOfRSObject;
- int i2 = (arrayOfRSObject = a.J(a)).length;
- int i3;
- RSTile[] arrayOfRSTile = arrayOfRSObject[i3]
- .getArea().getTileArray(); int i4 =
- arrayOfRSTile.length; int i5 = 0; RSTile localRSTile = arrayOfRSTile[i5];
- a.be.remove(localRSTile);
- i5++;
- i3++;
- a.be.remove(a);
- int i1 = 0; i2 = 0;
- localArrayList1.add(localObject1);
- while (!((RSTile)localObject1).equals(a))
- {
- double d1 = 99.989999999999995D;
- arrayOfRSTile = a.K((RSTile)
- localObject1); i4 = arrayOfRSTile.length; i5 = 0; localRSTile = arrayOfRSTile[i5];
- if (((a) && (a.calc.distanceBetween(localRSTile, a) == 1.0D)) ||
- (localRSTile.equals(a)))
- {
- localArrayList1.add(localRSTile);
- return a.a = localArrayList1;
- }
- double d2;
- if ((a.J(localRSTile, new
- int[0])) && (!localArrayList2.contains(localRSTile)))
- {
- d2 = a.calc.distanceBetween(localRSTile, a);
- if (d2 < d1)
- {
- localObject2 =
- localRSTile;
- d1 = d2;
- }
- }
- i5++;
- i1++;
- if ((localObject2 == null) || (i2 > 15))
- {
- return new ArrayList();
- }
- if
- (localObject2.equals(a))
- {
- localArrayList1.add(localObject2);
- localObject1 = localObject2;
- }
- else
- {
- arrayOfRSTile = a.K
- (localObject2); i4 = arrayOfRSTile.length; i5 = 0; localRSTile = arrayOfRSTile[i5];
- if ((a.J(localRSTile, new int[0])) && (!localArrayList2.contains
- (localRSTile)))
- {
- d2 = a.calc.distanceBetween(localRSTile, a);
- if (d2 < d1)
- {
- localArrayList1.add(localObject2);
- localObject1 = localObject2;
- break label439;
- }
- }
- i5++;
- label439: if (!((RSTile)localObject1).equals(localObject2))
- {
- arrayOfRSTile = a.K(localObject2); i4 = arrayOfRSTile.length; i5 = 0; localRSTile = arrayOfRSTile[i5];
- if (localArrayList2.contains(localRSTile))
- {
- localArrayList1.add(localObject2);
- localObject1 = localObject2;
- }
- else
- {
- i5++;
- }
- }
- localArrayList2.add(localObject2);
- }
- if (i1 > 30)
- {
- i2++;
- localArrayList1.clear();
- localObject1 = a;
- localObject2 = null;
- i1 = 0;
- }
- }
- return (ArrayList<RSTile>)(a.a = localArrayList1);
- }
- private boolean Rc()
- {
- return (a.Y().isInCombat()) && (!a.d());
- }
- private
- void K(boolean a)
- {
- a.l(a);
- if (a)
- if (a.npcs.getNearest(a.B) == null) {
- a.x();
- }
- else
- {
- a = false;
- }
- if ((a.Y
- ().isMoving()) || ((a) && (a.Y().getAnimation() != -1)))
- {
- if (a.AA()) {
- return;
- }
- a.KA = new Timer(0L);
- if (a.FA != null);
- a.sleep
- (150, 200);
- }
- }
- private boolean l(Combat.Prayer a)
- {
- int i1 = a.getIndex();
- if (a.interfaces.getComponent(271, 7).getComponents().length < 29)
- {
- i1
- -= 10;
- }
- return a.interfaces.getComponent(271, 7).getComponent(i1).getBackgroundColor() != -1;
- }
- private boolean Ec()
- {
- if (a.Ed)
- {
- a.AB =
- "Resetting prestige...";
- if (a.game.getCurrentTab() == 4)
- {
- if (a.inventory.containsOneOf(a.DB))
- {
- a.inventory.getItem(a.DB).doAction
- ("Open party interface");
- }
- }
- else if (a.interfaces.get(213).isValid()) {
- a.interfaces.getComponent(213, 5).doAction("Continue");
- }
- else if (a.interfaces.get(228).isValid()) {
- a.interfaces.getComponent(228, 2).doAction("Continue");
- }
- else
- {
- a.interfaces.getComponent
- (939, 87).doAction("Reset");
- }
- a.sleep(1000, 1400);
- a.ad();
- a.re += 1;
- a.JE = false;
- a.AB = "";
- return true;
- }
- a.log("Last
- floor reached, but prestiging is disabled! Shutting down script.");
- a.Od = false;
- return false;
- }
- private void F(Graphics a, Rectangle a)
- {
- a.fillRect(a.x,
- a.y, a.width, a.height);
- }
- private boolean A(RSTile a, String a)
- {
- return a.l(a, a.random(0.35D, 0.65D), a.random(0.35D, 0.65D), 0, a);
- }
- private void eB()
- {
- int i1 = 0;
- a.Qc = "Beginning a new dungeon!";
- if ((a.jA()) || (a.CA())) {
- return;
- }
- RSObject localRSObject = a.objects.getNearest(a.LG);
- if
- (a.M())
- {
- if (!a.C()) {
- return;
- }
- a.log("Exit ladder is null!");
- }
- else
- {
- i1++;
- }
- if (i1 > 10)
- {
- a.zB = false;
- return;
- }
- a.sleep(300, 500);
- if (a.E)
- {
- if (a.OA < a.td)
- {
- a.rb = true;
- if (a.Zc != a.ld)
- {
- a.nc = true;
- }
- }
- else
- {
- a.rb = false;
- if (!a.Ed)
- {
- a.Od = false;
- return;
- }
- if (a.Zc != a.dC)
- a.nc = true;
- }
- }
- if ((a.nc) || (!a.Od)) {
- return;
- }
- a.log("");
- a.log("Starting a new dungeon");
- a.T();
- a.walking.setRun(true);
- a.l(a.Vc, "Wield");
- a.N = false;
- if (a.jA())
- return;
- if (a.UA)
- {
- a.log("Reattempting to define the startroom area.");
- }
- a.sleep(500, 700);
- a.uA();
- a.jb =
- a.FA;
- RSComponent localRSComponent;
- if (((localRSComponent = a.interfaces.getComponent(519, 1))
- .isValid()) && (localRSComponent.getText().indexOf(":") >
- 0))
- {
- String str1 = localRSComponent.getText();
- String str2;
- if (Integer.parseInt(
- str2 = "" + str1.charAt(str1.indexOf(":") - 1)) < 7)
- {
- a.Zc = Integer.parseInt(str2);
- a.dC = a.Zc;
- }
- }
- else
- {
- if (!a.inventory.contains(18829)) { if (a.groundItems.getNearest(new int[] {
- 18829 }) == null);
- }
- else
- {
- a.Zc = 6;
- a.dC = 6; break label572;
- }
- if (a.J(new String[] { "Summoning obelisk" }) != null)
- {
- a.Zc = 6;
- a.dC = 6;
- }
- else if (a.J(new String[] { "Spinning wheel" }) != null)
- {
- a.Zc = 4;
- a.dC = 4;
- }
- else if
- (a.J(new String[] { "Runecrafting altar" }) != null)
- {
- a.Zc = 3;
- a.dC = 3;
- }
- else if (a.D(new int[] { 11226 }) != null)
- {
- a.Zc
- = 1;
- a.dC = 1;
- }
- }
- label572: if (!a.C())
- {
- return;
- }
- switch (localRSObject.getID())
- {
- case 51156:
- a.ud = "Frozen";
- if
- (a.bc)
- {
- if (a.Gd != -1)
- {
- a.log("Frozen floor, setting combat style to: Crush");
- a.SD = a.Gd;
- }
- else
- {
- a.SD = a.v;
- }
- }
- a.Sc = 145;
- break;
- case 50604:
- a.ud = "Abandoned";
- if (a.bc)
- {
- if (a.xb != -1)
- {
- a.log("Abandoned floor, setting combat style to: Slash");
- a.SD = a.xb;
- }
- else if (a.bC != -1)
- {
- a.log("Abandoned floor, setting
- combat style to: Stab");
- a.SD = a.bC;
- }
- else
- {
- a.SD = a.v;
- }
- }
- a.Sc = 209;
- break;
- case 51704:
- a.ud
- = "Furnished";
- if (a.bc) {
- if (a.xb != -1)
- {
- a.log("Furnished floor, setting combat style to: Slash");
- a.SD = a.xb;
- }
- else if (a.Gd != -1)
- {
- a.log("Furnished floor, setting combat style to: Crush");
- a.SD = a.Gd;
- }
- else
- {
- a.SD =
- a.v;
- }
- }
- a.Sc = 273;
- break;
- case 54675:
- a.ud = "Occult";
- if (a.xb != -1)
- {
- a.SD = a.xb;
- a.log("Occult floor,
- setting combat style to: Slash");
- }
- else if (a.bC != -1)
- {
- a.SD = a.bC;
- a.log("Occult floor, setting combat style to: Stab");
- }
- else
- {
- a.SD = a.v;
- }
- a.Sc = 3676;
- break;
- case 56149:
- while (0 != 0);
- a.ud = "Warped";
- a.Sc = 5467;
- default:
- a.log.severe("This floor type is not yet supported, returning to a lower floor.");
- a.nc = true;
- return;
- }
- a.r();
- a.VA();
- if (a.gE)
- {
- a.log.severe("Looks like a prayer door in the start room, trying another dungeon.");
- a.gE = true;
- a.aA();
- return;
- }
- a.KA = new Timer(0L);
- if
- (a.jA())
- return;
- if (a.dC != a.Zc) {
- a.log.severe("Complexity mismatch - selected: " + a.dC + ", actual: " + a.Zc);
- }
- if (!a.bc)
- {
- a.SD =
- a.v;
- }
- a.sA = new Timer(0L);
- if (a.Zc < 5) {
- a.MA();
- }
- a.camera.setPitch(100);
- if (a.Zc < 5) {
- a.MA();
- }
- a.A(true);
- if (a.VA) {
- a.game.openTab(6);
- }
- a.game.openTab(4);
- a.camera.setCompass('n');
- a.e();
- if (a.Zc > 4)
- {
- int i2 = -1; int i3 = 0;
- do
- {
- do {
- while (true)
- {
- a.AB = "Purchasing a toolkit";
- if (a.jA())
- {
- return;
- }
- a.l(a.Vc,
- "Wield");
- if (!a.inventory.contains(19650))
- break;
- a.D(true);
- a.inventory.getItem(new int[] { 19650 }).doClick(true);
- if ((i4 = 0) < 10)
- {
- a.sleep(100, 130);
- i4++;
- }
- }
- }
- while (a.l(true, 1, i2));
- if
- ((i4 = 0) >= 10)
- continue;
- a.sleep(60, 80);
- i4++;
- }
- while (!a.SE.contains("enough money"));
- i2 = -1;
- i3++;
- a.sleep(300,
- 500);
- int i4 = a.inventory.getCount(); int i5 = a.inventory.getCount(a.pb);
- int i7;
- if ((i3 > 1) || (i5 >= i4))
- {
- int[] arrayOfInt;
- int i6 = (arrayOfInt = a.vc).length; int i8 = arrayOfInt[i7];
- i2 = i8;
- i7++;
- }
- if ((i2 == -1) && (i3 > 2))
- {
- a.log("Unable to
- purchase a toolkit, trying a new floor.");
- if (a.UA)
- {
- a.env.saveScreenshot(false);
- }
- a.nc = true;
- return;
- }
- a.SE
- = "";
- a.AB = "";
- }
- a.Fg = true;
- }
- private boolean l(RSTile a, double a, double a, int a, String a)
- {
- int i1;
- Point localPoint;
- if ((localPoint =
- a.calc.tileToScreen(a, a, a, a)).x !=
- -1)
- {
- a.mouse.move(localPoint);
- if (a.l(a))
- {
- return true;
- }
- if (!a.Y().isMoving()) {
- if ((!a.contains("Use")) && (a.menu.contains("Use")))
- a.l(a, 1);
- else {
- i1 += 4;
- }
- }
- }
- else if (!a.Y().isMoving())
- {
- a.A(a, 1);
- }
- i1++;
- return false;
- }
- private RSTile[] h(RSTile a)
- {
- int i1 = a.getX(); int i2 = a.getY();
- return new RSTile[] { new RSTile(i1 + 1,
- i2), new RSTile(i1 - 1, i2), new RSTile(i1, i2 + 1), new RSTile(i1, i2 - 1) };
- }
- private boolean G(boolean a)
- {
- int i1 = 0;
- a.Hb();
- do
- {
- do
- do {
- while (true)
- {
- if ((a.Zc()) || (!a.DD()))
- {
- return false;
- }
- a.yd =
- a.groundItems.getNearest(new int[] { 18829 });
- if ((!a) || (a.yd == null))
- break;
- if (!a.l(a.yd))
- {
- continue;
- }
- a.K(false);
- }
- }
- while (a.jb == null); while (a.jb.contains(new RSTile[] { a.X() }));
- if (a.GA())
- {
- a.sleep(800, 1700);
- a.F(false);
- a.K(true);
- }
- if ((!a.jb.contains(new RSTile[] { a.X() })) && (a.d())) {
- a.sleep(2000, 4000);
- }
- if ((i1 == 0) || (a.Y().getAnimation() != -1)) continue; if (a.jb.contains(new RSTile[] { a.X() }))
- continue;
- a.sleep(600, 800);
- }
- while (((i1
- != 0) && (a.Y().getAnimation() != -1)) || (!a.F(24, "Cast")));
- i1 = 1;
- a.sleep(1100, 2500);
- a.game.openTab(4);
- a.K(true);
- a.uA();
- return true;
- }
- private RSItem[] jb()
- {
- return new RSItem[] { a.equipment.getItem(8), a.equipment.getItem(20), a.equipment.getItem(23), a.equipment.getItem(26),
- a.equipment.getItem(29), a.equipment.getItem(32) };
- }
- public void onRepaint(Graphics a)
- {
- ((Graphics2D)a).setRenderingHint(RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON);
- if (a.game.isLoggedIn())
- {
- a.setFont(a.jd);
- Iterator localIterator2;
- Object localObject1;
- Object
- localObject2;
- if ((a.M) && (a.zB) && (a.FA != null) && (a.r != null))
- {
- a.setColor(a.FA.equals(a.r) ? a.QD : a.IG);
- Iterator localIterator1;
- RSTile localRSTile1 = (RSTile)localIterator1.next();
- a.l(a, localRSTile1, 0.5D);
- a.setColor(a.Cb);
- localRSTile1 = (RSTile)localIterator1.next
- ();
- a.l(a, localRSTile1, 0.5D);
- if (a.ke.contains(a.r)) {
- a.setColor(a.xA);
- }
- else if ((a.jb != null) && (a.r.equals(a.jb)))
- a.setColor(a.nd);
- else if ((a.l.contains(a.r)) || ((a.nb != null) && (a.r.equals(a.nb)))) {
- a.setColor(a.Cb);
- }
- else if
- (a.ic.contains(a.r)) {
- a.setColor(a.Eb);
- }
- else if ((a.Ke) || (a.aE.contains(a.r)))
- {
- a.setColor(a.j);
- }
- else {
- a.setColor(a.DA);
- }
- localRSTile1 = (RSTile)localIterator1.next();
- a.l(a, localRSTile1, 0.5D);
- a.setColor(a.Qf);
- a.l(a, a.vE,
- 0.5D);
- a.setColor(a.bd);
- int i1;
- if ((a.cB != null) && (a.Wd != null))
- {
- int i4;
- if ((i4 = a.cB[i1] - 1) !=
- -1) {
- a.l(a, a.Wd[i4], 0.4D);
- }
- i1++;
- }
- for (localIterator2 = a.a.iterator(); localIterator2.hasNext(); )
- {
- if (!(localObject1 = (RSTile)localIterator2.next())
- .equals(a.vE))
- {
- a.l(a, (RSTile)localObject1, 0.3D);
- }
- }
- for
- (localIterator2 = a.fA.iterator(); localIterator2.hasNext(); ) { localObject1 = (RSTile)localIterator2.next();
- if ((a.calc.distanceBetween(a.X(), (RSTile)
- localObject1) < 17.0D) && (
- (localObject2 = a.G((RSTile)localObject1)) != null))
- {
- if (a.fG.contains(localObject1))
- {
- a.setColor(a.Jd);
- }
- else if ((a.vF.contains(localObject1)) || (a.gc.contains(localObject1)))
- {
- a.setColor(a.EC);
- }
- else if (a.w.contains(localObject1)) {
- a.setColor(a.R);
- }
- else
- {
- a.setColor(a.b);
- }
- RSTile[] arrayOfRSTile;
- int i7 = (arrayOfRSTile = ((RSObject)localObject2).getArea().getTileArray()).length; RSTile localRSTile2 =
- arrayOfRSTile[i8];
- a.l(a, localRSTile2, 0.5D);
- i8++;
- }
- }
- int i8;
- a.setColor(a.DA);
- for (localIterator2 =
- a.uc.iterator(); localIterator2.hasNext(); )
- {
- if (!(localObject1 = (RSTile)localIterator2.next())
- .equals(a.vE))
- {
- a.l
- (a, (RSTile)localObject1, 0.3D);
- }
- }
- }
- if (a.dg)
- {
- a.setColor(a.sc);
- a.F(a, a.oc);
- if (((a.nc) || (a.Qc.contains
- ("Entering D"))) && (a.game.getCurrentTab() != 4))
- {
- a.F(a, a.A);
- }
- if ((a.Qc.contains("next dungeon...")) || ((a.N) && (a.pC != 0) &&
- (a.jb == null))) {
- a.F(a, a.Ld);
- }
- }
- if (!a.iA)
- {
- if (a.o.contains(a.Xe))
- {
- a.setColor(a.sc);
- 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);
- }
- a.eb = (a.sA != null ? a.sA.toElapsedString() : "00:00:00");
- a.setColor(a.QD);
- if ((a.dc) && (a.uB != 1)) {
- a.fillRect(7, 363,
- 80, 95);
- }
- a.fillRect(87, 363, 426, 95);
- a.setColor(a.sc);
- if (a.Wc)
- {
- a.setColor(a.IG);
- }
- else if
- (a.o.contains(a.Xe))
- {
- a.setColor(a.MB);
- }
- a.F(a, a.o);
- a.setColor(a.cA);
- a.drawLine(6, 458, 512, 458);
- if ((a.UB)
- || (a.qD) || ((a.dc) && (a.uB == 1)))
- {
- a.drawLine(87, 363, 87, 457);
- a.drawLine(87, a.xd.y, 511, a.xd.y);
- }
- if ((a.UB) && (!
- a.dc))
- {
- double d1 = a.z.getElapsed();
- if ((a.nA) && (d1 != 0.0D))
- {
- a.ac = (a.skills.getCurrentExp(0) - a.CD);
- a.rC = (a.skills.getCurrentExp(2) - a.q);
- a.TC = (a.skills.getCurrentExp(1) - a.Rc);
- a.T = (a.skills.getCurrentExp(3) - a.ZF);
- a.sD =
- (a.skills.getCurrentExp(4) - a.xB);
- a.yB = (a.skills.getCurrentExp(6) - a.L);
- a.Vd = (a.skills.getCurrentExp(5) - a.pd);
- a.Db =
- (a.skills.getCurrentExp(20) - a.og);
- a.sg = (a.skills.getCurrentExp(14) - a.vB);
- a.Ac = (a.skills.getCurrentExp(11) - a.aD);
- a.GC =
- (a.skills.getCurrentExp(8) - a.K);
- a.mc = (a.skills.getCurrentExp(12) - a.Cg);
- a.UE = (a.skills.getCurrentExp(13) - a.RA);
- a.n =
- (a.skills.getCurrentExp(16) - a.Gg);
- a.wb = (a.skills.getCurrentExp(17) - a.db);
- a.t = (a.skills.getCurrentExp(23) - a.ND);
- a.Zf =
- (a.skills.getCurrentExp(15) - a.f);
- a.RB = (a.skills.getCurrentExp(22) - a.qc);
- a.AA = (a.skills.getCurrentExp(7) - a.pD);
- a.IA =
- (a.skills.getCurrentExp(10) - a.vA);
- a.KE = (a.skills.getCurrentExp(18) - a.e);
- a.LE = (a.skills.getCurrentExp(24) - a.JC);
- a.zC =
- (int)(3600000.0D / d1 * (a.ac + a.TC + a.rC + a.sD + a.yB + a.T + a.Vd));
- a.yF = (int)(3600000.0D / d1 * a.LE);
- a.HA = (int)(3600000.0D / d1 *
- (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));
- a.Ab = (Math.rint(3600000.0D / d1 * a.pC * 10.0D) /
- 10.0D);
- }
- if (a.h == 1)
- {
- a.setColor(a.QD);
- a.F(a, a.xd);
- a.setColor(a.iC.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.iC);
- a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.tC);
- a.setColor(a.Qd);
- a.draw3DRect(a.xd.x,
- a.xd.y, a.xd.width, a.xd.height, true);
- a.clearRect(a.xd.x + a.xd.width, a.xd.y + 1, 1, a.xd.height - 1);
- a.drawString("Total Time: " +
- a.z.toElapsedString(), 93, 380);
- a.drawString("Dung. Level: " + a.JA + " (+" + (a.JA - a.me) + ")", 93, 398);
- a.drawString("Exp Gained: " + a.LE,
- 93, 416);
- a.drawString("Exp per Hour: " + a.yF, 93, 434);
- a.drawString("Tokens Gained: " + a.Td, 93, 452);
- a.drawString("Dungeons
- Completed: " + a.pC, 295, 380);
- a.drawString("Floors per Hour: " + a.Ab, 295, 398);
- a.drawString("Dungeons Aborted: " + a.Ic, 295, 416);
- a.drawString("Total Deaths: " + a.Pd, 295, 434);
- a.drawString("Time to Level: " + a.XA(), 295, 452);
- }
- else if (a.h == 2)
- {
- localObject2 = "N/A";
- if (a.Rd == 1) {
- localObject2 = "Start";
- }
- else if (a.FF) {
- localObject2 =
- "Boss";
- }
- else if (a.Rd != 0)
- localObject2 = "" + a.Rd;
- a.setColor(a.xd.contains(a.Xe) ? a.C : a.MB);
- a.F(a,
- a.xd);
- a.setColor(a.QD);
- a.F(a, a.iC);
- a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.tC);
- a.setColor
- (a.Qd);
- a.draw3DRect(a.iC.x, a.iC.y, a.iC.width, a.iC.height, true);
- a.clearRect(a.iC.x + a.iC.width, a.iC.y + 1, 1, a.iC.height - 1);
- a.drawString("Floor Time: " + a.eb, 93, 380);
- a.drawString("Floor Type: " + a.ud, 93, 398);
- a.drawString("Floor Number: " + (a.Ud > 0 ?
- Integer.valueOf(a.Ud) : "??") + " (C" + a.Zc + ")", 93, 416);
- a.drawString("Current Room: " + (String)localObject2 + " (of " + a.Nc.size() + ")", 93, 434);
- a.drawString("Prestige Count: " + a.re, 93, 452);
- a.drawString("Progress: " + (a.g > 0 ? a.OA + " of " + a.g + " floors" : "Unknown"), 295, 380);
- a.drawString("Avg. Floor Time: " + a.tE + " mins", 295, 398);
- a.drawString("Fastest Dungeon: " + a.Xf, 295, 416);
- a.drawString("Slowest
- Dungeon: " + a.fd, 295, 434);
- a.drawString("Puzzles completed: " + a.uA, 295, 452);
- }
- else if (a.h == 3)
- {
- a.setColor
- (a.xd.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.xd);
- a.setColor(a.iC.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.iC);
- a.setColor
- (a.QD);
- a.F(a, a.tC);
- localObject2 = "";
- if (a.HC == 1)
- {
- if ((a.ac > 0) && (a.TC > 0))
- localObject2 = "Controlled";
- else if (a.TC > 0)
- {
- localObject2 = "Defensive";
- }
- else if (a.ac > 0) {
- localObject2 = "Accurate";
- }
- else if (a.rC > 0)
- {
- localObject2 = "Aggressive";
- }
- else
- {
- localObject2 = "Unknown";
- }
- }
- else if (a.HC == 2) {
- localObject2 = a.TC > 0
- ? "Longrange" : "Ranged";
- }
- a.setColor(a.Qd);
- a.draw3DRect(a.tC.x, a.tC.y, a.tC.width, a.tC.height, true);
- a.clearRect
- (a.tC.x + a.tC.width, a.tC.y + 1, 1, a.tC.height - 1);
- a.drawString("Cb Style: " + (String)localObject2, 93, 380);
- a.drawString("Cb exp/hr: " +
- a.zC, 93, 398);
- a.drawString("Prayer gain: " + a.Vd, 93, 416);
- a.drawString("Skills exp/hr: " + a.HA, 93, 434);
- a.drawString("Total
- exp/hr: " + (a.zC + a.yF + a.HA), 93, 452);
- }
- a.setFont(a.cb);
- a.setColor(a.Qd);
- a.drawString("Overview", 20, 384);
- a.drawString("Dungeons", 18, 415);
- a.drawString("Misc.", 33, 446);
- a.setColor(a.MB);
- a.fillRect(7, 361, 80, 2);
- }
- else if
- (a.H.contains(a.Xe))
- {
- a.setColor(a.sc);
- a.setFont(a.cb);
- a.drawString("Statistics", 21, 358);
- a.setFont(a.jd);
- a.setColor(a.C);
- }
- else
- {
- a.setColor(a.QD);
- }
- a.F(a, a.H);
- if (a.qD)
- {
- a.setColor(a.MB);
- a.fillRect(91, 361, 80, 2);
- }
- else if (a.m.contains(a.Xe))
- {
- a.setColor(a.sc);
- a.setFont(a.cb);
- a.drawString("Options",
- 110, 358);
- a.setFont(a.jd);
- a.setColor(a.C);
- }
- else
- {
- a.setColor(a.QD);
- }
- a.F(a, a.m);
- int i2;
- if ((a.qD) || ((a.dc) && (a.uB < 2)))
- {
- if (a.O[a.DC][i2] != 0)
- {
- if (a.ZC[a.DC][i2].contains(a.Xe)) {
- a.setColor
- (a.ZE);
- }
- else
- {
- a.setColor(a.wg);
- }
- }
- else if (a.ZC[a.DC][i2].contains(a.Xe)) {
- a.setColor(a.rc);
- }
- else
- {
- a.setColor(a.Cb);
- }
- a.F(a, a.ZC[a.DC][i2]);
- a.setColor(a.Qd);
- 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);
- i2++;
- }
- if ((a.qD) || (a.uB == 1))
- {
- if (a.DC == 1)
- {
- a.setColor(a.QD);
- a.F(a, a.xd);
- a.setColor(a.iC.contains(a.Xe) ? a.C : a.MB);
- a.F(a,
- a.iC);
- a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.tC);
- a.setColor(a.Qd);
- a.draw3DRect(a.xd.x, a.xd.y,
- a.xd.width, a.xd.height, true);
- a.clearRect(a.xd.x + a.xd.width, a.xd.y + 1, 1, a.xd.height - 1);
- a.drawString("Bones", 190, 387);
- a.drawString("Arrows", 290, 387);
- a.drawString("Heim crabs", 390, 387);
- a.drawString("Prayers", 190, 409);
- a.drawString("Quick pray",
- 290, 409);
- a.drawString("Pray doors", 390, 409);
- a.drawString("Pure mode", 190, 431);
- a.drawString("Style swap", 290, 431);
- a.drawString("Occult floors", 390, 431);
- a.setColor(a.ub);
- a.drawString("Pickup:", 118, 387);
- a.drawString("Prayer:", 118, 409);
- a.drawString("Other:", 123, 431);
- }
- else if (a.DC == 2)
- {
- a.setColor(a.xd.contains(a.Xe) ? a.C : a.MB);
- a.F(a,
- a.xd);
- a.setColor(a.QD);
- a.F(a, a.iC);
- a.setColor(a.tC.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.tC);
- a.setColor
- (a.Qd);
- a.draw3DRect(a.iC.x, a.iC.y, a.iC.width, a.iC.height, true);
- a.clearRect(a.iC.x + a.iC.width, a.iC.y + 1, 1, a.iC.height - 1);
- a.setColor(a.MA);
- a.fillRect(124, 403, 19, 19);
- a.fillRect(310, 403, 19, 19);
- a.fillRect(380, 403, 22, 19);
- a.setColor
- (a.cA);
- a.draw3DRect(124, 403, 19, 19, true);
- a.draw3DRect(310, 403, 19, 19, true);
- a.draw3DRect(380, 403, 22, 19, true);
- a.setColor(a.ub);
- a.drawString("Complexity:", 93, 382);
- a.drawString("Rush Settings:", 270, 382);
- a.drawString("" + a.dC, 130, 418);
- a.drawString("" + a.ld, 316, 418);
- a.drawString("" + a.td, a.td < 10 ? 387 : 383, 418);
- a.setColor(a.Qd);
- a.drawString
- ("Enabled", 391, 383);
- a.drawString("Prestige", 197, 386);
- a.drawString("Medium", 197, 408);
- a.drawString("Debug", 197, 430);
- a.drawString("Recording", 197, 452);
- a.drawString("Complexity", 280, 452);
- a.drawString("To floor", 365, 452);
- a.drawString("Grab
- food", 436, 404);
- a.drawImage(a.V.contains(a.Xe) ? a.OE : a.Dd, 124, 387, null);
- a.drawImage(a.Ub.contains(a.Xe) ? a.iG : a.gD, 124, 422, null);
- a.drawImage(a.lb.contains(a.Xe) ? a.OE : a.Dd, 310, 387, null);
- a.drawImage(a.p.contains(a.Xe) ? a.iG : a.gD, 310, 422, null);
- a.drawImage(a.qf.contains(a.Xe) ? a.OE : a.Dd, 381, 387, null);
- a.drawImage(a.D.contains(a.Xe) ? a.iG : a.gD, 381, 422, null);
- }
- else if
- ((a.DC == 3) && (!a.dc))
- {
- a.setColor(a.xd.contains(a.Xe) ? a.C : a.MB);
- a.F(a, a.xd);
- a.setColor(a.iC.contains(a.Xe) ? a.C :
- a.MB);
- a.F(a, a.iC);
- a.setColor(a.QD);
- a.F(a, a.tC);
- a.setColor(a.ub);
- a.drawString("Loot item:", a.ff.x, a.ff.y
- - 5);
- a.setColor(a.MA);
- a.F(a, a.ff);
- a.setColor(a.Qd);
- a.draw3DRect(a.tC.x, a.tC.y, a.tC.width, a.tC.height, true);
- a.clearRect(a.tC.x + a.tC.width, a.tC.y + 1, 1, a.tC.height - 1);
- a.drawString("You'll need an extra bound item slot to use this feature.", a.ff.x,
- a.ff.y + 35);
- a.drawString("Type in the item name (case-insensitive) you wish to look for.", a.ff.x, a.ff.y + 50);
- a.l(a, a.ff);
- if
- ((a.ce.isEmpty()) && (a.PA != 0))
- {
- a.setColor(a.Oc);
- a.drawString("Item name", a.ff.x + 4, a.ff.y + 14);
- }
- else
- {
- a.drawString(a.PA == 0 ? a.ce + "_" : a.ce, a.ff.x + 4, a.ff.y + 15);
- }
- }
- a.setFont(a.cb);
- a.setColor(a.Qd);
- a.drawString("General", 23, 383);
- a.drawString("Complexity", 15, 415);
- if (!a.dc) {
- a.drawString("Extras", 28,
- 447);
- }
- }
- if (a.dc)
- {
- a.setFont(a.jd);
- if (a.uB > 0)
- {
- if (a.fD.contains(a.Xe))
- {
- a.setColor(a.QD);
- a.drawString("Back", 31, 450);
- a.setColor(a.Eb);
- }
- else
- {
- a.setColor
- (a.YA);
- }
- a.F(a, a.fD);
- a.setColor(a.Qd);
- a.draw3DRect(a.fD.x, a.fD.y, a.fD.width, a.fD.height, true);
- a.setColor(a.ub);
- a.drawString("Back", 32, 451);
- }
- if (a.Vb.contains(a.Xe))
- {
- a.setColor(a.QD);
- a.drawString("Continue", 442, 450);
- a.setColor(a.Eb);
- }
- else
- {
- a.setColor(a.YA);
- }
- a.F(a, a.Vb);
- a.setColor(a.Qd);
- a.draw3DRect(a.Vb.x, a.Vb.y, a.Vb.width, a.Vb.height, true);
- a.setColor(a.ub);
- a.drawString("Continue", 443, 451);
- if (a.uB == 0)
- {
- a.setColor(a.ub);
- a.drawString("Choose your primary combat style", 15, 382);
- a.drawString("Choose your
- secondary combat style", 15, 422);
- a.drawString("Settings options:", 300, 382);
- a.setColor(a.Qd);
- a.drawString("Melee", 50, 402);
- a.drawString("Range", 130, 402);
- a.drawString("Magic", 210, 402);
- a.drawString("Melee", 50, 442);
- a.drawString("Range", 130,
- 442);
- a.drawString("Magic", 210, 442);
- a.drawString("Load settings on start", 333, 402);
- a.drawString("Save them for next time", 333,
- 425);
- }
- else if (a.uB == 2)
- {
- if (a.IB)
- {
- a.setColor(a.ub);
- a.drawString("Wield your staff
- and/or blastbox to use.", 15, 380);
- a.drawString("Then turn the spell you want to use to autocast.", 15, 395);
- if (a.k())
- {
- if (
- (i2 = a.kA()) > 0)
- {
- a.Qb = i2;
- }
- a.setColor(a.Qd);
- a.drawString("Spell selected: " + a.Qb, 15, 415);
- }
- }
- else if (a.Xd)
- {
- a.setColor(a.ub);
- a.drawString("Bind and wield the arrows you would like to use.", 15, 380);
- }
- else
- {
- a.uB = (++a.uB);
- }
- }
- else if (a.uB == 3)
- {
- if (a.i)
- {
- String str1 = "";
- a.setColor(a.ub);
- if (a.k)
- {
- a.drawString("You'll need a secondary crush weapon for this mode.", 15, 380);
- a.drawString("Right click the item and select
- 'Use'.", 15, 395);
- }
- else
- {
- a.drawString("Select your backup Melee weapon.", 15, 380);
- a.drawString("Right click the item and select 'Use'.", 15, 395);
- }
- if (a.game.getCurrentTab() == 4)
- {
- if
- ((localObject1 = a.inventory.getSelectedItem()) != null)
- {
- a.eB = ((RSItem)localObject1).getID();
- str1 = a.l((RSItem)
- localObject1);
- }
- }
- if (a.eB > 0)
- {
- a.setColor(a.Qd);
- a.drawString("Secondary
- Weapon: " + (!str1.isEmpty() ? str1 : Integer.valueOf(a.eB)), 15, 415);
- }
- }
- else if (a.vC)
- {
- a.setColor
- (a.ub);
- a.drawString("You'll need a filled blastbox or combat runes to use secondary magic.", 15, 380);
- a.drawString("Autocast the spell to
- use, then return the items to your inventory.", 15, 395);
- if (a.k())
- {
- int i3;
- if ((i3 = a.kA()) > 0) {
- a.Qb = i3;
- }
- if (a.game.getCurrentTab() == 4)
- {
- int i5 = a.inventory.getItemID("staff (b)");
- int i6;
- if ((i6 = a.inventory.getItemID("blastbox (b)")) ==
- -1) {
- i6 = a.inventory.getItemID
- ("surgebox (b)");
- }
- if (i6 > 0) {
- a.pB = i6;
- }
- if (i5 > 0)
- {
- a.eB = i5;
- }
- }
- a.setColor(a.Qd);
- a.drawString("Spell selected: " + a.Qb + ", Staff: " +
- ((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);
- }
- }
- else if (a.BB)
- {
- RSItem localRSItem = null;
- String str2 = "";
- a.setColor(a.ub);
- a.drawString("BIND the bow and arrows you would like to use.", 15, 380);
- a.drawString("Equip the arrows and leave the bow in your inventory.",
- 15, 395);
- a.drawString("Right click the bow and select 'Use'.", 15, 410);
- if (a.game.getCurrentTab() == 4) {
- localRSItem =
- a.inventory.getSelectedItem();
- }
- if (localRSItem != null)
- {
- a.eB = localRSItem.getID();
- str2 =
- a.l(localRSItem);
- }
- if (a.eB > 1) {
- a.drawString("Secondary Weapon: " + str2, 15, 425);
- }
- }
- else
- {
- a.uB = (++a.uB);
- }
- }
- else if (a.uB == 4)
- {
- a.setColor(a.ub);
- a.drawString
- ("Be sure to bind and wield the primary weapon you would like to use.", 15, 380);
- a.drawString("Leave any unbound armor in your inventory.", 15, 395);
- a.drawString("Then press continue to finish the settings.", 15, 421);
- }
- a.setColor(a.QD);
- a.fillRect(175, 361, 222, 2);
- }
- a.setColor(a.vg.contains(a.Xe) ? a.MB : a.QD);
- a.F(a, a.vg);
- if (a.vg.contains(a.Xe))
- {
- a.setColor(a.sc);
- if (!a.dc)
- {
- if ((!a.Pf.contains(a.Xe)) || (a.pA.isEmpty()))
- {
- if ((a.AB.isEmpty()) || (!a.ZB))
- {
- a.drawString(a.Qc,
- 181, 358);
- }
- else
- {
- a.drawString("+ " + a.AB, 181, 358);
- }
- }
- else
- {
- a.drawString(a.pA, 181, 358);
- }
- }
- else {
- a.drawString(a.Nd, 181, 358);
- }
- }
- a.setColor
- (a.eA);
- a.setFont(a.cb);
- a.drawString("Statistics", 20, 357);
- a.drawString("Options", 109, 357);
- if (!a.dc)
- {
- if
- ((a.pA.isEmpty()) || (!a.Pf.contains(a.Xe)))
- {
- a.setColor(a.wg);
- a.drawString("+ " + a.AB, 180, 357);
- }
- else
- {
- a.setColor(a.EC);
- a.drawString(a.pA, 180, 357);
- }
- }
- else
- a.drawString(a.Nd, 180, 357);
- a.setColor(a.eA);
- if (!a.le)
- {
- a.setFont(a.Kb);
- a.drawString("v1.07", 484, 455);
- }
- a.setFont(a.jd);
- a.drawString((a.bF != 0 ?
- "Highscores rank: " + a.bF + " || " : "") + (a.jB != 0 ? a.jB + " users online || " : "") + "by kiko & ShadowMoose", 91 + a.mf + a.tB, 471);
- }
- a.setColor
- (a.QD);
- a.setFont(a.SB);
- a.F(a, a.Pf);
- if (a.Pf.contains(a.Xe))
- {
- if (!a.qd)
- {
- a.drawImage(a.kc.contains(a.Xe) ? a.Ib :
- a.Kd, a.kc.x, a.kc.y, null);
- }
- else {
- a.drawImage(a.kc.contains(a.Xe) ? a.VC : a.KG, a.kc.x, a.kc.y, null);
- }
- a.drawImage
- (a.Rb.contains(a.Xe) ? a.Uc : a.oA, a.Rb.x, a.Rb.y, null);
- a.drawImage(a.Q.contains(a.Xe) ? a.hb : a.UF, a.Q.x, a.Q.y, null);
- a.drawImage(a.Pg.contains
- (a.Xe) ? a.BC : a.We, a.Pg.x, a.Pg.y, null);
- }
- else
- {
- a.drawImage(a.Hg, a.Pf.x, a.Pf.y, null);
- }
- a.drawImage(a.ag.contains(a.Xe) ? a.rD
- : a.NB, a.ag.x, a.ag.y, null);
- }
- }
- private boolean Hb()
- {
- return (a.combat.isPoisoned()) && (a.inventory.contains(17566)) && (a.F(a.LC) == null) && (a.l
- (17566, "Drink"));
- }
- private void kD()
- {
- if (a.PB != null)
- {
- String[] arrayOfString;
- int i1 = (arrayOfString = a.PB).length;
- int i2;
- String str;
- int i3;
- int i5;
- if ((
- (str = arrayOfString[i2]) != null) && (!str.isEmpty()) && ((i3 = a.inventory.getItemID(str)) > 0))
- {
- RSItem localRSItem = a.inventory.getItem(new int[] { i3 });
- int i4 = a.F(str);
- if ((localRSItem != null) && (i4 > 0))
- {
- if ((a.l(str,
- a.wC[i5])) && (i4 > a.Sb[i5]) && (a.l(i3, "Wear")))
- {
- a.Sb[i5] = i4;
- }
- i5++;
- }
- }
- i2++;
- a.PB = new String
- [a.Sb.length];
- }
- }
- private void Tb()
- {
- if (a.Yb)
- {
- try
- {
- BufferedWriter localBufferedWriter = new BufferedWriter(new FileWriter(a.rA));
- a.O[0][7] = 0;
- int i1;
- int i2;
- localBufferedWriter.write("" + i1 + i2 + "=" + a.O[i1][i2]);
- localBufferedWriter.newLine();
- i2++;
- i1++;
- localBufferedWriter.close();
- }
- catch (Exception localException1)
- {
- a.log.severe("Error saving settings");
- }
- }
- }
- private void ad()
- {
- RSComponent localRSComponent;
- if ((localRSComponent = a.interfaces.getComponent(939, 83))
- .isValid())
- {
- a.OA =
- Integer.parseInt(localRSComponent.getText().trim());
- a.Ud = (a.OA + 1);
- }
- else if ((localRSComponent = a.interfaces.getComponent(933, 240))
- .isValid())
- {
- try
- {
- a.OA = Integer.parseInt(localRSComponent.getText().replace("Floor ", "").replace(":", ""));
- a.Ud = (a.OA + 1);
- }
- catch
- (Exception localException)
- {
- if (a.UA)
- a.log(localException);
- }
- }
- a.g = ((a.skills.getRealLevel(24) + 1) / 2);
- a.JA =
- a.skills.getRealLevel(24);
- if (a.g > 35)
- if ((!a.kd) || (!a.Fb))
- {
- a.g = 35;
- }
- else if (a.g > 47)
- {
- a.g = 47;
- }
- if
- ((!a.nA) && (a.g < 18))
- {
- a.td = a.g;
- }
- }
- private boolean rb()
- {
- a.uA();
- Object localObject1 = null;
- if ((a.FA != null) && (a.r != null) && (!
- a.FA.equals(a.r)))
- {
- if (a.Zc())
- {
- return false;
- }
- if (a.nb != null) if (a.nb.contains(new RSTile[] { a.X() }))
- {
- a.l
- (a.nb);
- a.FF = true;
- return false;
- }
- if (a.nD != null) if ((a.FA.contains(new RSTile[] { a.nD })) && ((a.Fg) || (a.AB.contains("dead
- end")))) {
- return false;
- }
- if ((a.Qc.contains("Teleporting")) && (a.jb != null)) if (a.jb.contains(new RSTile[] { a.X() }))
- return false;
- if (a.nD != null) if (a.FA.contains(new RSTile[] { a.nD }))
- {
- localObject1 = a.nD; break label373;
- }
- for (Object localObject2 =
- a.fA.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject2).next();
- if ((a.FA.contains(new RSTile[] { localRSTile
- })) && (a.calc.distanceBetween(localRSTile, a.r.getNearestTile(localRSTile)) < 2.0D))
- {
- localObject1 = localRSTile;
- break;
- }
- }
- RSTile localRSTile;
- if (localObject1 == null)
- {
- for (localObject2 = a.fc.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile = (RSTile)
- ((Iterator)localObject2).next();
- if ((a.FA.contains(new RSTile[] { localRSTile })) && (a.calc.distanceBetween(localRSTile, a.r.getNearestTile(localRSTile)) <
- 2.0D))
- {
- localObject1 = localRSTile;
- break;
- }
- }
- }
- label373: if (localObject1 == null)
- {
- return
- false;
- }
- a.log("Correcting an accidental backtrack");
- if (a.AB.contains("monsters"))
- {
- a.Ic();
- }
- if (localObject1 != null)
- {
- if (a.Zc()) {
- return true;
- }
- localObject2 = a.G((RSTile)localObject1);
- if (a.l((RSObject)localObject2))
- {
- a.K
- (true);
- }
- a.sleep(400, 600);
- a.uA();
- }
- }
- return false;
- }
- private void D(RSNPC a)
- {
- if (a != null)
- {
- String str =
- a.getName();
- if ((a.bC != -1) && (a.l(str, a.kD)))
- {
- a.PD = a.bC;
- }
- else if ((a.xb != -1) && (a.l(str, a.Cc)))
- {
- a.PD = a.xb;
- }
- else if ((a.Gd != -1) && (a.l(str, a.Y)))
- {
- a.PD = a.Gd;
- }
- else
- a.PD = -1;
- }
- }
- private boolean Ic()
- {
- String str = a.AB;
- a.AB = "Om nom nom!";
- if (!a.AB.equals(str))
- {
- a.AB = str;
- return true;
- }
- return false;
- }
- private void Qd()
- {
- RSNPC localRSNPC1 = a.i
- (new String[] { "Rammernaut" });
- RSNPC localRSNPC2 = a.i(new String[] { "Stomp" });
- RSNPC localRSNPC3 = a.i(new String[] { "Riftsplitter" });
- RSNPC
- localRSNPC4 = a.i(new String[] { "Lexicus" });
- RSNPC localRSNPC5 = a.i(new String[] { "Khighorahk" });
- a.l(a.UC, 50, 60);
- Object localObject1;
- int i2;
- int i5;
- int i6;
- Object localObject7;
- Object localObject8;
- int i4;
- if ((a.tc.equals("Rammernaut")) || (localRSNPC1 != null))
- {
- localObject1 =
- null;
- i2 = 0;
- a.Qc = "Killing Rammernaut!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Rammernaut";
- }
- a.l(a.QC,
- Combat.Prayer.PROTECT_FROM_MELEE, true);
- if ((!a.iD) || (!a.i(3)))
- {
- a.PD = a.bC;
- }
- if (a.jA())
- {
- return;
- }
- if
- (localRSNPC1 != null)
- {
- if ((localRSNPC1.getMessage() != null) && (localObject1 != null) && (((String)localObject1).equals(localRSNPC1.getMessage())))
- {
- i2 = 0;
- }
- else
- {
- localObject1 = localRSNPC1.getMessage();
- i2 = 1;
- }
- if ((i2 != 0) && (localObject1 !=
- null) && (((String)localObject1).contains("CHAA")))
- {
- a.AB = "Running for cover!";
- RSObject[] arrayOfRSObject1;
- i5 =
- (arrayOfRSObject1 = a.J(new int[] { 51762 })).length; if ((i6 = 0) < i5)
- {
- if (
- (localObject7 = arrayOfRSObject1[i6]) != null)
- {
- localObject8 = ((RSObject)localObject7).getLocation();
- a.vE = ((RSTile)localObject8);
- }
- i6++;
- }
- if (a.vE != null)
- {
- a.l(a.vE, 1);
- if ((i4 = 0) < 10)
- {
- if (!a.JC())
- {
- a.sleep(400,
- 600);
- }
- i4++;
- }
- if ((i4 = 0) < 20)
- {
- a.sleep(200, 300);
- if ((localRSNPC1 == null)
- || (localRSNPC1.getMessage() == null))
- {
- i4++;
- }
- }
- }
- a.AB = "";
- }
- else if
- (localRSNPC1.getAnimation() == 13705)
- {
- a.JC();
- }
- else if ((a.calc.distanceTo(localRSNPC1) < 3) && (!a.Y().isInCombat()) && (!
- localRSNPC1.isInCombat()))
- {
- a.A(a.FA.getCentralTile(), 3);
- }
- a.i(localRSNPC1);
- a.l(a.UC, 50, 0);
- }
- a.sleep(100, 200);
- }
- else
- {
- int[][] arrayOfInt1;
- RSTile localRSTile3;
- Object localObject9;
- Object localObject10;
- if ((a.tc.equals("Stomp")) ||
- (localRSNPC2 != null))
- {
- localObject1 = new ArrayList();
- i2 = 0; i4 = 0; i5 = 0; i6 = a.random(12, 15);
- localObject7 = new int[] { 49278,
- 49279 };
- localObject8 = new int[] { 49276, 49277 };
- int[] arrayOfInt = { 49274, 49275 };
- arrayOfInt1 = new int[][] { localObject7, localObject8,
- arrayOfInt };
- a.Qc = "Killing Stomp!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Stomp";
- }
- a.l(a.QC, null,
- false);
- a.PD = a.bC;
- localRSTile3 = a.tA(); localObject9 = localRSNPC2.getLocation();
- if (localRSTile3 != null)
- {
- if
- (localRSTile3.getX() - ((RSTile)localObject9).getX() > 3) {
- i4 = 1;
- }
- else if (localRSTile3.getX() - ((RSTile)localObject9).getX() < -3)
- i4 = -1;
- if (localRSTile3.getY() - ((RSTile)localObject9).getY() > 3)
- {
- i5 = 1;
- }
- else if (localRSTile3.getY()
- - ((RSTile)localObject9).getY() < -3)
- {
- i5 = -1;
- }
- }
- RSObject[] arrayOfRSObject2;
- int i12 = (arrayOfRSObject2 = a.A
- (new String[] { "lodestone" })).length;
- int i13;
- RSObject localRSObject2 = arrayOfRSObject2[i13];
- ((ArrayList)localObject1).add(new RSTile
- (localRSObject2.getLocation().getX() + i4, localRSObject2.getLocation().getY() + i5));
- i13++;
- if (a.jA()) {
- return;
- }
- if (a.i
- (a.tb) != null)
- {
- int i11 = 1;
- i12 = 2;
- Timer localTimer = new Timer(a.random(14000, 16000));
- a.RD.clear();
- i6 =
- a.random(13, 17);
- a.sleep(500, 1000);
- if (a.objects.getNearest(arrayOfInt1[i14]) != null)
- {
- i2 = 1 + i14;
- }
- else {
- i14++;
- }
- if (i2 < 1) {
- i2 = 1;
- }
- int i14 = 15749 + i2;
- a.Qc = ("Killing Stomp (stage " + i2 +
- " of 3)");
- a.SE = "";
- for (Iterator localIterator2 = ((ArrayList)localObject1).iterator(); localIterator2.hasNext(); ) { localObject11 = (RSTile)
- localIterator2.next();
- if ((!a.X().equals(localObject11)) && (a.G((RSTile)localObject11) != null)) {
- i12--;
- }
- else if (!
- a.l((RSTile)localObject11, false))
- {
- a.log("This lodestone may be unreachable");
- }
- }
- Object localObject11;
- while (a.i(a.tb) != null)
- {
- if (a.jA())
- {
- return;
- }
- int i15 = 2;
- a.MC = false;
- if ((i12 == 2) && (
- (localObject11 = a.J(a.tb)) != null))
- {
- i15 = localObject11.length;
- }
- if
- (a.inventory.getCount(new int[] { i14 }) < i15)
- {
- if ((localObject11 = a.groundItems.getNearest(a.lD)) != null)
- {
- if ((i11 != 0) && (a.l((RSGroundItem)localObject11)))
- {
- a.K(false);
- }
- if (a.MC)
- {
- a.RD.add(((RSGroundItem)localObject11).getLocation());
- }
- }
- else
- {
- if ((a.calc.distanceTo
- (localRSNPC2) > 4) && (!a.Y().isMoving()))
- a.A(localRSNPC2.getLocation(), 1);
- else if ((!a.JC()) && (!a.SE.contains("currently
- invulnerable")))
- {
- a.F(localRSNPC2, "Attack");
- }
- a.K(false);
- }
- }
- else
- if ((i12 == 2) && (localTimer != null) && (localTimer.isRunning()))
- {
- for (localObject11 = ((ArrayList)localObject1).iterator(); ((Iterator)
- localObject11).hasNext(); ) { RSTile localRSTile5 = (RSTile)((Iterator)localObject11).next();
- if ((!a.X().equals(localRSTile5)) && (a.G(localRSTile5) !=
- null))
- {
- localTimer = null;
- break;
- }
- }
- if (localTimer != null)
- if (
- (localObject11 = a.i(a.tb)) != null)
- {
- a.vE = ((RSObject)localObject11).getLocation();
- if (a.l
- ((RSObject)localObject11, "Charge"))
- {
- a.K(false);
- if (a.MC)
- {
- i12--;
- a.vE = null;
- }
- else
- {
- localTimer.reset();
- }
- }
- }
- }
- else if ((a.calc.distanceTo(localRSNPC2) > 4) && (!a.Y().isMoving()))
- {
- a.A
- (localRSNPC2.getLocation(), 1);
- a.sleep(300, 600);
- }
- else if ((!a.JC()) && (!a.SE.contains("currently invulnerable")) && (a.F
- (localRSNPC2, "Attack")))
- {
- a.K(true);
- }
- }
- a.vE = null;
- a.RD.clear();
- }
- else
- {
- RSTile localRSTile4;
- if ((localRSNPC2 != null) && (i2 == 3) && (localRSNPC2.getAnimation() == 13449))
- {
- for (localObject10 =
- ((ArrayList)localObject1).iterator(); ((Iterator)localObject10).hasNext(); ) { localRSTile4 = (RSTile)((Iterator)localObject10).next();
- if
- (a.calc.distanceTo(localRSTile4) > 2)
- {
- a.A(localRSTile4, 1);
- a.sleep(600, 900);
- break;
- }
- }
- }
- else if (a.J(new int[] { 49268 }).length > i6)
- {
- a.SE = "";
- localObject10 = a.i(new int[] { 49268 });
- a.A(a.HC == 1);
- if (localObject10 != null)
- {
- localRSTile4 = ((RSObject)localObject10).getLocation();
- if ((!a.Y
- ().isMoving()) && ((a.calc.distanceTo(localRSTile4) > 1) || (localRSNPC2.isInCombat())))
- {
- a.A(localRSTile4, 1);
- }
- }
- }
- else
- {
- a.l(a.UC, 50, 50);
- a.A(true);
- if (!a.SE.contains("currently invulnerable"))
- {
- a.i(localRSNPC2);
- }
- else
- {
- a.JC();
- }
- }
- }
- a.sleep(200, 300);
- }
- else
- {
- Object localObject3;
- Object localObject5;
- Object localObject6;
- if ((a.tc.equals("Har'laak the Riftsplitter")) || (localRSNPC3 != null))
- {
- int i1 = 0;
- localObject3 = null;
- localObject5 = new ArrayList();
- localObject6 = new ArrayList();
- a.Qc = "Killing
- the Riftsplitter!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Har'laak the Riftsplitter";
- }
- a.l(a.QC,
- Combat.Prayer.PROTECT_FROM_MAGIC, true);
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- if (a.jA()) {
- return;
- }
- if (localRSNPC3 !=
- null)
- {
- if ((localRSNPC3.getMessage() != null) && (localObject3 != null) && (((String)localObject3).equals(localRSNPC3.getMessage())))
- {
- i1 = 0;
- }
- else
- {
- localObject3 = localRSNPC3.getMessage();
- i1 = 1;
- }
- if
- ((localObject3 != null) && (i1 != 0))
- {
- a.AB = "Look out for that portal!";
- RSTile localRSTile1 = a.X();
- int i10;
- if (((ArrayList)localObject6).isEmpty())
- {
- ((ArrayList)localObject5).clear();
- ((ArrayList)localObject5).add(new
- RSArea(new RSTile(localRSTile1.getX() - 1, localRSTile1.getY() - 1), new RSTile(localRSTile1.getX() + 1, localRSTile1.getY() + 1)));
- int i9 =
- (localObject7 = a.J(new int[] { 51866 })).length;
- localRSTile3 = (arrayOfInt1 = localObject7[i10])
- .getLocation();
- localObject9 = ((ArrayList)localObject5).iterator();
- while (true) if (((Iterator)localObject9).hasNext())
- {
- if (
- (localObject10 = (RSArea)((Iterator)localObject9).next()).contains(new RSTile[] { localRSTile3 }))
- {
- break;
- }
- continue;
- }
- else
- {
- ((ArrayList)localObject6).add
- (arrayOfInt1.getLocation());
- }
- i10++;
- }
- else
- {
- ((ArrayList)localObject5).add(new
- RSArea(new RSTile(localRSTile1.getX() - 1, localRSTile1.getY() - 1), new RSTile(localRSTile1.getX() + 1, localRSTile1.getY() + 1)));
- }
- int i8
- = 20;
- if (a.vE == null)
- {
- for (RSTile localRSTile2 : (ArrayList)localObject6) {
- if ((a.calc.distanceTo
- (localRSTile2) > 2) && (a.calc.distanceTo(localRSTile2) < i8))
- {
- a.vE = localRSTile2;
- i8 = a.calc.distanceTo
- (localRSTile2);
- }
- }
- }
- if (a.vE != null)
- {
- ((ArrayList)localObject6).remove(a.vE);
- a.i(a.vE, 0);
- a.JC();
- do
- {
- a.A(a.vE, 0);
- }
- while (a.JC());
- a.sleep(300, 400);
- a.vE = null;
- }
- a.AB = "";
- }
- else
- {
- a.i
- (localRSNPC3);
- a.l(a.lG, 50, 0);
- if ((a.calc.distanceTo(localRSNPC3) < 3) && (!a.Y().isInCombat()) && (!localRSNPC3.isInCombat()))
- {
- a.l(a.FA.getCentralTile(), 1);
- }
- }
- }
- a.sleep(100, 200);
- }
- else
- {
- Object
- localObject2;
- if ((a.tc.equals("Lexicus Runewright")) || (localRSNPC4 != null))
- {
- localObject2 = "";
- a.Qc = "Killing Lexicus
- Runewright!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Lexicus Runewright";
- }
- a.l(false,
- Combat.Prayer.PROTECT_FROM_MAGIC, true);
- if (a.Sd)
- {
- a.i(2);
- }
- else
- a.PD = a.xb;
- if
- (a.jA())
- {
- return;
- }
- if (localRSNPC4 != null)
- if ((
- (localObject2 = localRSNPC4.getMessage())
- != null) && (((String)localObject2).contains("barrage")))
- {
- if ((localObject3 = a.objects.getNearest(a.dA)) != null)
- {
- a.vE = ((RSObject)localObject3).getLocation();
- a.l(a.vE, 1);
- if (!a.l(a.vc, 80, 80))
- {
- a.sleep(500, 700);
- }
- a.sleep(600, 800);
- a.F(localRSNPC4, "Attack");
- a.vE = null;
- }
- a.AB = "";
- }
- else if (a.i(new String[] { "Tome" }) != null)
- {
- if (a.F(a.i(new String[] { "Tome" })))
- {
- a.K(false);
- a.l(a.UC, 40, 0);
- }
- else
- {
- a.sleep(300,
- 500);
- }
- }
- else
- {
- int i3;
- for (; (i3 = 0) < 15; tmpTernaryOp = 15) { if (a.AA())
- break;
- if (a.i(new String[] { "Tome" }) != null)
- {
- break;
- }
- a.JC
- ();
- a.sleep(100, 200);
- i3++;
- }
- (localRSNPC4.getAnimation() == 13499 ?
- i3 : a.i
- (localRSNPC4));
- }
- a.l(a.lG, 40, 0);
- a.sleep(100, 200);
- }
- else
- {
- if (!a.tc.equals("Sagittare"))
- {
- if (a.i(new int[] { 51887 }) == null);
- }
- else
- {
- a.Qc = "Killing Sagittare!";
- if
- (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Sagittare";
- }
- if (a.HC == 2)
- {
- a.log("Swapping attack style for Sagittare!");
- if (a.kC)
- {
- a.i(1);
- }
- else if (a.iD)
- {
- a.i(3);
- }
- else
- {
- a.log.severe("We don't have a way to kill Sagittare, aborting
- dungeon!");
- a.nc = true;
- return;
- }
- }
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- a.PD = a.xb;
- while (a.objects.getNearest(a.gb) == null)
- {
- if (a.jA())
- {
- return;
- }
- if ((localObject2 = a.i(new String[] { "Sagittare" })) != null)
- {
- if ((a.SE.contains("stops you")) ||
- (a.SE.contains("bound")))
- {
- a.JC();
- }
- Object localObject4;
- if ((((RSNPC)
- localObject2).getAnimation() == 13270) || (((RSNPC)localObject2).getMessage() != null))
- {
- if (a.calc.distanceTo
- (a.FA.getCentralTile()) > 2)
- {
- a.vE = a.FA.getCentralTile();
- }
- else
- {
- localObject4 = a.objects.getNearest(new int[] { 50352 });
- a.vE = (localObject4 != null ? ((RSObject)localObject4).getLocation
- () : ((RSNPC)localObject2).getLocation());
- }
- a.l(a.vE, 1);
- a.sleep(3000, 5000);
- a.vE =
- null;
- }
- else if ((a.HC != 3) && (a.calc.distanceTo((RSCharacter)localObject2) > 1))
- {
- if (a.Y
- ().isMoving()) {
- a.JC();
- }
- else
- {
- a.l(((RSNPC)
- localObject2).getLocation(), 1);
- }
- if (((localObject4 = a.walking.getDestination()) != null) &&
- (a.calc.distanceBetween((RSTile)localObject4, ((RSNPC)localObject2).getLocation()) > 1.0D))
- {
- a.l(((RSNPC)
- localObject2).getLocation(), 0);
- a.l(false);
- }
- }
- a.l(a.UC, 50, 50);
- a.i
- ((RSNPC)localObject2);
- }
- a.sleep(100, 200);
- }
- }
- if ((a.tc.equals("Night-gazer Khighorahk")) ||
- (localRSNPC5 != null))
- {
- localObject2 = new int[] { 13426, 13427, 13428, 13429 };
- a.Qc = "Killing Night-gazer Khighorahk!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Night-gazer Khighorahk";
- }
- a.l(false,
- Combat.Prayer.PROTECT_FROM_MAGIC, true);
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- if (a.jA())
- {
- return;
- }
- if ((localRSNPC5 = a.i(new String[] { "Khighorahk" })) != null)
- {
- boolean bool = a.l(localRSNPC5.getAnimation(), localObject2);
- localObject5 = localRSNPC5.getLocation();
- if ((bool) && (a.calc.distanceTo((RSTile)localObject5) < 6))
- {
- if ((localObject6 = a.objects.getNearest(new bb(a, (RSTile)localObject5))) != null)
- {
- a.vE = ((RSObject)localObject6).getLocation
- ();
- a.l(a.vE, 1);
- a.l(false);
- int i7;
- if ((i7 = 0) < 7)
- {
- if (!a.AA())
- {
- RSObject localRSObject1;
- if ((
- (localRSObject1 = a.i
- (new int[] { 49265 })) != null) && (a.calc.distanceTo(localRSObject1) < 4))
- {
- if (a.l(localRSObject1, "Light"))
- {
- a.sleep(800, 1100);
- if ((a.Y().getAnimation() == 13355) && (a.Y().getAnimation() == 13354))
- break label4150;
- a.l(localRSObject1, "Light"); break label4150;
- }
- }
- else if (a.Y().getAnimation() == 10070)
- {
- a.log("Damn.. Got knocked by his special");
- a.l(a.UC, 50, 40);
- break label4150;
- }
- if (a.walking.isRunEnabled())
- {
- a.sleep(200, 300);
- }
- else
- if ((a.calc.distanceTo(a.vE) < 2)
- || (a.calc.distanceTo(localRSNPC5.getLocation()) > 8))
- break label4150;
- if ((a.calc.distanceTo(a.vE) < 3) &&
- (localRSNPC5.getAnimation() != 13429))
- {
- a.sleep(400, 600);
- }
- else
- {
- a.sleep(200, 250);
- i7++;
- }
- }
- }
- label4150: a.x();
- a.sleep(500, 800);
- i7++;
- a.vE = null;
- }
- }
- else if ((
- (localObject6 = a.J(new int[] { 49266, 49267 })) != null) && (localObject6.length < 2))
- {
- if (a.l
- (a.objects.getNearest(new int[] { 49265 }), "Light"))
- a.sleep(800, 1200);
- }
- else if (a.MC)
- {
- a.JC();
- }
- else
- {
- a.l(a.UC, 50, 0);
- a.i(localRSNPC5);
- }
- }
- a.sleep(100, 200);
- }
- else
- {
- a.Qc = "Killing an unknown boss...";
- a.log(a.Qc);
- a.l(a.QC, null, false);
- if (!a.h())
- {
- return;
- }
- }
- }
- }
- }
- }
- a.Ke = true;
- }
- private boolean F(RSTile a, boolean a)
- {
- return (a.l(a, a)) || (!a.l(a.X(), a, a, new int[0]).isEmpty());
- }
- private boolean AD()
- {
- a.Qc = "Opening a skill
- door";
- if (a.ZA != null);
- if (a.jA())
- {
- return false;
- }
- a.uA();
- if ((a.nD != null) && (a.FA != null)) if (a.FA.contains(new RSTile[] { a.nD }))
- {
- RSObject localRSObject = a.G(a.nD);
- if (a.l(localRSObject))
- {
- a.K(true);
- if ((a.ZA == null) && (a.Rc()) && ((a.l
- (localRSObject.getID(), a.Yf)) || (a.l(localRSObject.getID(), a.tD))))
- a.l(a.vc, 70, 40);
- if (a.i(true)) {
- return true;
- }
- }
- else if (localRSObject != null)
- {
- a.sleep(100, 200);
- }
- if (!a.iD())
- {
- return true;
- }
- }
- a.sleep
- (200, 400);
- a.QA = a.nD;
- return true;
- }
- private int Lb()
- {
- if (a.jA())
- return 2;
- a.jA = a.D(a.xC);
- if ((a.jA != null) && (!a.l(a.jA)))
- {
- if ((a.HC == 1) && (a.calc.distanceTo(a.jA) > 4))
- {
- a.l(a.jA.getLocation(), 1);
- }
- else
- {
- a.F(a.jA);
- }
- a.sleep(800, 1300);
- }
- a.l(a.UC, 40, 50);
- a.sleep(100, 150);
- a.jA = null;
- return 1;
- }
- private boolean qb()
- {
- int i2;
- if ((a.kd) && (a.nb == null) && (!a.ud.equals
- ("Frozen"))) if ((a.jb.contains(new RSTile[] { a.X() })) && (!a.inventory.contains(17566)))
- {
- int i1;
- i2 =
- (i1 = a.inventory.getCount
- (true, new int[] { 18201 })) < 400 ? i1 / 200 : 2;
- if ((a.inventory.getCount() < 20) && (i2 > 0))
- {
- a.l(false, i2, -1);
- }
- }
- a.nD
- = null;
- a.WA = null;
- a.ZA = null;
- a.Bd.removeAll(a.fG);
- a.Bd.removeAll(a.fc);
- a.J.removeAll(a.fG);
- a.J.removeAll(a.fc);
- a.J.removeAll(a.w);
- a.w.removeAll(a.fG);
- RSTile localRSTile1 = a.tA();
- RSArea localRSArea;
- Iterator localIterator2;
- if (((localRSArea = (RSArea)a.aE.get(i2)) != null) &&
- (!a.ic.contains(localRSArea)) && (!a.l(localRSArea, a.Bd)) && (!a.l(localRSArea, a.J)) && (!a.l(localRSArea, a.w)))
- {
- a.ic.add(localRSArea);
- for
- (localIterator2 = a.fA.iterator(); localIterator2.hasNext(); )
- {
- RSTile localRSTile3;
- if ((
- (localRSTile3 = (RSTile)localIterator2.next())
- != null) && (a.calc.distanceBetween(localRSTile3, localRSArea.getNearestTile(localRSTile3)) < 4.0D))
- {
- a.fG.add(localRSTile3);
- }
- }
- }
- i2--;
- a.aE.removeAll(a.ic);
- a.w.removeAll(a.fG);
- a.Bd.removeAll(a.fG);
- a.Bd.removeAll(a.fc);
- a.J.removeAll(a.fG);
- a.J.removeAll(a.fc);
- a.J.removeAll(a.w);
- if ((a.cD.contains(a.r)) && ((localRSTile1 == null) || (a.calc.distanceTo(localRSTile1) > 3)))
- {
- a.lA();
- if ((a.nD == null) ||
- (a.calc.distanceTo(a.nD) > 4))
- {
- a.log("Can't reach the back door, teleporting back");
- a.G(true);
- a.l(a.jb);
- return true;
- }
- }
- a.vA();
- a.uA();
- if (a.FA != null)
- {
- a.SE = "";
- a.Sg = a.FA;
- if ((a.Zc > 4) && (!a.inventory.contains(18829)) && (a.Rd == 1) && (a.Nc.size() >
- 1))
- {
- a.Qc = "Teleporting back to where we died";
- i2 = 0;
- a.uA();
- if (a.groundItems.getNearest(new int[] { 18829 }) != null);
- if (a.jA()) {
- return false;
- }
- if (a.SE.contains("destination"))
- {
- i2 = 1;
- }
- else
- {
- if (!
- a.jb.contains(new RSTile[] { a.X() }))
- {
- a.rb();
- }
- else if (a.fA()) {
- a.K(false);
- }
- a.sleep(300,
- 400);
- a.uA();
- }
- if (i2 == 0)
- {
- a.l(a.QB != null ? a.QB : a.FA);
- a.QB = null;
- if (!a.r.equals(a.jb))
- {
- a.qA.clear();
- int i4;
- if ((a.l.contains(a.r)) || ((a.nb != null) && ((a.tc.equals("Sagittare")) || (a.tc.equals("Stomp")))))
- {
- a.l(a.groundItems.getNearest(new int[] { 18829 }));
- a.sleep(300, 600);
- i4++;
- }
- a.hB = true;
- return true;
- }
- }
- }
- Iterator localIterator1;
- if ((a.nb != null) && (!a.ig.isEmpty()))
- {
- for (localIterator1 = a.ig.iterator
- (); localIterator1.hasNext(); ) { localRSTile2 = (RSTile)localIterator1.next();
- if (a.FA.contains(new RSTile[] { localRSTile2 }))
- {
- a.nD =
- localRSTile2;
- a.Qc = "Opening a door back to the Boss";
- return a.N();
- }
- }
- }
- RSTile localRSTile2;
- if ((a.QB !=
- null) && (!a.qA.isEmpty()))
- {
- if (!a.FA.equals(a.QB))
- {
- for (localIterator1 = a.qA.iterator(); localIterator1.hasNext(); ) { localRSTile2 =
- (RSTile)localIterator1.next();
- if (a.FA.contains(new RSTile[] { localRSTile2 }))
- {
- a.nD = localRSTile2;
- a.Qc = "Opening
- a door back to where we died";
- return a.N();
- }
- }
- }
- a.qA.clear();
- }
- int i3 = a.lA();
- if (a.nD != null)
- {
- a.lc = new Timer(0L);
- a.A(a.WA != null ? a.WA : a.nD);
- if (a.M) {
- a.l(a.X(), a.WA != null ? a.WA : a.nD, true, new int[0]);
- }
- a.SE = "";
- switch (i3)
- {
- case 1:
- return a.zA();
- case 2:
- return a.UA();
- case 3:
- return a.u();
- case 4:
- return a.AD();
- case 5:
- while (0 != 0);
- return a.N();
- }
- }
- }
- return false;
- }
- private boolean D(boolean a)
- {
- if (!a.inventory.isFull())
- return true;
- if ((a.combat.getHealth() < 95) && (a.inventory.containsOneOf(a.vc)))
- {
- if (!a.l(a.W, 95, 50)) {
- a.l(a.vc, 95, 50);
- }
- }
- else if (!a.S()) {
- if ((a) && (a.inventory.getCount() > a.inventory.getCount(a.l(a.EB))))
- {
- a.F(a.X(), 2);
- a.MA();
- }
- else
- {
- a.l(a.vc, 101, 30);
- }
- }
- return !a.inventory.isFull();
- }
- private boolean l(RSComponent a, String a)
- {
- if (!
- a.isValid())
- {
- return false;
- }
- Rectangle localRectangle;
- if ((localRectangle = a.getArea()).x ==
- -1)
- return false;
- int i1 =
- localRectangle.x + 2; int i2 = localRectangle.y + 2; int i3 = localRectangle.width - 4; int i4 = localRectangle.height - 4;
- if ((
- new Rectangle(i1, i2, i3,
- i4).contains(a.mouse.getLocation())) && (a.menu.contains(a)))
- {
- a.mouse.click(true);
- return true;
- }
- a.mouse.click(a.random(i1, i1 + i3), a.random
- (i2, i2 + i4), true);
- return true;
- }
- private boolean Zc()
- {
- a.V();
- if (!a.Od) {
- return true;
- }
- if (a.hd != null)
- {
- if (!a.hd.isRunning
- ())
- {
- return true;
- }
- }
- else if (!a.hA.isRunning())
- return true;
- return (!a.game.isLoggedIn()) || (a.AA()) || (!a.M());
- }
- private
- boolean J(RSNPC a)
- {
- if ((a != null) && (a.isValid()) && ((a.isInCombat()) || (a.l(a))))
- {
- return !a.A(a);
- }
- return false;
- }
- private boolean DD()
- {
- if ((a.jA()) || (a.l(a.FA, a.J)))
- {
- return false;
- }
- if (a.lA.contains(a.r))
- {
- a.log("Can't backtrack from this room, killing off enemies");
- if ((!a.QB()) || (!a.ZA())) {
- return false;
- }
- }
- else
- {
- a.log("We need to backtrack further before teleporting home");
- a.K();
- }
- a.uA();
- a.uA();
- return true;
- }
- private int rd()
- {
- if (!a.UA)
- {
- a.uC = "Unknown layout";
- return -1;
- }
- a.A(a.X(), 10);
- a.sleep(30000,
- 150000);
- int[] arrayOfInt1 = { 50687, 52075 };
- int[] arrayOfInt2 = { 52982, 51786 };
- RSObject localRSObject1 = a.i(new int[] { 49656, 49657, 49658, 54308 });
- RSObject localRSObject2 = a.J(new String[] { "Spinning blades" });
- RSObject localRSObject3 = a.J(new String[] { "Pendulum" });
- RSTile localRSTile1 = a.i(new
- int[] { 49765 }).getLocation();
- RSTile localRSTile2 = a.l(new int[][] { arrayOfInt1, arrayOfInt2 });
- if ((localRSTile1 == null) || (localRSTile2 == null)) {
- return -1;
- }
- RSTile localRSTile3 = a.i(new int[] { 49765 }).getLocation();
- RSTile localRSTile4 = a.tA();
- if (a.jA())
- {
- return 2;
- }
- if (!a.j
- ())
- {
- return -1;
- }
- a.l(a.vc, 40, 50);
- a.jA = a.npcs.getNearest(a.B);
- a.yd = a.l(a.Zd);
- if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
- {
- a.F(a.jA);
- }
- else if ((a.yd != null) && (a.l(a.yd.getLocation(), false)))
- a.l(a.yd);
- else if (a.F(localRSObject2))
- {
- if
- ((a.calc.distanceTo(localRSObject3.getLocation()) < 5) || (a.calc.distanceTo(localRSTile2) < 3))
- {
- a.A(localRSObject3.getLocation(), 0);
- }
- else
- if (a.calc.distanceTo(localRSTile3) < 2)
- a.A(localRSTile2, 0);
- else {
- a.A(localRSTile3, 0);
- }
- }
- else if (a.F(localRSObject1))
- a.A
- (localRSObject3.getLocation(), 1);
- else if (a.l(localRSTile4, true))
- {
- a.l(a.i(a.bB), "Step-onto");
- }
- else
- {
- a.A(a.nD, 1);
- }
- a.K(true);
- if (a.AA())
- {
- a.n();
- }
- else if (a.jA()) {
- return 2;
- }
- a.K(true);
- a.sleep(600, 900);
- return 1;
- }
- public void keyPressed(KeyEvent a)
- {
- }
- private boolean iD()
- {
- if (((a.SE.contains("level of")) || (a.SE.contains("unable to"))) && (!a.oA()))
- {
- a.log("We don't have the level requirement
- for this door, removing.");
- a.fG.add(a.nD);
- a.Bd.remove(a.nD);
- a.w.remove(a.nD);
- a.J.remove(a.nD);
- return false;
- }
- return true;
- }
- private void J(boolean a)
- {
- if (a) {
- a.K(true);
- }
- else
- {
- a.sleep(400, 600);
- }
- }
- private boolean QB()
- {
- if (a.ic.contains(a.r))
- {
- return true;
- }
- if (a.npcs.getNearest(a.B) != null)
- {
- a.AB = "Clearing the room of monsters";
- if (a.jA())
- {
- return false;
- }
- Object localObject;
- if (!a.J(a.jA))
- if (
- (localObject = a.npcs.getNearest(a.xc)) != null)
- {
- a.jA = ((RSNPC)localObject);
- }
- else
- {
- a.jA = a.npcs.getNearest(a.bD);
- }
- if (a.F(a.jA))
- {
- a.D(a.jA);
- a.F();
- a.sleep(900, 1700);
- if
- (a.GD) {
- a.sleep(200, 300);
- }
- }
- if (a.Qc.contains(": Follow"))
- {
- if (((localObject = a.G(a.X())) != null) &&
- (a.l
- (((RSObject)localObject).getID(), a.te)))
- a.F(a.X(), 2);
- }
- a.l(a.UC, 45, 55);
- a.sleep(200, 400);
- a.jA = null;
- double d1 = a.random(3,
- 6);
- do
- if (a.jA())
- {
- return false;
- }
- while (a.JC());
- a.yd = a.l(a.Zd);
- a.K(false);
- a.sleep(300, 600);
- a.AB
- = "";
- }
- return true;
- }
- private void l(Graphics a, RSTile a, double a)
- {
- if (a == null)
- {
- return;
- }
- int i1 = a.getX(); int i2 = a.getY();
- Point localPoint1 = a.calc.worldToMinimap(i1 - a, i2 - a);
- Point localPoint2 = a.calc.worldToMinimap(i1 - a, i2 + a);
- Point localPoint3 = a.calc.worldToMinimap
- (i1 + a, i2 + a);
- Point localPoint4 = a.calc.worldToMinimap(i1 + a, i2 - a);
- if ((localPoint1.x != -1) && (localPoint2.x != -1) && (localPoint3.x != -1) &&
- (localPoint4.x != -1))
- {
- int[] arrayOfInt1 = { localPoint1.x, localPoint2.x, localPoint3.x, localPoint4.x };
- int[] arrayOfInt2 = { localPoint1.y,
- localPoint2.y, localPoint3.y, localPoint4.y };
- a.fillPolygon(arrayOfInt1, arrayOfInt2, 4);
- }
- }
- private boolean F(int a, String a)
- {
- int i1;
- if
- (a.game.getCurrentTab() != 7)
- {
- a.game.openTab(7);
- if ((i1 = 0) < 40)
- {
- a.sleep(40, 50);
- i1++;
- }
- }
- return
- a.interfaces.getComponent(950, a).doAction(a);
- }
- private boolean oA()
- {
- int i1 = a.SE.indexOf("of ") + 3;
- if (a.SE.contains("of at least"))
- {
- i1 += 9;
- }
- try
- {
- String str = a.SE.substring(i1);
- int i2 = -1;
- int i3;
- if (
- (i3 = Integer.parseInt(str.substring(0, str.indexOf(" ")))) >
- 99)
- return false;
- if ((a.SE.contains("Strength")) && (a.skills.getRealLevel(2) >= i3))
- {
- a.log("Our Strength level has been temporarily lowered
- below " + i3 + ", waiting for it to regenerate");
- i2 = 2;
- }
- else if ((a.SE.contains("Magic")) && (a.skills.getRealLevel(6) >= i3))
- {
- a.log("Our Magic level has been temporarily lowered below " + i3 + ", waiting for it to regenerate");
- i2 = 6;
- }
- if (i2 != -1)
- {
- int i4;
- if ((i4 = i3 - a.skills.getCurrentLevel(i2)) < 0)
- {
- return false;
- }
- if (i4 > 4)
- {
- i4 = 4;
- }
- int i5 =
- a.random(i4 * 40000, i4 * 60000);
- a.sleep(i5);
- a.KA = new Timer(0L);
- if (a.hA != null) {
- a.hA.reset();
- }
- if (a.hd != null)
- a.hd.reset();
- if (a.lc != null)
- {
- a.lc = new Timer(0L);
- }
- a.SE = "";
- a.BG = true;
- return true;
- }
- }
- catch (Exception localException1)
- {
- if (a.UA)
- a.log(localException1);
- }
- return false;
- }
- private boolean F(RSNPC a, String a)
- {
- if ((a ==
- null) || (!a.isValid())) {
- return false;
- }
- RSTile localRSTile = a.getLocation();
- if (!a.isOnScreen())
- {
- if (!a.Y().isMoving()) {
- if ((a.i
- (localRSTile, 1)) && (a.calc.distanceTo(localRSTile) > 6))
- a.camera.turnToTile(localRSTile, a.random(5, 15));
- else {
- a.sleep(400, 600);
- }
- }
- if (a != null)
- {
- a.sleep(50, 100);
- }
- }
- return a.l(a, a);
- }
- private int rA()
- {
- if (!a.UA)
- {
- a.uC = "Unsolvable
- puzzle";
- return -1;
- }
- a.Q();
- while (!a.KD)
- {
- if (a.jA())
- return 2;
- if (!a.j())
- return -1;
- }
- return 1;
- }
- private
- RSObject J(String[] a)
- {
- return a.objects.getNearest(new b(a, a));
- }
- private boolean l(String a, String[] a)
- {
- int i2;
- if ((a != null) && (a != null) &&
- (!a.isEmpty()))
- {
- a = a.toLowerCase();
- String[] arrayOfString;
- int i1 = (arrayOfString = a).length;
- String str;
- if (((str = arrayOfString
- [i2]) != null) &&
- (!str.isEmpty()) && (a.contains(str.toLowerCase()))) {
- return true;
- }
- i2++;
- }
- return false;
- }
- private boolean A(int
- a)
- {
- if ((a < 4) && (a != a.combat.getFightMode()))
- {
- if ((a.k) && (a.i))
- {
- if (a == a.Gd)
- {
- return a.l(a.eB, "Wield");
- }
- a.l(a.Vc, "Wield");
- }
- a.game.openTab(0);
- if (a == a.combat.getFightMode()) {
- return false;
- }
- if (a == 0)
- a.mouse.click
- (577, 253, 55, 35, true);
- else if (a == 1)
- {
- a.mouse.click(661, 253, 55, 35, true);
- }
- else if (a == 2) {
- a.mouse.click(576, 306, 55,
- 35, true);
- }
- else if (a == 3) {
- a.mouse.click(662, 308, 55, 35, true);
- }
- return true;
- }
- return false;
- }
- private String XA()
- {
- if
- (a.yF == 0) {
- return "00:00:00";
- }
- StringBuilder localStringBuilder = new StringBuilder();
- }
- private boolean i(RSTile a, int a)
- {
- if (a != null)
- {
- if (a > 0)
- a = new RSTile(a.getX() + a.random(-a, a + 1), a.getY() + a.random(-a, a + 1));
- if (a.X().equals(a))
- {
- return false;
- }
- if (a.calc.tileOnScreen(a))
- return a.A(a, "Walk here");
- Point localPoint;
- if ((localPoint = a.calc.tileToMinimap(a)).x ==
- -1)
- {
- if
- (
- (a = a.walking.getClosestTileOnMap(a)) == null)
- {
- return false;
- }
- localPoint = a.calc.tileToMinimap(a);
- }
- if
- (localPoint.x != -1)
- {
- a.mouse.move(localPoint);
- if ((localPoint = a.calc.tileToMinimap(a)).x !=
- -1)
- {
- a.mouse.click
- (localPoint, true);
- return true;
- }
- }
- }
- return false;
- }
- private RSArea E(RSTile a)
- {
- if (a == null) {
- return null;
- }
- for
- (RSArea localRSArea : a.Nc)
- if (a.calc.distanceBetween(a, localRSArea.getNearestTile(a)) < 3.0D)
- {
- return localRSArea;
- }
- return null;
- }
- private boolean l(boolean a, Combat.Prayer a, boolean a)
- {
- if (((a) && (a.combat.getPrayerPoints() < 3)) || (!a.interfaces.get(749).isValid()))
- {
- return
- false;
- }
- int i1;
- if ((a.QC) && (a.HC == a.bb))
- {
- if ((a.combat.isQuickPrayerOn() != a) && (a.interfaces.get(749).isValid()))
- {
- if (a.Zc())
- return false;
- if (a.l(a.interfaces.getComponent(749, 2), a ? "Turn quick prayers on" : "Turn prayers off"))
- {
- a.sleep(150, 200);
- i1++;
- }
- a.sleep(100, 200);
- }
- }
- if ((a != null) && (a.VA) && (a.getRequiredLevel() <= a.SC))
- {
- if ((a.combat.getPrayerPoints() > 0)
- && (a.l(a) != a))
- {
- if (a.Zc()) {
- return false;
- }
- if (a.l(a, a))
- {
- a.sleep(100, 120);
- i1++;
- }
- a.sleep(100, 200);
- }
- }
- return false;
- }
- private RSTile[] K(RSTile a)
- {
- int i1 = a.getX(); int i2 = a.getY();
- return new RSTile[] { new RSTile(i1 +
- 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),
- new RSTile(i1 + 1, i2) };
- }
- private ArrayList<RSTile> l(RSTile a, RSTile a, int[] a)
- {
- ArrayList localArrayList = new ArrayList();
- a.l(a, a, false, a);
- int
- i1 = -1;
- int i2;
- RSTile localRSTile1 = (RSTile)a.a.get(i2); RSTile localRSTile2 = (RSTile)a.a.get(i2 - 1);
- RSTile[] arrayOfRSTile = a.K(localRSTile2);
- int
- i3;
- if (i1 == -1)
- {
- if (localRSTile1.equals(arrayOfRSTile[i3]))
- {
- i1 = i3;
- }
- else {
- i3++;
- }
- }
- else if (!
- arrayOfRSTile[i1].equals(localRSTile1))
- {
- localArrayList.add(localRSTile2);
- i1 = -1;
- i2--;
- }
- i2++;
- localArrayList.add(a);
- return a.uc =
- localArrayList;
- }
- private String J(String a)
- {
- if ((a == null) || (!a.contains(" "))) {
- return "";
- }
- return a.contains(">") ? a.substring(a.indexOf
- (">") + 1, a.indexOf(" ")) : a.substring(0, a.indexOf(" "));
- }
- private int sA()
- {
- RSNPC localRSNPC = a.D(new int[] { 11007 });
- RSObject localRSObject;
- if
- ((localRSObject = a.i(new int[] { 49555, 49556, 49557, 49558, 49559, 49560 })) == null)
- {
- return -1;
- }
- RSTile localRSTile = localRSObject.getLocation();
- int[] arrayOfInt = { 49546, 49547, 49548, 54293 };
- if (localRSNPC != null) if (!localRSNPC.getLocation().equals(localRSTile))
- {
- if (a.jA()) {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- a.l(a.vc, 50, 40);
- if ((localRSNPC = a.D(new int[] { 11007 })) != null)
- {
- int i1 = a.l(localRSNPC.getLocation(), localRSTile, arrayOfInt).size();
- Object localObject;
- if ((a.inventory.getCount(new int[] { 17375 }) < i1)
- && (!a.inventory.isFull()))
- {
- localObject = a.J(new String[] { "Fire" });
- if (a.inventory.contains(17374)) if (a.calc.distanceTo
- ((RSObject)localObject) >= 4)
- {
- if (a.inventory.getCount(new int[] { 17374, 17375 }) <= i1 + 1);
- }
- else
- {
- if (!a.l("Raw vile fish", (RSObject)localObject))
- break label353;
- a.K(true); break label353;
- }
- if (a.l(a.J(new String[] { "Fishing spot" }), "Fish"))
- {
- a.x();
- a.K(true);
- }
- }
- else
- {
- label353: while (a.inventory.contains(17375))
- {
- if (a.jA())
- {
- return 2;
- }
- if (!
- a.j())
- {
- return -1;
- }
- if (localRSNPC == null)
- {
- continue;
- }
- if ((localObject = localRSNPC.getLocation()) != null)
- {
- a.l((RSTile)localObject, localRSTile, arrayOfInt);
- a.vE = ((RSTile)
- a.uc.get(0));
- if (a.vE != null) {
- while ((a.inventory.contains(17375)) && (localRSNPC != null) && ((localRSNPC.isMoving()) ||
- (localRSNPC.getLocation().equals(localObject))))
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- if ((localRSNPC = a.D(new int[] { 11007
- })) == null)
- continue;
- if (localRSNPC.getLocation().equals(localRSTile))
- {
- break;
- }
- RSItem localRSItem = a.inventory.getSelectedItem();
- if ((!a.calc.tileOnScreen(a.vE)) && (!a.Y().isMoving()))
- {
- a.i(a.vE, 1);
- a.camera.turnToTile(a.vE, a.random(5, 15));
- a.K(true);
- }
- else if ((localRSItem == null) || (localRSItem.getID() != 17375))
- {
- a.inventory.getItem(new int[] { 17375
- }).doClick(true);
- }
- else if ((a.D(a.vE) == null) && (!a.Y().isMoving()) && (!localRSNPC.isMoving()) && (a.A(a.vE, "Use")))
- {
- a.K(true);
- a.sleep(2000, 3000);
- }
- a.sleep(200, 400);
- a.sleep(300, 400);
- }
- }
- }
- }
- }
- }
- a.sleep(100, 200);
- }
- return 1;
- }
- private
- boolean ZA()
- {
- RSGroundItem localRSGroundItem;
- if ((
- (localRSGroundItem = a.l(a.Zd)) == null) || ((a.ic.contains(a.r)) && ((a.l.contains(a.r)) || (!a.l
- (localRSGroundItem.getLocation(), false))))) {
- return true;
- }
- int i1 = 0;
- RSTile localRSTile = null;
- a.KC();
- if (a.AB.isEmpty())
- {
- a.AB =
- "Picking up food & keys";
- if (a.kf) {
- a.AB += " & bones";
- }
- if (a.ec) {
- a.AB += " & arrows";
- }
- }
- a.KA.reset();
- a.MC = false;
- if (a.jA())
- return false;
- if (a.AB.contains("reengage")) {
- return true;
- }
- if ((localRSTile != null) && ((i1 > 6) || (a.KA.getElapsed() >
- a.random(15000, 25000))))
- {
- if ((a.calc.distanceTo(localRSTile) > 1) || (a.Rd == 1)) if (a.l(localRSTile, a.Rd == 1))
- {
- if (a.Rd == 1)
- {
- a.A(localRSTile, 1); break label307;
- }
- a.F(localRSTile); break label307;
- }
- a.RD.add(localRSTile);
- label307: a.KA.reset
- ();
- i1 = 0;
- }
- a.yd = a.l(a.Zd);
- if (a.yd != null)
- {
- localRSTile = a.yd.getLocation();
- if (a.Nc.size() == 1)
- {
- a.camera.setCompass('n');
- }
- else if ((!a.nE) && (a.inventory.getCount() > a.random(24, 26)) && (a.l(a.W, 101, 90)))
- {
- a.KA.reset();
- i1 =
- 0;
- }
- a.D(!a.nE);
- int i2 = a.inventory.getCount();
- int i3;
- if (a.l(a.yd))
- {
- a.sleep(100, 200);
- a.sleep(0, 400);
- if
- (a.MC)
- {
- a.l(localRSTile, 1);
- a.sleep(1000, 1500);
- a.MC = false;
- }
- else if (a.inventory.getCount() > i2)
- {
- a.KA.reset();
- a.KC();
- i1 = 0;
- }
- else
- {
- if (a.Y().isMoving())
- {
- a.KA.reset();
- i1 = 0;
- }
- else
- {
- i3++;
- }
- a.sleep(200, 250);
- i3++;
- }
- }
- else
- {
- i1++; i1 = !a.Y
- ().isMoving() ? i1 : 0;
- a.uA();
- }
- }
- a.sleep(100, 300);
- a.kD();
- a.t();
- if ((!a.nE) && (a.inventory.getCount() > a.random(22, 26)) && (!a.l
- (a.W, 101, a.combat.getHealth() + 15)))
- {
- a.MA();
- }
- a.yd = null;
- a.AB = "";
- return true;
- }
- private boolean UA()
- {
- a.Qc = "Opening a blocked
- door";
- RSObject localRSObject;
- if (a.G(a.WA) != null)
- {
- if (a.jA())
- return false;
- localRSObject = a.G(a.WA);
- if (!a.iD())
- {
- a.fG.add(a.WA);
- a.Bd.remove(a.WA);
- a.w.remove(a.WA);
- a.J.remove(a.WA);
- a.fA.remove(a.nD);
- return true;
- }
- if (a.l
- (localRSObject))
- {
- a.K(false);
- a.l(a.vc, 50, 50);
- }
- else if (localRSObject != null)
- {
- a.sleep(100, 200);
- }
- if (a.Rc
- ())
- {
- a.l(a.vc, 70, 50);
- a.sleep(900, 1500);
- }
- a.sleep(100, 200);
- }
- a.J.remove(a.WA);
- a.fA.remove(a.WA);
- a.Bd.remove(a.WA);
- a.gc.remove(a.WA);
- a.w.remove(a.WA);
- if (a.ZA != null);
- if (a.jA())
- {
- return false;
- }
- a.uA();
- if ((a.nD != null) && (a.FA != null)) if
- (a.FA.contains(new RSTile[] { a.nD }))
- {
- if ((
- (localRSObject = a.G(a.nD)) != null) && (a.MC))
- {
- localRSObject.doClick();
- a.K(false);
- a.MC = false;
- }
- if (a.l(a.G(a.nD)))
- {
- a.K(false);
- if (a.i(false))
- {
- return true;
- }
- }
- else
- {
- a.sleep(100, 200);
- }
- }
- a.sleep(100, 200);
- return true;
- }
- private void wA()
- {
- RSNPC localRSNPC1 =
- a.i(new String[] { "Gluttonous behemoth" });
- RSNPC localRSNPC2 = a.i(new String[] { "Bloodchiller" });
- RSNPC localRSNPC3 = a.i(new String[] { "Luminescent" });
- RSNPC localRSNPC4 = a.i(new String[] { "Lakhrahnaz" });
- RSObject localRSObject1 = a.objects.getNearest(new int[] { 49283 });
- a.l(a.UC, 50, 60);
- Object
- localObject2;
- int i3;
- int i4;
- if (localRSObject1 != null)
- {
- a.Qc = "Killing the Gluttonous Behemoth!";
- if (a.tc.isEmpty())
- {
- a.log
- (a.Qc);
- a.tc = "Gluttonous Behemoth";
- }
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- a.A(true);
- RSTile localRSTile1 = localRSObject1.getLocation();
- if (
- (localObject2 = a.F(localRSTile1, new int[] { 51180 })) != null)
- {
- RSTile[] arrayOfRSTile;
- i3 = (arrayOfRSTile = a.h
- (localRSTile1)).length; RSTile localRSTile2 = arrayOfRSTile[i4];
- int i7;
- if ((i7 = (int)a.calc.distanceBetween(localRSTile2, (RSTile)localObject2)) ==
- 3)
- {
- a.vE = localRSTile2;
- }
- else {
- i4++;
- }
- }
- if (a.vE == null)
- {
- a.log.severe("Unable to
- calculate the tile to protect");
- a.vE = localRSTile1;
- }
- a.l(a.vE, 0);
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- a.F();
- if
- (a.jA())
- {
- return;
- }
- if ((localRSNPC1 != null) && (localRSNPC1.getAnimation() == 13720))
- {
- a.iE += 1;
- if (a.iE > 2)
- {
- a.log.severe("Unable to kill the Behemoth, aborting dungeon");
- a.nc = true;
- return;
- }
- if (localRSNPC1 != null)
- {
- a.AB = "Waiting for the behemoth to eat";
- a.JC();
- a.sleep(300, 500);
- }
- }
- if (a.calc.distanceTo(a.vE) > 1)
- {
- a.AB =
- "Repositioning to guard the food";
- if (!a.Y().isMoving())
- {
- a.A(a.vE, 0);
- }
- a.K(false);
- a.i(localRSNPC1);
- a.AB = "";
- }
- a.l(a.UC, 50, 60);
- a.sleep(200, 300);
- }
- else
- {
- if (!a.tc.equals("Astea Frostweb"))
- {
- if (a.i(new String[] { "Frostweb" }) ==
- null);
- }
- else
- {
- int i1 = 0;
- a.Qc = "Killing Astea Frostweb!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc =
- "Astea Frostweb";
- }
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- if (a.Sd)
- a.i(2);
- else {
- a.PD = a.xb;
- }
- if (a.jA()) {
- return;
- }
- if ((localObject2 = a.i(new String[] { "Frostweb" })) != null)
- {
- int i2 = ((RSNPC)
- localObject2).getID(); i3 = 1;
- i1 = 0;
- if (a.HC == 2)
- {
- i3 = 3;
- }
- else if (a.HC == 3) {
- i3 = 2;
- }
- if (i2 == i4) {
- i1 = 1;
- }
- else
- {
- i4 += 3;
- }
- a.AB = (i1 != 0 ? "Astea is protecting
- against us!" : "");
- if (a.SE.contains("A magical force"))
- {
- a.SE = "";
- a.JC();
- }
- else
- {
- RSNPC localRSNPC5;
- if (a.MC)
- {
- localRSNPC5 = a.i(new String[] { "spider" });
- if ((a.HC == 1) && (localRSNPC5 != null))
- {
- if (a.F(localRSNPC5))
- {
- a.sleep(500, 800);
- }
- }
- else if (a.JC())
- {
- a.sleep(200, 300);
- }
- else if ((a.HC == 1) && (a.calc.distanceTo((RSCharacter)localObject2) > 1))
- a.i((RSNPC)localObject2);
- a.MC = false;
- }
- else if (i1 != 0)
- {
- if (
- (localRSNPC5 = a.i(new
- String[] { "spider" })) != null)
- {
- if (a.F(localRSNPC5))
- {
- a.sleep(500, 800);
- }
- }
- else if (a.JC())
- {
- a.sleep(200, 300);
- }
- else if ((a.HC == 1) && (a.calc.distanceTo((RSCharacter)
- localObject2) > 1))
- {
- a.i((RSNPC)localObject2);
- }
- a.MC = false;
- }
- else
- {
- a.i((RSNPC)localObject2);
- }
- }
- a.l(a.UC, 50, 55);
- }
- a.sleep(200, 300);
- break label2523; } if (!a.tc.equals("Icy
- Bones")) { if (a.i(new String[] { "Bones" }) == null);
- }
- else
- {
- a.Qc = "Killing Icy Bones!";
- if (a.tc.isEmpty())
- {
- a.log
- (a.Qc);
- a.tc = "Icy Bones";
- }
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
- a.PD = a.Gd;
- if (a.h())
- break label2523;
- return;
- }
- Object localObject1;
- if ((a.tc.equals("Luminescent Icefiend")) || (localRSNPC3 != null))
- {
- localObject1 = null;
- a.Qc
- = "Killing the Luminescent Icefiend!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Luminescent Icefiend";
- }
- a.vE = null;
- a.l(false, Combat.Prayer.PROTECT_FROM_MISSILES, true);
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- if (a.jA()) {
- return;
- }
- if
- ((localRSNPC3 = a.i(new String[] { "Luminescent" })) != null)
- {
- if (localRSNPC3.getAnimation() == 13338)
- {
- if ((
- (localObject2 = a.i(new int[] { 51300 })) == null) || (a.walking.getEnergy() < a.random(8, 13)))
- {
- a.AB = (localObject2 != null ? "Out of run..
- Eating after the attack" : "Eating after the attack");
- }
- while (localRSNPC3.getAnimation() == 13338)
- {
- a.sleep(100, 200);
- continue;
- RSObject localRSObject2;
- if (
- (localRSObject2 = a.l((RSObject)localObject2, new int[] { 51300 })) != null)
- localObject1 = localRSObject2.getLocation();
- a.AB = "Dodging the icicles!";
- if (!a.walking.isRunEnabled())
- a.walking.setRun(true);
- else {
- a.sleep(500, 700);
- }
- a.sleep(300, 400);
- a.vE = ((RSObject)
- localObject2).getLocation();
- int i6;
- label1722: while ((localRSNPC3 != null) && (localRSNPC3.getAnimation() == 13338)) { if (!a.nb.contains
- (new RSTile[] { a.X() }))
- break;
- if (a.jA())
- {
- return;
- }
- if (a.vE !=
- null)
- {
- a.l(a.vE, 1);
- a.l(true);
- if ((!a.Y().isMoving()) || (a.Y().getAnimation() != -1))
- {
- a.l(a.vE, 1);
- a.sleep(500, 800);
- }
- a.sleep(30, 50);
- }
- if
- (localRSNPC3.getAnimation() != 13338)
- break;
- RSObject[] arrayOfRSObject;
- int i5 = (arrayOfRSObject = a.J(new int[] {
- 51300 })).length;
- RSObject localRSObject3;
- if ((localRSObject3 = arrayOfRSObject[i6]) != null)
- {
- RSTile
- localRSTile3 = localRSObject3.getLocation();
- if (((localObject1 == null) || (!localRSTile3.equals(localObject1))) && ((a.vE == null) || ((!
- localRSTile3.equals(a.vE)) && ((localRSTile3.getX() == a.vE.getX()) || (localRSTile3.getY() == a.vE.getY())))))
- {
- localObject1 =
- a.vE;
- a.vE = localRSTile3;
- break label1722;
- }
- }
- i6++;
- }
- a.l(a.UC, 15, 15);
- if (localRSNPC3 != null) {
- a.A(localRSNPC3.getLocation(), 1);
- }
- a.vE = null;
- }
- a.AB = "";
- }
- a.i(localRSNPC3);
- a.l(a.UC, 40, 40);
- }
- a.sleep(200, 300);
- }
- else if ((a.tc.equals("Plane-Freezer
- Lakhrahnaz")) || (localRSNPC4 != null))
- {
- a.Qc = "Killing Plane-freezer Lakhrahnaz!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Plane-Freezer Lakhrahnaz";
- }
- if (a.Sd)
- a.i(2);
- else {
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- }
- a.l(false,
- Combat.Prayer.PROTECT_FROM_MISSILES, true);
- if (a.jA()) {
- return;
- }
- if (
- (localRSNPC4 = a.i(new String[] { "Lakhrahnaz" })) !=
- null)
- {
- if (((a.MC) || ((a.HC == 1) && (a.calc.distanceTo(localRSNPC4) > 2))) && (!a.Y().isMoving()))
- {
- a.A
- (localRSNPC4.getLocation(), 0);
- a.MC = false;
- }
- localObject1 = a.objects.getNearest(new int[] { 49334 });
- if ((!a.l(localRSNPC4))
- && (a.calc.distanceTo(localRSNPC4) < 3) && (!a.Y().isMoving()) && (localObject1 != null) && (a.calc.distanceTo((RSObject)localObject1) < 3))
- {
- a.A
- (a.X(), 2);
- a.l(false);
- }
- a.i(localRSNPC4);
- a.l(a.UC, 45, 55);
- }
- a.sleep(100, 200);
- if ((localObject1 =
- a.objects.getNearest(a.gb)) != null)
- {
- a.l(((RSObject)localObject1).getLocation(), 1);
- a.K(false);
- if ((localObject2 =
- a.objects.getNearest(new int[] { 49334 })) != null)
- {
- a.AB = "Navigating to the nearest corner";
- while (localObject2 != null) { if
- ((localObject1 == null) || (a.calc.distanceTo((RSObject)localObject1) <= 1))
- break;
- if (a.jA())
- {
- return;
- }
- if ((localObject2 = a.objects.getNearest(new int[] { 49334 })) == null)
- {
- continue;
- }
- a.vE
- = ((RSObject)localObject2).getLocation();
- if (!a.Y().isMoving())
- {
- a.A(a.vE, 0);
- }
- if (!a.Y
- ().isMoving())
- a.A(a.X(), 5);
- a.sleep(300, 400);
- }
- a.l(((RSObject)localObject1).getLocation(), 0);
- a.AB =
- "";
- }
- }
- }
- else
- {
- if ((a.tc.equals("Blood Chiller")) || (localRSNPC2 != null))
- {
- a.Qc = "Killing the Blood
- Chiller!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Blood Chiller";
- }
- a.l(a.QC, null, false);
- a.PD
- = (a.bC != -1 ? a.bC : a.Gd);
- }
- while (a.objects.getNearest(a.gb) == null)
- {
- if (a.jA()) {
- return;
- }
- if
- (a.MC)
- {
- a.l(a.vc, 85, 30);
- a.MC = false;
- }
- a.i(localRSNPC2);
- a.l(a.UC, 50, 60);
- a.sleep(200, 300);
- continue;
- a.Qc = "Killing an unknown boss...";
- a.log(a.Qc);
- a.l(a.QC, null, false);
- if (a.h())
- break;
- return;
- }
- }
- }
- label2523: a.Ke = true;
- }
- private int TA()
- {
- int[] arrayOfInt1 = null; int[] arrayOfInt2 = null;
- int i1 = 0;
- int i2 = 1; int i3 = 1;
- int[] arrayOfInt3 = { 49348, 49349, 49350, 54408 };
- RSObject localRSObject1 = a.i(new int[] { 49345, 49346, 49347, 49348, 49349, 49350, 54407, 54408 });
- RSObject localRSObject2 = a.i(new int[] { 49351, 49352, 49353, 54409 });
- RSTile localRSTile1 = null;
- if ((localRSObject1 == null) || (localRSObject2 == null)) {
- return -1;
- }
- RSTile localRSTile2 = localRSObject1.getLocation();
- RSTile localRSTile3 = localRSObject2.getLocation();
- if (localRSTile2.getX() -
- localRSTile3.getX() < -4)
- {
- i2 = 1;
- i3 = 1;
- localRSTile1 = a.r.getNearestTile(a.y);
- }
- if (localRSTile2.getX() - localRSTile3.getX() > 4)
- {
- i2 = -1;
- i3 = -1;
- localRSTile1 = a.r.getNearestTile(new RSTile(20000, 20000));
- }
- if (localRSTile2.getY() - localRSTile3.getY() < -4)
- {
- i2 =
- -1;
- i3 = 1;
- localRSTile1 = a.r.getNearestTile(new RSTile(20000, 0));
- i1 = 1;
- }
- if (localRSTile2.getY() - localRSTile3.getY() > 4)
- {
- i2 =
- 1;
- i3 = -1;
- localRSTile1 = a.r.getNearestTile(new RSTile(0, 20000));
- i1 = 1;
- }
- int i4 = 0; int i5 = 0;
- if (localRSTile1 == null)
- return -
- 1;
- i4 = localRSTile1.getX();
- i5 = localRSTile1.getY();
- RSTile[] arrayOfRSTile1 = { new RSTile(i4 + 14 * i2, i5 + 5 * i3), new RSTile(i4 + 14 * i2, i5 + 7 *
- 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
- 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
- + 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
- + 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
- 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
- * 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 *
- i3), new RSTile(i4 + 1 * i2, i5 + 11 * i3) };
- RSTile[] arrayOfRSTile2 = { new RSTile(i4 + 5 * i2, i5 + 14 * i3), new RSTile(i4 + 7 * i2, i5 + 14 * i3), new RSTile
- (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 *
- 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
- * 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
- 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
- * 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
- * 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
- RSTile(i4 + 11 * i2, i5 + 1 * i3) };
- RSObject localRSObject3;
- RSObject localRSObject4;
- RSObject localRSObject5;
- RSObject localRSObject6;
- RSObject
- localRSObject7;
- if (i1 != 0)
- {
- a.Wd = arrayOfRSTile1;
- localRSObject3 = a.G(new RSTile(i4 + 4 * i2, i5 + 5 * i3));
- localRSObject4 = a.G(new RSTile
- (i4 + 9 * i2, i5 + 2 * i3));
- localRSObject5 = a.G(new RSTile(i4 + 5 * i2, i5 + 2 * i3));
- localRSObject6 = a.G(new RSTile(i4 + 3 * i2, i5 + 5 * i3));
- localRSObject7 = a.G(new RSTile(i4 + 3 * i2, i5 + 1 * i3));
- }
- else
- {
- a.Wd = arrayOfRSTile2;
- localRSObject3 = a.G(new RSTile(i4 + 5 * i2, i5 + 4 *
- i3));
- localRSObject4 = a.G(new RSTile(i4 + 2 * i2, i5 + 9 * i3));
- localRSObject5 = a.G(new RSTile(i4 + 2 * i2, i5 + 5 * i3));
- localRSObject6 = a.G(new
- RSTile(i4 + 5 * i2, i5 + 3 * i3));
- localRSObject7 = a.G(new RSTile(i4 + 1 * i2, i5 + 3 * i3));
- }
- int[] arrayOfInt4 = { 54412, 54413, 54414, 54415, 54416 };
- if (((localRSObject3 != null) && (localRSObject3.getID() > 49359) && (localRSObject3.getID() < 49375)) || (a.l(localRSObject3.getID(), arrayOfInt4)))
- {
- arrayOfInt1 = new int[] { 14, 29, 27, 26, 16, 7, 15 };
- arrayOfInt2 = new int[] { 15, 7, 16, 26, 27, 0, 29, 10, 4, 1, 0 };
- }
- else if (((localRSObject5 !=
- null) && (localRSObject5.getID() > 49359) && (localRSObject5.getID() < 49375)) || (a.l(localRSObject5.getID(), arrayOfInt4)))
- {
- arrayOfInt1 = new int[] { 14,
- 26, 16, 8, 4, 10, 20, 7, 13 };
- arrayOfInt2 = new int[] { 15, 7, 20, 10, 1, 0, 0, 11, 4, 8, 16, 26, 29, 0 };
- }
- else if (((localRSObject6 != null) &&
- (localRSObject6.getID() > 49359) && (localRSObject6.getID() < 49375)) || (a.l(localRSObject6.getID(), arrayOfInt4)))
- {
- arrayOfInt1 = new int[] { 14, 24, 29,
- 26, 10, 4, 8, 7, 15 };
- arrayOfInt2 = new int[] { 13, 7, 8, 4, 1, 0, 1, 10, 26, 27, 0, 0 };
- }
- else if (((localRSObject4 != null) && (localRSObject4.getID() >
- 49359) && (localRSObject4.getID() < 49375)) || (a.l(localRSObject4.getID(), arrayOfInt4)))
- {
- arrayOfInt1 = new int[] { 14, 1, 11, 27, 29, 26, 16, 22, 13 };
- arrayOfInt2 = new int[] { 15, 22, 16, 26, 29, 0, 27, 11, 0, 0 };
- }
- else if (((localRSObject7 != null) && (localRSObject7.getID() > 49359) &&
- (localRSObject7.getID() < 49375)) || (a.l(localRSObject7.getID(), arrayOfInt4)))
- {
- arrayOfInt1 = new int[] { 14, 29, 27, 4, 8, 22, 15 };
- arrayOfInt2 = new
- int[] { 15, 22, 8, 4, 1, 0, 0, 11, 27, 0 };
- }
- else
- {
- return -1;
- }
- if (a.jA())
- return 2;
- a.l(a.G(localRSTile3), "Pull");
- a.K(false);
- a.IC = false;
- while ((a.i(arrayOfInt3) == null) || (a.nD == null) || (!a.KD))
- {
- a.cB = arrayOfInt1;
- if (a.calc.distanceTo(localRSTile2) < 3)
- {
- a.cB = arrayOfInt2;
- }
- else
- {
- return a.calc.distanceTo(localRSTile3) < 4 ?
- a : -1;
- }
- int i6;
- if (a.AA()) {
- a.n
- ();
- }
- else if (a.jA())
- return 2;
- Object localObject;
- int i8;
- if (a.cB[i6] == 0)
- {
- a.lA();
- if (a.nD == null) {
- return -1;
- }
- localObject = a.G(a.nD);
- a.vE = (localObject == null ? a.nD : ((RSObject)localObject).getArea().getNearestTile(a.X()));
- a.l
- (a.vE, 1);
- a.l(false);
- a.K(false);
- if ((a.i(a.X())) && (a.calc.distanceTo(a.vE) < 3))
- {
- a.KD = true;
- break label3590;
- }
- }
- else
- {
- a.vE = a.Wd[(a.cB[i6] - 1)];
- if (a.cB == arrayOfInt2)
- {
- a.lA();
- }
- localObject = new Timer
- (a.random(45000, 90000));
- while ((a.Y().getAnimation() != 9516) || (a.calc.distanceTo(a.vE) > 2))
- {
- if (!((Timer)localObject).isRunning())
- {
- a.uC = "We got stuck";
- return -1;
- }
- if (a.AA())
- {
- a.n();
- }
- else if (a.jA())
- {
- return 2;
- }
- if ((a.Y().getAnimation() == -1) && (a.l(a.G(a.vE), "Go-through")))
- {
- a.sleep(100, 200);
- if
- ((a.Y().getAnimation() == 9516) && (a.calc.distanceTo(a.vE) < 3))
- break;
- a.sleep(200, 300);
- i8++; continue;
- }
- while ((!a.calc.tileOnScreen(a.vE)) && (a.Y().isMoving()) && (a.Y().getAnimation() == -1))
- a.sleep(200, 300);
- }
- a.K(true);
- a.sleep(300,
- 400);
- }
- i6++;
- label3590: RSObject localRSObject8;
- if ((
- (localRSObject8 = a.i(new int[] { 49345, 49346, 49347, 54407 })) != null) &&
- (a.calc.distanceTo(localRSObject8) < 3))
- {
- if (a.AA())
- {
- a.n();
- }
- else if (a.jA()) {
- return -1;
- }
- a.l
- (a.i(new int[] { 49345, 49346, 49347, 54407 }), "Open");
- a.K(false);
- a.EA();
- if (a.yd != null)
- {
- int i7 = a.yd.getItem().getID();
- a.l(a.yd);
- a.sleep(400, 600);
- i8++;
- }
- a.K(false);
- a.lA();
- }
- }
- a.NA = true;
- return 1;
- }
- private boolean
- l(int arg0, int arg1, int arg2, int arg3)
- {
- return true;
- }
- private int OA()
- {
- int[] arrayOfInt = { 39912, 39913, 39920, 39929, 39931 };
- boolean bool =
- false;
- RSObject localRSObject1 = a.i(new int[] { 54565, 54567, 54645 });
- RSObject localRSObject2 = a.i(new int[] { 49934, 49935, 49936, 53749 });
- RSObject
- localRSObject3 = a.i(new int[] { 39917, 39928, 39947, 54647 });
- RSObject localRSObject4 = a.i(new int[] { 54566, 54568, 54570, 54646 });
- RSObject localRSObject5
- = a.i(new int[] { 54257, 54258, 54259, 54260 });
- a.jA = a.npcs.getNearest(a.B);
- if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
- {
- if ((!a.QB()) || ((a.HC == 1) && (!a.ZA())))
- {
- return 2;
- }
- }
- bool = a.F(a.u) == null;
- a.A(bool);
- if (a.hd == null)
- {
- a.hd = new
- Timer(a.random(240000, 300000));
- }
- do
- {
- if (a.jA()) {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- a.l(a.vc, 50, 50);
- if
- (a.i(arrayOfInt) != null)
- {
- if (a.inventory.contains(19668))
- {
- if (a.l("Climbing hook", a.J(new String[] { "Bridge" })))
- {
- a.l(bool);
- a.K(true);
- a.sleep(300, 500);
- }
- }
- else if (a.inventory.containsAll(new int[] { 19667, 19664 }))
- {
- a.inventory.useItem(a.inventory.getItem(new int[] { 19667 }), a.inventory.getItem(new int[] { 19664 }));
- }
- else if ((a.inventory.contains(19665)) &&
- (!a.inventory.contains(19667)))
- {
- a.l(localRSObject2, "Spin");
- a.K(true);
- }
- else if ((a.inventory.contains(19663)) && (!
- a.inventory.contains(19664)))
- {
- a.l(localRSObject5, "Smith");
- }
- else if (!a.inventory.containsOneOf(new int[] { 19665, 19667 }))
- {
- a.l(localRSObject4, "Take-from");
- }
- else if (!a.inventory.containsOneOf(new int[] { 19663, 19664 }))
- {
- a.l(localRSObject1,
- "Take-from");
- }
- }
- else if (a.l(localRSObject3, "Operate"))
- {
- a.x();
- a.K(true);
- a.sleep(2300, 2700);
- }
- a.K(bool);
- }
- while (!a.Rc());
- a.sleep(800, 1100);
- if (a.M)
- {
- a.f();
- }
- return 1;
- }
- public void mouseMoved(MouseEvent a)
- {
- a.Xe = a.getPoint();
- if
- (a.Pf.contains(a.Xe))
- {
- if (a.kc.contains(a.Xe))
- {
- a.pA = ((!a.qd ? "Pause" : "Resume") + " iDungeon");
- }
- else if (a.Pg.contains(a.Xe)) {
- a.pA = "Terminate iDungeon";
- }
- else if (a.Rb.contains(a.Xe)) {
- a.pA = "Visit the iDungeon forums";
- }
- else if (a.Q.contains(a.Xe))
- {
- a.pA = "iDungeon help guide";
- }
- else if (a.ag.contains(a.Xe)) {
- a.pA = "Hide paint";
- }
- else
- {
- a.pA = "";
- }
- }
- else if (a.dc)
- {
- a.Nd = "Choose your settings!";
- if ((a.uB > 0) && (a.fD.contains(a.Xe))) {
- a.Nd = "<<< Previous page";
- }
- else if
- (a.Vb.contains(a.Xe)) {
- a.Nd = (a.uB < 5 ? (a.Nd = "Next page >>>") : "Finish the settings");
- }
- else if (a.o.contains(a.Xe))
- {
- a.Nd =
- "These guys kick ass!";
- }
- else if ((a.uB == 0) && (a.DC == 0))
- {
- if (a.wA.contains(a.Xe)) {
- a.Nd = "Set your primary combat to melee";
- }
- else if (a.aB.contains(a.Xe)) {
- a.Nd = "Set your primary combat to range";
- }
- else if (a.mC.contains(a.Xe))
- {
- a.Nd
- = "Set your secondary combat to melee";
- }
- else if (a.fC.contains(a.Xe))
- {
- a.Nd = "Set your secondary combat to range";
- }
- else if (a.lF.contains(a.Xe))
- {
- a.Nd = "Set your secondary combat to mage";
- }
- else if (a.Ag.contains(a.Xe))
- {
- a.Nd =
- "Load your settings on startup";
- }
- else if (a.RE.contains(a.Xe)) {
- a.Nd = "Save your settings for next time";
- }
- }
- else if (a.uB
- == 1)
- {
- if (a.xd.contains(a.Xe)) {
- a.Nd = "General script settings";
- }
- else if (a.iC.contains(a.Xe))
- a.Nd = "Advanced floor
- settings & complexity";
- else if (a.DC == 1)
- {
- if (a.JD.contains(a.Xe)) {
- a.Nd = "Pick up and bury bones";
- }
- else if
- (a.Mb.contains(a.Xe))
- {
- a.Nd = "Collect the arrows you use up";
- }
- else if (a.JG.contains(a.Xe))
- a.Nd = "Loot heim
- crabs, for extra hp";
- else if (a.Dc.contains(a.Xe)) {
- a.Nd = "Enable protect prayers for bosses";
- }
- else if (a.lf.contains(a.Xe))
- {
- a.Nd = "Use quick prayers in addition";
- }
- else if (a.Ye.contains(a.Xe))
- a.Nd = "Enable this to open prayer doors";
- else if (a.zd.contains(a.Xe))
- {
- a.Nd = "Prevents defense training";
- }
- else if (a.qF.contains(a.Xe)) {
- a.Nd = "Switch
- attack styles by weakness";
- }
- else if (a.Cd.contains(a.Xe))
- {
- a.Nd = "Venture into the Occult";
- }
- }
- else
- if (a.DC == 2)
- {
- if ((a.V.contains(a.Xe)) || (a.Ub.contains(a.Xe))) {
- a.Nd = "Cycle the dungeon complexity";
- }
- else if
- ((a.lb.contains(a.Xe)) || (a.p.contains(a.Xe))) {
- a.Nd = "Select the complexity to rush at";
- }
- else if ((a.qf.contains(a.Xe)) ||
- (a.D.contains(a.Xe))) {
- a.Nd = "Select the floor to rush to";
- }
- else if (a.F.contains(a.Xe))
- {
- a.Nd = "Intelligently
- reset your progress";
- }
- else if (a.bE.contains(a.Xe))
- {
- a.Nd = "Paint doors and rooms on the map";
- }
- else if
- (a.WB.contains(a.Xe))
- {
- a.Nd = "Blacks out all usernames - BETA";
- }
- else if (a.gC.contains(a.Xe))
- {
- a.Nd =
- "Enable rushing of certain floors";
- }
- else if (a.wc.contains(a.Xe))
- {
- a.Nd = "Enable food pickup when rushing";
- }
- }
- }
- }
- }
- private int NA()
- {
- RSNPC localRSNPC = a.i(new String[] { "Mercenary leader" });
- a.XF = true;
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC,
- true);
- a.A(false);
- if (a.jA())
- {
- return 2;
- }
- if ((
- (localRSNPC = a.i(new String[] { "Mercenary leader" })) != null) &&
- (localRSNPC.getAnimation() == 710))
- a.F(localRSNPC, "Attack");
- else
- a.F(localRSNPC);
- if (a.MC)
- {
- if (!a.JC())
- {
- a.sleep(600, 900);
- }
- a.MC = false;
- }
- if (a.l(a.UC, 50, 55))
- a.F(localRSNPC, "Attack");
- a.sleep(500, 1000);
- if (a.jA())
- {
- return 2;
- }
- a.l(false,
- Combat.Prayer.PROTECT_FROM_MAGIC, false);
- a.XF = false;
- return 1;
- }
- private int qA()
- {
- if ((!a.O()) || (!a.L())) {
- return -1;
- }
- int[]
- arrayOfInt1 = { 54504, 54546, 54623 }; int[] arrayOfInt2 = { 54506, 54548, 54625 }; int[] arrayOfInt3 = { 54508, 54550, 54627 }; int[] arrayOfInt4 = { 54510, 54552,
- 54629 };
- int[][] arrayOfInt5 = { arrayOfInt1, arrayOfInt2, arrayOfInt3, arrayOfInt4 };
- int[] arrayOfInt6 = { 19869, 19871, 19873, 19875 };
- String[]
- arrayOfString = { "Blue", "Green", "Yellow", "Violet" };
- RSArea localRSArea = a.i(a.I).getArea();
- RSObject localRSObject1 = a.i(new int[] { 35241, 35242, 35243,
- 35245 });
- int i6;
- while (!a.KD)
- {
- if (a.jA())
- {
- return 2;
- }
- int i1 = 1;
- Object localObject1;
- int i3 = (localObject1 =
- arrayOfInt5).length;
- int i5;
- int[] arrayOfInt8 = localObject1[i5];
- RSObject[] arrayOfRSObject;
- int i9 = (arrayOfRSObject = a.J
- (arrayOfInt8)).length;
- int i10;
- RSObject localRSObject3 = arrayOfRSObject[i10];
- if (a.D(localRSObject3.getLocation()) == null)
- {
- i1 = 0;
- }
- else
- {
- i10++;
- i5++;
- }
- Object localObject4;
- if (i1 != 0)
- {
- Object localObject2;
- Object localObject3;
- while (!a.inventory.containsAll(arrayOfInt6))
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- a.l(a.vc, 40, 40);
- localObject1 = "";
- localObject2 = localRSObject1.getLocation();
- int i7 = (localObject3 =
- arrayOfString).length;
- int i8;
- localObject4 = localObject3[i8];
- if (a.inventory.getItemID((String)localObject4 + " vial") == -1)
- {
- localObject1 = localObject4;
- }
- else {
- i8++;
- }
- if (a.interfaces.get(238).isValid()) {
- a.l
- (a.interfaces.get(238), new String[] { localObject1 });
- }
- else if (a.calc.distanceTo((RSTile)localObject2) > 3)
- a.F((RSTile)localObject2);
- else if (a.l(localRSObject1, "Take-bottle"))
- {
- a.K(true);
- }
- }
- while (a.inventory.containsOneOf(arrayOfInt6))
- {
- int i2;
- if (a.jA())
- {
- return 2;
- }
- if ((localObject2 = a.i(arrayOfInt5[i2])) != null)
- {
- a.vE = ((RSObject)localObject2).getLocation();
- if (((localObject3 = a.D(a.vE)) != null) &&
- (a.inventory.contains(arrayOfInt6[i2])))
- {
- a.F(((RSNPC)localObject3).getLocation());
- a.l(arrayOfInt6[i2], (RSNPC)localObject3);
- a.K(false);
- }
- }
- i2++;
- a.sleep(200, 400);
- }
- }
- int[][] arrayOfInt7;
- int i4 = (arrayOfInt7 = arrayOfInt5).length; [I local[I = arrayOfInt7[i6];
- RSObject localRSObject2;
- if ((localRSObject2 = a.i(local[I)) != null)
- {
- a.vE = localRSObject2.getLocation();
- localObject4 = a.l(a.vE, "block");
- while ((localObject4 != null) && (a.D(a.vE) == null))
- {
- if (a.jA())
- return 2;
- if (!a.j()) {
- return -1;
- }
- i10 = 1; int i11 = 1;
- RSTile localRSTile1 = null; RSTile localRSTile2 = null; RSTile localRSTile3 = null; RSTile localRSTile4 = null; RSTile
- localRSTile5 = ((RSNPC)localObject4).getLocation();
- int i12 = 0; int i13 = 0; int i14 = localRSTile5.getX(); int i15 = localRSTile5.getY();
- if (i14 <
- a.vE.getX())
- {
- localRSTile1 = new RSTile(i14 + 1, i15);
- localRSTile2 = new RSTile(i14 + 2, i15);
- i13 = 1;
- }
- else if (i14 > a.vE.getX())
- {
- localRSTile1 = new RSTile(i14 - 1, i15);
- localRSTile2 = new RSTile(i14 - 2, i15);
- i13 = -1;
- }
- RSNPC localRSNPC;
- if (localRSTile1 != null)
- {
- i10 = 0;
- if ((localRSNPC = a.D(localRSTile1)) == null) {
- a.D(localRSTile2);
- }
- if (localRSNPC == null) { if (!localRSArea.contains(new RSTile[] { localRSTile1, localRSTile2 }));
- }
- else
- {
- a.log("The X pull is blocked!");
- i10 = 1;
- }
- }
- if (i15 < a.vE.getY())
- {
- localRSTile3 = new RSTile(i14, i15 + 1);
- localRSTile4 = new RSTile(i14, i15 + 2);
- i12 = 1;
- }
- else if (i15 > a.vE.getY())
- {
- localRSTile3 = new RSTile(i14, i15 - 1);
- localRSTile4 = new RSTile(i14, i15 - 2);
- i12 = -1;
- }
- if (localRSTile3
- != null)
- {
- i11 = 0;
- if (
- (localRSNPC = a.D(localRSTile3)) == null)
- a.D(localRSTile4);
- if
- (localRSNPC == null)
- {
- if (!localRSArea.contains(new RSTile[] { localRSTile3, localRSTile4 }));
- }
- else
- {
- a.log("The Y pull is blocked!");
- i11 = 1;
- }
- }
- if (i10 == 0)
- {
- a.F(localRSTile5, i13, 0);
- if (a.l((RSNPC)localObject4, "Pull"))
- {
- a.l(true);
- a.K(true);
- }
- else
- {
- a.sleep(200,
- 400);
- }
- }
- else if (i11 == 0)
- {
- a.F(localRSTile5, 0, i12);
- if (a.l((RSNPC)localObject4, "Pull"))
- {
- a.l(true);
- a.K(true);
- }
- else
- {
- a.sleep(200, 400);
- }
- }
- else
- {
- a.log("No good pull tile found, trying another statue!");
- break;
- }
- }
- }
- i6++;
- }
- a.lA();
- a.F(a.nD);
- return 1;
- }
- private void vA()
- {
- for (Iterator localIterator = a.ID.iterator(); localIterator.hasNext(); ) { int i1 = ((Integer)localIterator.next()).intValue();
- RSObject localRSObject;
- RSTile localRSTile = localRSObject.getLocation();
- if (!a.J.contains(localRSTile))
- {
- int i3;
- a.J.add
- (localRSObject.getLocation());
- i3++;
- i2++;
- }
- }
- int i2;
- }
- private int xA()
- {
- int[] arrayOfInt = { 50762, 51313, 51861, 54889 };
- int i1
- = 0; int i2 = 0; int i3 = 0;
- int i4;
- RSNPC localRSNPC1 = a.D(new int[] { a.fb[i4] });
- RSNPC localRSNPC2 = a.D(new int[] { a.OB[i4] });
- RSTile localRSTile1;
- int i6;
- if ((localRSNPC1 != null) && (localRSNPC2 != null))
- {
- localRSTile1 = a.l(localRSNPC2.getLocation(), arrayOfInt);
- RSTile localRSTile2 = a.l
- (localRSNPC1.getLocation(), arrayOfInt);
- if ((localRSTile1 == null) || (localRSTile2 == null)) {
- return -1;
- }
- i6 = localRSTile1.getX() -
- localRSTile2.getX();
- int i7 = localRSTile1.getY() - localRSTile2.getY();
- if (Math.abs(i6) > Math.abs(i7)) {
- i1 = i6 > 0 ? -7 : 7;
- }
- else if
- (Math.abs(i6) < Math.abs(i7)) {
- i2 = i7 > 0 ? -7 : 7;
- }
- else
- {
- return -1;
- }
- }
- else
- {
- i4++;
- }
- while (!a.KD)
- {
- if (a.jA())
- {
- return 2;
- }
- localRSNPC1 = a.npcs.getNearest(new int[] { a.fb[i4] });
- localRSNPC2 = a.npcs.getNearest(new int[] { a.OB[i4]
- });
- if ((localRSNPC1 != null) && (localRSNPC2 != null))
- {
- localRSTile1 = localRSNPC2.getLocation();
- a.vE = new RSTile(localRSTile1.getX() + i1,
- localRSTile1.getY() + i2);
- if (localRSNPC1 != null)
- {
- if (a.jA()) {
- return 2;
- }
- if (a.KD)
- break;
- int i5 = 1; i6 = 1;
- RSTile localRSTile3 = null; RSTile localRSTile4 = null; RSTile localRSTile5 = null; RSTile localRSTile6 = null; RSTile localRSTile7 =
- localRSNPC1.getLocation();
- int i8 = 0; int i9 = 0; int i10 = localRSTile7.getX(); int i11 = localRSTile7.getY();
- if (i10 < a.vE.getX())
- {
- localRSTile3 = new RSTile(i10 + 1, i11);
- localRSTile4 = new RSTile(i10 - 1, i11);
- i9 = -1;
- }
- else if (i10 > a.vE.getX
- ())
- {
- localRSTile3 = new RSTile(i10 - 1, i11);
- localRSTile4 = new RSTile(i10 + 1, i11);
- i9 = 1;
- }
- RSNPC
- localRSNPC3;
- RSNPC localRSNPC4;
- if (localRSTile3 != null)
- {
- i5 = 0;
- localRSNPC3 = a.D(localRSTile3); localRSNPC4 =
- a.D(localRSTile4);
- if ((localRSNPC3 != null) || (localRSNPC4 != null))
- i5 = 1;
- }
- if (i11 < a.vE.getY())
- {
- localRSTile5 = new RSTile(i10, i11 + 1);
- localRSTile6 = new RSTile(i10, i11 - 1);
- i8 = -1;
- }
- else if (i11 > a.vE.getY())
- {
- localRSTile5 = new RSTile(i10, i11 - 1);
- localRSTile6 = new RSTile(i10, i11 + 1);
- i8 = 1;
- }
- if (localRSTile5 !=
- null)
- {
- i6 = 0;
- localRSNPC3 = a.D(localRSTile5); localRSNPC4 = a.D(localRSTile6);
- if ((localRSNPC3 != null) || (localRSNPC4
- != null))
- {
- i6 = 1;
- }
- }
- if (i3 > 30)
- {
- a.uC = "No pushable statue found";
- return -
- 1;
- }
- if (i5 == 0)
- {
- a.l(localRSTile7, i9, 0);
- if (a.l(localRSNPC1, "Push"))
- {
- a.K(true);
- i3 = 0;
- }
- }
- else if (i6 == 0)
- {
- a.l(localRSTile7, 0, i8);
- if (a.l(localRSNPC1, "Push"))
- {
- a.K(true);
- i3 = 0;
- }
- }
- else
- {
- i3++;
- break label798;
- }
- a.sleep
- (300, 500);
- }
- }
- label798: i4++;
- }
- if (!a.ZA())
- return 2;
- return 1;
- }
- private void VA()
- {
- a.ob.clear();
- for (Object localObject1
- = a.zc.iterator(); ((Iterator)localObject1).hasNext(); )
- {
- int i1 = (localObject2 = (RSObject)((Iterator)localObject1).next())
- .getID();
- localObject3 = ((RSObject)localObject2).getLocation();
- a.fc.add(localObject3);
- a.ob.add(localObject3);
- a.J.add(localObject3);
- a.GB.add
- (localObject3);
- a.ob.add(localObject3);
- a.J.add(localObject3);
- int i2 = (localObject4 = a.Cf).length;
- int i3;
- int[] arrayOfInt = localObject4
- [i3];
- a.ob.add(localObject3);
- a.ID.add(Integer.valueOf(i1));
- a.vF.add(localObject3);
- i3++;
- if (a.Zc > 4)
- {
- if (a.l(i1, a.mD))
- {
- a.gc.add(localObject3);
- }
- else if (a.l(i1, a.Af))
- {
- if (a.kd)
- a.gc.add(localObject3);
- else {
- a.fG.add(localObject3);
- }
- }
- else if (a.l(i1, a.rg))
- {
- if (!a.xe)
- {
- a.fG.add(localObject3);
- a.gE =
- true;
- }
- else
- {
- a.gc.add(localObject3);
- }
- }
- else if (a.l(i1, a.Yf))
- {
- a.id.add
- (localObject3);
- a.ob.add(localObject3);
- a.J.add(localObject3);
- }
- else if (a.l(i1, a.tD))
- {
- if (a.kd)
- {
- a.id.add(localObject3);
- a.ob.add(localObject3);
- a.J.add(localObject3);
- }
- else
- {
- a.fG.add(localObject3);
- }
- }
- else if (a.l(i1, a.sb))
- {
- a.ob.add(localObject3);
- a.J.add(localObject3);
- }
- }
- }
- Object
- localObject3;
- Object localObject4;
- a.AG.clear();
- a.zc.clear();
- localObject1 = new ArrayList();
- for (Object localObject2 = a.fG.iterator(); ((Iterator)
- localObject2).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject2).next();
- if (a.ZA.contains(new RSTile[] { localRSTile }))
- {
- for
- (localObject3 = a.ob.iterator(); ((Iterator)localObject3).hasNext(); ) { localObject4 = (RSTile)((Iterator)localObject3).next();
- if (a.calc.distanceBetween
- ((RSTile)localObject4, localRSTile) < 4.0D)
- ((ArrayList)localObject1).add(localObject4);
- }
- }
- }
- RSTile localRSTile;
- a.fG.addAll
- ((Collection)localObject1);
- a.fA.addAll((Collection)localObject1);
- a.ob.removeAll(a.fG);
- a.J.removeAll(a.fG);
- a.fA.addAll(a.gc);
- a.fA.addAll(a.vF);
- a.fA.addAll(a.ob);
- a.Bd.addAll(a.ob);
- if (a.nD != null)
- {
- a.w.add(a.nD);
- a.J.remove(a.nD);
- a.QA = a.nD;
- }
- else if (a.Nc.size() > 1)
- {
- a.log.severe("Near door was null when reassigning.");
- }
- }
- private int yA()
- {
- int[] arrayOfInt1 = { 12125, 12133, 12141, 12149 }; int[] arrayOfInt2 = {
- 12126, 12134, 12142, 12150 }; int[] arrayOfInt3 = { 12127, 12135, 12143, 12151 };
- int[] arrayOfInt4 = { 12128, 12136, 12144, 12152 }; int[] arrayOfInt5 = { 12129,
- 12137, 12145, 12153 }; int[] arrayOfInt6 = { 12130, 12138, 12146, 12154 };
- int[] arrayOfInt7 = { 12131, 12139, 12147, 12155 }; int[] arrayOfInt8 = { 12132, 12140,
- 12148, 12156 }; Object localObject = null;
- int[][] arrayOfInt9 = { arrayOfInt1, arrayOfInt2, arrayOfInt3 };
- int[][] arrayOfInt10 = { arrayOfInt4, arrayOfInt5,
- arrayOfInt6 };
- int[][] arrayOfInt11 = { arrayOfInt7, arrayOfInt8, localObject };
- int[][][] arrayOfInt = { arrayOfInt9, arrayOfInt10, arrayOfInt11 };
- int[]
- arrayOfInt12 = { 54321, 54322, 54323 };
- RSTile localRSTile1;
- if (
- (localRSTile1 = a.F(a.y, arrayOfInt12)) == null) {
- return -1;
- }
- int i1 =
- localRSTile1.getX(); int i2 = localRSTile1.getY();
- RSTile[] arrayOfRSTile1 = { new RSTile(i1 + 1, i2 + 5), new RSTile(i1 + 3, i2 + 5), new RSTile(i1 + 5, i2 + 5) };
- RSTile[] arrayOfRSTile2 = { new RSTile(i1 + 1, i2 + 3), new RSTile(i1 + 3, i2 + 3), new RSTile(i1 + 5, i2 + 3) };
- RSTile[] arrayOfRSTile3 = { new RSTile(i1 + 1,
- i2 + 1), new RSTile(i1 + 3, i2 + 1), new RSTile(i1 + 5, i2 + 1) };
- RSTile[][] arrayOfRSTile; = { arrayOfRSTile1, arrayOfRSTile2, arrayOfRSTile3 };
- if (a.jA())
- {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- a.l(a.vc, 40, 50);
- int i3;
- if ((i3 = 0) < arrayOfRSTile;.length)
- {
- int i4;
- RSTile
- localRSTile2 = arrayOfRSTile;[i3][i4];
- if (a.D(localRSTile2) == null)
- {
- a.vE = localRSTile2;
- a.A(a.vE, "Move");
- RSNPC localRSNPC = a.D
- (arrayOfInt[i3][i4]);
- if (a.F(localRSNPC, "Move"))
- {
- a.K(true);
- while (true) {
- a.sleep(200, 300);
- }
- }
- }
- else
- {
- i4++;
- i3++;
- }
- }
- a.sleep(200, 300);
- return 1;
- }
- private int nA()
- {
- RSObject localRSObject = a.i(new int[] { 49543,
- 49544, 49545, 53995 });
- String str = "";
- if (a.jA())
- {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- int i1 = a.inventory.getItemID("Spare
- construct " + str + " (u)");
- RSNPC localRSNPC2 = a.i(new String[] { "Dormant construct" });
- a.l(a.vc, 50, 55);
- if (str.isEmpty())
- {
- if (!
- a.SE.contains("missing")) if (a.F(a.i(new String[] { "construct" }), "Examine"))
- {
- a.K(true);
- }
- if (a.SE.contains("arm"))
- str =
- "arm";
- else if (a.SE.contains("leg"))
- {
- str = "leg";
- }
- else if (a.SE.contains("head"))
- {
- str = "head";
- }
- if (!
- str.isEmpty())
- {
- a.log("Construct is missing its " + str + ".");
- }
- }
- else if (localRSNPC2 != null)
- {
- if (a.F(localRSNPC2, "Charge"))
- {
- a.K(true);
- a.sleep(1000, 1500);
- }
- }
- else if ((i1 > 0) && (a.inventory.contains(i1)))
- {
- a.inventory.getItem(new int[] { i1
- }).doAction("Imbue");
- }
- else if (a.inventory.getItemID("Spare construct " + str) != -1)
- {
- if (a.F(a.i(new String[] { "construct" }), "Repair"))
- {
- a.K(true);
- a.sleep(1000, 1500);
- }
- }
- else if (a.interfaces.get(451).isValid())
- {
- if (a.l(a.interfaces.get(451), new String[] { str }))
- {
- a.sleep(400, 600);
- }
- }
- else if (a.inventory.containsAll(new int[] { 17364, 17444 }))
- {
- a.inventory.getItem(new int[] { 17364 }).doAction
- ("Carve");
- a.sleep(400, 600);
- }
- else if (!a.inventory.contains(17444))
- {
- a.l(a.groundItems.getNearest(new int[] { 17444 }));
- }
- else if (!
- a.inventory.contains(17364))
- {
- a.l(localRSObject, "Take");
- a.sleep(400, 600);
- }
- a.K(true);
- a.lA();
- RSNPC localRSNPC1 = a.i(new String[] {
- "Magic construct" });
- int i2;
- if ((i2 = 0) < 40)
- {
- if ((localRSNPC1 == null) || (a.nD == null))
- {
- if (i2 > 20)
- {
- break
- label800;
- }
- }
- else
- {
- RSTile localRSTile;
- if (a.calc.distanceTo(localRSTile) > a.random(5, 8))
- {
- a.A(localRSTile,
- 1);
- }
- else if (!a.JC()) {
- a.sleep(400, 1000);
- }
- }
- a.sleep(600, 800);
- i2++;
- }
- label800: return 1;
- }
- private int QA
- ()
- {
- int[] arrayOfInt1 = { 49619, 49620, 49621, 49622, 49623, 49624 };
- int[] arrayOfInt2 = { 49609, 49610, 49611 };
- RSTile localRSTile1 = a.tA();
- a.lA();
- if ((localRSTile1 == null) || (a.nD == null))
- {
- return -1;
- }
- RSTile localRSTile2 = a.r.getCentralTile();
- if (a.jA())
- {
- return 2;
- }
- if
- (!a.j())
- {
- return -1;
- }
- a.l(a.vc, 40, 50);
- a.EA();
- if (a.AB.contains("reengage"))
- {
- a.lA();
- }
- if ((a.yd != null) && (a.l
- (a.yd.getLocation(), false)))
- {
- a.l(a.yd);
- }
- else
- {
- RSObject localRSObject1;
- RSObject localRSObject2;
- RSObject localRSObject3;
- if
- ((a.calc.distanceTo(a.nD) > 4) && (!a.l(localRSTile2, false)))
- {
- a.vE = localRSTile2;
- if ((localRSObject1 = a.l(arrayOfInt2)) != null)
- {
- if (a.kd)
- {
- a.l(localRSObject1, "Repair");
- if ((!a.x()) && (!a.x())) {
- a.l(localRSObject1, "Repair");
- }
- }
- else
- {
- a.A(localRSTile2, 1);
- }
- }
- else if (
- (localRSObject2 = a.i(localRSTile1, arrayOfInt1)) !=
- null)
- {
- a.l(localRSObject2, "Destroy");
- }
- else if (
- (localRSObject3 = a.i(localRSTile1, a.Yd)) != null)
- {
- a.l
- (localRSObject3, "Destroy");
- if ((a.x()) || (a.x()))
- {
- localRSObject1 = a.i(arrayOfInt2);
- if ((a.kd) && (localRSObject1 !=
- null) && (a.calc.distanceTo(localRSObject1.getLocation()) < 3))
- {
- a.l(localRSObject1, "Repair");
- if (!a.x())
- {
- a.l(localRSObject1, "Repair");
- }
- }
- else
- {
- a.A(localRSTile2, 1);
- }
- }
- }
- }
- else
- {
- a.vE = a.nD;
- if (((localRSObject1 = a.i(a.vE, arrayOfInt1)) == null) ||
- (!a.F(localRSObject1)))
- {
- if (
- (localRSObject2 = a.i(a.vE, a.Yd)) != null)
- {
- a.l(localRSObject2, "Destroy");
- a.K(true);
- localRSObject3 = a.l
- (arrayOfInt2);
- if ((a.kd) && (localRSObject3 != null))
- {
- a.l(localRSObject3, "Repair");
- a.sleep(400, 600);
- a.l(localRSObject3, "Repair");
- }
- else
- {
- a.l(localRSObject1, "Destroy");
- }
- }
- }
- else if
- (a.l(localRSObject1, "Destroy")) {
- a.K(true);
- }
- else
- {
- a.A(a.vE, 1);
- }
- }
- }
- a.K(true);
- a.NA = true;
- return 1;
- }
- private boolean l(int a, int[] a)
- {
- int i2;
- if ((a != null) && (a > 0))
- {
- int[] arrayOfInt;
- int i1 = (arrayOfInt = a).length; int i3
- = arrayOfInt[i2];
- if (a == i3)
- return true;
- i2++;
- }
- return false;
- }
- private RSTile tA()
- {
- Object localObject;
- if (!a.fc.isEmpty()) {
- for (localObject = a.fc.iterator(); ((Iterator)localObject).hasNext(); ) { RSTile localRSTile = (RSTile)((Iterator)localObject).next();
- if (a.r.contains(new
- RSTile[] { localRSTile })) {
- return localRSTile;
- }
- }
- }
- else if ((localObject = a.i(a.XE)) != null) {
- return ((RSObject)
- localObject).getLocation();
- }
- return (RSTile)null;
- }
- private boolean zA()
- {
- a.Qc = "Opening a standard door";
- if (a.ZA != null);
- if ((a.jA()) ||
- (a.nD == null)) {
- return false;
- }
- a.uA();
- if (a.FA != null) if (a.FA.contains(new RSTile[] { a.nD }))
- {
- if (a.calc.distanceTo(a.nD) > 4)
- {
- a.SE = "";
- }
- else if (a.SE.contains("guardians"))
- {
- if (a.npcs.getNearest(a.B) != null)
- {
- if ((!a.QB())
- || (!a.ZA())) {
- return false;
- }
- }
- else
- {
- a.log("Undetectable Guardians, removing door.");
- a.fG.add(a.nD);
- a.Bd.remove(a.nD);
- a.w.remove(a.nD);
- a.J.remove(a.nD);
- return true;
- }
- a.SE = "";
- }
- else if ((a.MC) && (a.calc.tileOnScreen(a.nD)))
- {
- if (a.calc.distanceTo(a.nD) < 4)
- {
- a.camera.moveRandomly(a.random(800,
- 1400));
- a.A(a.nD, "");
- }
- else
- {
- a.l(a.nD, 1);
- }
- a.MC = false;
- }
- else
- {
- if ((a.SE.contains("not open")) || (a.SE.contains("won't open")))
- {
- a.log("Undetected puzzle door, removing!");
- if (a.UA)
- {
- a.env.saveScreenshot(false);
- }
- a.fG.add(a.nD);
- a.Bd.remove(a.nD);
- a.J.remove(a.nD);
- a.Q();
- return true;
- }
- if (a.SE.contains("don't have the correct"))
- {
- a.log.severe("Hmm.. we got tricked, we don't have the right key!");
- a.fG.add(a.nD);
- a.fG.add(a.WA);
- a.J.remove(a.nD);
- return true;
- }
- }
- if (a.l(a.G(a.nD)))
- {
- a.K(false);
- if (a.i(false))
- {
- return true;
- }
- }
- else
- {
- a.sleep(100, 200);
- }
- }
- a.sleep(100, 200);
- return true;
- }
- private boolean A(RSTile a, int a)
- {
- if (a.i(a, a))
- {
- a.l(false);
- return true;
- }
- return false;
- }
- private boolean l(RSInterface a, String[] a)
- {
- int i2;
- if ((a != null) && (a.isValid()))
- {
- RSComponent[] arrayOfRSComponent;
- int i1 =
- (arrayOfRSComponent = a.getComponents()).length; RSComponent localRSComponent = arrayOfRSComponent[i2];
- String[] arrayOfString;
- int i3 = (arrayOfString =
- a).length;
- int i4;
- String str = arrayOfString[i4];
- if (localRSComponent.getText().toLowerCase().contains(str.toLowerCase()))
- {
- return
- localRSComponent.doClick();
- }
- i4++;
- i2++;
- }
- return false;
- }
- private boolean PA()
- {
- if ((!a.Y().isMoving()) && (a.FA != null))
- {
- if
- ((a.Qc.contains("Opening")) && (a.nD != null) && (a.calc.distanceTo(a.nD) < 6)) {
- return false;
- }
- RSTile localRSTile1 = null; RSTile localRSTile2 =
- null;
- if (a.jA != null)
- {
- if (a.jA.isInCombat()) {
- return false;
- }
- localRSTile1 = a.jA.getLocation();
- if
- (a.calc.distanceBetween(a.X(), localRSTile1) <= 1.0D) {
- return false;
- }
- }
- if (a.yd != null)
- {
- localRSTile2 = a.yd.getLocation();
- if (a.calc.distanceBetween(a.X(), localRSTile2) <= 1.0D)
- {
- return false;
- }
- }
- Object localObject;
- RSTile localRSTile3;
- RSObject localRSObject;
- if ((a.i(a.X())) || (a.i(localRSTile1)) || (a.i(localRSTile2)))
- {
- for (localObject = a.vF.iterator(); ((Iterator)
- localObject).hasNext(); ) { localRSTile3 = (RSTile)((Iterator)localObject).next();
- if ((a.FA.contains(new RSTile[] { localRSTile3 })) && (a.fA.contains
- (localRSTile3)))
- {
- if ((
- (localRSObject = a.G(localRSTile3)) != null) && (a.calc.distanceTo(localRSObject.getArea().getNearestTile
- (a.X())) < 2))
- {
- a.l(a.FA.getCentralTile(), 3);
- return (a.l(false)) || ((a.l(a.X(), 4)) && (a.l(false)));
- }
- }
- }
- if (a.Zc > 4)
- for (localObject = a.gc.iterator(); ((Iterator)localObject).hasNext(); ) { localRSTile3 = (RSTile)((Iterator)localObject).next();
- if ((a.FA.contains(new RSTile[] { localRSTile3 })) && (a.fA.contains(localRSTile3)))
- {
- if (((localRSObject = a.G(localRSTile3)) !=
- null) &&
- (a.calc.distanceTo(localRSObject.getArea().getNearestTile(a.X())) < 2))
- {
- a.l(a.FA.getCentralTile(), 3);
- return (a.l(false)) || ((a.l(a.X(), 4)) && (a.l(false)));
- }
- }
- }
- }
- if ((a.Qc.contains("Sliding Statues")) &&
- (a.AB.contains("Picking")))
- {
- if (((localObject = a.D(a.fb)) == null) ||
- (a.calc.distanceBetween(a.X(), ((RSNPC)localObject).getLocation()) !=
- 1.0D))
- {
- localObject = a.D(a.OB);
- }
- if ((localObject != null) && (a.calc.distanceBetween(a.X(), ((RSNPC)localObject).getLocation()) ==
- 1.0D)) {
- a.l(((RSNPC)localObject).getLocation(), a.random(-1, 2), a.random(-1, 2));
- }
- }
- }
- return false;
- }
- private void F(RSTile a, int a)
- {
- do
- {
- do
- if (a.Zc())
- {
- return;
- }
- while (a.Y().isMoving());
- a.i(a, a);
- }
- while (!a.l(false));
- a.l(a.vc, 15,
- 15);
- a.K(false);
- }
- private RSNPC D(int[] a)
- {
- return a.npcs.getNearest(new y(a, a));
- }
- private int YA()
- {
- if (!a.O())
- return -1;
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- RSObject localRSObject1 = a.i(new int[] { 49528, 49529, 49530 });
- RSObject localRSObject2 = a.i
- (new int[] { 49534, 49535, 49536 });
- RSObject localRSObject3 = a.i(new int[] { 49522, 49523, 49524 });
- if (localRSObject1 != null)
- {
- if (a.l
- (localRSObject1, "Smith-battleaxes")) {
- a.K(false);
- }
- }
- else if (localRSObject3 != null)
- {
- if (a.l(localRSObject3, "Cook-fish"))
- {
- a.K(false);
- }
- }
- else if ((localRSObject2 != null) && (a.l(localRSObject2, "Fletch-bows")))
- {
- a.K(false);
- }
- a.sleep(400, 600);
- return 1;
- }
- private RSObject G(RSTile a)
- {
- try
- {
- return a.objects.getTopAt(a);
- }
- catch (Exception localException)
- {
- if (a != null)
- {
- a.log.severe("Nullpointer getting the object at " + a);
- }
- }
- return null;
- }
- private void uA()
- {
- int i1;
- if (a.FA != null) { if (a.FA.contains(new
- RSTile[] { a.X() }));
- }
- else
- {
- if (((RSArea)a.Nc.get(i1)).contains(new RSTile[] { a.X() }))
- {
- a.FA = ((RSArea)a.Nc.get(i1));
- a.Rd =
- (i1 + 1);
- return;
- }i1++;
- }
- }
- private void SA()
- {
- if (!a.qB)
- {
- RSItem[] arrayOfRSItem;
- int i1 = (arrayOfRSItem = a.jb()).length;
- int i2;
- RSItem localRSItem;
- if ((
- (localRSItem = arrayOfRSItem[i2]) != null) && (localRSItem.getID() > 0) && (localRSItem.doAction("Remove")))
- {
- a.sleep(500, 800);
- }
- i2++;
- a.qB = true;
- }
- }
- private int pA()
- {
- if (!a.O())
- return -1;
- boolean bool = false;
- int[] arrayOfInt1
- = { 54130, 54131, 54132, 54133, 54134, 541325, 54138, 54139, 54140, 54141, 54142 };
- int[] arrayOfInt2 = { 54118, 54122, 54123, 54124, 54125, 54126 };
- RSObject
- localRSObject1 = null; RSObject localRSObject2 = null;
- if (a.jA()) {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- a.l(a.vc, 40, 50);
- bool =
- false;
- localRSObject1 = a.i(arrayOfInt1);
- localRSObject2 = a.i(arrayOfInt2);
- if ((localRSObject1 != null) && (localRSObject2 != null))
- {
- bool =
- a.calc.distanceTo(localRSObject1) < a.calc.distanceTo(localRSObject2) ? a.l(localRSObject1, "Mine") : a.l(localRSObject2, "Fix");
- }
- else if (localRSObject1 ==
- null) {
- bool = a.l(localRSObject2, "Fix");
- }
- else
- {
- bool = a.l(localRSObject1, "Mine");
- }
- a.J(bool);
- return 1;
- }
- private RSObject[] J
- (int[] a)
- {
- return a.objects.getAll(new l(a, a));
- }
- private int RA()
- {
- int[][] arrayOfInt1 = { a.Bb, a.ad, a.OD };
- RSObject localRSObject1 = a.i(a.OD);
- RSTile localRSTile1 = a.tA();
- if ((localRSObject1 == null) || (localRSTile1 == null))
- {
- return -1;
- }
- int i1 = localRSTile1.getX(); int i2 =
- localRSTile1.getY(); int i3 = localRSObject1.getLocation().getX(); int i4 = localRSObject1.getLocation().getY();
- RSTile localRSTile2 = new RSTile(i3 + (i3 - i1) /
- 2, i4 + (i4 - i2) / 2);
- int[][] arrayOfInt2;
- int i5 = (arrayOfInt2 = arrayOfInt1).length;
- int i6;
- [I local[I = arrayOfInt2[i6];
- if (a.jA())
- return
- 2;
- RSObject localRSObject2;
- if (
- (localRSObject2 = a.i(local[I)) == null) {
- return -1;
- }
- a.vE = localRSObject2.getLocation();
- int i7 =
- localRSObject2.getID();
- a.l(a.vc, 45, 50);
- if (a.jA())
- return 2;
- RSObject localRSObject3;
- if (((localRSObject3 = a.G(a.vE)) != null) &&
- (localRSObject3.getID() != i7) && ((localRSObject2 = a.i(local[I)) != null))
- {
- a.vE = localRSObject2.getLocation();
- }
- if (a.X().equals(a.vE))
- {
- a.A(localRSTile2, 2);
- a.K(false);
- }
- else if ((a.Y().getAnimation() != 1114) && (!a.Y().isMoving()))
- {
- int i8 = 0;
- if (a.l(localRSObject2,
- "Step-onto"))
- {
- if (a.Y().getAnimation() == 1114)
- i8 = 1;
- a.sleep(300, 400);
- int i9;
- if ((i9 = 0) < 10)
- {
- if
- (a.Y().getAnimation() == 1114) {
- i8 = 1;
- }
- a.sleep(150, 200);
- i9++;
- }
- a.sleep(200, 400);
- if ((localRSObject3
- = a.G(a.vE)) != null) {
- if (
- (localRSObject2 = a.i(local[I)) != null)
- {
- a.vE = localRSObject2.getLocation();
- if
- (a.A(localRSTile2, 2)) {
- a.K(false);
- }
- }
- }
- }
- }
- a.sleep(100, 200);
- i6++;
- a.NA = true;
- return 1;
- }
- private
- int WA()
- {
- int[] arrayOfInt1 = { 11036, 11037, 11038, 12094 };
- int[] arrayOfInt2 = { 11039, 11040, 11041, 12095 };
- int[] arrayOfInt3 = { 11042, 11043, 11044,
- 12096 };
- RSNPC localRSNPC = null;
- String str = "";
- if (a.D(arrayOfInt1) != null)
- {
- a.log("Equipping the meleer");
- localRSNPC = a.D(arrayOfInt1);
- str = "Sword";
- }
- else if (a.D(arrayOfInt2) != null)
- {
- a.log("Equipping the ranger");
- localRSNPC = a.D(arrayOfInt2);
- str = "Bow";
- }
- else if (a.D(arrayOfInt3) != null)
- {
- a.log("Equipping the mager");
- localRSNPC = a.D(arrayOfInt3);
- str = "Staff";
- }
- if (localRSNPC == null)
- {
- return -1;
- }
- RSObject localRSObject = a.i(new int[] { 49647, 49648, 49649, 53991 });
- do
- {
- if (a.jA())
- {
- return 2;
- }
- if (!
- a.j()) {
- return -1;
- }
- if ((!a.l(a.vc, 40, 50)) && (!a.inventory.contains(17444))) {
- a.l(a.groundItems.getNearest(new int[] { 17444 }));
- }
- else if (a.inventory.getItemID("Stone " + str.toLowerCase()) != -1)
- a.F(localRSNPC, "Arm");
- else if (a.interfaces.get(451).isValid())
- {
- a.l(a.interfaces.get(451), new String[] { str });
- }
- else if (a.inventory.contains(17415))
- {
- a.inventory.getItem(new int[] { 17415 }).doAction
- ("Carve");
- }
- else if ((!a.inventory.contains(17415)) && (a.l(localRSObject, "Mine")))
- {
- a.l(true);
- }
- a.K(true);
- }
- while (!a.Y
- ().isInCombat());
- if (!a.JC())
- a.sleep(800, 1000);
- a.K(true);
- return 1;
- }
- private boolean i(RSNPC a)
- {
- if (a == null) {
- a = a.npcs.getNearest
- (a.jE);
- }
- if ((a == null) || ((a.l(a) == 0) && (a.getAnimation() != -1))) {
- return false;
- }
- if (!a.l(a))
- if (a.l(a, "Attack " + a.getName()))
- {
- a.sleep(1000, 1400);
- }
- else if (!a.isOnScreen())
- {
- if (!a.Y().isMoving())
- {
- if (a.calc.distanceTo(a) < 10)
- {
- a.l(a.getLocation());
- }
- else
- {
- a.l(a.getLocation(), 1);
- }
- a.l(false);
- }
- if (a.F(a))
- {
- int i1;
- if ((i1 = 0) < (a.GD ? 18 : 15))
- {
- a.sleep(100, 200);
- i1++;
- }
- return true;
- }
- }
- return false;
- }
- private int HA()
- {
- int[] arrayOfInt1 = { 54365, 54367, 54369, 54371, 54373, 54375, 54377, 54379, 54381, 54383, 54385, 54387, 54389, 54391,
- 54393, 54395, 54397, 54399, 54401, 54403 };
- int[] arrayOfInt2 = { 54364, 54366, 54368, 54370 }; int[] arrayOfInt3 = { 54372, 54374, 54376, 54378 }; int[]
- arrayOfInt4 = { 54380, 54382, 54384, 54386 }; int[] arrayOfInt5 = { 54388, 54390, 54392, 54394 }; int[] arrayOfInt6 = { 54396, 54398, 54400, 54402 };
- int[][]
- arrayOfInt = { arrayOfInt3, arrayOfInt2, arrayOfInt5, arrayOfInt4, arrayOfInt6 };
- int i1;
- while (a.npcs.getNearest(a.AC) != null)
- {
- int i2 = 0;
- RSNPC localRSNPC = a.npcs.getNearest(new int[] { a.AC[i1] });
- RSObject localRSObject = a.i(arrayOfInt[i1]);
- if ((localRSNPC != null) && (localRSObject !=
- null))
- {
- a.vE = localRSObject.getLocation();
- while ((localRSNPC != null) && (!localRSNPC.getLocation().equals(a.vE)))
- {
- if (a.jA())
- {
- return 2;
- }
- RSTile localRSTile1 = null; RSTile localRSTile2 = null; RSTile localRSTile3 = null;
- int i3 = 1; int i4 = 1;
- int i5 = localRSNPC.getLocation().getX(); int i6 = localRSNPC.getLocation().getY();
- if (i5 > a.vE.getX())
- {
- localRSTile1 = new RSTile(i5
- - 1, i6);
- localRSTile2 = new RSTile(i5 + 2, i6);
- if (!a.J(localRSTile2, arrayOfInt1))
- {
- localRSTile2 = new RSTile(i5 + 1,
- i6);
- }
- }
- else if (i5 < a.vE.getX())
- {
- localRSTile1 = new RSTile(i5 + 1, i6);
- localRSTile2 = new RSTile(i5 -
- 2, i6);
- if (!a.J(localRSTile2, arrayOfInt1))
- {
- localRSTile2 = new RSTile(i5 - 1, i6);
- }
- }
- if ((a.J
- (localRSTile1, arrayOfInt1)) && (a.J(localRSTile2, arrayOfInt1)))
- {
- i3 = 0;
- }
- if (i6 > a.vE.getY())
- {
- localRSTile1 = new RSTile(i5, i6 - 1);
- localRSTile3 = new RSTile(i5, i6 + 2);
- if (!a.J(localRSTile3, arrayOfInt1)) {
- localRSTile3 =
- new RSTile(i5, i6 + 1);
- }
- }
- else if (i6 < a.vE.getY())
- {
- localRSTile1 = new RSTile(i5, i6 + 1);
- localRSTile3 = new RSTile(i5, i6 - 2);
- if (!a.J(localRSTile3, arrayOfInt1))
- {
- localRSTile3 = new RSTile(i5, i6 - 1);
- }
- }
- if ((a.J(localRSTile1, arrayOfInt1)) && (a.J(localRSTile3, arrayOfInt1))) {
- i4 = 0;
- }
- if (i3 == 0)
- {
- if (!a.X().equals(localRSTile2))
- {
- a.A(localRSTile2, 0);
- i2 = 0;
- }
- else
- {
- i2++;
- }
- }
- else if (i4 == 0)
- {
- if (!a.X().equals(localRSTile3))
- {
- a.A(localRSTile3, 0);
- i2 =
- 0;
- }
- else
- {
- i2++;
- }
- }
- else
- {
- a.F(localRSNPC, "Scare");
- a.K
- (true);
- }
- a.sleep(500, 800);
- i2++;
- a.sleep(300, 500);
- if (i2 > 8)
- {
- a.F(localRSNPC, "Scare");
- a.sleep(400, 800);
- a.A(localRSNPC.getLocation(), 0);
- a.K(false);
- i2 = 0;
- }
- }
- }
- i1++;
- }
- return 1;
- }
- private boolean l(RSGroundItem a)
- {
- if (a == null)
- {
- return false;
- }
- String str = a.getItem().getName();
- RSTile localRSTile = a.getLocation();
- double d1 = 0.45D; double d2 = 0.55D; double d3 = 0.4D; double d4 = 0.6D;
- if ((!a.isOnScreen()) && (!a.Y().isMoving()))
- {
- a.l(localRSTile, 1);
- if (!
- a.l(false)) {
- a.PA();
- }
- else
- {
- while (!a.isOnScreen())
- {
- if (a.JC())
- {
- continue;
- }
- a.sleep(300, 500);
- }
- }
- }
- if ((a.Rd == 1) && (!a.J(localRSTile, new int[0])))
- {
- d1 = 0.35D;
- d2 = 0.65D;
- d3 = 0.75D;
- d4 = 0.95D;
- }
- return a.l(localRSTile, a.random(d1, d2), a.random(d3, d4), 0, "Take " + str);
- }
- private ArrayList<RSTile> F(RSArea a)
- {
- a.a.clear();
- Object
- localObject = null;
- RSArea localRSArea = a;
- int i1 = 0;
- while ((localRSArea != null) && (!localRSArea.equals(a.jb)))
- {
- for (Iterator localIterator =
- a.fc.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
- if (localRSArea.contains(new RSTile[] { localRSTile }))
- {
- localObject = localRSTile;
- break;
- }
- }
- RSTile localRSTile;
- if (localObject != null)
- {
- if ((localRSArea = a.E(localObject))
- != null)
- for (localIterator = a.w.iterator(); localIterator.hasNext(); )
- {
- if (((localRSTile = (RSTile)localIterator.next()) != null) &&
- (a.calc.distanceBetween(localRSTile, localObject) < 4.0D))
- {
- a.a.add(localRSTile);
- break;
- }
- }
- }
- i1++;
- if (i1 <= 25)
- continue;
- a.log.severe("Unable to generate path.");
- return a.a;
- }
- return a.a;
- }
- public void keyTyped(KeyEvent
- a)
- {
- if ((!a.iA) && (a.qD) && (a.DC == 3))
- {
- char c1;
- if (((c1 = a.getKeyChar()) ==
- '\n') || (c1 == '\t'))
- {
- a.PA = (a.PA == -1 ?
- ++a.PA : -1);
- }
- else if (a.PA == 0)
- if ((c1 == '\b') && (a.ce.length() > 0))
- {
- a.ce = a.ce.substring(0, a.ce.length() - 1);
- }
- else if ((c1 != '\b') && (a.ce.length() < 25))
- {
- a.ce += c1;
- }
- }
- }
- private int KA()
- {
- RSNPC localRSNPC;
- if (
- (localRSNPC =
- a.npcs.getNearest(a.aF)) == null)
- {
- if (a.jA())
- return 2;
- return -1;
- }
- a.vE = a.F(localRSNPC.getLocation(), a.te);
- while
- (a.npcs.getNearest(a.aF) != null)
- {
- localRSNPC = a.npcs.getNearest(a.aF);
- if (a.jA()) {
- return 2;
- }
- a.A(a.vE, 0);
- a.K(false);
- if ((localRSNPC == null) || (localRSNPC.getAnimation() == -1))
- {
- continue;
- }
- int i1 = localRSNPC.getAnimation();
- if (a.interfaces.get
- (238).isValid())
- {
- String str = "";
- if (i1 == 855)
- {
- str = "Nod head";
- }
- else if (i1 == 856) {
- str = "Shake
- head";
- }
- else if (i1 == 860) {
- str = "Cry";
- }
- else if (i1 == 861)
- str = "Laugh";
- else if (i1 == 863)
- {
- str = "Wave";
- }
- if (str.isEmpty())
- {
- a.F(a.vE, 1);
- }
- else
- {
- a.sleep(700, 1400);
- if (a.l
- (a.interfaces.get(238), new String[] { str }))
- {
- a.sleep(400, 800);
- a.sleep(300, 400);
- }
- }
- }
- }
- return 1;
- }
- private RSObject i(int[] a)
- {
- return a.objects.getNearest(new r(a, a));
- }
- private String l(RSItem a)
- {
- if (a == null)
- return "";
- String str;
- int
- i1;
- if ((i1 =
- (str = a.getName()).indexOf(">")) > 0)
- {
- str = str.substring(i1 + 1);
- }
- int i2;
- if ((i2 = str.indexOf(" (")) > 0)
- {
- str
- = str.substring(0, i2);
- }
- return str;
- }
- private int gA()
- {
- if (!a.O())
- {
- return -1;
- }
- boolean bool1 = false; boolean bool2 = false;
- RSObject localRSObject1 = a.i(new int[] { 54251 });
- RSObject localRSObject2 = a.i(new int[] { 49934, 49935, 49936, 53749 });
- RSObject localRSObject3 = a.i(new
- int[] { 54255 });
- RSObject localRSObject4 = a.i(new int[] { 54256, 54257, 54258, 54259 });
- RSObject localRSObject5 = a.i(a.mb);
- a.jA = a.npcs.getNearest(a.B);
- if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
- {
- if ((!a.QB()) || ((a.HC == 1) && (!a.ZA())))
- {
- return 2;
- }
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- bool1 = a.F(a.u) == null;
- a.A(bool1);
- do
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- a.yd = a.l(a.Zd);
- if ((a.yd != null) && (a.l(a.yd.getLocation(), false)))
- {
- bool2 =
- a.l(a.yd);
- }
- else if (a.SE.contains("re-attach"))
- {
- a.A(new int[] { 19663, 19664, 19665, 19667, 19668 });
- }
- if (a.inventory.contains
- (19668))
- {
- bool2 = a.l(localRSObject5, "Grapple");
- }
- else if (a.inventory.containsAll(new int[] { 19667, 19664 }))
- {
- a.inventory.useItem(a.inventory.getItem(new int[] { 19667 }), a.inventory.getItem(new int[] { 19664 }));
- }
- else if ((a.inventory.contains(19665)) && (!
- a.inventory.contains(19667)))
- bool2 = a.l(localRSObject2, "Spin");
- else if ((a.inventory.contains(19663)) && (!a.inventory.contains(19664)))
- bool2 =
- a.l(localRSObject4, "Smith");
- else if (!a.inventory.containsOneOf(new int[] { 19665, 19667 }))
- {
- bool2 = a.l(localRSObject3, "Plunder");
- }
- else if (!a.inventory.containsOneOf(new int[] { 19663, 19664 }))
- bool2 = a.l(localRSObject1, "Retrieve");
- if (bool2)
- {
- a.K(bool1);
- }
- else {
- a.sleep(300, 600);
- }
- }
- while (!a.Rc());
- a.sleep(800, 1100);
- a.lA();
- a.jA = a.npcs.getNearest(a.B);
- if (!a.inventory.contains
- (18829))
- {
- if (a.jA())
- return 2;
- RSGroundItem localRSGroundItem;
- if (a.l(localRSGroundItem))
- {
- a.K(false);
- }
- a.sleep
- (300, 500);
- }
- return a.A(a.nD);
- }
- private String i(String a)
- {
- if (a == null)
- return "";
- int i1;
- if (
- (i1 = a.indexOf(" ")) > -1)
- {
- a = a.substring(i1 + 1);
- }
- int i2;
- if (
- (i2 = a.indexOf(" (")) > 0)
- {
- a = a.substring(0, i2);
- }
- return a;
- }
- private RSNPC i(String[] a)
- {
- return a.npcs.getNearest(new k(a, a));
- }
- private boolean IA()
- {
- a.nE = false;
- a.VA();
- a.lc = null;
- if (a.ZA == null) {
- a.ZA = a.r;
- }
- if
- (a.ob.size() == 0)
- {
- RSObject localRSObject1 = a.i(a.gb);
- RSObject localRSObject2 = a.i(a.Lb);
- if (localRSObject1 != null)
- {
- a.log
- ("Dungeon exit ahead!");
- a.s();
- return true;
- }
- if (localRSObject2 != null)
- {
- if (a.nb == null)
- {
- a.nb = a.ZA;
- a.fc.add(localRSObject2.getLocation());
- a.ig = a.F(a.nb);
- a.HD = new Timer(0L);
- a.PD = -1;
- }
- if (!a.nb.contains(new RSTile
- [] { a.X() }))
- {
- a.AB = "Preparing for the boss battle";
- if (a.D(new int[] { 10058 }) == null)
- {
- a.Ic();
- }
- if (a.i(new int[] { 51300 }) != null)
- {
- if ((a.walking.getEnergy() < a.random(85, 90)) && (!a.d()))
- {
- a.AB = "Resting up
- for the Icefiend!";
- a.walking.rest(100);
- }
- }
- else if (a.i(new int[] { 51887 }) != null)
- {
- if (a.HC == 2)
- {
- a.log("Swapping attack style for Sagittare!");
- if (a.kC)
- {
- a.i(1);
- }
- else
- if (a.iD)
- {
- a.i(3);
- }
- else
- {
- a.log.severe("We don't have a way to kill Sagittare,
- aborting dungeon!");
- a.nc = true;
- return false;
- }
- }
- }
- else if (a.i(new String[] {
- "Riftsplitter" }) != null)
- {
- if (a.iD)
- {
- a.AB = "Swapping combat style to magic";
- a.i(3);
- }
- }
- else if (a.i(new int[] { 54475 }) != null)
- {
- if (a.HC == 1)
- if (a.Sd)
- {
- a.AB = "Swapping
- combat style to range";
- a.i(2);
- }
- else if (a.iD)
- {
- a.AB = "Swapping combat style to magic";
- a.i(3);
- }
- else
- {
- a.log.severe("We can't kill this boss with melee, aborting dungeon");
- a.Ic += 1;
- a.nc = true;
- return false;
- }
- }
- else if (a.npcs.getNearest(new String[] { "Sagittare" }) !=
- null)
- {
- if (a.HC == 2)
- {
- a.AB = "Swapping combat style to melee";
- if (!a.i(1))
- {
- a.log("We don't have a backup weapon for Saggitare, aborting dungeon.");
- a.nc = true;
- return false;
- }
- }
- }
- else if (a.npcs.getNearest(new String[] { "Rammernaut" }) != null)
- {
- if ((a.HC != 3) && (a.iD))
- {
- a.AB =
- "Swapping combat style to magic";
- a.i(3);
- }
- }
- a.AB = "";
- }
- a.ic.remove(a.ZA);
- a.Fg = false;
- a.hB
- = false;
- a.X = false;
- a.FF = true;
- return true;
- }
- RSTile localRSTile = a.EA();
- if (a.yd != null)
- {
- if (a.r.contains(new
- RSTile[] { a.X() }))
- {
- a.l(localRSTile, 1);
- }
- if ((a.HC == 1) && (a.calc.distanceTo(localRSTile) > a.random(5, 7)) && (a.i(a.u) != null))
- {
- a.A(false);
- }
- a.game.openTab(4);
- a.nE = true;
- a.AB = "Grabbing a key from the dead end";
- return true;
- }
- a.fG.add(a.nD);
- a.w.removeAll(a.fG);
- a.J.removeAll(a.fG);
- a.Bd.removeAll(a.fG);
- a.nE = true;
- a.AB = "Skipping the dead end";
- return
- false;
- }
- return true;
- }
- private void BA()
- {
- int i1;
- int i2 =
- i1 = a.dC;
- a.gd = false;
- a.nc = false;
- RSObject localRSObject =
- a.objects.getNearest(new int[] { 48496 });
- a.Qc = "Entering Daemonheim...";
- localRSObject = a.objects.getNearest(new int[] { 48496 });
- if (a.jA()) {
- return;
- }
- a.ad();
- i2 =
- i1 = a.dC;
- if ((a.E) && (a.OA < a.td))
- {
- i2 =
- a.ld;
- }
- if (a.interfaces.getComponent(210, 2).isValid())
- {
- a.interfaces.getComponent(210, 2).doClick();
- }
- else if (a.interfaces.get(236).isValid())
- {
- a.interfaces.getComponent(236, (a.od) &&
- (a.interfaces.getComponent(236, 0).containsText("size")) && ((!a.E) || (a.Ud > a.td)) ? 2 : 1).doClick();
- }
- else if (a.interfaces.getComponent(947, 608).isValid
- ())
- {
- a.ad();
- if ((a.OA >= a.g) || ((a.JE) && (a.OA + 2 > a.g)))
- {
- if (!a.Ec()) {
- return;
- }
- }
- if (a.iA()) {
- while (a.interfaces.getComponent(947, 608).isValid())
- {
- if (a.interfaces.getComponent(947, 765).getText().contains("" + a.Ud))
- {
- a.interfaces.getComponent(947, 761).doAction("Confirm");
- }
- else
- {
- a.interfaces.getComponent(947, 608 + a.OA).doAction("Select-
- floor");
- }
- a.sleep(700, 1000);
- }
- }
- a.mouse.moveRandomly(200);
- }
- else
- {
- if (a.interfaces.getComponent(938, 42).isValid
- ())
- {
- a.SE = "";
- while (a.interfaces.getComponent(938, 42).isValid())
- {
- if (a.SE.contains("access complexity"))
- {
- i2--;
- a.SE = "";
- }
- if (!a.interfaces.getComponent(938, 42).getText().contains("" + i2)) {
- a.interfaces.getComponent(938, 55 +
- 5 * i2).doAction("Select-complexity");
- }
- else
- {
- a.interfaces.getComponent(938, 37).doAction("Confirm");
- }
- a.sleep(600, 800);
- }
- }
- if ((a.interfaces.get(939).isValid()) && ((a.OA >= a.g) || ((a.JE) && (a.OA + 2 > a.g))))
- {
- if (!a.Ec())
- {
- return;
- }
- }
- else if (localRSObject != null)
- {
- a.l(localRSObject, "Climb-down");
- a.K(false);
- }
- }
- a.sleep(600,
- 1000);
- a.N = true;
- a.zB = true;
- a.Zc = i2;
- }
- private boolean A(int[] a)
- {
- if (a.inventory.containsOneOf(a))
- {
- int i1 = a.mouse.getSpeed();
- a.mouse.setSpeed(i1 + a.random(1, 4));
- while (a.inventory.containsOneOf(a))
- {
- if (a.Zc())
- {
- return false;
- }
- RSItem
- localRSItem;
- if (((localRSItem = a.inventory.getItem(a)) != null) &&
- (localRSItem.doAction("Drop"))) {
- a.sleep(400, 600);
- }
- }
- a.mouse.setSpeed(i1);
- return true;
- }
- return false;
- }
- private RSTile EA()
- {
- int[][] arrayOfInt;
- int i1 = (arrayOfInt = a.x).length;
- int i2;
- int[] arrayOfInt1 = arrayOfInt[i2];
- a.yd = a.groundItems.getNearest(arrayOfInt1);
- if (a.yd != null) if (a.r.contains(new RSTile[] { a.yd.getLocation() }))
- {
- return a.yd.getLocation();
- }
- i2++;
- a.yd = null;
- return null;
- }
- private RSNPC D(RSTile a)
- {
- if (a == null) {
- return null;
- }
- return
- a.npcs.getNearest(new c(a, a));
- }
- private boolean cA()
- {
- int i1 = 0;
- RSObject[] arrayOfRSObject;
- int i4;
- Object localObject;
- if ((a.FA != null) &&
- (a.nD != null))
- {
- i3 = (arrayOfRSObject = a.objects.getAll()).length; localObject = arrayOfRSObject[i4];
- if ((a.l(((RSObject)localObject).getID(), a.XE))
- && (a.calc.distanceBetween(((RSObject)localObject).getLocation(), a.nD) < 3.0D)) if (!a.FA.contains(new RSTile[] { ((RSObject)localObject).getLocation() }))
- {
- i1 = 1;
- break label115;
- }
- i4++;
- }
- label115: if ((i1 == 0) && (a.Nc.size() > 0))
- {
- return false;
- }
- if
- (a.game.getClientState() == 11)
- {
- a.sleep(200, 300);
- a.sleep(300);
- }
- a.sleep(400);
- int i3 = (arrayOfRSObject = a.objects.getAll(a.cC)).length;
- RSTile localRSTile =
- (localObject = arrayOfRSObject[i4]).getLocation();
- if (!a.Ee.contains(localRSTile))
- {
- if (((RSObject)localObject).getType() ==
- RSObject.Type.BOUNDARY)
- {
- a.Tc.add(localRSTile);
- }
- a.AG.add(localRSTile);
- a.zc.add(localObject);
- }
- i4++;
- if (a.AG.size() > 60)
- {
- int i2 = 20000; i3 = 20000;
- for (Iterator localIterator = a.AG.iterator(); localIterator.hasNext(); )
- {
- if (((localObject = (RSTile)
- localIterator.next())
- .getX() <= i2) && (((RSTile)localObject).getY() <= i3))
- {
- i2 = ((RSTile)localObject).getX();
- i3 = ((RSTile)
- localObject).getY();
- }
- }
- a.ZA = new RSArea(i2, i3, i2 + 15, i3 + 15);
- a.Nc.add(a.ZA);
- a.a.clear();
- if ((a.A(new int[] { 17363 })) &&
- (a.EB.contains(Integer.valueOf(17363)))) {
- a.EB.remove(Integer.valueOf(17363));
- }
- a.l(a.ZA);
- a.Ee.addAll(a.AG);
- a.Wb = 0;
- a.BD = 0;
- a.hA.reset();
- a.lc = null;
- return true;
- }
- return false;
- }
- private boolean MA()
- {
- int[] arrayOfInt = a.l(a.EB);
- int i1 = a.mouse.getSpeed();
- a.mouse.setSpeed(i1 + a.random(1, 4));
- if (a.Zc())
- return false;
- int i2;
- int i3;
- int i4;
- if ((
- (i4 = a.inventory.getItems()[(i2 + i3 *
- 4)].getID()) > 0) && (!a.l(i4, arrayOfInt)))
- {
- a.inventory.dropItem(i2, i3);
- }
- i3++;
- i2++;
- a.sleep(a.random(500, 800));
- a.mouse.setSpeed(i1);
- return true;
- }
- private int hA()
- {
- RSNPC localRSNPC = null;
- u localu = new u(a);
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- return -1;
- int
- i1;
- if (localRSNPC == null)
- {
- localRSNPC = a.npcs.getNearest(localu);
- }
- else if (a.walking.getEnergy() < a.random(15, 25))
- {
- a.walking.rest
- (a.random(50, 80));
- }
- else if (a.F(localRSNPC, "Catch"))
- {
- a.sleep(600, 800);
- if ((i1 = 0) < 15)
- {
- a.sleep(250, 300);
- i1++;
- }
- }
- a.sleep(100, 200);
- return 1;
- }
- private void LA()
- {
- RSNPC localRSNPC1 = a.D(new int[] { 10058 });
- RSNPC localRSNPC2 = a.i(new String[] {
- "Geomancer" });
- RSNPC localRSNPC3 = a.i(new String[] { "Ihlakhizan" });
- RSNPC localRSNPC4 = a.i(new String[] { "Pummeller" });
- a.l(a.UC, 50, 70);
- int i1;
- Object localObject1;
- Object localObject2;
- if ((a.tc.equals("Skeletal Hoarde")) || (localRSNPC1 != null))
- {
- i1 = 0;
- localObject1 = null;
- a.Qc =
- "Killing the Skeletal Hoarde!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Skeletal Hoarde";
- }
- a.A(a.HC != 1);
- a.l(false,
- Combat.Prayer.PROTECT_FROM_MISSILES, true);
- a.PD = a.Gd;
- a.F();
- a.game.openTab(4);
- if (a.jA()) {
- return;
- }
- if (localRSNPC1 !=
- null)
- {
- if ((
- (localObject2 = localRSNPC1.getMessage()) != null) && (!((String)localObject2).contains("Chat later")))
- {
- i1 = 1;
- }
- localObject1 = a.J(new String[] { "Tunnel" });
- if (i1 != 0)
- {
- a.AB = "Blocking the next tunnel!";
- if (localObject1 !=
- null)
- {
- a.vE = ((RSObject)localObject1).getLocation();
- a.SE = "";
- a.l((RSObject)localObject1, "Block");
- a.l
- (false);
- if (localObject1 != null)
- {
- if (a.jA()) {
- return;
- }
- if (!a.SE.contains("fully
- powered"))
- {
- if (a.calc.distanceTo(a.vE) > 4)
- {
- a.A(a.vE, 1);
- }
- if (a.l
- ((RSObject)localObject1, "Block"))
- a.sleep(500, 1000);
- a.l(a.UC, 20, 20);
- localObject1 = a.G(a.vE);
- a.sleep(50, 100);
- }
- }
- a.AB = "";
- if (!a.SE.contains("fully powered"))
- {
- if (a.DD < 5) {
- a.DD += 1;
- }
- a.Qc = ("Skeletal Hoarde: " + a.DD + " of 5 blocked");
- }
- a.SE = "";
- a.vE = null;
- if (a.combat.getHealth() > 40) {
- a.F(a.npcs.getNearest(a.B), "Attack");
- }
- i1 = 0;
- }
- }
- if ((localObject1 ==
- null) && (a.npcs.getNearest(a.B) == null))
- {
- a.F(localRSNPC1, "Talk-To");
- a.sleep(700, 1100);
- }
- else if (a.combat.getHealth() <
- 30 + a.npcs.getAll(a.B).length * 3 + a.Zc + a.calc.distanceTo(localRSNPC1) / 3)
- {
- a.vE = localRSNPC1.getLocation();
- if (a.combat.getHealth() <
- 95)
- {
- if (a.jA())
- return;
- if (((localObject2 = localRSNPC1.getMessage()) != null) &&
- (!((String)
- localObject2).contains("Chat later")))
- {
- i1 = 1;
- }
- a.jA = a.npcs.getNearest(a.B);
- a.l(a.UC, 20, 20);
- if ((a.calc.distanceTo(localRSNPC1) > 3) || (a.X().equals(a.vE))) {
- a.F(a.vE, 2);
- }
- else if ((a.jA != null) &&
- (a.calc.distanceBetween(a.vE, a.jA.getLocation()) < 5.0D)) {
- a.i(a.jA);
- }
- a.sleep(300, 600);
- }
- a.sleep(1400,
- 1800);
- a.vE = null;
- }
- }
- a.i(a.npcs.getNearest(a.B));
- a.l(a.UC, 20, 20);
- }
- else
- {
- if ((a.tc.equals("Hobgoblin Geomancer"))
- || (localRSNPC2 != null))
- {
- a.Qc = "Killing the Hobgoblin Geomancer!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Hobgoblin
- Geomancer";
- }
- a.l(a.QC, null, false);
- a.PD = a.xb;
- }
- while (a.objects.getNearest(a.gb) == null)
- {
- if (a.jA()) {
- return;
- }
- a.i(localRSNPC2);
- if (a.MC)
- {
- a.JC();
- if (!a.JC()) {
- a.sleep(1000, 2000);
- }
- a.sleep(1000, 2000);
- a.MC = false;
- }
- a.l(a.UC, 50, 60);
- a.sleep(200, 300); continue;
- if (!a.tc.equals("Bulwark Beast")) { if (a.i
- (new String[] { "Bulwark beast" }) == null);
- }
- else
- {
- i1 = 0;
- a.Qc = "Killing the Bulwark Beast!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Bulwark Beast";
- }
- localObject1 = a.i(new String[] { "Bulwark beast" });
- if (a.Ob < 1)
- {
- a.Ob = ((RSNPC)localObject1).getID();
- }
- a.l(false, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- a.PD = (a.bC != -1 ? a.bC :
- a.Gd);
- if (a.jA())
- {
- return;
- }
- if ((
- (localObject1 = a.i(new String[] { "Bulwark beast" })) != null) && (a.HC
- != 3))
- {
- localObject2 = a.inventory.getItem(new int[] { a.Vc });
- if (((RSNPC)localObject1).getID() == a.Ob)
- {
- RSItem localRSItem = a.inventory.getItem(new int[] { 16295 });
- if ((i1 == 0) && (localRSItem == null))
- {
- if
- (a.equipment.containsAll(new int[] { 16295 }))
- {
- i1 = 1;
- }
- else
- {
- a.AB =
- "Grabbing a pickaxe to mine his armor";
- a.A(false);
- RSObject localRSObject2;
- if (
- (localRSObject2
- = a.objects.getNearest(new int[] { 49295 })) != null)
- {
- a.l(localRSObject2, "Take-pickaxe");
- a.sleep(500, 800);
- }
- a.AB = "";
- }
- }
- if ((localRSItem != null) && (localObject2 == null))
- {
- if ((a.l(16295, "")) || (a.inventory.contains(a.Vc)))
- {
- i1 = 1;
- }
- }
- }
- else if
- ((localObject2 != null) && (((RSItem)localObject2).doClick(true)))
- {
- a.sleep(700, 900);
- }
- }
- if (a.i((RSNPC)
- localObject1))
- a.A(true);
- a.l(a.UC, 50, 60);
- a.sleep(200, 300);
- break; } if (!a.tc.equals("Unholy Cursebearer")) { if (a.i(new
- String[] { "cursebearer" }) == null);
- }
- else
- {
- a.Qc = "Killing the Unholy Cursebearer!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Unholy Cursebearer";
- }
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
- a.PD = a.Gd;
- if (a.h())
- {
- break;
- }
- return;
- }
- RSObject localRSObject1;
- if (!a.tc.equals("Shadow-Forger Ihlakhizan")) { if (a.i(new
- String[] { "Ihlakhizan" }) == null);
- }
- else
- {
- a.Qc = "Killing Shadow-Forger Ihlakhizan!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Shadow-Forger Ihlakhizan";
- }
- a.l(a.QC, null, false);
- a.PD = a.bC;
- while (a.objects.getNearest
- (a.gb) == null)
- {
- if (a.jA())
- return;
- if ((a.vE == null) || (a.calc.distanceTo(a.vE) > 3))
- {
- localRSObject1 = a.i(new int[] { 51110 }); localObject1 = a.i(new int[] { 50749 });
- if ((localRSObject1 != null) && (localObject1 != null))
- {
- int i2 = localRSObject1.getLocation().getX();
- int i3 = localRSObject1.getLocation().getY();
- int i4 = ((RSObject)
- localObject1).getLocation().getX();
- int i5 = ((RSObject)localObject1).getLocation().getY();
- a.vE = new RSTile(i2 + (i4 - i2) / 4, i3 +
- (i5 - i3) / 4);
- }
- }
- a.A(a.vE, a.random(0, 2));
- do {
- a.sleep(300, 500);
- }
- while
- ((a.calc.distanceTo(a.vE) <= 1) || (!a.A(a.vE, a.random(0, 2))));
- a.sleep(600, 800);
- a.F(localRSNPC3, "Attack");
- a.i(localRSNPC3);
- if (a.l(a.UC, 50, 0))
- continue;
- a.sleep(200, 300);
- }
- }
- if (!a.tc.equals("Bal'lak the Pummeller")) { if (a.i(new
- String[] { "Pummeller" }) == null);
- }
- else
- {
- a.Qc = "Killing Bal'lak the Pummeller!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Bal'lak the Pummeller";
- }
- a.l(a.QC, null, false);
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- while
- (a.objects.getNearest(a.gb) == null)
- {
- if (a.jA())
- {
- return;
- }
- if (localRSNPC4 != null)
- {
- if ((
- (localRSObject1 = a.i(new int[] { 49298 })) != null) && (a.calc.distanceTo(localRSObject1) < 3))
- {
- if (!
- a.Y().isMoving())
- a.l(localRSNPC4.getLocation(), 1);
- }
- else if (a.interfaces.getComponent(945, 17).getRelativeX() < 100)
- {
- a.l(a.lG, 50, 60);
- }
- a.i(localRSNPC4);
- }
- a.sleep(100, 200);
- }
- }
- a.Qc =
- "Killing an unknown boss...";
- a.log(a.Qc);
- a.l(a.QC, null, false);
- if (a.h())
- break;
- return;
- }
- }
- a.Ke = true;
- }
- private boolean J(RSTile a, int[] a)
- {
- if ((a != null) && (!a.be.contains(a))) { if (a.r.contains(new RSTile[] { a }));
- }
- else
- return false;
- RSObject[] arrayOfRSObject;
- int i1 = (arrayOfRSObject = a.objects.getAllAt(a)).length;
- int i2;
- RSObject localRSObject = arrayOfRSObject[i2];
- if (a.l
- (localRSObject.getID(), a))
- {
- return false;
- }
- i2++;
- return !a.ue.contains(a);
- }
- private boolean l(RSArea a, ArrayList<RSTile> a)
- {
- if ((a !=
- null) && (a != null)) {
- for (RSTile localRSTile : a)
- {
- if (a.contains(new RSTile[] { localRSTile })) {
- return true;
- }
- }
- }
- return false;
- }
- private RSNPC[] F(int[] a)
- {
- return a.npcs.getAll(new m(a, a));
- }
- private boolean fA()
- {
- RSObject localRSObject;
- if ((localRSObject =
- a.objects.getNearest(a.Hd)) != null)
- {
- if (a.jb.contains(new RSTile[] { a.X() }))
- {
- Object localObject = localRSObject.getLocation();
- if
- (a.calc.distanceTo((RSTile)localObject) < 3) {
- return a.l(localRSObject, "Enter");
- }
- double d1 = 0.0D;
- RSTile[] arrayOfRSTile;
- int
- i1 = (arrayOfRSTile = localRSObject.getArea().getTileArray()).length;
- int i2;
- RSTile localRSTile = arrayOfRSTile[i2];
- double d2;
- if (
- (d2 = a.calc.distanceBetween(a.jb.getCentralTile(), localRSTile)) > d1)
- {
- localObject = localRSTile;
- d1 = d2;
- }
- i2++;
- if (a.calc.distanceTo((RSTile)localObject) > 3)
- {
- if (a.Y().getAnimation() == -1) { if (a.jb.contains(new RSTile[] { a.X() }));
- }
- else
- {
- a.uA();
- return false;
- }
- if (!a.Y().isMoving())
- {
- a.i((RSTile)localObject, 1);
- if
- (a.calc.distanceTo((RSTile)localObject) > a.random(6, 8))
- {
- a.camera.turnToTile((RSTile)localObject, a.random(5, 15));
- }
- else {
- a.l(false);
- }
- }
- }
- a.sleep(100, 200);
- return a.A((RSTile)localObject, "Enter");
- }
- }
- return
- false;
- }
- private boolean GA()
- {
- return a.interfaces.get(942).isValid();
- }
- private boolean jA()
- {
- if (!a.bA())
- {
- a.KA = new Timer(0L);
- }
- a.V
- ();
- if (!a.Od)
- {
- a.log("Shutting down iDungeon");
- return true;
- }
- if (a.game.getClientState() != 10)
- {
- if (a.game.getClientState() != 11)
- {
- a.log("Oops.. We got logged out somehow :S");
- if (a.interfaces.get(596).isValid())
- {
- a.log("Exited to main screen, ceding control
- to LoginBot.");
- return true;
- }
- if (a.l(a.interfaces.getComponent(906, 171), ""))
- {
- a.sleep(4000, 8000);
- }
- a.sleep
- (300, 600);
- if ((a.game.isLoggedIn()) && (a.zB))
- {
- if (a.Zc())
- {
- return true;
- }
- a.uA();
- a.sleep
- (100, 200);
- a.log("Logged back in, attempting to correct.");
- a.yd = a.groundItems.getNearest(new int[] { 18829 });
- RSTile localRSTile = a.yd
- != null ? a.yd.getLocation() : null;
- if (localRSTile != null)
- {
- if (a.Zc()) {
- return true;
- }
- if (!
- a.r.contains(new RSTile[] { a.X() })) {
- a.rb();
- }
- else
- {
- a.A(localRSTile, "Take");
- }
- a.sleep(400, 800);
- a.uA();
- if (a.nb != null) { if (a.nb.contains(new RSTile[] { a.X() }));
- }
- else
- {
- if ((!a.QB()) || (!a.ZA()))
- {
- return false;
- }
- if (a.Rd != 1)
- {
- a.QB = a.FA;
- a.A(new int[] { 18829 });
- a.G(false);
- a.l(a.jb);
- a.ZA();
- a.l(a.QB);
- a.n();
- (a.Zc > 4 ? a.FA :
- a.rb());
- }
- }
- }
- }
- }
- else
- {
- a.sleep(100, 1000);
- }
- return
- false;
- }
- if (a.CA())
- return true;
- if (a.zB)
- {
- int i1;
- if (a.AA())
- {
- if ((a.Qc.contains("locked")) && (a.Hc))
- {
- a.log("Posthumosly assigning the lockdown");
- a.J.add(a.nD);
- a.Hc = true;
- }
- a.Qc = "Oh dear...";
- a.AB = "";
- a.QB = (!
- a.r.equals(a.jb) ? a.r : null);
- a.sleep(300, 500);
- a.hA = new Timer(a.random(360000, 480000));
- a.log("Died, walking back..");
- a.vE = null;
- a.Pd += 1;
- a.nD = null;
- a.WA = null;
- a.yd = null;
- a.jA = null;
- a.qA = a.F(a.QB);
- a.Fg = true;
- a.jC = false;
- a.FF = false;
- a.X = false;
- a.hB = false;
- a.l(a.jb);
- if (a.nb != null)
- {
- if ((a.tc.equals("Bal'lak the Pummeller")) &&
- (a.interfaces.get(945).isValid()))
- {
- a.AB = "Allowing his defense to degenerate";
- i1 = a.interfaces.getComponent(945, 17).getRelativeX()
- - 15;
- int i3 = a.ig.size();
- if ((a.Zc > 4) || (i3 < 1))
- {
- i3 = 1;
- }
- int i4 = 200 * i1 - i3 * 7000;
- if (i3 == 1) {
- i4 += a.random(2000, 3000);
- }
- if (i4 > 0) {
- a.sleep(i4, (int)(i4 * 1.1D));
- }
- }
- }
- else if (a.XF)
- {
- a.AB = "Waiting for mercenaries to disperse";
- a.sleep(7000, 11000);
- }
- a.AB = "";
- if
- (a.CA())
- {
- return true;
- }
- a.uA();
- a.sleep(200, 300);
- if ((a.VA) && ((a.nb != null) || (a.l.contains(a.QB))))
- {
- a.game.openTab(6);
- }
- a.F();
- a.game.openTab(4);
- if (a.HC == a.bb)
- {
- a.l(a.Vc, "Wield");
- }
- a.walking.setRun
- (true);
- return true;
- }
- if ((a.nb != null) && (a.HD != null)) if ((!a.nb.contains(new RSTile[] { a.X() })) && (a.HD.getElapsed() > a.random(1500000,
- 1800000)))
- {
- a.log.severe("Took too long to kill " + a.tc + ", trying a new dungeon.");
- if (a.UA)
- {
- a.env.saveScreenshot
- (false);
- }
- a.gd = true;
- a.Ic += 1;
- a.nc = true;
- return true;
- }
- if ((a.hd != null) && (!a.hd.isRunning()))
- {
- a.uC = "Timed out";
- return true;
- }
- if ((a.nb == null) && (a.hd == null) && (a.hA != null) && (!a.hA.isRunning()))
- {
- if (!a.gd)
- {
- a.log.severe("Took too long to complete this dungeon, trying a new one");
- if (a.UA)
- {
- a.env.saveScreenshot(false);
- }
- a.gd = true;
- a.Ic += 1;
- }
- a.nc = true;
- return true;
- }
- if ((a.lc != null) && (a.lc.getElapsed() > a.random(10000,
- 15000)))
- {
- if (a.lc.getElapsed() < a.random(45000, 90000))
- {
- if ((!a.Y().isMoving()) && (a.calc.distanceTo(a.nD) > 3))
- {
- a.F(a.nD);
- }
- }
- else
- {
- a.log.severe("Took too long to open this door");
- if (a.UA)
- {
- a.env.saveScreenshot(false);
- }
- a.lc = null;
- if (a.r.contains(new RSTile[] { a.X() }))
- {
- if (a.nD != null)
- {
- a.fG.add(a.nD);
- a.J.remove(a.nD);
- a.Bd.remove(a.nD);
- }
- if (a.WA != null)
- {
- a.fG.add
- (a.WA);
- a.J.remove(a.WA);
- a.Bd.remove(a.WA);
- }
- }
- else
- {
- a.uA();
- a.l(a.FA);
- if (a.nD != null)
- {
- a.J.remove(a.nD);
- a.Bd.remove(a.nD);
- a.w.add(a.nD);
- }
- if (a.WA != null)
- {
- a.J.remove(a.WA);
- a.Bd.remove(a.WA);
- a.w.add(a.WA);
- }
- }
- return true;
- }
- }
- else if ((a.KA != null) && (a.KA.getElapsed() > a.random(10000, 20000)))
- {
- if (a.KA.getElapsed() > a.random(90000, 180000))
- {
- a.AB =
- "Attempting to reengage...";
- a.log.severe("We've been standing still for too long, lets try to do something!");
- if (a.r != null)
- a.A
- (a.r.getCentralTile(), 1);
- if (a.hd != null)
- {
- i1 = (int)a.hd.getRemaining() - a.random(90000, 120000);
- a.hd.setEndIn(i1);
- }
- else if (a.hA != null)
- {
- int i2 = (int)a.hA.getRemaining() - a.random(90000, 120000);
- a.hA.setEndIn(i2);
- }
- a.KA = new Timer(0L);
- if (a.r != null)
- {
- a.uA();
- if (!a.r.contains(new RSTile[] { a.X() }))
- {
- a.l
- (a.FA);
- a.Fg = true;
- }
- }
- }
- else
- {
- a.camera.moveRandomly(2000);
- }
- }
- else if ((!
- a.walking.isRunEnabled()) && (a.walking.getEnergy() > a.random(10, 30)))
- {
- a.walking.setRun(true);
- a.sleep(500, 700);
- }
- else if (a.nA)
- {
- if (a.WC)
- {
- if (a.HC == 2)
- {
- a.log("Out of arrows! Re-equipping or wielding a backup weapon.");
- if
- (a.inventory.getCount(true, new int[] { a.cc }) > a.random(4, 10))
- {
- a.l(a.cc, "Wield");
- }
- else
- {
- if (a.kC)
- {
- a.i(1);
- }
- else if (a.iD)
- {
- a.i(3);
- }
- else
- {
- a.nc = true;
- return true;
- }a.Sd = false;
- }
- }
- else if (a.HC == 3)
- {
- a.log("Out of Runes! Wielding our backup weapon.");
- if (a.kC)
- {
- a.i(1);
- }
- else if (a.Sd)
- {
- a.i(2);
- }
- else
- {
- a.nc = true;
- return true;
- }
- a.iD = false;
- }
- a.WC = false;
- }
- if ((a.Qc.contains("Opening a")) && (a.nD != null) && (a.calc.distanceTo(a.nD) < 6))
- {
- return false;
- }
- if
- (a.Qc.contains("Backtracking")) if (a.r.contains(new RSTile[] { a.X() }))
- {
- return false;
- }
- if ((a.F()) || (a.F(false)) || (a.PA())
- || (a.Hb())) {
- return false;
- }
- if (a.game.getCurrentTab() == 4)
- {
- if ((!a.ce.isEmpty()) && (a.l(a.inventory.getItemID(a.ce),
- "Bind"))) {
- a.ce = "";
- }
- a.D(false);
- }
- if ((a.Rd == 1) && (a.interfaces.get(79).isValid()))
- a.l
- (a.interfaces.getComponent(79, 7), "Close");
- return a.rb();
- }
- }
- return false;
- }
- private boolean mA()
- {
- this.Od = true;
- JA();
- log("Cracked
- by Contra. Visit RECoders.org for free cracks and more!");
- return true;
- }
- private void l(RSArea a)
- {
- if ((a != null) && ((a.r == null) || (!a.r.equals(a))))
- {
- a.r = a;
- a.Tc.addAll(a.ue);
- a.ue.clear();
- for (RSTile localRSTile : a.Tc)
- if (a.r.contains(new RSTile[] { localRSTile }))
- {
- a.ue.add(localRSTile);
- }
- a.Tc.removeAll(a.ue);
- a.f();
- }
- }
- private boolean AA()
- {
- return (a.jC) || (a.Y().getAnimation() == 836);
- }
- private RSTile[] J(RSTile a)
- {
- int i1 = a.getX(); int i2 = a.getY();
- return new RSTile[] { new RSTile(i1 + 1, i2 + 1), new RSTile(i1 - 1, i2 + 1), new RSTile(i1
- - 1, i2 - 1), new RSTile(i1 + 1, i2 - 1) };
- }
- private void aA()
- {
- a.Qc = "Exiting dungeon...";
- a.game.openTab(4);
- a.nc = true;
- if ((!a.Od) || (!
- a.game.isLoggedIn()))
- return;
- a.V();
- if (a.Y().isInCombat())
- {
- a.uA();
- a.l(a.FA);
- if ((a.npcs.getNearest(a.B) != null) ||
- (a.npcs.getNearest(a.Fd) != null)) {
- a.K();
- }
- }
- else if ((a.game.getCurrentTab() == 4) || (a.game.getCurrentTab() == 5))
- {
- if
- (a.equipment.containsOneOf(a.DB))
- {
- if (a.equipment.getItem(35).doAction("Open party interface"))
- {
- int i1;
- if ((i1 = 0) < 10)
- {
- a.sleep(100, 200);
- i1++;
- }
- if (a.game.getCurrentTab() == 5)
- {
- a.mouse.moveRandomly(200);
- }
- }
- else
- {
- a.mouse.moveRandomly(50);
- }
- }
- else if (a.inventory.containsOneOf(a.DB))
- {
- a.inventory.getItem
- (a.DB).doAction("Open party interface");
- }
- a.sleep(600, 800);
- }
- else if (a.interfaces.get(236).isValid())
- {
- a.interfaces.getComponent(236,
- 1).doAction("Continue");
- }
- else if (a.interfaces.get(211).isValid())
- {
- a.interfaces.getComponent(211, 3).doAction("Continue");
- }
- else if
- (a.interfaces.getComponent(939, 34).isValid())
- {
- a.interfaces.getComponent(939, 34).doAction("Leave-party");
- }
- a.sleep(1100, 1500);
- a.T();
- a.ud =
- "Outside";
- a.zB = false;
- }
- private boolean i(RSTile a)
- {
- if ((a == null) || (a.FA == null))
- {
- return false;
- }
- int i1 = a.getX(); int i2 =
- a.getY(); int i3 = a.FA.getX(); int i4 = a.FA.getY(); int i5 = i3 + 15; int i6 = i4 + 15;
- return (Math.abs(i1 - i3) == 1) || (Math.abs(i1 - i5) == 1) || (Math.abs
- (i2 - i4) == 1) || (Math.abs(i2 - i6) == 1);
- }
- private boolean F(RSObject a, String a)
- {
- if (a == null)
- return false;
- RSModel localRSModel;
- return
- (localRSModel = a.getModel()) != null
- ? a.l(localRSModel, a) : a.A(a.getLocation(), a);
- }
- public void mouseDragged(MouseEvent a)
- {
- }
- private void JA()
- {
- new i(a).start();
- }
- private int dA()
- {
- int[] arrayOfInt1 = { 52046 };
- int[] arrayOfInt2 = { 50663, 51762, 53750 };
- RSObject localRSObject1 = a.J(new
- String[] { "Spinning blades" });
- RSTile localRSTile1 = a.tA();
- if (localRSObject1 == null)
- {
- return -1;
- }
- RSTile localRSTile2 = a.F
- (localRSObject1.getLocation(), arrayOfInt2);
- RSTile localRSTile3 = a.F(localRSTile1, a.lC); RSTile localRSTile4 = a.F(a.nD, a.lC);
- if ((localRSTile3 == null) ||
- (localRSTile4 == null)) {
- return -1;
- }
- if ((!a.l(localRSTile3, true)) || (!a.l(localRSTile4, true)))
- {
- if (a.jA()) {
- return 2;
- }
- if
- (!a.j())
- return -1;
- RSObject localRSObject2 = a.J(new String[] { "Pendulum" });
- RSObject localRSObject3 = a.i(a.kg);
- a.l(a.vc, 40, 50);
- a.jA
- = a.npcs.getNearest(a.B);
- a.yd = a.l(a.Zd);
- if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
- {
- a.F(a.jA);
- }
- else if ((a.yd !=
- null) && (a.l(a.yd.getLocation(), false)))
- {
- a.l(a.yd);
- }
- else if (a.F(localRSObject2))
- {
- a.A(localRSObject2.getLocation(), 1);
- }
- else if ((localRSObject2 != null) && (a.calc.distanceTo(a.nD) < 4))
- {
- a.A(localRSObject2.getLocation(), 1);
- }
- else if (a.F(a.J(new String
- [] { "Spinning blades" })))
- {
- if (a.calc.distanceTo(localRSTile2) > 1)
- {
- if (!a.i(a.X()))
- {
- RSObject localRSObject4 =
- a.i(arrayOfInt2);
- a.A(localRSObject4 != null ? localRSObject4.getLocation() : a.X(), localRSObject4 != null ? 1 : 3);
- }
- else
- {
- a.A(localRSTile2, 1);
- }
- }
- else if (localRSObject2 != null) {
- a.l(localRSObject2.getLocation(), 1);
- }
- }
- else if
- (a.F(localRSObject3))
- {
- a.A(localRSObject3.getLocation(), 1);
- a.K(true);
- }
- else if (a.l(localRSTile1, true))
- {
- a.l(a.i(a.bB),
- "Step-onto");
- }
- a.K(false);
- }
- if (a.jA())
- return 2;
- if (a.l(a.i(a.lC), "Open"))
- {
- a.K(true);
- }
- a.sleep(200, 400);
- return 1;
- }
- private boolean l(String a, RSObject a)
- {
- int i1;
- if ((
- (i1 = a.inventory.getItemID(a)) > 0) && (a != null))
- {
- String str = a.A(a);
- RSTile
- localRSTile = a.getLocation();
- if (a.calc.distanceTo(localRSTile) > 4)
- {
- a.l(localRSTile, 1);
- }
- if (a.F(i1))
- {
- if (str.isEmpty
- ())
- {
- a.camera.turnToTile(localRSTile, a.random(5, 15));
- }
- a.sleep(200, 400);
- return a.doAction("Use " + a + " -> " + str);
- }
- }
- return false;
- }
- public void onFinish()
- {
- a.Od = false;
- a.iA = false;
- a.M = true;
- if ((a.pC > 1) && (a.FD))
- {
- a.FD = false;
- a.log
- ("Thanks for using iDungeon Pro v1.07");
- a.env.saveScreenshot(true);
- a.log("We completed " + a.pC + " dungeons for " + a.Td + " tokens!");
- }
- }
- public
- void mouseEntered(MouseEvent a)
- {
- }
- private RSObject l(RSObject a, int[] a)
- {
- double d1 = 99.989999999999995D;
- Object localObject = null;
- int i2;
- if (a
- != null)
- {
- RSObject[] arrayOfRSObject;
- int i1 = (arrayOfRSObject = a.J(a)).length;
- RSObject localRSObject;
- double d2;
- if ((!
- (localRSObject = arrayOfRSObject[i2]).equals(a)) && (
- (d2 = a.calc.distanceBetween(a.X(), localRSObject.getLocation())) < d1))
- {
- d1 = d2;
- localObject = localRSObject;
- }
- i2++;
- }
- return localObject;
- }
- private int kA()
- {
- int i1;
- if (a.interfaces.get(950).isValid())
- {
- Point
- localPoint;
- if (((localPoint = a.interfaces.getComponent(950, 67).getCenter()).x >
- 560) || (localPoint.y > 220))
- {
- RSComponent
- localRSComponent;
- if ((
- (localRSComponent = a.interfaces.getComponent(950, i1)).isValid()) && (localRSComponent.getArea().contains(localPoint)))
- {
- return i1;
- }
- i1++;
- }
- }
- return -1;
- }
- private boolean bA()
- {
- RSPlayer localRSPlayer;
- return ((localRSPlayer = a.Y()) !=
- null) &&
- (!localRSPlayer.isMoving()) && (localRSPlayer.getAnimation() == -1);
- }
- private int eA()
- {
- if (!a.O())
- {
- return -1;
- }
- RSObject
- localRSObject1 = a.J(new String[] { "Unfinished bridge" });
- RSObject localRSObject2 = a.i(new int[] { 54021, 54022, 54023, 54024 });
- RSTile localRSTile = a.tA();
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- if (a.jA())
- return 2;
- if (!a.j())
- {
- a.A(a.tA());
- return -1;
- }
- a.jA = a.npcs.getNearest(a.B);
- if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
- {
- if ((!a.QB()) || (!a.ZA())) {
- return 2;
- }
- a.hd = new Timer(a.random(240000, 300000));
- }
- if (a.l(localRSTile, true))
- {
- if (a.l(localRSObject1, "Jump"))
- {
- a.l(false);
- a.K(false);
- }
- }
- else
- {
- if (!a.kd)
- {
- a.lA.add(a.r);
- return 1;
- }
- if (a.inventory.getCount(new int[] { 19651 }) < 5)
- {
- if
- (a.l(localRSObject2, "Raid"))
- {
- a.K(false);
- }
- }
- else if (a.l(localRSObject1, "Repair"))
- {
- a.K(true);
- }
- }
- a.sleep(300, 500);
- return 1;
- }
- private boolean l(boolean a, int a, int a)
- {
- RSNPC localRSNPC;
- if (
- (localRSNPC = a.D(new int[] { 11226 })) != null)
- {
- a.SE = "";
- if (a.F(localRSNPC, "Trade"))
- {
- a.K(false);
- }
- a.sleep(600, 800);
- int i2;
- if ((!a) || ((!a.inventory.contains
- (19650)) && (!a.inventory.containsAll(a.jF))))
- {
- Object localObject1;
- Object localObject2;
- if (a)
- {
- i1 = (localObject1 =
- a.inventory.getItems(a.jF)).length;
- if ((localObject2 = localObject1[i2])
- .doAction("Sell 50"))
- {
- a.sleep(100, 300);
- }
- i2++;
- }
- int i1 = (localObject1 = a.inventory.getItems()).length;
- int i4;
- int i5;
- if ((i4 =
- (localObject2 =
- localObject1[i2]).getID()) >=
- 1) if ((!a.l(i4, new int[] { 18201, 19650 })) && ((i4 == a) || (!a.l(i4, a.pb))))
- {
- if ((i5 = 0) < 3)
- {
- if (localObject2.doAction("Sell 50"))
- {
- a.sleep(50, 300);
- a.sleep(50, 300);
- }
- else
- {
- i5++;
- }
- }
- }
- i2++;
- a.mouse.click(486, 270, 5, 10, true);
- a.sleep(400, 600);
- if ((localObject1 = a.interfaces.getComponent(956, 25))
- .isValid())
- {
- a.mouse.click(((RSComponent)localObject1).getComponent(3).getCenter
- ().x, ((RSComponent)localObject1).getComponent(5).getAbsoluteY() - 15, 4, 10, true);
- a.sleep(200, 300);
- }
- a.sleep(250, 400);
- i1 = a.kd ?
- 200 : 100;
- if (!a)
- i1 -= 50;
- a.mouse.click(i1, 275, 10, 10, false);
- int i3;
- if ((i3 = 0) < 5)
- {
- a.sleep(80, 120);
- i3++;
- }
- a.l("Buy 1");
- i2++;
- }
- a.interfaces.getComponent(956, 18).doAction("Close");
- a.sleep(700, 1000);
- }
- return
- (a.inventory.contains(19650)) || (a.inventory.containsAll(a.jF));
- }
- private boolean iA()
- {
- if (a.Ud < 13) {
- return true;
- }
- RSComponent
- localRSComponent1 = a.interfaces.getComponent(947, 608 + a.OA);
- RSComponent localRSComponent2 = a.interfaces.getComponent(947, 47);
- if ((!
- localRSComponent1.isValid()) || (!localRSComponent2.isValid()))
- {
- return false;
- }
- if (localRSComponent2.getComponents().length != 6)
- {
- return
- true;
- }
- RSComponent localRSComponent3;
- if (
- (localRSComponent3 = localRSComponent1).getScrollableContentHeight() == 0);
- if
- (localRSComponent3.getScrollableContentHeight() == 0)
- {
- return false;
- }
- int i1 = localRSComponent3.getAbsoluteY();
- int i2 =
- localRSComponent3.getRealHeight();
- if ((localRSComponent1.getAbsoluteY() >= i1) && (localRSComponent1.getAbsoluteY() <= i1 + i2 - localRSComponent1.getRealHeight
- ()))
- {
- return true;
- }
- RSComponent localRSComponent4 = localRSComponent2.getComponent(0);
- int i3 = localRSComponent3.getScrollableContentHeight();
- int i4;
- if ((i4 = (int)(localRSComponent4.getRealHeight() / i3 * (localRSComponent1.getRelativeY() + a.random(-i2 / 2, i2 / 2 - localRSComponent1.getRealHeight
- ())))) < 0)
- {
- i4 = 0;
- }
- else if (i4 >= localRSComponent4.getRealHeight())
- i4 = localRSComponent4.getRealHeight() - 1;
- a.mouse.click
- (localRSComponent4.getAbsoluteX() + a.random(0, localRSComponent4.getRealWidth()), localRSComponent4.getAbsoluteY() + i4, true);
- a.sleep(100, 300);
- if
- (localRSComponent1.isValid())
- {
- a.l(localRSComponent2.getComponent(localRSComponent1.getAbsoluteY() < i1 ? 4 : 5), "");
- a.sleep(50, 200);
- }
- return
- (localRSComponent1.isValid()) && (localRSComponent1.getAbsoluteY() >= i1) && (localRSComponent1.getAbsoluteY() <= i1 + i2 - localRSComponent1.getRealHeight());
- }
- private int FA()
- {
- String str = "";
- if (!a.O())
- {
- return -1;
- }
- int i1 = 0; int i2 = 0;
- RSNPC localRSNPC = a.i(new String[] { "hoardstalker" });
- if (!a.KD)
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- RSObject localRSObject = a.i(new int[] {
- 49600, 49601, 49602 });
- Object localObject2;
- if (i1 < 1)
- {
- RSComponent localRSComponent;
- if (!
- (localRSComponent =
- a.interfaces.getComponent(242, 4)).isValid())
- {
- localRSComponent = a.interfaces.getComponent(241, 4);
- }
- if (localRSComponent.isValid())
- {
- if (
- (localObject2 = localRSComponent.getText()).contains("yetsan"))
- {
- a.uC = "Summoning requirement not met";
- return -1;
- }
- if (((String)localObject2).contains("a deathslinger"))
- {
- i1 = 17389;
- }
- else if (((String)
- localObject2).contains("cannot illuminate"))
- {
- i1 = 17393;
- }
- else if (((String)localObject2).contains("blunt force"))
- {
- i1 = 17401;
- }
- else if (((String)localObject2).contains("make you dead"))
- {
- i1 = 17403;
- }
- else if
- (((String)localObject2).contains("lost in winds"))
- {
- i1 = 17379;
- }
- else if (((String)localObject2).contains("stones may"))
- {
- i1 = 17387;
- }
- else if (((String)localObject2).contains("friends fly"))
- {
- i1 = 17405;
- }
- else
- {
- i2 = 1;
- if (((String)localObject2).contains("veins I flow"))
- {
- i1 = 17385;
- str = "rune";
- }
- else if (((String)localObject2).contains("get you almost"))
- {
- i1 = 17391;
- str = "Coins";
- }
- else if
- (((String)localObject2).contains("denizens"))
- {
- i1 = 17399;
- str = "rod";
- }
- else if (((String)
- localObject2).contains("one eye"))
- {
- i1 = 17409;
- str = "Needle";
- }
- else if (((String)localObject2).contains
- ("demonstrate faith"))
- {
- i1 = 17383;
- str = "symbol";
- }
- else
- {
- i2 = 2;
- if (((String)localObject2).contains("yellow skin"))
- {
- i1 = 17381;
- str = "Banana";
- }
- else if
- (((String)localObject2).contains("water that"))
- {
- i1 = 17395;
- str = "whiskey";
- }
- else if
- (((String)localObject2).contains("many call"))
- {
- i1 = 17407;
- str = "Mushroom";
- }
- else if
- (((String)localObject2).contains("you cannot"))
- {
- i1 = 17413;
- str = "water";
- }
- else if (((String)
- localObject2).contains("slowest of"))
- {
- i1 = 17411;
- str = "Poison";
- }
- else if (((String)
- localObject2).contains("serpent am I"))
- {
- i1 = 17397;
- str = "eel";
- }
- }
- }
- if (i1 <
- 1)
- {
- a.uC = "Uknown riddle";
- return -1;
- }
- a.log("Fetching item: " + i1 + "; Location: " + i2);
- }
- else
- {
- a.F(localRSNPC, "Get-Riddle");
- }
- }
- else
- {
- if (a.inventory.contains(i1))
- {
- int i3 = a.inventory.getCount(new
- int[] { i1 });
- for (; ; a.sleep(200, 400))
- {
- if (a.jA()) {
- return 2;
- }
- a.K(false);
- }
- }
- if (localRSObject != null)
- {
- a.l(localRSObject, "Open");
- }
- else if (i2 == 0)
- {
- a.l(a.groundItems.getNearest(new
- int[] { i1 }));
- }
- else if (i2 == 1)
- {
- if (a.interfaces.get(238).isValid())
- a.l(a.interfaces.get(238), new String[] { str });
- else {
- a.l(a.i(new int[] { 49594, 49595, 49596 }), "Search");
- }
- }
- else if (i2 == 2)
- {
- Object localObject1 =
- null;
- int i4 = (localObject2 = a.J(new int[] { 49597, 49598, 49599 })).length;
- int i5;
- Object localObject3;
- RSTile localRSTile =
- (localObject3 = localObject2[i5]).getLocation();
- if ((!a.i(localRSTile)) && (a.l(localRSTile, true)))
- {
- localObject1 =
- localObject3;
- }
- else
- i5++;
- if (localObject1 == null)
- {
- if ((localObject2 = a.J(new String[] { "range" })) ==
- null)
- {
- return -1;
- }
- a.A(((RSObject)localObject2).getLocation(), 1);
- }
- else if (a.interfaces.get
- (237).isValid())
- {
- a.l(a.interfaces.get(237), new String[] { str, "More" });
- }
- else
- {
- a.l(localObject1,
- "Search");
- }
- }
- }
- a.K(true);
- }
- return 1;
- }
- private int A(RSTile a)
- {
- a.BG = true;
- RSObject localRSObject;
- if ((a != null) &&
- (!a.l(a, true)))
- {
- localRSObject = a.i(a.gA);
- String str = "Cross-the";
- if (localRSObject == null)
- {
- localRSObject = a.J(new String[] {
- "Unfinished bridge" });
- str = "Jump";
- }
- if (localRSObject != null)
- {
- if (a.Zc())
- return 2;
- if (!a.j())
- {
- return -1;
- }
- if (a.l(localRSObject, str))
- {
- a.K(true);
- }
- a.K(true);
- }
- }
- return 1;
- }
- private void DA()
- {
- RSGroundItem[] arrayOfRSGroundItem1 = new RSGroundItem[a.Sb.length];
- if (a.PB == null)
- a.PB = new String[a.Sb.length];
- RSGroundItem[] arrayOfRSGroundItem2;
- int i2 = (arrayOfRSGroundItem2 = a.groundItems.getAll()).length;
- int i3;
- RSGroundItem localRSGroundItem2 = arrayOfRSGroundItem2[i3];
- int i5;
- if
- (a.r.contains(new RSTile[] { localRSGroundItem2.getLocation() }))
- {
- String str2 = localRSGroundItem2.getItem().getName();
- int i4;
- if ((
- (i4 =
- a.F(str2)) > 0) && (i4 <= a.tA))
- {
- if ((a.l(str2, a.wC[i5])) && (i4 > a.Tb[i5]) && ((!a.wC[i5][0].equals("kiteshield")) || ((!a.GD) && (!str2.contains
- ("(o)")))))
- {
- a.Tb[i5] = i4;
- arrayOfRSGroundItem1[i5] = localRSGroundItem2;
- }
- i5++;
- }
- }
- i3++;
- int i1;
- RSGroundItem localRSGroundItem1;
- if (
- (localRSGroundItem1 = arrayOfRSGroundItem1[i1]) != null)
- {
- String str1 = localRSGroundItem1.getItem().getName();
- if ((a.PB[i1] == null) || (!str1.equals(a.PB[i1])))
- {
- a.log("Improving equipment with: " + str1);
- a.PB[i1] = str1;
- }
- }
- i1++;
- }
- private boolean l(RSObject a, String a)
- {
- if (a == null) {
- return false;
- }
- int i1 = 0;
- RSTile localRSTile = a.getLocation();
- Object localObject;
- if ((a.game.getCurrentTab() == 4) && (
- (localObject = a.inventory.getSelectedItem()) != null))
- ((RSItem)localObject).doClick(true);
- if (a.F(a, a))
- {
- localObject = a.X();
- double d1 = a.calc.distanceBetween(a.X(), localRSTile);
- a.sleep((int)d1 * 200, (int)d1 * 220);
- i1 = (a.Y().isMoving()) ||
- (a.calc.distanceTo(localRSTile) < 4) || (!((RSTile)localObject).equals(a.X())) ? 1 : 0;
- }
- if ((!a.Y().isMoving()) && (a.calc.distanceTo(localRSTile) > 4))
- {
- a.i(localRSTile, 1);
- if ((a.Qc.contains("Backtracking")) && (!a.combat.isAutoRetaliateEnabled()) && (a.game.getCurrentTab() != 0))
- a.game.openTab(0);
- else if (a.calc.distanceTo(localRSTile) > a.random(6, 8))
- {
- a.camera.turnToTile(localRSTile, a.random(5, 15));
- }
- else {
- a.l(false);
- }
- }
- while ((a.game.getCurrentTab() == 4) && (!a.equals("Pull")) && (!a.Ke) && (a.JC()));
- a.sleep(100, 200);
- return i1 != 0 ? true : a.F(a, a);
- }
- private
- boolean A(RSNPC a)
- {
- if ((a == null) || (a.l(a.getAnimation(), a.Yc))) {
- return true;
- }
- return (a.isInCombat()) && (a.l(a) == 0) && (!a.l(a));
- }
- private boolean i(boolean a)
- {
- if (a.ZA == null)
- {
- RSObject localRSObject;
- if ((a.r.contains(new RSTile[] { a.X() })) && (
- (localRSObject =
- a.G(a.nD)) != null))
- {
- int i2 = 0;
- RSTile[] arrayOfRSTile;
- int i3 = (arrayOfRSTile = localRSObject.getArea().getTileArray()).length;
- int i4;
- RSTile localRSTile = arrayOfRSTile[i4];
- if (a.calc.distanceBetween(a.X(), localRSTile) == 1.0D)
- {
- i2 = 1;
- }
- else
- i4++;
- if (i2 == 0)
- {
- return false;
- }
- }
- }
- int i1;
- if (a.ZA == null)
- {
- if (a.game.getClientState() == 11)
- {
- a.sleep(100, 200);
- i1--;
- }
- else
- {
- if ((a) && (!a.iD())) {
- return true;
- }
- if (a.cA())
- {
- return !a.IA();
- }
- }
- }
- else if (a.ZA.contains(new RSTile[] { a.X() }))
- return true;
- a.sleep(200, 400);
- i1++;
- return false;
- }
- private
- int lA()
- {
- double d1 = 99.989999999999995D;
- int i1 = -1;
- Object localObject1 = null;
- a.nD = null;
- a.WA = null;
- ArrayList localArrayList = new
- ArrayList();
- for (Iterator localIterator = a.J.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
- if (a.r.contains(new
- RSTile[] { localRSTile }))
- {
- localArrayList.add(localRSTile);
- }
- }
- RSTile localRSTile;
- Object localObject2;
- if (!localArrayList.isEmpty())
- {
- for (localIterator = localArrayList.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
- localObject2 = a.G
- (localRSTile);
- double d2 = a.calc.distanceBetween(a.X(), localRSTile);
- if ((localObject2 != null) && (d2 < d1))
- {
- i1 = 0;
- d1 =
- d2;
- i1 = ((RSObject)localObject2).getID();
- localObject1 = localRSTile;
- }
- }
- if ((localObject1 != null) && (i1 > 0))
- {
- for
- (localIterator = a.gc.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
- if (a.calc.distanceBetween(localObject1,
- localRSTile) < 3.0D)
- {
- a.nD = localObject1;
- a.WA = localRSTile;
- return 2;
- }
- }
- for (localIterator =
- a.vF.iterator(); localIterator.hasNext(); ) { localRSTile = (RSTile)localIterator.next();
- if (a.calc.distanceBetween(localObject1, localRSTile) < 3.0D)
- {
- a.nD = localObject1;
- a.WA = localRSTile;
- return 3;
- }
- }
- if (a.l(i1, a.WD))
- {
- a.nD =
- localObject1;
- return 1;
- }
- if (a.id.contains(localObject1))
- {
- a.nD = localObject1;
- return 4;
- }
- if (a.l(i1,
- a.sb))
- {
- a.nD = localObject1;
- return 1;
- }
- }
- }
- for (localIterator = a.w.iterator(); localIterator.hasNext(); ) { localRSTile
- = (RSTile)localIterator.next();
- if ((a.r.contains(new RSTile[] { localRSTile })) && ((a.QA == null) || (!localRSTile.equals(a.QA)))) {
- for (localObject2 =
- a.Nc.iterator(); ((Iterator)localObject2).hasNext(); ) { RSArea localRSArea = (RSArea)((Iterator)localObject2).next();
- if (a.calc.distanceBetween(localRSTile,
- localRSArea.getNearestTile(localRSTile)) < 3.0D)
- {
- if ((!a.l(localRSArea, a.J)) && (!a.l(localRSArea, a.w)))
- break;
- a.nD =
- localRSTile;
- return 5;
- }
- }
- }
- }
- return 0;
- }
- public void keyReleased(KeyEvent a)
- {
- }
- private RSGroundItem l
- (Filter<RSGroundItem> a)
- {
- double d1 = 99.989999999999995D;
- Object localObject = null;
- int i3;
- if (a.r != null)
- {
- int i1 = a.r.getX(); int i2 =
- a.r.getY();
- int i4;
- RSTile localRSTile = new RSTile(i3, i4);
- double d2;
- int i6;
- if (
- (d2 = a.calc.distanceBetween(a.X(), localRSTile))
- < d1)
- {
- RSGroundItem[] arrayOfRSGroundItem;
- int i5 = (arrayOfRSGroundItem = a.groundItems.getAllAt(i3, i4)).length; RSGroundItem localRSGroundItem =
- arrayOfRSGroundItem[i6];
- if (a.accept(localRSGroundItem))
- {
- d1 = d2;
- localObject = localRSGroundItem;
- }
- else
- {
- i6++;
- }
- }
- i4++;
- i3++;
- }
- return localObject;
- }
- private boolean F(RSNPC a)
- {
- if ((a == null) || (!a.isValid()) || (a.l(a))) {
- return false;
- }
- if (a.l(a, "Attack " + a.getName()))
- {
- if (a.tc.isEmpty())
- {
- a.D(a);
- if (!a.F())
- {
- a.sleep(200, 400);
- }
- }
- return true;
- }
- int i1;
- if (!a.isOnScreen())
- {
- if (!a.Y().isMoving())
- {
- a.l(a.getLocation(), 1);
- a.sleep(200,
- 400);
- }
- if ((i1 = 0) < 10)
- {
- a.sleep(100, 150);
- i1++;
- }
- }
- return (a.l(a)) || (a.l(a, "Attack"));
- }
- private RSTile F(RSTile a,
- String a)
- {
- double d1 = 99999.990000000005D;
- Object localObject = null;
- int i2;
- if (a != null)
- {
- RSObject[] arrayOfRSObject;
- int i1 =
- (arrayOfRSObject = a.objects.getAll()).length;
- RSObject localRSObject;
- RSTile localRSTile =
- (localRSObject = arrayOfRSObject[i2]).getLocation();
- double d2;
- if ((
- (d2 = a.calc.distanceBetween(localRSTile, a)) < d1) && (a.A(localRSObject).contains(a)))
- {
- d1 = d2;
- localObject =
- localRSTile;
- }
- i2++;
- }
- return localObject;
- }
- private boolean CA()
- {
- if ((a.nA) && (a.zB) && (!a.nc) && (!a.Qc.startsWith("Entering")) && (!a.M
- ()))
- {
- a.log.severe("Oops.. We ended up outside somehow :S");
- a.T();
- a.ud = "Outside";
- a.zB = false;
- a.N = false;
- return true;
- }
- return false;
- }
- private void V()
- {
- if (a.qd)
- {
- a.log("Pausing iDungeon...");
- if (!a.Od)
- {
- return;
- }
- a.sleep(400, 600);
- a.KA = new Timer(0L);
- }
- }
- private boolean l(RSTile a, boolean a)
- {
- RSTile localRSTile;
- if ((
- (localRSTile = a.X()) == null) || (a == null))
- return false;
- int i1 = localRSTile.getX() - a.game.getBaseX(); int i2 = localRSTile.getY() - a.game.getBaseY();
- int i3 = a.getX() - a.game.getBaseX(); int i4 =
- a.getY() - a.game.getBaseY();
- int[][] arrayOfInt1 = new int[104][104]; int[][] arrayOfInt2 = new int[104][104];
- int[] arrayOfInt3 = new int[4000]; int[]
- arrayOfInt4 = new int[4000];
- arrayOfInt1[i5][i6] = 0;
- arrayOfInt2[i5][i6] = 99999999;
- i6++;
- i5++;
- int i5 = i1; int i6 = i2;
- arrayOfInt1[i1][i2] = 99;
- arrayOfInt2[i1][i2] = 0;
- int i7 = 0; int i8 = 0;
- arrayOfInt3[i7] = i1;
- arrayOfInt4[(i7++)] = i2;
- int[][] arrayOfInt5 = a.walking.getCollisionFlags
- (a.game.getPlane());
- int i9 = arrayOfInt3.length;
- while (i8 != i7)
- {
- i5 = arrayOfInt3[i8];
- i6 = arrayOfInt4[i8];
- if (a)
- {
- if
- (Math.abs(i6 - i4) + Math.abs(i5 - i3) == 1) {
- return true;
- }
- }
- else if ((i5 == i3) && (i6 == i4))
- return true;
- i8 = (i8 + 1) %
- i9;
- int i10 = arrayOfInt2[i5][i6] + 1;
- if ((i6 > 0) && (arrayOfInt1[i5][(i6 - 1)] == 0) && ((arrayOfInt5[(i5 + 1)][i6] & 0x1280102) == 0))
- {
- arrayOfInt3[i7] = i5;
- arrayOfInt4[i7] = (i6 - 1);
- i7 = (i7 + 1) % i9;
- arrayOfInt1[i5][(i6 - 1)] = 1;
- arrayOfInt2[i5][(i6 - 1)] = i10;
- }
- if ((i5 > 0) && (arrayOfInt1[(i5 - 1)][i6] == 0) && ((arrayOfInt5[i5][(i6 + 1)] & 0x1280108) == 0))
- {
- arrayOfInt3[i7] = (i5 - 1);
- arrayOfInt4[i7] = i6;
- i7 = (i7 + 1) % i9;
- arrayOfInt1[(i5 - 1)][i6] = 2;
- arrayOfInt2[(i5 - 1)][i6] = i10;
- }
- if ((i6 < 103) &&
- (arrayOfInt1[i5][(i6 + 1)] == 0) && ((arrayOfInt5[(i5 + 1)][(i6 + 2)] & 0x1280120) == 0))
- {
- arrayOfInt3[i7] = i5;
- arrayOfInt4[i7] = (i6 + 1);
- i7 = (i7 + 1) % i9;
- arrayOfInt1[i5][(i6 + 1)] = 4;
- arrayOfInt2[i5][(i6 + 1)] = i10;
- }
- if ((i5 < 103) && (arrayOfInt1[(i5 + 1)][i6] == 0) &&
- ((arrayOfInt5[(i5 + 2)][(i6 + 1)] & 0x1280180) == 0))
- {
- arrayOfInt3[i7] = (i5 + 1);
- arrayOfInt4[i7] = i6;
- i7 = (i7 + 1) % i9;
- arrayOfInt1[(i5 + 1)][i6] = 8;
- arrayOfInt2[(i5 + 1)][i6] = i10;
- }
- if ((i5 > 0) && (i6 > 0) && (arrayOfInt1[(i5 - 1)][(i6 - 1)] == 0) && ((arrayOfInt5
- [i5][i6] & 0x128010E) == 0) && ((arrayOfInt5[i5][(i6 + 1)] & 0x1280108) == 0) && ((arrayOfInt5[(i5 + 1)][i6] & 0x1280102) == 0))
- {
- arrayOfInt3[i7] = (i5 -
- 1);
- arrayOfInt4[i7] = (i6 - 1);
- i7 = (i7 + 1) % i9;
- arrayOfInt1[(i5 - 1)][(i6 - 1)] = 3;
- arrayOfInt2[(i5 - 1)][(i6 - 1)] = i10;
- }
- if ((i5 > 0) && (i6 < 103) && (arrayOfInt1[(i5 - 1)][(i6 + 1)] == 0) && ((arrayOfInt5[i5][(i6 + 2)] & 0x1280138) == 0) && ((arrayOfInt5[i5][(i6 + 1)] & 0x1280108) ==
- 0) && ((arrayOfInt5[(i5 + 1)][(i6 + 2)] & 0x1280120) == 0))
- {
- arrayOfInt3[i7] = (i5 - 1);
- arrayOfInt4[i7] = (i6 + 1);
- i7 = (i7 + 1) % i9;
- arrayOfInt1[(i5 - 1)][(i6 + 1)] = 6;
- arrayOfInt2[(i5 - 1)][(i6 + 1)] = i10;
- }
- if ((i5 < 103) && (i6 > 0) && (arrayOfInt1[(i5 + 1)][(i6 - 1)] == 0)
- && ((arrayOfInt5[(i5 + 2)][i6] & 0x1280183) == 0) && ((arrayOfInt5[(i5 + 2)][(i6 + 1)] & 0x1280180) == 0) && ((arrayOfInt5[(i5 + 1)][i6] & 0x1280102) == 0))
- {
- arrayOfInt3[i7] = (i5 + 1);
- arrayOfInt4[i7] = (i6 - 1);
- i7 = (i7 + 1) % i9;
- arrayOfInt1[(i5 + 1)][(i6 - 1)] = 9;
- arrayOfInt2[(i5 + 1)]
- [(i6 - 1)] = i10;
- }
- if ((i5 < 103) && (i6 < 103) && (arrayOfInt1[(i5 + 1)][(i6 + 1)] == 0) && ((arrayOfInt5[(i5 + 2)][(i6 + 2)] & 0x12801E0) == 0) &&
- ((arrayOfInt5[(i5 + 2)][(i6 + 1)] & 0x1280180) == 0) && ((arrayOfInt5[(i5 + 1)][(i6 + 2)] & 0x1280120) == 0))
- {
- arrayOfInt3[i7] = (i5 + 1);
- arrayOfInt4[i7] = (i6 + 1);
- i7 = (i7 + 1) % i9;
- arrayOfInt1[(i5 + 1)][(i6 + 1)] = 12;
- arrayOfInt2[(i5 + 1)][(i6 + 1)] = i10;
- }
- }
- return
- false;
- }
- private int y()
- {
- if (!a.O()) {
- return -1;
- }
- RSTile localRSTile = a.tA();
- RSObject localRSObject = a.J(new String[] { "Spinning blades"
- });
- a.lA();
- if ((localRSObject == null) || (localRSTile == null) || (a.nD == null))
- {
- return -1;
- }
- if (a.calc.distanceBetween(localRSTile,
- localRSObject.getLocation()) < 8.0D)
- {
- a.log("Agility course layout 1");
- return a.a();
- }
- if (a.calc.distanceBetween(a.r.getCentralTile(),
- localRSObject.getLocation()) < 4.0D)
- {
- a.log("Agility course layout 3");
- return a.rd();
- }
- a.log("Agility course layout 2");
- return a.dA();
- }
- private int l(RSCharacter a)
- {
- try
- {
- return a.getHPPercent();
- }
- catch (Exception localException)
- {
- if (a.UA)
- localException.printStackTrace();
- }
- return 100;
- }
- private boolean A(RSTile a, int a, int a)
- {
- if (a == null)
- {
- return false;
- }
- RSTile
- localRSTile1 = a.X(); RSTile localRSTile2 = new RSTile(a.getX() + a, a.getY() + a);
- if (localRSTile1.equals(localRSTile2))
- return true;
- int i3;
- if
- (a.calc.distanceTo(localRSTile2) > 1)
- {
- RSTile[] arrayOfRSTile;
- int i2 = (arrayOfRSTile = a.h(a)).length; RSTile localRSTile3 = arrayOfRSTile[i3];
- if
- ((a.G(localRSTile3) == null) && (!localRSTile3.equals(localRSTile2)) && (a.calc.distanceBetween(localRSTile3, localRSTile2) < 2.0D))
- {
- a.A(localRSTile3,
- 0);
- a.K(false);
- }
- else
- {
- i3++;
- }
- }
- a.A(localRSTile2, 0);
- a.K(false);
- if (a.X().equals(localRSTile1))
- {
- int i1;
- a.A(a.X(), i1);
- a.K(false);
- i1++;
- a.A(localRSTile2, 0);
- a.K(false);
- }
- return a.X().equals(localRSTile2);
- }
- private void r()
- {
- a.EB.clear();
- a.SC = a.skills.getRealLevel(5);
- int i1;
- Object localObject1;
- int i10;
- if (a.le)
- {
- if (!a.Od) {
- return;
- }
- a.CD =
- a.skills.getCurrentExp(0);
- a.q = a.skills.getCurrentExp(2);
- a.Rc = a.skills.getCurrentExp(1);
- a.ZF = a.skills.getCurrentExp(3);
- a.xB =
- a.skills.getCurrentExp(4);
- a.L = a.skills.getCurrentExp(6);
- a.pd = a.skills.getCurrentExp(5);
- a.JC = a.skills.getCurrentExp(24);
- a.og =
- a.skills.getCurrentExp(20);
- a.vB = a.skills.getCurrentExp(14);
- a.aD = a.skills.getCurrentExp(11);
- a.K = a.skills.getCurrentExp(8);
- a.RA =
- a.skills.getCurrentExp(13);
- a.Cg = a.skills.getCurrentExp(12);
- a.Gg = a.skills.getCurrentExp(16);
- a.db = a.skills.getCurrentExp(17);
- a.ND =
- a.skills.getCurrentExp(23);
- a.f = a.skills.getCurrentExp(15);
- a.qc = a.skills.getCurrentExp(22);
- a.pD = a.skills.getCurrentExp(7);
- a.vA =
- a.skills.getCurrentExp(10);
- a.e = a.skills.getCurrentExp(18);
- a.me = a.skills.getRealLevel(24);
- a.JA = a.me;
- if (!a.H())
- {
- if (a.SC >
- 10)
- {
- a.O[1][5] = 1;
- a.xe = a.O[1][5];
- if (a.SC > 36)
- {
- a.O[1][3] = 1;
- a.VA = a.O[1][3];
- }
- }
- if (a.skills.getRealLevel(3) < 60)
- {
- a.zA = true;
- a.O[1][2] = 1;
- }
- if (a.skills.getRealLevel(1) < 20)
- {
- a.gB = true;
- a.O[1][6] = a.gB;
- }
- else
- {
- a.bc = true;
- a.O[1][7] = a.bc;
- }
- }
- a.kd = false;
- int
- i6;
- if (a.groundItems.getNearest(new int[] { 18177, 18175, 18173, 18171, 18169 }) != null)
- {
- a.kd = true;
- }
- else
- {
- a.game.openTab(9);
- a.game.openTab(4);
- String str1;
- if (!(str1 = a.interfaces.getComponent(550, 6).getText())
- .isEmpty())
- {
- str1 = str1.concat(".");
- String[] arrayOfString;
- int i4 = (arrayOfString = a.Md).length; localObject2 = arrayOfString[i6];
- if
- (str1.contains(" " + (String)localObject2 + ".")) {
- a.kd = true;
- }
- else
- {
- i6++;
- }
- }
- }
- a.log
- ("Members world: " + a.kd);
- a.DC = 0;
- a.iA = false;
- a.UB = false;
- a.qD = false;
- a.dc = true;
- a.game.setChatOption(3,
- Game.CHAT_MODE.VIEW);
- a.env.setUserInput(3);
- if (!a.Od)
- {
- return;
- }
- a.sleep(300, 600);
- a.env.setUserInput(2);
- a.UB = true;
- a.qD = false;
- a.v = a.combat.getFightMode();
- if (a.IB) {
- a.v = 4;
- }
- else if (a.v == 4)
- a.v = 1;
- if ((a.gB) && ((a.v == a.xD)
- || (a.v == 3)))
- {
- a.v = 1;
- }
- a.SD = a.v;
- a.sleep(200, 400);
- i1 = a.skills.getRealLevel(0); i3 = a.skills.getRealLevel(1);
- a.tA =
- (i3 == 99 ? 11 : i3 / 10 + 1);
- a.mA = (i1 == 99 ? 11 : i1 / 10 + 1);
- RSItem localRSItem1;
- if (((localRSItem1 = a.equipment.getItem(17)) != null) &&
- (localRSItem1.getID() > 0))
- {
- a.Vc = localRSItem1.getID();
- localObject1 = a.l(localRSItem1);
- localObject2 = a.J((String)localObject1);
- a.aA = a.F((String)localObject1);
- a.cd = a.i((String)localObject1);
- if (a.cd.equals("maul"))
- {
- i10 = a.skills.getRealLevel(2);
- a.mA = (i10 == 99 ? 11 : i10 / 10 + 1);
- }
- else if ((a.cd.equals("dagger")) || (a.cd.equals("rapier")))
- {
- if (((String)
- localObject2).equals("Hailstorm"))
- {
- a.aA = 11;
- }
- a.Gd = -1;
- a.xb = 2;
- a.bC = 1;
- }
- else if
- (a.cd.equals("longsword"))
- {
- a.Gd = -1;
- a.xb = 1;
- a.bC = 2;
- }
- else if ((a.cd.equals("battleaxe")) || (a.cd.equals("2h
- sword")))
- {
- a.Gd = 2;
- a.xb = 1;
- a.bC = -1;
- }
- else if (a.cd.equals("spear"))
- {
- a.Gd = 2;
- a.xb =
- 1;
- a.bC = 0;
- }
- if ((a.cd.equals("longsword")) || (a.cd.equals("warhammer")) || (a.cd.equals("maul")))
- {
- a.xD = 2;
- }
- if ((a.cd.equals("2h sword")) || (a.cd.equals("maul")) || (a.cd.equals("spear")) || (a.cd.contains("bow")))
- {
- a.GD = true;
- }
- if (a.aA ==
- 0)
- {
- a.aA = 11;
- }
- a.log("Weapon - Metal: " + (String)localObject2 + "; Type: " + a.cd);
- a.log("Weapon tier: " + a.aA + ", Max
- weapon tier: " + a.mA + ", Two-handed: " + (a.GD ? "Yes" : "No"));
- }
- if ((
- (localObject1 = a.equipment.getItem(38)) != null) && (((RSItem)
- localObject1).getID() > 0))
- {
- a.cc = ((RSItem)localObject1).getID();
- }
- Object localObject2 = a.jb();
- RSItem localRSItem2;
- if
- (((localRSItem2 = localObject2[i10]) != null) &&
- (localRSItem2.getID() > 0))
- {
- String str3 = a.l(localRSItem2);
- if ((i10 == 0) &&
- (str3.contains("silk hood")))
- {
- a.VD[i10] = 11;
- a.Xb = true;
- }
- else if ((i10 == 2) && ((str3.contains("blastbox")) ||
- (str3.contains("surgebox"))))
- {
- a.pB = localRSItem2.getID();
- a.VD[i10] = 11;
- a.GD = true;
- }
- else
- {
- a.VD[i10] = a.F(str3);
- }
- a.log("Equipped: " + str3 + "; initial tier: " + a.VD[i10] + "; hooded: " + a.Xb);
- }
- i10++;
- }
- int i3 = a.VD[i1];
- a.Tb[i1] = i3;
- i1++;
- RSItem[] arrayOfRSItem;
- i3 = (arrayOfRSItem = a.inventory.getItems()).length;
- int i12;
- if (
- (localObject1 = arrayOfRSItem
- [i5]) != null)
- {
- int i8 = ((RSItem)localObject1).getID();
- String str2;
- if (((str2 = a.l((RSItem)localObject1)) != null) &&
- (i8 > 0) && ((i12
- = a.F(str2)) > 0))
- {
- if ((a.l(str2, a.wC[i13])) && (i12 > a.Tb[i13]))
- {
- int i15;
- if ((i15 = 0) < 5)
- {
- a.inventory.getItem(new int[] { i8 }).doClick(true);
- a.sleep(800, 1000);
- i15++;
- }
- a.Tb[i13] = i12;
- }
- i13++;
- }
- }
- i5++;
- if ((a.k) || ((a.i) && (a.eB > 0)))
- a.kC = true;
- if ((a.Xd) || ((a.BB) && (a.eB > 0) && (a.cc > 0)))
- {
- a.Sd = true;
- }
- if
- ((a.IB) || ((a.vC) && ((a.eB > 0) || (a.pB > 0)))) {
- a.iD = true;
- }
- i3 = a.Tb[i2];
- a.Sb[i2] = i3;
- i2++;
- a.vc = new int[] { 18159, 18161, 18163,
- 18165, 18167, 18169, 18171, 18173, 18175, 18177 };
- a.vc = new int[] { 18161, 18163, 18165, 18167, 18169, 18171, 18173, 18175, a.zA ?
- i15 :
- 18177 };
- int i2 = a.skills.getRealLevel(3) / (a.kd ? 23 : 34);
- i3 = a.vc.length - i2; int i5 = i2 + (a.kd ? 3 : 1);
- int i7 = a.vc.length - i5;
- a.UC = new int[i3];
- a.lG = new int[i7];
- System.arraycopy(a.vc, i2, a.UC, 0, i3);
- System.arraycopy(a.vc, i5, a.lG, 0, i7);
- a.W = new int[] { 18159, a.kd ? new int[] { 18159,
- 18161, 18163 } : 18161 };
- Object localObject3;
- int i11 = (localObject3 = a.vc).length; int i13 = localObject3[i12];
- a.EB.add(Integer.valueOf(i13));
- i12++;
- if (a.kf)
- {
- i11 = (localObject3 = a.aC).length; i13 = localObject3[i12];
- a.EB.add(Integer.valueOf(i13));
- i12++;
- }
- if (a.Vc > 0)
- {
- a.EB.add(Integer.valueOf(a.Vc));
- }
- if (a.eB > 0)
- {
- a.EB.add(Integer.valueOf(a.eB));
- }
- if (a.pB > 0) {
- a.EB.add(Integer.valueOf(a.pB));
- }
- if (a.cc > 0) {
- a.EB.add(Integer.valueOf(a.cc));
- }
- i11 = (localObject3 = a.x).length;
- Object localObject4;
- Object localObject6;
- int i16 =
- (localObject6
- = localObject4 = localObject3[i12]).length;
- int i17;
- int i18 = localObject6[i17];
- a.EB.add(Integer.valueOf(i18));
- i17++;
- i12++;
- if (a.Zc > 4)
- {
- i11 = (localObject3 = a.jF).length; int i14 = localObject3[i12];
- a.EB.add(Integer.valueOf(i14));
- i12++;
- a.EB.add
- (Integer.valueOf(18829));
- a.EB.add(Integer.valueOf(17789));
- if (!a.kd)
- {
- a.EB.remove(Integer.valueOf(17490));
- a.EB.remove(Integer.valueOf
- (17754));
- }
- else
- {
- a.EB.add(Integer.valueOf(17566));
- }
- }
- else if (a.Ud > 11)
- {
- a.EB.add(Integer.valueOf(16295));
- }
- if
- ((a.E) && (a.OA < 1))
- {
- if ((a.game.getCurrentTab() == 4) || (a.game.getCurrentTab() == 5))
- {
- if (a.equipment.containsOneOf(a.DB)) {
- a.equipment.getItem(35).doAction("Open party interface");
- }
- else if (a.inventory.containsOneOf(a.DB))
- a.inventory.getItem(a.DB).doAction("Open
- party interface");
- a.sleep(800, 1200);
- }
- a.sleep(300, 500);
- a.ad();
- }
- i11 = (localObject3 = a.inventory.getItems()).length;
- Object
- localObject5;
- if ((
- (localObject5 = localObject3[i12]) != null) && (localObject5.getName().contains("(b)"))) {
- a.EB.add(Integer.valueOf
- (localObject5.getID()));
- }
- i12++;
- a.pb = new int[a.EB.size()];
- int i9;
- a.pb[i9] = ((Integer)a.EB.get(i9)).intValue();
- i9++;
- if (a.k)
- {
- a.HC = 1;
- }
- else if (a.Xd)
- {
- a.HC = 2;
- a.l(a.cc, "Wield");
- }
- else if (a.IB)
- {
- a.HC = 3;
- a.l(a.pB, "Wield");
- if (a.F(a.Qb,
- "Autocast"))
- {
- a.sleep(300, 600);
- }
- a.sleep(100, 200);
- }
- a.bb = a.HC;
- if (a.le)
- {
- a.log("Settings complete!");
- a.Tb();
- if (a.Xd)
- {
- a.Ec = a.Ad;
- a.yA = a.VB;
- a.wC = a.LA;
- }
- else if (a.IB)
- {
- a.Ec = a.ME;
- a.wC = a.lB;
- }
- a.z
- = new Timer(0L);
- a.le = false;
- }
- a.hA = new Timer(a.random(360000, 480000));
- }
- private void R()
- {
- int i2;
- if (a.aA < a.mA)
- {
- RSItem[]
- arrayOfRSItem;
- int i1 = (arrayOfRSItem = a.inventory.getItems()).length;
- RSItem localRSItem;
- if (
- (localRSItem = arrayOfRSItem[i2]) != null)
- {
- String str;
- if (((str = a.l(localRSItem)) != null) &&
- (!str.isEmpty()) && (str.contains(a.cd)))
- {
- int i3;
- if ((
- (i3 = a.F(str)) > a.aA) && (i3 <= a.mA))
- {
- a.pc = localRSItem.getID();
- return;
- }
- }
- }
- i2++;
- }
- }
- private boolean S()
- {
- if ((a.kf) && ((a.inventory.getCount(a.aC) > a.random(1, 4)) || ((a.inventory.containsOneOf(a.aC)) && (a.inventory.getCount() > 22 +
- a.random(0, 5)))))
- {
- int i2;
- while (a.inventory.containsOneOf(a.aC))
- {
- RSItem[] arrayOfRSItem;
- int i1 = (arrayOfRSItem =
- a.inventory.getItems(a.aC)).length;
- RSItem localRSItem;
- if (((localRSItem = arrayOfRSItem[i2]) != null) &&
- (localRSItem.doAction("Bury")))
- a.sleep(800, 1200);
- i2++;
- }
- return true;
- }
- return false;
- }
- private boolean F(RSTile a, int a, int a)
- {
- if (a == null)
- {
- return
- false;
- }
- RSTile localRSTile = new RSTile(a.getX() + a, a.getY() + a);
- int i1;
- while (!a.X().equals(localRSTile))
- {
- if ((a.Zc()) || (a.D
- (localRSTile) != null))
- {
- return false;
- }
- if (a.X().equals(localRSTile))
- {
- return true;
- }
- if (a.A(localRSTile, 0))
- {
- a.K(false);
- if (!a.X().equals(localRSTile))
- {
- a.A(a.X(), i1);
- a.K(false);
- }
- }
- a.sleep(300, 400);
- i1++;
- }
- return true;
- }
- private RSObject[] A(String[] a)
- {
- return a.objects.getAll(new q(a, a));
- }
- private RSTile l(RSTile a, ArrayList<RSTile> a)
- {
- double d1 =
- 99999.990000000005D;
- Object localObject = null;
- if (a != null)
- {
- for (RSTile localRSTile : a)
- {
- double d2;
- if ((d2 =
- a.calc.distanceBetween(a, localRSTile)) <
- d1)
- {
- localObject = localRSTile;
- d1 = d2;
- }
- }
- }
- return localObject;
- }
- private RSObject i(RSTile a, int[] a)
- {
- return a.objects.getNearest(new d(a, a, a));
- }
- private void T()
- {
- a.gc.clear();
- a.Bd.clear();
- a.J.clear();
- a.ob.clear();
- a.w.clear();
- a.vF.clear();
- a.fc.clear();
- a.fG.clear();
- a.fA.clear();
- a.qA.clear();
- a.ig.clear();
- a.Ee.clear();
- a.AG.clear();
- a.zc.clear();
- a.Nc.clear();
- a.ic.clear();
- a.l.clear();
- a.aE.clear();
- a.ke.clear();
- a.JB.clear();
- a.lA.clear();
- a.cD.clear();
- a.a.clear();
- a.uc.clear();
- a.RD.clear();
- a.ID.clear();
- a.Tc.clear();
- a.ue.clear();
- a.jb = null;
- a.FA = null;
- a.r = null;
- a.QB = null;
- a.Sg = null;
- a.nb = null;
- a.jA = null;
- a.nD = null;
- a.WA = null;
- a.vE = null;
- a.yd = null;
- a.Wd = null;
- a.cB = null;
- a.QA = null;
- a.hd = null;
- a.Rd =
- 0;
- a.Ob = 0;
- a.BD = 0;
- a.Wb = 0;
- a.Sc = 0;
- a.DD = 0;
- a.iE = 0;
- a.PD = -1;
- a.tc = "";
- a.AB = "";
- a.ud = "Determining";
- a.gd = false;
- a.X = false;
- a.hB = false;
- a.Fg = false;
- a.FF = false;
- a.Ke = false;
- a.nc = false;
- a.nE = false;
- a.gE = false;
- a.XF = false;
- a.jC = false;
- a.WC = false;
- a.qB = false;
- a.N = true;
- a.hA = new Timer(a.random(360000, 480000));
- a.KA = new Timer(0L);
- if (a.k)
- {
- a.HC = 1;
- }
- else if
- (a.Xd)
- {
- a.HC = 2;
- }
- else if (a.IB)
- {
- a.HC = 3;
- }
- }
- private int P()
- {
- RSTile localRSTile1 = a.tA();
- RSTile localRSTile2;
- if
- ((localRSTile2 = a.F(localRSTile1, a.sC)) == null)
- {
- return -1;
- }
- a.mouse.setSpeed(a.random(3, 5));
- if (a.jA())
- {
- return 2;
- }
- if (!a.Je)
- if (a.walking.getEnergy() < a.random(25, 30))
- {
- a.walking.rest(a.random(90, 100));
- }
- else if (a.calc.distanceTo(localRSTile2) > 1)
- {
- a.A(localRSTile2, 1);
- }
- else if (a.J(a.sC).length == 5)
- {
- a.l(a.G(localRSTile2), "Pull");
- if (!a.KD)
- {
- if (a.jA()) {
- return 2;
- }
- RSObject localRSObject1 = a.i(a.sC); RSObject localRSObject2 = a.l(localRSObject1, a.sC);
- if (localRSObject1 != null)
- {
- a.vE = localRSObject1.getLocation();
- if (a.l(localRSObject1, "Pull"))
- {
- int i1;
- if
- (a.calc.distanceTo(a.vE) < 4)
- {
- if ((localRSObject2 != null) && (!a.Y().isMoving()) && (a.calc.distanceBetween(a.X(), a.vE) == 1.0D))
- {
- a.A(localRSObject2.getLocation(), 1);
- }
- else
- {
- a.sleep(50, 100);
- i1++;
- }
- }
- else
- {
- a.l(false);
- while ((a.Y().isMoving()) && (a.calc.distanceTo
- (localRSObject1) > 2)) {
- a.sleep(100, 200);
- }
- }
- }
- else if (!a.Je)
- {
- a.sleep
- (50, 100);
- }
- }
- a.sleep(50, 100);
- }
- }
- if (a.Je)
- {
- a.log("Failed to pull the switches in time, restarting.");
- a.Je = false;
- a.i(localRSTile2, 1);
- a.l(a.vc, 80, 80);
- }
- a.K(false);
- return 1;
- }
- private RSTile A(RSTile a, int[] a)
- {
- RSObject[]
- arrayOfRSObject;
- int i1 = (arrayOfRSObject = a.J(a)).length;
- int i2;
- RSObject localRSObject;
- if ((
- (localRSObject = arrayOfRSObject[i2]) != null) &&
- (a.l(localRSObject.getID(), a)))
- {
- RSTile localRSTile = localRSObject.getLocation();
- if ((a.calc.distanceBetween(localRSTile, a) > 2.0D) &&
- (a.calc.distanceTo(localRSTile) < 7)) {
- return localRSTile;
- }
- }
- i2++;
- return null;
- }
- private boolean l(RSModel a, Point a)
- {
- Polygon[]
- arrayOfPolygon;
- int i1 = (arrayOfPolygon = a.getTriangles()).length;
- int i2;
- if (arrayOfPolygon[i2]
- .contains(a))
- return true;
- i2++;
- return
- false;
- }
- private RSTile F(RSTile a, int[] a)
- {
- double d1 = 99999.990000000005D;
- Object localObject = null;
- int i2;
- if (a != null)
- {
- RSObject[]
- arrayOfRSObject;
- int i1 = (arrayOfRSObject = a.J(a)).length;
- RSTile localRSTile = arrayOfRSObject[i2]
- .getLocation();
- double d2 =
- a.calc.distanceBetween(localRSTile, a);
- if (d2 < d1)
- {
- d1 = d2;
- localObject = localRSTile;
- }
- i2++;
- }
- return localObject;
- }
- private boolean l(Combat.Prayer a, boolean a)
- {
- a.game.openTab(6);
- int i1 = a.getIndex();
- if (a.interfaces.getComponent(271, 7).getComponents().length < 29)
- {
- i1 -= 10;
- }
- RSComponent localRSComponent;
- if ((
- (localRSComponent = a.interfaces.getComponent(271, 7).getComponent(i1)).getBackgroundColor() ==
- -1) == a);
- return a.l(localRSComponent, a ? "Activate" : "Deactivate");
- }
- private boolean A(String a)
- {
- int i1;
- if (a.kd)
- {
- if (a.equals(a.yf[i1]))
- {
- return a.skills.getRealLevel(18) >= a.CC[i1];
- }
- i1++;
- }
- return true;
- }
- private RSNPC F(String[] a)
- {
- if (a.r == null) {
- return
- null;
- }
- return a.npcs.getNearest(new s(a, a));
- }
- private boolean F(RSObject a)
- {
- int i2;
- if (a != null)
- {
- RSTile[] arrayOfRSTile;
- int i1 =
- (arrayOfRSTile = a.getArea().getTileArray()).length; RSTile localRSTile = arrayOfRSTile[i2];
- if (a.l(localRSTile, true))
- {
- return true;
- }
- i2++;
- }
- return false;
- }
- private int Z()
- {
- a.uC = "Undeterminable components";
- a.SE = "";
- a.BG = true;
- a.MC = false;
- a.vE = null;
- if (a.jA())
- {
- return 2;
- }
- if (a.i(a.lC) != null)
- {
- a.Qc = "Puzzle room: Agility Maze";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if (!
- a.ZA())
- return 2;
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.y();
- }
- if (a.i(a.QE) != null)
- {
- a.Qc = "Puzzle room: Barrels";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.QB())
- {
- return 2;
- }
- if (a.hd ==
- null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.W();
- }
- if (a.i(a.Zb) != null)
- {
- a.Qc = "Puzzle room: Blood Fountain";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA())) {
- return 2;
- }
- if (a.hd == null) {
- a.hd = new Timer
- (a.random(240000, 300000));
- }
- return a.pA();
- }
- if (a.i(a.s) != null)
- {
- a.Qc = "Puzzle room: Bookcases";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA())) {
- return 2;
- }
- if (a.hd == null)
- a.hd = new Timer(a.random(480000, 600000));
- return
- a.rA();
- }
- if (a.D(a.AC) != null)
- {
- a.Qc = "Puzzle room: Colored Ferrets";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!
- a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.HA();
- }
- if (a.i(a.I) != null)
- {
- a.Qc = "Puzzle room: Colored Recesses";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA
- ())) {
- return 2;
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.qA();
- }
- if (a.i(a.Yd) != null)
- {
- a.Qc = "Puzzle room: Collapsing Room";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- a.lA.add(a.r);
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.QA();
- }
- if (a.i(a.Xc) != null)
- {
- a.Qc = "Puzzle room: Crystal Lights";
- if (!
- a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- return 2;
- if (a.hd == null)
- a.hd = new Timer(a.random(480000,
- 600000));
- return a.I();
- }
- if (a.J(new String[] { "Damaged Bridge" }) != null)
- {
- a.Qc = "Puzzle room: Damaged Bridge";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.ZA())
- {
- return 2;
- }
- return a.q();
- }
- if (a.i(new String[] { "Damaged construct" }) != null)
- {
- a.Qc = "Puzzle room: Damaged Construct";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return
- 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.nA();
- }
- if (a.D(new int[] { 11007 }) != null)
- {
- a.Qc = "Puzzle room: Fishing for Ferrets";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA())) {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.sA();
- }
- if (a.J(new String[] { "Green tile" }) !=
- null) if (a.J(new String[] { "Yellow tile" }) != null)
- {
- a.Qc = "Puzzle room: Flip Tiles";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA())) {
- return 2;
- }
- if (a.hd == null)
- a.hd = new Timer(a.random(240000, 300000));
- return
- a.D();
- }
- if (a.D(a.aF) != null)
- {
- a.Qc = "Puzzle room: Follow the Leader";
- if (!a.l.contains(a.r))
- a.l.add(a.r);
- if ((!a.QB()) || (!
- a.ZA()))
- {
- return 2;
- }
- if (a.hd == null)
- a.hd = new Timer(a.random(240000, 300000));
- return a.KA();
- }
- if (a.i(a.eG) != null)
- {
- a.Qc = "Puzzle room: Fremennik Camp";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.ZA()) {
- return 2;
- }
- if (a.hd
- == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.YA();
- }
- if (a.D(a.xC) != null)
- {
- a.Qc = "Puzzle room: Ghosts";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if (!a.ZA())
- {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer
- (a.random(480000, 600000));
- }
- return a.Lb();
- }
- if ((a.i(a.mb) != null) || (a.i(a.gA) != null))
- {
- a.Qc = "Puzzle room: Grapple Chasm";
- if
- (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if (!a.ZA())
- {
- return 2;
- }
- return a.gA();
- }
- if (a.i(new String[] { "hoardstalker"
- }) != null)
- {
- a.Qc = "Puzzle room: Enigmatic Hoardstalker";
- if (!a.l.contains(a.r))
- a.l.add(a.r);
- if ((!a.QB()) || (!a.ZA())) {
- return
- 2;
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.FA();
- }
- if (a.D(new int[] { 11010 }) != null)
- {
- a.Qc = "Puzzle room: Hunter Ferret";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.m();
- }
- if (a.i(a.OC) != null)
- {
- a.Qc = "Puzzle room:
- Icy Pads";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.ZA())
- return 2;
- if (a.hd == null)
- {
- a.hd = new Timer
- (a.random(480000, 600000));
- }
- return a.b();
- }
- if (a.i(a.KB) != null)
- {
- a.Qc = "Puzzle room: Lodestone Power";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000,
- 600000));
- }
- return a.z();
- }
- if (a.i(new int[] { 49341 }) != null)
- {
- a.Qc = "Puzzle room: Maze";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- a.lA.add(a.r);
- a.cD.add(a.r);
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.TA();
- }
- if (a.i(new String[] { "Mercenary leader" }) != null)
- {
- a.Qc = "Puzzle room: Mercenary Leader";
- if (!a.l.contains(a.r))
- a.l.add(a.r);
- if (!a.ZA())
- {
- return 2;
- }
- if (a.hd == null)
- a.hd = new Timer(a.random(480000, 600000));
- return a.NA();
- }
- if (a.i(new String[]
- { "Monolith" }) != null)
- {
- a.Qc = "Puzzle room: Monolith";
- if (!a.l.contains(a.r))
- a.l.add(a.r);
- if (!a.ZA())
- {
- return 2;
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.B();
- }
- if (a.i(a.wd) != null)
- {
- a.Qc = "Puzzle room:
- Poltergeist";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- return 2;
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.p();
- }
- if (a.D(new int[] { 12089 }) != null)
- {
- a.Qc = "Puzzle room: Pond Skaters";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- a.hd = new Timer(a.random(240000,
- 300000));
- return a.hA();
- }
- if (a.i(new String[] { "bloodrager" }) != null)
- {
- a.Qc = "Puzzle room: Ramokee Familiars";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (a.hd == null)
- a.hd = new Timer(a.random(480000, 600000));
- return a.J();
- }
- if (a.i(new String[] { "Seeker
- sentinel" }) != null)
- {
- a.Qc = "Puzzle room: Seeker Sentinel";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- a.lA.add(a.r);
- }
- if
- (a.hd == null) {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.E();
- }
- if (a.i(a.mB) != null)
- {
- a.Qc = "Puzzle room: Sleeping
- Guards";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.ZA())
- {
- return 2;
- }
- if (a.hd == null)
- a.hd = new
- Timer(a.random(480000, 600000));
- return a.v();
- }
- if (a.D(a.d) != null)
- {
- a.Qc = "Puzzle room: Slider Puzzle";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA())) {
- return 2;
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.yA();
- }
- if (a.D(a.fb) != null)
- {
- a.Qc = "Puzzle room: Sliding Statues";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.QB()) {
- return 2;
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.xA();
- }
- if (a.i(a.Gb) !=
- null)
- {
- a.Qc = "Puzzle room: Statue Bridge";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.ZA()) {
- return 2;
- }
- return a.c();
- }
- if (a.i(a.LD) != null)
- {
- a.Qc = "Puzzle room: Strange Flowers";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if
- (a.hd == null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.o();
- }
- if (a.i(a.Bb) != null)
- {
- a.Qc = "Puzzle room: Suspicious
- Grooves";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- a.lA.add(a.r);
- }
- if (a.hd == null)
- a.hd = new Timer(a.random(240000,
- 300000));
- return a.RA();
- }
- if (a.D(a.TB) != null)
- {
- a.Qc = "Puzzle room: Ten Statues";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return
- a.U();
- }
- if (a.D(a.yb) != null)
- {
- a.Qc = "Puzzle room: Three Statues";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if ((!a.QB()) ||
- (!a.ZA()))
- return 2;
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.WA();
- }
- if (a.i(a.sC) != null)
- {
- a.Qc = "Puzzle room: Timed Switches";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- if (a.hd == null) {
- a.hd = new Timer(a.random(480000, 600000));
- }
- return a.P();
- }
- if (a.J(new String[] { "Unfinished bridge" }) !=
- null)
- {
- a.Qc = "Puzzle room: Unfinished Bridge";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if (!a.ZA()) {
- return 2;
- }
- return a.eA();
- }
- if (a.D(new int[] { 11246 }) != null)
- {
- a.Qc = "Puzzle room: Unhappy Ghost";
- if (!a.l.contains(a.r)) {
- a.l.add(a.r);
- }
- if ((!a.QB()) || (!a.ZA()))
- {
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- return a.G
- ();
- }
- if (a.i(a.Fc) != null)
- {
- a.Qc = "Puzzle room: Winch Bridge";
- if (!a.l.contains(a.r))
- {
- a.l.add(a.r);
- }
- if (!a.ZA())
- {
- return 2;
- }
- return a.OA();
- }
- return 0;
- }
- private void s()
- {
- a.Qc = "Completing the dungeon...";
- a.vE = null;
- RSObject
- localRSObject;
- if (
- (localRSObject = a.objects.getNearest(a.gb)) != null)
- {
- a.vE = localRSObject.getLocation();
- a.log("Exit found, completing
- dungeon.");
- a.HD = null;
- a.hA.reset();
- if (a.nb == null) {
- a.nb = a.r;
- }
- if (!a.interfaces.get(933).isValid())
- {
- if (a.jA
- ()) {
- return;
- }
- if (localRSObject != null)
- {
- if (a.nb.contains(new RSTile[] { localRSObject.getLocation() }));
- }
- else if ((localRSObject = a.i(a.gb)) == null)
- {
- localRSObject = a.G(a.vE);
- }
- int i1;
- if (a.jD)
- {
- a.R();
- a.t();
- a.jD = false;
- }
- else if (!a.interfaces.get(236).isValid())
- {
- if (localRSObject != null)
- {
- if
- (a.calc.distanceTo(localRSObject) < 3) {
- a.A(localRSObject.getLocation(), 0);
- }
- if (a.l(localRSObject, "End-dungeon"))
- {
- a.K(true);
- }
- else
- {
- a.sleep(400, 600);
- }
- }
- }
- else
- {
- a.interfaces.getComponent(236, 1).doClick();
- a.sleep(200, 300);
- i1++;
- }
- a.sleep(200, 300);
- }
- a.Qc = "Waiting for the next
- dungeon...";
- a.pC += 1;
- a.Ud += 1;
- a.OA += 1;
- long l1;
- if (
- (l1 = a.sA.getElapsed()) < a.HB)
- {
- if (a.dd == 0L)
- {
- long l2 = a.HB;
- String str1 = a.Xf;
- a.dd = l2;
- a.fd = str1;
- }
- a.HB = l1;
- a.Xf = a.sA.toElapsedString();
- }
- else if (l1 > a.dd)
- {
- a.dd = l1;
- a.fd = a.sA.toElapsedString();
- }
- a.tE = (Math.rint(a.z.getElapsed() * 10L / a.pC / 60000L) / 10.0D);
- int i2 = (int)(l1 / 1000L);
- int i3 = a.re - a.eD;
- a.eD = a.re;
- a.T();
- a.ad();
- if (((a.interfaces.get(519).isValid()) && (a.interfaces.get
- (519).getText().toLowerCase().contains("not available at"))) || (a.Ud > a.g))
- {
- a.log("Last floor reached, prestiging!");
- if (a.OA + 3 >= a.g)
- {
- a.JE = true;
- }
- a.nc = true;
- }
- int i4 = a.Td; int i5 = 0; int i6 = 0;
- if (a.interfaces.get(933).isValid())
- {
- RSNPC
- localRSNPC;
- if ((
- (localRSNPC = a.npcs.getNearest(new int[] { 11226 })) == null) || (a.calc.distanceTo(localRSNPC) >= 4))
- {
- if
- (a.interfaces.getComponent(933, 13).doClick())
- {
- a.sleep(200, 400);
- a.ad();
- a.interfaces.getComponent(933, 13).doClick();
- }
- int i7;
- if (a.interfaces.getComponent(933, 322).doClick())
- {
- a.sleep(700, 900);
- if (a.Td == i4)
- {
- String str2 = a.interfaces.getComponent(933, 41).getText().replace("%", "").trim();
- String str3 = a.interfaces.getComponent(933, 39).getText
- ().replace("%", "").trim();
- if (!str2.isEmpty())
- {
- i5 = Integer.parseInt(str2);
- }
- if (!str3.isEmpty
- ())
- i6 = Integer.parseInt(str3);
- a.Td += i5;
- if ((i2 > 0) && (i6 > 0) && (i5 > 0))
- {
- a.l(i2, i6,
- i5, i3);
- }
- else
- {
- a.log("Stat uploading failed!");
- }
- }
- a.camera.setCompass
- ('n');
- if (a.interfaces.get(933).isValid())
- {
- a.sleep(300, 400);
- i7++;
- }
- }
- else
- {
- a.sleep(100, 200);
- }
- }
- }
- if (a.jA())
- {
- return;
- }
- a.N = true;
- }
- }
- private boolean l(int a, int a, int a)
- {
- return (a >= a) && (a <= a);
- }
- private RSObject l(int[] a)
- {
- return a.objects.getNearest(new o(a, a));
- }
- private int F(String a)
- {
- int i1;
- if ((a
- != null) && (!a.isEmpty()))
- {
- String str = a.J(a);
- if (a.Ec[i1].equals(str)) {
- return i1 + 1;
- }
- i1++;
- if (a.yA != null)
- {
- if (a.yA[i1].equals(str)) {
- return i1 + 1;
- }
- i1++;
- }
- }
- return 0;
- }
- private int o()
- {
- if (!a.O())
- return -1;
- int[]
- arrayOfInt = { 35507, 35523, 35562, 35569 };
- String[] arrayOfString = { "blue", "purple", "red", "yellow" };
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- RSObject localRSObject1 = a.i(a.LD);
- a.l(a.vc, 40, 50);
- a.jA = a.npcs.getNearest(a.B);
- int i2;
- if ((a.jA != null) &&
- (a.calc.distanceTo(a.jA) < 5) && (a.l(a.jA.getLocation(), false)))
- {
- if (!a.QB())
- {
- return 2;
- }
- }
- else if (localRSObject1 != null) {
- if (a.Jg)
- {
- a.x();
- a.K(true);
- a.sleep(500, 800);
- a.l(localRSObject1.getLocation(), 1);
- a.Jg = false;
- }
- else if (a.F
- (localRSObject1))
- {
- if (a.l(localRSObject1, "Uproot"))
- {
- a.K(true);
- }
- }
- else
- {
- int i1 = localRSObject1.getID
- ();
- if ((i2 = 0) < arrayOfInt.length)
- {
- if (i1 == arrayOfInt[i2])
- {
- String str = arrayOfString[i2];
- RSObject
- localRSObject2;
- if (
- (localRSObject2 = a.l(new String[] { "Strange " + str + " plant" })) != null) {
- a.K(true);
- }
- else
- {
- a.JC();
- }
- }
- else
- {
- i2++;
- }
- }
- }
- }
- a.sleep(400, 800);
- return 1;
- }
- private boolean O()
- {
- if (!a.kd)
- {
- a.uC = "Members-only";
- return false;
- }
- return true;
- }
- private int z()
- {
- int[] arrayOfInt1
- = { 17376, 18635 };
- int[] arrayOfInt2 = { 50795, 51889, 54844 };
- RSTile[] arrayOfRSTile = null;
- RSTile localRSTile1 = a.tA(); RSTile localRSTile2 = null;
- RSObject localRSObject1;
- if ((localRSObject1 = a.i(a.KB)) == null)
- {
- return -1;
- }
- RSTile localRSTile3 = localRSObject1.getLocation();
- int i2;
- if
- (localRSTile1.getX() - localRSTile3.getX() > 4)
- {
- if (
- (localRSTile2 = a.F(new RSTile(20000, 20000), arrayOfInt2)) == null) {
- return -1;
- }
- i1 = localRSTile2.getX(); i2 = localRSTile2.getY();
- 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), new RSTile(i1 - 3, i2 - 6), new RSTile(i1 - 5, i2 - 6), new RSTile(i1 - 8, i2 - 3) };
- }
- else if (localRSTile1.getX() -
- localRSTile3.getX() < -4)
- {
- if (
- (localRSTile2 = a.F(new RSTile(20000, 0), arrayOfInt2)) == null)
- return -1;
- i1 = localRSTile2.getX(); i2 =
- localRSTile2.getY();
- 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),
- new RSTile(i1 + 3, i2 + 6), new RSTile(i1 + 5, i2 + 6), new RSTile(i1 + 8, i2 + 3) };
- }
- else if (localRSTile1.getY() - localRSTile3.getY() < -4)
- {
- if (
- (localRSTile2 = a.F(new RSTile(20000, 0), arrayOfInt2)) == null)
- return -1;
- i1 = localRSTile2.getX(); i2 = localRSTile2.getY();
- arrayOfRSTile =
- 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 -
- 6, i2 + 5), new RSTile(i1 - 3, i2 + 8) };
- }
- else if (localRSTile1.getY() - localRSTile3.getY() > 4)
- {
- if ((localRSTile2 = a.F(a.y, arrayOfInt2)) == null)
- {
- return -1;
- }
- i1 = localRSTile2.getX(); i2 = localRSTile2.getY();
- arrayOfRSTile = 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 + 6, i2 - 5), new RSTile(i1 + 3, i2 - 8) };
- }
- a.A(new
- int[] { 18829 });
- int i1 = 0;
- if (a.jA())
- {
- if ((!a.hd.isRunning()) && (a.l.contains(a.r)))
- {
- a.lA.add(a.r);
- }
- return 2;
- }
- a.l(a.vc, 50, 50);
- if (!a.inventory.containsOneOf(arrayOfInt1))
- {
- a.l(a.groundItems.getNearest(arrayOfInt1));
- }
- else
- {
- RSObject localRSObject2
- = null;
- if (i1 != 0) if (a.i(new String[] { "Guardian sphere" }) == null)
- i1 = 0;
- Object localObject1;
- if (i1 != 0)
- {
- double d1 =
- 10.0D;
- if (
- (localObject1 = a.i(arrayOfInt2)) != null)
- {
- RSTile localRSTile4 = ((RSObject)localObject1).getLocation();
- int i4
- = (localObject2 = a.h(a.X())).length;
- int i5;
- RSTile localRSTile5 = localObject2[i5];
- double d2;
- if ((d2 = a.calc.distanceBetween
- (localRSTile5, localRSTile4)) <
- d1)
- {
- d1 = d2;
- a.vE = localRSTile5;
- }
- i5++;
- Object localObject2 =
- a.G(a.vE);
- if (a.l((RSObject)localObject2, "Jump-over"))
- {
- a.K(true);
- }
- }
- }
- else
- {
- String str =
- "Jump-over";
- a.vE = null;
- int i3;
- if (a.l(localRSTile3, true))
- {
- localObject1 = arrayOfRSTile[i3];
- if (a.calc.distanceTo
- ((RSTile)localObject1) == 1)
- {
- if ((i3 == 5) && ((a.calc.distanceBetween(a.X(), localRSObject1.getLocation()) < 4.5D) || (a.F(localRSObject1))))
- {
- localObject1 = arrayOfRSTile[(i3 + 1)];
- str = "Unlock";
- }
- a.vE = ((RSTile)localObject1);
- localRSObject2 = a.G((RSTile)localObject1);
- }
- i3++;
- }
- if (localRSObject2 != null)
- {
- if (a.l(localRSObject2, str))
- {
- switch (a.Y().getAnimation())
- {
- case 769:
- break;
- case 846:
- i1 = 1;
- break;
- case 13493:
- while (0 != 0);
- a.log("Damn, we got hit by the orb");
- break;
- default:
- a.sleep(200,
- 300);
- i3++;
- }
- a.K(true);
- }
- }
- else if (!a.X().equals(localRSTile2))
- {
- a.A(localRSTile2, 0);
- a.K(false);
- }
- }
- }
- a.sleep(400, 600);
- return !a.l() ? 2 : 1;
- }
- public void messageReceived(MessageEvent a)
- {
- int i1 = a.getID();
- String str = a.getMessage();
- if (i1 == 0)
- {
- if (str.contains("Oh dear")) {
- a.jC = true;
- }
- else if (str.contains("ou unlock the door"))
- {
- a.Hc = true;
- }
- else if ((str.contains("been frozen")) || (str.contains("force prevents")) || (str.contains("force stops")) || (str.contains("You're
- stunned"))) {
- a.MC = true;
- }
- else if ((str.contains("hear a click")) || (str.contains("now unlocked")) || (str.contains("act of simply")) ||
- (str.contains("challenge room has already")))
- {
- a.KD = true;
- }
- else if (str.contains("cannot teleport"))
- {
- a.Ke = true;
- }
- else if (((str.contains("You need a")) || (str.contains("require a"))) && (str.contains("level of")))
- a.BG = false;
- else if ((str.contains("need at least
- ")) && (str.contains("to do that")))
- a.BG = false;
- else if (str.contains("toggle back off"))
- {
- a.Je = true;
- }
- else if (str.contains
- ("both the chest in"))
- {
- a.IC = true;
- }
- else if (str.contains("cut down the flower"))
- {
- a.Jg = true;
- }
- else if
- (str.contains("received item: "))
- {
- a.jD = true;
- }
- else if ((a.HC == 2) && (str.contains("ammo left in")))
- a.WC = true;
- else if
- ((a.HC == 3) && (a.k()) && (str.contains("runes to cast ")))
- {
- a.WC = true;
- }
- else if (str.contains(" pull")) {
- a.md = true;
- }
- }
- else if ((i1 == 4) && (str.contains("can't reach")))
- a.MC = true;
- if ((i1 == 0) || (i1 == 28) || (i1 == 109))
- {
- a.SE = str;
- }
- }
- private boolean
- n()
- {
- if ((a.Nc.size() == 1) || (a.inventory.contains(18829))) {
- return true;
- }
- a.AB = "Teleporting back...";
- a.qA.clear();
- if (a.AA())
- {
- a.Pd += 1;
- a.sleep(200, 300);
- }
- a.uA();
- a.jC = false;
- if (a.groundItems.getNearest(new int[] { 18829 }) != null);
- if (a.Zc())
- {
- return
- false;
- }
- if (a.fA()) {
- a.K(false);
- }
- a.sleep(300, 400);
- a.uA();
- int i1;
- if ((i1 = 0) < 10)
- {
- if (a.l(a.groundItems.getNearest(new
- int[] { 18829 })))
- {
- a.sleep(500, 800);
- }
- a.sleep(300, 600);
- i1++;
- }
- a.jC = false;
- a.AB = "";
- return true;
- }
- private int v()
- {
- if (!a.EB.contains(Integer.valueOf(17363))) {
- a.EB.add(Integer.valueOf(17363));
- }
- if (a.jA())
- {
- return 2;
- }
- a.yd =
- a.groundItems.getNearest(new int[] { 17363 });
- if (a.yd != null)
- {
- a.l(a.yd);
- }
- else if (a.npcs.getNearest(a.B) == null)
- {
- a.A
- (a.r.getCentralTile(), 1);
- a.K(false);
- }
- else if (!a.QB())
- {
- return 2;
- }
- a.K(false);
- return 1;
- }
- private RSTile l(int[][] a)
- {
- RSTile[] arrayOfRSTile;
- int i1 = (arrayOfRSTile = a.r.getTileArray()).length;
- int i2;
- RSTile localRSTile = arrayOfRSTile[i2];
- int i3 = 0;
- RSObject[]
- arrayOfRSObject;
- int i4 = (arrayOfRSObject = a.objects.getAllAt(localRSTile)).length;
- int i5;
- RSObject localRSObject = arrayOfRSObject[i5];
- int[][]
- arrayOfInt;
- int i6 = (arrayOfInt = a).length;
- int i7;
- int[] arrayOfInt1 = arrayOfInt[i7];
- if (a.l(localRSObject.getID(), arrayOfInt1))
- {
- i3++;
- }
- else {
- i7++;
- }
- i5++;
- if (i3 == a.length)
- return localRSTile;
- i2++;
- return null;
- }
- private int U()
- {
- int[] arrayOfInt1 = { 11015,
- 11016, 11017 };
- int[] arrayOfInt2 = { 11012, 11013, 11014 };
- int[] arrayOfInt3 = { 11027, 11028, 11029 };
- int[] arrayOfInt4 = { 11030, 11031, 11032 };
- int
- [] arrayOfInt5 = { 11033, 11034, 11035 };
- int[][] arrayOfInt = { arrayOfInt3, arrayOfInt4, arrayOfInt5 };
- RSObject localRSObject = a.i(new int[] { 49647, 49648,
- 49649, 53991 });
- int i1 = a.F(arrayOfInt3).length;
- int i2 = a.F(arrayOfInt4).length;
- int i3 = a.F(arrayOfInt5).length;
- do
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- if (a.l(a.vc, 40, 50))
- a.sleep(300, 600);
- Object localObject1;
- if
- (a.inventory.getCount(new int[] { 17416, 17418, 17420 }) < a.F(arrayOfInt2).length)
- {
- localObject1 = "";
- if (!a.inventory.contains(17444))
- {
- a.l(a.groundItems.getNearest(new int[] { 17444 }));
- }
- else
- {
- if (a.inventory.getCount(new int[] { 17420 }) < i1)
- localObject1 = "Staff";
- else if (a.inventory.getCount(new int[] { 17416 }) < i2) {
- localObject1 = "Sword";
- }
- else if
- (a.inventory.getCount(new int[] { 17418 }) < i3) {
- localObject1 = "Bow";
- }
- if (a.interfaces.get(451).isValid())
- {
- a.l
- (a.interfaces.get(451), new String[] { localObject1 });
- }
- else if (a.inventory.contains(17415))
- {
- if (a.inventory.getItem(new
- int[] { 17415 }).doAction("Carve")) {
- a.K(true);
- }
- }
- else if (a.l(localRSObject, "Mine"))
- {
- a.K(true);
- }
- }
- }
- else if (
- (localObject1 = a.D(arrayOfInt2)) != null)
- {
- RSNPC localRSNPC = null;
- a.vE = ((RSNPC)
- localObject1).getLocation();
- int i4 = a.vE.getX(); int i5 = a.vE.getY();
- Object localObject2 =
- { new RSTile(i4 - 4, i5), new RSTile(i4 + 4,
- i5), new RSTile(i4, i5 - 4), new RSTile(i4, i5 + 4) };
- int i6 = localObject2.length; int i7 = 0; if (i7 < i6) { RSTile localRSTile = localObject2[i7];
- localRSNPC = a.D(localRSTile);
- if (localRSNPC != null)
- localRSNPC = null;
- i7++;
- }
- if (localRSNPC != null)
- {
- localObject2 = "";
- i6 = 0; if (i6 < arrayOfInt.length) {
- if (a.l(localRSNPC.getID(), arrayOfInt[i6]))
- {
- localObject2 =
- "Staff";
- if (i6 == 1)
- {
- localObject2 = "Sword";
- }
- else {
- localObject2 = "Bow";
- }
- }
- else
- {
- i6++;
- }
- }
- if ((a.inventory.getItemID("Stone " + ((String)
- localObject2).toLowerCase()) != -1) && (a.F((RSNPC)localObject1, "Arm")))
- {
- a.K(true);
- if ((!a.interfaces.get(236).isValid()) && (!
- a.interfaces.get(451).isValid())) {
- a.sleep(700, 800);
- }
- if (a.l(a.interfaces.get(236), new String[] { localObject2 }))
- {
- a.sleep(400, 600);
- if (a.interfaces.get(451).isValid())
- if (a.l(a.interfaces.get(451), new String[] { localObject2 }))
- {
- a.sleep(400, 600);
- }
- }
- }
- }
- }
- a.sleep(500, 800);
- }
- while (!a.Y().isInCombat());
- if (!a.JC()) {
- a.sleep(800, 1000);
- }
- a.K(true);
- if (!a.ZA()) {
- return 2;
- }
- a.lA();
- a.F(a.nD);
- return 1;
- }
- private boolean l(int[] a,
- int a, int a)
- {
- if ((a.inventory.containsOneOf(a)) && (a.combat.getHealth() < a))
- {
- do
- {
- if (((a.nb != null) && (a.objects.getNearest(a.gb) !=
- null)) || (a.Zc()))
- return false;
- int[] arrayOfInt;
- int i1 = (arrayOfInt = a).length;
- int i2;
- if ((i2 = 0) < i1) { int i3 =
- arrayOfInt[i2];
- RSItem localRSItem;
- if ((localRSItem = a.inventory.getItem(new int[] { i3 })) != null)
- a.sleep(300, 600);
- else {
- i2++;
- }
- }
- a.sleep(50, 100);
- }
- while ((a.inventory.containsOneOf(a)) && (a.combat.getHealth() < a));
- return true;
- }
- return false;
- }
- private void Q()
- {
- if (a.UA)
- {
- do
- {
- if (!a.game.isLoggedIn())
- {
- return;
- }
- a.sleep(10000,
- 30000);
- }
- while (a.random(0, 4) != 0);
- a.A(a.X(), 10);
- }
- }
- private boolean N()
- {
- if (!a.Qc.contains("Opening")) {
- a.Qc = "Opening an old
- door";
- }
- a.lc = new Timer(0L);
- for (Iterator localIterator = a.Nc.iterator(); localIterator.hasNext(); )
- {
- RSArea localRSArea;
- if ((
- (localRSArea = (RSArea)localIterator.next()) != null) && (!localRSArea.equals(a.Sg)) && (a.calc.distanceBetween(a.nD, localRSArea.getNearestTile(a.nD)) < 3.0D))
- {
- a.ZA = localRSArea;
- break;
- }
- }
- if (a.ZA == null)
- {
- return false;
- }
- if (!a.ZA.contains(new RSTile[] { a.X() }))
- {
- if
- (a.jA()) {
- return false;
- }
- a.uA();
- if ((a.nD != null) && (a.FA != null)) if (a.FA.contains(new RSTile[] { a.nD }))
- {
- int i1;
- if (a.l(a.G(a.nD)))
- {
- a.K(false);
- a.sleep(200, 250);
- i1++;
- }
- else
- {
- a.JC();
- a.sleep(100, 200);
- }
- }
- a.sleep(200, 400);
- }
- a.l(a.ZA);
- a.ZA = null;
- a.w.remove(a.nD);
- a.w.add(a.nD);
- a.QA = a.nD;
- return
- true;
- }
- private boolean A(boolean a)
- {
- if (a.combat.isAutoRetaliateEnabled() != a)
- {
- RSTile localRSTile = a.walking.getDestination();
- int i1;
- while (a.combat.isAutoRetaliateEnabled() != a)
- {
- if (a.Zc())
- return false;
- a.combat.setAutoRetaliate(a);
- if ((i1 = 0) < 10)
- {
- a.sleep(100, 150);
- i1++;
- }
- }
- a.F();
- if ((localRSTile != null) && (!a.calc.tileOnScreen(localRSTile)))
- a.l(localRSTile,
- 1);
- return true;
- }
- return false;
- }
- private int W()
- {
- if (!a.O())
- return -1;
- int[] arrayOfInt = { 49689, 49692, 54288 };
- RSObject
- localRSObject1;
- if (
- (localRSObject1 = a.i(a.te)) == null)
- {
- return -1;
- }
- RSTile localRSTile1 = localRSObject1.getLocation(); RSTile localRSTile2
- = a.r.getCentralTile(); RSTile localRSTile3 = a.tA();
- int i1 = Math.abs(localRSTile2.getY() - localRSTile3.getY()) > 4 ? 1 : 0;
- Object localObject1 = null;
- RSTile localRSTile4 = null;
- RSObject localRSObject2 = a.i(new int[] { 50962, 50965, 52059, 54986 });
- RSObject[] arrayOfRSObject;
- int i3 = (arrayOfRSObject =
- a.J(new int[] { 50849, 51943, 54765 })).length;
- int i4;
- Object localObject4 = (localObject3 = arrayOfRSObject[i4])
- .getLocation();
- if ((a.D((RSTile)
- localObject4) != null) && (a.calc.distanceBetween((RSTile)localObject4, localRSTile3) < 6.0D))
- {
- localObject1 = localObject4;
- }
- else
- {
- i4++;
- }
- int i2 = 0; i3 = 0;
- Object localObject2 = null; Object localObject3 = null; localObject4 = null; Object localObject5 = null; Object localObject6 = null;
- Object localObject7 = null; Object localObject8 = null; Object localObject9 = null; Object localObject10 = null; Object localObject11 = null;
- int i5;
- int i6;
- Object localObject12;
- Object localObject13;
- Object localObject14;
- int i8;
- int i9;
- RSTile localRSTile6;
- RSNPC localRSNPC2;
- if (localObject1 !=
- null)
- {
- i2 = 1;
- localObject3 = a.D(localObject1);
- localObject8 = localObject1;
- i5 = localObject1.getX(); i6 = localObject1.getY();
- localObject12 = new RSTile[] { new RSTile(i5 - 2, i6), new RSTile(i5 + 2, i6), new RSTile(i5, i6 - 2), new RSTile(i5, i6 + 2) };
- localObject13 = new RSTile[] {
- new RSTile(i5 - 1, i6), new RSTile(i5 + 1, i6), new RSTile(i5, i6 - 1), new RSTile(i5, i6 + 1) };
- i8 = (localObject14 = localObject12).length; localRSTile6 =
- localObject14[i9];
- if ((localRSNPC2 = a.D(localRSTile6)) != null)
- {
- localObject2 = localRSNPC2;
- localObject7 = localRSTile6;
- }
- else
- {
- i9++;
- }
- i8 = (localObject14 = localObject13).length; localRSTile6 = localObject14[i9];
- if (
- (localRSNPC2 = a.D(localRSTile6)) !=
- null)
- {
- localObject4 = localRSNPC2;
- localObject9 = localRSTile6;
- }
- else
- {
- i9++;
- }
- }
- if (localRSObject2 != null)
- {
- i3 = 1;
- i5 =
- (localRSTile4 = localRSObject2.getLocation()).getX(); i6 = localRSTile4.getY();
- localObject12 = new RSTile[] { new RSTile(i5 - 1,
- i6), new RSTile(i5 + 1, i6), new RSTile(i5, i6 - 1), new RSTile(i5, i6 + 1) };
- localObject13 = new RSTile[] { new RSTile(i5 - 2, i6), new RSTile(i5 + 2, i6), new
- RSTile(i5, i6 - 2), new RSTile(i5, i6 + 2) };
- i8 = (localObject14 = localObject12).length; localRSTile6 = localObject14[i9];
- if ((localRSNPC2 = a.D
- (localRSTile6)) != null)
- {
- localObject5 = localRSNPC2;
- localObject10 = localRSTile6;
- }
- else
- {
- i9++;
- }
- i8 =
- (localObject14 = localObject13).length; localRSTile6 = localObject14[i9];
- if (
- (localRSNPC2 = a.D(localRSTile6)) != null)
- {
- localObject6 =
- localRSNPC2;
- localObject11 = localRSTile6;
- }
- else
- {
- i9++;
- }
- }
- if (localObject1 != null)
- {
- i2 = 1;
- localObject3 =
- a.D(localObject1);
- localObject8 = localObject1;
- i5 = localObject1.getX(); i6 = localObject1.getY();
- localObject12 = new RSNPC[] { a.D(new RSTile(i5 - 2,
- i6)), a.D(new RSTile(i5 + 2, i6)), a.D(new RSTile(i5, i6 - 2)), a.D(new RSTile(i5, i6 + 2)) };
- localObject13 = new RSNPC[] { a.D(new RSTile(i5 - 1, i6)), a.D(new
- RSTile(i5 + 1, i6)), a.D(new RSTile(i5, i6 - 1)), a.D(new RSTile(i5, i6 + 1)) };
- i8 = (localObject14 = localObject12).length;
- if ((localRSTile6 =
- localObject14[i9]) != null)
- {
- localObject2 = localRSTile6;
- localObject7 = localRSTile6.getLocation();
- }
- else
- {
- i9++;
- }
- i8 = (localObject14 = localObject13).length;
- if ((localRSTile6 = localObject14[i9]) != null)
- {
- localObject4 = localRSTile6;
- localObject9 =
- localRSTile6.getLocation();
- }
- else
- {
- i9++;
- }
- }
- RSObject localRSObject3;
- if ((localRSObject3 = a.i(arrayOfInt)) != null)
- {
- a.camera.turnToObject(localRSObject3);
- }
- if (!a.j()) {
- return -1;
- }
- if (a.jA()) {
- return 2;
- }
- RSNPC localRSNPC1 = a.D(new int[] { 11073 });
- int i10;
- if (a.interfaces.getComponent(945, 17).getRelativeX() == 200)
- {
- a.vE = localRSTile1;
- if (localRSNPC1 != null)
- {
- localObject12 =
- localRSNPC1.getLocation();
- localObject13 = localRSTile1;
- int i7 = ((RSTile)localObject12).getX(); i8 = ((RSTile)localObject12).getY(); i9 = ((RSTile)
- localObject13).getX(); i10 = ((RSTile)localObject13).getY();
- boolean bool1 = false;
- if (i1 != 0)
- {
- if (i7 != i9)
- {
- bool1 = i7 > i9 ? a.A((RSTile)localObject12, 1, 0) : a.A((RSTile)localObject12, -1, 0);
- }
- }
- else if (i8 != i10)
- bool1 = i8 > i10 ? a.A
- ((RSTile)localObject12, 0, 1) : a.A((RSTile)localObject12, 0, -1);
- if ((bool1) && (a.F(localRSNPC1, "Push")))
- {
- a.K(true);
- }
- }
- }
- else
- {
- localObject12 = a.D(new int[] { 11075 });
- localRSObject3 = a.i(arrayOfInt);
- if ((localRSNPC1 != null) && (localRSObject3 != null))
- {
- localObject13 = localRSNPC1.getLocation();
- RSTile localRSTile5 = localRSObject3.getLocation();
- i8 = ((RSTile)localObject13).getX(); i9 = ((RSTile)
- localObject13).getY(); i10 = localRSTile5.getX(); int i11 = localRSTile5.getY();
- boolean bool2;
- if (i1 != 0)
- {
- if (i8 != i10)
- {
- bool2 = i8 > i10 ? a.A((RSTile)localObject13, 1, 0) : a.A((RSTile)localObject13, -1, 0);
- if ((bool2) && (a.F(localRSNPC1, "Push")))
- {
- a.K(true);
- localObject13 = localRSNPC1.getLocation();
- localRSTile5 = localRSObject3.getLocation();
- i8 = ((RSTile)
- localObject13).getX();
- i9 = ((RSTile)localObject13).getY();
- i10 = localRSTile5.getX();
- i11 = localRSTile5.getY();
- if (i8 == i10)
- {
- a.A(new RSTile(i8, i9 + i9 - i11), 0);
- }
- }
- }
- }
- else if (i9 != i11)
- {
- bool2 = i9 > i11 ? a.A((RSTile)localObject13, 0, 1) : a.A((RSTile)localObject13, 0, -1);
- if ((bool2) && (a.F(localRSNPC1, "Push")))
- {
- a.K(true);
- localObject13 = localRSNPC1.getLocation();
- localRSTile5 = localRSObject3.getLocation();
- i8 = ((RSTile)
- localObject13).getX();
- i9 = ((RSTile)localObject13).getY();
- i10 = localRSTile5.getX();
- i11 = localRSTile5.getY();
- if (i9 ==
- i11)
- {
- a.A(new RSTile(i8 + i8 - i10, i9), 0);
- }
- }
- }
- }
- else if (i2 != 0)
- {
- if (a.D((RSTile)
- localObject7) != null)
- {
- if (a.F(localObject2, "Push"))
- a.K(true);
- }
- else if (a.D(localObject8) != null)
- {
- if
- (a.F((RSNPC)localObject3, "Push")) {
- a.K(true);
- }
- }
- else if (a.D((RSTile)localObject9) != null)
- {
- if (a.F((RSNPC)
- localObject4, "Push"))
- {
- a.K(true);
- }
- }
- else
- i2 = 0;
- }
- else if (i3 != 0)
- {
- if (a.D
- (localObject10) != null)
- {
- if (a.F(localObject5, "Push"))
- {
- a.K(true);
- }
- }
- else if (a.D(localObject11) !=
- null)
- {
- if (a.F(localObject6, "Push")) {
- a.K(true);
- }
- }
- else
- {
- i3 = 0;
- }
- }
- else if
- (localObject12 != null)
- {
- if (a.inventory.contains(17422))
- {
- if (a.calc.distanceTo(((RSNPC)localObject12).getLocation()) > 1)
- {
- a.l(localRSTile4, 1);
- a.l(false);
- a.K(false);
- }
- if (a.F((RSNPC)localObject12, "Fix"))
- a.K(true);
- }
- else
- {
- a.EA();
- if (!a.l(a.yd))
- {
- a.l(a.groundItems.getNearest(new int[] { 17422 }));
- }
- }
- }
- }
- a.sleep(300, 500);
- a.A(a.nD, 2);
- a.K(false);
- if (a.jA())
- {
- return 2;
- }
- a.A(a.calc.distanceTo(localRSTile4) > 2 ? localRSTile4 : a.nD, 3);
- if
- (!a.Y().isMoving()) {
- a.A(a.nD, 3);
- }
- a.K(false);
- return 1;
- }
- private boolean F(boolean a)
- {
- if (a)
- {
- if ((!a.GA()) && (a.interfaces.get
- (548).isValid()))
- {
- a.log("Checking the dungeon map.");
- a.l(a.interfaces.getComponent(548, 179), "");
- a.sleep(400, 600);
- return true;
- }
- }
- else if (a.GA())
- {
- a.log("Closing the dungeon map.");
- return a.l(a.interfaces.getComponent(942, 6), "");
- }
- return false;
- }
- private
- void t()
- {
- if (a.pc > 0)
- {
- RSItem localRSItem = a.inventory.getItem(new int[] { a.pc });
- String str = a.l(localRSItem);
- int i1;
- if ((i1 =
- a.F(str)) > 0)
- {
- a.log("Upgrading our " + a.cd + " to " + a.J(str));
- int i2 = a.Vc;
- a.aA = 0;
- if (a.Zc())
- {
- return;
- }
- int i3;
- if ((i3 = a.inventory.getItemID(str + " (b)")) > 0)
- {
- a.Vc = i3;
- }
- else if (a.interfaces.get(94).isValid())
- {
- a.interfaces.getComponent(94, 3).doClick();
- }
- else if (a.inventory.contains(a.Vc))
- a.inventory.getItem(new int[] { a.Vc
- }).doAction("Destroy");
- else if ((a.equipment.getItem(17) != null) && (a.equipment.getItem(17).getID() > 0))
- {
- a.equipment.getItem(17).doClick
- (true);
- }
- else if (a.inventory.contains(a.pc)) {
- a.l(a.pc, "Bind");
- }
- else if (a.l(a.groundItems.getNearest(new int[] { a.pc })))
- a.K(false);
- a.sleep(400, 800);
- a.l(a.Vc, "Wield");
- a.aA = i1;
- if (a.EB.contains(Integer.valueOf(a.pc))) {
- a.EB.remove
- (Integer.valueOf(a.pc));
- }
- a.pc = -1;
- }
- }
- }
- private boolean u()
- {
- a.Qc = "Opening a locked door";
- a.Hc = false;
- if (!a.Hc)
- {
- if (a.jA()) {
- return false;
- }
- if (a.Y().getAnimation() != 13798)
- {
- RSObject localRSObject = a.G(a.WA);
- if (a.SE.contains("don't
- have the correct"))
- {
- a.log.severe("Hmm.. we got tricked, we don't have the right key!");
- a.J.remove(a.nD);
- a.J.remove(a.WA);
- return true;
- }
- if (a.l(localRSObject)) {
- a.K(false);
- }
- else if (localRSObject != null)
- {
- a.sleep(100, 200);
- }
- a.sleep(200, 400);
- }
- }
- a.Hc = false;
- a.J.remove(a.WA);
- a.fA.remove(a.WA);
- a.Bd.remove(a.WA);
- a.vF.remove(a.WA);
- if (a.ZA != null);
- if (a.jA())
- {
- return false;
- }
- a.uA();
- if (a.l(a.G(a.nD)))
- {
- a.K(false);
- if (a.i(false))
- {
- return true;
- }
- }
- a.sleep(200, 400);
- return true;
- }
- private RSTile X()
- {
- RSPlayer localRSPlayer;
- return (localRSPlayer = a.Y()) != null
- ? localRSPlayer.getLocation() :
- a.y;
- }
- private RSPlayer Y()
- {
- return a.players.getMyPlayer();
- }
- private boolean x()
- {
- int i1;
- if (a.Y().getAnimation() != -1)
- return true;
- a.sleep(80, 120);
- i1++;
- return false;
- }
- private int p()
- {
- if ((!a.O()) || (!a.A()) || (!a.L())) {
- return -1;
- }
- boolean bool = false;
- int[]
- arrayOfInt1 = { 54082, 54083, 54084, 54085 };
- int[] arrayOfInt2 = { 54095, 54096, 54097, 54098 };
- int[] arrayOfInt3 = { 54099, 54100, 54101, 54102 };
- int[]
- arrayOfInt4 = { 54074, 54075, 54076 };
- int i1 = -1;
- String str = "";
- while (a.i(arrayOfInt1) == null)
- {
- if (a.jA()) {
- return 2;
- }
- if
- (!a.j())
- {
- return -1;
- }
- a.l(a.vc, 40, 50);
- if (a.inventory.getItemID("Consecrated herb") > 0)
- {
- i1 = a.inventory.getItemID
- ("Consecrated herb");
- }
- int i2 = a.inventory.getItemID(str);
- RSObject localRSObject1 = a.i(arrayOfInt2);
- RSObject localRSObject2 = a.i
- (arrayOfInt3);
- RSObject localRSObject3 = a.i(arrayOfInt4);
- if (a.D(new int[] { 11245 }) != null)
- {
- if (str.isEmpty())
- {
- if (a.l
- (a.i(a.wd), "Read"))
- {
- a.K(true);
- RSComponent localRSComponent;
- if ((localRSComponent = a.interfaces.getComponent(211, 2))
- .isValid())
- if (localRSComponent.containsText("corianger"))
- {
- str = "Corianger";
- }
- else if
- (localRSComponent.containsText("explosemary")) {
- str = "Explosemary";
- }
- else if (localRSComponent.containsText("parslay"))
- str = "Parslay";
- else if (localRSComponent.containsText("cardamaim"))
- {
- str = "Cardamaim";
- }
- else if (localRSComponent.containsText("papreaper")) {
- str = "Papreaper";
- }
- else if (localRSComponent.containsText
- ("slaughtercress"))
- str = "Slaughtercress";
- }
- if (!str.isEmpty())
- {
- a.log("Honoring Lief with " + str);
- }
- }
- else if (a.interfaces.get(232).isValid())
- {
- a.l(a.interfaces.get(232), new String[] { str, "More herbs" });
- }
- else if
- (localRSObject2 != null)
- {
- bool = a.l(localRSObject2, "Light");
- }
- else if ((i2 > 0) && (a.inventory.contains(i2)))
- {
- a.inventory.getItem(new int[] { i2 }).doClick(true);
- }
- else if (localRSObject3 != null)
- {
- bool = a.l(localRSObject3, "Harvest");
- }
- else if ((i1 > 0) && (a.inventory.contains(i1)) && (localRSObject1 != null))
- {
- bool = a.l("Consecrated herb", localRSObject1);
- }
- }
- else
- {
- bool = a.l(a.i(a.wd), "Open");
- }
- if (bool)
- {
- a.K(false);
- }
- else {
- a.sleep(200, 300);
- }
- }
- return
- 1;
- }
- private boolean F(int a)
- {
- RSItem localRSItem1 = a.inventory.getSelectedItem(); RSItem localRSItem2 = a.inventory.getItem(new int[] { a });
- if
- ((localRSItem1 != null) && (localRSItem1.getID() == a)) {
- return true;
- }
- if ((localRSItem2 == null) || (!localRSItem2.doAction("Use")))
- return false;
- a.sleep(600, 800);
- int i1;
- a.sleep(200, 300);
- i1++;
- return ((localRSItem1 = a.inventory.getSelectedItem()) != null) &&
- (localRSItem1.getID() == a);
- }
- private boolean l(RSObject a)
- {
- if (a == null) {
- return false;
- }
- String str1 = "";
- RSObjectDef localRSObjectDef;
- int i2;
- if
- ((localRSObjectDef = a.getDef()) != null)
- {
- String[] arrayOfString;
- int i1 = (arrayOfString = localRSObjectDef.getActions()).length;
- String str2;
- if ((
- (str2 = arrayOfString[i2]) != null) && (!str2.isEmpty()) && (!str2.contains("Examine")) && (!str2.equals("Walk here")) && (!str2.equals("Cancel")))
- {
- str1 = str2 + " " + localRSObjectDef.getName();
- }
- else
- {
- i2++;
- }
- }
- if ((str1.isEmpty()) && (a.calc.distanceTo(a) > 4)) {
- a.A(a.getLocation(), 1);
- }
- return a.l(a, str1);
- }
- private boolean l(String a)
- {
- int i1;
- if (
- (i1 = a.menu.getIndex(a.toLowerCase())) == -1)
- {
- a.mouse.moveRandomly(700);
- a.sleep(a.random(150, 400));
- return false;
- }
- if (!a.menu.isOpen())
- {
- if (i1 == 0)
- {
- a.mouse.click
- (true);
- return true;
- }
- a.mouse.click(false);
- }
- int i2;
- if ((i2 = 0) < 4)
- {
- a.sleep(10, 30);
- i2++;
- }
- if (!a.menu.isOpen())
- return false;
- String[] arrayOfString;
- if ((arrayOfString = a.menu.getItems()).length <=
- i1)
- {
- i1 = a.menu.getIndex(a.toLowerCase());
- if
- ((arrayOfString.length <= i1) || (i1 == -1)) {
- return false;
- }
- }
- int i3 = a.mouse.getSpeed();
- a.mouse.setSpeed(i3 + a.random(1, 3));
- Point
- localPoint = a.menu.getLocation();
- int i4 = a.random(4, arrayOfString[i1].length() * 4);
- int i5 = 21 + 16 * i1 + a.random(3, 12);
- a.mouse.move(localPoint.x +
- i4, localPoint.y + i5, 2, 2);
- a.mouse.setSpeed(i3);
- if (a.menu.isOpen())
- {
- a.mouse.click(true);
- return true;
- }
- return false;
- }
- private void
- w()
- {
- int i3;
- if (a.aA < a.mA)
- {
- int i1 =
- a.aA;
- RSGroundItem[] arrayOfRSGroundItem = a.groundItems.getAll(); int i2 =
- arrayOfRSGroundItem.length; i3 = 0; RSGroundItem localRSGroundItem = arrayOfRSGroundItem[i3];
- if ((localRSGroundItem != null) && (a.r != null)) if (a.r.contains
- (new RSTile[] { localRSGroundItem.getLocation() }))
- {
- String str = localRSGroundItem.getItem().getName();
- if ((str != null) && (!str.isEmpty
- ()) && (str.contains(a.cd)))
- {
- int i4 = a.F(str);
- if ((i4 > i1) && (i4 <= a.mA))
- {
- i1 = i4;
- a.pc =
- localRSGroundItem.getItem().getID();
- a.EB.add(Integer.valueOf(a.pc));
- }
- }
- }
- i3++;
- }
- }
- private int l(RSTile a,
- RSObject a)
- {
- if (a == null)
- {
- return 0;
- }
- return 5 - (int)a.calc.distanceBetween(a, a.getLocation());
- }
- private int q()
- {
- if (!a.O()) {
- return -1;
- }
- boolean bool = false;
- RSObject localRSObject1 = a.i(new int[] { 54182, 54183, 54184, 54185 });
- RSObject localRSObject2 = a.J(new String[] {
- "Damaged bridge" });
- a.jA = a.npcs.getNearest(a.B);
- if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
- {
- if ((!a.QB()) || ((a.HC ==
- 1) && (!a.ZA()))) {
- return 2;
- }
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- bool = a.F(a.u) == null;
- a.A
- (bool);
- do
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- if (a.objects.getNearest(new String[] { "Damaged
- bridge" }) != null)
- if (!a.inventory.contains(17444))
- {
- a.l(a.groundItems.getNearest(new int[] { 17444 }));
- }
- else if
- (a.inventory.contains(19661))
- {
- a.l(localRSObject2, "Repair");
- }
- else if (a.inventory.contains(19660))
- {
- a.inventory.getItem(new int[] { 19660 }).doClick(true);
- }
- else if (!a.inventory.containsOneOf(new int[] { 19660, 19661 }))
- {
- a.l
- (localRSObject1, "Mine");
- }
- a.K(bool);
- }
- while (!a.Rc());
- a.sleep(800, 1100);
- if (a.M) {
- a.f();
- }
- return 1;
- }
- public boolean
- onStart()
- {
- try
- {
- a.Hg = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/proLogo.png"));
- a.NB = ImageIO.read(new URL
- ("http://shadowscripting.com/iDungeon/Resources/hide.png"));
- a.rD = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/hide_s.png"));
- a.Dd =
- ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/arrowUp.png"));
- a.OE = ImageIO.read(new URL
- ("http://shadowscripting.com/iDungeon/Resources/arrowUp_s.png"));
- a.gD = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/arrowDown.png"));
- a.iG = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/arrowDown_s.png"));
- a.Kd = ImageIO.read(new URL
- ("http://shadowscripting.com/iDungeon/Resources/play.png"));
- a.Ib = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/play_s.png"));
- a.KG =
- ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/pause.png"));
- a.VC = ImageIO.read(new URL
- ("http://shadowscripting.com/iDungeon/Resources/pause_s.png"));
- a.oA = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/info.png"));
- a.Uc
- = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/info_s.png"));
- a.UF = ImageIO.read(new URL
- ("http://shadowscripting.com/iDungeon/Resources/help.png"));
- a.hb = ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/help_s.png"));
- a.We =
- ImageIO.read(new URL("http://shadowscripting.com/iDungeon/Resources/stop.png"));
- a.BC = ImageIO.read(new URL
- ("http://shadowscripting.com/iDungeon/Resources/stop_s.png"));
- }
- catch (Exception localException)
- {
- a.log("Unable to load images. Try reloading the
- script if some are missing.");
- }
- a.H();
- return a.mA();
- }
- private boolean d()
- {
- return (a.Y().isInCombat()) && (a.Y().getInteracting() != null);
- }
- private boolean H()
- {
- try
- {
- File localFile;
- if (!(localFile = new File(a.rA))
- .exists())
- return false;
- Properties localProperties;
- (localProperties = new Properties()).load(new FileInputStream(a.rA));
- if ((localProperties != null) && (localProperties.getProperty("06") != null) &&
- (localProperties.getProperty("06").equals("true")))
- {
- int i1;
- int i2;
- a.O[i1][i2] = localProperties.getProperty("" + i1 + i2).equals("true");
- i2++;
- i1++;
- a.k = a.O[0][0];
- a.Xd = a.O[0][1];
- a.IB = a.O[0][2];
- a.i = a.O[0][3];
- a.BB = a.O[0][4];
- a.vC = a.O
- [0][5];
- a.XC = a.O[0][6];
- a.Yb = a.O[0][7];
- a.kf = a.O[1][0];
- a.ec = a.O[1][1];
- a.zA = a.O[1][2];
- a.VA = a.O[1][3];
- a.QC = a.O[1][4];
- a.xe = a.O[1][5];
- a.gB = a.O[1][6];
- a.bc = a.O[1][7];
- a.Fb = a.O[1][8];
- a.E = a.O[2][0];
- a.Ed = a.O[2][1];
- a.od = a.O[2][2];
- a.M = a.O[2][3];
- a.RC = a.O[2][4];
- a.dg = a.O[2][5];
- return true;
- }
- }
- catch (Exception localException1)
- {
- a.log("Unable to load settings");
- }
- return false;
- }
- private int[] l(ArrayList<Integer> a)
- {
- int[] arrayOfInt = new int[a.size()];
- int i1;
- arrayOfInt[i1] = ((Integer)a.get(i1)).intValue();
- i1++;
- return arrayOfInt;
- }
- private void g()
- {
- if (a.nb != null) if (a.nb.contains(new RSTile[] { a.X()
- }))
- {
- a.FF = true;
- return;
- }
- int i1 = 0;
- a.BD += 1;
- a.Wb += 1;
- a.Bd.removeAll(a.fG);
- a.Bd.removeAll(a.fc);
- a.J.removeAll
- (a.fG);
- a.J.removeAll(a.fc);
- if (a.i(a.gb) != null)
- {
- a.Ke = true;
- return;
- }
- if ((a.npcs.getNearest(a.B) == null) && (!a.ZA())) {
- return;
- }
- if (a.Kc != null)
- {
- for (localObject1 = a.J.iterator(); ((Iterator)localObject1).hasNext(); ) { RSTile localRSTile1 = (RSTile)((Iterator)
- localObject1).next();
- if (a.Kc.contains(new RSTile[] { localRSTile1 }))
- {
- a.log("Gatestone teleporting to the next good door");
- int i3;
- if (a.Kc.contains(new RSTile[] { a.X() }))
- {
- a.Kc = null;
- return;
- }
- if (a.F(39, "Cast"))
- {
- a.K(true);
- }
- i3++;
- a.Kc = null;
- return;
- }
- }
- }
- if ((a.Wb > 2) && (a.nb == null))
- {
- if ((a.Rd == 1) && (!
- a.qA.isEmpty()))
- {
- a.qA.clear();
- }
- else {
- a.log("Remaining good doors: " + a.J.size());
- }
- a.vA();
- if (a.J.isEmpty())
- {
- if (a.gE)
- {
- a.log("A prayer door is preventing us from solving this dungeon");
- }
- else if (a.XF)
- {
- a.log("Too-
- powerful mercenaries prevent us from solving this dungeon");
- }
- else
- {
- a.log.severe("No good doors remain.. Aborting dungeon");
- a.Ic += 1;
- }
- a.aA();
- return;
- }
- if (a.Rd == 1)
- a.A(a.FA.getCentralTile(), 3);
- if (a.jb != null) if (a.jb.contains(new RSTile
- [] { a.X() }))
- {
- a.QA = null;
- a.Fg = true;
- return;
- }
- if (a.BD > a.random(a.Zc + 5, a.Zc + 8))
- {
- a.log.severe
- ("Restarted too many times.. Aborting dungeon");
- a.Ic += 1;
- a.aA();
- return;
- }
- if (!a.DD())
- return;
- a.Wb = 0;
- i1 = 1;
- }
- else if (a.lA.contains(a.FA))
- {
- i1 = 1;
- }
- a.Qc = "Backtracking through the dungeon...";
- a.uA();
- if (a.FA == null)
- return;
- if
- ((a.r.contains(new RSTile[] { a.X() })) && (!a.ic.contains(a.FA)) && (a.Rd != 1))
- {
- if ((a.skills.getRealLevel(6) >= 32) && (!a.inventory.contains(17489))) if
- (a.inventory.getCount(true, new int[] { 17789 }) > 2)
- {
- if (a.F(38, "Cast"))
- a.K(true);
- }
- if ((a.inventory.contains(17489)) &&
- (a.l(17489, "Drop"))) {
- a.Kc = a.r;
- }
- }
- a.J.removeAll(a.fc);
- a.J.removeAll(a.w);
- a.nD = null;
- a.WA = null;
- Object localObject1 = null;
- int i2 = 0;
- if ((a.npcs.getNearest(a.B) != null) || (a.npcs.getNearest(a.Fd) != null))
- if (a.lA.contains(a.r))
- {
- if ((!a.QB()) || (!a.ZA())) {
- return;
- }
- }
- else
- {
- i2 = 1;
- i1 = 0;
- }
- Object localObject2;
- RSTile localRSTile2;
- if ((a.r != null) && (i1 == 0))
- {
- if ((a.nE) || (i2 != 0))
- {
- for (localObject2 = a.fc.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile2 = (RSTile)((Iterator)
- localObject2).next();
- if (a.r.contains(new RSTile[] { localRSTile2 }))
- {
- localObject1 = localRSTile2;
- break;
- }
- }
- }
- else
- {
- for (localObject2 = a.fc.iterator(); ((Iterator)localObject2).hasNext(); ) { localRSTile2 = (RSTile)((Iterator)localObject2).next();
- if (a.r.contains(new RSTile[] { localRSTile2 }))
- {
- for (localIterator1 = a.Nc.iterator(); localIterator1.hasNext(); ) { localRSArea =
- (RSArea)localIterator1.next();
- if (a.calc.distanceBetween(localRSTile2, localRSArea.getNearestTile(localRSTile2)) < 3.0D)
- {
- if
- (localRSArea.equals(a.jb))
- {
- localObject1 = localRSTile2;
- break label1099;
- }
- for (RSTile
- localRSTile3 : a.J)
- {
- if (localRSArea.contains(new RSTile[] { localRSTile3 }))
- {
- localObject1 =
- localRSTile2;
- break label1099;
- }
- }
- }
- }
- }
- }
- }
- }
- Iterator
- localIterator1;
- RSArea localRSArea;
- label1099: a.uA();
- if ((a.FA != null) && (a.Rd != 1))
- {
- if (localObject1 != null)
- {
- a.A((RSTile)
- localObject1);
- if (a.M) {
- a.l(a.X(), (RSTile)localObject1, true, new int[0]);
- }
- }
- if (a.FA != null);
- if (localObject1 == null) {
- if (a.npcs.getNearest(a.B) != null)
- {
- a.log("Finishing off monsters before restarting");
- if ((!a.QB()) || (!a.ZA()))
- return;
- }
- else if (a.npcs.getNearest(a.Fd) != null)
- {
- a.log("Bad monster found, backtracking.");
- localObject1 = a.tA();
- }
- }
- if (localObject1 != null)
- {
- if ((localObject2 = a.G((RSTile)localObject1)) != null)
- {
- if (a.l((RSObject)localObject2, "Enter"))
- {
- if (!a.combat.isAutoRetaliateEnabled()) {
- a.game.openTab(0);
- }
- a.sleep(600, 800);
- if (a.Y().isMoving()) {
- a.sleep(100, 200);
- }
- a.sleep(400, 500);
- }
- }
- else
- {
- localObject1 = null;
- }
- }
- else {
- a.G(true);
- }
- a.sleep(100, 200);
- a.uA();
- }
- a.a.clear();
- if (a.i(a.u) == null)
- a.A(true);
- a.l(a.FA);
- a.hB = true;
- a.nE = false;
- }
- private boolean j()
- {
- if (((!a.BG) && (!a.oA())) || (a.interfaces.get(210).isValid()))
- {
- a.uC = "Level requirements";
- return false;
- }
- return true;
- }
- private int I()
- {
- int[] arrayOfInt1 = { 49468, 49469, 49470, 49477, 49478, 49479, 49486, 49487, 49488, 54262, 54265, 54268 };
- int[]
- arrayOfInt2 = { 49495, 49496, 49497, 54271 };
- int[] arrayOfInt3 = { 49513, 49514, 49515, 54277 };
- ArrayList localArrayList = new ArrayList();
- RSObject
- localRSObject1 = a.J(new String[] { "Large crystal" }); RSObject localRSObject2 = null;
- if (localRSObject1 == null) {
- return -1;
- }
- RSTile localRSTile1 =
- localRSObject1.getLocation(); Object localObject1 = null;
- Object localObject2;
- int i1 = (localObject2 = a.J(a.te)).length;
- int i2;
- RSObject[]
- arrayOfRSObject = localObject2[i2];
- localArrayList.add(arrayOfRSObject.getLocation());
- i2++;
- RSTile localRSTile2;
- while (true)
- {
- if (localObject1
- != null) if (a.J(new String[] { "Inactive lodestone" }) == null)
- break;
- if (a.jA())
- {
- return 2;
- }
- if (!a.j()) {
- return -1;
- }
- if (a.l(a.J(new String[] { "Inactive lodestone" }), "Power-up"))
- a.K(true);
- if (
- (localRSObject2 = a.i(arrayOfInt2)) == null)
- {
- continue;
- }
- for (localObject2 = localArrayList.iterator(); ((Iterator)localObject2).hasNext(); )
- if ((
- (localRSTile2 = (RSTile)((Iterator)
- localObject2).next()) != null) && (a.calc.distanceBetween(localRSTile2, localRSObject2.getLocation()) < 3.0D))
- {
- localObject1 = localRSTile2;
- break;
- }
- }
- localArrayList.remove(localObject1);
- label789: while (a.i(arrayOfInt3) == null)
- for (localObject2 = localArrayList.iterator();
- ((Iterator)localObject2).hasNext(); ) { localRSTile2 = (RSTile)((Iterator)localObject2).next();
- i2 = 0;
- a.vE = localRSTile2;
- if (i2 == 0)
- {
- if (a.jA()) {
- return 2;
- }
- int i4 = (arrayOfRSObject = a.J(arrayOfInt1)).length;
- int i5;
- RSObject
- localRSObject3;
- if (((localRSObject3 = arrayOfRSObject[i5]) != null) &&
- (a.calc.distanceBetween(a.vE, localRSObject3.getLocation()) < 3.0D)) {
- i2 = localRSObject3.getID();
- }
- i5++;
- a.sleep(100, 200);
- }
- a.F(a.vE, 1);
- if (a.jA())
- {
- return 2;
- }
- if ((a.i(new int[] { i2 }) != null) || (!a.X().equals(a.vE)))
- {
- if (a.jA())
- {
- return 2;
- }
- if (a.i
- (arrayOfInt3) == null)
- {
- if (a.X().equals(a.vE))
- {
- if (a.i(new int[] { i2 }) == null)
- {
- break
- label789;
- }
- a.F(a.vE, 1);
- }
- else if (a.l(localRSTile1, a.i(new int[] { i2 })) == 3)
- {
- a.A(a.vE,
- 0);
- a.K(false);
- }
- a.sleep(100, 200);
- }
- }
- if (a.X().equals(a.vE))
- {
- if (a.l(localRSTile1, a.i
- (arrayOfInt2)) == 3)
- {
- a.l(localRSTile1, 1);
- a.l(false);
- }
- a.sleep(30, 50);
- }
- int i3;
- for (; (i3
- = 0) < 10; tmpTernaryOp = 10)
- {
- if (a.l(localRSTile1, a.i(arrayOfInt2)) == a.l(localRSTile1, a.i(new int[] { i2 })))
- {
- a.log("Let
- the light go at the proper position.");
- a.vE = null;
- break;
- }
- if ((a.i(arrayOfInt3) != null) || (a.AA()))
- {
- break;
- }
- a.sleep(100, 150);
- i3++;
- }
- }
- return 1;
- }
- private boolean C()
- {
- if ((!a.nA) && (a.objects.getAll().length >
- 200))
- {
- a.log("This dungeon appears to have already been explored.");
- a.jC = false;
- a.nc = true;
- return false;
- }
- return true;
- }
- private
- boolean l(int a, RSNPC a)
- {
- RSItem localRSItem = a.inventory.getItem(new int[] { a });
- if ((a == null) || (localRSItem == null)) {
- return false;
- }
- if
- (a.calc.distanceTo(a) > 4)
- {
- a.l(a.getLocation(), 1);
- }
- if (!a.F(a))
- {
- return false;
- }
- a.sleep(200, 400);
- return
- (a.inventory.getSelectedItem() != null) && (a.doAction("Use"));
- }
- private boolean l(RSTile a, int a, int a)
- {
- if (a == null)
- {
- return false;
- }
- RSTile localRSTile1 = a.X(); RSTile localRSTile2 = new RSTile(a.getX() + a, a.getY() + a);
- if (localRSTile1.equals(localRSTile2))
- {
- return true;
- }
- int
- i3;
- if (a.calc.distanceTo(localRSTile2) > 1)
- {
- RSTile[] arrayOfRSTile;
- int i2 = (arrayOfRSTile = a.h(a)).length; RSTile localRSTile3 = arrayOfRSTile
- [i3];
- if ((a.D(localRSTile3) == null) && (!localRSTile3.equals(localRSTile2)) && (a.calc.distanceBetween(localRSTile3, localRSTile2) < 2.0D))
- {
- a.A
- (localRSTile3, 0);
- a.K(false);
- } else {
- i3++;
- }
- }
- a.A(localRSTile2, 0);
- a.K(false);
- if (a.X().equals(localRSTile1))
- {
- int
- i1;
- a.A(a.X(), i1);
- a.K(false);
- i1++;
- a.A(localRSTile2, 0);
- a.K(false);
- }
- return a.X().equals(localRSTile2);
- }
- private int B()
- {
- a.A(false);
- a.PD = a.xb;
- g localg = new g(a);
- if (a.i(new String[] { "Monolith" }) != null);
- if (a.jA())
- {
- return 2;
- }
- RSNPC localRSNPC;
- if (
- (localRSNPC = a.i(new String[] { "Monolith" })) != null) {
- if (a.npcs.getNearest(new int[] { 10978, 10979, 10980, 12176 }) == null)
- {
- a.vE =
- localRSNPC.getLocation();
- if ((!a.Y().isMoving()) && (a.calc.distanceTo(a.vE) > 3))
- a.A(a.vE, 2);
- if (a.F(localRSNPC, "Activate"))
- {
- a.K(false);
- }
- }
- else
- {
- a.jA = a.npcs.getNearest(localg);
- if (a.jA == null)
- {
- a.jA = a.npcs.getNearest(a.B);
- }
- if (a.F(a.jA))
- {
- a.vE = null;
- a.sleep(500, 800);
- }
- else if (a.jA == null)
- {
- a.vE =
- localRSNPC.getLocation();
- if ((a.calc.distanceTo(localRSNPC) > 2) && (!a.Y().isMoving()))
- a.l(localRSNPC.getLocation(), 1);
- if (!a.JC()) {
- a.sleep(300, 400);
- }
- }
- a.l(a.vc, 50, 50);
- }
- }
- a.sleep(100, 200);
- a.A(true);
- return 1;
- }
- private boolean l(RSTile
- a, int a)
- {
- if (a != null)
- {
- if (a > 0) {
- a = new RSTile(a.getX() + a.random(-a, a + 1), a.getY() + a.random(-a, a + 1));
- }
- if (a.X
- ().equals(a))
- return false;
- Point localPoint;
- if (
- (localPoint = a.calc.tileToMinimap(a)).x == -1)
- {
- if ((a =
- a.walking.getClosestTileOnMap(a)) == null)
- {
- return false;
- }
- localPoint = a.calc.tileToMinimap(a);
- }
- if (localPoint.x != -1)
- {
- a.mouse.move(localPoint);
- if (
- (localPoint = a.calc.tileToMinimap(a)).x != -1)
- {
- a.mouse.click(localPoint, true);
- return true;
- }
- }
- }
- return false;
- }
- private int c()
- {
- if (!a.O())
- {
- return -1;
- }
- int[] arrayOfInt = { 13070, 13071, 13072, 13073,
- 13074, 13075, 13076, 13077, 13078, 13079, 13080, 13081, 13082, 13083, 13084, 13085, 13086, 13087 };
- boolean bool = false;
- RSObject localRSObject1 = a.i(new int[]
- { 39980, 39988, 54490, 54496, 54613 });
- a.jA = a.npcs.getNearest(a.B);
- if ((a.jA != null) && ((a.HC != 1) || (a.l(a.jA.getLocation(), false))))
- {
- if ((!
- a.QB()) || ((a.HC == 1) && (!a.ZA())))
- return 2;
- }
- if (a.hd == null)
- {
- a.hd = new Timer(a.random(240000, 300000));
- }
- bool = a.F(a.u) ==
- null;
- a.A(bool);
- while (a.i(a.Mc) == null)
- {
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- RSObject
- localRSObject2 = a.i(new int[] { 40157, 40158, 54617, 54618 });
- RSNPC localRSNPC = a.D(arrayOfInt);
- a.l(a.vc, 40, 50);
- if (localRSNPC != null)
- {
- if (a.SE.contains("cannot push"))
- {
- RSObject localRSObject3;
- if ((localRSObject3 = a.J(new String[] { "Statue" })) == null)
- {
- a.A(a.X(), 4);
- }
- else
- a.F(localRSObject3.getLocation());
- a.SE = "";
- }
- else
- {
- a.F(localRSNPC,
- "Push");
- }
- }
- else if ((a.inventory.contains(19877)) && (localRSObject2 != null))
- {
- if (a.l(localRSObject2, "Repair"))
- {
- a.K(false);
- a.K(false);
- }
- }
- else if (!a.inventory.contains(19877))
- a.l(localRSObject1, "Mine");
- a.K(bool);
- if (a.Rc())
- {
- a.sleep(800, 1100);
- }
- }
- if (a.M)
- {
- a.f();
- }
- return 1;
- }
- public void mouseClicked(MouseEvent a)
- {
- Point localPoint = a.getPoint
- ();
- a.YF = a.getPoint();
- if (a.vg.contains(localPoint))
- {
- if (a.qC)
- {
- a.Od = false;
- a.Qc = "Shutting down iDungeon Pro";
- a.AB =
- "";
- }
- else if (a.AB.isEmpty())
- {
- a.ZB = true;
- }
- else
- {
- a.ZB = (!a.ZB);
- }
- }
- else if (a.kc.contains(localPoint))
- {
- a.qd = (!a.qd);
- }
- else if (a.Pg.contains(localPoint))
- {
- a.qC = (!a.qC);
- a.ZB = true;
- a.AB = (a.qC ? "Click here to confirm shutdown" :
- "");
- }
- else if (a.Rb.contains(localPoint))
- {
- try
- {
- Desktop.getDesktop().browse(new URI("http://shadowscripting.com/forums/viewforum.php?
- f=2"));
- }
- catch (Exception localException)
- {
- a.log("Unable to load the forums :(");
- }
- }
- else if (a.Q.contains(localPoint))
- {
- try
- {
- Desktop.getDesktop().browse(new URI("http://shadowscripting.wordpress.com/idungeon-users-guide/"));
- }
- catch (Exception localException1)
- {
- a.log("Unable to load the help manual :(");
- }
- }
- else if (a.ag.contains(localPoint))
- {
- a.iA = (!a.iA);
- }
- else if (!a.iA)
- {
- if
- (a.o.contains(localPoint))
- {
- a.Wc = (!a.Wc);
- }
- else if ((a.H.contains(localPoint)) && (!a.dc))
- {
- a.UB = true;
- a.qD = false;
- }
- else if ((a.m.contains(localPoint)) && (!a.dc))
- {
- a.UB = false;
- a.qD = true;
- }
- else if ((a.dc) && (a.uB == 0))
- {
- if
- (a.wA.contains(localPoint))
- {
- a.O[0][0] = 1;
- a.O[0][1] = 0;
- a.O[0][2] = 0;
- a.O[0][3] = 0;
- a.O[1][1] = 0;
- a.k = true;
- a.Xd = false;
- a.IB = false;
- a.i = false;
- a.ec = false;
- }
- else if (a.aB.contains(localPoint))
- {
- a.O[0][0] = 0;
- a.O[0][1] = 1;
- a.O[0][2] = 0;
- if (a.O[0][5] == 0)
- {
- a.O[0][3] = 1;
- a.i = true;
- }
- a.O[0][4] = 0;
- a.O[1][1] = 1;
- a.k = false;
- a.Xd = true;
- a.IB = false;
- a.BB = false;
- a.ec = true;
- }
- else if (a.G.contains(localPoint))
- {
- a.O[0][0] = 0;
- a.O[0][1] = 0;
- a.O[0][2] = 1;
- if (a.O[0][4] == 0)
- {
- a.O[0][3] = 1;
- a.i = true;
- }
- a.O[0][5] = 0;
- a.O[1][1] = 0;
- a.k = false;
- a.Xd = false;
- a.IB =
- false;
- a.vC = false;
- a.ec = false;
- }
- else if (a.mC.contains(localPoint))
- {
- a.O[0][3] = (a.O[0][3] == 0 ? 1 : 0);
- a.i = a.O[0][3];
- if (a.i)
- {
- a.O[0][4] = 0;
- a.O[0][5] = 0;
- a.BB = false;
- a.vC = false;
- }
- }
- else if ((a.fC.contains(localPoint)) && (!a.Xd))
- {
- a.O[0][4] = (a.O[0][4] == 0 ? 1 : 0);
- a.BB = a.O[0][4];
- if (a.BB)
- {
- a.O[0][3] = 0;
- a.O[0][5] = 0;
- a.i = false;
- a.vC = false;
- }
- }
- else if ((a.lF.contains(localPoint))
- && (!a.IB))
- {
- a.O[0][5] = (a.O[0][5] == 0 ? 1 : 0);
- a.vC = a.O[0][5];
- if (a.vC)
- {
- a.O[0][3] = 0;
- a.O
- [0][4] = 0;
- a.i = false;
- a.BB = false;
- }
- }
- else if (a.Ag.contains(localPoint))
- {
- a.O[0][6] = (a.O[0][6] ==
- 0 ? 1 : 0);
- a.XC = a.O[0][6];
- }
- else if (a.RE.contains(localPoint))
- {
- a.O[0][7] = (a.O[0][7] == 0 ? 1 : 0);
- a.Yb = a.O
- [0][7];
- }
- }
- else if (((a.dc) && (a.uB == 1)) || (a.qD))
- {
- if (a.xd.contains(localPoint)) {
- a.DC = 1;
- }
- else if
- (a.iC.contains(localPoint))
- {
- a.DC = 2;
- }
- else if ((!a.dc) && (a.tC.contains(localPoint)))
- a.DC = 3;
- else if (a.DC == 1)
- {
- if (a.JD.contains(localPoint))
- {
- a.O[1][0] = (a.O[1][0] == 0 ? 1 : 0);
- a.kf = a.O[1][0];
- }
- else if
- ((a.Mb.contains(localPoint)) && ((a.Xd) || (a.BB)))
- {
- a.O[1][1] = (a.O[1][1] == 0 ? 1 : 0);
- a.ec = a.O[1][1];
- }
- else
- if (a.JG.contains(localPoint))
- {
- a.O[1][2] = (a.O[1][2] == 0 ? 1 : 0);
- a.zA = a.O[1][2];
- }
- else if (a.Dc.contains
- (localPoint))
- {
- a.O[1][3] = (a.O[1][3] == 0 ? 1 : 0);
- a.VA = a.O[1][3];
- }
- else if (a.lf.contains(localPoint))
- {
- a.O[1][4] = (a.O[1][4] == 0 ? 1 : 0);
- a.QC = a.O[1][4];
- }
- else if (a.Ye.contains(localPoint))
- {
- a.O[1][5]
- = (a.O[1][5] == 0 ? 1 : 0);
- a.xe = a.O[1][5];
- if (!a.xe)
- a.log.severe("Warning! Disabling prayer doors will force the bot to abort
- many dungeons");
- }
- else if (a.zd.contains(localPoint))
- {
- a.O[1][6] = (a.O[1][6] == 0 ? 1 : 0);
- a.gB = a.O[1][6];
- }
- else if (a.qF.contains(localPoint))
- {
- a.O[1][7] = (a.O[1][7] == 0 ? 1 : 0);
- a.bc = a.O[1][7];
- }
- else if
- (a.Cd.contains(localPoint))
- {
- a.O[1][8] = (a.O[1][8] == 0 ? 1 : 0);
- a.Fb = a.O[1][8];
- }
- }
- else if (a.DC == 2)
- {
- if (a.V.contains(localPoint))
- {
- if (a.dC < 6) {
- a.dC += 1;
- }
- else
- {
- a.dC =
- 1;
- }
- }
- else if (a.Ub.contains(localPoint))
- {
- if (a.dC > 1)
- a.dC -= 1;
- else {
- a.dC
- = 6;
- }
- }
- else if (a.lb.contains(localPoint))
- {
- if (a.ld != 6) {
- a.ld += 1;
- }
- else
- {
- a.ld = 1;
- }
- }
- else if (a.p.contains(localPoint))
- {
- if (a.ld != 1)
- {
- a.ld -= 1;
- }
- else
- a.ld = 6;
- }
- else if (a.qf.contains(localPoint))
- {
- if (a.g > 0)
- {
- a.td = (a.td < a.g ? ++a.td : 1);
- }
- else if (a.td < 35)
- {
- a.td += 1;
- }
- else
- {
- a.td = 1;
- }
- }
- else if (a.D.contains(localPoint))
- {
- if (a.td > 1)
- {
- a.td -= 1;
- }
- else if (a.g > 0)
- {
- a.td = a.g;
- }
- else
- {
- a.td = 35;
- }
- }
- else if (a.gC.contains(localPoint))
- {
- a.O[2][0] = (a.O[2][0] == 0 ? 1 : 0);
- a.E = a.O[2][0];
- }
- else if
- (a.F.contains(localPoint))
- {
- a.O[2][1] = (a.O[2][1] == 0 ? 1 : 0);
- a.Ed = a.O[2][1];
- }
- else if (a.cf.contains
- (localPoint))
- {
- a.O[2][2] = (a.O[2][2] == 0 ? 1 : 0);
- a.od = a.O[2][2];
- }
- else if (a.bE.contains(localPoint))
- {
- a.O[2][3] = (a.O[2][3] == 0 ? 1 : 0);
- a.M = a.O[2][3];
- }
- else if (a.wc.contains(localPoint))
- {
- a.O[2][4]
- = (a.O[2][4] == 0 ? 1 : 0);
- a.RC = a.O[2][4];
- }
- else if (a.WB.contains(localPoint))
- {
- a.O[2][5] = (a.O[2][5] == 0 ? 1
- : 0);
- a.dg = a.O[2][5];
- }
- }
- else if ((!a.dc) && (a.DC == 3)) {
- if (a.ff.contains(localPoint)) {
- a.PA = 0;
- }
- else
- {
- a.PA = -1;
- }
- }
- }
- if (a.dc)
- {
- if (a.Vb.contains(localPoint))
- {
- if (a.uB ==
- 0) {
- a.DC = 1;
- }
- a.Pb = false;
- a.uB += 1;
- if (a.uB > 4)
- {
- a.dc = false;
- a.nA = true;
- }
- }
- else if ((a.fD.contains(localPoint)) && (a.uB > 0))
- {
- if (a.uB == 1)
- a.DC = 0;
- a.Pb = true;
- a.uB -=
- 1;
- }
- }
- else if (a.UB)
- {
- if (a.xd.contains(localPoint))
- a.h = 1;
- else if (a.iC.contains(localPoint))
- {
- a.h
- = 2;
- }
- else if (a.tC.contains(localPoint))
- a.h = 3;
- }
- }
- }
- private int l(int a)
- {
- return Skills.XP_TABLE[(a.skills.getRealLevel(a)
- + 1)] - a.skills.getCurrentExp(a);
- }
- private boolean L()
- {
- if (a.F(a.yf) != null)
- {
- a.uC = "Unkillable slayer monster";
- return false;
- }
- return
- true;
- }
- private RSNPC l(RSTile a, String a)
- {
- double d1 = 99999.990000000005D;
- Object localObject = null;
- int i2;
- if (a != null)
- {
- RSNPC[]
- arrayOfRSNPC;
- int i1 = (arrayOfRSNPC = a.npcs.getAll()).length;
- RSNPC localRSNPC;
- RSTile localRSTile =
- (localRSNPC = arrayOfRSNPC
- [i2]).getLocation();
- double d2;
- if (
- (d2 = a.calc.distanceBetween(localRSTile, a)) < d1)
- {
- if (localRSNPC.getName().toLowerCase
- ().contains(a.toLowerCase()))
- {
- d1 = d2;
- localObject = localRSNPC;
- }
- }
- i2++;
- }
- return localObject;
- }
- private int m()
- {
- int[] arrayOfInt = { 50663, 51762, 54785 };
- if (!a.O())
- return -1;
- if (a.jA()) {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- RSNPC
- localRSNPC = a.D(new int[] { 11010 });
- RSObject localRSObject = a.i(new int[] { 49589, 49590, 49591, 54005 });
- int i1;
- if (
- (i1 = a.J(new int[] { 49592
- }).length) < 3)
- {
- if (a.inventory.getCount(new int[] { 17377, 17378 }) < 3 - i1)
- {
- if (a.l(localRSObject, "Chop")) {
- a.K(true);
- }
- }
- else if (a.inventory.contains(17378))
- {
- Object localObject1 = null;
- a.vE = null;
- if (a.calc.distanceTo(a.r.getCentralTile()) > 6)
- {
- a.A(a.r.getCentralTile(), 3);
- a.K(false);
- }
- Object localObject2;
- int i2 = (localObject2 = a.J(arrayOfInt)).length;
- int i3;
- Object localObject3;
- RSTile localRSTile1 = (localObject3 = localObject2[i3])
- .getLocation();
- RSTile localRSTile2;
- if ((
- (localRSTile2 = a.F(localRSTile1, new int[] { 49592 })) == null) || (a.calc.distanceBetween(localRSTile1, localRSTile2) > 3.0D))
- {
- localObject1 =
- localRSTile1;
- }
- else {
- i3++;
- }
- if (localObject1 != null)
- {
- localObject2 = null;
- RSTile[] arrayOfRSTile;
- i3 = (arrayOfRSTile = a.J(localObject1)).length;
- int i4;
- localRSTile1 = arrayOfRSTile[i4];
- if ((a.r.contains(new RSTile[] {
- localRSTile1 })) && (a.G(localRSTile1) == null)) {
- localObject2 = localRSTile1;
- }
- else
- {
- i4++;
- }
- if
- (localObject2 != null)
- {
- i3 = (arrayOfRSTile = a.h((RSTile)localObject2)).length; localRSTile1 = arrayOfRSTile[i4];
- if (a.G
- (localRSTile1) == null)
- a.vE = localRSTile1;
- else {
- i4++;
- }
- if ((a.vE != null) && (a.inventory.contains
- (17378)))
- {
- if (!a.X().equals(a.vE))
- {
- if (a.jA()) {
- return 2;
- }
- a.i(a.vE, 0);
- if (!a.inventory.contains(17378))
- {
- a.inventory.getItem(new int[] { 17377 }).doClick(true);
- a.sleep(400, 700);
- }
- a.K(false);
- }
- if (a.l(17378, "Lay"))
- {
- a.sleep(1000, 1300);
- a.K(true);
- }
- }
- }
- }
- }
- else if (a.inventory.contains(17377))
- {
- a.inventory.getItem(new int[]
- { 17377 }).doClick(true);
- a.sleep(700, 900);
- }
- }
- else
- {
- if (localRSNPC != null) {
- a.vE = localRSNPC.getLocation();
- }
- a.l
- (a.vE, 2);
- }
- a.K(false);
- if (a.jA()) {
- return 2;
- }
- if (a.l(a.i(new int[] { 49593 }), "Pick-up"))
- a.K(true);
- a.sleep(400, 600);
- return 1;
- }
- private boolean k()
- {
- return a.combat.getFightMode() == 4;
- }
- private int b()
- {
- ArrayList localArrayList = new ArrayList();
- if (a.jA())
- {
- return 2;
- }
- localArrayList.clear();
- RSObject[] arrayOfRSObject;
- int i3 = (arrayOfRSObject = a.J(a.OC)).length;
- int i4;
- Object localObject1 =
- arrayOfRSObject[i4];
- localArrayList.add(((RSObject)localObject1).getLocation());
- i4++;
- int i1 = 4 - localArrayList.size();
- a.Qc = ("Puzzle room: Icy Pads
- (" + i1 + " of 4)");
- int i2 = a.X().getX(); i3 = a.X().getY();
- for (Iterator localIterator = localArrayList.iterator(); localIterator.hasNext(); ) { localObject1
- = (RSTile)localIterator.next();
- if (a.l(a.X(), (RSTile)localObject1))
- {
- a.vE = ((RSTile)localObject1);
- a.log("Good pad found!");
- break;
- }
- }
- int i5;
- int i11;
- if (a.vE != null)
- {
- a.A(a.vE, 0);
- a.K(false);
- if (a.X().equals(a.vE))
- {
- a.log("Sucessfully pressed a
- pad!");
- }
- a.vE = null;
- }
- else if (
- (i5 = a.random(0, 13)) == 0)
- {
- if (a.A(a.r.getCentralTile(), 0))
- {
- a.K(true);
- }
- }
- else if (i5 == 1)
- {
- int i6 = a.random(-1, 2); int i8 = a.random(-1, 2);
- RSTile localRSTile1 = new RSTile(i2 + i6, i3 + i8);
- if ((a.J(localRSTile1,
- new int[0])) && (a.A(localRSTile1, 0)))
- {
- a.K(true);
- }
- }
- else
- {
- Object localObject2;
- RSTile localRSTile5;
- if (i5 > 9)
- {
- localObject2 = null;
- RSTile[] arrayOfRSTile1;
- i11 = (arrayOfRSTile1 = a.J(a.X())).length;
- int i12;
- localRSTile5 = arrayOfRSTile1[i12];
- if (a.J(localRSTile5, new int[0])) {
- localObject2 = localRSTile5;
- }
- i12++;
- if (a.A((RSTile)localObject2, 0)) {
- a.K(true);
- }
- }
- else if (i5 > 6)
- {
- int i9 = (localObject2 = a.J(a.X())).length; RSTile localRSTile3 = localObject2[i11];
- if ((a.J(localRSTile3,
- new int[0])) && (a.A(localRSTile3, 0)))
- {
- a.K(true);
- }
- else
- i11++;
- }
- else if (i5 > 4)
- {
- localObject2 =
- null;
- RSTile[] arrayOfRSTile2;
- i11 = (arrayOfRSTile2 = a.h(a.X())).length;
- int i13;
- localRSTile5 = arrayOfRSTile2[i13];
- if (a.J
- (localRSTile5, new int[0])) {
- localObject2 = localRSTile5;
- }
- i13++;
- if (a.A((RSTile)localObject2, 0))
- {
- a.K(true);
- }
- }
- else
- {
- int i10 = (localObject2 = a.h(a.X())).length; RSTile localRSTile4 = localObject2[i11];
- if ((a.J(localRSTile4, new int[0])) &&
- (a.A(localRSTile4, 0))) {
- a.K(true);
- }
- else
- {
- i11++;
- }
- }
- }
- a.sleep(100, 400);
- RSObject localRSObject;
- if
- (
- (localRSObject = a.i(new int[] { 49334 })) != null)
- {
- a.AB = "Navigating to the nearest corner";
- a.vE = localRSObject.getLocation();
- a.A(a.vE,
- 0);
- a.K(false);
- RSGroundItem[] arrayOfRSGroundItem;
- i5 = (arrayOfRSGroundItem = a.groundItems.getAll()).length;
- int i7;
- RSGroundItem
- localRSGroundItem;
- RSTile localRSTile2 = (localRSGroundItem = arrayOfRSGroundItem[i7])
- .getLocation();
- if (!a.RD.contains(localRSTile2)) if
- (a.r.contains(new RSTile[] { localRSTile2 }))
- {
- a.RD.add(localRSTile2);
- }
- i7++;
- a.lA();
- a.l(a.nD, 0);
- }
- return 1;
- }
- private void f()
- {
- ArrayList localArrayList = new ArrayList();
- try
- {
- int[][] arrayOfInt = a.walking.getCollisionFlags(a.game.getPlane());
- int i1 =
- a.game.getBaseX(); int i2 = a.game.getBaseY();
- int i3 = a.r.getX() - i1; int i4 = a.r.getY() - i2;
- int i5;
- int i6;
- if ((arrayOfInt[(i5 + 1)][(i6 +
- 1)] & 0x1280100) != 0)
- {
- localArrayList.add(new RSTile(i5 + i1, i6 + i2));
- }
- i6++;
- i5++;
- localArrayList.removeAll(a.ue);
- }
- catch
- (Exception localException1)
- {
- }
- a.be = localArrayList;
- }
- private boolean F(RSTile a)
- {
- if (a == null)
- return false;
- int i1;
- while
- (a.calc.distanceTo(a) > 1)
- {
- if ((a.lc != null) && (a.lc.getElapsed() > 30000L) && (!a.l(a.nD, true))) {
- return false;
- }
- if (a.Zc())
- {
- return false;
- }
- if (a.calc.distanceTo(a) < 2)
- {
- return true;
- }
- if (a.A(a, 1))
- {
- a.K(false);
- if
- (a.calc.distanceTo(a) > 1)
- {
- a.A(a.X(), i1);
- a.K(false);
- }
- }
- a.sleep(300, 400);
- i1++;
- }
- return true;
- }
- public
- int loop()
- {
- if (!a.Od)
- {
- return -1;
- }
- if (a.game.isLoggedIn())
- {
- a.mouse.setSpeed(a.random(5, 8));
- if (a.zB)
- {
- a.uA();
- if (a.nc)
- {
- a.aA();
- a.nc = false;
- }
- else if (a.Ke)
- {
- a.s();
- a.Ke = false;
- }
- else if
- (a.N)
- {
- a.eB();
- a.N = false;
- }
- else if (a.nA)
- {
- if (a.FF)
- {
- a.vE = null;
- if (a.i
- (a.gb) != null)
- {
- a.Ke = true;
- }
- else if (a.ud.equals("Frozen")) {
- a.wA();
- }
- else if
- (a.ud.equals("Abandoned"))
- a.LA();
- else if (a.ud.equals("Furnished")) {
- a.Qd();
- }
- else if (a.ud.equals
- ("Occult")) {
- a.i();
- }
- else
- {
- a.h();
- }
- a.FF = false;
- a.X = false;
- }
- else if (a.hB)
- {
- a.e();
- a.hB = false;
- }
- else if (a.Fg)
- {
- if (a.qb())
- {
- a.hB = true;
- }
- else
- a.X = true;
- a.nD = null;
- a.lc = null;
- a.Fg = false;
- }
- else if (a.X)
- {
- a.g();
- a.X = false;
- }
- else
- {
- if (a.jA())
- {
- return 100;
- }
- if (a.UA) {
- a.AB = "Hmm... Looks like we're stuck";
- }
- a.sleep(200, 400);
- a.g();
- }
- }
- }
- else
- {
- RSObject localRSObject1 = a.objects.getNearest(new int[] { 50552 });
- RSObject localRSObject2 = a.objects.getNearest(new int[] {
- 48496 });
- a.uA();
- if ((a.N) && (a.M()))
- {
- a.Qc = "Starting a new dungeon!";
- a.zB = true;
- a.eB();
- }
- else
- if (localRSObject1 != null)
- {
- a.Qc = "Jumping down the stairs...";
- if (a.l(localRSObject1, "Jump-down"))
- {
- a.K(true);
- a.K(true);
- }
- }
- else if (localRSObject2 != null)
- {
- a.BA();
- }
- else
- {
- if (a.jA())
- {
- return 100;
- }
- a.AB = "We don't know what to do :(";
- }
- }
- }
- else
- {
- a.camera.setPitch(true);
- }
- return a.random
- (0, 10);
- }
- private void e()
- {
- if (a.nb != null) if (a.nb.contains(new RSTile[] { a.X() }))
- {
- a.X = false;
- a.FF = true;
- return;
- }
- a.eC = ((a.Xb) && (!a.l(a.r, a.GB)));
- a.a.clear();
- a.uc.clear();
- if (a.Nc.size() > 1)
- {
- a.Qc = (a.ZA != null ? "Exploring a new room" : "Exploring an
- old room");
- }
- a.ZA = null;
- int i1 = 0;
- int i2 = 0;
- a.uA();
- Object localObject;
- if ((a.Zc > 4) && (!a.JB.contains(a.r)) && (!a.ic.contains(a.r)))
- for (localObject = a.fA.iterator(); ((Iterator)localObject).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject).next();
- if ((a.r.contains(new
- RSTile[] { localRSTile })) && (!a.fG.contains(localRSTile)))
- {
- i1 = 1;
- break;
- }
- }
- RSTile localRSTile;
- if (i1 != 0)
- {
- a.KD = false;
- a.NA = false;
- i2 = a.Z();
- localObject = a.Qc.contains("Puzzle room: ") ? a.Qc.substring(a.Qc.indexOf(":") + 2) : "Unknown puzzle";
- if
- ((i2 == 1) || (a.KD))
- {
- a.log("Puzzle: " + (String)localObject + " completed successfully" + (a.hd != null ? " in " + a.hd.toElapsedString() : "") + "!");
- a.vE = null;
- a.uA += 1;
- a.l.remove(a.r);
- a.aE.add(a.r);
- a.hA = new Timer(a.random(360000, 480000));
- a.KA = new Timer(0L);
- a.ic.remove(a.r);
- a.qA.clear();
- }
- else
- {
- if (i2 == 2)
- {
- if (a.nc) {
- return;
- }
- if ((a.hd !=
- null) && ((!a.hd.isRunning()) || (a.Qc.contains("reengage"))))
- {
- a.log.severe("Took too long to solve Puzzle: " + (String)localObject + " (" +
- (a.hd != null ? a.hd.toElapsedString() : "unknown time") + ")");
- if (a.UA) {
- a.env.saveScreenshot(false);
- }
- a.X = true;
- a.PD = -1;
- a.fG.addAll(a.ob);
- a.ic.add(a.r);
- a.J.removeAll(a.fG);
- a.Bd.removeAll(a.fG);
- a.nE = true;
- a.hd = null;
- a.qA.clear();
- a.G(true);
- a.AB = "";
- }
- else
- {
- a.Fg = true;
- }
- a.vE = null;
- a.hA = new Timer(a.random(360000, 480000));
- a.KA = new Timer(0L);
- return;
- }
- if (i2 == -1)
- {
- a.log("Unable to complete Puzzle: " + (String)localObject + "; Reason: " + a.uC + ".");
- a.vE = null;
- a.X = true;
- a.PD = -1;
- a.fG.addAll(a.ob);
- a.ic.add(a.r);
- a.J.removeAll(a.fG);
- a.Bd.removeAll(a.fG);
- a.nE = true;
- a.hA = new Timer(a.random
- (360000, 480000));
- a.KA = new Timer(0L);
- a.qA.clear();
- }
- }
- if (!a.NA) {
- a.JB.add(a.r);
- }
- a.hd = null;
- }
- if
- (a.ke.contains(a.r)) {
- a.nE = true;
- }
- if ((a.Qc.contains("new room")) && (!a.L()))
- {
- for (localObject = a.GB.iterator(); ((Iterator)
- localObject).hasNext(); ) { localRSTile = (RSTile)((Iterator)localObject).next();
- if (a.r.contains(new RSTile[] { localRSTile }))
- {
- a.fG.add
- (localRSTile);
- a.Bd.remove(localRSTile);
- a.J.remove(localRSTile);
- }
- }
- }
- a.GB.removeAll(a.fG);
- if (a.l(a.r, a.GB))
- {
- if
- (a.nE)
- {
- a.log("We can't skip through this room!");
- a.ke.remove(a.r);
- a.nE = false;
- }
- }
- if (a.nE)
- {
- if (!a.ZA())
- {
- return;
- }
- }
- else if (i2 != -1)
- {
- a.A(true);
- if ((a.nb == null) && (!a.QB())) {
- return;
- }
- if (!a.ZA())
- return;
- a.l(a.vc, a.random(50, 60), a.random(50, 60));
- a.S();
- if (a.Xd) if (a.inventory.getCount(true, new int[] { a.cc }) > a.random(10, 40)) {
- a.inventory.getItem(new int[] { a.cc }).doAction("Wield");
- }
- if (!a.ZA()) {
- return;
- }
- a.uA();
- }
- a.Bd.removeAll(a.fc);
- a.J.removeAll(a.fc);
- a.J.removeAll(a.w);
- if ((i2 < 1) && (a.Nc.size() > 1) && (a.nb == null))
- if ((i2 == -1) || ((!a.l(a.r, a.Bd)) && (!a.l(a.r, a.J)) &&
- (!a.l(a.r, a.w))))
- {
- a.ic.add(a.r);
- for (localObject = a.fA.iterator(); ((Iterator)localObject).hasNext(); ) { localRSTile = (RSTile)((Iterator)
- localObject).next();
- if (a.calc.distanceBetween(localRSTile, a.r.getNearestTile(localRSTile)) < 3.0D)
- {
- a.fG.add(localRSTile);
- }
- }
- }
- else if (!a.aE.contains(a.r))
- {
- a.aE.add(a.r);
- }
- a.Bd.removeAll(a.fG);
- a.J.removeAll(a.fG);
- a.w.removeAll(a.fG);
- a.AB
- = "";
- if (a.ic.contains(a.r))
- {
- if (i2 == 1)
- a.log.severe("We successfully completed the puzzle, but the room is assigned as finished?");
- a.X =
- true;
- }
- else
- {
- a.Fg = true;
- }
- a.ZA = null;
- a.eC = false;
- }
- private boolean M()
- {
- if ((a.interfaces.get(945).isValid()) || (!
- a.game.isLoggedIn()))
- {
- return true;
- }
- if (a.objects.getNearest(new int[] { 50552 }) == null);
- return a.objects.getNearest(new int[] { 48496 }) ==
- null;
- }
- private boolean l(int a, String a)
- {
- if (!a.inventory.contains(a)) {
- return true;
- }
- int i1 = a.inventory.getCount(new int[] { a });
- int i2;
- if ((i2 = 0) < 6)
- {
- RSItem localRSItem;
- if ((localRSItem = a.inventory.getItem(new int[] { a })) != null)
- {
- localRSItem.doAction(a);
- a.sleep(1000, 1300);
- a.sleep(100, 200);
- i2++;
- }
- }
- return i1 > a.inventory.getCount(new int[] { a });
- }
- private int a()
- {
- RSObject
- localRSObject1;
- if ((localRSObject1 = a.i(new int[] { 52041, 54907, 54908 })) == null)
- {
- return -1;
- }
- RSTile localRSTile1 =
- localRSObject1.getLocation();
- RSTile localRSTile2 = a.tA();
- if (a.jA())
- return 2;
- if (!a.j())
- {
- return -1;
- }
- RSObject localRSObject2 = a.J
- (new String[] { "Spinning blades" });
- RSObject localRSObject3 = a.J(new String[] { "Pendulum" });
- a.l(a.vc, 40, 50);
- a.jA = a.npcs.getNearest(a.B);
- a.yd =
- a.l(a.Zd);
- if ((a.jA != null) && (a.l(a.jA.getLocation(), false)))
- {
- a.F(a.jA);
- }
- else if ((a.yd != null) && (a.l(a.yd.getLocation(), false)))
- {
- a.l(a.yd);
- }
- else if (a.F(localRSObject2))
- {
- if ((a.calc.distanceTo(localRSTile1) < 2) || (a.calc.distanceTo(localRSObject2) > 5)) {
- a.A(a.nD,
- 1);
- }
- else
- {
- a.A(localRSTile1, 0);
- }
- }
- else if (a.F(localRSObject3)) {
- a.A(localRSObject3.getLocation(), 0);
- }
- else if
- (a.F(a.i(a.kg)))
- {
- a.A(localRSObject3.getLocation(), 1);
- }
- else if (a.l(localRSTile2, true))
- a.l(a.i(a.bB), "Step-onto");
- else
- a.A(a.nD, 1);
- a.K(true);
- if (a.AA()) {
- a.n();
- }
- else if (a.jA()) {
- return 2;
- }
- if (a.l(a.i(a.lC), "Open"))
- a.K(true);
- a.sleep(200, 400);
- return 1;
- }
- public void mouseReleased(MouseEvent a)
- {
- }
- private boolean h()
- {
- if (a.jA())
- {
- return false;
- }
- a.i(a.npcs.getNearest(a.jE));
- a.l(a.UC, 50, 60);
- a.sleep(400, 800);
- return true;
- }
- private int E()
- {
- a.EA();
- a.lA();
- if (a.nD != null) { if (a.yd != null) if (a.r.contains(new
- RSTile[] { a.yd.getLocation() }))
- {
- break label63;
- }
- label63: if (a.jA()) {
- return 2;
- }
- RSTile localRSTile = a.EA();
- if (a.yd != null)
- {
- if (a.calc.distanceTo(localRSTile) > 3)
- {
- a.l(localRSTile, 1);
- }
- else {
- a.l(a.yd);
- }
- }
- else
- {
- a.A(a.nD, 2);
- }
- a.K(true);
- a.K(true);
- a.lA();
- }
- a.NA = true;
- return 1;
- }
- public void mouseExited(MouseEvent a)
- {
- }
- private boolean l(RSModel a, String a)
- {
- if (a == null)
- return false;
- int i1;
- if (a.l(a, a.mouse.getLocation()))
- {
- if (a.l(a))
- return true;
- if (!a.menu.contains(a))
- {
- if (!a.Y().isMoving())
- {
- i1 += 2;
- }
- i1 += 2;
- }
- }
- a.mouse.move
- (a.getPoint());
- i1++;
- return false;
- }
- private boolean l(RSNPC a, String a)
- {
- if (a == null)
- return false;
- RSModel localRSModel;
- return
- (localRSModel = a.getModel()) != null
- ? a.l(localRSModel, a) : a.A(a.getLocation(), a);
- }
- private boolean l(boolean a)
- {
- int i1;
- if ((a.Y().isMoving())
- || ((a) && (a.Y().getAnimation() != -1)))
- {
- return true;
- }
- a.sleep(100, 150);
- i1++;
- return false;
- }
- private boolean l(RSTile a, RSTile a)
- {
- int i1 = a.getX(); int i2 = a.getY(); int i3 = a.getX(); int i4 = a.getY();
- return (i1 == i3) || (i2 == i4) || (Math.abs((i1 - i3) * 100 / (i2 - i4)) == 100);
- }
- private boolean K()
- {
- RSTile localRSTile;
- if (
- (localRSTile = a.tA()) != null)
- {
- if (a.FA != null);
- if ((!a.M()) || (!a.game.isLoggedIn()))
- return false;
- RSObject localRSObject;
- if ((localRSObject = a.G(localRSTile)) == null)
- {
- return false;
- }
- RSGroundItem
- localRSGroundItem;
- if ((
- (localRSGroundItem = a.groundItems.getNearest(new int[] { 18829 })) != null) && (a.l(localRSGroundItem.getLocation(), false)))
- {
- a.l(localRSGroundItem);
- }
- else if (a.l(localRSObject, "Enter"))
- {
- if (!a.combat.isAutoRetaliateEnabled())
- a.game.openTab(0);
- a.sleep(600, 800);
- if (a.Y().isMoving()) {
- a.sleep(100, 200);
- }
- }
- a.sleep(100, 200);
- a.uA();
- a.l(a.FA);
- }
- return
- false;
- }
- private void l(Graphics a, Rectangle a)
- {
- a.draw3DRect(a.x, a.y, a.width, a.height, true);
- }
- private int G()
- {
- if ((!a.O()) || (!a.A()))
- return -1;
- boolean bool = false;
- while (a.D(new int[] { 11246 }) != null)
- {
- if (a.jA()) {
- return 2;
- }
- if (!a.j())
- {
- return
- -1;
- }
- RSObject localRSObject1 = a.i(new int[] { 40181, 54571, 54593 });
- RSObject localRSObject2 = a.i(new int[] { 54572, 54594, 55451 });
- RSObject
- localRSObject3 = a.i(new int[] { 54576, 54598, 55453 });
- RSObject localRSObject4 = a.i(new int[] { 54580, 54602, 55457 });
- RSObject localRSObject5 = a.i(new
- int[] { 54577, 54599, 55455 });
- RSGroundItem localRSGroundItem = a.groundItems.getNearest(new int[] { 19879 });
- if (localRSObject2 != null)
- {
- bool = a.l(localRSObject2, "Bless-remains");
- }
- else if (localRSObject1 != null)
- {
- bool = a.l(localRSObject1, "Unlock");
- }
- else if
- (localRSObject4 != null)
- {
- bool = a.l(localRSObject4, "Repair");
- }
- else if (localRSGroundItem != null)
- {
- bool = a.l
- (localRSGroundItem);
- }
- else if (localRSObject3 != null)
- {
- if (!a.Y().isMoving()) {
- a.A(localRSObject3.getLocation(), 1);
- }
- bool = a.l(localRSObject3, "Fill");
- }
- else if (localRSObject5 != null)
- {
- if (!a.Y().isMoving())
- {
- a.A(localRSObject5.getLocation
- (), 1);
- }
- bool = a.l(localRSObject5, "Repair");
- }
- if (bool) {
- a.K(false);
- }
- else
- {
- a.sleep(200, 400);
- }
- }
- return 1;
- }
- private RSTile l(RSTile a, int[] a)
- {
- double d1 = 99999.990000000005D;
- Object localObject = null;
- int i1;
- if (a != null)
- {
- int i2;
- RSObject localRSObject;
- int i5;
- if ((localRSObject = a.G(new RSTile(i1, i2))) != null)
- {
- int i3 = localRSObject.getID();
- int[]
- arrayOfInt;
- int i4 = (arrayOfInt = a).length;
- if (arrayOfInt[i5] ==
- i3)
- {
- RSTile localRSTile = localRSObject.getLocation();
- double d2 = a.calc.distanceBetween(a, localRSTile);
- if (d2 < d1)
- {
- localObject = localRSTile;
- d1 = d2;
- }
- }
- i5++;
- }
- i2++;
- i1++;
- }
- return localObject;
- }
- private int D()
- {
- String str1 = "Yellow";
- String str2 = "Green";
- RSTile
- localRSTile1;
- if ((localRSTile1 = a.F(new RSTile(0, 20000), "tile")) == null) {
- return -1;
- }
- if (a.random(0, 2) == 1)
- {
- str1 = "Green";
- str2
- = "Yellow";
- }
- a.log("Flipping the tiles to " + str1.toLowerCase());
- int i1;
- RSTile localRSTile2 = new RSTile(localRSTile1.getX(), localRSTile1.getY() -
- i1);
- int i2;
- RSTile localRSTile3 = new RSTile(localRSTile2.getX() + i2, localRSTile2.getY());
- a.vE = new RSTile(localRSTile3.getX(), localRSTile3.getY() - 1);
- if (a.jA())
- {
- return 2;
- }
- if (!a.j())
- {
- return -1;
- }
- if (a.calc.distanceTo(a.vE) > 4)
- {
- a.l(a.vE, 1);
- a.K(false);
- }
- int i3;
- if ((a.A(a.vE, "Imbue")) && (a.l(true)))
- {
- if (!a.x())
- {
- a.x();
- }
- if ((i3 = 0) < 8)
- {
- a.sleep(150, 250);
- i3++;
- }
- }
- a.sleep(100, 200);
- i2++;
- i1++;
- RSObject[] arrayOfRSObject;
- if ((arrayOfRSObject = a.A(new String[] { str2 + " tile" })) != null)
- {
- a.log("Matched the first four rows. Forcing " + arrayOfRSObject.length + " remaining tiles.");
- if (a.jA()) {
- return 2;
- }
- if (a.l(a.J(new
- String[] { str2 + " tile" }), "Force " + str2))
- {
- a.x();
- a.K(!a.l(a.vc, 80, 30));
- }
- a.sleep(500, 600);
- }
- return 1;
- }
- private
- RSObject l(String[] a)
- {
- return a.objects.getNearest(new v(a, a));
- }
- private int J()
- {
- Combat.Prayer localPrayer = Combat.Prayer.PROTECT_FROM_MAGIC;
- if
- (a.jA())
- {
- return 2;
- }
- a.l(a.QC, localPrayer, true);
- RSNPC localRSNPC1 = a.i(new String[] { "skinweaver" });
- RSNPC localRSNPC2 = a.i(new String[] {
- "bloodrager" });
- RSNPC localRSNPC3 = a.i(new String[] { "deathslinger" });
- RSNPC localRSNPC4 = a.i(new String[] { "stormbringer" });
- a.jA = a.npcs.getNearest
- (a.B);
- if ((a.jA != null) && (!a.jA.getName().contains("Ramokee")))
- {
- if (a.F(a.jA))
- {
- a.K(false);
- }
- }
- else if (localRSNPC1 != null)
- {
- if (a.F(localRSNPC1)) {
- a.K(false);
- }
- }
- else if (localRSNPC4 != null)
- {
- if (a.F(localRSNPC4)) {
- a.K(false);
- }
- }
- else if (localRSNPC3 != null)
- {
- localPrayer = Combat.Prayer.PROTECT_FROM_MISSILES;
- if (a.F(localRSNPC3))
- {
- a.K(false);
- }
- }
- else if
- (localRSNPC2 != null)
- {
- localPrayer = Combat.Prayer.PROTECT_FROM_MELEE;
- if (a.F(localRSNPC2)) {
- a.K(false);
- }
- }
- a.l(a.lG, 50, 40);
- a.sleep(200, 300);
- a.l(false, localPrayer, false);
- return 1;
- }
- private boolean l(RSTile a)
- {
- RSTile localRSTile;
- return (localRSTile =
- a.calc.getTileOnScreen(a)) != null
- ? a.A(localRSTile, "Walk ") : a.A(a, 0);
- }
- public void mousePressed(MouseEvent a)
- {
- }
- private boolean l(RSNPC a)
- {
- if
- ((a == null) || (!a.isValid()))
- return false;
- if (a.l(a.getAnimation(), a.Yc))
- {
- return true;
- }
- RSCharacter localRSCharacter;
- return
- ((localRSCharacter = a.Y().getInteracting()) != null) &&
- (localRSCharacter.equals(a));
- }
- private void i()
- {
- RSNPC localRSNPC1 = a.i(new String[] {
- "Gravecreeper" });
- RSNPC localRSNPC2 = a.i(new String[] { "Runebound behemoth" });
- RSNPC localRSNPC3 = a.i(new String[] { "Necrolord" });
- RSNPC localRSNPC4 =
- a.i(new String[] { "Flesh-Spoiler" });
- RSNPC localRSNPC5 = a.i(new String[] { "Yk'Lagor the Thunderous" });
- a.l(a.UC, 50, 60);
- if (!a.tc.equals("Skeletal
- Trio")) if (a.i(new String[] { "Skeletal warrior" }) == null) if (a.i(new String[] { "Skeletal sorcerer" }) == null) if (a.i(new String[] { "Skeletal archer" }) ==
- null)
- break label921;
- Object localObject4 = null;
- a.Qc = "Killing the Skeletal Trio!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc =
- "Skeletal Trio";
- }
- RSNPC localRSNPC6 = a.i(new String[] { "Skeletal warrior" }); RSNPC localRSNPC7 = a.i(new String[] { "Skeletal archer" }); RSNPC localRSNPC8 =
- a.i(new String[] { "Skeletal sorcerer" });
- if (a.jA())
- {
- return;
- }
- localRSNPC6 = a.i(new String[] { "Skeletal warrior" });
- localRSNPC7 = a.i(new
- String[] { "Skeletal archer" });
- localRSNPC8 = a.i(new String[] { "Skeletal sorcerer" });
- localObject4 = null;
- int i1 = 1;
- int i2 = 1;
- int i3 = 1;
- int i9;
- int i11;
- if (localRSNPC6 != null)
- {
- i9 = localRSNPC6.getID();
- i1 = 0;
- if (i9 == i11) {
- i1 = 1;
- }
- else
- {
- i11 += 3;
- }
- }
- if (localRSNPC7 != null)
- {
- i9 = localRSNPC7.getID();
- i2 = 0;
- if (i9 == i11) {
- i2 = 1;
- }
- else
- {
- i11 += 3;
- }
- }
- if (localRSNPC8 != null)
- {
- i9 = localRSNPC8.getID();
- i3 = 0;
- if (i9 == i11) {
- i3 = 1;
- }
- else
- {
- i11 += 3;
- }
- }
- if (a.HC == 1)
- {
- if (localRSNPC8 != null) {
- a.l(a.QC, a.HC != 1 ? Combat.Prayer.PROTECT_FROM_MISSILES :
- Combat.Prayer.PROTECT_FROM_MAGIC, true);
- }
- else if (localRSNPC7 != null) {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MISSILES, true);
- }
- else
- {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
- }
- if (i2 == 0)
- {
- localObject4 = localRSNPC7;
- a.PD = a.xb;
- }
- else if
- (i3 == 0)
- {
- localObject4 = localRSNPC8;
- a.PD = a.xb;
- }
- else if (i1 == 0)
- {
- localObject4 = localRSNPC6;
- }
- if
- ((localRSNPC7 == null) && (localRSNPC8 == null)) {
- if (a.iD)
- {
- a.i(3);
- }
- else {
- a.PD = a.Gd;
- }
- }
- }
- else
- if (a.HC == 2)
- {
- if (localRSNPC6 != null)
- {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
- }
- else if (localRSNPC8 != null)
- {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- }
- else
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MISSILES, true);
- if (i3 == 0)
- {
- localObject4 = localRSNPC8;
- }
- else if (i1 == 0) {
- localObject4 = localRSNPC6;
- }
- else if (i2 == 0)
- {
- localObject4 = localRSNPC7;
- }
- }
- else if (a.HC == 3)
- {
- if (localRSNPC7 != null)
- {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MISSILES, true);
- }
- else if
- (localRSNPC6 != null) {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
- }
- else
- {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- }
- if (i1 == 0)
- localObject4 = localRSNPC6;
- else if (i2 == 0) {
- localObject4 = localRSNPC7;
- }
- else if (i3 == 0)
- {
- localObject4 = localRSNPC8;
- }
- }
- if (localObject4 != null)
- {
- a.F((RSNPC)localObject4);
- if (!a.l(a.UC, 50, 50))
- a.sleep(400, 600);
- }
- else if (!a.JC())
- {
- a.sleep(600, 800);
- }
- a.sleep(200, 300);
- break label3638;
- label921: int i7;
- int i8;
- if ((a.tc.equals("Runebound
- Behemoth")) || (localRSNPC2 != null))
- {
- localObject4 = new int[] { 53977, 53979, 53978 };
- int i6 = 0; i7 = 0; i8 = 0;
- if (a.kC) {
- i6 = 1;
- }
- if (a.Sd) {
- i7 = 1;
- }
- if (a.iD)
- {
- i8 = 1;
- }
- boolean[] arrayOfBoolean1 = { i6, i7, i8 };
- a.Qc = "Killing the
- Runebound Behemoth!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Runebound Behemoth";
- }
- a.PD = a.Gd;
- if (a.Ob < 1)
- a.Ob =
- localRSNPC2.getID();
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- if (a.jA())
- {
- return;
- }
- if (localRSNPC2 != null)
- if
- ((localRSNPC2.getAnimation() == 14440) || (localRSNPC2.getMessage() != null))
- {
- a.AB = "Dodging the lightning!";
- RSObject localRSObject2 =
- a.i(new int[] { 54786 });
- a.l(a.calc.distanceTo(localRSObject2) > 4 ? localRSObject2.getLocation() : a.nb.getCentralTile());
- if (!a.l(a.vc, 80, 30))
- {
- a.sleep(400, 600);
- }
- a.AB = "";
- }
- else
- {
- int i12 = a.Ob - localRSNPC2.getID();
- int i13 = 1; int
- i14 = 1; int i15 = 1;
- if (i12 == 15)
- {
- i13 = 0;
- }
- else if (i12 == 30)
- {
- i14 = 0;
- }
- else if (i12 == 60)
- {
- i15 = 0;
- }
- else if (i12 == -15)
- {
- i13 = 0;
- i15 = 0;
- }
- else
- if (i12 == -30)
- {
- i14 = 0;
- i13 = 0;
- }
- else if (i12 == -45)
- {
- i14 = 0;
- i15 = 0;
- }
- boolean[] arrayOfBoolean2 = { i13, i14, i15 };
- int i16 = a.HC - 1;
- if (arrayOfBoolean2[i16] == 0)
- {
- a.i(localRSNPC2);
- }
- else if (a.i(new int[] { localObject4[i16] }) != null)
- {
- if (a.combat.getHealth() > a.random(8, 15)) if (a.l(a.i(new int[] {
- localObject4[i16] }), "Deactivate")) {
- a.K(false);
- }
- }
- else
- {
- int i17 = 0;
- int i18;
- int i19 = i18 + 1;
- if ((a.HC != i19) && (arrayOfBoolean1[i18] != 0)) if (arrayOfBoolean2[i18] != 0) { if (a.i(new int[] { localObject4[i18] }) == null);
- }
- else
- {
- RSObject localRSObject3;
- if ((localRSObject3 = a.i(new int[] { localObject4[i18] })) !=
- null)
- {
- a.i(localRSObject3.getLocation(), 1);
- }
- a.i(i19);
- i17 = 1;
- break
- label1554;
- }
- i18++;
- label1554: if (i17 == 0)
- {
- a.JC();
- }
- }
- }
- a.l(a.lG, 50,
- 0);
- a.sleep(100, 200);
- }
- else
- {
- Object localObject1;
- Object localObject2;
- RSTile localRSTile1;
- if ((a.tc.equals("Gravecreeper")) ||
- (localRSNPC1 != null))
- {
- localObject1 = new int[] { 54443, 54449, 54457 };
- localObject2 = new int[] { 54444, 54450, 54458 };
- a.Qc = "Killing
- the Gravecreeper!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Gravecreeper";
- }
- if ((a.HC == 2) && (a.kC))
- {
- a.i(1);
- }
- a.PD = (a.xb != -1 ? a.xb : a.Gd);
- a.l(a.QC, a.k ? Combat.Prayer.PROTECT_FROM_MELEE : Combat.Prayer.PROTECT_FROM_MISSILES, true);
- if (a.jA()) {
- return;
- }
- if ((localRSNPC1 = a.i(new String[] { a.tc })) != null)
- {
- RSObject localRSObject1 = a.i
- (localObject2);
- if ((localObject4 = localRSNPC1.getMessage()) != null)
- {
- if (((String)localObject4).equals("Burrrn"))
- {
- a.AB = "Dodging the burn spots!";
- localRSTile1 = localRSNPC1.getLocation();
- a.vE = a.A(localRSTile1, localObject1);
- if
- ((a.vE != null) && (localRSTile1 != null))
- {
- if (a.calc.distanceTo(localRSTile1) < 2)
- {
- a.A(a.vE, 1);
- i7++;
- }
- else if (a.JC())
- {
- i7++;
- }
- a.sleep(400, 500);
- i7++;
- }
- a.AB = "";
- }
- else if (((String)localObject4).contains("Buuu"))
- {
- a.Ic();
- }
- else if (((String)localObject4).contains("Diii"))
- {
- a.Ic();
- }
- else if (((String)localObject4).contains
- ("Braa"))
- {
- a.Ic();
- }
- }
- else if ((localRSObject1 != null) && (a.calc.distanceTo(localRSObject1) < 2))
- {
- a.vE = a.A(localRSNPC1.getLocation(), localObject1);
- if (a.vE != null)
- {
- a.A(a.vE, 1);
- }
- else {
- a.l(a.nb.getCentralTile());
- }
- a.sleep(600, 1000);
- }
- else
- {
- a.i(localRSNPC1);
- a.l(a.lG,
- 50, 0);
- }
- }
- a.sleep(100, 200);
- }
- else
- {
- if ((a.tc.equals("Necrolord")) || (localRSNPC3 != null))
- {
- a.Qc =
- "Killing the Necrolord!";
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Necrolord";
- }
- if (a.HC == 1)
- {
- if (a.Sd)
- {
- a.i(2);
- }
- else if (a.iD)
- {
- a.i(3);
- }
- else
- {
- a.log.severe("We can't kill this boss with melee, aborting dungeon");
- a.Ic += 1;
- a.nc = true;
- return;
- }
- }
- if ((localRSNPC3 != null) && (a.calc.distanceTo(localRSNPC3) > 3))
- {
- a.l(localRSNPC3.getLocation(), 1);
- }
- }
- while (a.objects.getNearest(a.gb) == null)
- {
- localObject1 = a.i(new String[] { "Skeletal minion" });
- a.l(a.QC, (localObject1 != null) &&
- (a.calc.distanceTo((RSCharacter)localObject1) < 4) ? Combat.Prayer.PROTECT_FROM_MELEE : Combat.Prayer.PROTECT_FROM_MAGIC, true);
- if (a.jA()) {
- return;
- }
- if (a.HC == 1)
- {
- a.log.severe("We can't kill this boss with melee, aborting dungeon");
- a.nc = true;
- return;
- }
- if (a.MC)
- {
- a.JC();
- }
- if ((a.F(localRSNPC3)) && (a.HC == 3))
- {
- a.sleep(400,
- 600);
- if (!localRSNPC3.isInCombat()) {
- a.F(a.Qb, "Cast");
- }
- }
- a.l(a.UC, 50, 60);
- a.sleep(200, 400);
- continue;
- if ((a.tc.equals("Flesh-Spoiler Haasghenahk")) || (localRSNPC4 != null))
- {
- a.Qc = "Killing the Flesh-Spoiler!";
- if
- (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Flesh-Spoiler Haasghenahk";
- }
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- a.l(a.QC, null, false);
- }
- while (a.objects.getNearest(a.gb) == null)
- {
- if (a.jA())
- {
- return;
- }
- localRSNPC4 = a.i(new String[] { a.tc });
- if (a.VA) if ((a.i(new String[] { "spawn" }) != null) && (a.skills.getRealLevel(5) > 42)) {
- a.l(a.QC, Combat.Prayer.PROTECT_FROM_MELEE, true);
- }
- if (a.F(localRSNPC4)) {
- a.sleep(800, 1200);
- }
- a.l(a.UC, 50, 50); continue;
- if ((a.tc.equals("Yk'Lagor the Thunderous")) || (localRSNPC5 != null))
- {
- a.Qc = "Killing Yk'Lagor the
- Thunderous!";
- if (a.iD)
- {
- a.i(3);
- }
- if (a.tc.isEmpty())
- {
- a.log(a.Qc);
- a.tc = "Yk'Lagor the Thunderous";
- }
- a.PD = (a.bC != -1 ? a.bC : a.xb);
- localObject1 = new ArrayList();
- int i4 = (localObject2 = a.J(new int[] { 55057 })).length;
- int i5;
- localRSTile1 = localObject2[i5];
- RSTile[] arrayOfRSTile;
- i8 = (arrayOfRSTile = a.h(localRSTile1.getLocation())).length;
- int i10;
- RSTile localRSTile2 = arrayOfRSTile[i10];
- if
- (a.i(localRSTile2))
- {
- ((ArrayList)localObject1).add(localRSTile2);
- }
- else
- {
- i10++;
- }
- i5++;
- a.l(false, Combat.Prayer.PROTECT_FROM_MAGIC, true);
- if (a.i(new String[] { "Mysterious mage" }) != null)
- {
- a.AB = "Freeing Yk'Lagor from the mages";
- a.i(a.nb.getCentralTile(), 2);
- a.A(false);
- if (a.jA())
- {
- return;
- }
- a.vE = a.l(a.X(), (ArrayList)localObject1);
- a.A(a.vE, 0);
- a.K
- (false);
- if (a.F(a.npcs.getNearest(a.CB)))
- {
- a.sleep(600, 800);
- }
- a.l(a.UC, 50, 50);
- a.AB = "";
- if (a.X().equals(a.vE)) {
- a.Ic();
- }
- a.A(true);
- }
- a.l(a.QC,
- a.HC == 1 ? Combat.Prayer.PROTECT_FROM_MELEE : Combat.Prayer.PROTECT_FROM_MAGIC, true);
- if (a.jA())
- {
- return;
- }
- if (
- (localRSNPC5 = a.i(new String[] { a.tc })) != null)
- {
- Object localObject3;
- if ((localObject2
- = localRSNPC5.getMessage()) != null)
- {
- if (((String)localObject2).contains("This is"))
- {
- a.AB =
- "Taking cover from the quake!";
- a.vE = a.l(a.X(), (ArrayList)localObject1);
- localObject3 = new Timer(a.random(3800, 4500));
- if (a.vE != null)
- {
- if ((!a.X().equals(a.vE)) && (!a.AA()))
- {
- if
- (a.jA())
- {
- return;
- }
- a.K(false);
- a.JC();
- }
- if (a.X().equals(a.vE)) {
- a.Ic();
- }
- }
- a.AB = "";
- }
- else if (((String)localObject2).contains("Come"))
- {
- a.AB = "Dodging his grasp!";
- a.vE = a.l(a.X(), (ArrayList)localObject1);
- localObject3 = new Timer(a.random(3500, 4500));
- if (a.vE != null)
- {
- a.md = false;
- if (((Timer)localObject3).isRunning())
- {
- if (a.jA())
- {
- return;
- }
- if (a.md)
- {
- a.log("Damn
- it.. Got sucked in.");
- a.sleep(4000, 6000);
- }
- else
- {
- a.K(false);
- a.JC();
- }
- }
- if (a.X().equals(a.vE)) {
- a.Ic();
- }
- }
- a.AB = "";
- }
- }
- else
- {
- if (!a.Y().isMoving())
- {
- localObject3 = a.l(a.X(), (ArrayList)localObject1);
- if (a.calc.distanceTo((RSTile)
- localObject3) > (a.HC == 1 ? 4 : 3))
- {
- a.l((RSTile)localObject3);
- a.l(false);
- }
- else
- {
- a.i(localRSNPC5);
- }
- }
- else
- {
- a.i(localRSNPC5);
- }
- a.l(a.UC, 50, 40);
- }
- }
- a.sleep(200, 400);
- }
- else
- {
- a.Qc = "Killing an unknown boss...";
- a.log(a.Qc);
- a.l(a.QC, null, false);
- if (a.h())
- {
- break;
- }
- return;
- }
- }
- }
- }
- }
- label3638: a.Ke = true;
- }
- private boolean A()
- {
- if
- (!a.xe)
- {
- a.uC = "Gains Prayer experience";
- a.gE = true;
- return false;
- }
- return true;
- }
- private boolean F()
- {
- if ((a.zB) && (a.nA) &&
- (a.v != -1))
- {
- if ((a.nb == null) && (a.game.getCurrentTab() == 4) && (((a.k) && (a.HC == 1)) || ((a.Xd) && (a.HC == 2)) || ((a.IB) && (a.HC == 3) &&
- (a.inventory.contains(a.Vc))))) {
- a.l(a.Vc, "Wield");
- }
- if (a.HC == 3)
- {
- if (a.Qb < 1)
- {
- a.iD = false;
- a.i(a.bb);
- return false;
- }
- if (a.SE.contains("runes to cast"))
- {
- a.l(a.IB ? a.Vc : a.eB, "Wield");
- if (a.pB > 0)
- {
- a.l(a.pB, "Wield");
- }
- }
- if ((!a.k()) && (a.F(a.Qb, "Autocast")))
- {
- a.sleep(400, 600);
- }
- }
- else if (a.HC ==
- 1)
- {
- if (a.gB)
- {
- if ((a.SD == a.xD) || (a.SD == 3)) {
- a.SD = 1;
- }
- if ((a.combat.getFightMode() == a.xD) ||
- (a.combat.getFightMode() == 3))
- {
- a.A(a.SD);
- a.sleep(400, 600);
- }
- }
- if (a.bc)
- {
- if ((a.gB) &&
- ((a.PD == a.xD) || (a.PD == 3))) {
- a.PD = -1;
- }
- else
- {
- a.A(a.PD != -1 ? a.PD : a.SD);
- }
- }
- else
- {
- a.A(a.v);
- }
- }
- }
- return a.game.getCurrentTab() == 0;
- }
- private boolean l()
- {
- int i1;
- if (
- (i1 = a.inventory.getItemID
- ("Law rune")) > 0) {
- if (a.inventory.getCount(new int[] { i1 }) > 2)
- {
- if (!a.F(40, "Cast")) {
- a.sleep(300, 600);
- }
- a.K(true);
- a.K(true);
- RSGroundItem localRSGroundItem;
- if (((localRSGroundItem = a.groundItems.getNearest(new int[] { 18829 })) != null) &&
- (a.l
- (localRSGroundItem.getLocation(), false))) {
- return true;
- }
- }
- }
- return (a.G(false)) && (a.n());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment