rendered paste bodyimport 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 =