import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.io.IOException; import java.math.BigInteger; import jagex.RawDataOperations; import jagex.client.AudioReader; import jagex.client.GameCamera; import jagex.client.GameConnection; import jagex.client.StreamManager; import jagex.client.g; import jagex.client.h; import jagex.client.i; public class mudclient extends GameConnection { public static void main(String args[]) { mudclient newGame = new mudclient(); newGame.isApplet = false; if(args.length > 0 && args[0].equals("member")) newGame.isMember = true; if(args.length > 1) newGame.gameServer = args[1]; if(args.length > 2) newGame.gamePort = Integer.parseInt(args[2]); newGame.createApplicationWindow(newGame.windowWidth, newGame.windowHeight + 11, "Runescape by mageman", false); newGame.minimumThreadSleepTime = 10; } public void startGame() { // Check to see if applet is being played from correct location if(isApplet) { String s = getDocumentBase().getHost().toLowerCase(); if(!s.endsWith("jagex.com") && !s.endsWith("jagex.co.uk") && !s.endsWith("runescape.com") && !s.endsWith("runescape.co.uk") && !s.endsWith("runescape.net") && !s.endsWith("runescape.org") && !s.endsWith("penguin") && !s.endsWith("puffin")) { playingFromInvalidHost = true; return; } } // Set RSA Keys setRSAKeys(rsaKey1, rsaKey2); // Set XP level values int xpValue = 0; for(int i = 0; i < 99; i++) { int j = i + 1; int xpIncrease = (int)((double)j + 300D * Math.pow(2D, (double)j / 7D)); xpValue += xpIncrease; levelXpValues[i] = xpValue & 0xffffffc; } // Parse member parameter try { String s = getParameter("member"); int i = Integer.parseInt(s); if(i == 1) isMember = true; } catch(Exception e) {} if(isApplet) super.gamePort = 43594; super.mouseYOffset = 0; GameConnection.xc = 1000; GameConnection.clientVersion = GameVersions.CLIENT_VERSION; // Parsing port offset try { String s = getParameter("poff"); int i = Integer.parseInt(s); super.gamePort += i; System.out.println("Offset: "+ i); } catch(Exception e) {} loadConfigData(); hu = 2000; iu = hu + 100; ju = iu + 50; ku = ju + 300; lu = 2510; mu = lu + 10; yt = getGraphics(); pj(50); if(isApplet) { windowWidth = Integer.parseInt(getParameter("w")); windowHeight = Integer.parseInt(getParameter("h")); super.gameServer = getParameter("server"); } gameGraphics = new m(windowWidth, windowHeight + 12, 2700, this); gameGraphics.clientInstance = this; gameGraphics.setSize(0, 0, windowWidth, windowHeight + 12); g.ig = false; g.jg = iu; cy = new g(gameGraphics, 5); int l1 = ((i) (gameGraphics)).yj - 199; byte byte0 = 36; dy = cy.qc(l1, byte0 + 24, 196, 90, 1, 500, true); gy = new g(gameGraphics, 5); hy = gy.qc(l1, byte0 + 40, 196, 126, 1, 500, true); ky = new g(gameGraphics, 5); ly = ky.qc(l1, byte0 + 24, 196, 226, 1, 500, true); loadMediaData(); loadEntityData(); zt = new GameCamera(gameGraphics, 15000, 15000, 1000); zt.ei(windowWidth / 2, windowHeight / 2, windowWidth / 2, windowHeight / 2, windowWidth, gu); zt.im = 2400; zt.jm = 2400; zt.km = 1; zt.lm = 2300; zt.di(-50, -10, -50); wu = new p(zt, gameGraphics); wu.bib = hu; loadTextureData(); loadModelData(); loadMapData(); if(isMember) loadSoundData(); drawLoadingText(100, "Starting game..."); kl(); uk(); ul(); el(); qk(); vj(); vl(); } public void loadConfigData() { byte configData[] = null; try { configData = loadDataFile(gameDataPath +"config"+ GameVersions.CONFIG_VERSION +".jag", "Configuration", 10); } catch(IOException e) { System.out.println("Load error:"+ e); } q.np(configData, isMember); } public void loadMediaData() { byte abyte0[] = null; try { abyte0 = loadDataFile(gameDataPath +"media"+ GameVersions.MEDIA_VERSION +".jag", "2d graphics", 20); } catch(IOException e) { System.out.println("Load error:"+ e); } byte abyte1[] = RawDataOperations.in("index.dat", 0, abyte0); gameGraphics.og(hu, RawDataOperations.in("inv1.dat", 0, abyte0), abyte1, 1); gameGraphics.og(hu + 1, RawDataOperations.in("inv2.dat", 0, abyte0), abyte1, 6); gameGraphics.og(hu + 9, RawDataOperations.in("bubble.dat", 0, abyte0), abyte1, 1); gameGraphics.og(hu + 10, RawDataOperations.in("runescape.dat", 0, abyte0), abyte1, 1); gameGraphics.og(hu + 11, RawDataOperations.in("splat.dat", 0, abyte0), abyte1, 3); gameGraphics.og(hu + 14, RawDataOperations.in("icon.dat", 0, abyte0), abyte1, 8); gameGraphics.og(hu + 22, RawDataOperations.in("hbar.dat", 0, abyte0), abyte1, 1); gameGraphics.og(hu + 23, RawDataOperations.in("hbar2.dat", 0, abyte0), abyte1, 1); gameGraphics.og(hu + 24, RawDataOperations.in("compass.dat", 0, abyte0), abyte1, 1); gameGraphics.og(hu + 25, RawDataOperations.in("buttons.dat", 0, abyte0), abyte1, 2); gameGraphics.og(iu, RawDataOperations.in("scrollbar.dat", 0, abyte0), abyte1, 2); gameGraphics.og(iu + 2, RawDataOperations.in("corners.dat", 0, abyte0), abyte1, 4); gameGraphics.og(iu + 6, RawDataOperations.in("arrows.dat", 0, abyte0), abyte1, 2); gameGraphics.og(ku, RawDataOperations.in("projectile.dat", 0, abyte0), abyte1, q.zlb); int i1 = q.jjb; for(int j1 = 1; i1 > 0; j1++) { int k1 = i1; i1 -= 30; if(k1 > 30) k1 = 30; gameGraphics.og(ju + (j1 - 1) * 30, RawDataOperations.in("objects"+ j1 +".dat", 0, abyte0), abyte1, k1); } gameGraphics.zg(hu); gameGraphics.zg(hu + 9); for(int l1 = 11; l1 <= 26; l1++) gameGraphics.zg(hu + l1); for(int i2 = 0; i2 < q.zlb; i2++) gameGraphics.zg(ku + i2); for(int j2 = 0; j2 < q.jjb; j2++) gameGraphics.zg(ju + j2); } public void loadEntityData() { byte abyte0[] = null; byte abyte1[] = null; try { abyte0 = loadDataFile(gameDataPath +"entity"+ GameVersions.ENTITY_VERSION +".jag", "people and monsters", 30); } catch(IOException e) { System.out.println("Load error:"+ e); } abyte1 = RawDataOperations.in("index.dat", 0, abyte0); byte abyte2[] = null; byte abyte3[] = null; if(isMember) { try { abyte2 = loadDataFile(gameDataPath +"entity"+ GameVersions.ENTITY_VERSION +".mem", "member graphics", 45); } catch(IOException e) { System.out.println("Load error:" + e); } abyte3 = RawDataOperations.in("index.dat", 0, abyte2); } int i1 = 0; ngb = 0; ogb = ngb; label0: for(int j1 = 0; j1 < q.rkb; j1++) { String s1 = q.skb[j1]; for(int k1 = 0; k1 < j1; k1++) { if(!q.skb[k1].equalsIgnoreCase(s1)) continue; q.xkb[j1] = q.xkb[k1]; continue label0; } byte abyte4[] = RawDataOperations.in(s1 + ".dat", 0, abyte0); byte abyte5[] = abyte1; if(abyte4 == null && isMember) { abyte4 = RawDataOperations.in(s1 + ".dat", 0, abyte2); abyte5 = abyte3; } if(abyte4 != null) { gameGraphics.og(ogb, abyte4, abyte5, 15); i1 += 15; if(q.vkb[j1] == 1) { byte abyte6[] = RawDataOperations.in(s1 + "a.dat", 0, abyte0); byte abyte8[] = abyte1; if(abyte6 == null && isMember) { abyte6 = RawDataOperations.in(s1 + "a.dat", 0, abyte2); abyte8 = abyte3; } gameGraphics.og(ogb + 15, abyte6, abyte8, 3); i1 += 3; } if(q.wkb[j1] == 1) { byte abyte7[] = RawDataOperations.in(s1 + "f.dat", 0, abyte0); byte abyte9[] = abyte1; if(abyte7 == null && isMember) { abyte7 = RawDataOperations.in(s1 + "f.dat", 0, abyte2); abyte9 = abyte3; } gameGraphics.og(ogb + 18, abyte7, abyte9, 9); i1 += 9; } if(q.ukb[j1] != 0) { for(int l1 = ogb; l1 < ogb + 27; l1++) gameGraphics.zg(l1); } } q.xkb[j1] = ogb; ogb += 27; } System.out.println("Loaded: " + i1 + " frames of animation"); } public void loadTextureData() { byte abyte0[] = null; try { abyte0 = loadDataFile(gameDataPath +"textures"+ GameVersions.TEXTURES_VERSION +".jag", "Textures", 50); } catch(IOException e) { System.out.println("Load error:" + e); } byte abyte1[] = RawDataOperations.in("index.dat", 0, abyte0); zt.ui(q.okb, 7, 11); for(int i1 = 0; i1 < q.okb; i1++) { String s1 = q.pkb[i1]; byte abyte2[] = RawDataOperations.in(s1 + ".dat", 0, abyte0); gameGraphics.og(lu, abyte2, abyte1, 1); gameGraphics.yf(0, 0, 128, 128, 0xff00ff); gameGraphics.xg(0, 0, lu); int j1 = ((i) (gameGraphics)).pk[lu]; String s2 = q.qkb[i1]; if(s2 != null && s2.length() > 0) { byte abyte3[] = RawDataOperations.in(s2 + ".dat", 0, abyte0); gameGraphics.og(lu, abyte3, abyte1, 1); gameGraphics.xg(0, 0, lu); } gameGraphics.rf(mu + i1, 0, 0, j1, j1); int k1 = j1 * j1; for(int l1 = 0; l1 < k1; l1++) if(((i) (gameGraphics)).ik[mu + i1][l1] == 65280) ((i) (gameGraphics)).ik[mu + i1][l1] = 0xff00ff; gameGraphics.fg(mu + i1); zt.vh(i1, ((i) (gameGraphics)).jk[mu + i1], ((i) (gameGraphics)).kk[mu + i1], j1 / 64 - 1); } } public void loadModelData() { q.op("torcha2"); q.op("torcha3"); q.op("torcha4"); q.op("skulltorcha2"); q.op("skulltorcha3"); q.op("skulltorcha4"); q.op("firea2"); q.op("firea3"); q.op("fireplacea2"); q.op("fireplacea3"); // Changed isApplet() to true if(true) { byte abyte0[] = null; try { // Added gameDataPath to beginning of models path abyte0 = loadDataFile(gameDataPath +"models"+ GameVersions.MODELS_VERSION +".jag", "3d models", 60); } catch(IOException e) { System.out.println("Load error:" + e); } for(int j1 = 0; j1 < q.rmb; j1++) { int k1 = RawDataOperations.kn(q.smb[j1] + ".ob3", abyte0); if(k1 != 0) ax[j1] = new h(abyte0, k1, true); else ax[j1] = new h(1, 1); if(q.smb[j1].equals("giantcrystal")) ax[j1].th = true; } return; } drawLoadingText(70, "Loading 3d models"); for(int i1 = 0; i1 < q.rmb; i1++) { ax[i1] = new h("../gamedata/models/" + q.smb[i1] + ".ob2"); if(q.smb[i1].equals("giantcrystal")) ax[i1].th = true; } } public void loadMapData() { try { wu.kib = loadDataFile(gameDataPath +"maps"+ GameVersions.MAP_VERSION +".jag", "map", 70); if(isMember) wu.mib = loadDataFile(gameDataPath +"maps"+ GameVersions.MAP_VERSION +".mem", "members map", 75); wu.jib = loadDataFile(gameDataPath +"land"+ GameVersions.MAP_VERSION +".jag", "landscape", 80); if(isMember) { wu.lib = loadDataFile(gameDataPath +"land"+ GameVersions.MAP_VERSION +".mem", "members landscape", 85); return; } } catch(IOException e) { System.out.println("Load error:"+ e); } } public void loadSoundData() { try { loadedSoundData = loadDataFile(gameDataPath +"sounds"+ GameVersions.SOUNDS_VERSION +".mem", "Sound effects", 90); audioReader = new AudioReader(); return; } catch(Throwable t) { System.out.println("Unable to init sounds:"+ t); } } public void kl() { pz = new g(gameGraphics, 10); qz = pz.dc(5, 269, 502, 56, 1, 20, true); rz = pz.ec(7, 324, 498, 14, 1, 80, false, true); sz = pz.dc(5, 269, 502, 56, 1, 20, true); tz = pz.dc(5, 269, 502, 56, 1, 20, true); pz.nc(rz); } public void hj() { if(playingFromInvalidHost) return; if(outOfMemory) return; try { kt++; if(loggedIn == 0) { super.wp = 0; il(); } if(loggedIn == 1) { super.wp++; qm(); } super.uq = 0; super.wq = 0; xt++; if(xt > 500) { xt = 0; int i1 = (int)(Math.random() * 4D); if((i1 & 1) == 1) tt += ut; if((i1 & 2) == 2) vt += wt; } if(tt < -50) ut = 2; if(tt > 50) ut = -2; if(vt < -50) wt = 2; if(vt > 50) wt = -2; if(lz > 0) lz--; if(mz > 0) mz--; if(nz > 0) nz--; if(oz > 0) { oz--; return; } } catch(OutOfMemoryError e) { garbageCollector(); outOfMemory = true; } } public void nj() { if(playingFromInvalidHost) { Graphics g = getGraphics(); g.setColor(Color.black); g.fillRect(0, 0, 512, 356); g.setFont(new Font("Helvetica", 1, 20)); g.setColor(Color.white); g.drawString("Error - unable to load game!", 50, 50); g.drawString("To play RuneScape make sure you play from", 50, 100); g.drawString("http://www.runescape.com", 50, 150); pj(1); return; } if(outOfMemory) { Graphics g = getGraphics(); g.setColor(Color.black); g.fillRect(0, 0, 512, 356); g.setFont(new Font("Helvetica", 1, 20)); g.setColor(Color.white); g.drawString("Error - out of memory!", 50, 50); g.drawString("Close ALL unnecessary programs", 50, 100); g.drawString("and windows before loading the game", 50, 150); g.drawString("RuneScape needs about 48meg of spare RAM", 50, 200); pj(1); return; } try { if(loggedIn == 0) { gameGraphics.al = false; rm(); } if(loggedIn == 1) { gameGraphics.al = true; yk(); return; } } catch(OutOfMemoryError e) { garbageCollector(); outOfMemory = true; } } public void shutdownClient() { requestLogout(); garbageCollector(); if(audioReader != null) audioReader.stopAudioPlayer(); } public void garbageCollector() { try { if(gameGraphics != null) { gameGraphics.jg(); gameGraphics.ek = null; gameGraphics = null; } if(zt != null) { zt.si(); zt = null; } ax = null; vw = null; ex = null; yv = null; zv = null; jw = null; kw = null; myPlayer = null; if(wu != null) { wu.djb = null; wu.ejb = null; wu.fjb = null; wu.gjb = null; wu = null; } System.gc(); return; } catch(Exception exception) { return; } } public void uj(int i1) { if(loggedIn == 0) { if(jdb == 0) kdb.od(i1); if(jdb == 1) ndb.od(i1); if(jdb == 2) wdb.od(i1); if(jdb == 3) lfb.od(i1); } if(loggedIn == 1) { if(qgb) { jeb.od(i1); return; } if(zeb) { if(dfb == -1) afb.od(i1); return; } if(scb == 0 && rcb == 0) pz.od(i1); if(scb == 3 || scb == 4 || scb == 5) scb = 0; } } public void ij(int i1, int j1, int k1) { rt[qt] = j1; st[qt] = k1; qt = qt + 1 & 0x1fff; for(int l1 = 10; l1 < 4000; l1++) { int i2 = qt - l1 & 0x1fff; if(rt[i2] == j1 && st[i2] == k1) { boolean flag = false; for(int j2 = 1; j2 < l1; j2++) { int k2 = qt - j2 & 0x1fff; int l2 = i2 - j2 & 0x1fff; if(rt[l2] != j1 || st[l2] != k1) flag = true; if(rt[k2] != rt[l2] || st[k2] != st[l2]) break; if(j2 == l1 - 1 && flag && fdb == 0 && edb == 0) { gm(); return; } } } } } public void qk() { loggedIn = 0; jdb = 0; heb = ""; ieb = ""; feb = "Please enter a username:"; geb = "*" + heb + "*"; vv = 0; hw = 0; } public void wl() { super.ar = ""; super.br = ""; } public void gm() { if(loggedIn == 0) return; if(fdb > 450) { displayMessage("@cya@You can't logout during combat!", 3); return; } if(fdb > 0) { displayMessage("@cya@You can't logout for 10 seconds after combat", 3); return; } else { super.streamManager.createPacket(6); super.streamManager.formatPacket(); edb = 1000; return; } } public void playAudio(String s1) { if(audioReader == null) return; if(uy) { return; } else { audioReader.loadAudioData(loadedSoundData, RawDataOperations.kn(s1 + ".pcm", loadedSoundData), RawDataOperations._mthdo(s1 + ".pcm", loadedSoundData)); return; } } public void ul() { afb = new g(gameGraphics, 100); int i1 = 8; bfb = afb.jd(256, i1, "@yel@Please provide 5 security questions in case you lose your password", 1, true); i1 += 22; afb.jd(256, i1, "If you ever lose your password, you will need these to prove you own your account.", 1, true); i1 += 13; afb.jd(256, i1, "Your answers are encrypted and are ONLY used for password recovery purposes.", 1, true); i1 += 22; afb.jd(256, i1, "@ora@IMPORTANT:@whi@ To recover your password you must give the EXACT same answers you", 1, true); i1 += 13; afb.jd(256, i1, "give here. If you think you might forget an answer, or someone else could guess the", 1, true); i1 += 13; afb.jd(256, i1, "answer, then press the 'different question' button to get a better question.", 1, true); i1 += 35; for(int j1 = 0; j1 < 5; j1++) { afb.ad(170, i1, 310, 30); jfb[j1] = "~:" + ifb[j1]; efb[j1] = afb.jd(170, i1 - 7, (j1 + 1) + ": " + recoveryQuestions[ifb[j1]], 1, true); ffb[j1] = afb.yc(170, i1 + 7, 310, 30, 1, 80, false, true); afb.ad(370, i1, 80, 30); afb.jd(370, i1 - 7, "Different", 1, true); afb.jd(370, i1 + 7, "Question", 1, true); gfb[j1] = afb.md(370, i1, 80, 30); afb.ad(455, i1, 80, 30); afb.jd(455, i1 - 7, "Enter own", 1, true); afb.jd(455, i1 + 7, "Question", 1, true); hfb[j1] = afb.md(455, i1, 80, 30); i1 += 35; } afb.nc(ffb[0]); i1 += 10; afb.ad(256, i1, 250, 30); afb.jd(256, i1, "Click here when finished", 4, true); cfb = afb.md(256, i1, 250, 30); } public void rk() { if(dfb != -1) { if(super.br.length() > 0) { jfb[dfb] = super.br; afb.kd(efb[dfb], (dfb + 1) + ": " + jfb[dfb]); afb.kd(ffb[dfb], ""); dfb = -1; } return; } afb.pd(super.mouseX, super.mouseY, super.uq, super.tq); for(int i1 = 0; i1 < 5; i1++) if(afb.rd(gfb[i1])) { for(boolean flag = false; !flag;) { ifb[i1] = (ifb[i1] + 1) % recoveryQuestions.length; flag = true; for(int k1 = 0; k1 < 5; k1++) if(k1 != i1 && ifb[k1] == ifb[i1]) flag = false; } jfb[i1] = "~:" + ifb[i1]; afb.kd(efb[i1], (i1 + 1) + ": " + recoveryQuestions[ifb[i1]]); afb.kd(ffb[i1], ""); } for(int j1 = 0; j1 < 5; j1++) if(afb.rd(hfb[j1])) { dfb = j1; super.ar = ""; super.br = ""; } if(afb.rd(cfb)) { for(int l1 = 0; l1 < 5; l1++) { String s1 = afb.pc(ffb[l1]); if(s1 == null || s1.length() < 3) { afb.kd(bfb, "@yel@Please provide a longer answer to question: " + (l1 + 1)); return; } } for(int i2 = 0; i2 < 5; i2++) { String s2 = afb.pc(ffb[i2]); for(int k2 = 0; k2 < i2; k2++) { String s4 = afb.pc(ffb[k2]); if(s2.equalsIgnoreCase(s4)) { afb.kd(bfb, "@yel@Each question must have a different answer"); return; } } } super.streamManager.createPacket(208); for(int j2 = 0; j2 < 5; j2++) { String s3 = jfb[j2]; if(s3 == null || s3.length() == 0) s3 = String.valueOf(j2 + 1); if(s3.length() > 50) s3 = s3.substring(0, 50); super.streamManager.writeByte(s3.length()); super.streamManager.writeString(s3); super.streamManager.ub(RawDataOperations.sn(afb.pc(ffb[j2])), super.currentSessionId, rsaKey1, rsaKey2); } super.streamManager.formatPacket(); for(int l2 = 0; l2 < 5; l2++) { ifb[l2] = l2; jfb[l2] = "~:" + ifb[l2]; afb.kd(ffb[l2], ""); afb.kd(efb[l2], (l2 + 1) + ": " + recoveryQuestions[ifb[l2]]); } gameGraphics.lf(); zeb = false; } } public void fk() { gameGraphics.wk = false; gameGraphics.lf(); afb.hc(); if(dfb != -1) { int i1 = 150; gameGraphics.yf(26, i1, 460, 60, 0); gameGraphics.qf(26, i1, 460, 60, 0xffffff); i1 += 22; gameGraphics.ug("Please enter your question", 256, i1, 4, 0xffffff); i1 += 25; gameGraphics.ug(super.ar + "*", 256, i1, 4, 0xffffff); } gameGraphics.xg(0, windowHeight, hu + 22); gameGraphics.jf(yt, 0, 0); } public void el() { lfb = new g(gameGraphics, 100); int i1 = 10; mfb = lfb.jd(256, i1, "@yel@To prove this is your account please provide the answers to", 1, true); i1 += 15; nfb = lfb.jd(256, i1, "@yel@your security questions. You will then be able to reset your password", 1, true); i1 += 35; for(int j1 = 0; j1 < 5; j1++) { lfb.ad(256, i1, 410, 30); wfb[j1] = lfb.jd(256, i1 - 7, (j1 + 1) + ": question?", 1, true); xfb[j1] = lfb.yc(256, i1 + 7, 310, 30, 1, 80, true, true); i1 += 35; } lfb.nc(xfb[0]); lfb.ad(256, i1, 410, 30); lfb.jd(256, i1 - 7, "If you know it, enter a previous password used on this account", 1, true); ofb = lfb.yc(256, i1 + 7, 310, 30, 1, 80, true, true); i1 += 35; lfb.ad(151, i1, 200, 30); lfb.jd(151, i1 - 7, "Choose a NEW password", 1, true); pfb = lfb.yc(146, i1 + 7, 200, 30, 1, 80, true, true); lfb.ad(361, i1, 200, 30); lfb.jd(361, i1 - 7, "Confirm new password", 1, true); qfb = lfb.yc(366, i1 + 7, 200, 30, 1, 80, true, true); i1 += 35; lfb.ad(201, i1, 100, 30); lfb.jd(201, i1, "Submit", 4, true); rfb = lfb.md(201, i1, 100, 30); lfb.ad(311, i1, 100, 30); lfb.jd(311, i1, "Cancel", 4, true); sfb = lfb.md(311, i1, 100, 30); } public void fl(boolean flag) { jeb = new g(gameGraphics, 100); jeb.jd(256, 10, "Design Your Character", 4, true); int i1 = 140; int j1 = 34; if(flag) { i1 += 116; j1 -= 10; } else { jeb.ad(i1, j1, 200, 25); jeb.jd(i1, j1, "Appearance", 4, false); j1 += 15; } jeb.jd(i1 - 55, j1 + 110, "Front", 3, true); jeb.jd(i1, j1 + 110, "Side", 3, true); jeb.jd(i1 + 55, j1 + 110, "Back", 3, true); byte byte0 = 54; j1 += 145; jeb.jc(i1 - byte0, j1, 53, 41); jeb.jd(i1 - byte0, j1 - 8, "Head", 1, true); jeb.jd(i1 - byte0, j1 + 8, "Type", 1, true); jeb.lc(i1 - byte0 - 40, j1, g.jg + 7); keb = jeb.md(i1 - byte0 - 40, j1, 20, 20); jeb.lc((i1 - byte0) + 40, j1, g.jg + 6); leb = jeb.md((i1 - byte0) + 40, j1, 20, 20); jeb.jc(i1 + byte0, j1, 53, 41); jeb.jd(i1 + byte0, j1 - 8, "Hair", 1, true); jeb.jd(i1 + byte0, j1 + 8, "Color", 1, true); jeb.lc((i1 + byte0) - 40, j1, g.jg + 7); meb = jeb.md((i1 + byte0) - 40, j1, 20, 20); jeb.lc(i1 + byte0 + 40, j1, g.jg + 6); neb = jeb.md(i1 + byte0 + 40, j1, 20, 20); j1 += 50; jeb.jc(i1 - byte0, j1, 53, 41); jeb.jd(i1 - byte0, j1, "Gender", 1, true); jeb.lc(i1 - byte0 - 40, j1, g.jg + 7); oeb = jeb.md(i1 - byte0 - 40, j1, 20, 20); jeb.lc((i1 - byte0) + 40, j1, g.jg + 6); peb = jeb.md((i1 - byte0) + 40, j1, 20, 20); jeb.jc(i1 + byte0, j1, 53, 41); jeb.jd(i1 + byte0, j1 - 8, "Top", 1, true); jeb.jd(i1 + byte0, j1 + 8, "Color", 1, true); jeb.lc((i1 + byte0) - 40, j1, g.jg + 7); qeb = jeb.md((i1 + byte0) - 40, j1, 20, 20); jeb.lc(i1 + byte0 + 40, j1, g.jg + 6); reb = jeb.md(i1 + byte0 + 40, j1, 20, 20); j1 += 50; jeb.jc(i1 - byte0, j1, 53, 41); jeb.jd(i1 - byte0, j1 - 8, "Skin", 1, true); jeb.jd(i1 - byte0, j1 + 8, "Color", 1, true); jeb.lc(i1 - byte0 - 40, j1, g.jg + 7); seb = jeb.md(i1 - byte0 - 40, j1, 20, 20); jeb.lc((i1 - byte0) + 40, j1, g.jg + 6); teb = jeb.md((i1 - byte0) + 40, j1, 20, 20); jeb.jc(i1 + byte0, j1, 53, 41); jeb.jd(i1 + byte0, j1 - 8, "Bottom", 1, true); jeb.jd(i1 + byte0, j1 + 8, "Color", 1, true); jeb.lc((i1 + byte0) - 40, j1, g.jg + 7); ueb = jeb.md((i1 + byte0) - 40, j1, 20, 20); jeb.lc(i1 + byte0 + 40, j1, g.jg + 6); veb = jeb.md(i1 + byte0 + 40, j1, 20, 20); if(!flag) { i1 = 372; j1 = 35; jeb.ad(i1, j1, 200, 25); jeb.jd(i1, j1, "Character Type", 4, false); j1 += 22; jeb.jd(i1, j1, "Each character type has different starting", 0, true); j1 += 13; jeb.jd(i1, j1, "bonuses. But the choice you make here", 0, true); j1 += 13; jeb.jd(i1, j1, "isn't permanent, and will change depending", 0, true); j1 += 13; jeb.jd(i1, j1, "on how you play the game.", 0, true); j1 += 73; jeb.jc(i1, j1, 215, 125); String characterTypes[] = { "Adventurer", "Warrior", "Wizard", "Ranger", "Miner" }; xeb = jeb.cc(i1, j1 + 2, characterTypes, 3, true); } j1 += 82; if(flag) j1 -= 35; jeb.ad(i1, j1, 200, 30); if(!flag) jeb.jd(i1, j1, "Start Game", 4, false); else jeb.jd(i1, j1, "Accept", 4, false); web = jeb.md(i1, j1, 200, 30); } public void jk() { gameGraphics.wk = false; gameGraphics.lf(); jeb.hc(); int i1 = 140; int j1 = 50; if(rgb) { i1 += 116; j1 -= 25; } gameGraphics.mg(i1 - 32 - 55, j1, 64, 102, q.xkb[ugb], ahb[xgb]); gameGraphics.wf(i1 - 32 - 55, j1, 64, 102, q.xkb[tgb], ahb[wgb], chb[ygb], 0, false); gameGraphics.wf(i1 - 32 - 55, j1, 64, 102, q.xkb[sgb], bhb[vgb], chb[ygb], 0, false); gameGraphics.mg(i1 - 32, j1, 64, 102, q.xkb[ugb] + 6, ahb[xgb]); gameGraphics.wf(i1 - 32, j1, 64, 102, q.xkb[tgb] + 6, ahb[wgb], chb[ygb], 0, false); gameGraphics.wf(i1 - 32, j1, 64, 102, q.xkb[sgb] + 6, bhb[vgb], chb[ygb], 0, false); gameGraphics.mg((i1 - 32) + 55, j1, 64, 102, q.xkb[ugb] + 12, ahb[xgb]); gameGraphics.wf((i1 - 32) + 55, j1, 64, 102, q.xkb[tgb] + 12, ahb[wgb], chb[ygb], 0, false); gameGraphics.wf((i1 - 32) + 55, j1, 64, 102, q.xkb[sgb] + 12, bhb[vgb], chb[ygb], 0, false); gameGraphics.xg(0, windowHeight, hu + 22); gameGraphics.jf(yt, 0, 0); } public void vk() { jeb.pd(super.mouseX, super.mouseY, super.uq, super.tq); if(jeb.rd(keb)) do sgb = ((sgb - 1) + q.rkb) % q.rkb; while((q.ukb[sgb] & 3) != 1 || (q.ukb[sgb] & 4 * zgb) == 0); if(jeb.rd(leb)) do sgb = (sgb + 1) % q.rkb; while((q.ukb[sgb] & 3) != 1 || (q.ukb[sgb] & 4 * zgb) == 0); if(jeb.rd(meb)) vgb = ((vgb - 1) + bhb.length) % bhb.length; if(jeb.rd(neb)) vgb = (vgb + 1) % bhb.length; if(jeb.rd(oeb) || jeb.rd(peb)) { for(zgb = 3 - zgb; (q.ukb[sgb] & 3) != 1 || (q.ukb[sgb] & 4 * zgb) == 0; sgb = (sgb + 1) % q.rkb); for(; (q.ukb[tgb] & 3) != 2 || (q.ukb[tgb] & 4 * zgb) == 0; tgb = (tgb + 1) % q.rkb); } if(jeb.rd(qeb)) wgb = ((wgb - 1) + ahb.length) % ahb.length; if(jeb.rd(reb)) wgb = (wgb + 1) % ahb.length; if(jeb.rd(seb)) ygb = ((ygb - 1) + chb.length) % chb.length; if(jeb.rd(teb)) ygb = (ygb + 1) % chb.length; if(jeb.rd(ueb)) xgb = ((xgb - 1) + ahb.length) % ahb.length; if(jeb.rd(veb)) xgb = (xgb + 1) % ahb.length; if(jeb.rd(web)) { super.streamManager.createPacket(236); super.streamManager.writeByte(zgb); super.streamManager.writeByte(sgb); super.streamManager.writeByte(tgb); super.streamManager.writeByte(ugb); super.streamManager.writeByte(vgb); super.streamManager.writeByte(wgb); super.streamManager.writeByte(xgb); super.streamManager.writeByte(ygb); super.streamManager.writeByte(jeb.tc(xeb)); super.streamManager.formatPacket(); gameGraphics.lf(); qgb = false; } } public void uk() { kdb = new g(gameGraphics, 50); int i1 = 40; if(!isMember) { kdb.jd(256, 200 + i1, "Click on an option", 5, true); kdb.ad(156, 240 + i1, 120, 35); kdb.ad(356, 240 + i1, 120, 35); kdb.jd(156, 240 + i1, "New User", 5, false); kdb.jd(356, 240 + i1, "Existing User", 5, false); ldb = kdb.md(156, 240 + i1, 120, 35); mdb = kdb.md(356, 240 + i1, 120, 35); } else { kdb.jd(256, 200 + i1, "Welcome to RuneScape", 4, true); kdb.jd(256, 215 + i1, "You need a member account to use this server", 4, true); kdb.ad(256, 250 + i1, 200, 35); kdb.jd(256, 250 + i1, "Click here to login", 5, false); mdb = kdb.md(256, 250 + i1, 200, 35); } ndb = new g(gameGraphics, 50); i1 = 70; odb = ndb.jd(256, i1 + 8, "To create an account please enter all the requested details", 4, true); i1 += 25; ndb.ad(256, i1 + 17, 250, 34); ndb.jd(256, i1 + 8, "Choose a Username", 4, false); sdb = ndb.yc(256, i1 + 25, 200, 40, 4, 12, false, false); ndb.nc(sdb); i1 += 40; ndb.ad(141, i1 + 17, 220, 34); ndb.jd(141, i1 + 8, "Choose a Password", 4, false); tdb = ndb.yc(141, i1 + 25, 220, 40, 4, 20, true, false); ndb.ad(371, i1 + 17, 220, 34); ndb.jd(371, i1 + 8, "Confirm Password", 4, false); udb = ndb.yc(371, i1 + 25, 220, 40, 4, 20, true, false); i1 += 40; i1 += 20; vdb = ndb.sc(60, i1, 14); ndb.kc(75, i1, "I have read and agree to the terms+conditions listed at:", 4, true); i1 += 15; ndb.jd(256, i1, "http://www.runescape.com/runeterms.html", 4, true); i1 += 20; ndb.ad(156, i1 + 17, 150, 34); ndb.jd(156, i1 + 17, "Submit", 5, false); rdb = ndb.md(156, i1 + 17, 150, 34); ndb.ad(356, i1 + 17, 150, 34); ndb.jd(356, i1 + 17, "Cancel", 5, false); qdb = ndb.md(356, i1 + 17, 150, 34); wdb = new g(gameGraphics, 50); i1 = 230; xdb = wdb.jd(256, i1 - 10, "Please enter your username and password", 4, true); i1 += 28; wdb.ad(140, i1, 200, 40); wdb.jd(140, i1 - 10, "Username:", 4, false); ydb = wdb.yc(140, i1 + 10, 200, 40, 4, 12, false, false); i1 += 47; wdb.ad(190, i1, 200, 40); wdb.jd(190, i1 - 10, "Password:", 4, false); zdb = wdb.yc(190, i1 + 10, 200, 40, 4, 20, true, false); i1 -= 55; wdb.ad(410, i1, 120, 25); wdb.jd(410, i1, "Ok", 4, false); aeb = wdb.md(410, i1, 120, 25); i1 += 30; wdb.ad(410, i1, 120, 25); wdb.jd(410, i1, "Cancel", 4, false); beb = wdb.md(410, i1, 120, 25); i1 += 30; wdb.ad(410, i1, 160, 25); wdb.jd(410, i1, "I've lost my password", 4, false); ceb = wdb.md(410, i1, 160, 25); wdb.nc(ydb); } public void rm() { vcb = false; gameGraphics.wk = false; gameGraphics.lf(); if(jdb == 0 || jdb == 2) { int i1 = (kt * 2) % 3072; if(i1 < 1024) { gameGraphics.xg(0, 10, 2500); if(i1 > 768) gameGraphics.qg(0, 10, 2501, i1 - 768); } else if(i1 < 2048) { gameGraphics.xg(0, 10, 2501); if(i1 > 1792) gameGraphics.qg(0, 10, hu + 10, i1 - 1792); } else { gameGraphics.xg(0, 10, hu + 10); if(i1 > 2816) gameGraphics.qg(0, 10, 2500, i1 - 2816); } } if(jdb == 0) kdb.hc(); if(jdb == 1) ndb.hc(); if(jdb == 2) wdb.hc(); if(jdb == 3) lfb.hc(); gameGraphics.xg(0, windowHeight, hu + 22); gameGraphics.jf(yt, 0, 0); } public void vl() { int i1 = 0; byte byte0 = 50; byte byte1 = 50; wu.xo(byte0 * 48 + 23, byte1 * 48 + 23, i1); wu.qo(ax); char c1 = '\u2600'; char c2 = '\u1900'; char c3 = '\u044C'; char c4 = '\u0378'; zt.im = 4100; zt.jm = 4100; zt.km = 1; zt.lm = 4000; zt.ai(c1, -wu.oo(c1, c2), c2, 912, c4, 0, c3 * 2); zt.wi(); gameGraphics.ff(); gameGraphics.ff(); gameGraphics.yf(0, 0, 512, 6, 0); for(int j1 = 6; j1 >= 1; j1--) gameGraphics.sg(0, j1, 0, j1, 512, 8); gameGraphics.yf(0, 194, 512, 20, 0); for(int k1 = 6; k1 >= 1; k1--) gameGraphics.sg(0, k1, 0, 194 - k1, 512, 8); gameGraphics.xg(15, 15, hu + 10); gameGraphics.rf(2500, 0, 0, 512, 200); gameGraphics.fg(2500); c1 = '\u2400'; c2 = '\u2400'; c3 = '\u044C'; c4 = '\u0378'; zt.im = 4100; zt.jm = 4100; zt.km = 1; zt.lm = 4000; zt.ai(c1, -wu.oo(c1, c2), c2, 912, c4, 0, c3 * 2); zt.wi(); gameGraphics.ff(); gameGraphics.ff(); gameGraphics.yf(0, 0, 512, 6, 0); for(int l1 = 6; l1 >= 1; l1--) gameGraphics.sg(0, l1, 0, l1, 512, 8); gameGraphics.yf(0, 194, 512, 20, 0); for(int i2 = 6; i2 >= 1; i2--) gameGraphics.sg(0, i2, 0, 194 - i2, 512, 8); gameGraphics.xg(15, 15, hu + 10); gameGraphics.rf(2501, 0, 0, 512, 200); gameGraphics.fg(2501); for(int j2 = 0; j2 < 64; j2++) { zt.zh(wu.fjb[0][j2]); zt.zh(wu.ejb[1][j2]); zt.zh(wu.fjb[1][j2]); zt.zh(wu.ejb[2][j2]); zt.zh(wu.fjb[2][j2]); } c1 = '\u2B80'; c2 = '\u2880'; c3 = '\u01F4'; c4 = '\u0178'; zt.im = 4100; zt.jm = 4100; zt.km = 1; zt.lm = 4000; zt.ai(c1, -wu.oo(c1, c2), c2, 912, c4, 0, c3 * 2); zt.wi(); gameGraphics.ff(); gameGraphics.ff(); gameGraphics.yf(0, 0, 512, 6, 0); for(int k2 = 6; k2 >= 1; k2--) gameGraphics.sg(0, k2, 0, k2, 512, 8); gameGraphics.yf(0, 194, 512, 20, 0); for(int l2 = 6; l2 >= 1; l2--) gameGraphics.sg(0, l2, 0, 194, 512, 8); gameGraphics.xg(15, 15, hu + 10); gameGraphics.rf(hu + 10, 0, 0, 512, 200); gameGraphics.fg(hu + 10); } public void il() { if(super.sd > 0) super.sd--; if(jdb == 0) { kdb.pd(super.mouseX, super.mouseY, super.uq, super.tq); if(kdb.rd(ldb)) { jdb = 1; ndb.kd(sdb, ""); ndb.kd(tdb, ""); ndb.kd(udb, ""); ndb.nc(sdb); ndb.vc(vdb, 0); ndb.kd(odb, "To create an account please enter all the requested details"); } if(kdb.rd(mdb)) { jdb = 2; wdb.kd(xdb, "Please enter your username and password"); wdb.kd(ydb, ""); wdb.kd(zdb, ""); wdb.nc(ydb); return; } } else if(jdb == 1) { ndb.pd(super.mouseX, super.mouseY, super.uq, super.tq); if(ndb.rd(sdb)) ndb.nc(tdb); if(ndb.rd(tdb)) ndb.nc(udb); if(ndb.rd(udb)) ndb.nc(sdb); if(ndb.rd(qdb)) jdb = 0; if(ndb.rd(rdb)) { if(ndb.pc(sdb) == null || ndb.pc(sdb).length() == 0 || ndb.pc(tdb) == null || ndb.pc(tdb).length() == 0) { ndb.kd(odb, "@yel@Please fill in ALL requested information to continue!"); return; } if(!ndb.pc(tdb).equalsIgnoreCase(ndb.pc(udb))) { ndb.kd(odb, "@yel@The two passwords entered are not the same as each other!"); return; } if(ndb.pc(tdb).length() < 5) { ndb.kd(odb, "@yel@Your password must be at least 5 letters long"); return; } if(ndb.tc(vdb) == 0) { ndb.kd(odb, "@yel@You must agree to the terms+conditions to continue"); return; } else { ndb.kd(odb, "Please wait... Creating new account"); rm(); tj(); String s1 = ndb.pc(sdb); String s3 = ndb.pc(tdb); m(s1, s3); return; } } } else if(jdb == 2) { wdb.pd(super.mouseX, super.mouseY, super.uq, super.tq); if(wdb.rd(beb)) jdb = 0; if(wdb.rd(ydb)) wdb.nc(zdb); if(wdb.rd(zdb) || wdb.rd(aeb)) { heb = wdb.pc(ydb); ieb = wdb.pc(zdb); logIn(heb, ieb, false); } if(wdb.rd(ceb)) { heb = wdb.pc(ydb); heb = RawDataOperations.bo(heb, 20); if(heb.trim().length() == 0) { displayLoginScreenMessage("You must enter your username to recover your password", ""); return; } displayLoginScreenMessage(GameConnection.loginMessages[6], GameConnection.loginMessages[7]); try { if(isApplet()) super.streamManager = new StreamManager(super.gameServer, this, super.gamePort); else super.streamManager = new StreamManager(super.gameServer, null, super.gamePort); super.streamManager.oe = GameConnection.xc; super.streamManager.readSessionId(); super.streamManager.createPacket(4); super.streamManager.writeQWord(RawDataOperations.stringToLongHash(heb)); super.streamManager.mb(); super.streamManager.readWord(); int i1 = super.streamManager.readInputStream(); System.out.println("Getpq response: " + i1); if(i1 == 0) { displayLoginScreenMessage("Sorry, the recovery questions for this user have not been set", ""); return; } for(int j1 = 0; j1 < 5; j1++) { int k1 = super.streamManager.readInputStream(); byte abyte0[] = new byte[5000]; super.streamManager.readBytes(k1, abyte0); String s6 = new String(abyte0, 0, k1); if(s6.startsWith("~:")) { s6 = s6.substring(2); int j2 = 0; try { j2 = Integer.parseInt(s6); } catch(Exception exception2) { } s6 = recoveryQuestions[j2]; } lfb.kd(wfb[j1], s6); } if(kfb) { displayLoginScreenMessage("Sorry, you have already attempted 1 recovery, try again later", ""); return; } jdb = 3; lfb.kd(mfb, "@yel@To prove this is your account please provide the answers to"); lfb.kd(nfb, "@yel@your security questions. You will then be able to reset your password"); for(int l1 = 0; l1 < 5; l1++) lfb.kd(xfb[l1], ""); lfb.kd(ofb, ""); lfb.kd(pfb, ""); lfb.kd(qfb, ""); return; } catch(Exception exception) { displayLoginScreenMessage(GameConnection.loginMessages[12], GameConnection.loginMessages[13]); } return; } } else if(jdb == 3) { lfb.pd(super.mouseX, super.mouseY, super.uq, super.tq); if(lfb.rd(rfb)) { String s2 = lfb.pc(pfb); String s4 = lfb.pc(qfb); if(!s2.equalsIgnoreCase(s4)) { displayLoginScreenMessage("@yel@The two new passwords entered are not the same as each other!", ""); return; } if(s2.length() < 5) { displayLoginScreenMessage("@yel@Your new password must be at least 5 letters long", ""); return; } displayLoginScreenMessage(GameConnection.loginMessages[6], GameConnection.loginMessages[7]); try { if(isApplet()) super.streamManager = new StreamManager(super.gameServer, this, super.gamePort); else super.streamManager = new StreamManager(super.gameServer, null, super.gamePort); super.streamManager.oe = GameConnection.xc; int sessionId = super.streamManager.readSessionId(); String s5 = RawDataOperations.bo(lfb.pc(ofb), 20); String s7 = RawDataOperations.bo(lfb.pc(pfb), 20); super.streamManager.createPacket(8); super.streamManager.writeQWord(RawDataOperations.stringToLongHash(heb)); super.streamManager.writeDWord(getUID()); super.streamManager.writeRSAString(s5 + s7, sessionId, rsaKey1, rsaKey2); for(int k2 = 0; k2 < 5; k2++) super.streamManager.ub(RawDataOperations.sn(lfb.pc(xfb[k2])), sessionId, rsaKey1, rsaKey2); super.streamManager.mb(); super.streamManager.readInputStream(); int l2 = super.streamManager.readInputStream(); System.out.println("Recover response: " + l2); if(l2 == 0) { jdb = 2; displayLoginScreenMessage("Sorry, recovery failed. You may try again in 1 hour", ""); kfb = true; return; } if(l2 == 1) { jdb = 2; displayLoginScreenMessage("Your pass has been reset. You may now use the new pass to login", ""); return; } else { jdb = 2; displayLoginScreenMessage("Recovery failed! Attempts exceeded?", ""); return; } } catch(Exception e) { displayLoginScreenMessage(GameConnection.loginMessages[12], GameConnection.loginMessages[13]); } } if(lfb.rd(sfb)) jdb = 0; } } public void displayLoginScreenMessage(String s1, String s2) { if(jdb == 1) ndb.kd(odb, s1 + " " + s2); if(jdb == 2) wdb.kd(xdb, s1 + " " + s2); if(jdb == 3) { lfb.kd(mfb, s1); lfb.kd(nfb, s2); } geb = s2; rm(); tj(); } public void k() { edb = 0; displayMessage("@cya@Sorry, you can't logout at the moment", 3); } public void p() { if(edb != 0) { f(); return; } else { super.p(); return; } } public void f() { jdb = 0; loggedIn = 0; edb = 0; } public void e() { qcb = 0; edb = 0; jdb = 0; loggedIn = 1; wl(); gameGraphics.lf(); gameGraphics.jf(yt, 0, 0); for(int i1 = 0; i1 < uw; i1++) { zt.zh(vw[i1]); wu.fp(ww[i1], xw[i1], yw[i1]); } for(int j1 = 0; j1 < dx; j1++) { zt.zh(ex[j1]); wu.fo(fx[j1], gx[j1], hx[j1], ix[j1]); } uw = 0; dx = 0; ow = 0; vv = 0; for(int k1 = 0; k1 < tv; k1++) yv[k1] = null; for(int l1 = 0; l1 < uv; l1++) zv[l1] = null; hw = 0; for(int i2 = 0; i2 < fw; i2++) jw[i2] = null; for(int j2 = 0; j2 < gw; j2++) kw[j2] = null; for(int k2 = 0; k2 < 50; k2++) prayerStatus[k2] = false; mouseButtonClicked = 0; super.uq = 0; super.tq = 0; showShopWindow = false; showBankWindow = false; } public void u() { String s1 = ndb.pc(sdb); String s2 = ndb.pc(tdb); jdb = 2; wdb.kd(xdb, "Please enter your username and password"); wdb.kd(ydb, s1); wdb.kd(zdb, s2); rm(); tj(); logIn(s1, s2, false); } public void qm() { j(); if(edb > 0) edb--; if(super.wp > 4500 && fdb == 0 && edb == 0) { super.wp -= 500; gm(); return; } if(myPlayer.kr == 8 || myPlayer.kr == 9) fdb = 500; if(fdb > 0) fdb--; if(qgb) { vk(); return; } if(zeb) { rk(); return; } for(int i1 = 0; i1 < vv; i1++) { MobileEntity l1 = zv[i1]; int k1 = (l1.nr + 1) % 10; if(l1.mr != k1) { int j2 = -1; int k4 = l1.mr; int j6; if(k4 < k1) j6 = k1 - k4; else j6 = (10 + k1) - k4; int j7 = 4; if(j6 > 2) j7 = (j6 - 1) * 4; if(l1.or[k4] - l1.gr > cu * 3 || l1.pr[k4] - l1.hr > cu * 3 || l1.or[k4] - l1.gr < -cu * 3 || l1.pr[k4] - l1.hr < -cu * 3 || j6 > 8) { l1.gr = l1.or[k4]; l1.hr = l1.pr[k4]; } else { if(l1.gr < l1.or[k4]) { l1.gr += j7; l1.jr++; j2 = 2; } else if(l1.gr > l1.or[k4]) { l1.gr -= j7; l1.jr++; j2 = 6; } if(l1.gr - l1.or[k4] < j7 && l1.gr - l1.or[k4] > -j7) l1.gr = l1.or[k4]; if(l1.hr < l1.pr[k4]) { l1.hr += j7; l1.jr++; if(j2 == -1) j2 = 4; else if(j2 == 2) j2 = 3; else j2 = 5; } else if(l1.hr > l1.pr[k4]) { l1.hr -= j7; l1.jr++; if(j2 == -1) j2 = 0; else if(j2 == 2) j2 = 1; else j2 = 7; } if(l1.hr - l1.pr[k4] < j7 && l1.hr - l1.pr[k4] > -j7) l1.hr = l1.pr[k4]; } if(j2 != -1) l1.kr = j2; if(l1.gr == l1.or[k4] && l1.hr == l1.pr[k4]) l1.mr = (k4 + 1) % 10; } else { l1.kr = l1.lr; } if(l1.sr > 0) l1.sr--; if(l1.ur > 0) l1.ur--; if(l1.yr > 0) l1.yr--; if(gdb > 0) { gdb--; if(gdb == 0) displayMessage("You have been granted another life. Be more careful this time!", 3); if(gdb == 0) displayMessage("You retain your skills. Your objects land where you died", 3); } } for(int j1 = 0; j1 < hw; j1++) { MobileEntity l2 = kw[j1]; int k2 = (l2.nr + 1) % 10; if(l2.mr != k2) { int l4 = -1; int k6 = l2.mr; int k7; if(k6 < k2) k7 = k2 - k6; else k7 = (10 + k2) - k6; int l7 = 4; if(k7 > 2) l7 = (k7 - 1) * 4; if(l2.or[k6] - l2.gr > cu * 3 || l2.pr[k6] - l2.hr > cu * 3 || l2.or[k6] - l2.gr < -cu * 3 || l2.pr[k6] - l2.hr < -cu * 3 || k7 > 8) { l2.gr = l2.or[k6]; l2.hr = l2.pr[k6]; } else { if(l2.gr < l2.or[k6]) { l2.gr += l7; l2.jr++; l4 = 2; } else if(l2.gr > l2.or[k6]) { l2.gr -= l7; l2.jr++; l4 = 6; } if(l2.gr - l2.or[k6] < l7 && l2.gr - l2.or[k6] > -l7) l2.gr = l2.or[k6]; if(l2.hr < l2.pr[k6]) { l2.hr += l7; l2.jr++; if(l4 == -1) l4 = 4; else if(l4 == 2) l4 = 3; else l4 = 5; } else if(l2.hr > l2.pr[k6]) { l2.hr -= l7; l2.jr++; if(l4 == -1) l4 = 0; else if(l4 == 2) l4 = 1; else l4 = 7; } if(l2.hr - l2.pr[k6] < l7 && l2.hr - l2.pr[k6] > -l7) l2.hr = l2.pr[k6]; } if(l4 != -1) l2.kr = l4; if(l2.gr == l2.or[k6] && l2.hr == l2.pr[k6]) l2.mr = (k6 + 1) % 10; } else { l2.kr = l2.lr; if(l2.ir == 43) l2.jr++; } if(l2.sr > 0) l2.sr--; if(l2.ur > 0) l2.ur--; if(l2.yr > 0) l2.yr--; } for(int i2 = 0; i2 < vv; i2++) { MobileEntity l3 = zv[i2]; if(l3.hs > 0) l3.hs--; } if(ry) { if(nv - myPlayer.gr < -500 || nv - myPlayer.gr > 500 || ov - myPlayer.hr < -500 || ov - myPlayer.hr > 500) { nv = myPlayer.gr; ov = myPlayer.hr; } } else { if(nv - myPlayer.gr < -500 || nv - myPlayer.gr > 500 || ov - myPlayer.hr < -500 || ov - myPlayer.hr > 500) { nv = myPlayer.gr; ov = myPlayer.hr; } if(nv != myPlayer.gr) nv += (myPlayer.gr - nv) / (16 + (cameraZoom - 500) / 15); if(ov != myPlayer.hr) ov += (myPlayer.hr - ov) / (16 + (cameraZoom - 500) / 15); if(sy) { int i3 = pv * 32; int i5 = i3 - rv; byte byte0 = 1; if(i5 != 0) { qv++; if(i5 > 128) { byte0 = -1; i5 = 256 - i5; } else if(i5 > 0) byte0 = 1; else if(i5 < -128) { byte0 = 1; i5 = 256 + i5; } else if(i5 < 0) { byte0 = -1; i5 = -i5; } rv += ((qv * i5 + 255) / 256) * byte0; rv &= 0xff; } else { qv = 0; } } } if(super.mouseY > windowHeight - 4) { if(super.mouseX > 15 && super.mouseX < 96 && super.uq == 1) uz = 0; if(super.mouseX > 110 && super.mouseX < 194 && super.uq == 1) { uz = 1; pz.bf[qz] = 0xf423f; } if(super.mouseX > 215 && super.mouseX < 295 && super.uq == 1) { uz = 2; pz.bf[sz] = 0xf423f; } if(super.mouseX > 315 && super.mouseX < 395 && super.uq == 1) { uz = 3; pz.bf[tz] = 0xf423f; } super.uq = 0; super.tq = 0; } pz.pd(super.mouseX, super.mouseY, super.uq, super.tq); if(uz > 0 && super.mouseX >= 494 && super.mouseY >= windowHeight - 66) super.uq = 0; if(pz.rd(rz)) { String s1 = pz.pc(rz); pz.kd(rz, ""); if(s1.startsWith("::")) { if(s1.equalsIgnoreCase("::lostcon") && !isApplet) super.streamManager.closeStream(); else if(s1.equalsIgnoreCase("::closecon") && !isApplet) requestLogout(); else r(s1.substring(2)); } else if(s1.startsWith("reportabuse ")) { s1 = s1.substring(12); long l5 = RawDataOperations.stringToLongHash(s1); super.streamManager.createPacket(10); super.streamManager.writeQWord(l5); super.streamManager.formatPacket(); } else { int encryptedChatStringLength = RawDataOperations.generateEncryptedChatString(s1); q(RawDataOperations.encryptedChatString, encryptedChatStringLength); s1 = RawDataOperations.processEncryptedChatString(RawDataOperations.encryptedChatString, 0, encryptedChatStringLength, true); myPlayer.sr = 150; myPlayer.rr = s1; displayMessage(myPlayer.dr + ": " + s1, 2); } } if(uz == 0) { for(int j3 = 0; j3 < vz; j3++) if(xz[j3] > 0) xz[j3]--; } if(gdb != 0) super.uq = 0; if(showTradeWindow || showDuelWindow) { if(super.tq != 0) jbb++; else jbb = 0; if(jbb > 300) kbb += 50; else if(jbb > 150) kbb += 5; else if(jbb > 50) kbb++; else if(jbb > 20 && (jbb & 5) == 0) kbb++; } else { jbb = 0; kbb = 0; } if(super.uq == 1) mouseButtonClicked = 1; else if(super.uq == 2) mouseButtonClicked = 2; zt.wh(super.mouseX, super.mouseY); super.uq = 0; if(sy) { if(qv == 0 || ry) { if(super.kq) { pv = pv + 1 & 7; super.kq = false; if(!mv) { if((pv & 1) == 0) pv = pv + 1 & 7; for(int k3 = 0; k3 < 8; k3++) { if(dm(pv)) break; pv = pv + 1 & 7; } } } if(super.lq) { pv = pv + 7 & 7; super.lq = false; if(!mv) { if((pv & 1) == 0) pv = pv + 7 & 7; for(int i4 = 0; i4 < 8; i4++) { if(dm(pv)) break; pv = pv + 7 & 7; } } } } } else if(super.kq) rv = rv + 2 & 0xff; else if(super.lq) rv = rv - 2 & 0xff; /* * Origianl client zoom modifications if(mv && cameraZoom > 550) cameraZoom -= 4; if(!mv && cameraZoom < 750) cameraZoom += 4; */ if(mq) cameraZoom -= 4; if(nq) cameraZoom += 4; if(tu > 0) tu--; else if(tu < 0) tu++; zt.gi(17); ou++; if(ou > 5) { ou = 0; pu = pu + 1 & 3; qu = (qu + 1) % 3; } for(int j4 = 0; j4 < uw; j4++) { int k5 = ww[j4]; int l6 = xw[j4]; if(k5 >= 0 && l6 >= 0 && k5 < 96 && l6 < 96 && yw[j4] == 74) vw[j4].ve(1, 0, 0); } for(int i6 = 0; i6 < ihb; i6++) { lhb[i6]++; if(lhb[i6] > 50) { ihb--; for(int i7 = i6; i7 < ihb; i7++) { jhb[i7] = jhb[i7 + 1]; khb[i7] = khb[i7 + 1]; lhb[i7] = lhb[i7 + 1]; mhb[i7] = mhb[i7 + 1]; } } } } public void displayMessage(String s1, int i1) { if(i1 == 2 || i1 == 4 || i1 == 6) { for(; s1.length() > 5 && s1.charAt(0) == '@' && s1.charAt(4) == '@'; s1 = s1.substring(5)); int j1 = s1.indexOf(":"); if(j1 != -1) { String s2 = s1.substring(0, j1); long l1 = RawDataOperations.stringToLongHash(s2); for(int i2 = 0; i2 < super.jd; i2++) if(super.kd[i2] == l1) return; } } if(i1 == 2) s1 = "@yel@" + s1; if(i1 == 3 || i1 == 4) s1 = "@whi@" + s1; if(i1 == 6) s1 = "@cya@" + s1; if(uz != 0) { if(i1 == 4 || i1 == 3) lz = 200; if(i1 == 2 && uz != 1) mz = 200; if(i1 == 5 && uz != 2) nz = 200; if(i1 == 6 && uz != 3) oz = 200; if(i1 == 3 && uz != 0) uz = 0; if(i1 == 6 && uz != 3 && uz != 0) uz = 0; } for(int k1 = vz - 1; k1 > 0; k1--) { wz[k1] = wz[k1 - 1]; xz[k1] = xz[k1 - 1]; } wz[0] = s1; xz[0] = 300; if(i1 == 2) if(pz.bf[qz] == pz.cf[qz] - 4) pz.gc(qz, s1, true); else pz.gc(qz, s1, false); if(i1 == 5) if(pz.bf[sz] == pz.cf[sz] - 4) pz.gc(sz, s1, true); else pz.gc(sz, s1, false); if(i1 == 6) { if(pz.bf[tz] == pz.cf[tz] - 4) { pz.gc(tz, s1, true); return; } pz.gc(tz, s1, false); } } public void g(String s1) { if(s1.startsWith("@bor@")) { displayMessage(s1, 4); return; } if(s1.startsWith("@que@")) { displayMessage("@whi@" + s1, 5); return; } if(s1.startsWith("@pri@")) { displayMessage(s1, 6); return; } else { displayMessage(s1, 3); return; } } public MobileEntity pk(int i1, int j1, int k1, int l1) { if(yv[i1] == null) { yv[i1] = new MobileEntity(); yv[i1].er = i1; yv[i1].fr = 0; } MobileEntity l2 = yv[i1]; boolean flag = false; for(int i2 = 0; i2 < wv; i2++) { if(aw[i2].er != i1) continue; flag = true; break; } if(flag) { l2.lr = l1; int j2 = l2.nr; if(j1 != l2.or[j2] || k1 != l2.pr[j2]) { l2.nr = j2 = (j2 + 1) % 10; l2.or[j2] = j1; l2.pr[j2] = k1; } } else { l2.er = i1; l2.mr = 0; l2.nr = 0; l2.or[0] = l2.gr = j1; l2.pr[0] = l2.hr = k1; l2.lr = l2.kr = l1; l2.jr = 0; } zv[vv++] = l2; return l2; } public MobileEntity om(int i1, int j1, int k1, int l1, int i2) { if(jw[i1] == null) { jw[i1] = new MobileEntity(); jw[i1].er = i1; } MobileEntity l2 = jw[i1]; boolean flag = false; for(int j2 = 0; j2 < iw; j2++) { if(lw[j2].er != i1) continue; flag = true; break; } if(flag) { l2.ir = i2; l2.lr = l1; int k2 = l2.nr; if(j1 != l2.or[k2] || k1 != l2.pr[k2]) { l2.nr = k2 = (k2 + 1) % 10; l2.or[k2] = j1; l2.pr[k2] = k1; } } else { l2.er = i1; l2.mr = 0; l2.nr = 0; l2.or[0] = l2.gr = j1; l2.pr[0] = l2.hr = k1; l2.ir = i2; l2.lr = l2.kr = l1; l2.jr = 0; } kw[hw++] = l2; return l2; } public void n(int packetId, int packetLength, byte[] packetData) { try { if(packetId == 255) { wv = vv; for(int k1 = 0; k1 < wv; k1++) aw[k1] = zv[k1]; int l8 = 8; cw = RawDataOperations.rn(packetData, l8, 10); l8 += 10; dw = RawDataOperations.rn(packetData, l8, 12); l8 += 12; int i15 = RawDataOperations.rn(packetData, l8, 4); l8 += 4; boolean flag1 = tm(cw, dw); cw -= bv; dw -= cv; int l23 = cw * cu + 64; int i27 = dw * cu + 64; if(flag1) { myPlayer.nr = 0; myPlayer.mr = 0; myPlayer.gr = myPlayer.or[0] = l23; myPlayer.hr = myPlayer.pr[0] = i27; } vv = 0; myPlayer = pk(ew, l23, i27, i15); int j30 = RawDataOperations.rn(packetData, l8, 8); l8 += 8; for(int i35 = 0; i35 < j30; i35++) { MobileEntity l38 = aw[i35 + 1]; int i41 = RawDataOperations.rn(packetData, l8, 1); l8++; if(i41 != 0) { int i43 = RawDataOperations.rn(packetData, l8, 1); l8++; if(i43 == 0) { int k44 = RawDataOperations.rn(packetData, l8, 3); l8 += 3; int k45 = l38.nr; int i46 = l38.or[k45]; int k46 = l38.pr[k45]; if(k44 == 2 || k44 == 1 || k44 == 3) i46 += cu; if(k44 == 6 || k44 == 5 || k44 == 7) i46 -= cu; if(k44 == 4 || k44 == 3 || k44 == 5) k46 += cu; if(k44 == 0 || k44 == 1 || k44 == 7) k46 -= cu; l38.lr = k44; l38.nr = k45 = (k45 + 1) % 10; l38.or[k45] = i46; l38.pr[k45] = k46; } else { int l44 = RawDataOperations.rn(packetData, l8, 4); if((l44 & 0xc) == 12) { l8 += 2; continue; } l38.lr = RawDataOperations.rn(packetData, l8, 4); l8 += 4; } } zv[vv++] = l38; } int j38 = 0; while(l8 + 24 < packetLength * 8) { int j41 = RawDataOperations.rn(packetData, l8, 11); l8 += 11; int j43 = RawDataOperations.rn(packetData, l8, 5); l8 += 5; if(j43 > 15) j43 -= 32; int i45 = RawDataOperations.rn(packetData, l8, 5); l8 += 5; if(i45 > 15) i45 -= 32; int l45 = RawDataOperations.rn(packetData, l8, 4); l8 += 4; int j46 = RawDataOperations.rn(packetData, l8, 1); l8++; int l46 = (cw + j43) * cu + 64; int i47 = (dw + i45) * cu + 64; pk(j41, l46, i47, l45); if(j46 == 0) mw[j38++] = j41; } if(j38 > 0) { super.streamManager.createPacket(254); super.streamManager.writeWord(j38); for(int k41 = 0; k41 < j38; k41++) { MobileEntity l43 = yv[mw[k41]]; super.streamManager.writeWord(l43.er); super.streamManager.writeWord(l43.fr); } super.streamManager.formatPacket(); j38 = 0; return; } } else { if(packetId == 254) { for(int l1 = 1; l1 < packetLength;) if(RawDataOperations.unsignByte(packetData[l1]) == 255) { int i9 = 0; int j15 = cw + packetData[l1 + 1] >> 3; int i20 = dw + packetData[l1 + 2] >> 3; l1 += 3; for(int i24 = 0; i24 < ow; i24++) { int j27 = (pw[i24] >> 3) - j15; int k30 = (qw[i24] >> 3) - i20; if(j27 != 0 || k30 != 0) { if(i24 != i9) { pw[i9] = pw[i24]; qw[i9] = qw[i24]; rw[i9] = rw[i24]; sw[i9] = sw[i24]; } i9++; } } ow = i9; } else { int j9 = RawDataOperations.readWord(packetData, l1); l1 += 2; int k15 = cw + packetData[l1++]; int j20 = dw + packetData[l1++]; if((j9 & 0x8000) == 0) { pw[ow] = k15; qw[ow] = j20; rw[ow] = j9; sw[ow] = 0; for(int j24 = 0; j24 < uw; j24++) { if(ww[j24] != k15 || xw[j24] != j20) continue; sw[ow] = q.hlb[yw[j24]]; break; } ow++; } else { j9 &= 0x7fff; int k24 = 0; for(int k27 = 0; k27 < ow; k27++) if(pw[k27] != k15 || qw[k27] != j20 || rw[k27] != j9) { if(k27 != k24) { pw[k24] = pw[k27]; qw[k24] = qw[k27]; rw[k24] = rw[k27]; sw[k24] = sw[k27]; } k24++; } else { j9 = -123; } ow = k24; } } return; } if(packetId == 253) { for(int i2 = 1; i2 < packetLength;) if(RawDataOperations.unsignByte(packetData[i2]) == 255) { int k9 = 0; int l15 = cw + packetData[i2 + 1] >> 3; int k20 = dw + packetData[i2 + 2] >> 3; i2 += 3; for(int l24 = 0; l24 < uw; l24++) { int i28 = (ww[l24] >> 3) - l15; int l30 = (xw[l24] >> 3) - k20; if(i28 != 0 || l30 != 0) { if(l24 != k9) { vw[k9] = vw[l24]; vw[k9].uh = k9; ww[k9] = ww[l24]; xw[k9] = xw[l24]; yw[k9] = yw[l24]; zw[k9] = zw[l24]; } k9++; } else { zt.zh(vw[l24]); wu.fp(ww[l24], xw[l24], yw[l24]); } } uw = k9; } else { int l9 = RawDataOperations.readWord(packetData, i2); i2 += 2; int i16 = cw + packetData[i2++]; int l20 = dw + packetData[i2++]; int i25 = 0; for(int j28 = 0; j28 < uw; j28++) if(ww[j28] != i16 || xw[j28] != l20) { if(j28 != i25) { vw[i25] = vw[j28]; vw[i25].uh = i25; ww[i25] = ww[j28]; xw[i25] = xw[j28]; yw[i25] = yw[j28]; zw[i25] = zw[j28]; } i25++; } else { zt.zh(vw[j28]); wu.fp(ww[j28], xw[j28], yw[j28]); } uw = i25; if(l9 != 60000) { int i31 = wu.io(i16, l20); int j35; int k38; if(i31 == 0 || i31 == 4) { j35 = q.elb[l9]; k38 = q.flb[l9]; } else { k38 = q.elb[l9]; j35 = q.flb[l9]; } int l41 = ((i16 + i16 + j35) * cu) / 2; int k43 = ((l20 + l20 + k38) * cu) / 2; int j45 = q.dlb[l9]; h h2 = ax[j45].qe(); zt.uh(h2); h2.uh = uw; h2.ve(0, i31 * 32, 0); h2.zd(l41, -wu.oo(l41, k43), k43); h2.se(true, 48, 48, -50, -10, -50); wu.vo(i16, l20, l9); if(l9 == 74) h2.zd(0, -480, 0); ww[uw] = i16; xw[uw] = l20; yw[uw] = l9; zw[uw] = i31; vw[uw++] = h2; } } return; } if(packetId == 252) { int j2 = 1; mx = packetData[j2++] & 0xff; for(int i10 = 0; i10 < mx; i10++) { int j16 = RawDataOperations.readWord(packetData, j2); j2 += 2; nx[i10] = j16 & 0x7fff; px[i10] = j16 / 32768; if(q.pjb[j16 & 0x7fff] == 0) { ox[i10] = RawDataOperations.readSignedDWord(packetData, j2); if(ox[i10] >= 128) j2 += 4; else j2++; } else { ox[i10] = 1; } } return; } if(packetId == 250) { int k2 = RawDataOperations.readWord(packetData, 1); int j10 = 3; for(int k16 = 0; k16 < k2; k16++) { int i21 = RawDataOperations.readWord(packetData, j10); j10 += 2; MobileEntity l25 = yv[i21]; byte byte6 = packetData[j10]; j10++; if(byte6 == 0) { int j31 = RawDataOperations.readWord(packetData, j10); j10 += 2; if(l25 != null) { l25.ur = 150; l25.tr = j31; } } else if(byte6 == 1) { byte byte7 = packetData[j10]; j10++; if(l25 != null) { String s3 = RawDataOperations.processEncryptedChatString(packetData, j10, byte7, true); boolean flag3 = false; for(int i42 = 0; i42 < super.jd; i42++) if(super.kd[i42] == l25.cr) flag3 = true; if(!flag3) { l25.sr = 150; l25.rr = s3; displayMessage(l25.dr + ": " + l25.rr, 2); } } j10 += byte7; } else if(byte6 == 2) { int k31 = RawDataOperations.unsignByte(packetData[j10]); j10++; int k35 = RawDataOperations.unsignByte(packetData[j10]); j10++; int i39 = RawDataOperations.unsignByte(packetData[j10]); j10++; if(l25 != null) { l25.vr = k31; l25.wr = k35; l25.xr = i39; l25.yr = 200; if(l25 == myPlayer) { ux[3] = k35; vx[3] = i39; showWelcomeDialog = false; showNonMembersServerDialog = false; } } } else if(byte6 == 3) { int l31 = RawDataOperations.readWord(packetData, j10); j10 += 2; int l35 = RawDataOperations.readWord(packetData, j10); j10 += 2; if(l25 != null) { l25.es = l31; l25.gs = l35; l25.fs = -1; l25.hs = nu; } } else if(byte6 == 4) { int i32 = RawDataOperations.readWord(packetData, j10); j10 += 2; int i36 = RawDataOperations.readWord(packetData, j10); j10 += 2; if(l25 != null) { l25.es = i32; l25.fs = i36; l25.gs = -1; l25.hs = nu; } } else if(byte6 == 5) { if(l25 != null) { l25.fr = RawDataOperations.readWord(packetData, j10); j10 += 2; l25.cr = RawDataOperations.readQWord(packetData, j10); j10 += 8; l25.dr = RawDataOperations.longHashToString(l25.cr); int j32 = RawDataOperations.unsignByte(packetData[j10]); j10++; for(int j36 = 0; j36 < j32; j36++) { l25.qr[j36] = RawDataOperations.unsignByte(packetData[j10]); j10++; } for(int j39 = j32; j39 < 12; j39++) l25.qr[j39] = 0; l25.as = packetData[j10++] & 0xff; l25.bs = packetData[j10++] & 0xff; l25.cs = packetData[j10++] & 0xff; l25.ds = packetData[j10++] & 0xff; l25.zr = packetData[j10++] & 0xff; l25.ks = packetData[j10++] & 0xff; } else { j10 += 14; int k32 = RawDataOperations.unsignByte(packetData[j10]); j10 += k32 + 1; } } else if(byte6 == 6) { byte byte8 = packetData[j10]; j10++; if(l25 != null) { String s4 = RawDataOperations.processEncryptedChatString(packetData, j10, byte8, false); l25.sr = 150; l25.rr = s4; if(l25 == myPlayer) displayMessage(l25.dr + ": " + l25.rr, 5); } j10 += byte8; } } return; } if(packetId == 249) { for(int l2 = 1; l2 < packetLength;) if(RawDataOperations.unsignByte(packetData[l2]) == 255) { int k10 = 0; int l16 = cw + packetData[l2 + 1] >> 3; int j21 = dw + packetData[l2 + 2] >> 3; l2 += 3; for(int j25 = 0; j25 < dx; j25++) { int k28 = (fx[j25] >> 3) - l16; int l32 = (gx[j25] >> 3) - j21; if(k28 != 0 || l32 != 0) { if(j25 != k10) { ex[k10] = ex[j25]; ex[k10].uh = k10 + 10000; fx[k10] = fx[j25]; gx[k10] = gx[j25]; hx[k10] = hx[j25]; ix[k10] = ix[j25]; } k10++; } else { zt.zh(ex[j25]); wu.fo(fx[j25], gx[j25], hx[j25], ix[j25]); } } dx = k10; } else { int l10 = RawDataOperations.readWord(packetData, l2); l2 += 2; int i17 = cw + packetData[l2++]; int k21 = dw + packetData[l2++]; byte byte5 = packetData[l2++]; int l28 = 0; for(int i33 = 0; i33 < dx; i33++) if(fx[i33] != i17 || gx[i33] != k21 || hx[i33] != byte5) { if(i33 != l28) { ex[l28] = ex[i33]; ex[l28].uh = l28 + 10000; fx[l28] = fx[i33]; gx[l28] = gx[i33]; hx[l28] = hx[i33]; ix[l28] = ix[i33]; } l28++; } else { zt.zh(ex[i33]); wu.fo(fx[i33], gx[i33], hx[i33], ix[i33]); } dx = l28; if(l10 != 65535) { wu.hp(i17, k21, byte5, l10); h h1 = cm(i17, k21, byte5, l10, dx); ex[dx] = h1; fx[dx] = i17; gx[dx] = k21; ix[dx] = l10; hx[dx++] = byte5; } } return; } if(packetId == 248) { iw = hw; hw = 0; for(int i3 = 0; i3 < iw; i3++) lw[i3] = kw[i3]; int i11 = 8; int j17 = RawDataOperations.rn(packetData, i11, 8); i11 += 8; for(int l21 = 0; l21 < j17; l21++) { MobileEntity l26 = lw[l21]; int i29 = RawDataOperations.rn(packetData, i11, 1); i11++; if(i29 != 0) { int j33 = RawDataOperations.rn(packetData, i11, 1); i11++; if(j33 == 0) { int k36 = RawDataOperations.rn(packetData, i11, 3); i11 += 3; int k39 = l26.nr; int j42 = l26.or[k39]; int i44 = l26.pr[k39]; if(k36 == 2 || k36 == 1 || k36 == 3) j42 += cu; if(k36 == 6 || k36 == 5 || k36 == 7) j42 -= cu; if(k36 == 4 || k36 == 3 || k36 == 5) i44 += cu; if(k36 == 0 || k36 == 1 || k36 == 7) i44 -= cu; l26.lr = k36; l26.nr = k39 = (k39 + 1) % 10; l26.or[k39] = j42; l26.pr[k39] = i44; } else { int l36 = RawDataOperations.rn(packetData, i11, 4); if((l36 & 0xc) == 12) { i11 += 2; continue; } l26.lr = RawDataOperations.rn(packetData, i11, 4); i11 += 4; } } kw[hw++] = l26; } while(i11 + 31 < packetLength * 8) { int k25 = RawDataOperations.rn(packetData, i11, 11); i11 += 11; int j29 = RawDataOperations.rn(packetData, i11, 5); i11 += 5; if(j29 > 15) j29 -= 32; int k33 = RawDataOperations.rn(packetData, i11, 5); i11 += 5; if(k33 > 15) k33 -= 32; int i37 = RawDataOperations.rn(packetData, i11, 4); i11 += 4; int l39 = (cw + j29) * cu + 64; int k42 = (dw + k33) * cu + 64; int j44 = RawDataOperations.rn(packetData, i11, 9); i11 += 9; if(j44 >= q.vjb) j44 = 24; om(k25, l39, k42, i37, j44); } return; } if(packetId == 247) { int j3 = RawDataOperations.readWord(packetData, 1); int j11 = 3; for(int k17 = 0; k17 < j3; k17++) { int i22 = RawDataOperations.readWord(packetData, j11); j11 += 2; MobileEntity l27 = jw[i22]; int k29 = RawDataOperations.unsignByte(packetData[j11]); j11++; if(k29 == 1) { int l33 = RawDataOperations.readWord(packetData, j11); j11 += 2; byte byte9 = packetData[j11]; j11++; if(l27 != null) { String s5 = RawDataOperations.processEncryptedChatString(packetData, j11, byte9, false); l27.sr = 150; l27.rr = s5; if(l33 == myPlayer.er) displayMessage("@yel@" + q.wjb[l27.ir] + ": " + l27.rr, 5); } j11 += byte9; } else if(k29 == 2) { int i34 = RawDataOperations.unsignByte(packetData[j11]); j11++; int j37 = RawDataOperations.unsignByte(packetData[j11]); j11++; int i40 = RawDataOperations.unsignByte(packetData[j11]); j11++; if(l27 != null) { l27.vr = i34; l27.wr = j37; l27.xr = i40; l27.yr = 200; } } } return; } if(packetId == 246) { ncb = true; int k3 = RawDataOperations.unsignByte(packetData[1]); ocb = k3; int k11 = 2; for(int l17 = 0; l17 < k3; l17++) { int j22 = RawDataOperations.unsignByte(packetData[k11]); k11++; pcb[l17] = new String(packetData, k11, j22); k11 += j22; } return; } if(packetId == 245) { ncb = false; return; } if(packetId == 244) { idb = true; ew = RawDataOperations.readWord(packetData, 1); xu = RawDataOperations.readWord(packetData, 3); yu = RawDataOperations.readWord(packetData, 5); dv = RawDataOperations.readWord(packetData, 7); zu = RawDataOperations.readWord(packetData, 9); yu -= dv * zu; return; } if(packetId == 243) { int l3 = 1; for(int l11 = 0; l11 < 18; l11++) ux[l11] = RawDataOperations.unsignByte(packetData[l3++]); for(int i18 = 0; i18 < 18; i18++) vx[i18] = RawDataOperations.unsignByte(packetData[l3++]); for(int k22 = 0; k22 < 18; k22++) { wx[k22] = RawDataOperations.readDWord(packetData, l3); l3 += 4; } yx = RawDataOperations.unsignByte(packetData[l3++]); return; } if(packetId == 242) { for(int i4 = 0; i4 < 5; i4++) xx[i4] = RawDataOperations.unsignByte(packetData[1 + i4]); return; } if(packetId == 241) { gdb = 250; return; } if(packetId == 240) { int j4 = (packetLength - 1) / 4; for(int i12 = 0; i12 < j4; i12++) { int j18 = cw + RawDataOperations.readSignedWord(packetData, 1 + i12 * 4) >> 3; int l22 = dw + RawDataOperations.readSignedWord(packetData, 3 + i12 * 4) >> 3; int i26 = 0; for(int l29 = 0; l29 < ow; l29++) { int j34 = (pw[l29] >> 3) - j18; int k37 = (qw[l29] >> 3) - l22; if(j34 != 0 || k37 != 0) { if(l29 != i26) { pw[i26] = pw[l29]; qw[i26] = qw[l29]; rw[i26] = rw[l29]; sw[i26] = sw[l29]; } i26++; } } ow = i26; i26 = 0; for(int k34 = 0; k34 < uw; k34++) { int l37 = (ww[k34] >> 3) - j18; int j40 = (xw[k34] >> 3) - l22; if(l37 != 0 || j40 != 0) { if(k34 != i26) { vw[i26] = vw[k34]; vw[i26].uh = i26; ww[i26] = ww[k34]; xw[i26] = xw[k34]; yw[i26] = yw[k34]; zw[i26] = zw[k34]; } i26++; } else { zt.zh(vw[k34]); wu.fp(ww[k34], xw[k34], yw[k34]); } } uw = i26; i26 = 0; for(int i38 = 0; i38 < dx; i38++) { int k40 = (fx[i38] >> 3) - j18; int l42 = (gx[i38] >> 3) - l22; if(k40 != 0 || l42 != 0) { if(i38 != i26) { ex[i26] = ex[i38]; ex[i26].uh = i26 + 10000; fx[i26] = fx[i38]; gx[i26] = gx[i38]; hx[i26] = hx[i38]; ix[i26] = ix[i38]; } i26++; } else { zt.zh(ex[i38]); wu.fo(fx[i38], gx[i38], hx[i38], ix[i38]); } } dx = i26; } return; } if(packetId == 239) { qgb = true; rgb = false; fl(false); return; } if(packetId == 238) { int k4 = RawDataOperations.readWord(packetData, 1); if(yv[k4] != null) abb = yv[k4].dr; showTradeWindow = true; hbb = false; ibb = false; bbb = 0; ebb = 0; return; } if(packetId == 237) { showTradeWindow = false; showTradeConfirmationDialog = false; return; } if(packetId == 236) { ebb = packetData[1] & 0xff; int l4 = 2; for(int j12 = 0; j12 < ebb; j12++) { fbb[j12] = RawDataOperations.readWord(packetData, l4); l4 += 2; gbb[j12] = RawDataOperations.readDWord(packetData, l4); l4 += 4; } hbb = false; ibb = false; return; } if(packetId == 235) { byte byte0 = packetData[1]; if(byte0 == 1) { hbb = true; return; } else { hbb = false; return; } } if(packetId == 234) { showShopWindow = true; int i5 = 1; int k12 = packetData[i5++] & 0xff; byte byte4 = packetData[i5++]; vbb = packetData[i5++] & 0xff; wbb = packetData[i5++] & 0xff; for(int i23 = 0; i23 < 40; i23++) xbb[i23] = -1; for(int j26 = 0; j26 < k12; j26++) { xbb[j26] = RawDataOperations.readWord(packetData, i5); i5 += 2; ybb[j26] = RawDataOperations.readWord(packetData, i5); i5 += 2; zbb[j26] = packetData[i5++]; } if(byte4 == 1) { int i30 = 39; for(int l34 = 0; l34 < mx; l34++) { if(i30 < k12) break; boolean flag2 = false; for(int l40 = 0; l40 < 40; l40++) { if(xbb[l40] != nx[l34]) continue; flag2 = true; break; } if(nx[l34] == 10) flag2 = true; if(!flag2) { xbb[i30] = nx[l34] & 0x7fff; ybb[i30] = 0; zbb[i30] = 0; i30--; } } } if(acb >= 0 && acb < 40 && xbb[acb] != bcb) { acb = -1; bcb = -2; return; } } else { if(packetId == 233) { showShopWindow = false; return; } if(packetId == 229) { byte byte1 = packetData[1]; if(byte1 == 1) { ibb = true; return; } else { ibb = false; return; } } if(packetId == 228) { sy = RawDataOperations.unsignByte(packetData[1]) == 1; ty = RawDataOperations.unsignByte(packetData[2]) == 1; uy = RawDataOperations.unsignByte(packetData[3]) == 1; return; } if(packetId == 227) { for(int j5 = 0; j5 < packetLength - 1; j5++) { boolean flag = packetData[j5 + 1] == 1; if(!prayerStatus[j5] && flag) playAudio("prayeron"); if(prayerStatus[j5] && !flag) playAudio("prayeroff"); prayerStatus[j5] = flag; } return; } if(packetId == 226) { for(int k5 = 0; k5 < ny; k5++) py[k5] = packetData[k5 + 1] == 1; return; } if(packetId == 224) { zeb = true; for(int l5 = 0; l5 < 5; l5++) { ifb[l5] = l5; jfb[l5] = "~:" + ifb[l5]; afb.kd(ffb[l5], ""); afb.kd(efb[l5], (l5 + 1) + ": " + recoveryQuestions[ifb[l5]]); } return; } if(packetId == 222) { showBankWindow = true; int i6 = 1; dcb = packetData[i6++] & 0xff; lcb = packetData[i6++] & 0xff; for(int l12 = 0; l12 < dcb; l12++) { ecb[l12] = RawDataOperations.readWord(packetData, i6); i6 += 2; fcb[l12] = RawDataOperations.readSignedDWord(packetData, i6); if(fcb[l12] >= 128) i6 += 4; else i6++; } ol(); return; } if(packetId == 221) { showBankWindow = false; return; } if(packetId == 220) { int j6 = packetData[1] & 0xff; wx[j6] = RawDataOperations.readDWord(packetData, 2); return; } if(packetId == 219) { int k6 = RawDataOperations.readWord(packetData, 1); if(yv[k6] != null) zz = yv[k6].dr; showDuelWindow = true; aab = 0; dab = 0; gab = false; hab = false; iab = false; jab = false; kab = false; lab = false; return; } if(packetId == 218) { showDuelWindow = false; showDuelConfirmationDialog = false; return; } if(packetId == 217) { showTradeConfirmationDialog = true; nbb = false; showTradeWindow = false; int l6 = 1; lbb = RawDataOperations.readQWord(packetData, l6); l6 += 8; rbb = packetData[l6++] & 0xff; for(int i13 = 0; i13 < rbb; i13++) { sbb[i13] = RawDataOperations.readWord(packetData, l6); l6 += 2; tbb[i13] = RawDataOperations.readDWord(packetData, l6); l6 += 4; } obb = packetData[l6++] & 0xff; for(int k18 = 0; k18 < obb; k18++) { pbb[k18] = RawDataOperations.readWord(packetData, l6); l6 += 2; qbb[k18] = RawDataOperations.readDWord(packetData, l6); l6 += 4; } return; } if(packetId == 216) { dab = packetData[1] & 0xff; int i7 = 2; for(int j13 = 0; j13 < dab; j13++) { eab[j13] = RawDataOperations.readWord(packetData, i7); i7 += 2; fab[j13] = RawDataOperations.readDWord(packetData, i7); i7 += 4; } gab = false; hab = false; return; } if(packetId == 215) { if(packetData[1] == 1) iab = true; else iab = false; if(packetData[2] == 1) jab = true; else jab = false; if(packetData[3] == 1) kab = true; else kab = false; if(packetData[4] == 1) lab = true; else lab = false; gab = false; hab = false; return; } if(packetId == 214) { int j7 = 1; int k13 = packetData[j7++] & 0xff; int l18 = RawDataOperations.readWord(packetData, j7); j7 += 2; int j23 = RawDataOperations.readSignedDWord(packetData, j7); if(j23 >= 128) j7 += 4; else j7++; if(j23 == 0) { dcb--; for(int k26 = k13; k26 < dcb; k26++) { ecb[k26] = ecb[k26 + 1]; fcb[k26] = fcb[k26 + 1]; } } else { ecb[k13] = l18; fcb[k13] = j23; if(k13 >= dcb) dcb = k13 + 1; } ol(); return; } if(packetId == 213) { int k7 = 1; int l13 = 1; int i19 = packetData[k7++] & 0xff; int k23 = RawDataOperations.readWord(packetData, k7); k7 += 2; if(q.pjb[k23 & 0x7fff] == 0) { l13 = RawDataOperations.readSignedDWord(packetData, k7); if(l13 >= 128) k7 += 4; else k7++; } nx[i19] = k23 & 0x7fff; px[i19] = k23 / 32768; ox[i19] = l13; if(i19 >= mx) { mx = i19 + 1; return; } } else { if(packetId == 212) { int l7 = packetData[1] & 0xff; mx--; for(int i14 = l7; i14 < mx; i14++) { nx[i14] = nx[i14 + 1]; ox[i14] = ox[i14 + 1]; px[i14] = px[i14 + 1]; } return; } if(packetId == 211) { int i8 = 1; int j14 = packetData[i8++] & 0xff; ux[j14] = RawDataOperations.unsignByte(packetData[i8++]); vx[j14] = RawDataOperations.unsignByte(packetData[i8++]); wx[j14] = RawDataOperations.readDWord(packetData, i8); i8 += 4; return; } if(packetId == 210) { byte byte2 = packetData[1]; if(byte2 == 1) { gab = true; return; } else { gab = false; return; } } if(packetId == 209) { byte byte3 = packetData[1]; if(byte3 == 1) { hab = true; return; } else { hab = false; return; } } if(packetId == 208) { showDuelConfirmationDialog = true; nab = false; showDuelWindow = false; int j8 = 1; oab = RawDataOperations.readQWord(packetData, j8); j8 += 8; sab = packetData[j8++] & 0xff; for(int k14 = 0; k14 < sab; k14++) { tab[k14] = RawDataOperations.readWord(packetData, j8); j8 += 2; uab[k14] = RawDataOperations.readDWord(packetData, j8); j8 += 4; } pab = packetData[j8++] & 0xff; for(int j19 = 0; j19 < pab; j19++) { qab[j19] = RawDataOperations.readWord(packetData, j8); j8 += 2; rab[j19] = RawDataOperations.readDWord(packetData, j8); j8 += 4; } vab = packetData[j8++] & 0xff; wab = packetData[j8++] & 0xff; xab = packetData[j8++] & 0xff; yab = packetData[j8++] & 0xff; return; } if(packetId == 207) { String s1 = new String(packetData, 1, packetLength - 1); playAudio(s1); return; } if(packetId == 206) { if(ihb < 50) { int k8 = packetData[1] & 0xff; int l14 = packetData[2] + cw; int k19 = packetData[3] + dw; mhb[ihb] = k8; lhb[ihb] = 0; jhb[ihb] = l14; khb[ihb] = k19; ihb++; return; } } else if(packetId == 205) { if(!vcb) { zcb = RawDataOperations.readDWord(packetData, 1); adb = RawDataOperations.readDWord(packetData, 5); xcb = RawDataOperations.readDWord(packetData, 9); bdb = (int)(Math.random() * 6D); showWelcomeDialog = true; vcb = true; ycb = null; return; } } else { if(packetId == 204) { ddb = new String(packetData, 1, packetLength - 1); showNonMembersServerDialog = true; return; } if(packetId == 203) { qgb = true; rgb = true; fl(true); } } } } } return; } catch(RuntimeException e) { // TEMPORARY DEBUGGER FUNCTION Bot.logPacketError(packetId, packetLength, packetData, e); if(packetErrorCount < 3) { e.printStackTrace(); super.streamManager.createPacket(17); super.streamManager.writeString(e.toString()); super.streamManager.formatPacket(); super.streamManager.createPacket(17); super.streamManager.writeString("p-type:" + packetId + " p-size:" + packetLength); super.streamManager.formatPacket(); super.streamManager.createPacket(17); super.streamManager.writeString("rx:" + cw + " ry:" + dw + " num3l:" + uw); super.streamManager.formatPacket(); String errorPacketData = ""; for(int i = 0; i < 80 && i < packetLength; i++) errorPacketData = errorPacketData + packetData[i] + " "; super.streamManager.createPacket(17); super.streamManager.writeString(errorPacketData); super.streamManager.formatPacket(); packetErrorCount++; } } } public void ol() { gcb = dcb; for(int i1 = 0; i1 < dcb; i1++) { hcb[i1] = ecb[i1]; icb[i1] = fcb[i1]; } for(int j1 = 0; j1 < mx; j1++) { if(gcb >= lcb) break; int k1 = nx[j1]; boolean flag = false; for(int l1 = 0; l1 < gcb; l1++) { if(hcb[l1] != k1) continue; flag = true; break; } if(!flag) { hcb[gcb] = k1; icb[gcb] = 0; gcb++; } } } public boolean dm(int i1) { int j1 = myPlayer.gr / 128; int k1 = myPlayer.hr / 128; for(int l1 = 2; l1 >= 1; l1--) { if(i1 == 1 && ((wu.ajb[j1][k1 - l1] & 0x80) == 128 || (wu.ajb[j1 - l1][k1] & 0x80) == 128 || (wu.ajb[j1 - l1][k1 - l1] & 0x80) == 128)) return false; if(i1 == 3 && ((wu.ajb[j1][k1 + l1] & 0x80) == 128 || (wu.ajb[j1 - l1][k1] & 0x80) == 128 || (wu.ajb[j1 - l1][k1 + l1] & 0x80) == 128)) return false; if(i1 == 5 && ((wu.ajb[j1][k1 + l1] & 0x80) == 128 || (wu.ajb[j1 + l1][k1] & 0x80) == 128 || (wu.ajb[j1 + l1][k1 + l1] & 0x80) == 128)) return false; if(i1 == 7 && ((wu.ajb[j1][k1 - l1] & 0x80) == 128 || (wu.ajb[j1 + l1][k1] & 0x80) == 128 || (wu.ajb[j1 + l1][k1 - l1] & 0x80) == 128)) return false; if(i1 == 0 && (wu.ajb[j1][k1 - l1] & 0x80) == 128) return false; if(i1 == 2 && (wu.ajb[j1 - l1][k1] & 0x80) == 128) return false; if(i1 == 4 && (wu.ajb[j1][k1 + l1] & 0x80) == 128) return false; if(i1 == 6 && (wu.ajb[j1 + l1][k1] & 0x80) == 128) return false; } return true; } public void ll() { if((pv & 1) == 1 && dm(pv)) return; if((pv & 1) == 0 && dm(pv)) { if(dm(pv + 1 & 7)) { pv = pv + 1 & 7; return; } if(dm(pv + 7 & 7)) pv = pv + 7 & 7; return; } int ai[] = { 1, -1, 2, -2, 3, -3, 4 }; for(int i1 = 0; i1 < 7; i1++) { if(!dm(pv + ai[i1] + 8 & 7)) continue; pv = pv + ai[i1] + 8 & 7; break; } if((pv & 1) == 0 && dm(pv)) { if(dm(pv + 1 & 7)) { pv = pv + 1 & 7; return; } if(dm(pv + 7 & 7)) pv = pv + 7 & 7; return; } else { return; } } public void yk() { if(gdb != 0) { gameGraphics.ff(); gameGraphics.ug("Oh dear! You are dead...", windowWidth / 2, windowHeight / 2, 7, 0xff0000); drawChatTabs(); gameGraphics.jf(yt, 0, 0); return; } if(qgb) { jk(); return; } if(zeb) { fk(); return; } if(!wu.cjb) return; for(int i1 = 0; i1 < 64; i1++) { zt.zh(wu.fjb[av][i1]); if(av == 0) { zt.zh(wu.ejb[1][i1]); zt.zh(wu.fjb[1][i1]); zt.zh(wu.ejb[2][i1]); zt.zh(wu.fjb[2][i1]); } mv = true; if(av == 0 && (wu.ajb[myPlayer.gr / 128][myPlayer.hr / 128] & 0x80) == 0) { zt.uh(wu.fjb[av][i1]); if(av == 0) { zt.uh(wu.ejb[1][i1]); zt.uh(wu.fjb[1][i1]); zt.uh(wu.ejb[2][i1]); zt.uh(wu.fjb[2][i1]); } mv = false; } } if(pu != ru) { ru = pu; for(int j1 = 0; j1 < uw; j1++) { if(yw[j1] == 51) { int i2 = ww[j1]; int j3 = xw[j1]; int j5 = i2 - myPlayer.gr / 128; int i7 = j3 - myPlayer.hr / 128; byte byte0 = 7; if(i2 >= 0 && j3 >= 0 && i2 < 96 && j3 < 96 && j5 > -byte0 && j5 < byte0 && i7 > -byte0 && i7 < byte0) { zt.zh(vw[j1]); String s1 = "torcha" + (pu + 1); int i14 = q.op(s1); h h1 = ax[i14].qe(); zt.uh(h1); h1.se(true, 48, 48, -50, -10, -50); h1.yd(vw[j1]); h1.uh = j1; vw[j1] = h1; } } if(yw[j1] == 143) { int j2 = ww[j1]; int k3 = xw[j1]; int k5 = j2 - myPlayer.gr / 128; int j7 = k3 - myPlayer.hr / 128; byte byte1 = 7; if(j2 >= 0 && k3 >= 0 && j2 < 96 && k3 < 96 && k5 > -byte1 && k5 < byte1 && j7 > -byte1 && j7 < byte1) { zt.zh(vw[j1]); String s2 = "skulltorcha" + (pu + 1); int j14 = q.op(s2); h h2 = ax[j14].qe(); zt.uh(h2); h2.se(true, 48, 48, -50, -10, -50); h2.yd(vw[j1]); h2.uh = j1; vw[j1] = h2; } } } } if(qu != su) { su = qu; for(int k1 = 0; k1 < uw; k1++) { if(yw[k1] == 97) { int k2 = ww[k1]; int i4 = xw[k1]; int l5 = k2 - myPlayer.gr / 128; int k7 = i4 - myPlayer.hr / 128; byte byte2 = 9; if(k2 >= 0 && i4 >= 0 && k2 < 96 && i4 < 96 && l5 > -byte2 && l5 < byte2 && k7 > -byte2 && k7 < byte2) { zt.zh(vw[k1]); String s3 = "firea" + (qu + 1); int k14 = q.op(s3); h h3 = ax[k14].qe(); zt.uh(h3); h3.se(true, 48, 48, -50, -10, -50); h3.yd(vw[k1]); h3.uh = k1; vw[k1] = h3; } } if(yw[k1] == 274) { int l2 = ww[k1]; int j4 = xw[k1]; int i6 = l2 - myPlayer.gr / 128; int i8 = j4 - myPlayer.hr / 128; byte byte3 = 9; if(l2 >= 0 && j4 >= 0 && l2 < 96 && j4 < 96 && i6 > -byte3 && i6 < byte3 && i8 > -byte3 && i8 < byte3) { zt.zh(vw[k1]); String s4 = "fireplacea" + (qu + 1); int l14 = q.op(s4); h h4 = ax[l14].qe(); zt.uh(h4); h4.se(true, 48, 48, -50, -10, -50); h4.yd(vw[k1]); h4.uh = k1; vw[k1] = h4; } } } } zt.ki(xv); xv = 0; for(int l1 = 0; l1 < vv; l1++) { MobileEntity l3 = zv[l1]; if(l3.cs != 255) { int k4 = l3.gr; int j6 = l3.hr; int j8 = -wu.oo(k4, j6); int k9 = zt.lh(5000 + l1, k4, j8, j6, 145, 220, l1 + 10000); xv++; if(l3 == myPlayer) zt.mh(k9); if(l3.kr == 8) zt.ni(k9, -30); if(l3.kr == 9) zt.ni(k9, 30); } } for(int i3 = 0; i3 < vv; i3++) { MobileEntity l4 = zv[i3]; if(l4.hs > 0) { MobileEntity l6 = null; if(l4.gs != -1) l6 = jw[l4.gs]; else if(l4.fs != -1) l6 = yv[l4.fs]; if(l6 != null) { int k8 = l4.gr; int l9 = l4.hr; int j12 = -wu.oo(k8, l9) - 110; int i15 = l6.gr; int l15 = l6.hr; int i16 = -wu.oo(i15, l15) - q.kkb[l6.ir] / 2; int j16 = (k8 * l4.hs + i15 * (nu - l4.hs)) / nu; int k16 = (j12 * l4.hs + i16 * (nu - l4.hs)) / nu; int l16 = (l9 * l4.hs + l15 * (nu - l4.hs)) / nu; zt.lh(ku + l4.es, j16, k16, l16, 32, 32, 0); xv++; } } } for(int i5 = 0; i5 < hw; i5++) { MobileEntity l7 = kw[i5]; int l8 = l7.gr; int i10 = l7.hr; int k12 = -wu.oo(l8, i10); int j15 = zt.lh(20000 + i5, l8, k12, i10, q.jkb[l7.ir], q.kkb[l7.ir], i5 + 30000); xv++; if(l7.kr == 8) zt.ni(j15, -30); if(l7.kr == 9) zt.ni(j15, 30); } for(int k6 = 0; k6 < ow; k6++) { int i9 = pw[k6] * cu + 64; int j10 = qw[k6] * cu + 64; zt.lh(40000 + rw[k6], i9, -wu.oo(i9, j10) - sw[k6], j10, 96, 64, k6 + 20000); xv++; } for(int j9 = 0; j9 < ihb; j9++) { int k10 = jhb[j9] * cu + 64; int l12 = khb[j9] * cu + 64; int k15 = mhb[j9]; if(k15 == 0) { zt.lh(50000 + j9, k10, -wu.oo(k10, l12), l12, 128, 256, j9 + 50000); xv++; } if(k15 == 1) { zt.lh(50000 + j9, k10, -wu.oo(k10, l12), l12, 128, 64, j9 + 50000); xv++; } } gameGraphics.wk = false; gameGraphics.lf(); gameGraphics.wk = super.xq; if(av == 3) { int l10 = 40 + (int)(Math.random() * 3D); int i13 = 40 + (int)(Math.random() * 7D); zt.yi(l10, i13, -50, -10, -50); } egb = 0; yfb = 0; jgb = 0; if(ry) { if(sy && !mv) { int i11 = pv; ll(); if(pv != i11) { nv = myPlayer.gr; ov = myPlayer.hr; } } zt.im = 3000; zt.jm = 3000; zt.km = 1; zt.lm = 2800; rv = pv * 32; int j11 = nv + tt; int j13 = ov + vt; zt.ai(j11, -wu.oo(j11, j13), j13, 912, rv * 4, 0, 2000); } else { if(sy && !mv) ll(); if(!super.xq) { zt.im = 2400; zt.jm = 2400; zt.km = 1; zt.lm = 2300; } else { zt.im = 2200; zt.jm = 2200; zt.km = 1; zt.lm = 2100; } int k11 = nv + tt; int k13 = ov + vt; zt.ai(k11, -wu.oo(k11, k13), k13, 912, rv * 4, 0, cameraZoom * 2); } zt.wi(); pl(); if(tu > 0) gameGraphics.xg(uu - 8, vu - 8, hu + 14 + (24 - tu) / 6); if(tu < 0) gameGraphics.xg(uu - 8, vu - 8, hu + 18 + (24 + tu) / 6); if(!idb) { int l11 = 2203 - (dw + yu + cv); if(cw + xu + bv >= 2640) l11 = -50; if(l11 > 0) { int l13 = 1 + l11 / 6; gameGraphics.xg(453, windowHeight - 56, hu + 13); gameGraphics.ug("Wilderness", 465, windowHeight - 20, 1, 0xffff00); gameGraphics.ug("Level: " + l13, 465, windowHeight - 7, 1, 0xffff00); if(wildernessStatus == 0) wildernessStatus = 2; } if(wildernessStatus == 0 && l11 > -10 && l11 <= 0) wildernessStatus = 1; } if(uz == 0) { for(int i12 = 0; i12 < vz; i12++) if(xz[i12] > 0) { String s5 = wz[i12]; gameGraphics.mf(s5, 7, windowHeight - 18 - i12 * 12, 1, 0xffff00); } } pz.qd(qz); pz.qd(sz); pz.qd(tz); if(uz == 1) pz.ed(qz); else if(uz == 2) pz.ed(sz); else if(uz == 3) pz.ed(tz); g.ng = 2; pz.hc(); g.ng = 0; gameGraphics.qg(((i) (gameGraphics)).yj - 3 - 197, 3, hu, 128); drawGameWindowsAndMenus(); gameGraphics.al = false; drawChatTabs(); gameGraphics.jf(yt, 0, 0); } public void drawChatTabs() { gameGraphics.xg(0, windowHeight - 4, hu + 23); int i1 = i.kg(200, 200, 255); if(uz == 0) i1 = i.kg(255, 200, 50); if(lz % 30 > 15) i1 = i.kg(255, 50, 50); gameGraphics.ug("All messages", 54, windowHeight + 6, 0, i1); i1 = i.kg(200, 200, 255); if(uz == 1) i1 = i.kg(255, 200, 50); if(mz % 30 > 15) i1 = i.kg(255, 50, 50); gameGraphics.ug("Chat history", 155, windowHeight + 6, 0, i1); i1 = i.kg(200, 200, 255); if(uz == 2) i1 = i.kg(255, 200, 50); if(nz % 30 > 15) i1 = i.kg(255, 50, 50); gameGraphics.ug("Quest history", 255, windowHeight + 6, 0, i1); i1 = i.kg(200, 200, 255); if(uz == 3) i1 = i.kg(255, 200, 50); if(oz % 30 > 15) i1 = i.kg(255, 50, 50); gameGraphics.ug("Private history", 355, windowHeight + 6, 0, i1); } public void yl(int i1, int j1, int k1, int l1, int i2, int j2, int k2) { int l2 = mhb[i2]; int i3 = lhb[i2]; if(l2 == 0) { int j3 = 255 + i3 * 5 * 256; gameGraphics.zf(i1 + k1 / 2, j1 + l1 / 2, 20 + i3 * 2, j3, 255 - i3 * 5); } if(l2 == 1) { int k3 = 0xff0000 + i3 * 5 * 256; gameGraphics.zf(i1 + k1 / 2, j1 + l1 / 2, 10 + i3, k3, 255 - i3 * 5); } } public void vm(int i1, int j1, int k1, int l1, int i2, int j2, int k2) { int l2 = q.njb[i2] + ju; int i3 = q.sjb[i2]; gameGraphics.wf(i1, j1, k1, l1, l2, i3, 0, 0, false); } public void an(int i1, int j1, int k1, int l1, int i2, int j2, int k2) { MobileEntity l2 = kw[i2]; int i3 = l2.kr + (rv + 16) / 32 & 7; boolean flag = false; int j3 = i3; if(j3 == 5) { j3 = 3; flag = true; } else if(j3 == 6) { j3 = 2; flag = true; } else if(j3 == 7) { j3 = 1; flag = true; } int k3 = j3 * 3 + dhb[(l2.jr / q.lkb[l2.ir]) % 4]; if(l2.kr == 8) { j3 = 5; i3 = 2; flag = false; i1 -= (q.nkb[l2.ir] * k2) / 100; k3 = j3 * 3 + ehb[(kt / (q.mkb[l2.ir] - 1)) % 8]; } else if(l2.kr == 9) { j3 = 5; i3 = 2; flag = true; i1 += (q.nkb[l2.ir] * k2) / 100; k3 = j3 * 3 + fhb[(kt / q.mkb[l2.ir]) % 8]; } for(int l3 = 0; l3 < 12; l3++) { int i4 = pgb[i3][l3]; int l4 = q.ekb[l2.ir][i4]; if(l4 >= 0) { int j5 = 0; int k5 = 0; int l5 = k3; if(flag && j3 >= 1 && j3 <= 3 && q.wkb[l4] == 1) l5 += 15; if(j3 != 5 || q.vkb[l4] == 1) { int i6 = l5 + q.xkb[l4]; j5 = (j5 * k1) / ((i) (gameGraphics)).pk[i6]; k5 = (k5 * l1) / ((i) (gameGraphics)).qk[i6]; int j6 = (k1 * ((i) (gameGraphics)).pk[i6]) / ((i) (gameGraphics)).pk[q.xkb[l4]]; j5 -= (j6 - k1) / 2; int k6 = q.tkb[l4]; int l6 = 0; if(k6 == 1) { k6 = q.fkb[l2.ir]; l6 = q.ikb[l2.ir]; } else if(k6 == 2) { k6 = q.gkb[l2.ir]; l6 = q.ikb[l2.ir]; } else if(k6 == 3) { k6 = q.hkb[l2.ir]; l6 = q.ikb[l2.ir]; } gameGraphics.wf(i1 + j5, j1 + k5, j6, l1, i6, k6, l6, j2, flag); } } } if(l2.sr > 0) { cgb[yfb] = gameGraphics.df(l2.rr, 1) / 2; if(cgb[yfb] > 150) cgb[yfb] = 150; dgb[yfb] = (gameGraphics.df(l2.rr, 1) / 300) * gameGraphics.ng(1); agb[yfb] = i1 + k1 / 2; bgb[yfb] = j1; zfb[yfb++] = l2.rr; } if(l2.kr == 8 || l2.kr == 9 || l2.yr != 0) { if(l2.yr > 0) { int j4 = i1; if(l2.kr == 8) j4 -= (20 * k2) / 100; else if(l2.kr == 9) j4 += (20 * k2) / 100; int i5 = (l2.wr * 30) / l2.xr; kgb[jgb] = j4 + k1 / 2; lgb[jgb] = j1; mgb[jgb++] = i5; } if(l2.yr > 150) { int k4 = i1; if(l2.kr == 8) k4 -= (10 * k2) / 100; else if(l2.kr == 9) k4 += (10 * k2) / 100; gameGraphics.xg((k4 + k1 / 2) - 12, (j1 + l1 / 2) - 12, hu + 12); gameGraphics.ug(String.valueOf(l2.vr), (k4 + k1 / 2) - 1, j1 + l1 / 2 + 5, 3, 0xffffff); } } } public void ml(int i1, int j1, int k1, int l1, int i2, int j2, int k2) { MobileEntity l2 = zv[i2]; if(l2.cs == 255) return; int i3 = l2.kr + (rv + 16) / 32 & 7; boolean flag = false; int j3 = i3; if(j3 == 5) { j3 = 3; flag = true; } else if(j3 == 6) { j3 = 2; flag = true; } else if(j3 == 7) { j3 = 1; flag = true; } int k3 = j3 * 3 + dhb[(l2.jr / 6) % 4]; if(l2.kr == 8) { j3 = 5; i3 = 2; flag = false; i1 -= (5 * k2) / 100; k3 = j3 * 3 + ehb[(kt / 5) % 8]; } else if(l2.kr == 9) { j3 = 5; i3 = 2; flag = true; i1 += (5 * k2) / 100; k3 = j3 * 3 + fhb[(kt / 6) % 8]; } for(int l3 = 0; l3 < 12; l3++) { int i4 = pgb[i3][l3]; int i5 = l2.qr[i4] - 1; if(i5 >= 0) { int l5 = 0; int j6 = 0; int k6 = k3; if(flag && j3 >= 1 && j3 <= 3) if(q.wkb[i5] == 1) k6 += 15; else if(i4 == 4 && j3 == 1) { l5 = -22; j6 = -3; k6 = j3 * 3 + dhb[(2 + l2.jr / 6) % 4]; } else if(i4 == 4 && j3 == 2) { l5 = 0; j6 = -8; k6 = j3 * 3 + dhb[(2 + l2.jr / 6) % 4]; } else if(i4 == 4 && j3 == 3) { l5 = 26; j6 = -5; k6 = j3 * 3 + dhb[(2 + l2.jr / 6) % 4]; } else if(i4 == 3 && j3 == 1) { l5 = 22; j6 = 3; k6 = j3 * 3 + dhb[(2 + l2.jr / 6) % 4]; } else if(i4 == 3 && j3 == 2) { l5 = 0; j6 = 8; k6 = j3 * 3 + dhb[(2 + l2.jr / 6) % 4]; } else if(i4 == 3 && j3 == 3) { l5 = -26; j6 = 5; k6 = j3 * 3 + dhb[(2 + l2.jr / 6) % 4]; } if(j3 != 5 || q.vkb[i5] == 1) { int l6 = k6 + q.xkb[i5]; l5 = (l5 * k1) / ((i) (gameGraphics)).pk[l6]; j6 = (j6 * l1) / ((i) (gameGraphics)).qk[l6]; int i7 = (k1 * ((i) (gameGraphics)).pk[l6]) / ((i) (gameGraphics)).pk[q.xkb[i5]]; l5 -= (i7 - k1) / 2; int j7 = q.tkb[i5]; int k7 = chb[l2.ds]; if(j7 == 1) j7 = bhb[l2.as]; else if(j7 == 2) j7 = ahb[l2.bs]; else if(j7 == 3) j7 = ahb[l2.cs]; gameGraphics.wf(i1 + l5, j1 + j6, i7, l1, l6, j7, k7, j2, flag); } } } if(l2.sr > 0) { cgb[yfb] = gameGraphics.df(l2.rr, 1) / 2; if(cgb[yfb] > 150) cgb[yfb] = 150; dgb[yfb] = (gameGraphics.df(l2.rr, 1) / 300) * gameGraphics.ng(1); agb[yfb] = i1 + k1 / 2; bgb[yfb] = j1; zfb[yfb++] = l2.rr; } if(l2.ur > 0) { fgb[egb] = i1 + k1 / 2; ggb[egb] = j1; hgb[egb] = k2; igb[egb++] = l2.tr; } if(l2.kr == 8 || l2.kr == 9 || l2.yr != 0) { if(l2.yr > 0) { int j4 = i1; if(l2.kr == 8) j4 -= (20 * k2) / 100; else if(l2.kr == 9) j4 += (20 * k2) / 100; int j5 = (l2.wr * 30) / l2.xr; kgb[jgb] = j4 + k1 / 2; lgb[jgb] = j1; mgb[jgb++] = j5; } if(l2.yr > 150) { int k4 = i1; if(l2.kr == 8) k4 -= (10 * k2) / 100; else if(l2.kr == 9) k4 += (10 * k2) / 100; gameGraphics.xg((k4 + k1 / 2) - 12, (j1 + l1 / 2) - 12, hu + 11); gameGraphics.ug(String.valueOf(l2.vr), (k4 + k1 / 2) - 1, j1 + l1 / 2 + 5, 3, 0xffffff); } } if(l2.ks == 1 && l2.ur == 0) { int l4 = j2 + i1 + k1 / 2; if(l2.kr == 8) l4 -= (20 * k2) / 100; else if(l2.kr == 9) l4 += (20 * k2) / 100; int k5 = (16 * k2) / 100; int i6 = (16 * k2) / 100; gameGraphics.nf(l4 - k5 / 2, j1 - i6 / 2 - (10 * k2) / 100, k5, i6, hu + 13); } } public void pl() { for(int i1 = 0; i1 < yfb; i1++) { int j1 = gameGraphics.ng(1); int l1 = agb[i1]; int k2 = bgb[i1]; int j3 = cgb[i1]; int i4 = dgb[i1]; boolean flag = true; while(flag) { flag = false; for(int i5 = 0; i5 < i1; i5++) if(k2 + i4 > bgb[i5] - j1 && k2 - j1 < bgb[i5] + dgb[i5] && l1 - j3 < agb[i5] + cgb[i5] && l1 + j3 > agb[i5] - cgb[i5] && bgb[i5] - j1 - i4 < k2) { k2 = bgb[i5] - j1 - i4; flag = true; } } bgb[i1] = k2; gameGraphics.ah(zfb[i1], l1, k2, 1, 0xffff00, 300); } for(int k1 = 0; k1 < egb; k1++) { int i2 = fgb[k1]; int l2 = ggb[k1]; int k3 = hgb[k1]; int j4 = igb[k1]; int l4 = (39 * k3) / 100; int j5 = (27 * k3) / 100; int k5 = l2 - j5; gameGraphics.pg(i2 - l4 / 2, k5, l4, j5, hu + 9, 85); int l5 = (36 * k3) / 100; int i6 = (24 * k3) / 100; gameGraphics.wf(i2 - l5 / 2, (k5 + j5 / 2) - i6 / 2, l5, i6, q.njb[j4] + ju, q.sjb[j4], 0, 0, false); } for(int j2 = 0; j2 < jgb; j2++) { int i3 = kgb[j2]; int l3 = lgb[j2]; int k4 = mgb[j2]; gameGraphics.uf(i3 - 15, l3 - 3, k4, 5, 65280, 192); gameGraphics.uf((i3 - 15) + k4, l3 - 3, 30 - k4, 5, 0xff0000, 192); } } public int gl(int i1) { int j1 = 0; for(int k1 = 0; k1 < mx; k1++) if(nx[k1] == i1) if(q.pjb[i1] == 1) j1++; else j1 += ox[k1]; return j1; } public boolean nm(int i1, int j1) { if(i1 == 31 && (xm(197) || xm(615) || xm(682))) return true; if(i1 == 32 && (xm(102) || xm(616) || xm(683))) return true; if(i1 == 33 && (xm(101) || xm(617) || xm(684))) return true; if(i1 == 34 && (xm(103) || xm(618) || xm(685))) return true; else return gl(i1) >= j1; } public boolean xm(int i1) { for(int j1 = 0; j1 < mx; j1++) if(nx[j1] == i1 && px[j1] == 1) return true; return false; } public void zm(int i1, int j1, int k1) { gameGraphics.lg(i1, j1, k1); gameGraphics.lg(i1 - 1, j1, k1); gameGraphics.lg(i1 + 1, j1, k1); gameGraphics.lg(i1, j1 - 1, k1); gameGraphics.lg(i1, j1 + 1, k1); } public void cl(int i1, int j1, int k1, int l1, boolean flag) { xl(i1, j1, k1, l1, k1, l1, false, flag); } public void im(int i1, int j1, int k1, int l1, boolean flag) { if(xl(i1, j1, k1, l1, k1, l1, false, flag)) { return; } else { xl(i1, j1, k1, l1, k1, l1, true, flag); return; } } public void kk(int i1, int j1, int k1, int l1) { int i2; int j2; if(k1 == 0 || k1 == 4) { i2 = q.elb[l1]; j2 = q.flb[l1]; } else { j2 = q.elb[l1]; i2 = q.flb[l1]; } if(q.glb[l1] == 2 || q.glb[l1] == 3) { if(k1 == 0) { i1--; i2++; } if(k1 == 2) j2++; if(k1 == 4) i2++; if(k1 == 6) { j1--; j2++; } xl(cw, dw, i1, j1, (i1 + i2) - 1, (j1 + j2) - 1, false, true); return; } else { xl(cw, dw, i1, j1, (i1 + i2) - 1, (j1 + j2) - 1, true, true); return; } } public void zk(int i1, int j1, int k1) { if(k1 == 0) { xl(cw, dw, i1, j1 - 1, i1, j1, false, true); return; } if(k1 == 1) { xl(cw, dw, i1 - 1, j1, i1, j1, false, true); return; } else { xl(cw, dw, i1, j1, i1, j1, true, true); return; } } public boolean xl(int i1, int j1, int k1, int l1, int i2, int j2, boolean flag, boolean flag1) { int k2 = wu.ho(i1, j1, k1, l1, i2, j2, ot, pt, flag); if(k2 == -1) return false; k2--; i1 = ot[k2]; j1 = pt[k2]; k2--; if(flag1) super.streamManager.createPacket(215); else super.streamManager.createPacket(255); super.streamManager.writeWord(i1 + bv); super.streamManager.writeWord(j1 + cv); for(int l2 = k2; l2 >= 0 && l2 > k2 - 25; l2--) { super.streamManager.writeByte(ot[l2] - i1); super.streamManager.writeByte(pt[l2] - j1); } super.streamManager.formatPacket(); tu = -24; uu = super.mouseX; vu = super.mouseY; return true; } public boolean tm(int i1, int j1) { if(gdb != 0) { wu.cjb = false; return false; } idb = false; i1 += xu; j1 += yu; if(av == dv && i1 > ev && i1 < gv && j1 > fv && j1 < hv) { wu.cjb = true; return false; } gameGraphics.ug("Loading... Please wait", 256, 192, 1, 0xffffff); drawChatTabs(); gameGraphics.jf(yt, 0, 0); int k1 = bv; int l1 = cv; int i2 = (i1 + 24) / 48; int j2 = (j1 + 24) / 48; av = dv; bv = i2 * 48 - 48; cv = j2 * 48 - 48; ev = i2 * 48 - 32; fv = j2 * 48 - 32; gv = i2 * 48 + 32; hv = j2 * 48 + 32; wu.xo(i1, j1, av); bv -= xu; cv -= yu; int k2 = bv - k1; int l2 = cv - l1; for(int i3 = 0; i3 < uw; i3++) { ww[i3] -= k2; xw[i3] -= l2; int j3 = ww[i3]; int l3 = xw[i3]; int k4 = yw[i3]; h h1 = vw[i3]; try { int i6 = zw[i3]; int i7; int k7; if(i6 == 0 || i6 == 4) { i7 = q.elb[k4]; k7 = q.flb[k4]; } else { k7 = q.elb[k4]; i7 = q.flb[k4]; } int l7 = ((j3 + j3 + i7) * cu) / 2; int i8 = ((l3 + l3 + k7) * cu) / 2; if(j3 >= 0 && l3 >= 0 && j3 < 96 && l3 < 96) { zt.uh(h1); h1.ge(l7, -wu.oo(l7, i8), i8); wu.vo(j3, l3, k4); if(k4 == 74) h1.zd(0, -480, 0); } } catch(RuntimeException runtimeexception) { System.out.println("Loc Error: " + runtimeexception.getMessage()); System.out.println("i:" + i3 + " obj:" + h1); runtimeexception.printStackTrace(); } } for(int k3 = 0; k3 < dx; k3++) { fx[k3] -= k2; gx[k3] -= l2; int i4 = fx[k3]; int l4 = gx[k3]; int j5 = ix[k3]; int j6 = hx[k3]; try { wu.hp(i4, l4, j6, j5); h h2 = cm(i4, l4, j6, j5, k3); ex[k3] = h2; } catch(RuntimeException runtimeexception1) { System.out.println("Bound Error: " + runtimeexception1.getMessage()); runtimeexception1.printStackTrace(); } } for(int j4 = 0; j4 < ow; j4++) { pw[j4] -= k2; qw[j4] -= l2; } for(int i5 = 0; i5 < vv; i5++) { MobileEntity l5 = zv[i5]; l5.gr -= k2 * cu; l5.hr -= l2 * cu; for(int k6 = 0; k6 <= l5.nr; k6++) { l5.or[k6] -= k2 * cu; l5.pr[k6] -= l2 * cu; } } for(int k5 = 0; k5 < hw; k5++) { MobileEntity l6 = kw[k5]; l6.gr -= k2 * cu; l6.hr -= l2 * cu; for(int j7 = 0; j7 <= l6.nr; j7++) { l6.or[j7] -= k2 * cu; l6.pr[j7] -= l2 * cu; } } wu.cjb = true; return true; } public h cm(int i1, int j1, int k1, int l1, int i2) { int j2 = i1; int k2 = j1; int l2 = i1; int i3 = j1; int j3 = q.olb[l1]; int k3 = q.plb[l1]; int l3 = q.nlb[l1]; h h1 = new h(4, 1); if(k1 == 0) l2 = i1 + 1; if(k1 == 1) i3 = j1 + 1; if(k1 == 2) { j2 = i1 + 1; i3 = j1 + 1; } if(k1 == 3) { l2 = i1 + 1; i3 = j1 + 1; } j2 *= cu; k2 *= cu; l2 *= cu; i3 *= cu; int i4 = h1.oe(j2, -wu.oo(j2, k2), k2); int j4 = h1.oe(j2, -wu.oo(j2, k2) - l3, k2); int k4 = h1.oe(l2, -wu.oo(l2, i3) - l3, i3); int l4 = h1.oe(l2, -wu.oo(l2, i3), i3); int ai[] = { i4, j4, k4, l4 }; h1.ne(4, ai, j3, k3); h1.se(false, 60, 24, -50, -10, -50); if(i1 >= 0 && j1 >= 0 && i1 < 96 && j1 < 96) zt.uh(h1); h1.uh = i2 + 10000; return h1; } public void drawGameWindowsAndMenus() { if(edb != 0) displayLoggingOutDialog(); else if(showWelcomeDialog) drawWelcomeDialog(); else if(showNonMembersServerDialog) drawNonMembersServerDialog(); else if(wildernessStatus == 1) drawWildernessWarningDialog(); else if(showBankWindow && fdb == 0) drawBankWindow(); else if(showShopWindow && fdb == 0) drawShopWindow(); else if(showTradeConfirmationDialog) drawTradeConfirmationDialog(); else if(showTradeWindow) drawTradeWindow(); else if(showDuelConfirmationDialog) drawDuelConfirmationDialog(); else if(showDuelWindow) drawDuelWindow(); else if(scb != 0) sl(); else if(rcb != 0) { hk(); } else { if(ncb) hl(); if(myPlayer.kr == 8 || myPlayer.kr == 9) xk(); tk(); boolean flag = !ncb && !vy; if(flag) az = 0; if(kx == 0 && flag) dl(); if(kx == 1) tl(flag); if(kx == 2) ok(flag); if(kx == 3) ql(flag); if(kx == 4) ym(flag); if(kx == 5) lk(flag); if(kx == 6) wm(flag); if(!vy && !ncb) bl(); if(vy && !ncb) pm(); } mouseButtonClicked = 0; } public void hl() { if(mouseButtonClicked != 0) { for(int i1 = 0; i1 < ocb; i1++) { if(super.mouseX >= gameGraphics.df(pcb[i1], 1) || super.mouseY <= i1 * 12 || super.mouseY >= 12 + i1 * 12) continue; super.streamManager.createPacket(237); super.streamManager.writeByte(i1); super.streamManager.formatPacket(); break; } mouseButtonClicked = 0; ncb = false; return; } for(int j1 = 0; j1 < ocb; j1++) { int k1 = 65535; if(super.mouseX < gameGraphics.df(pcb[j1], 1) && super.mouseY > j1 * 12 && super.mouseY < 12 + j1 * 12) k1 = 0xff0000; gameGraphics.mf(pcb[j1], 6, 12 + j1 * 12, 1, k1); } } public void xk() { byte byte0 = 7; byte byte1 = 15; char c1 = '\257'; if(mouseButtonClicked != 0) { for(int i1 = 0; i1 < 5; i1++) { if(i1 <= 0 || super.mouseX <= byte0 || super.mouseX >= byte0 + c1 || super.mouseY <= byte1 + i1 * 20 || super.mouseY >= byte1 + i1 * 20 + 20) continue; qcb = i1 - 1; mouseButtonClicked = 0; super.streamManager.createPacket(231); super.streamManager.writeByte(qcb); super.streamManager.formatPacket(); break; } } for(int j1 = 0; j1 < 5; j1++) { if(j1 == qcb + 1) gameGraphics.uf(byte0, byte1 + j1 * 20, c1, 20, i.kg(255, 0, 0), 128); else gameGraphics.uf(byte0, byte1 + j1 * 20, c1, 20, i.kg(190, 190, 190), 128); gameGraphics.rg(byte0, byte1 + j1 * 20, c1, 0); gameGraphics.rg(byte0, byte1 + j1 * 20 + 20, c1, 0); } gameGraphics.ug("Select combat style", byte0 + c1 / 2, byte1 + 16, 3, 0xffffff); gameGraphics.ug("Controlled (+1 of each)", byte0 + c1 / 2, byte1 + 36, 3, 0); gameGraphics.ug("Aggressive (+3 strength)", byte0 + c1 / 2, byte1 + 56, 3, 0); gameGraphics.ug("Accurate (+3 attack)", byte0 + c1 / 2, byte1 + 76, 3, 0); gameGraphics.ug("Defensive (+3 defense)", byte0 + c1 / 2, byte1 + 96, 3, 0); } public void drawWelcomeDialog() { char c1 = '\264'; int i1 = 167 - c1 / 2; gameGraphics.yf(56, 167 - c1 / 2, 400, c1, 0); gameGraphics.qf(56, 167 - c1 / 2, 400, c1, 0xffffff); i1 += 20; gameGraphics.ug("Welcome to RuneScape " + heb, 256, i1, 4, 0xffff00); i1 += 30; gameGraphics.ug("You last logged in " + zcb / 1440 + " days, " + (zcb / 60) % 24 + " hours ago", 256, i1, 1, 0xffffff); i1 += 15; if(ycb == null) ycb = RawDataOperations.formatIpAddress(xcb); gameGraphics.ug("from: " + ycb, 256, i1, 1, 0xffffff); i1 += 15; i1 += 15; if(adb != 0) { int j1 = 1 + adb / 1440; if(j1 > 14) j1 = 14; String s1; if(j1 == 14) s1 = "Earlier today"; else if(j1 == 13) s1 = "Yesterday"; else s1 = (14 - j1) + " days ago"; gameGraphics.ug(s1 + " you requested new recovery questions", 256, i1, 1, 0xff8000); i1 += 15; gameGraphics.ug("If you do not remember making this request then", 256, i1, 1, 0xff8000); i1 += 15; gameGraphics.ug("cancel it and change your password immediately!", 256, i1, 1, 0xff8000); i1 += 15; i1 += 15; int l1 = 0xffffff; if(super.mouseY > i1 - 12 && super.mouseY <= i1 && super.mouseX > 106 && super.mouseX < 406) l1 = 0xff0000; gameGraphics.ug("No that wasn't me - Cancel the request!", 256, i1, 1, l1); if(l1 == 0xff0000 && mouseButtonClicked == 1) { super.streamManager.createPacket(196); super.streamManager.formatPacket(); showWelcomeDialog = false; } i1 += 15; l1 = 0xffffff; if(super.mouseY > i1 - 12 && super.mouseY <= i1 && super.mouseX > 106 && super.mouseX < 406) l1 = 0xff0000; gameGraphics.ug("That's ok, activate the new questions in " + j1 + " days time", 256, i1, 1, l1); if(l1 == 0xff0000 && mouseButtonClicked == 1) showWelcomeDialog = false; } else { i1 += 7; gameGraphics.ug("Security tip of the day", 256, i1, 1, 0xff0000); i1 += 15; if(bdb == 0) { gameGraphics.ug("Don't tell ANYONE your password or recovery questions!", 256, i1, 1, 0xffffff); i1 += 15; gameGraphics.ug("Not even people claiming to be Jagex staff.", 256, i1, 1, 0xffffff); i1 += 15; } if(bdb == 1) { gameGraphics.ug("Never enter your password or recovery questions into ANY", 256, i1, 1, 0xffffff); i1 += 15; gameGraphics.ug("website other than this one - Not even if it looks similar.", 256, i1, 1, 0xffffff); i1 += 15; } if(bdb == 2) { gameGraphics.ug("Don't use RuneScape cheats, helpers, or automaters.", 256, i1, 1, 0xffffff); i1 += 15; gameGraphics.ug("These programs WILL steal your password.", 256, i1, 1, 0xffffff); i1 += 15; } if(bdb == 3) { gameGraphics.ug("Watch out for fake emails, and fake staff. Real staff", 256, i1, 1, 0xffffff); i1 += 15; gameGraphics.ug("will NEVER ask you for your password or recovery questions!", 256, i1, 1, 0xffffff); i1 += 15; } if(bdb == 4) { gameGraphics.ug("Use a password your friends won't guess. Do NOT use your name!", 256, i1, 1, 0xffffff); i1 += 15; gameGraphics.ug("Choose a unique password which you haven't used anywhere else", 256, i1, 1, 0xffffff); i1 += 15; } if(bdb == 5) { gameGraphics.ug("If possible only play runescape from your own computer, ", 256, i1, 1, 0xffffff); i1 += 15; gameGraphics.ug("Other machines could have been tampered with to steal your pass", 256, i1, 1, 0xffffff); i1 += 15; } i1 += 22; int k1 = 0xffffff; if(super.mouseY > i1 - 12 && super.mouseY <= i1 && super.mouseX > 106 && super.mouseX < 406) k1 = 0xff0000; gameGraphics.ug("Click here to close window", 256, i1, 1, k1); if(mouseButtonClicked == 1) { if(k1 == 0xff0000) showWelcomeDialog = false; if((super.mouseX < 86 || super.mouseX > 426) && (super.mouseY < 167 - c1 / 2 || super.mouseY > 167 + c1 / 2)) showWelcomeDialog = false; } } mouseButtonClicked = 0; } public void drawNonMembersServerDialog() { char c1 = '\u0190'; byte byte0 = 100; gameGraphics.yf(256 - c1 / 2, 167 - byte0 / 2, c1, byte0, 0); gameGraphics.qf(256 - c1 / 2, 167 - byte0 / 2, c1, byte0, 0xffffff); gameGraphics.ah(ddb, 256, 137, 1, 0xffffff, c1 - 40); int i1 = 157 + byte0 / 2; int j1 = 0xffffff; if(super.mouseY > i1 - 12 && super.mouseY <= i1 && super.mouseX > 106 && super.mouseX < 406) j1 = 0xff0000; gameGraphics.ug("Click here to close window", 256, i1, 1, j1); if(mouseButtonClicked == 1) { if(j1 == 0xff0000) showNonMembersServerDialog = false; if((super.mouseX < 256 - c1 / 2 || super.mouseX > 256 + c1 / 2) && (super.mouseY < 167 - byte0 / 2 || super.mouseY > 167 + byte0 / 2)) showNonMembersServerDialog = false; } mouseButtonClicked = 0; } public void displayLoggingOutDialog() { gameGraphics.yf(126, 137, 260, 60, 0); gameGraphics.qf(126, 137, 260, 60, 0xffffff); gameGraphics.ug("Logging out...", 256, 173, 5, 0xffffff); } public void drawWildernessWarningDialog() { int i1 = 97; gameGraphics.yf(86, 77, 340, 180, 0); gameGraphics.qf(86, 77, 340, 180, 0xffffff); gameGraphics.ug("Warning! Proceed with caution", 256, i1, 4, 0xff0000); i1 += 26; gameGraphics.ug("If you go much further north you will enter the", 256, i1, 1, 0xffffff); i1 += 13; gameGraphics.ug("wilderness. This a very dangerous area where", 256, i1, 1, 0xffffff); i1 += 13; gameGraphics.ug("other players can attack you!", 256, i1, 1, 0xffffff); i1 += 22; gameGraphics.ug("The further north you go the more dangerous it", 256, i1, 1, 0xffffff); i1 += 13; gameGraphics.ug("becomes, but the more treasure you will find.", 256, i1, 1, 0xffffff); i1 += 22; gameGraphics.ug("In the wilderness an indicator at the bottom-right", 256, i1, 1, 0xffffff); i1 += 13; gameGraphics.ug("of the screen will show the current level of danger", 256, i1, 1, 0xffffff); i1 += 22; int j1 = 0xffffff; if(super.mouseY > i1 - 12 && super.mouseY <= i1 && super.mouseX > 181 && super.mouseX < 331) j1 = 0xff0000; gameGraphics.ug("Click here to close window", 256, i1, 1, j1); if(mouseButtonClicked != 0) { if(super.mouseY > i1 - 12 && super.mouseY <= i1 && super.mouseX > 181 && super.mouseX < 331) wildernessStatus = 2; if(super.mouseX < 86 || super.mouseX > 426 || super.mouseY < 77 || super.mouseY > 257) wildernessStatus = 2; mouseButtonClicked = 0; } } public void sl() { if(mouseButtonClicked != 0) { mouseButtonClicked = 0; if(super.mouseX < 106 || super.mouseY < 150 || super.mouseX > 406 || super.mouseY > 210) { scb = 0; return; } } int i1 = 150; gameGraphics.yf(106, i1, 300, 60, 0); gameGraphics.qf(106, i1, 300, 60, 0xffffff); i1 += 22; if(scb == 6) { gameGraphics.ug("Please enter your current password", 256, i1, 4, 0xffffff); i1 += 25; String s1 = "*"; for(int j1 = 0; j1 < super.yq.length(); j1++) s1 = "X" + s1; gameGraphics.ug(s1, 256, i1, 4, 0xffffff); if(super.zq.length() > 0) { tcb = super.zq; super.yq = ""; super.zq = ""; scb = 1; return; } } else if(scb == 1) { gameGraphics.ug("Please enter your new password", 256, i1, 4, 0xffffff); i1 += 25; String s2 = "*"; for(int k1 = 0; k1 < super.yq.length(); k1++) s2 = "X" + s2; gameGraphics.ug(s2, 256, i1, 4, 0xffffff); if(super.zq.length() > 0) { ucb = super.zq; super.yq = ""; super.zq = ""; if(ucb.length() >= 5) { scb = 2; return; } else { scb = 5; return; } } } else if(scb == 2) { gameGraphics.ug("Enter password again to confirm", 256, i1, 4, 0xffffff); i1 += 25; String s3 = "*"; for(int l1 = 0; l1 < super.yq.length(); l1++) s3 = "X" + s3; gameGraphics.ug(s3, 256, i1, 4, 0xffffff); if(super.zq.length() > 0) if(super.zq.equalsIgnoreCase(ucb)) { scb = 4; x(tcb, ucb); return; } else { scb = 3; return; } } else { if(scb == 3) { gameGraphics.ug("Passwords do not match!", 256, i1, 4, 0xffffff); i1 += 25; gameGraphics.ug("Press any key to close", 256, i1, 4, 0xffffff); return; } if(scb == 4) { gameGraphics.ug("Ok, your request has been sent", 256, i1, 4, 0xffffff); i1 += 25; gameGraphics.ug("Press any key to close", 256, i1, 4, 0xffffff); return; } if(scb == 5) { gameGraphics.ug("Password must be at", 256, i1, 4, 0xffffff); i1 += 25; gameGraphics.ug("least 5 letters long", 256, i1, 4, 0xffffff); } } } public void hk() { if(mouseButtonClicked != 0) { mouseButtonClicked = 0; if(rcb == 1 && (super.mouseX < 106 || super.mouseY < 145 || super.mouseX > 406 || super.mouseY > 215)) { rcb = 0; return; } if(rcb == 2 && (super.mouseX < 6 || super.mouseY < 145 || super.mouseX > 506 || super.mouseY > 215)) { rcb = 0; return; } if(rcb == 3 && (super.mouseX < 106 || super.mouseY < 145 || super.mouseX > 406 || super.mouseY > 215)) { rcb = 0; return; } if(super.mouseX > 236 && super.mouseX < 276 && super.mouseY > 193 && super.mouseY < 213) { rcb = 0; return; } } int i1 = 145; if(rcb == 1) { gameGraphics.yf(106, i1, 300, 70, 0); gameGraphics.qf(106, i1, 300, 70, 0xffffff); i1 += 20; gameGraphics.ug("Enter name to add to friends list", 256, i1, 4, 0xffffff); i1 += 20; gameGraphics.ug(super.yq + "*", 256, i1, 4, 0xffffff); if(super.zq.length() > 0) { String s1 = super.zq.trim(); super.yq = ""; super.zq = ""; rcb = 0; if(s1.length() > 0 && RawDataOperations.stringToLongHash(s1) != myPlayer.cr) t(s1); } } if(rcb == 2) { gameGraphics.yf(6, i1, 500, 70, 0); gameGraphics.qf(6, i1, 500, 70, 0xffffff); i1 += 20; gameGraphics.ug("Enter message to send to " + RawDataOperations.longHashToString(jy), 256, i1, 4, 0xffffff); i1 += 20; gameGraphics.ug(super.ar + "*", 256, i1, 4, 0xffffff); if(super.br.length() > 0) { String s2 = super.br; super.ar = ""; super.br = ""; rcb = 0; int k1 = RawDataOperations.generateEncryptedChatString(s2); v(jy, RawDataOperations.encryptedChatString, k1); s2 = RawDataOperations.processEncryptedChatString(RawDataOperations.encryptedChatString, 0, k1, true); g("@pri@You tell " + RawDataOperations.longHashToString(jy) + ": " + s2); } } if(rcb == 3) { gameGraphics.yf(106, i1, 300, 70, 0); gameGraphics.qf(106, i1, 300, 70, 0xffffff); i1 += 20; gameGraphics.ug("Enter name to add to ignore list", 256, i1, 4, 0xffffff); i1 += 20; gameGraphics.ug(super.yq + "*", 256, i1, 4, 0xffffff); if(super.zq.length() > 0) { String s3 = super.zq.trim(); super.yq = ""; super.zq = ""; rcb = 0; if(s3.length() > 0 && RawDataOperations.stringToLongHash(s3) != myPlayer.cr) y(s3); } } int j1 = 0xffffff; if(super.mouseX > 236 && super.mouseX < 276 && super.mouseY > 193 && super.mouseY < 213) j1 = 0xffff00; gameGraphics.ug("Cancel", 256, 208, 1, j1); } public void drawBankWindow() { char c1 = '\u0198'; char c2 = '\u014E'; if(mcb > 0 && gcb <= 48) mcb = 0; if(mcb > 1 && gcb <= 96) mcb = 1; if(jcb >= gcb || jcb < 0) jcb = -1; if(jcb != -1 && hcb[jcb] != kcb) { jcb = -1; kcb = -2; } if(mouseButtonClicked != 0) { mouseButtonClicked = 0; int i1 = super.mouseX - (256 - c1 / 2); int k1 = super.mouseY - (170 - c2 / 2); if(i1 >= 0 && k1 >= 12 && i1 < 408 && k1 < 280) { int i2 = mcb * 48; for(int k2 = 0; k2 < 6; k2++) { for(int k3 = 0; k3 < 8; k3++) { int j4 = 7 + k3 * 49; int i5 = 28 + k2 * 34; if(i1 > j4 && i1 < j4 + 49 && k1 > i5 && k1 < i5 + 34 && i2 < gcb && hcb[i2] != -1) { kcb = hcb[i2]; jcb = i2; } i2++; } } i1 = 256 - c1 / 2; k1 = 170 - c2 / 2; int l3; if(jcb < 0) l3 = -1; else l3 = hcb[jcb]; if(l3 != -1) { int k4 = icb[jcb]; if(q.pjb[l3] == 1 && k4 > 1) k4 = 1; if(k4 >= 1 && super.mouseX >= i1 + 190 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 220 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); if(k4 < 20000) super.streamManager.writeWord(k4); else super.streamManager.writeWord(50000); super.streamManager.formatPacket(); } if(k4 >= 1 && super.mouseX >= i1 + 220 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 250 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); super.streamManager.writeWord(1); super.streamManager.formatPacket(); } if(k4 >= 5 && super.mouseX >= i1 + 250 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 280 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); super.streamManager.writeWord(5); super.streamManager.formatPacket(); } if(k4 >= 25 && super.mouseX >= i1 + 280 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 305 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); super.streamManager.writeWord(25); super.streamManager.formatPacket(); } if(k4 >= 100 && super.mouseX >= i1 + 305 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 335 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); super.streamManager.writeWord(100); super.streamManager.formatPacket(); } if(k4 >= 500 && super.mouseX >= i1 + 335 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 368 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); super.streamManager.writeWord(500); super.streamManager.formatPacket(); } if(k4 >= 2500 && super.mouseX >= i1 + 370 && super.mouseY >= k1 + 238 && super.mouseX < i1 + 400 && super.mouseY <= k1 + 249) { super.streamManager.createPacket(206); super.streamManager.writeWord(l3); super.streamManager.writeWord(2500); super.streamManager.formatPacket(); } if(gl(l3) >= 1 && super.mouseX >= i1 + 190 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 220 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); if(gl(l3) < 20000) super.streamManager.writeWord(gl(l3)); else super.streamManager.writeWord(50000); super.streamManager.formatPacket(); } if(gl(l3) >= 1 && super.mouseX >= i1 + 220 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 250 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); super.streamManager.writeWord(1); super.streamManager.formatPacket(); } if(gl(l3) >= 5 && super.mouseX >= i1 + 250 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 280 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); super.streamManager.writeWord(5); super.streamManager.formatPacket(); } if(gl(l3) >= 25 && super.mouseX >= i1 + 280 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 305 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); super.streamManager.writeWord(25); super.streamManager.formatPacket(); } if(gl(l3) >= 100 && super.mouseX >= i1 + 305 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 335 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); super.streamManager.writeWord(100); super.streamManager.formatPacket(); } if(gl(l3) >= 500 && super.mouseX >= i1 + 335 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 368 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); super.streamManager.writeWord(500); super.streamManager.formatPacket(); } if(gl(l3) >= 2500 && super.mouseX >= i1 + 370 && super.mouseY >= k1 + 263 && super.mouseX < i1 + 400 && super.mouseY <= k1 + 274) { super.streamManager.createPacket(205); super.streamManager.writeWord(l3); super.streamManager.writeWord(2500); super.streamManager.formatPacket(); } } } else if(gcb > 48 && i1 >= 70 && i1 <= 140 && k1 <= 12) mcb = 0; else if(gcb > 48 && i1 >= 140 && i1 <= 210 && k1 <= 12) mcb = 1; else if(gcb > 96 && i1 >= 210 && i1 <= 280 && k1 <= 12) { mcb = 2; } else { super.streamManager.createPacket(207); super.streamManager.formatPacket(); showBankWindow = false; return; } } int j1 = 256 - c1 / 2; int l1 = 170 - c2 / 2; gameGraphics.yf(j1, l1, 408, 12, 192); int j2 = 0x989898; gameGraphics.uf(j1, l1 + 12, 408, 17, j2, 160); gameGraphics.uf(j1, l1 + 29, 8, 204, j2, 160); gameGraphics.uf(j1 + 399, l1 + 29, 9, 204, j2, 160); gameGraphics.uf(j1, l1 + 233, 408, 47, j2, 160); gameGraphics.mf("Bank", j1 + 1, l1 + 10, 1, 0xffffff); if(gcb > 48) { int l2 = 0xffffff; if(mcb == 0) l2 = 0xff0000; else if(super.mouseX > (j1 + 120) - 50 && super.mouseY >= l1 && super.mouseX < (j1 + 190) - 50 && super.mouseY < l1 + 12) l2 = 0xffff00; gameGraphics.mf("", (j1 + 120) - 40, l1 + 10, 1, l2); l2 = 0xffffff; if(mcb == 1) l2 = 0xff0000; else if(super.mouseX > (j1 + 190) - 50 && super.mouseY >= l1 && super.mouseX < (j1 + 260) - 50 && super.mouseY < l1 + 12) l2 = 0xffff00; gameGraphics.mf("", (j1 + 190) - 40, l1 + 10, 1, l2); } if(gcb > 96) { int i3 = 0xffffff; if(mcb == 2) i3 = 0xff0000; else if(super.mouseX > (j1 + 260) - 50 && super.mouseY >= l1 && super.mouseX < (j1 + 330) - 50 && super.mouseY < l1 + 12) i3 = 0xffff00; gameGraphics.mf("", (j1 + 260) - 40, l1 + 10, 1, i3); } int j3 = 0xffffff; if(super.mouseX > j1 + 320 && super.mouseY >= l1 && super.mouseX < j1 + 408 && super.mouseY < l1 + 12) j3 = 0xff0000; gameGraphics.yg("Close window", j1 + 406, l1 + 10, 1, j3); gameGraphics.mf("Number in bank in green", j1 + 7, l1 + 24, 1, 65280); gameGraphics.mf("Number held in blue", j1 + 289, l1 + 24, 1, 65535); int i4 = 0xd0d0d0; int l4 = mcb * 48; for(int j5 = 0; j5 < 6; j5++) { for(int k5 = 0; k5 < 8; k5++) { int i6 = j1 + 7 + k5 * 49; int k6 = l1 + 28 + j5 * 34; if(jcb == l4) gameGraphics.uf(i6, k6, 49, 34, 0xff0000, 160); else gameGraphics.uf(i6, k6, 49, 34, i4, 160); gameGraphics.qf(i6, k6, 50, 35, 0); if(l4 < gcb && hcb[l4] != -1) { gameGraphics.wf(i6, k6, 48, 32, ju + q.njb[hcb[l4]], q.sjb[hcb[l4]], 0, 0, false); gameGraphics.mf(String.valueOf(icb[l4]), i6 + 1, k6 + 10, 1, 65280); gameGraphics.yg(String.valueOf(gl(hcb[l4])), i6 + 47, k6 + 29, 1, 65535); } l4++; } } gameGraphics.rg(j1 + 5, l1 + 256, 398, 0); if(jcb == -1) { gameGraphics.ug("Select an object to withdraw or deposit", j1 + 204, l1 + 248, 3, 0xffff00); return; } int l5; if(jcb < 0) l5 = -1; else l5 = hcb[jcb]; if(l5 != -1) { int j6 = icb[jcb]; if(q.pjb[l5] == 1 && j6 > 1) j6 = 1; if(j6 > 0) { gameGraphics.mf("Withdraw " + q.kjb[l5], j1 + 2, l1 + 248, 1, 0xffffff); int l6 = 0xffffff; if(super.mouseX >= j1 + 190 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 220 && super.mouseY <= l1 + 249) l6 = 0xff0000; gameGraphics.mf("All", j1 + 192, l1 + 248, 1, l6); int j7 = 0xffffff; if(super.mouseX >= j1 + 220 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 250 && super.mouseY <= l1 + 249) j7 = 0xff0000; gameGraphics.mf("One", j1 + 222, l1 + 248, 1, j7); if(j6 >= 5) { int l7 = 0xffffff; if(super.mouseX >= j1 + 250 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 280 && super.mouseY <= l1 + 249) l7 = 0xff0000; gameGraphics.mf("Five", j1 + 252, l1 + 248, 1, l7); } if(j6 >= 25) { int i8 = 0xffffff; if(super.mouseX >= j1 + 280 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 305 && super.mouseY <= l1 + 249) i8 = 0xff0000; gameGraphics.mf("25", j1 + 282, l1 + 248, 1, i8); } if(j6 >= 100) { int j8 = 0xffffff; if(super.mouseX >= j1 + 305 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 335 && super.mouseY <= l1 + 249) j8 = 0xff0000; gameGraphics.mf("100", j1 + 307, l1 + 248, 1, j8); } if(j6 >= 500) { int k8 = 0xffffff; if(super.mouseX >= j1 + 335 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 368 && super.mouseY <= l1 + 249) k8 = 0xff0000; gameGraphics.mf("500", j1 + 337, l1 + 248, 1, k8); } if(j6 >= 2500) { int l8 = 0xffffff; if(super.mouseX >= j1 + 370 && super.mouseY >= l1 + 238 && super.mouseX < j1 + 400 && super.mouseY <= l1 + 249) l8 = 0xff0000; gameGraphics.mf("2500", j1 + 370, l1 + 248, 1, l8); } } if(gl(l5) > 0) { gameGraphics.mf("Deposit " + q.kjb[l5], j1 + 2, l1 + 273, 1, 0xffffff); int i7 = 0xffffff; if(super.mouseX >= j1 + 190 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 220 && super.mouseY <= l1 + 274) i7 = 0xff0000; gameGraphics.mf("All", j1 + 192, l1 + 273, 1, i7); int k7 = 0xffffff; if(super.mouseX >= j1 + 220 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 250 && super.mouseY <= l1 + 274) k7 = 0xff0000; gameGraphics.mf("One", j1 + 222, l1 + 273, 1, k7); if(gl(l5) >= 5) { int i9 = 0xffffff; if(super.mouseX >= j1 + 250 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 280 && super.mouseY <= l1 + 274) i9 = 0xff0000; gameGraphics.mf("Five", j1 + 252, l1 + 273, 1, i9); } if(gl(l5) >= 25) { int j9 = 0xffffff; if(super.mouseX >= j1 + 280 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 305 && super.mouseY <= l1 + 274) j9 = 0xff0000; gameGraphics.mf("25", j1 + 282, l1 + 273, 1, j9); } if(gl(l5) >= 100) { int k9 = 0xffffff; if(super.mouseX >= j1 + 305 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 335 && super.mouseY <= l1 + 274) k9 = 0xff0000; gameGraphics.mf("100", j1 + 307, l1 + 273, 1, k9); } if(gl(l5) >= 500) { int l9 = 0xffffff; if(super.mouseX >= j1 + 335 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 368 && super.mouseY <= l1 + 274) l9 = 0xff0000; gameGraphics.mf("500", j1 + 337, l1 + 273, 1, l9); } if(gl(l5) >= 2500) { int i10 = 0xffffff; if(super.mouseX >= j1 + 370 && super.mouseY >= l1 + 263 && super.mouseX < j1 + 400 && super.mouseY <= l1 + 274) i10 = 0xff0000; gameGraphics.mf("2500", j1 + 370, l1 + 273, 1, i10); } } } } public void drawShopWindow() { if(mouseButtonClicked != 0) { mouseButtonClicked = 0; int i1 = super.mouseX - 52; int j1 = super.mouseY - 44; if(i1 >= 0 && j1 >= 12 && i1 < 408 && j1 < 246) { int k1 = 0; for(int i2 = 0; i2 < 5; i2++) { for(int k2 = 0; k2 < 8; k2++) { int j3 = 7 + k2 * 49; int j4 = 28 + i2 * 34; if(i1 > j3 && i1 < j3 + 49 && j1 > j4 && j1 < j4 + 34 && xbb[k1] != -1) { acb = k1; bcb = xbb[k1]; } k1++; } } if(acb >= 0) { int l2 = xbb[acb]; if(l2 != -1) { if(ybb[acb] > 0 && i1 > 298 && j1 >= 204 && i1 < 408 && j1 <= 215) { int k3 = wbb + zbb[acb]; if(k3 < 10) k3 = 10; int k4 = (k3 * q.ojb[l2]) / 100; super.streamManager.createPacket(217); super.streamManager.writeWord(xbb[acb]); super.streamManager.writeDWord(k4); super.streamManager.formatPacket(); } if(gl(l2) > 0 && i1 > 2 && j1 >= 229 && i1 < 112 && j1 <= 240) { int l3 = vbb + zbb[acb]; if(l3 < 10) l3 = 10; int l4 = (l3 * q.ojb[l2]) / 100; super.streamManager.createPacket(216); super.streamManager.writeWord(xbb[acb]); super.streamManager.writeDWord(l4); super.streamManager.formatPacket(); } } } } else { super.streamManager.createPacket(218); super.streamManager.formatPacket(); showShopWindow = false; return; } } byte byte0 = 52; byte byte1 = 44; gameGraphics.yf(byte0, byte1, 408, 12, 192); int l1 = 0x989898; gameGraphics.uf(byte0, byte1 + 12, 408, 17, l1, 160); gameGraphics.uf(byte0, byte1 + 29, 8, 170, l1, 160); gameGraphics.uf(byte0 + 399, byte1 + 29, 9, 170, l1, 160); gameGraphics.uf(byte0, byte1 + 199, 408, 47, l1, 160); gameGraphics.mf("Buying and selling items", byte0 + 1, byte1 + 10, 1, 0xffffff); int j2 = 0xffffff; if(super.mouseX > byte0 + 320 && super.mouseY >= byte1 && super.mouseX < byte0 + 408 && super.mouseY < byte1 + 12) j2 = 0xff0000; gameGraphics.yg("Close window", byte0 + 406, byte1 + 10, 1, j2); gameGraphics.mf("Shops stock in green", byte0 + 2, byte1 + 24, 1, 65280); gameGraphics.mf("Number you own in blue", byte0 + 135, byte1 + 24, 1, 65535); gameGraphics.mf("Your money: " + gl(10) + "gp", byte0 + 280, byte1 + 24, 1, 0xffff00); int i3 = 0xd0d0d0; int i4 = 0; for(int i5 = 0; i5 < 5; i5++) { for(int j5 = 0; j5 < 8; j5++) { int l5 = byte0 + 7 + j5 * 49; int k6 = byte1 + 28 + i5 * 34; if(acb == i4) gameGraphics.uf(l5, k6, 49, 34, 0xff0000, 160); else gameGraphics.uf(l5, k6, 49, 34, i3, 160); gameGraphics.qf(l5, k6, 50, 35, 0); if(xbb[i4] != -1) { gameGraphics.wf(l5, k6, 48, 32, ju + q.njb[xbb[i4]], q.sjb[xbb[i4]], 0, 0, false); gameGraphics.mf(String.valueOf(ybb[i4]), l5 + 1, k6 + 10, 1, 65280); gameGraphics.yg(String.valueOf(gl(xbb[i4])), l5 + 47, k6 + 10, 1, 65535); } i4++; } } gameGraphics.rg(byte0 + 5, byte1 + 222, 398, 0); if(acb == -1) { gameGraphics.ug("Select an object to buy or sell", byte0 + 204, byte1 + 214, 3, 0xffff00); return; } int k5 = xbb[acb]; if(k5 != -1) { if(ybb[acb] > 0) { int i6 = wbb + zbb[acb]; if(i6 < 10) i6 = 10; int l6 = (i6 * q.ojb[k5]) / 100; gameGraphics.mf("Buy a new " + q.kjb[k5] + " for " + l6 + "gp", byte0 + 2, byte1 + 214, 1, 0xffff00); int j7 = 0xffffff; if(super.mouseX > byte0 + 298 && super.mouseY >= byte1 + 204 && super.mouseX < byte0 + 408 && super.mouseY <= byte1 + 215) j7 = 0xff0000; gameGraphics.yg("Click here to buy", byte0 + 405, byte1 + 214, 3, j7); } else { gameGraphics.ug("This item is not currently available to buy", byte0 + 204, byte1 + 214, 3, 0xffff00); } if(gl(k5) > 0) { int j6 = vbb + zbb[acb]; if(j6 < 10) j6 = 10; int i7 = (j6 * q.ojb[k5]) / 100; gameGraphics.yg("Sell your " + q.kjb[k5] + " for " + i7 + "gp", byte0 + 405, byte1 + 239, 1, 0xffff00); int k7 = 0xffffff; if(super.mouseX > byte0 + 2 && super.mouseY >= byte1 + 229 && super.mouseX < byte0 + 112 && super.mouseY <= byte1 + 240) k7 = 0xff0000; gameGraphics.mf("Click here to sell", byte0 + 2, byte1 + 239, 3, k7); return; } gameGraphics.ug("You do not have any of this item to sell", byte0 + 204, byte1 + 239, 3, 0xffff00); } } public void drawTradeConfirmationDialog() { byte byte0 = 22; byte byte1 = 36; gameGraphics.yf(byte0, byte1, 468, 16, 192); int i1 = 0x989898; gameGraphics.uf(byte0, byte1 + 16, 468, 246, i1, 160); gameGraphics.ug("Please confirm your trade with @yel@" + RawDataOperations.longHashToString(lbb), byte0 + 234, byte1 + 12, 1, 0xffffff); gameGraphics.ug("You are about to give:", byte0 + 117, byte1 + 30, 1, 0xffff00); for(int j1 = 0; j1 < obb; j1++) { String s1 = q.kjb[pbb[j1]]; if(q.pjb[pbb[j1]] == 0) s1 = s1 + " (" + qbb[j1] + ")"; gameGraphics.ug(s1, byte0 + 117, byte1 + 42 + j1 * 12, 1, 0xffffff); } if(obb == 0) gameGraphics.ug("Nothing!", byte0 + 117, byte1 + 42, 1, 0xffffff); gameGraphics.ug("In return you will receive:", byte0 + 351, byte1 + 30, 1, 0xffff00); for(int k1 = 0; k1 < rbb; k1++) { String s2 = q.kjb[sbb[k1]]; if(q.pjb[sbb[k1]] == 0) s2 = s2 + " (" + tbb[k1] + ")"; gameGraphics.ug(s2, byte0 + 351, byte1 + 42 + k1 * 12, 1, 0xffffff); } if(rbb == 0) gameGraphics.ug("Nothing!", byte0 + 351, byte1 + 42, 1, 0xffffff); gameGraphics.ug("Are you sure you want to do this?", byte0 + 234, byte1 + 200, 4, 65535); gameGraphics.ug("There is NO WAY to reverse a trade if you change your mind.", byte0 + 234, byte1 + 215, 1, 0xffffff); gameGraphics.ug("Remember that not all players are trustworthy", byte0 + 234, byte1 + 230, 1, 0xffffff); if(!nbb) { gameGraphics.xg((byte0 + 118) - 35, byte1 + 238, hu + 25); gameGraphics.xg((byte0 + 352) - 35, byte1 + 238, hu + 26); } else { gameGraphics.ug("Waiting for other player...", byte0 + 234, byte1 + 250, 1, 0xffff00); } if(mouseButtonClicked == 1) { if(super.mouseX < byte0 || super.mouseY < byte1 || super.mouseX > byte0 + 468 || super.mouseY > byte1 + 262) { showTradeConfirmationDialog = false; super.streamManager.createPacket(233); super.streamManager.formatPacket(); } if(super.mouseX >= (byte0 + 118) - 35 && super.mouseX <= byte0 + 118 + 70 && super.mouseY >= byte1 + 238 && super.mouseY <= byte1 + 238 + 21) { nbb = true; super.streamManager.createPacket(202); super.streamManager.formatPacket(); } if(super.mouseX >= (byte0 + 352) - 35 && super.mouseX <= byte0 + 353 + 70 && super.mouseY >= byte1 + 238 && super.mouseY <= byte1 + 238 + 21) { showTradeConfirmationDialog = false; super.streamManager.createPacket(233); super.streamManager.formatPacket(); } mouseButtonClicked = 0; } } public void drawTradeWindow() { if(mouseButtonClicked != 0 && kbb == 0) kbb = 1; if(kbb > 0) { int i1 = super.mouseX - 22; int j1 = super.mouseY - 36; if(i1 >= 0 && j1 >= 0 && i1 < 468 && j1 < 262) { if(i1 > 216 && j1 > 30 && i1 < 462 && j1 < 235) { int k1 = (i1 - 217) / 49 + ((j1 - 31) / 34) * 5; if(k1 >= 0 && k1 < mx) { boolean flag = false; int l2 = 0; int k3 = nx[k1]; for(int k4 = 0; k4 < bbb; k4++) if(cbb[k4] == k3) if(q.pjb[k3] == 0) { for(int i5 = 0; i5 < kbb; i5++) { if(dbb[k4] < ox[k1]) dbb[k4]++; flag = true; } } else { l2++; } if(gl(k3) <= l2) flag = true; if(q.tjb[k3] == 1) { displayMessage("This object cannot be traded with other players", 3); flag = true; } if(!flag && bbb < 12) { cbb[bbb] = k3; dbb[bbb] = 1; bbb++; flag = true; } if(flag) { super.streamManager.createPacket(234); super.streamManager.writeByte(bbb); for(int j5 = 0; j5 < bbb; j5++) { super.streamManager.writeWord(cbb[j5]); super.streamManager.writeDWord(dbb[j5]); } super.streamManager.formatPacket(); hbb = false; ibb = false; } } } if(i1 > 8 && j1 > 30 && i1 < 205 && j1 < 133) { int l1 = (i1 - 9) / 49 + ((j1 - 31) / 34) * 4; if(l1 >= 0 && l1 < bbb) { int j2 = cbb[l1]; for(int i3 = 0; i3 < kbb; i3++) { if(q.pjb[j2] == 0 && dbb[l1] > 1) { dbb[l1]--; continue; } bbb--; jbb = 0; for(int l3 = l1; l3 < bbb; l3++) { cbb[l3] = cbb[l3 + 1]; dbb[l3] = dbb[l3 + 1]; } break; } super.streamManager.createPacket(234); super.streamManager.writeByte(bbb); for(int i4 = 0; i4 < bbb; i4++) { super.streamManager.writeWord(cbb[i4]); super.streamManager.writeDWord(dbb[i4]); } super.streamManager.formatPacket(); hbb = false; ibb = false; } } if(i1 >= 217 && j1 >= 238 && i1 <= 286 && j1 <= 259) { ibb = true; super.streamManager.createPacket(232); super.streamManager.formatPacket(); } if(i1 >= 394 && j1 >= 238 && i1 < 463 && j1 < 259) { showTradeWindow = false; super.streamManager.createPacket(233); super.streamManager.formatPacket(); } } else if(mouseButtonClicked != 0) { showTradeWindow = false; super.streamManager.createPacket(233); super.streamManager.formatPacket(); } mouseButtonClicked = 0; kbb = 0; } if(!showTradeWindow) return; byte byte0 = 22; byte byte1 = 36; gameGraphics.yf(byte0, byte1, 468, 12, 192); int i2 = 0x989898; gameGraphics.uf(byte0, byte1 + 12, 468, 18, i2, 160); gameGraphics.uf(byte0, byte1 + 30, 8, 248, i2, 160); gameGraphics.uf(byte0 + 205, byte1 + 30, 11, 248, i2, 160); gameGraphics.uf(byte0 + 462, byte1 + 30, 6, 248, i2, 160); gameGraphics.uf(byte0 + 8, byte1 + 133, 197, 22, i2, 160); gameGraphics.uf(byte0 + 8, byte1 + 258, 197, 20, i2, 160); gameGraphics.uf(byte0 + 216, byte1 + 235, 246, 43, i2, 160); int k2 = 0xd0d0d0; gameGraphics.uf(byte0 + 8, byte1 + 30, 197, 103, k2, 160); gameGraphics.uf(byte0 + 8, byte1 + 155, 197, 103, k2, 160); gameGraphics.uf(byte0 + 216, byte1 + 30, 246, 205, k2, 160); for(int j3 = 0; j3 < 4; j3++) gameGraphics.rg(byte0 + 8, byte1 + 30 + j3 * 34, 197, 0); for(int j4 = 0; j4 < 4; j4++) gameGraphics.rg(byte0 + 8, byte1 + 155 + j4 * 34, 197, 0); for(int l4 = 0; l4 < 7; l4++) gameGraphics.rg(byte0 + 216, byte1 + 30 + l4 * 34, 246, 0); for(int k5 = 0; k5 < 6; k5++) { if(k5 < 5) gameGraphics.vg(byte0 + 8 + k5 * 49, byte1 + 30, 103, 0); if(k5 < 5) gameGraphics.vg(byte0 + 8 + k5 * 49, byte1 + 155, 103, 0); gameGraphics.vg(byte0 + 216 + k5 * 49, byte1 + 30, 205, 0); } gameGraphics.mf("Trading with: " + abb, byte0 + 1, byte1 + 10, 1, 0xffffff); gameGraphics.mf("Your Offer", byte0 + 9, byte1 + 27, 4, 0xffffff); gameGraphics.mf("Opponent's Offer", byte0 + 9, byte1 + 152, 4, 0xffffff); gameGraphics.mf("Your Inventory", byte0 + 216, byte1 + 27, 4, 0xffffff); if(!ibb) gameGraphics.xg(byte0 + 217, byte1 + 238, hu + 25); gameGraphics.xg(byte0 + 394, byte1 + 238, hu + 26); if(hbb) { gameGraphics.ug("Other player", byte0 + 341, byte1 + 246, 1, 0xffffff); gameGraphics.ug("has accepted", byte0 + 341, byte1 + 256, 1, 0xffffff); } if(ibb) { gameGraphics.ug("Waiting for", byte0 + 217 + 35, byte1 + 246, 1, 0xffffff); gameGraphics.ug("other player", byte0 + 217 + 35, byte1 + 256, 1, 0xffffff); } for(int l5 = 0; l5 < mx; l5++) { int i6 = 217 + byte0 + (l5 % 5) * 49; int k6 = 31 + byte1 + (l5 / 5) * 34; gameGraphics.wf(i6, k6, 48, 32, ju + q.njb[nx[l5]], q.sjb[nx[l5]], 0, 0, false); if(q.pjb[nx[l5]] == 0) gameGraphics.mf(String.valueOf(ox[l5]), i6 + 1, k6 + 10, 1, 0xffff00); } for(int j6 = 0; j6 < bbb; j6++) { int l6 = 9 + byte0 + (j6 % 4) * 49; int j7 = 31 + byte1 + (j6 / 4) * 34; gameGraphics.wf(l6, j7, 48, 32, ju + q.njb[cbb[j6]], q.sjb[cbb[j6]], 0, 0, false); if(q.pjb[cbb[j6]] == 0) gameGraphics.mf(String.valueOf(dbb[j6]), l6 + 1, j7 + 10, 1, 0xffff00); if(super.mouseX > l6 && super.mouseX < l6 + 48 && super.mouseY > j7 && super.mouseY < j7 + 32) gameGraphics.mf(q.kjb[cbb[j6]] + ": @whi@" + q.ljb[cbb[j6]], byte0 + 8, byte1 + 273, 1, 0xffff00); } for(int i7 = 0; i7 < ebb; i7++) { int k7 = 9 + byte0 + (i7 % 4) * 49; int l7 = 156 + byte1 + (i7 / 4) * 34; gameGraphics.wf(k7, l7, 48, 32, ju + q.njb[fbb[i7]], q.sjb[fbb[i7]], 0, 0, false); if(q.pjb[fbb[i7]] == 0) gameGraphics.mf(String.valueOf(gbb[i7]), k7 + 1, l7 + 10, 1, 0xffff00); if(super.mouseX > k7 && super.mouseX < k7 + 48 && super.mouseY > l7 && super.mouseY < l7 + 32) gameGraphics.mf(q.kjb[fbb[i7]] + ": @whi@" + q.ljb[fbb[i7]], byte0 + 8, byte1 + 273, 1, 0xffff00); } } public void drawDuelConfirmationDialog() { byte byte0 = 22; byte byte1 = 36; gameGraphics.yf(byte0, byte1, 468, 16, 192); int i1 = 0x989898; gameGraphics.uf(byte0, byte1 + 16, 468, 246, i1, 160); gameGraphics.ug("Please confirm your duel with @yel@" + RawDataOperations.longHashToString(oab), byte0 + 234, byte1 + 12, 1, 0xffffff); gameGraphics.ug("Your stake:", byte0 + 117, byte1 + 30, 1, 0xffff00); for(int j1 = 0; j1 < pab; j1++) { String s1 = q.kjb[qab[j1]]; if(q.pjb[qab[j1]] == 0) s1 = s1 + " (" + rab[j1] + ")"; gameGraphics.ug(s1, byte0 + 117, byte1 + 42 + j1 * 12, 1, 0xffffff); } if(pab == 0) gameGraphics.ug("Nothing!", byte0 + 117, byte1 + 42, 1, 0xffffff); gameGraphics.ug("Your opponent's stake:", byte0 + 351, byte1 + 30, 1, 0xffff00); for(int k1 = 0; k1 < sab; k1++) { String s2 = q.kjb[tab[k1]]; if(q.pjb[tab[k1]] == 0) s2 = s2 + " (" + uab[k1] + ")"; gameGraphics.ug(s2, byte0 + 351, byte1 + 42 + k1 * 12, 1, 0xffffff); } if(sab == 0) gameGraphics.ug("Nothing!", byte0 + 351, byte1 + 42, 1, 0xffffff); if(vab == 0) gameGraphics.ug("You can retreat from this duel", byte0 + 234, byte1 + 180, 1, 65280); else gameGraphics.ug("No retreat is possible!", byte0 + 234, byte1 + 180, 1, 0xff0000); if(wab == 0) gameGraphics.ug("Magic may be used", byte0 + 234, byte1 + 192, 1, 65280); else gameGraphics.ug("Magic cannot be used", byte0 + 234, byte1 + 192, 1, 0xff0000); if(xab == 0) gameGraphics.ug("Prayer may be used", byte0 + 234, byte1 + 204, 1, 65280); else gameGraphics.ug("Prayer cannot be used", byte0 + 234, byte1 + 204, 1, 0xff0000); if(yab == 0) gameGraphics.ug("Weapons may be used", byte0 + 234, byte1 + 216, 1, 65280); else gameGraphics.ug("Weapons cannot be used", byte0 + 234, byte1 + 216, 1, 0xff0000); gameGraphics.ug("If you are sure click 'Accept' to begin the duel", byte0 + 234, byte1 + 230, 1, 0xffffff); if(!nab) { gameGraphics.xg((byte0 + 118) - 35, byte1 + 238, hu + 25); gameGraphics.xg((byte0 + 352) - 35, byte1 + 238, hu + 26); } else { gameGraphics.ug("Waiting for other player...", byte0 + 234, byte1 + 250, 1, 0xffff00); } if(mouseButtonClicked == 1) { if(super.mouseX < byte0 || super.mouseY < byte1 || super.mouseX > byte0 + 468 || super.mouseY > byte1 + 262) { showDuelConfirmationDialog = false; super.streamManager.createPacket(233); super.streamManager.formatPacket(); } if(super.mouseX >= (byte0 + 118) - 35 && super.mouseX <= byte0 + 118 + 70 && super.mouseY >= byte1 + 238 && super.mouseY <= byte1 + 238 + 21) { nab = true; super.streamManager.createPacket(198); super.streamManager.formatPacket(); } if(super.mouseX >= (byte0 + 352) - 35 && super.mouseX <= byte0 + 353 + 70 && super.mouseY >= byte1 + 238 && super.mouseY <= byte1 + 238 + 21) { showDuelConfirmationDialog = false; super.streamManager.createPacket(203); super.streamManager.formatPacket(); } mouseButtonClicked = 0; } } public void drawDuelWindow() { if(mouseButtonClicked != 0 && kbb == 0) kbb = 1; if(kbb > 0) { int i1 = super.mouseX - 22; int j1 = super.mouseY - 36; if(i1 >= 0 && j1 >= 0 && i1 < 468 && j1 < 262) { if(i1 > 216 && j1 > 30 && i1 < 462 && j1 < 235) { int k1 = (i1 - 217) / 49 + ((j1 - 31) / 34) * 5; if(k1 >= 0 && k1 < mx) { boolean flag1 = false; int l2 = 0; int k3 = nx[k1]; for(int k4 = 0; k4 < aab; k4++) if(bab[k4] == k3) if(q.pjb[k3] == 0) { for(int i5 = 0; i5 < kbb; i5++) { if(cab[k4] < ox[k1]) cab[k4]++; flag1 = true; } } else { l2++; } if(gl(k3) <= l2) flag1 = true; if(q.tjb[k3] == 1) { displayMessage("This object cannot be added to a duel offer", 3); flag1 = true; } if(!flag1 && aab < 8) { bab[aab] = k3; cab[aab] = 1; aab++; flag1 = true; } if(flag1) { super.streamManager.createPacket(201); super.streamManager.writeByte(aab); for(int j5 = 0; j5 < aab; j5++) { super.streamManager.writeWord(bab[j5]); super.streamManager.writeDWord(cab[j5]); } super.streamManager.formatPacket(); gab = false; hab = false; } } } if(i1 > 8 && j1 > 30 && i1 < 205 && j1 < 129) { int l1 = (i1 - 9) / 49 + ((j1 - 31) / 34) * 4; if(l1 >= 0 && l1 < aab) { int j2 = bab[l1]; for(int i3 = 0; i3 < kbb; i3++) { if(q.pjb[j2] == 0 && cab[l1] > 1) { cab[l1]--; continue; } aab--; jbb = 0; for(int l3 = l1; l3 < aab; l3++) { bab[l3] = bab[l3 + 1]; cab[l3] = cab[l3 + 1]; } break; } super.streamManager.createPacket(201); super.streamManager.writeByte(aab); for(int i4 = 0; i4 < aab; i4++) { super.streamManager.writeWord(bab[i4]); super.streamManager.writeDWord(cab[i4]); } super.streamManager.formatPacket(); gab = false; hab = false; } } boolean flag = false; if(i1 >= 93 && j1 >= 221 && i1 <= 104 && j1 <= 232) { iab = !iab; flag = true; } if(i1 >= 93 && j1 >= 240 && i1 <= 104 && j1 <= 251) { jab = !jab; flag = true; } if(i1 >= 191 && j1 >= 221 && i1 <= 202 && j1 <= 232) { kab = !kab; flag = true; } if(i1 >= 191 && j1 >= 240 && i1 <= 202 && j1 <= 251) { lab = !lab; flag = true; } if(flag) { super.streamManager.createPacket(200); super.streamManager.writeByte(iab ? 1 : 0); super.streamManager.writeByte(jab ? 1 : 0); super.streamManager.writeByte(kab ? 1 : 0); super.streamManager.writeByte(lab ? 1 : 0); super.streamManager.formatPacket(); gab = false; hab = false; } if(i1 >= 217 && j1 >= 238 && i1 <= 286 && j1 <= 259) { hab = true; super.streamManager.createPacket(199); super.streamManager.formatPacket(); } if(i1 >= 394 && j1 >= 238 && i1 < 463 && j1 < 259) { showDuelWindow = false; super.streamManager.createPacket(203); super.streamManager.formatPacket(); } } else if(mouseButtonClicked != 0) { showDuelWindow = false; super.streamManager.createPacket(203); super.streamManager.formatPacket(); } mouseButtonClicked = 0; kbb = 0; } if(!showDuelWindow) return; byte byte0 = 22; byte byte1 = 36; gameGraphics.yf(byte0, byte1, 468, 12, 0xc90b1d); int i2 = 0x989898; gameGraphics.uf(byte0, byte1 + 12, 468, 18, i2, 160); gameGraphics.uf(byte0, byte1 + 30, 8, 248, i2, 160); gameGraphics.uf(byte0 + 205, byte1 + 30, 11, 248, i2, 160); gameGraphics.uf(byte0 + 462, byte1 + 30, 6, 248, i2, 160); gameGraphics.uf(byte0 + 8, byte1 + 99, 197, 24, i2, 160); gameGraphics.uf(byte0 + 8, byte1 + 192, 197, 23, i2, 160); gameGraphics.uf(byte0 + 8, byte1 + 258, 197, 20, i2, 160); gameGraphics.uf(byte0 + 216, byte1 + 235, 246, 43, i2, 160); int k2 = 0xd0d0d0; gameGraphics.uf(byte0 + 8, byte1 + 30, 197, 69, k2, 160); gameGraphics.uf(byte0 + 8, byte1 + 123, 197, 69, k2, 160); gameGraphics.uf(byte0 + 8, byte1 + 215, 197, 43, k2, 160); gameGraphics.uf(byte0 + 216, byte1 + 30, 246, 205, k2, 160); for(int j3 = 0; j3 < 3; j3++) gameGraphics.rg(byte0 + 8, byte1 + 30 + j3 * 34, 197, 0); for(int j4 = 0; j4 < 3; j4++) gameGraphics.rg(byte0 + 8, byte1 + 123 + j4 * 34, 197, 0); for(int l4 = 0; l4 < 7; l4++) gameGraphics.rg(byte0 + 216, byte1 + 30 + l4 * 34, 246, 0); for(int k5 = 0; k5 < 6; k5++) { if(k5 < 5) gameGraphics.vg(byte0 + 8 + k5 * 49, byte1 + 30, 69, 0); if(k5 < 5) gameGraphics.vg(byte0 + 8 + k5 * 49, byte1 + 123, 69, 0); gameGraphics.vg(byte0 + 216 + k5 * 49, byte1 + 30, 205, 0); } gameGraphics.rg(byte0 + 8, byte1 + 215, 197, 0); gameGraphics.rg(byte0 + 8, byte1 + 257, 197, 0); gameGraphics.vg(byte0 + 8, byte1 + 215, 43, 0); gameGraphics.vg(byte0 + 204, byte1 + 215, 43, 0); gameGraphics.mf("Preparing to duel with: " + zz, byte0 + 1, byte1 + 10, 1, 0xffffff); gameGraphics.mf("Your Stake", byte0 + 9, byte1 + 27, 4, 0xffffff); gameGraphics.mf("Opponent's Stake", byte0 + 9, byte1 + 120, 4, 0xffffff); gameGraphics.mf("Duel Options", byte0 + 9, byte1 + 212, 4, 0xffffff); gameGraphics.mf("Your Inventory", byte0 + 216, byte1 + 27, 4, 0xffffff); gameGraphics.mf("No retreating", byte0 + 8 + 1, byte1 + 215 + 16, 3, 0xffff00); gameGraphics.mf("No magic", byte0 + 8 + 1, byte1 + 215 + 35, 3, 0xffff00); gameGraphics.mf("No prayer", byte0 + 8 + 102, byte1 + 215 + 16, 3, 0xffff00); gameGraphics.mf("No weapons", byte0 + 8 + 102, byte1 + 215 + 35, 3, 0xffff00); gameGraphics.qf(byte0 + 93, byte1 + 215 + 6, 11, 11, 0xffff00); if(iab) gameGraphics.yf(byte0 + 95, byte1 + 215 + 8, 7, 7, 0xffff00); gameGraphics.qf(byte0 + 93, byte1 + 215 + 25, 11, 11, 0xffff00); if(jab) gameGraphics.yf(byte0 + 95, byte1 + 215 + 27, 7, 7, 0xffff00); gameGraphics.qf(byte0 + 191, byte1 + 215 + 6, 11, 11, 0xffff00); if(kab) gameGraphics.yf(byte0 + 193, byte1 + 215 + 8, 7, 7, 0xffff00); gameGraphics.qf(byte0 + 191, byte1 + 215 + 25, 11, 11, 0xffff00); if(lab) gameGraphics.yf(byte0 + 193, byte1 + 215 + 27, 7, 7, 0xffff00); if(!hab) gameGraphics.xg(byte0 + 217, byte1 + 238, hu + 25); gameGraphics.xg(byte0 + 394, byte1 + 238, hu + 26); if(gab) { gameGraphics.ug("Other player", byte0 + 341, byte1 + 246, 1, 0xffffff); gameGraphics.ug("has accepted", byte0 + 341, byte1 + 256, 1, 0xffffff); } if(hab) { gameGraphics.ug("Waiting for", byte0 + 217 + 35, byte1 + 246, 1, 0xffffff); gameGraphics.ug("other player", byte0 + 217 + 35, byte1 + 256, 1, 0xffffff); } for(int l5 = 0; l5 < mx; l5++) { int i6 = 217 + byte0 + (l5 % 5) * 49; int k6 = 31 + byte1 + (l5 / 5) * 34; gameGraphics.wf(i6, k6, 48, 32, ju + q.njb[nx[l5]], q.sjb[nx[l5]], 0, 0, false); if(q.pjb[nx[l5]] == 0) gameGraphics.mf(String.valueOf(ox[l5]), i6 + 1, k6 + 10, 1, 0xffff00); } for(int j6 = 0; j6 < aab; j6++) { int l6 = 9 + byte0 + (j6 % 4) * 49; int j7 = 31 + byte1 + (j6 / 4) * 34; gameGraphics.wf(l6, j7, 48, 32, ju + q.njb[bab[j6]], q.sjb[bab[j6]], 0, 0, false); if(q.pjb[bab[j6]] == 0) gameGraphics.mf(String.valueOf(cab[j6]), l6 + 1, j7 + 10, 1, 0xffff00); if(super.mouseX > l6 && super.mouseX < l6 + 48 && super.mouseY > j7 && super.mouseY < j7 + 32) gameGraphics.mf(q.kjb[bab[j6]] + ": @whi@" + q.ljb[bab[j6]], byte0 + 8, byte1 + 273, 1, 0xffff00); } for(int i7 = 0; i7 < dab; i7++) { int k7 = 9 + byte0 + (i7 % 4) * 49; int l7 = 124 + byte1 + (i7 / 4) * 34; gameGraphics.wf(k7, l7, 48, 32, ju + q.njb[eab[i7]], q.sjb[eab[i7]], 0, 0, false); if(q.pjb[eab[i7]] == 0) gameGraphics.mf(String.valueOf(fab[i7]), k7 + 1, l7 + 10, 1, 0xffff00); if(super.mouseX > k7 && super.mouseX < k7 + 48 && super.mouseY > l7 && super.mouseY < l7 + 32) gameGraphics.mf(q.kjb[eab[i7]] + ": @whi@" + q.ljb[eab[i7]], byte0 + 8, byte1 + 273, 1, 0xffff00); } } public void tk() { if(kx == 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 && super.mouseY < 35) kx = 1; if(kx == 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 33 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 33 && super.mouseY < 35) kx = 2; if(kx == 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 66 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 66 && super.mouseY < 35) kx = 3; if(kx == 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 99 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 99 && super.mouseY < 35) kx = 4; if(kx == 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 132 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 132 && super.mouseY < 35) kx = 5; if(kx == 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 165 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 165 && super.mouseY < 35) kx = 6; if(kx != 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 && super.mouseY < 26) kx = 1; if(kx != 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 33 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 33 && super.mouseY < 26) kx = 2; if(kx != 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 66 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 66 && super.mouseY < 26) kx = 3; if(kx != 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 99 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 99 && super.mouseY < 26) kx = 4; if(kx != 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 132 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 132 && super.mouseY < 26) kx = 5; if(kx != 0 && super.mouseX >= ((i) (gameGraphics)).yj - 35 - 165 && super.mouseY >= 3 && super.mouseX < ((i) (gameGraphics)).yj - 3 - 165 && super.mouseY < 26) kx = 6; if(kx == 1 && (super.mouseX < ((i) (gameGraphics)).yj - 248 || super.mouseY > 36 + (lx / 5) * 34)) kx = 0; if(kx == 3 && (super.mouseX < ((i) (gameGraphics)).yj - 199 || super.mouseY > 294)) kx = 0; if((kx == 2 || kx == 4 || kx == 5) && (super.mouseX < ((i) (gameGraphics)).yj - 199 || super.mouseY > 240)) kx = 0; if(kx == 6 && (super.mouseX < ((i) (gameGraphics)).yj - 199 || super.mouseY > 311)) kx = 0; } public void tl(boolean flag) { int i1 = ((i) (gameGraphics)).yj - 248; gameGraphics.xg(i1, 3, hu + 1); for(int j1 = 0; j1 < lx; j1++) { int k1 = i1 + (j1 % 5) * 49; int i2 = 36 + (j1 / 5) * 34; if(j1 < mx && px[j1] == 1) gameGraphics.uf(k1, i2, 49, 34, 0xff0000, 128); else gameGraphics.uf(k1, i2, 49, 34, i.kg(181, 181, 181), 128); if(j1 < mx) { gameGraphics.wf(k1, i2, 48, 32, ju + q.njb[nx[j1]], q.sjb[nx[j1]], 0, 0, false); if(q.pjb[nx[j1]] == 0) gameGraphics.mf(String.valueOf(ox[j1]), k1 + 1, i2 + 10, 1, 0xffff00); } } for(int l1 = 1; l1 <= 4; l1++) gameGraphics.vg(i1 + l1 * 49, 36, (lx / 5) * 34, 0); for(int j2 = 1; j2 <= lx / 5 - 1; j2++) gameGraphics.rg(i1, 36 + j2 * 34, 245, 0); if(!flag) return; i1 = super.mouseX - (((i) (gameGraphics)).yj - 248); int k2 = super.mouseY - 36; if(i1 >= 0 && k2 >= 0 && i1 < 248 && k2 < (lx / 5) * 34) { int l2 = i1 / 49 + (k2 / 34) * 5; if(l2 < mx) { int i3 = nx[l2]; if(fy >= 0) { if(q.fmb[fy] == 3) { dz[az] = "Cast " + q.bmb[fy] + " on"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 600; hz[az] = l2; iz[az] = fy; az++; return; } } else { if(qx >= 0) { dz[az] = "Use " + rx + " with"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 610; hz[az] = l2; iz[az] = qx; az++; return; } if(px[l2] == 1) { dz[az] = "Remove"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 620; hz[az] = l2; az++; } else if(q.rjb[i3] != 0) { if((q.rjb[i3] & 0x18) != 0) dz[az] = "Wield"; else dz[az] = "Wear"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 630; hz[az] = l2; az++; } if(!q.mjb[i3].equals("")) { dz[az] = q.mjb[i3]; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 640; hz[az] = l2; az++; } dz[az] = "Use"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 650; hz[az] = l2; az++; dz[az] = "Drop"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 660; hz[az] = l2; az++; dz[az] = "Examine"; cz[az] = "@lre@" + q.kjb[i3]; ez[az] = 3600; hz[az] = i3; az++; } } } } public void ok(boolean flag) { int i1 = ((i) (gameGraphics)).yj - 199; char c1 = '\234'; char c2 = '\230'; gameGraphics.xg(i1 - 49, 3, hu + 2); i1 += 40; gameGraphics.yf(i1, 36, c1, c2, 0); gameGraphics.setSize(i1, 36, i1 + c1, 36 + c2); char c3 = '\300'; int j1 = ((myPlayer.gr - 6040) * 3 * c3) / 2048; int k1 = ((myPlayer.hr - 6040) * 3 * c3) / 2048; int l1 = GameCamera.mm[1024 - rv * 4 & 0x3ff]; int i2 = GameCamera.mm[(1024 - rv * 4 & 0x3ff) + 1024]; int j2 = k1 * l1 + j1 * i2 >> 18; k1 = k1 * i2 - j1 * l1 >> 18; j1 = j2; gameGraphics.of((i1 + c1 / 2) - j1, 36 + c2 / 2 + k1, hu - 1, rv + 64 & 0xff, c3); for(int k2 = 0; k2 < uw; k2++) { int l2 = (((ww[k2] * cu + 64) - myPlayer.gr) * 3 * c3) / 2048; int j3 = (((xw[k2] * cu + 64) - myPlayer.hr) * 3 * c3) / 2048; int i4 = j3 * l1 + l2 * i2 >> 18; j3 = j3 * i2 - l2 * l1 >> 18; l2 = i4; zm(i1 + c1 / 2 + l2, (36 + c2 / 2) - j3, 65535); } for(int i3 = 0; i3 < ow; i3++) { int k3 = (((pw[i3] * cu + 64) - myPlayer.gr) * 3 * c3) / 2048; int j4 = (((qw[i3] * cu + 64) - myPlayer.hr) * 3 * c3) / 2048; int i5 = j4 * l1 + k3 * i2 >> 18; j4 = j4 * i2 - k3 * l1 >> 18; k3 = i5; zm(i1 + c1 / 2 + k3, (36 + c2 / 2) - j4, 0xff0000); } for(int l3 = 0; l3 < hw; l3++) { MobileEntity l4 = kw[l3]; int j5 = ((l4.gr - myPlayer.gr) * 3 * c3) / 2048; int i6 = ((l4.hr - myPlayer.hr) * 3 * c3) / 2048; int k6 = i6 * l1 + j5 * i2 >> 18; i6 = i6 * i2 - j5 * l1 >> 18; j5 = k6; zm(i1 + c1 / 2 + j5, (36 + c2 / 2) - i6, 0xffff00); } for(int k4 = 0; k4 < vv; k4++) { MobileEntity l5 = zv[k4]; int j6 = ((l5.gr - myPlayer.gr) * 3 * c3) / 2048; int l6 = ((l5.hr - myPlayer.hr) * 3 * c3) / 2048; int i7 = l6 * l1 + j6 * i2 >> 18; l6 = l6 * i2 - j6 * l1 >> 18; j6 = i7; int j7 = 0xffffff; for(int l7 = 0; l7 < super.gd; l7++) { if(l5.cr != super.hd[l7] || super.id[l7] != 99) continue; j7 = 65280; break; } zm(i1 + c1 / 2 + j6, (36 + c2 / 2) - l6, j7); } gameGraphics.zf(i1 + c1 / 2, 36 + c2 / 2, 2, 0xffffff, 255); gameGraphics.of(i1 + 19, 55, hu + 24, rv + 128 & 0xff, 128); gameGraphics.setSize(0, 0, windowWidth, windowHeight + 12); if(!flag) return; i1 = super.mouseX - (((i) (gameGraphics)).yj - 199); int k5 = super.mouseY - 36; if(i1 >= 40 && k5 >= 0 && i1 < 196 && k5 < 152) { char c4 = '\234'; char c5 = '\230'; char c6 = '\300'; int k7 = ((i) (gameGraphics)).yj - 199; k7 += 40; int i8 = ((super.mouseX - (k7 + c4 / 2)) * 16384) / (3 * c6); int j8 = ((super.mouseY - (36 + c5 / 2)) * 16384) / (3 * c6); int k8 = GameCamera.mm[1024 - rv * 4 & 0x3ff]; int l8 = GameCamera.mm[(1024 - rv * 4 & 0x3ff) + 1024]; int i9 = j8 * k8 + i8 * l8 >> 15; j8 = j8 * l8 - i8 * k8 >> 15; i8 = i9; i8 += myPlayer.gr; j8 = myPlayer.hr - j8; if(mouseButtonClicked == 1) cl(cw, dw, i8 / 128, j8 / 128, false); mouseButtonClicked = 0; } } public void ql(boolean flag) { int i1 = ((i) (gameGraphics)).yj - 199; int j1 = 36; gameGraphics.xg(i1 - 49, 3, hu + 3); char c1 = '\304'; char c2 = '\u0107'; int k1; int l1 = k1 = i.kg(160, 160, 160); if(my == 0) l1 = i.kg(220, 220, 220); else k1 = i.kg(220, 220, 220); gameGraphics.uf(i1, j1, c1 / 2, 24, l1, 128); gameGraphics.uf(i1 + c1 / 2, j1, c1 / 2, 24, k1, 128); gameGraphics.uf(i1, j1 + 24, c1, c2 - 24, i.kg(220, 220, 220), 128); gameGraphics.rg(i1, j1 + 24, c1, 0); gameGraphics.vg(i1 + c1 / 2, j1, 24, 0); gameGraphics.ug("Stats", i1 + c1 / 4, j1 + 16, 4, 0); gameGraphics.ug("Quests", i1 + c1 / 4 + c1 / 2, j1 + 16, 4, 0); if(my == 0) { int i2 = 72; int k2 = -1; gameGraphics.mf("Skills", i1 + 5, i2, 3, 0xffff00); i2 += 13; for(int l2 = 0; l2 < 9; l2++) { int i3 = 0xffffff; if(super.mouseX > i1 + 3 && super.mouseY >= i2 - 11 && super.mouseY < i2 + 2 && super.mouseX < i1 + 90) { i3 = 0xff0000; k2 = l2; } gameGraphics.mf(shortenedSkillNames[l2] + ":@yel@" + ux[l2] + "/" + vx[l2], i1 + 5, i2, 1, i3); i3 = 0xffffff; if(super.mouseX >= i1 + 90 && super.mouseY >= i2 - 13 - 11 && super.mouseY < (i2 - 13) + 2 && super.mouseX < i1 + 196) { i3 = 0xff0000; k2 = l2 + 9; } gameGraphics.mf(shortenedSkillNames[l2 + 9] + ":@yel@" + ux[l2 + 9] + "/" + vx[l2 + 9], (i1 + c1 / 2) - 5, i2 - 13, 1, i3); i2 += 13; } gameGraphics.mf("Quest Points:@yel@" + yx, (i1 + c1 / 2) - 5, i2 - 13, 1, 0xffffff); i2 += 8; gameGraphics.mf("Equipment Status", i1 + 5, i2, 3, 0xffff00); i2 += 12; for(int j3 = 0; j3 < 3; j3++) { gameGraphics.mf(equiptmentStatusNames[j3] + ":@yel@" + xx[j3], i1 + 5, i2, 1, 0xffffff); if(j3 < 2) gameGraphics.mf(equiptmentStatusNames[j3 + 3] + ":@yel@" + xx[j3 + 3], i1 + c1 / 2 + 25, i2, 1, 0xffffff); i2 += 13; } i2 += 6; gameGraphics.rg(i1, i2 - 15, c1, 0); if(k2 != -1) { gameGraphics.mf(skillNames[k2] + " skill", i1 + 5, i2, 1, 0xffff00); i2 += 12; int k3 = levelXpValues[0]; for(int i4 = 0; i4 < 98; i4++) if(wx[k2] >= levelXpValues[i4]) k3 = levelXpValues[i4 + 1]; gameGraphics.mf("Total xp: " + wx[k2] / 4, i1 + 5, i2, 1, 0xffffff); i2 += 12; gameGraphics.mf("Next level at: " + k3 / 4, i1 + 5, i2, 1, 0xffffff); } else { gameGraphics.mf("Overall levels", i1 + 5, i2, 1, 0xffff00); i2 += 12; int l3 = 0; for(int j4 = 0; j4 < 18; j4++) l3 += vx[j4]; gameGraphics.mf("Skill total: " + l3, i1 + 5, i2, 1, 0xffffff); i2 += 12; gameGraphics.mf("Combat level: " + myPlayer.zr, i1 + 5, i2, 1, 0xffffff); i2 += 12; } } if(my == 1) { ky.mc(ly); ky.dd(ly, 0, "@whi@Quest-list (green=completed)"); for(int j2 = 0; j2 < ny; j2++) ky.dd(ly, j2 + 1, (py[j2] ? "@gre@" : "@red@") + questNames[j2]); ky.hc(); } if(!flag) return; i1 = super.mouseX - (((i) (gameGraphics)).yj - 199); j1 = super.mouseY - 36; if(i1 >= 0 && j1 >= 0 && i1 < c1 && j1 < c2) { if(my == 1) ky.pd(i1 + (((i) (gameGraphics)).yj - 199), j1 + 36, super.uq, super.tq); if(j1 <= 24 && mouseButtonClicked == 1) { if(i1 < 98) { my = 0; return; } if(i1 > 98) my = 1; } } } public void ym(boolean flag) { int i1 = ((i) (gameGraphics)).yj - 199; int j1 = 36; gameGraphics.xg(i1 - 49, 3, hu + 4); char c1 = '\304'; char c2 = '\266'; int k1; int l1 = k1 = i.kg(160, 160, 160); if(ey == 0) l1 = i.kg(220, 220, 220); else k1 = i.kg(220, 220, 220); gameGraphics.uf(i1, j1, c1 / 2, 24, l1, 128); gameGraphics.uf(i1 + c1 / 2, j1, c1 / 2, 24, k1, 128); gameGraphics.uf(i1, j1 + 24, c1, 90, i.kg(220, 220, 220), 128); gameGraphics.uf(i1, j1 + 24 + 90, c1, c2 - 90 - 24, i.kg(160, 160, 160), 128); gameGraphics.rg(i1, j1 + 24, c1, 0); gameGraphics.vg(i1 + c1 / 2, j1, 24, 0); gameGraphics.rg(i1, j1 + 113, c1, 0); gameGraphics.ug("Magic", i1 + c1 / 4, j1 + 16, 4, 0); gameGraphics.ug("Prayers", i1 + c1 / 4 + c1 / 2, j1 + 16, 4, 0); if(ey == 0) { cy.mc(dy); int i2 = 0; for(int i3 = 0; i3 < q.amb; i3++) { String s1 = "@yel@"; for(int l4 = 0; l4 < q.emb[i3]; l4++) { int k5 = q.gmb[i3][l4]; if(nm(k5, q.hmb[i3][l4])) continue; s1 = "@whi@"; break; } int l5 = ux[6]; if(q.dmb[i3] > l5) s1 = "@bla@"; cy.dd(dy, i2++, s1 + "Level " + q.dmb[i3] + ": " + q.bmb[i3]); } cy.hc(); int i4 = cy.ic(dy); if(i4 != -1) { gameGraphics.mf("Level " + q.dmb[i4] + ": " + q.bmb[i4], i1 + 2, j1 + 124, 1, 0xffff00); gameGraphics.mf(q.cmb[i4], i1 + 2, j1 + 136, 0, 0xffffff); for(int i5 = 0; i5 < q.emb[i4]; i5++) { int i6 = q.gmb[i4][i5]; gameGraphics.xg(i1 + 2 + i5 * 44, j1 + 150, ju + q.njb[i6]); int j6 = gl(i6); int k6 = q.hmb[i4][i5]; String s3 = "@red@"; if(nm(i6, k6)) s3 = "@gre@"; gameGraphics.mf(s3 + j6 + "/" + k6, i1 + 2 + i5 * 44, j1 + 150, 1, 0xffffff); } } else { gameGraphics.mf("Point at a spell for a description", i1 + 2, j1 + 124, 1, 0); } } if(ey == 1) { cy.mc(dy); int j2 = 0; for(int j3 = 0; j3 < q.imb; j3++) { String s2 = "@whi@"; if(q.lmb[j3] > vx[5]) s2 = "@bla@"; if(prayerStatus[j3]) s2 = "@gre@"; cy.dd(dy, j2++, s2 + "Level " + q.lmb[j3] + ": " + q.jmb[j3]); } cy.hc(); int j4 = cy.ic(dy); if(j4 != -1) { gameGraphics.ug("Level " + q.lmb[j4] + ": " + q.jmb[j4], i1 + c1 / 2, j1 + 130, 1, 0xffff00); gameGraphics.ug(q.kmb[j4], i1 + c1 / 2, j1 + 145, 0, 0xffffff); gameGraphics.ug("Drain rate: " + q.mmb[j4], i1 + c1 / 2, j1 + 160, 1, 0); } else { gameGraphics.mf("Point at a prayer for a description", i1 + 2, j1 + 124, 1, 0); } } if(!flag) return; i1 = super.mouseX - (((i) (gameGraphics)).yj - 199); j1 = super.mouseY - 36; if(i1 >= 0 && j1 >= 0 && i1 < 196 && j1 < 182) { cy.pd(i1 + (((i) (gameGraphics)).yj - 199), j1 + 36, super.uq, super.tq); if(j1 <= 24 && mouseButtonClicked == 1) if(i1 < 98 && ey == 1) { ey = 0; cy.zc(dy); } else if(i1 > 98 && ey == 0) { ey = 1; cy.zc(dy); } if(mouseButtonClicked == 1 && ey == 0) { int k2 = cy.ic(dy); if(k2 != -1) { int k3 = ux[6]; if(q.dmb[k2] > k3) { displayMessage("Your magic ability is not high enough for this spell", 3); } else { int k4; for(k4 = 0; k4 < q.emb[k2]; k4++) { int j5 = q.gmb[k2][k4]; if(nm(j5, q.hmb[k2][k4])) continue; displayMessage("You don't have all the reagents you need for this spell", 3); k4 = -1; break; } if(k4 == q.emb[k2]) { fy = k2; qx = -1; } } } } if(mouseButtonClicked == 1 && ey == 1) { int i = cy.ic(dy); if(i != -1) { int l3 = vx[5]; if(q.lmb[i] > l3) displayMessage("Your prayer ability is not high enough for this prayer", 3); else if(ux[5] == 0) displayMessage("You have run out of prayer points. Return to a church to recharge", 3); else if(prayerStatus[i]) { super.streamManager.createPacket(211); super.streamManager.writeByte(i); super.streamManager.formatPacket(); prayerStatus[i] = false; playAudio("prayeroff"); } else { super.streamManager.createPacket(212); super.streamManager.writeByte(i); super.streamManager.formatPacket(); prayerStatus[i] = true; playAudio("prayeron"); } } } mouseButtonClicked = 0; } } public void lk(boolean flag) { int i1 = ((i) (gameGraphics)).yj - 199; int j1 = 36; gameGraphics.xg(i1 - 49, 3, hu + 5); char c1 = '\304'; char c2 = '\266'; int k1; int l1 = k1 = i.kg(160, 160, 160); if(iy == 0) l1 = i.kg(220, 220, 220); else k1 = i.kg(220, 220, 220); gameGraphics.uf(i1, j1, c1 / 2, 24, l1, 128); gameGraphics.uf(i1 + c1 / 2, j1, c1 / 2, 24, k1, 128); gameGraphics.uf(i1, j1 + 24, c1, c2 - 24, i.kg(220, 220, 220), 128); gameGraphics.rg(i1, j1 + 24, c1, 0); gameGraphics.vg(i1 + c1 / 2, j1, 24, 0); gameGraphics.rg(i1, (j1 + c2) - 16, c1, 0); gameGraphics.ug("Friends", i1 + c1 / 4, j1 + 16, 4, 0); gameGraphics.ug("Ignore", i1 + c1 / 4 + c1 / 2, j1 + 16, 4, 0); gy.mc(hy); if(iy == 0) { for(int i2 = 0; i2 < super.gd; i2++) { String s1; if(super.id[i2] == 99) s1 = "@gre@"; else if(super.id[i2] > 0) s1 = "@yel@"; else s1 = "@red@"; gy.dd(hy, i2, s1 + RawDataOperations.longHashToString(super.hd[i2])); } } if(iy == 1) { for(int j2 = 0; j2 < super.jd; j2++) gy.dd(hy, j2, "@yel@" + RawDataOperations.longHashToString(super.kd[j2]) + "~439~@whi@Remove WWWWWWWWWW"); } gy.hc(); if(iy == 0) { int k2 = gy.ic(hy); if(k2 >= 0 && super.mouseX < 489 + (windowWidth - 489)) { if(super.mouseX > 429 + (windowWidth - 429)) gameGraphics.ug("Click to remove " + RawDataOperations.longHashToString(super.hd[k2]), i1 + c1 / 2, j1 + 35, 1, 0xffffff); else if(super.id[k2] == 99) gameGraphics.ug("Click to message " + RawDataOperations.longHashToString(super.hd[k2]), i1 + c1 / 2, j1 + 35, 1, 0xffffff); else if(super.id[k2] > 0) gameGraphics.ug(RawDataOperations.longHashToString(super.hd[k2]) + " is on world " + super.id[k2], i1 + c1 / 2, j1 + 35, 1, 0xffffff); else gameGraphics.ug(RawDataOperations.longHashToString(super.hd[k2]) + " is offline", i1 + c1 / 2, j1 + 35, 1, 0xffffff); } else { gameGraphics.ug("Click a name to send a message", i1 + c1 / 2, j1 + 35, 1, 0xffffff); } int k3; if(super.mouseX > i1 && super.mouseX < i1 + c1 && super.mouseY > (j1 + c2) - 16 && super.mouseY < j1 + c2) k3 = 0xffff00; else k3 = 0xffffff; gameGraphics.ug("Click here to add a friend", i1 + c1 / 2, (j1 + c2) - 3, 1, k3); } if(iy == 1) { int l2 = gy.ic(hy); if(l2 >= 0 && super.mouseX < 489 && super.mouseX > 429) { if(super.mouseX > 429) gameGraphics.ug("Click to remove " + RawDataOperations.longHashToString(super.kd[l2]), i1 + c1 / 2, j1 + 35, 1, 0xffffff); } else { gameGraphics.ug("Blocking messages from:", i1 + c1 / 2, j1 + 35, 1, 0xffffff); } int l3; if(super.mouseX > i1 && super.mouseX < i1 + c1 && super.mouseY > (j1 + c2) - 16 && super.mouseY < j1 + c2) l3 = 0xffff00; else l3 = 0xffffff; gameGraphics.ug("Click here to add a name", i1 + c1 / 2, (j1 + c2) - 3, 1, l3); } if(!flag) return; i1 = super.mouseX - (((i) (gameGraphics)).yj - 199); j1 = super.mouseY - 36; if(i1 >= 0 && j1 >= 0 && i1 < 196 && j1 < 182) { gy.pd(i1 + (((i) (gameGraphics)).yj - 199), j1 + 36, super.uq, super.tq); if(j1 <= 24 && mouseButtonClicked == 1) if(i1 < 98 && iy == 1) { iy = 0; gy.zc(hy); } else if(i1 > 98 && iy == 0) { iy = 1; gy.zc(hy); } if(mouseButtonClicked == 1 && iy == 0) { int i3 = gy.ic(hy); if(i3 >= 0 && super.mouseX < 489 + (windowWidth - 489)) if(super.mouseX > 429 + (windowWidth - 429)) i(super.hd[i3]); else if(super.id[i3] != 0) { rcb = 2; jy = super.hd[i3]; super.ar = ""; super.br = ""; } } int j3; if(mouseButtonClicked == 1 && iy == 1) j3 = gy.ic(hy); if(j1 > 166 && mouseButtonClicked == 1 && iy == 0) { rcb = 1; super.yq = ""; super.zq = ""; } if(j1 > 166 && mouseButtonClicked == 1 && iy == 1) { rcb = 3; super.yq = ""; super.zq = ""; } mouseButtonClicked = 0; } } public void wm(boolean flag) { int i1 = ((i) (gameGraphics)).yj - 199; int j1 = 36; gameGraphics.xg(i1 - 49, 3, hu + 6); char c1 = '\304'; gameGraphics.uf(i1, 36, c1, 65, i.kg(181, 181, 181), 160); gameGraphics.uf(i1, 101, c1, 65, i.kg(201, 201, 201), 160); gameGraphics.uf(i1, 166, c1, 95, i.kg(181, 181, 181), 160); gameGraphics.uf(i1, 261, c1, 40, i.kg(201, 201, 201), 160); int k1 = i1 + 3; int l1 = j1 + 15; gameGraphics.mf("Game options - click to toggle", k1, l1, 1, 0); l1 += 15; if(sy) gameGraphics.mf("Camera angle mode - @gre@Auto", k1, l1, 1, 0xffffff); else gameGraphics.mf("Camera angle mode - @red@Manual", k1, l1, 1, 0xffffff); l1 += 15; if(ty) gameGraphics.mf("Mouse buttons - @red@One", k1, l1, 1, 0xffffff); else gameGraphics.mf("Mouse buttons - @gre@Two", k1, l1, 1, 0xffffff); l1 += 15; if(isMember) if(uy) gameGraphics.mf("Sound effects - @red@off", k1, l1, 1, 0xffffff); else gameGraphics.mf("Sound effects - @gre@on", k1, l1, 1, 0xffffff); l1 += 15; l1 += 5; gameGraphics.mf("Security settings", k1, l1, 1, 0); l1 += 15; int i2 = 0xffffff; if(super.mouseX > k1 && super.mouseX < k1 + c1 && super.mouseY > l1 - 12 && super.mouseY < l1 + 4) i2 = 0xffff00; gameGraphics.mf("Change password", k1, l1, 1, i2); l1 += 15; i2 = 0xffffff; if(super.mouseX > k1 && super.mouseX < k1 + c1 && super.mouseY > l1 - 12 && super.mouseY < l1 + 4) i2 = 0xffff00; gameGraphics.mf("Change recovery questions", k1, l1, 1, i2); l1 += 15; l1 += 15; l1 += 5; gameGraphics.mf("Privacy settings. Will be applied to", i1 + 3, l1, 1, 0); l1 += 15; gameGraphics.mf("all people not on your friends list", i1 + 3, l1, 1, 0); l1 += 15; if(super.ld == 0) gameGraphics.mf("Block chat messages: @red@", i1 + 3, l1, 1, 0xffffff); else gameGraphics.mf("Block chat messages: @gre@", i1 + 3, l1, 1, 0xffffff); l1 += 15; if(super.md == 0) gameGraphics.mf("Block private messages: @red@", i1 + 3, l1, 1, 0xffffff); else gameGraphics.mf("Block private messages: @gre@", i1 + 3, l1, 1, 0xffffff); l1 += 15; if(super.nd == 0) gameGraphics.mf("Block trade requests: @red@", i1 + 3, l1, 1, 0xffffff); else gameGraphics.mf("Block trade requests: @gre@", i1 + 3, l1, 1, 0xffffff); l1 += 15; if(isMember) if(super.od == 0) gameGraphics.mf("Block duel requests: @red@", i1 + 3, l1, 1, 0xffffff); else gameGraphics.mf("Block duel requests: @gre@", i1 + 3, l1, 1, 0xffffff); l1 += 15; l1 += 5; gameGraphics.mf("Always logout when you finish", k1, l1, 1, 0); l1 += 15; i2 = 0xffffff; if(super.mouseX > k1 && super.mouseX < k1 + c1 && super.mouseY > l1 - 12 && super.mouseY < l1 + 4) i2 = 0xffff00; gameGraphics.mf("Click here to logout", i1 + 3, l1, 1, i2); if(!flag) return; i1 = super.mouseX - (((i) (gameGraphics)).yj - 199); j1 = super.mouseY - 36; if(i1 >= 0 && j1 >= 0 && i1 < 196 && j1 < 265) { int j2 = ((i) (gameGraphics)).yj - 199; byte byte0 = 36; char c2 = '\304'; int k2 = j2 + 3; int l2 = byte0 + 30; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { sy = !sy; super.streamManager.createPacket(213); super.streamManager.writeByte(0); super.streamManager.writeByte(sy ? 1 : 0); super.streamManager.formatPacket(); } l2 += 15; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { ty = !ty; super.streamManager.createPacket(213); super.streamManager.writeByte(2); super.streamManager.writeByte(ty ? 1 : 0); super.streamManager.formatPacket(); } l2 += 15; if(isMember && super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { uy = !uy; super.streamManager.createPacket(213); super.streamManager.writeByte(3); super.streamManager.writeByte(uy ? 1 : 0); super.streamManager.formatPacket(); } l2 += 15; l2 += 20; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { scb = 6; super.yq = ""; super.zq = ""; } l2 += 15; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { super.streamManager.createPacket(197); super.streamManager.formatPacket(); } l2 += 15; l2 += 15; boolean flag1 = false; l2 += 35; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { super.ld = 1 - super.ld; flag1 = true; } l2 += 15; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { super.md = 1 - super.md; flag1 = true; } l2 += 15; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { super.nd = 1 - super.nd; flag1 = true; } l2 += 15; if(isMember && super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) { super.od = 1 - super.od; flag1 = true; } l2 += 15; if(flag1) h(super.ld, super.md, super.nd, super.od); l2 += 20; if(super.mouseX > k2 && super.mouseX < k2 + c2 && super.mouseY > l2 - 12 && super.mouseY < l2 + 4 && mouseButtonClicked == 1) gm(); mouseButtonClicked = 0; } } public void dl() { int i1 = -1; for(int j1 = 0; j1 < uw; j1++) bx[j1] = false; for(int k1 = 0; k1 < dx; k1++) jx[k1] = false; int l1 = zt.ri(); h ah[] = zt.oh(); int ai[] = zt.mi(); for(int i2 = 0; i2 < l1; i2++) { if(az > 200) break; int j2 = ai[i2]; h h1 = ah[i2]; if(h1.vh[j2] <= 65535 || h1.vh[j2] >= 0x30d40 && h1.vh[j2] <= 0x493e0) if(h1 == zt.ao) { int l2 = h1.vh[j2] % 10000; int k3 = h1.vh[j2] / 10000; if(k3 == 1) { String s1 = ""; int j4 = 0; if(myPlayer.zr > 0 && zv[l2].zr > 0) j4 = myPlayer.zr - zv[l2].zr; if(j4 < 0) s1 = "@or1@"; if(j4 < -3) s1 = "@or2@"; if(j4 < -6) s1 = "@or3@"; if(j4 < -9) s1 = "@red@"; if(j4 > 0) s1 = "@gr1@"; if(j4 > 3) s1 = "@gr2@"; if(j4 > 6) s1 = "@gr3@"; if(j4 > 9) s1 = "@gre@"; s1 = " " + s1 + "(level-" + zv[l2].zr + ")"; if(fy >= 0) { if(q.fmb[fy] == 1 || q.fmb[fy] == 2 && dw < 2203) { dz[az] = "Cast " + q.bmb[fy] + " on"; cz[az] = "@whi@" + zv[l2].dr; ez[az] = 800; fz[az] = zv[l2].gr; gz[az] = zv[l2].hr; hz[az] = zv[l2].er; iz[az] = fy; az++; } } else if(qx >= 0) { dz[az] = "Use " + rx + " with"; cz[az] = "@whi@" + zv[l2].dr; ez[az] = 810; fz[az] = zv[l2].gr; gz[az] = zv[l2].hr; hz[az] = zv[l2].er; iz[az] = qx; az++; } else { if(dw + yu + cv < 2203 && (zv[l2].hr - 64) / cu + yu + cv < 2203) { dz[az] = "Attack"; cz[az] = "@whi@" + zv[l2].dr + s1; if(j4 >= 0 && j4 < 5) ez[az] = 805; else ez[az] = 2805; fz[az] = zv[l2].gr; gz[az] = zv[l2].hr; hz[az] = zv[l2].er; az++; } else { dz[az] = "Duel with"; cz[az] = "@whi@" + zv[l2].dr + s1; fz[az] = zv[l2].gr; gz[az] = zv[l2].hr; ez[az] = 2806; hz[az] = zv[l2].er; az++; } dz[az] = "Trade with"; cz[az] = "@whi@" + zv[l2].dr; ez[az] = 2810; hz[az] = zv[l2].er; az++; dz[az] = "Follow"; cz[az] = "@whi@" + zv[l2].dr; ez[az] = 2820; hz[az] = zv[l2].er; az++; } } else if(k3 == 2) { if(fy >= 0) { if(q.fmb[fy] == 3) { dz[az] = "Cast " + q.bmb[fy] + " on"; cz[az] = "@lre@" + q.kjb[rw[l2]]; ez[az] = 200; fz[az] = pw[l2]; gz[az] = qw[l2]; hz[az] = rw[l2]; iz[az] = fy; az++; } } else if(qx >= 0) { dz[az] = "Use " + rx + " with"; cz[az] = "@lre@" + q.kjb[rw[l2]]; ez[az] = 210; fz[az] = pw[l2]; gz[az] = qw[l2]; hz[az] = rw[l2]; iz[az] = qx; az++; } else { dz[az] = "Take"; cz[az] = "@lre@" + q.kjb[rw[l2]]; ez[az] = 220; fz[az] = pw[l2]; gz[az] = qw[l2]; hz[az] = rw[l2]; az++; dz[az] = "Examine"; cz[az] = "@lre@" + q.kjb[rw[l2]]; ez[az] = 3200; hz[az] = rw[l2]; az++; } } else if(k3 == 3) { String s2 = ""; int k4 = -1; int l4 = kw[l2].ir; if(q.dkb[l4] > 0) { int i5 = (q.zjb[l4] + q.ckb[l4] + q.akb[l4] + q.bkb[l4]) / 4; int j5 = (vx[0] + vx[1] + vx[2] + vx[3] + 27) / 4; k4 = j5 - i5; s2 = "@yel@"; if(k4 < 0) s2 = "@or1@"; if(k4 < -3) s2 = "@or2@"; if(k4 < -6) s2 = "@or3@"; if(k4 < -9) s2 = "@red@"; if(k4 > 0) s2 = "@gr1@"; if(k4 > 3) s2 = "@gr2@"; if(k4 > 6) s2 = "@gr3@"; if(k4 > 9) s2 = "@gre@"; s2 = " " + s2 + "(level-" + i5 + ")"; } if(fy >= 0) { if(q.fmb[fy] == 2) { dz[az] = "Cast " + q.bmb[fy] + " on"; cz[az] = "@yel@" + q.wjb[kw[l2].ir]; ez[az] = 700; fz[az] = kw[l2].gr; gz[az] = kw[l2].hr; hz[az] = kw[l2].er; iz[az] = fy; az++; } } else if(qx >= 0) { dz[az] = "Use " + rx + " with"; cz[az] = "@yel@" + q.wjb[kw[l2].ir]; ez[az] = 710; fz[az] = kw[l2].gr; gz[az] = kw[l2].hr; hz[az] = kw[l2].er; iz[az] = qx; az++; } else { if(q.dkb[l4] > 0) { dz[az] = "Attack"; cz[az] = "@yel@" + q.wjb[kw[l2].ir] + s2; if(k4 >= 0) ez[az] = 715; else ez[az] = 2715; fz[az] = kw[l2].gr; gz[az] = kw[l2].hr; hz[az] = kw[l2].er; jz[az] = l2; az++; } dz[az] = "Talk-to"; cz[az] = "@yel@" + q.wjb[kw[l2].ir]; ez[az] = 720; fz[az] = kw[l2].gr; gz[az] = kw[l2].hr; hz[az] = kw[l2].er; az++; if(!q.yjb[l4].equals("")) { dz[az] = q.yjb[l4]; cz[az] = "@yel@" + q.wjb[kw[l2].ir]; ez[az] = 725; fz[az] = kw[l2].gr; gz[az] = kw[l2].hr; hz[az] = kw[l2].er; az++; } dz[az] = "Examine"; cz[az] = "@yel@" + q.wjb[kw[l2].ir]; ez[az] = 3700; hz[az] = kw[l2].ir; az++; } } } else if(h1 != null && h1.uh >= 10000) { int i3 = h1.uh - 10000; int l3 = ix[i3]; if(!jx[i3]) { if(fy >= 0) { if(q.fmb[fy] == 4) { dz[az] = "Cast " + q.bmb[fy] + " on"; cz[az] = "@cya@" + q.jlb[l3]; ez[az] = 300; fz[az] = fx[i3]; gz[az] = gx[i3]; hz[az] = hx[i3]; iz[az] = fy; az++; } } else if(qx >= 0) { dz[az] = "Use " + rx + " with"; cz[az] = "@cya@" + q.jlb[l3]; ez[az] = 310; fz[az] = fx[i3]; gz[az] = gx[i3]; hz[az] = hx[i3]; iz[az] = qx; az++; } else { if(!q.llb[l3].equalsIgnoreCase("WalkTo")) { dz[az] = q.llb[l3]; cz[az] = "@cya@" + q.jlb[l3]; ez[az] = 320; fz[az] = fx[i3]; gz[az] = gx[i3]; hz[az] = hx[i3]; az++; } if(!q.mlb[l3].equalsIgnoreCase("Examine")) { dz[az] = q.mlb[l3]; cz[az] = "@cya@" + q.jlb[l3]; ez[az] = 2300; fz[az] = fx[i3]; gz[az] = gx[i3]; hz[az] = hx[i3]; az++; } dz[az] = "Examine"; cz[az] = "@cya@" + q.jlb[l3]; ez[az] = 3300; hz[az] = l3; az++; } jx[i3] = true; } } else if(h1 != null && h1.uh >= 0) { int j3 = h1.uh; int i4 = yw[j3]; if(!bx[j3]) { if(fy >= 0) { if(q.fmb[fy] == 5) { dz[az] = "Cast " + q.bmb[fy] + " on"; cz[az] = "@cya@" + q.zkb[i4]; ez[az] = 400; fz[az] = ww[j3]; gz[az] = xw[j3]; hz[az] = zw[j3]; iz[az] = yw[j3]; jz[az] = fy; az++; } } else if(qx >= 0) { dz[az] = "Use " + rx + " with"; cz[az] = "@cya@" + q.zkb[i4]; ez[az] = 410; fz[az] = ww[j3]; gz[az] = xw[j3]; hz[az] = zw[j3]; iz[az] = yw[j3]; jz[az] = qx; az++; } else { if(!q.blb[i4].equalsIgnoreCase("WalkTo")) { dz[az] = q.blb[i4]; cz[az] = "@cya@" + q.zkb[i4]; ez[az] = 420; fz[az] = ww[j3]; gz[az] = xw[j3]; hz[az] = zw[j3]; iz[az] = yw[j3]; az++; } if(!q.clb[i4].equalsIgnoreCase("Examine")) { dz[az] = q.clb[i4]; cz[az] = "@cya@" + q.zkb[i4]; ez[az] = 2400; fz[az] = ww[j3]; gz[az] = xw[j3]; hz[az] = zw[j3]; iz[az] = yw[j3]; az++; } dz[az] = "Examine"; cz[az] = "@cya@" + q.zkb[i4]; ez[az] = 3400; hz[az] = i4; az++; } bx[j3] = true; } } else { if(j2 >= 0) j2 = h1.vh[j2] - 0x30d40; if(j2 >= 0) i1 = j2; } } if(fy >= 0 && q.fmb[fy] <= 1) { dz[az] = "Cast " + q.bmb[fy] + " on self"; cz[az] = ""; ez[az] = 1000; hz[az] = fy; az++; } if(i1 != -1) { int k2 = i1; if(fy >= 0) { if(q.fmb[fy] == 6) { dz[az] = "Cast " + q.bmb[fy] + " on ground"; cz[az] = ""; ez[az] = 900; fz[az] = wu.xib[k2]; gz[az] = wu.yib[k2]; hz[az] = fy; az++; return; } } else if(qx < 0) { dz[az] = "Walk here ("+ (wu.xib[k2] + bv) +", "+ (wu.yib[k2] + cv) +")"; cz[az] = ""; ez[az] = 920; fz[az] = wu.xib[k2]; gz[az] = wu.yib[k2]; az++; } } } public void pm() { if(mouseButtonClicked != 0) { for(int i1 = 0; i1 < az; i1++) { int k1 = wy + 2; int i2 = xy + 27 + i1 * 15; if(super.mouseX <= k1 - 2 || super.mouseY <= i2 - 12 || super.mouseY >= i2 + 4 || super.mouseX >= (k1 - 3) + yy) continue; bm(kz[i1]); break; } mouseButtonClicked = 0; vy = false; return; } if(super.mouseX < wy - 10 || super.mouseY < xy - 10 || super.mouseX > wy + yy + 10 || super.mouseY > xy + zy + 10) { vy = false; return; } gameGraphics.uf(wy, xy, yy, zy, 0xd0d0d0, 160); gameGraphics.mf("Choose option", wy + 2, xy + 12, 1, 65535); for(int j1 = 0; j1 < az; j1++) { int l1 = wy + 2; int j2 = xy + 27 + j1 * 15; int k2 = 0xffffff; if(super.mouseX > l1 - 2 && super.mouseY > j2 - 12 && super.mouseY < j2 + 4 && super.mouseX < (l1 - 3) + yy) k2 = 0xffff00; gameGraphics.mf(dz[kz[j1]] + " " + cz[kz[j1]], l1, j2, 1, k2); } } public void bl() { if(fy >= 0 || qx >= 0) { dz[az] = "Cancel"; cz[az] = ""; ez[az] = 4000; az++; } for(int i1 = 0; i1 < az; i1++) kz[i1] = i1; for(boolean flag = false; !flag;) { flag = true; for(int j1 = 0; j1 < az - 1; j1++) { int l1 = kz[j1]; int j2 = kz[j1 + 1]; if(ez[l1] > ez[j2]) { kz[j1] = j2; kz[j1 + 1] = l1; flag = false; } } } if(az > 20) az = 20; if(az > 0) { int k1 = -1; for(int i2 = 0; i2 < az; i2++) { if(cz[kz[i2]] == null || cz[kz[i2]].length() <= 0) continue; k1 = i2; break; } String s1 = null; if((qx >= 0 || fy >= 0) && az == 1) s1 = "Choose a target"; else if((qx >= 0 || fy >= 0) && az > 1) s1 = "@whi@" + dz[kz[0]] + " " + cz[kz[0]]; else if(k1 != -1) s1 = cz[kz[k1]] + ": @whi@" + dz[kz[0]]; if(az == 2 && s1 != null) s1 = s1 + "@whi@ / 1 more option"; if(az > 2 && s1 != null) s1 = s1 + "@whi@ / " + (az - 1) + " more options"; if(s1 != null) gameGraphics.mf(s1, 6, 14, 1, 0xffff00); if(!ty && mouseButtonClicked == 1 || ty && mouseButtonClicked == 1 && az == 1) { bm(kz[0]); mouseButtonClicked = 0; return; } if(!ty && mouseButtonClicked == 2 || ty && mouseButtonClicked == 1) { zy = (az + 1) * 15; yy = gameGraphics.df("Choose option", 1) + 5; for(int k2 = 0; k2 < az; k2++) { int l2 = gameGraphics.df(dz[k2] + " " + cz[k2], 1) + 5; if(l2 > yy) yy = l2; } wy = super.mouseX - yy / 2; xy = super.mouseY - 7; vy = true; if(wy < 0) wy = 0; if(xy < 0) xy = 0; mouseButtonClicked = 0; } } } public void bm(int i1) { int j1 = fz[i1]; int k1 = gz[i1]; int l1 = hz[i1]; int i2 = iz[i1]; int j2 = jz[i1]; int k2 = ez[i1]; if(k2 == 200) { im(cw, dw, j1, k1, true); super.streamManager.createPacket(224); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); fy = -1; } if(k2 == 210) { im(cw, dw, j1, k1, true); super.streamManager.createPacket(250); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); qx = -1; } if(k2 == 220) { im(cw, dw, j1, k1, true); super.streamManager.createPacket(252); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 3200) displayMessage(q.ljb[l1], 3); if(k2 == 300) { zk(j1, k1, l1); super.streamManager.createPacket(223); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeByte(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); fy = -1; } if(k2 == 310) { zk(j1, k1, l1); super.streamManager.createPacket(239); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeByte(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); qx = -1; } if(k2 == 320) { zk(j1, k1, l1); super.streamManager.createPacket(238); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeByte(l1); super.streamManager.formatPacket(); } if(k2 == 2300) { zk(j1, k1, l1); super.streamManager.createPacket(229); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeByte(l1); super.streamManager.formatPacket(); } if(k2 == 3300) displayMessage(q.klb[l1], 3); if(k2 == 400) { kk(j1, k1, l1, i2); super.streamManager.createPacket(222); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeWord(j2); super.streamManager.formatPacket(); fy = -1; } if(k2 == 410) { kk(j1, k1, l1, i2); super.streamManager.createPacket(241); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeWord(j2); super.streamManager.formatPacket(); qx = -1; } if(k2 == 420) { kk(j1, k1, l1, i2); super.streamManager.createPacket(242); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.formatPacket(); } if(k2 == 2400) { kk(j1, k1, l1, i2); super.streamManager.createPacket(230); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.formatPacket(); } if(k2 == 3400) displayMessage(q.alb[l1], 3); if(k2 == 600) { super.streamManager.createPacket(220); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); fy = -1; } if(k2 == 610) { super.streamManager.createPacket(240); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); qx = -1; } if(k2 == 620) { super.streamManager.createPacket(248); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 630) { super.streamManager.createPacket(249); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 640) { super.streamManager.createPacket(246); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 650) { qx = l1; kx = 0; rx = q.kjb[nx[qx]]; } if(k2 == 660) { super.streamManager.createPacket(251); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); qx = -1; kx = 0; displayMessage("Dropping " + q.kjb[nx[l1]], 4); } if(k2 == 3600) displayMessage(q.ljb[l1], 3); if(k2 == 700) { int k3 = (j1 - 64) / cu; int l5 = (k1 - 64) / cu; cl(cw, dw, k3, l5, true); super.streamManager.createPacket(225); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); fy = -1; } if(k2 == 710) { int l3 = (j1 - 64) / cu; int i6 = (k1 - 64) / cu; cl(cw, dw, l3, i6, true); super.streamManager.createPacket(243); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); qx = -1; } if(k2 == 720) { int i4 = (j1 - 64) / cu; int j6 = (k1 - 64) / cu; cl(cw, dw, i4, j6, true); super.streamManager.createPacket(245); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 725) { int j4 = (j1 - 64) / cu; int k6 = (k1 - 64) / cu; cl(cw, dw, j4, k6, true); super.streamManager.createPacket(195); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 715 || k2 == 2715) { int k4 = (j1 - 64) / cu; int l6 = (k1 - 64) / cu; cl(cw, dw, k4, l6, true); super.streamManager.createPacket(244); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 3700) displayMessage(q.xjb[l1], 3); if(k2 == 800) { int l4 = (j1 - 64) / cu; int i7 = (k1 - 64) / cu; cl(cw, dw, l4, i7, true); super.streamManager.createPacket(226); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); fy = -1; } if(k2 == 810) { int i5 = (j1 - 64) / cu; int j7 = (k1 - 64) / cu; cl(cw, dw, i5, j7, true); super.streamManager.createPacket(219); super.streamManager.writeWord(l1); super.streamManager.writeWord(i2); super.streamManager.formatPacket(); qx = -1; } if(k2 == 805 || k2 == 2805) { int j5 = (j1 - 64) / cu; int k7 = (k1 - 64) / cu; cl(cw, dw, j5, k7, true); super.streamManager.createPacket(228); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 2806) { super.streamManager.createPacket(204); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 2810) { super.streamManager.createPacket(235); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 2820) { super.streamManager.createPacket(214); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); } if(k2 == 900) { cl(cw, dw, j1, k1, true); super.streamManager.createPacket(221); super.streamManager.writeWord(j1 + bv); super.streamManager.writeWord(k1 + cv); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); fy = -1; } if(k2 == 920) { cl(cw, dw, j1, k1, false); if(tu == -24) tu = 24; } if(k2 == 1000) { super.streamManager.createPacket(227); super.streamManager.writeWord(l1); super.streamManager.formatPacket(); fy = -1; } if(k2 == 4000) { qx = -1; fy = -1; } } public mudclient() { isMember = false; rsaKey1 = new BigInteger("18439792161837834709"); rsaKey2 = new BigInteger("192956484481579778191558061814292671521"); playingFromInvalidHost = false; outOfMemory = false; isApplet = true; lt = 0xbc614e; nt = 8000; ot = new int[nt]; pt = new int[nt]; rt = new int[8192]; st = new int[8192]; ut = 2; wt = 2; cu = 128; windowWidth = 512; windowHeight = 334; gu = 9; nu = 40; ru = -1; su = -1; av = -1; dv = -1; cameraZoom = 550; mv = false; pv = 1; rv = 128; tv = 4000; uv = 500; yv = new MobileEntity[tv]; zv = new MobileEntity[uv]; aw = new MobileEntity[uv]; myPlayer = new MobileEntity(); ew = -1; fw = 2500; gw = 500; jw = new MobileEntity[fw]; kw = new MobileEntity[gw]; lw = new MobileEntity[gw]; mw = new int[500]; nw = 500; pw = new int[nw]; qw = new int[nw]; rw = new int[nw]; sw = new int[nw]; tw = 1500; vw = new h[tw]; ww = new int[tw]; xw = new int[tw]; yw = new int[tw]; zw = new int[tw]; ax = new h[200]; bx = new boolean[tw]; cx = 500; ex = new h[cx]; fx = new int[cx]; gx = new int[cx]; hx = new int[cx]; ix = new int[cx]; jx = new boolean[cx]; lx = 30; nx = new int[35]; ox = new int[35]; px = new int[35]; qx = -1; rx = ""; levelXpValues = new int[99]; ux = new int[18]; vx = new int[18]; wx = new int[18]; xx = new int[5]; fy = -1; ny = 25; py = new boolean[ny]; prayerStatus = new boolean[50]; ry = false; sy = true; ty = false; uy = false; vy = false; bz = 250; cz = new String[bz]; dz = new String[bz]; ez = new int[bz]; fz = new int[bz]; gz = new int[bz]; hz = new int[bz]; iz = new int[bz]; jz = new int[bz]; kz = new int[bz]; vz = 5; wz = new String[vz]; xz = new int[vz]; showDuelWindow = false; zz = ""; bab = new int[8]; cab = new int[8]; eab = new int[8]; fab = new int[8]; gab = false; hab = false; iab = false; jab = false; kab = false; lab = false; showDuelConfirmationDialog = false; nab = false; qab = new int[8]; rab = new int[8]; tab = new int[8]; uab = new int[8]; showTradeWindow = false; abb = ""; cbb = new int[14]; dbb = new int[14]; fbb = new int[14]; gbb = new int[14]; hbb = false; ibb = false; showTradeConfirmationDialog = false; nbb = false; pbb = new int[14]; qbb = new int[14]; sbb = new int[14]; tbb = new int[14]; showShopWindow = false; xbb = new int[256]; ybb = new int[256]; zbb = new int[256]; acb = -1; bcb = -2; showBankWindow = false; ecb = new int[256]; fcb = new int[256]; hcb = new int[256]; icb = new int[256]; jcb = -1; kcb = -2; lcb = 48; ncb = false; pcb = new String[5]; tcb = ""; ucb = ""; vcb = false; showWelcomeDialog = false; showNonMembersServerDialog = false; ddb = ""; idb = false; feb = ""; geb = ""; heb = ""; ieb = ""; zeb = false; dfb = -1; efb = new int[5]; ffb = new int[5]; gfb = new int[5]; hfb = new int[5]; jfb = new String[5]; kfb = false; wfb = new int[5]; xfb = new int[5]; zfb = new String[50]; agb = new int[50]; bgb = new int[50]; cgb = new int[50]; dgb = new int[50]; fgb = new int[50]; ggb = new int[50]; hgb = new int[50]; igb = new int[50]; kgb = new int[50]; lgb = new int[50]; mgb = new int[50]; qgb = false; rgb = false; tgb = 1; ugb = 2; vgb = 2; wgb = 8; xgb = 14; zgb = 1; jhb = new int[50]; khb = new int[50]; lhb = new int[50]; mhb = new int[50]; } public boolean isMember; public static String gameDataPath = ""; public BigInteger rsaKey1; public BigInteger rsaKey2; int packetErrorCount; boolean playingFromInvalidHost; boolean outOfMemory; public boolean isApplet; int kt; int lt; int mouseButtonClicked; int nt; int ot[]; int pt[]; int qt; int rt[]; int st[]; int tt; int ut; int vt; int wt; int xt; Graphics yt; GameCamera zt; m gameGraphics; int bu; int cu; int loggedIn; int windowWidth; int windowHeight; int gu; int hu; int iu; int ju; int ku; int lu; int mu; int nu; int ou; int pu; int qu; int ru; int su; int tu; int uu; int vu; p wu; int xu; int yu; int zu; int av; int bv; int cv; int dv; int ev; int fv; int gv; int hv; int iv; int jv; int kv; int cameraZoom; boolean mv; int nv; int ov; int pv; int qv; int rv; int sv; int tv; int uv; int vv; int wv; int xv; MobileEntity yv[]; MobileEntity zv[]; MobileEntity aw[]; MobileEntity myPlayer; int cw; int dw; int ew; int fw; int gw; int hw; int iw; MobileEntity jw[]; MobileEntity kw[]; MobileEntity lw[]; int mw[]; int nw; int ow; int pw[]; int qw[]; int rw[]; int sw[]; int tw; int uw; h vw[]; int ww[]; int xw[]; int yw[]; int zw[]; h ax[]; boolean bx[]; int cx; int dx; h ex[]; int fx[]; int gx[]; int hx[]; int ix[]; boolean jx[]; int kx; int lx; int mx; int nx[]; int ox[]; int px[]; int qx; String rx; int levelXpValues[]; final int tx = 18; int ux[]; int vx[]; int wx[]; int xx[]; int yx; String shortenedSkillNames[] = { "Attack", "Defense", "Strength", "Hits", "Ranged", "Prayer", "Magic", "Cooking", "Woodcut", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblaw", "Carpentry", "Thieving" }; String skillNames[] = { "Attack", "Defense", "Strength", "Hits", "Ranged", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblaw", "Carpentry", "Thieving" }; String equiptmentStatusNames[] = { "Armour", "WeaponAim", "WeaponPower", "Magic", "Prayer" }; g cy; int dy; int ey; int fy; g gy; int hy; int iy; long jy; g ky; int ly; int my; int ny; String questNames[] = { "Black knight's fortress", "Cook's assistant", "Demon slayer", "Doric's quest", "The restless ghost", "Goblin diplomacy", "Ernest the chicken", "Imp catcher", "Pirate's treasure", "Prince Ali rescue", "Romeo & Juliet", "Sheep shearer", "Shield of Arrav", "The knight's sword", "Vampire slayer", "Witch's potion", "Dragon slayer", "Witch's house (members)", "Lost city (members)", "Hero's quest (members)", "Druidic ritual (members)", "Merlin's crystal (members)", "Scorpion catcher (members)", "Family crest (members)", "Tribal totem (members)" }; boolean py[]; boolean prayerStatus[]; boolean ry; boolean sy; boolean ty; boolean uy; boolean vy; int wy; int xy; int yy; int zy; int az; int bz; String cz[]; String dz[]; int ez[]; int fz[]; int gz[]; int hz[]; int iz[]; int jz[]; int kz[]; int lz; int mz; int nz; int oz; g pz; int qz; int rz; int sz; int tz; int uz; int vz; String wz[]; int xz[]; boolean showDuelWindow; String zz; int aab; int bab[]; int cab[]; int dab; int eab[]; int fab[]; boolean gab; boolean hab; boolean iab; boolean jab; boolean kab; boolean lab; boolean showDuelConfirmationDialog; boolean nab; long oab; int pab; int qab[]; int rab[]; int sab; int tab[]; int uab[]; int vab; int wab; int xab; int yab; boolean showTradeWindow; String abb; int bbb; int cbb[]; int dbb[]; int ebb; int fbb[]; int gbb[]; boolean hbb; boolean ibb; int jbb; int kbb; long lbb; boolean showTradeConfirmationDialog; boolean nbb; int obb; int pbb[]; int qbb[]; int rbb; int sbb[]; int tbb[]; boolean showShopWindow; int vbb; int wbb; int xbb[]; int ybb[]; int zbb[]; int acb; int bcb; boolean showBankWindow; int dcb; int ecb[]; int fcb[]; int gcb; int hcb[]; int icb[]; int jcb; int kcb; int lcb; int mcb; boolean ncb; int ocb; String pcb[]; int qcb; int rcb; int scb; String tcb; String ucb; boolean vcb; boolean showWelcomeDialog; int xcb; String ycb; int zcb; int adb; int bdb; boolean showNonMembersServerDialog; String ddb; int edb; int fdb; int gdb; int wildernessStatus; boolean idb; int jdb; g kdb; int ldb; int mdb; g ndb; int odb; int pdb; int qdb; int rdb; int sdb; int tdb; int udb; int vdb; g wdb; int xdb; int ydb; int zdb; int aeb; int beb; int ceb; int deb; int eeb; String feb; String geb; String heb; String ieb; g jeb; int keb; int leb; int meb; int neb; int oeb; int peb; int qeb; int reb; int seb; int teb; int ueb; int veb; int web; int xeb; int yeb; boolean zeb; g afb; int bfb; int cfb; int dfb; int efb[]; int ffb[]; int gfb[]; int hfb[]; int ifb[] = { 0, 1, 2, 3, 4 }; String jfb[]; boolean kfb; g lfb; int mfb; int nfb; int ofb; int pfb; int qfb; int rfb; int sfb; int tfb; int ufb; int vfb; int wfb[]; int xfb[]; int yfb; String zfb[]; int agb[]; int bgb[]; int cgb[]; int dgb[]; int egb; int fgb[]; int ggb[]; int hgb[]; int igb[]; int jgb; int kgb[]; int lgb[]; int mgb[]; int ngb; int ogb; int pgb[][] = { { 11, 2, 9, 7, 1, 6, 10, 0, 5, 8, 3, 4 }, { 11, 2, 9, 7, 1, 6, 10, 0, 5, 8, 3, 4 }, { 11, 3, 2, 9, 7, 1, 6, 10, 0, 5, 8, 4 }, { 3, 4, 2, 9, 7, 1, 6, 10, 8, 11, 0, 5 }, { 3, 4, 2, 9, 7, 1, 6, 10, 8, 11, 0, 5 }, { 4, 3, 2, 9, 7, 1, 6, 10, 8, 11, 0, 5 }, { 11, 4, 2, 9, 7, 1, 6, 10, 0, 5, 8, 3 }, { 11, 2, 9, 7, 1, 6, 10, 0, 5, 8, 4, 3 } }; boolean qgb; boolean rgb; int sgb; int tgb; int ugb; int vgb; int wgb; int xgb; int ygb; int zgb; public int ahb[] = { 0xff0000, 0xff8000, 0xffe000, 0xa0e000, 57344, 32768, 41088, 45311, 33023, 12528, 0xe000e0, 0x303030, 0x604000, 0x805000, 0xffffff }; public int bhb[] = { 0xffc030, 0xffa040, 0x805030, 0x604020, 0x303030, 0xff6020, 0xff4000, 0xffffff, 65280, 65535 }; public int chb[] = { 0xecded0, 0xccb366, 0xb38c40, 0x997326, 0x906020 }; int dhb[] = { 0, 1, 2, 1 }; int ehb[] = { 0, 1, 2, 1, 0, 0, 0, 0 }; int fhb[] = { 0, 0, 0, 0, 0, 1, 2, 1 }; byte loadedSoundData[]; AudioReader audioReader; int ihb; int jhb[]; int khb[]; int lhb[]; int mhb[]; String recoveryQuestions[] = { "Where were you born?", "What was your first teacher's name?", "What is your father's middle name?", "Who was your first best friend?", "What is your favourite vacation spot?", "What is your mother's middle name?", "What was your first pet's name?", "What was the name of your first school?", "What is your mother's maiden name?", "Who was your first boyfriend/girlfriend?", "What was the first computer game you purchased?", "Who is your favourite actor/actress?", "Who is your favourite author?", "Who is your favourite musician?", "Who is your favourite cartoon character?", "What is your favourite book?", "What is your favourite food?", "What is your favourite movie?" }; }