Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package firyze;
- import java.applet.AppletContext;
- import java.awt.*;
- import java.io.*;
- import java.net.*;
- import java.lang.reflect.Method;
- import java.text.DecimalFormat;
- import java.text.DecimalFormatSymbols;
- import java.text.SimpleDateFormat;
- import java.util.Calendar;
- import firyze.cache.CacheDownloader;
- import firyze.entity.Mobile;
- import firyze.entity.Item;
- import firyze.entity.ItemDef;
- import firyze.entity.Npc;
- import firyze.entity.NpcDef;
- import firyze.entity.ObjectDef;
- import firyze.entity.Player;
- import firyze.net.SignLink;
- @SuppressWarnings("serial")
- public class Client extends RSApplet {
- public String indexLocation(int cacheIndex, int index) {
- return SignLink.findCacheDir() + "index" + cacheIndex + "/" + (index != -1 ? index + ".gz" : "");
- }
- public void repackCacheIndex(int cacheIndex) {
- System.out.println("Started repacking index " + cacheIndex + ".");
- int indexLength = new File(indexLocation(cacheIndex, -1)).listFiles().length;
- File[] file = new File(indexLocation(cacheIndex, -1)).listFiles();
- try {
- for(int index = 0; index < indexLength; index++) {
- int fileIndex = Integer.parseInt(getFileNameWithoutExtension(file[index].toString()));
- byte[] data = fileToByteArray(cacheIndex, fileIndex);
- if(data != null && data.length > 0) {
- decompressors[cacheIndex].method234(data.length, data, fileIndex);
- System.out.println("Repacked " + fileIndex + ".");
- } else {
- System.out.println("Unable to locate index " + fileIndex + ".");
- }
- }
- } catch(Exception e) {
- System.out.println("Error packing cache index " + cacheIndex + ".");
- }
- System.out.println("Finished repacking " + cacheIndex + ".");
- }
- public byte[] fileToByteArray(int cacheIndex, int index) {
- try {
- if(indexLocation(cacheIndex, index).length() <= 0 || indexLocation(cacheIndex, index) == null) {
- return null;
- }
- File file = new File(indexLocation(cacheIndex, index));
- byte[] fileData = new byte[(int)file.length()];
- FileInputStream fis = new FileInputStream(file);
- fis.read(fileData);
- fis.close();
- return fileData;
- } catch(Exception e) {
- return null;
- }
- }
- int cacheSpriteAmount = 45;
- String spriteLoc = SignLink.findCacheDir() + "/images/";
- public static boolean fullScreenOn = false;
- public static String server = "127.0.0.1";
- Sprite taskBackground = new Sprite("Tasks/SPRITE 0");
- Sprite taskCompleted = new Sprite("Tasks/SPRITE 1");
- Sprite taskFailed = new Sprite("Tasks/SPRITE 2");
- int taskYpos = -100;
- int taskTimer = 0;
- boolean drawingTask = false;
- String taskInfo;
- boolean taskSuccesful;
- public void setTaskPopUp(String task, boolean succesful) {
- if(!drawingTask) {
- taskInfo = task;
- taskSuccesful = succesful;
- drawingTask = true;
- }
- }
- public void processTaskDrawing() {
- if(!drawingTask)
- return;
- taskTimer++;
- if(taskTimer < 20)
- taskYpos += 5;
- if(taskTimer > 125)
- taskYpos -= 5;
- if(taskYpos == -100) {
- drawingTask = false;
- taskTimer = 0;
- }
- taskBackground.drawHDSprite(140, taskYpos);
- if(taskSuccesful) {
- taskCompleted.drawSprite(160, taskYpos + 20);
- fancyText.drawCenterAlignedString("Task Completed!", 281, taskYpos + 40, 0xFF9820, 0, true);
- } else {
- taskFailed.drawSprite(160, taskYpos + 20);
- fancyText.drawCenterAlignedString("Task Failed!", 281, taskYpos + 40, 0xFF9820, 0, true);
- }
- smallText.drawCenterAlignedString(taskInfo, 281, taskYpos + 60, 0xFF9820, 0, true);
- }
- public String fixChat(String s) {
- String result = "";
- boolean lastIsDot = true;
- boolean lastIsNormal = false;
- for(int i = 0; i < s.length(); i++) {
- char s2 = s.charAt(i);
- if(lastIsNormal) {
- s2 = Character.toLowerCase(s2);
- lastIsNormal = false;
- }
- if(lastIsDot && isNormalChar(s2)) {
- s2 = Character.toUpperCase(s2);
- lastIsDot = false;
- }
- result += s2;
- if(s2 == '.' || s2 == '!' || s2 == '?')
- lastIsDot = true;
- if(isNormalChar(s2))
- lastIsNormal = true;
- }
- return result;
- }
- public boolean isNormalChar(char ch) {
- return ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9';
- }
- Sprite background = new Sprite(spriteLoc + "1.png", 2216, 1300);
- Sprite logo = new Sprite(spriteLoc + "0.png", 304, 90);
- public static String getIndefiniteArticle(String thing) {
- char first = thing.toLowerCase().charAt(0);
- boolean vowel = first == 'a' || first == 'e' || first == 'i' || first == 'o' || first == 'u';
- return (vowel ? "an" : "a");
- }
- public static String addIndefiniteArticle(String thing) {
- return getIndefiniteArticle(thing) + " " + thing;
- }
- public static void writeLoginData() throws IOException {
- if(!rememberMe) return;
- try {
- DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(SignLink.findCacheDir() + "logindata.dat")));
- out.writeUTF(myUsername);
- out.writeUTF(myPassword);
- nameRemembered = true;
- out.close();
- } catch(Exception e) { }
- }
- public static void readLoginData() throws IOException {
- try {
- DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(SignLink.findCacheDir() + "logindata.dat")));
- myUsername = in.readUTF();
- myPassword = in.readUTF();
- if(myUsername.length() > 0 && myPassword.length() > 0) {
- rememberMe = true;
- nameRemembered = true;
- }
- in.close();
- } catch(Exception e) { }
- }
- public static void deleteLoginData() throws IOException {
- try {
- DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(SignLink.findCacheDir() + "logindata.dat")));
- out.writeUTF("");
- out.writeUTF("");
- nameRemembered = false;
- rememberMe = false;
- out.close();
- } catch(Exception e) { }
- }
- static boolean showDeveloperConsole = false;
- public static String cursorInfo[] = {
- "Walk-to", "Take", "Use", "Talk-to", "Open", "Net", "Bait", "Cage", "Harpoon",
- "Chop", "Bury", "Pray-at", "Mine", "Eat", "Drink", "Wield", "Wear", "Equip",
- "Attack", "Enter", "Exit", "Climb-up", "Climb-down", "Search", "Steal", "Smelt",
- "Clean", "Back", "Deposit Bank", "Inspect", "Pick", "Pointless", "Pointless", "Settings",
- "Pointless", "Pointless", "Confirm", "Decline",
- "Cast Ice Barrage", "Cast Blood Barrage on", "Cast Shadow Barrage on", "Cast Smoke Barrage on", "Cast Ice Blitz on on", "Cast Blood Blitz on", "Cast Shadow Blitz on",
- "Cast Smoke Blitz on", "Cast Ice Burst on", "Cast BloodBurst on on", "Cast Shadow Burst on", "Cast Smoke Burst on", "Cast Ice Rush on", "Cast Blood Rush on on",
- "Cast Shadow Rush on", "Cast Smoke Rush on",
- "Link", "Split Private", "Graphics", "Audio", "Pointless", "Pointless", "Click", "Information", "Cast High level alchemy on", "Cast Low level alchemy on", "Value",
- "Select Starter", "Craft-rune", "Pointless", "Pointless", "Slash", "Pull", "Browse Item Database", "Browse Quick","Pointlsee (Cast )","Swap to ",
- };
- private static boolean rememberMe = false, nameRemembered = false;
- public static boolean pvpWorld = true;
- private long yellTimer;
- private boolean rollingCharacter = false;
- /* Staff tab */
- private String showedName = "";
- private String fixedName = "";
- private boolean StaffTabInUse = true;
- private int StaffTabSelected = -1;
- private boolean writingOnStaffTab = false;
- private String staffTabInput = "";
- public static boolean adminMode = false;
- public Sprite magicAuto;
- public boolean Autocast = false;
- public int autocastId = 0;
- public static boolean snow = false;
- public boolean
- fogSky = true,
- staffTabOpen = false,
- idToggle = false,
- hitbarToggle = true,
- menuToggle = true,
- namesToggle = false,
- tooltipToggle = false;
- public static boolean
- playerShadow = true,
- newDamage = true;
- public TextFont smallText;
- public TextFont regularText;
- public TextFont boldText;
- public TextFont fancyText;
- public Sprite[] chatImages = new Sprite[7];
- public int CameraPos1 = 3;
- public int CameraPos2 = 600;
- public AlertHandler alertHandler;
- public int followPlayer = 0;
- public int followNPC = 0;
- public int followDistance = 1;
- public boolean selectAction;
- public int isClicked;
- public Sprite[] LOGIN = new Sprite[27];
- public Sprite[] combatIcons = new Sprite[4];
- public Sprite qc;
- public void welcome() {
- }
- public String formatValue(int i, String Separator) {
- DecimalFormatSymbols separator = new DecimalFormatSymbols();
- separator.setGroupingSeparator(',');
- DecimalFormat formatter = new DecimalFormat("#,###,###,###", separator);
- return formatter.format(i).replaceAll(",",Separator);
- }
- public static String optimizeText(String text)
- {
- char buf[] = text.toCharArray();
- boolean endMarker = true;
- for(int i = 0; i < buf.length; i++) {
- char c = buf[i];
- if(endMarker && c >= 'a' && c <= 'z') {
- buf[i] -= 0x20;
- endMarker = false;
- }
- if(c == '.' || c == '!' || c == '?') endMarker = true;
- }
- return new String(buf, 0, buf.length);
- }
- public void setSidebarInterface(int sidebarID, int interfaceID) {
- tabInterfaceIDs[sidebarID] = interfaceID;
- tabID = sidebarID;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- public int positions[] = new int[2000];
- public int landScapes[] = new int[2000];
- public int objects[] = new int[2000];
- public void setNewMaps() {
- try {
- BufferedReader in = new BufferedReader(new FileReader(SignLink.findCacheDir()+"maps/mapConfig.txt"));
- String s;
- int D = 0;
- while((s = in.readLine()) != null) {
- positions[D] = Integer.parseInt(s.substring(s.indexOf("=")+1,s.indexOf("(")));
- landScapes[D] = Integer.parseInt(s.substring(s.indexOf("(")+1,s.indexOf(")")));
- objects[D] = Integer.parseInt(s.substring(s.indexOf("[")+1,s.indexOf("]")));
- D++;
- }
- in.close();
- System.out.println("D: "+D);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- public void maps() {
- for(int MapIndex = 0; MapIndex < 3536; MapIndex++) {
- byte[] abyte0 = GetMap(MapIndex);
- if(abyte0 != null && abyte0.length > 0) {
- decompressors[4].method234(abyte0.length, abyte0, MapIndex);
- }
- }
- }
- public byte[] GetMap(int Index) {
- try {
- File Map = new File(SignLink.findCacheDir()+"/maps/"+Index+".gz");
- byte[] aByte = new byte[(int)Map.length()];
- FileInputStream Fis = new FileInputStream(Map);
- Fis.read(aByte);
- System.out.println(""+Index+" aByte = ["+aByte+"]!");
- Fis.close();
- return aByte;
- } catch(Exception e) {
- return null;
- }
- }
- public final String titleColor(final int i, int type) {
- String titleChatbox = "", titleRightclick = "";
- switch (i) {
- case 0: //orange
- titleChatbox = "13132800";
- titleRightclick = "ort";
- break;
- case 1://purple
- titleChatbox = "11158698";
- titleRightclick = "put";
- break;
- case 2: //red
- titleChatbox = "12656646";
- titleRightclick = "ret";
- break;
- case 3: //green
- titleChatbox = "26112";
- titleRightclick = "grt";
- break;
- case 4: //blue
- titleChatbox = "3368601";
- titleRightclick = "369";
- break;
- }
- if(type == 0)
- return titleChatbox;
- else
- return titleRightclick;
- }
- public static String capitalize(String s) {
- for(int i = 0; i < s.length(); i++) {
- if(i == 0) {
- s = String.format( "%s%s",
- Character.toUpperCase(s.charAt(0)),
- s.substring(1) );
- }
- if(!Character.isLetterOrDigit(s.charAt(i))) {
- if(i + 1 < s.length()) {
- s = String.format( "%s%s%s",
- s.subSequence(0, i+1),
- Character.toUpperCase(s.charAt(i + 1)),
- s.substring(i+2) );
- }
- }
- }
- return s;
- }
- public static int spellID = 0;
- private static String intToKOrMilLongName(int i) {
- String s = String.valueOf(i);
- for(int k = s.length() - 3; k > 0; k -= 3)
- s = s.substring(0, k) + "," + s.substring(k);
- if(s.length() > 8)
- s = "@gre@" + s.substring(0, s.length() - 8) + "M @whi@(" + s + ")";
- else
- if(s.length() > 4)
- s = "@cya@" + s.substring(0, s.length() - 4) + "K @whi@(" + s + ")";
- return " " + s;
- }
- public final String methodR(/*int i,*/ int j) {
- //if(i <= 0)
- // pktType = inStream.readUnsignedByte();
- if(j >= 0 && j < 10000)
- return String.valueOf(j);
- if(j >= 10000 && j < 10000000)
- return j / 1000 + "K";
- if(j >= 10000000 && j < 999999999)
- return j / 1000000 + "M";
- if(j >= 999999999)
- return "*";
- else
- return "?";
- }
- public void models() {
- for(int ModelIndex = 0; ModelIndex < 50000; ModelIndex++) {
- byte[] abyte0 = getModel(ModelIndex);
- if(abyte0 != null && abyte0.length > 0) {
- decompressors[1].method234(abyte0.length, abyte0, ModelIndex);
- pushMessage("Model added successfully!", 0, "");
- }
- }
- }
- public byte[] getModel(int Index) {
- try {
- File Model = new File(SignLink.findCacheDir() + "/models/"+Index+".dat");//there we go.
- byte[] aByte = new byte[(int)Model.length()];
- FileInputStream fis = new FileInputStream(Model);
- fis.read(aByte);
- pushMessage("aByte = ["+aByte+"]!", 0, "");
- fis.close();
- return aByte;
- }
- catch(Exception e)
- {return null;}
- }
- private void stopMidi() {
- SignLink.midifade = 0;
- SignLink.midi = "stop";
- }
- private boolean menuHasAddFriend(int j) {
- if(j < 0)
- return false;
- int k = menuActionID[j];
- if(k >= 2000)
- k -= 2000;
- return k == 337;
- }
- public void drawChannelButtons() {
- String text[] = { "On", "Friends", "Off", "Hide" };
- int disabledColor[] = { 65280, 0xffff00, 0xff0000, 65535 };
- switch (cButtonCPos) {
- case 0:
- chatButtons[1].drawSprite(5, 143);
- break;
- case 1:
- chatButtons[1].drawSprite(62, 143);
- break;
- case 2:
- chatButtons[1].drawSprite(119, 143);
- break;
- case 3:
- chatButtons[1].drawSprite(176, 143);
- break;
- case 4:
- chatButtons[1].drawSprite(233, 143);
- break;
- case 5:
- chatButtons[1].drawSprite(290, 143);
- break;
- case 6:
- chatButtons[1].drawSprite(347, 143);
- break;
- }
- if (cButtonHPos == cButtonCPos) {
- switch (cButtonHPos) {
- case 0:
- chatButtons[2].drawSprite(5, 143);
- break;
- case 1:
- chatButtons[2].drawSprite(62, 143);
- break;
- case 2:
- chatButtons[2].drawSprite(119, 143);
- break;
- case 3:
- chatButtons[2].drawSprite(176, 143);
- break;
- case 4:
- chatButtons[2].drawSprite(233, 143);
- break;
- case 5:
- chatButtons[2].drawSprite(290, 143);
- break;
- case 6:
- chatButtons[2].drawSprite(347, 143);
- break;
- case 7:
- chatButtons[3].drawSprite(404, 143);
- break;
- }
- } else {
- switch (cButtonHPos) {
- case 0:
- chatButtons[0].drawSprite(5, 143);
- break;
- case 1:
- chatButtons[0].drawSprite(62, 143);
- break;
- case 2:
- chatButtons[0].drawSprite(119, 143);
- break;
- case 3:
- chatButtons[0].drawSprite(176, 143);
- break;
- case 4:
- chatButtons[0].drawSprite(233, 143);
- break;
- case 5:
- chatButtons[0].drawSprite(290, 143);
- break;
- case 6:
- chatButtons[0].drawSprite(347, 143);
- break;
- case 7:
- chatButtons[3].drawSprite(404, 143);
- break;
- }
- }
- smallText.drawLeftAlignedString("Report Abuse", 425, 157, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("All", 26, 157, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("Game", 76, 157, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("Public", 131, 153, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("Private", 184, 153, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("Clan", 249, 153, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("Trade", 304, 153, 0xffffff, 0, true);
- smallText.drawLeftAlignedString("Yell", 365, 153, 0xffffff, 0, true);
- smallText.drawCenterAlignedString(text[publicChatMode], 147, 164, disabledColor[publicChatMode], 0, true);
- smallText.drawCenterAlignedString(text[privateChatMode], 203, 164, disabledColor[privateChatMode], 0, true);
- smallText.drawCenterAlignedString(text[clanChatMode], 261, 164, disabledColor[clanChatMode], 0, true);
- smallText.drawCenterAlignedString(text[tradeMode], 318, 164, disabledColor[tradeMode], 0, true);
- smallText.drawCenterAlignedString(text[yellChatMode], 374, 164, disabledColor[yellChatMode], 0, true);
- }
- private void drawChatArea() {
- int x = 0;
- int y = 0;
- int width = 500;
- int height = 168;
- chatArea.initDrawingArea();
- Texture.anIntArray1472 = anIntArray1180;
- chatBack[getSpriteID()].drawSprite(0, 0);
- if(backDialogID == 26500 || backDialogID == 26600 || backDialogID == 26700) {
- DrawingArea.fillRect(7, 7, 505, 85, 0, 200);
- DrawingArea.fillRect(7, 7+85, 505, 129-85, 0, 100);
- }
- if(messagePromptRaised) {
- boldText.drawCenterAlignedString(inputPromptTitle, 259, 60, 0, -1, true);
- boldText.drawCenterAlignedString(promptInput + "*", 259, 80, 128, -1, true);
- } else if(inputDialogState == 1) {
- boldText.drawCenterAlignedString("Enter amount:", 259, 60, 0, -1, true);
- boldText.drawCenterAlignedString(amountOrNameInput + "*", 259, 80, 128, -1, true);
- } else if(inputDialogState == 2) {
- boldText.drawCenterAlignedString("Enter name:", 259, 60, 0, -1, true);
- boldText.drawCenterAlignedString(amountOrNameInput + "*", 259, 80, 128, -1, true);
- } else if(chatBoxMessage != null) {
- boldText.drawCenterAlignedString(chatBoxMessage, 259, 60, 0, -1, true);
- boldText.drawCenterAlignedString("Click to continue", 259, 80, 128, -1, true);
- } else if(backDialogID != -1) {
- drawInterface(0, 20, 20, RSInterface.interfaceCache[backDialogID]);
- } else if(dialogID != -1) {
- drawInterface(0, 20, 20, RSInterface.interfaceCache[dialogID]);
- } else {
- int messageCount = 0;
- DrawingArea.setClip(8, 7, 497, 122);
- regularText.drawLeftAlignedString("message", 210, 310, 0, 0, true);
- for(int i = 0; i < 500; i++)
- if(chatMessages[i] != null) {
- int yPos = 111 - 14 * messageCount + chatAreaScrollPos + 5;
- if(yPos < y || yPos > y + height)
- continue;
- int xPos = 11;
- int type = chatTypes[i];
- String name = chatNames[i];
- byte rights = 0;
- if(name != null && name.startsWith("@cr1@")) {
- name = name.substring(5);
- rights = 1;
- } else if(name != null && name.startsWith("@cr3@")) {
- name = name.substring(5);
- rights = 2;
- } else if(name != null && name.startsWith("@cr2@")) {
- name = name.substring(5);
- rights = 3;
- } else if(name != null && name.startsWith("@cr0@")) {
- name = name.substring(5);
- rights = 4;
- }
- if(type == 0)
- if(chatTypeView == 5 || chatTypeView == 0)
- regularText.drawLeftAlignedString(chatMessages[i], xPos, yPos, 0, -1, true);
- if(type == 9)
- if(chatTypeView == 5 || chatTypeView == 0)
- regularText.drawLeftAlignedString(chatMessages[i] + " <col=255>" + name, xPos, yPos, 0x7e3200, -1, true);
- if(type == 12) //yell
- if((chatTypeView == 6 || chatTypeView == 0) && (yellChatMode == 0 || yellChatMode == 1 && isFriendOrSelf(name)))
- regularText.drawLeftAlignedString(chatMessages[i], xPos, yPos, 0, -1, true);
- if((type == 1 || type == 2) && (type == 1 || publicChatMode == 0 || publicChatMode >= 2 && publicChatMode <= 3 && rights >= 1 && rights <= 3 || publicChatMode == 1 && isFriendOrSelf(name.substring(name.indexOf("</col>")+6))))
- if(chatTypeView == 1 || chatTypeView == 0) {
- switch(rights) {
- case 1:
- modIcons[1].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- case 2:
- modIcons[3].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- case 3:
- modIcons[2].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- case 4:
- modIcons[0].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- }
- regularText.drawLeftAlignedString(name + ":", xPos, yPos, 0, -1, true);
- xPos += regularFont.getTextWidth(name) + 8;
- regularText.drawLeftAlignedString(chatMessages[i], xPos, yPos, 255, -1, true);
- }
- if((type == 3 || type == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (type == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(name)))
- if(chatTypeView == 2 || chatTypeView == 0) {
- regularText.drawLeftAlignedString("From", xPos, yPos, 0, -1, true);
- xPos += regularFont.getTextWidth("From ");
- switch(rights) {
- case 1:
- modIcons[1].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- case 2:
- modIcons[3].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- case 3:
- modIcons[2].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- case 4:
- modIcons[0].drawSprite(xPos, yPos - 12);
- xPos += 14;
- break;
- }
- regularText.drawLeftAlignedString(name + ":", xPos, yPos, 0, -1, true);
- xPos += regularFont.getTextWidth(name) + 8;
- regularText.drawLeftAlignedString(chatMessages[i], xPos, yPos, 0x800000, -1, true);
- }
- if(type == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(name)))
- if(chatTypeView == 3 || chatTypeView == 0) {
- regularText.drawLeftAlignedString( name + " " + chatMessages[i], xPos, yPos, 0x800080, -1, true);
- }
- if(type == 5 && splitPrivateChat == 0 && privateChatMode < 2)
- if(chatTypeView == 2 || chatTypeView == 0) {
- regularText.drawLeftAlignedString(chatMessages[i], xPos, yPos, 0x800000, -1, true);
- }
- if(type == 6 && (splitPrivateChat == 0 || chatTypeView == 2) && privateChatMode < 2)
- if(chatTypeView == 2 || chatTypeView == 0) {
- regularText.drawLeftAlignedString("To " + name + ":", xPos, yPos, 0, -1, true);
- regularText.drawLeftAlignedString(chatMessages[i], xPos + 4 + regularFont.getTextWidth("To :" + name), yPos, 0x800000, -1, true);
- }
- if(type == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(name)))
- if(chatTypeView == 3 || chatTypeView == 0 || type == 11 && clanChatMode == 0 && chatTypeView == 11)
- regularText.drawLeftAlignedString(name + " " + chatMessages[i], xPos, yPos, 0x7e3200, -1, true);
- if(type == 16 && (clanChatMode == 0 || clanChatMode == 1 && isFriendOrSelf(chatNames[i]))) {
- if(chatTypeView == 11 || chatTypeView == 0) {
- int clanNameWidth = regularFont.getTextWidth(capitalize(clanNames[i].toLowerCase()));
- regularText.drawLeftAlignedString("[", xPos, yPos, 0, -1, true);
- regularText.drawLeftAlignedString("]", clanNameWidth + xPos + 5, yPos, 0, -1, true);
- xPos += 30;
- xPos += clanNameWidth;
- switch(rights) {
- case 1:
- modIcons[1].drawSprite(xPos - 18, yPos - 12);
- xPos += 14;
- break;
- case 2:
- modIcons[2].drawSprite(xPos - 18, yPos - 12);
- xPos += 14;
- break;
- case 3:
- modIcons[3].drawSprite(xPos - 18, yPos - 12);
- xPos += 14;
- break;
- case 4:
- modIcons[0].drawSprite(xPos - 18, yPos - 12);
- xPos += 14;
- break;
- }
- regularText.drawLeftAlignedString(""+capitalize(clanNames[i].toLowerCase())+"", 16, yPos, 255, -1, true); //14
- regularText.drawBasicString("<col=0>"+capitalize(chatNames[i]) + ":", xPos-17, yPos);
- xPos += regularFont.getTextWidth(chatNames[i]) + 7;
- regularText.drawLeftAlignedString(optimizeText(chatMessages[i].toLowerCase()), xPos-16, yPos, 0x800000, -1, true);
- }
- }
- messageCount++;
- }
- DrawingArea.removeClip();
- chatAreaScrollMax = messageCount * 14 + 12;
- if(chatAreaScrollMax < 111)
- chatAreaScrollMax = 111;
- drawScrollbar(496, 7, 114, chatAreaScrollMax - chatAreaScrollPos - 113, chatAreaScrollMax);
- String s;
- if(myPlayer != null && myPlayer.name != null)
- s = "<col="+titleColor(myPlayer.titleColor, 0)+">" + myPlayer.title + "</col>" + myPlayer.name;
- else
- s = TextClass.fixName(capitalize(myUsername));
- regularText.drawLeftAlignedString(s + ":", 11, 133, 0, -1, true);
- regularText.drawLeftAlignedString(inputString + (writingOnStaffTab ? "" : "*"), 13 + regularFont.getTextWidth(s + ": "), 133, 255, -1, false);
- DrawingArea.drawHorizontalLine(7, 121, 506, 0x807660);
- }
- drawChannelButtons();
- if(menuOpen)
- drawMenu(0, 338);
- chatArea.drawGraphics(0, 338, super.graphics);
- mainGameArea.initDrawingArea();
- Texture.anIntArray1472 = anIntArray1182;
- }
- public void init() {
- try {
- super.setCursor(0);
- System.out.println("Firyze is loading...");
- nodeID = 10;//friends list order
- portOff = 0;
- setHighMem();
- isMembers = true;
- SignLink.startpriv(InetAddress.getLocalHost());
- instance = this;
- initClientFrame(765, 503);
- readLoginData();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public void drawTabHover() {
- if(tabHPos == 0 && tabInterfaceIDs[0] != -1)
- tabHover.drawSprite(3+3, 0);
- else if(tabHPos == 1 && tabInterfaceIDs[1] != -1)
- tabHover.drawSprite(33+3, 0);
- else if(tabHPos == 2 && tabInterfaceIDs[2] != -1)
- tabHover.drawSprite(63+3, 0);
- else if(tabHPos == 3 && tabInterfaceIDs[14] != -1)
- tabHover.drawSprite(93+3, 0);
- else if(tabHPos == 4 && tabInterfaceIDs[3] != -1)
- tabHover.drawSprite(123+3, 0);
- else if(tabHPos == 5 && tabInterfaceIDs[4] != -1)
- tabHover.drawSprite(153+3, 0);
- else if(tabHPos == 6 && tabInterfaceIDs[5] != -1)
- tabHover.drawSprite(183+3, 0);
- else if(tabHPos == 7 && tabInterfaceIDs[6] != -1)
- tabHover.drawSprite(213+3, 0);
- else if(tabHPos == 15 && tabInterfaceIDs[16] != -1)
- tabHover.drawSprite(3+3, 298);
- else if(tabHPos == 8 && tabInterfaceIDs[9] != -1)
- tabHover.drawSprite(33+3, 298);
- else if(tabHPos == 9 && tabInterfaceIDs[8] != -1)
- tabHover.drawSprite(63+3, 298);
- else if(tabHPos == 10 && tabInterfaceIDs[7] != -1)
- tabHover.drawSprite(93+3, 298);
- else if(tabHPos == 11 && tabInterfaceIDs[11] != -1)
- tabHover.drawSprite(123+3, 298);
- else if(tabHPos == 12 && tabInterfaceIDs[12] != -1)
- tabHover.drawSprite(153+3, 298);
- else if(tabHPos == 13 && tabInterfaceIDs[13] != -1)
- tabHover.drawSprite(183+3,298);
- else if(tabHPos == 14 && tabInterfaceIDs[15] != -1)
- tabHover.drawSprite(213+3, 298);
- }
- public void startRunnable(Runnable runnable, int i) {
- if(i > 10)
- i = 10;
- if(SignLink.mainapp != null) {
- SignLink.startthread(runnable, i);
- } else {
- super.startRunnable(runnable, i);
- }
- }
- public Socket openSocket(int port) throws IOException {
- return new Socket(InetAddress.getByName(server), port);
- }
- private boolean processMenuClick() {
- if(activeInterfaceType != 0)
- return false;
- int j = super.clickMode3;
- if(spellSelected == 1 && super.saveClickX >= 503 && super.saveClickY >= 160 && super.saveClickX <= 765 && super.saveClickY <= 205)
- j = 0;
- if(menuOpen) {
- if(j != 1) {
- int k = super.mouseX;
- int j1 = super.mouseY;
- if(menuScreenArea == 0) {
- k -= 4;
- j1 -= 4;
- }
- if(menuScreenArea == 1) {
- k -= 516;
- j1 -= 168;
- }
- if(menuScreenArea == 2) {
- k -= 5;
- j1 -= 338;
- }
- if(menuScreenArea == 3) {
- k -= 516;
- j1 -= 0;
- }
- if(k < menuOffsetX - 10 || k > menuOffsetX + menuWidth + 10 || j1 < menuOffsetY - 10 || j1 > menuOffsetY + menuHeight + 10) {
- menuOpen = false;
- if(menuScreenArea == 1)
- needDrawTabArea = true;
- if(menuScreenArea == 2)
- inputTaken = true;
- }
- }
- if(j == 1) {
- int l = menuOffsetX;
- int k1 = menuOffsetY;
- int i2 = menuWidth;
- int k2 = super.saveClickX;
- int l2 = super.saveClickY;
- if(menuScreenArea == 0) {
- k2 -= 4;
- l2 -= 4;
- }
- if(menuScreenArea == 1) {
- k2 -= 516;
- l2 -= 168;
- }
- if(menuScreenArea == 2) {
- k2 -= 5;
- l2 -= 338;
- }
- if(menuScreenArea == 3) {
- k2 -= 516;
- l2 -= 0;
- }
- int i3 = -1;
- for(int j3 = 0; j3 < menuActionRow; j3++) {
- int k3 = k1 + 31 + (menuActionRow - 1 - j3) * 15;
- if(k2 > l && k2 < l + i2 && l2 > k3 - 13 && l2 < k3 + 3)
- i3 = j3;
- }
- System.out.println(i3);
- if(i3 != -1)
- doAction(i3);
- menuOpen = false;
- if(menuScreenArea == 1)
- needDrawTabArea = true;
- if(menuScreenArea == 2) {
- inputTaken = true;
- }
- }
- return true;
- } else {
- if(j == 1 && menuActionRow > 0) {
- int i1 = menuActionID[menuActionRow - 1];
- if(i1 == 632 || i1 == 78 || i1 == 867 || i1 == 431 || i1 == 53 || i1 == 74 || i1 == 454 || i1 == 539 || i1 == 493 || i1 == 847 || i1 == 447 || i1 == 1125) {
- int l1 = menuActionCmd2[menuActionRow - 1];
- int j2 = menuActionCmd3[menuActionRow - 1];
- RSInterface class9 = RSInterface.interfaceCache[j2];
- if(class9.aBoolean259 || class9.aBoolean235 || class9.allowSwapItems) { //item dragging
- aBoolean1242 = false;
- anInt989 = 0;
- anInt1084 = j2;
- anInt1085 = l1;
- activeInterfaceType = 2;
- anInt1087 = super.saveClickX;
- anInt1088 = super.saveClickY;
- if(RSInterface.interfaceCache[j2].parentID == openInterfaceID)
- activeInterfaceType = 1;
- if(RSInterface.interfaceCache[j2].parentID == backDialogID)
- activeInterfaceType = 3;
- return true;
- }
- }
- }
- if(j == 1 && (anInt1253 == 1 || menuHasAddFriend(menuActionRow - 1)) && menuActionRow > 2) {
- j = 2;
- } else if(j == 1 && menuActionRow > 0) {
- doAction(menuActionRow - 1);
- }
- if(j == 2 && menuActionRow > 0) {
- determineMenuSize();
- }
- return false;
- }
- }
- public static int totalRead = 0;
- public static String getFileNameWithoutExtension(String fileName) {
- File tmpFile = new File(fileName);
- tmpFile.getName();
- int whereDot = tmpFile.getName().lastIndexOf('.');
- if (0 < whereDot && whereDot <= tmpFile.getName().length() - 2) {
- return tmpFile.getName().substring(0, whereDot);
- }
- return "";
- }
- public void preloadModels() {
- File file = new File(SignLink.findCacheDir()+"models/");
- File[] fileArray = file.listFiles();
- for(int y = 0; y < fileArray.length; y++) {
- String s = fileArray[y].getName();
- byte[] buffer = ReadFile(SignLink.findCacheDir()+"models/"+s);
- Model.method460(buffer, Integer.parseInt(getFileNameWithoutExtension(s)));
- drawLoadingText(loadingPercent, "Loading models ("+y+"/"+(fileArray.length - 1)+")");
- }
- }
- public static final byte[] ReadFile(String s) {
- try {
- byte abyte0[];
- File file = new File(s);
- int i = (int)file.length();
- abyte0 = new byte[i];
- DataInputStream datainputstream = new DataInputStream(new BufferedInputStream(new FileInputStream(s)));
- datainputstream.readFully(abyte0, 0, i);
- datainputstream.close();
- return abyte0;
- } catch(Exception e) {
- System.out.println((new StringBuilder()).append("Read Error: ").append(s).toString());
- return null;
- }
- }
- private void saveMidi(boolean flag, byte abyte0[]) {
- SignLink.midifade = flag ? 1 : 0;
- SignLink.midisave(abyte0, abyte0.length);
- }
- public static void writeFile(byte[] data, String fileName) throws IOException{
- OutputStream out = new FileOutputStream(fileName);
- out.write(data);
- out.close();
- }
- public final void method22() {
- try {
- anInt985 = -1;
- aClass19_1056.removeAll();
- aClass19_1013.removeAll();
- Texture.method366();
- unlinkMRUNodes();
- sceneGraph.initToNull();
- System.gc();
- for(int i = 0; i < 4; i++)
- aClass11Array1230[i].method210();
- for(int l = 0; l < 4; l++) {
- for(int k1 = 0; k1 < 104; k1++) {
- for(int j2 = 0; j2 < 104; j2++)
- byteGroundArray[l][k1][j2] = 0;
- }
- }
- ObjectManager objectManager = new ObjectManager(byteGroundArray, intGroundArray);
- int k2 = terrainData.length;
- int k18 = 64;
- for(int A = 0; A < k2; A++)
- for(int B = 0; B < 2000; B++)
- if(mapCoordinates[A] == positions[B]){
- terrainIndices[A] = landScapes[B];
- anIntArray1236[A] = objects[B];
- }
- stream.createFrame(0);
- if(!loadGeneratedMap) {
- for(int i3 = 0; i3 < k2; i3++) {
- int i4 = (mapCoordinates[i3] >> 8) * 64 - baseX;
- int k5 = (mapCoordinates[i3] & 0xff) * 64 - baseY;
- byte abyte0[] = terrainData[i3];
- if(FileOperations.FileExists(SignLink.findCacheDir()+"maps/data/"+terrainIndices[i3]+".dat"))
- abyte0 = FileOperations.ReadFile(SignLink.findCacheDir()+"maps/data/"+terrainIndices[i3]+".dat");
- if(abyte0 != null)
- objectManager.method180(abyte0, k5, i4, (anInt1069 - 6) * 8, (anInt1070 - 6) * 8, aClass11Array1230);
- }
- for(int j4 = 0; j4 < k2; j4++) {
- int l5 = (mapCoordinates[j4] >> 8) * k18 - baseX;
- int k7 = (mapCoordinates[j4] & 0xff) * k18 - baseY;
- byte abyte2[] = terrainData[j4];
- if(abyte2 == null && anInt1070 < 800)
- objectManager.method174(k7, 64, 64, l5);
- }
- anInt1097++;
- if(anInt1097 > 160) {
- anInt1097 = 0;
- stream.createFrame(238);
- stream.writeWordBigEndian(96);
- }
- stream.createFrame(0);
- for(int i6 = 0; i6 < k2; i6++) {
- byte abyte1[] = aByteArrayArray1247[i6];
- if(FileOperations.FileExists(SignLink.findCacheDir()+"maps/data/"+anIntArray1236[i6]+".dat"))
- abyte1 = FileOperations.ReadFile(SignLink.findCacheDir()+"maps/data/"+anIntArray1236[i6]+".dat");
- if(abyte1 != null) {
- int l8 = (mapCoordinates[i6] >> 8) * 64 - baseX;
- int k9 = (mapCoordinates[i6] & 0xff) * 64 - baseY;
- objectManager.method190(l8, aClass11Array1230, k9, sceneGraph, abyte1);
- }
- }
- }
- if(loadGeneratedMap) {
- for(int j3 = 0; j3 < 4; j3++) {
- for(int k4 = 0; k4 < 13; k4++) {
- for(int j6 = 0; j6 < 13; j6++) {
- int l7 = anIntArrayArrayArray1129[j3][k4][j6];
- if(l7 != -1) {
- int i9 = l7 >> 24 & 3;
- int l9 = l7 >> 1 & 3;
- int j10 = l7 >> 14 & 0x3ff;
- int l10 = l7 >> 3 & 0x7ff;
- int j11 = (j10 / 8 << 8) + l10 / 8;
- for(int l11 = 0; l11 < mapCoordinates.length; l11++)
- {
- if(mapCoordinates[l11] != j11 || terrainData[l11] == null)
- continue;
- objectManager.method179(i9, l9, aClass11Array1230, k4 * 8, (j10 & 7) * 8, terrainData[l11], (l10 & 7) * 8, j3, j6 * 8);
- break;
- }
- }
- }
- }
- }
- for(int l4 = 0; l4 < 13; l4++) {
- for(int k6 = 0; k6 < 13; k6++){
- int i8 = anIntArrayArrayArray1129[0][l4][k6];
- if(i8 == -1)
- objectManager.method174(k6 * 8, 8, 8, l4 * 8);
- }
- }
- stream.createFrame(0);
- for(int l6 = 0; l6 < 4; l6++) {
- for(int j8 = 0; j8 < 13; j8++) {
- for(int j9 = 0; j9 < 13; j9++) {
- int i10 = anIntArrayArrayArray1129[l6][j8][j9];
- if(i10 != -1) {
- int k10 = i10 >> 24 & 3;
- int i11 = i10 >> 1 & 3;
- int k11 = i10 >> 14 & 0x3ff;
- int i12 = i10 >> 3 & 0x7ff;
- int j12 = (k11 / 8 << 8) + i12 / 8;
- for(int k12 = 0; k12 < mapCoordinates.length; k12++) {
- if(mapCoordinates[k12] != j12 || aByteArrayArray1247[k12] == null)
- continue;
- //byte abyte0[] = aByteArrayArray1247[k12];
- objectManager.method183(aClass11Array1230, sceneGraph, k10, j8 * 8, (i12 & 7) * 8, l6, aByteArrayArray1247[k12], (k11 & 7) * 8, i11, j9 * 8);
- break;
- }
- }
- }
- }
- }
- }
- stream.createFrame(0);
- objectManager.method171(aClass11Array1230, sceneGraph);
- mainGameArea.initDrawingArea();
- stream.createFrame(0);
- int k3 = ObjectManager.anInt145;
- if(k3 > plane)
- k3 = plane;
- if(k3 < plane - 1)
- k3 = plane - 1;
- if(lowMem)
- sceneGraph.method275(ObjectManager.anInt145);
- else
- sceneGraph.method275(0);
- for(int i5 = 0; i5 < 104; i5++) {
- for(int i7 = 0; i7 < 104; i7++)
- spawnGroundItem(i5, i7);
- }
- anInt1051++;
- if(anInt1051 > 98) {
- anInt1051 = 0;
- stream.createFrame(150);
- }
- method63();
- } catch(Exception exception) { }
- ObjectDef.mruNodes1.unlinkAll();
- if(super.gameFrame != null) {
- stream.createFrame(210);
- stream.writeDWord(0x3f008edd);
- }
- System.gc();
- Texture.method367();
- onDemandFetcher.method566();
- int k = (anInt1069 - 6) / 8 - 1;
- int j1 = (anInt1069 + 6) / 8 + 1;
- int i2 = (anInt1070 - 6) / 8 - 1;
- int l2 = (anInt1070 + 6) / 8 + 1;
- if(aBoolean1141) {
- k = 49;
- j1 = 50;
- i2 = 49;
- l2 = 50;
- }
- //TODO what does this do?
- //causes crash when debugging with eclipse
- //when loggin in
- /*for(int l3 = k; l3 <= j1; l3++) {
- for(int j5 = i2; j5 <= l2; j5++)
- if(l3 == k || l3 == j1 || j5 == i2 || j5 == l2) {
- int j7 = onDemandFetcher.method562(0, j5, l3);
- if(j7 != -1)
- onDemandFetcher.method560(j7, 3);
- int k8 = onDemandFetcher.method562(1, j5, l3);
- if(k8 != -1)
- onDemandFetcher.method560(k8, 3);
- }
- }*/
- }
- private void unlinkMRUNodes() {
- ObjectDef.mruNodes1.unlinkAll();
- ObjectDef.mruNodes2.unlinkAll();
- NpcDef.mruNodes.unlinkAll();
- ItemDef.mruNodes2.unlinkAll();
- ItemDef.mruNodes1.unlinkAll();
- Player.mruNodes.unlinkAll();
- SpotAnim.aMRUNodes_415.unlinkAll();
- }
- private void method24(int i)
- {
- int ai[] = minimap.myPixels;
- int j = ai.length;
- for(int k = 0; k < j; k++)
- ai[k] = 0;
- for(int l = 1; l < 103; l++)
- {
- int i1 = 24628 + (103 - l) * 512 * 4;
- for(int k1 = 1; k1 < 103; k1++)
- {
- if((byteGroundArray[i][k1][l] & 0x18) == 0)
- sceneGraph.method309(ai, i1, i, k1, l);
- if(i < 3 && (byteGroundArray[i + 1][k1][l] & 8) != 0)
- sceneGraph.method309(ai, i1, i + 1, k1, l);
- i1 += 4;
- }
- }
- int j1 = ((238 + (int)(Math.random() * 20D)) - 10 << 16) + ((238 + (int)(Math.random() * 20D)) - 10 << 8) + ((238 + (int)(Math.random() * 20D)) - 10);
- int l1 = (238 + (int)(Math.random() * 20D)) - 10 << 16;
- minimap.method343();
- for(int i2 = 1; i2 < 103; i2++)
- {
- for(int j2 = 1; j2 < 103; j2++)
- {
- if((byteGroundArray[i][j2][i2] & 0x18) == 0)
- drawMapScenes(i2, j1, j2, l1, i);
- if(i < 3 && (byteGroundArray[i + 1][j2][i2] & 8) != 0)
- drawMapScenes(i2, j1, j2, l1, i + 1);
- }
- }
- mainGameArea.initDrawingArea();
- anInt1071 = 0;
- for(int k2 = 0; k2 < 104; k2++)
- {
- for(int l2 = 0; l2 < 104; l2++)
- {
- int i3 = sceneGraph.getGroundDecorationUID(plane, k2, l2);
- if(i3 != 0)
- {
- i3 = i3 >> 14 & 0x7fff;
- int j3 = ObjectDef.forID(i3).anInt746;
- if(j3 >= 0)
- {
- int k3 = k2;
- int l3 = l2;
- if(j3 != 22 && j3 != 29 && j3 != 34 && j3 != 36 && j3 != 46 && j3 != 47 && j3 != 48)
- {
- byte byte0 = 104;
- byte byte1 = 104;
- int ai1[][] = aClass11Array1230[plane].anIntArrayArray294;
- for(int i4 = 0; i4 < 10; i4++)
- {
- int j4 = (int)(Math.random() * 4D);
- if(j4 == 0 && k3 > 0 && k3 > k2 - 3 && (ai1[k3 - 1][l3] & 0x1280108) == 0)
- k3--;
- if(j4 == 1 && k3 < byte0 - 1 && k3 < k2 + 3 && (ai1[k3 + 1][l3] & 0x1280180) == 0)
- k3++;
- if(j4 == 2 && l3 > 0 && l3 > l2 - 3 && (ai1[k3][l3 - 1] & 0x1280102) == 0)
- l3--;
- if(j4 == 3 && l3 < byte1 - 1 && l3 < l2 + 3 && (ai1[k3][l3 + 1] & 0x1280120) == 0)
- l3++;
- }
- }
- aSpriteArray1140[anInt1071] = mapFunctions[j3];
- anIntArray1072[anInt1071] = k3;
- anIntArray1073[anInt1071] = l3;
- anInt1071++;
- }
- }
- }
- }
- }
- private void spawnGroundItem(int x, int y) {
- NodeList class19 = groundArray[plane][x][y];
- if(class19 == null) {
- sceneGraph.method295(plane, x, y);
- return;
- }
- int k = 0xfa0a1f01;
- Object obj = null;
- for(Item item = (Item)class19.reverseGetFirst(); item != null; item = (Item)class19.reverseGetNext()) {
- ItemDef itemDef = ItemDef.forID(item.ID);
- int l = itemDef.value;
- if(itemDef.stackable)
- l *= item.anInt1559 + 1;
- // notifyItemSpawn(item, i + baseX, j + baseY);
- if(l > k)
- {
- k = l;
- obj = item;
- }
- }
- class19.insertTail(((Node) (obj)));
- Object obj1 = null;
- Object obj2 = null;
- for(Item item = (Item)class19.reverseGetFirst(); item != null; item = (Item)class19.reverseGetNext()) {
- if(item.ID != ((Item) (obj)).ID && obj1 == null)
- obj1 = item;
- if(item.ID != ((Item) (obj)).ID && item.ID != ((Item) (obj1)).ID && obj2 == null)
- obj2 = item;
- }
- int uid = x + (y << 7) + 0x60000000;
- sceneGraph.addGroundItemTile(x, uid, ((Entity) (obj1)), method42(plane, y * 128 + 64, x * 128 + 64), ((Entity) (obj2)), ((Entity) (obj)), plane, y);
- }
- private void method26(boolean flag) {
- for(int j = 0; j < npcCount; j++) {
- Npc npc = npcArray[npcIndices[j]];
- int k = 0x20000000 + (npcIndices[j] << 14);
- if(npc == null || !npc.isVisible() || npc.desc.aBoolean93 != flag)
- continue;
- int l = npc.x >> 7;
- int i1 = npc.y >> 7;
- if(l < 0 || l >= 104 || i1 < 0 || i1 >= 104)
- continue;
- if(npc.anInt1540 == 1 && (npc.x & 0x7f) == 64 && (npc.y & 0x7f) == 64)
- {
- if(anIntArrayArray929[l][i1] == anInt1265)
- continue;
- anIntArrayArray929[l][i1] = anInt1265;
- }
- if(!npc.desc.canRightClick)
- k += 0x80000000;
- sceneGraph.addEntityA(plane, npc.anInt1552, method42(plane, npc.y, npc.x), k, npc.y, (npc.anInt1540 - 1) * 64 + 60, npc.x, npc, npc.aBoolean1541);
- }
- }
- private boolean replayWave()
- {
- return SignLink.wavereplay();
- }
- public void drawHoverBox(int xPos, int yPos, String text) {
- String[] results = text.split("\n");
- int height = (results.length * 16) + 3;
- int width;
- width = regularFont.getTextWidth(results[0]) + 6;
- for(int i = 1; i < results.length; i++)
- if(width <= regularFont.getTextWidth(results[i]) + 6)
- width = regularFont.getTextWidth(results[i]) + 6;
- DrawingArea.fillRect(xPos, yPos, width, height, 0xFFFFA0);
- DrawingArea.drawRect(xPos, yPos, width, height, 0);
- yPos += 14;
- for(int i = 0; i < results.length; i++) {
- regularFont.drawString(false, xPos + 3, 0, results[i], yPos);
- yPos += 16;
- }
- }
- public void drawPixelBox(int xPos, int yPos, int width, int height, int color, boolean filled) {
- if(filled) {
- int i = 0;
- DrawingArea.fillRect(xPos, yPos, width, height, color); i++;
- DrawingArea.fillRect(xPos+i, yPos+i, width-i, height-i, color); i++;
- DrawingArea.fillRect(xPos+i, yPos+i, width-i, height-i, color); i++;
- DrawingArea.fillRect(xPos+i, yPos+i, width-i, height-i, color); i++;
- DrawingArea.fillRect(xPos+i, yPos+i, width-i, height-i, color); i++;
- DrawingArea.fillRect(xPos+i, yPos+i, width-i, height-i, color); i++;
- } else
- DrawingArea.drawRect(xPos, yPos, width, height, color);
- }
- public void drawBorderPixelBox(int xPos, int yPos, int width, int height, int borderColor, int color, boolean filled) {
- DrawingArea.drawRect(xPos+1, yPos+1, width-1, height-1, color);
- DrawingArea.fillRect(xPos, yPos, width, height, borderColor);
- }
- public void drawBlackBox(int xPos, int yPos) {
- DrawingArea.fillRect(xPos - 2, yPos - 1, 1, 71, 0x726451);
- DrawingArea.fillRect(xPos + 174, yPos, 1, 69, 0x726451);
- DrawingArea.fillRect(xPos - 2, yPos - 2, 178, 1, 0x726451);
- DrawingArea.fillRect(xPos, yPos + 68, 174, 1, 0x726451);
- DrawingArea.fillRect(xPos - 1, yPos - 1, 1, 71, 0x2E2B23);
- DrawingArea.fillRect(xPos + 175, yPos - 1, 1, 71, 0x2E2B23);
- DrawingArea.fillRect(xPos, yPos - 1, 175, 1, 0x2E2B23);
- DrawingArea.fillRect(xPos, yPos + 69, 175, 1, 0x2E2B23);
- DrawingArea.fillRect(xPos, yPos, 174, 68, 0, 220);
- }
- private void buildInterfaceMenu(int i, RSInterface rsInterface, int k, int l, int i1, int j1)
- {
- if(rsInterface.interfaceType != 0 || rsInterface.children == null || rsInterface.interfaceShown)
- return;
- if(k < i || i1 < l || k > i + rsInterface.width || i1 > l + rsInterface.height)
- return;
- int k1 = rsInterface.children.length;
- for(int l1 = 0; l1 < k1; l1++)
- {
- int i2 = rsInterface.childX[l1] + i;
- int j2 = (rsInterface.childY[l1] + l) - j1;
- RSInterface class9_1 = RSInterface.interfaceCache[rsInterface.children[l1]];
- i2 += class9_1.xOffset;
- j2 += class9_1.yOffset;
- if((class9_1.hoverType >= 0 || class9_1.disabledHoverColor != 0) && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height)
- if(class9_1.hoverType >= 0)
- anInt886 = class9_1.hoverType;
- else
- anInt886 = class9_1.id;
- if(class9_1.interfaceType == 8 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height) {
- anInt1315 = class9_1.id;
- }
- if(class9_1.interfaceType == 0) {
- buildInterfaceMenu(i2, class9_1, k, j2, i1, class9_1.scrollPosition);
- if(class9_1.scrollMax > class9_1.height)
- method65(i2 + class9_1.width, class9_1.height, k, i1, class9_1, j2, true, class9_1.scrollMax);
- } else {
- if(class9_1.atActionType == 1 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height) {
- boolean flag = false;
- if(class9_1.contentType != 0)
- flag = buildFriendsListMenu(class9_1);
- if(!flag) {
- //System.out.println("1"+class9_1.tooltip + ", " + class9_1.interfaceID);
- if(idToggle) {
- menuActionName[menuActionRow] = class9_1.tooltip + " @gre@(@whi@" + class9_1.id + "@gre@)";
- menuActionID[menuActionRow] = 315;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- } else {
- menuActionName[menuActionRow] = class9_1.tooltip;
- menuActionID[menuActionRow] = 315;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- }
- if(class9_1.atActionType == 2 && spellSelected == 0 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height) {
- String s = class9_1.selectedActionName;
- if(s.indexOf(" ") != -1)
- s = s.substring(0, s.indexOf(" "));
- menuActionName[menuActionRow] = "Autocast" + "@gre@ " + class9_1.spellName;
- menuActionID[menuActionRow] = 104;// autocast
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- menuActionName[menuActionRow] = s + " @gre@" + class9_1.spellName;
- menuActionID[menuActionRow] = 626;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- if(class9_1.atActionType == 3 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height) {
- menuActionName[menuActionRow] = "Close";
- menuActionID[menuActionRow] = 200;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- if(class9_1.atActionType == 4 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height) {
- //System.out.println("2"+class9_1.tooltip + ", " + class9_1.interfaceID);
- if(idToggle) {
- menuActionName[menuActionRow] = class9_1.tooltip + " @gre@(@whi@" + class9_1.id + "@gre@)";
- menuActionID[menuActionRow] = 169;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- } else {
- menuActionName[menuActionRow] = class9_1.tooltip;
- menuActionID[menuActionRow] = 169;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- if(class9_1.hoverText != null) {
- //drawHoverBox(k, l, class9_1.hoverText);
- //System.out.println("DRAWING INTERFACE: " + class9_1.hoverText);
- }
- }
- if(class9_1.atActionType == 5 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height)
- {
- //System.out.println("3"+class9_1.tooltip + ", " + class9_1.interfaceID);
- if(idToggle) {
- menuActionName[menuActionRow] = class9_1.tooltip + " @gre@(@whi@" + class9_1.id + "@gre@)";
- menuActionID[menuActionRow] = 646;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- } else {
- menuActionName[menuActionRow] = class9_1.tooltip;
- menuActionID[menuActionRow] = 646;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- if(class9_1.atActionType == 6 && !aBoolean1149 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height)
- {
- //System.out.println("4"+class9_1.tooltip + ", " + class9_1.interfaceID);
- if(idToggle) {
- menuActionName[menuActionRow] = class9_1.tooltip + " @gre@(@whi@" + class9_1.id + "@gre@)";
- menuActionID[menuActionRow] = 679;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- } else {
- menuActionName[menuActionRow] = class9_1.tooltip;
- menuActionID[menuActionRow] = 679;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- if(class9_1.interfaceType == 2)
- {
- int k2 = 0;
- for(int l2 = 0; l2 < class9_1.height; l2++)
- {
- for(int i3 = 0; i3 < class9_1.width; i3++)
- {
- int j3 = i2 + i3 * (32 + class9_1.invSpritePadX);
- int k3 = j2 + l2 * (32 + class9_1.invSpritePadY);
- if(k2 < 20)
- {
- j3 += class9_1.spritesX[k2];
- k3 += class9_1.spritesY[k2];
- }
- if(k >= j3 && i1 >= k3 && k < j3 + 32 && i1 < k3 + 32)
- {
- mouseInvInterfaceIndex = k2;
- lastActiveInvInterface = class9_1.id;
- if(class9_1.inventory[k2] > 0)
- {
- ItemDef itemDef = ItemDef.forID(class9_1.inventory[k2] - 1);
- if(itemSelected == 1 && class9_1.isInventoryInterface)
- {
- if(class9_1.id != anInt1284 || k2 != anInt1283)
- {
- menuActionName[menuActionRow] = "Use " + selectedItemName + " -> @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 870;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- } else
- if(spellSelected == 1 && class9_1.isInventoryInterface)
- {
- if((spellUsableOn & 0x10) == 16)
- {
- menuActionName[menuActionRow] = spellTooltip + " @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 543;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- } else
- {
- if(class9_1.isInventoryInterface)
- {
- for(int l3 = 4; l3 >= 3; l3--)
- if(itemDef.inventoryActions != null && itemDef.inventoryActions[l3] != null)
- {
- menuActionName[menuActionRow] = itemDef.inventoryActions[l3] + " @lre@" + itemDef.name;
- if(l3 == 3)
- menuActionID[menuActionRow] = 493;
- if(l3 == 4)
- menuActionID[menuActionRow] = 847;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- } else
- if(l3 == 4)
- {
- menuActionName[menuActionRow] = "Drop @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 847;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- if(class9_1.usableItemInterface)
- {
- menuActionName[menuActionRow] = "Use @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 447;
- menuActionCmd1[menuActionRow] = itemDef.id;
- //k2 = inventory spot
- //System.out.println(k2);
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- if(class9_1.isInventoryInterface && itemDef.inventoryActions != null)
- {
- for(int i4 = 2; i4 >= 0; i4--)
- if(itemDef.inventoryActions[i4] != null)
- {
- menuActionName[menuActionRow] = itemDef.inventoryActions[i4] + " @lre@" + itemDef.name;
- if(i4 == 0)
- menuActionID[menuActionRow] = 74;
- if(i4 == 1)
- menuActionID[menuActionRow] = 454;
- if(i4 == 2)
- menuActionID[menuActionRow] = 539;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- if(class9_1.itemActions != null)
- {
- for(int j4 = 4; j4 >= 0; j4--)
- if(class9_1.itemActions[j4] != null)
- {
- menuActionName[menuActionRow] = class9_1.itemActions[j4] + " @lre@" + itemDef.name;
- if(j4 == 0)
- menuActionID[menuActionRow] = 632;
- if(j4 == 1)
- menuActionID[menuActionRow] = 78;
- if(j4 == 2)
- menuActionID[menuActionRow] = 867;
- if(j4 == 3)
- menuActionID[menuActionRow] = 431;
- if(j4 == 4)
- menuActionID[menuActionRow] = 53;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- if(idToggle) {
- menuActionName[menuActionRow] = "Examine @lre@" + itemDef.name + " @gre@(@whi@" + (class9_1.inventory[k2] - 1) + "@gre@)@whi@ " + ItemDef.itemModels(itemDef.id);
- } else {
- menuActionName[menuActionRow] = "Examine @lre@" + itemDef.name;
- }
- menuActionID[menuActionRow] = 1125;
- menuActionCmd1[menuActionRow] = itemDef.id;
- menuActionCmd2[menuActionRow] = k2;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- }
- }
- k2++;
- }
- }
- }
- }
- }
- }
- public void drawScrollbar(int x, int y, int height, int scrollPos, int scrollMax) {
- if(!fullScreenOn) {
- scrollBar1.drawSprite(x, y);
- scrollBar2.drawSprite(x, (y + height) - 16);
- DrawingArea.fillRect(x, y + 16, 16, height - 32, 0x000001);
- DrawingArea.fillRect(x, y + 16, 15, height - 32, 0x3d3426);
- DrawingArea.fillRect(x, y + 16, 13, height - 32, 0x342d21);
- DrawingArea.fillRect(x, y + 16, 11, height - 32, 0x2e281d);
- DrawingArea.fillRect(x, y + 16, 10, height - 32, 0x29241b);
- DrawingArea.fillRect(x, y + 16, 9, height - 32, 0x252019);
- DrawingArea.fillRect(x, y + 16, 1, height - 32, 0x000001);
- int k1 = ((height - 32) * height) / scrollMax;
- if(k1 < 8)
- k1 = 8;
- int l1 = ((height - 32 - k1) * scrollPos) / (scrollMax - height);
- DrawingArea.fillRect(x, y + 16 + l1, 16, k1, barFillColor);
- DrawingArea.drawVerticalLine(x, y + 16 + l1, k1, 0x000001);
- DrawingArea.drawVerticalLine(x + 1, y + 16 + l1, k1, 0x817051);
- DrawingArea.drawVerticalLine(x + 2, y + 16 + l1, k1, 0x73654a);
- DrawingArea.drawVerticalLine(x + 3, y + 16 + l1, k1, 0x6a5c43);
- DrawingArea.drawVerticalLine(x + 4, y + 16 + l1, k1, 0x6a5c43);
- DrawingArea.drawVerticalLine(x + 5, y + 16 + l1, k1, 0x655841);
- DrawingArea.drawVerticalLine(x + 6, y + 16 + l1, k1, 0x655841);
- DrawingArea.drawVerticalLine(x + 7, y + 16 + l1, k1, 0x61553e);
- DrawingArea.drawVerticalLine(x + 8, y + 16 + l1, k1, 0x61553e);
- DrawingArea.drawVerticalLine(x + 9, y + 16 + l1, k1, 0x5d513c);
- DrawingArea.drawVerticalLine(x + 10, y + 16 + l1, k1, 0x5d513c);
- DrawingArea.drawVerticalLine(x + 11, y + 16 + l1, k1, 0x594e3a);
- DrawingArea.drawVerticalLine(x + 12, y + 16 + l1, k1, 0x594e3a);
- DrawingArea.drawVerticalLine(x + 13, y + 16 + l1, k1, 0x514635);
- DrawingArea.drawVerticalLine(x + 14, y + 16 + l1, k1, 0x4b4131);
- DrawingArea.drawHorizontalLine(x, y + 16 + l1, 15, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 15, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 14, 0x655841);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 13, 0x6a5c43);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 11, 0x6d5f48);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 10, 0x73654a);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 7, 0x76684b);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 5, 0x7b6a4d);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 4, 0x7e6e50);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 3, 0x817051);
- DrawingArea.drawHorizontalLine(x, y + 17 + l1, 2, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 15, 0x564b38);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 14, 0x5d513c);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 11, 0x625640);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 10, 0x655841);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 7, 0x6a5c43);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 5, 0x6e6046);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 4, 0x716247);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 3, 0x7b6a4d);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 2, 0x817051);
- DrawingArea.drawHorizontalLine(x, y + 18 + l1, 1, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 15, 0x514635);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 14, 0x564b38);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 11, 0x5d513c);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 9, 0x61553e);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 7, 0x655841);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 5, 0x6a5c43);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 4, 0x6e6046);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 3, 0x73654a);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 2, 0x817051);
- DrawingArea.drawHorizontalLine(x, y + 19 + l1, 1, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 15, 0x4b4131);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 14, 0x544936);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 13, 0x594e3a);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 10, 0x5d513c);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 8, 0x61553e);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 6, 0x655841);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 4, 0x6a5c43);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 3, 0x73654a);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 2, 0x817051);
- DrawingArea.drawHorizontalLine(x, y + 20 + l1, 1, 0x000001);
- DrawingArea.drawVerticalLine(x + 15, y + 16 + l1, k1, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 15 + l1 + k1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 15, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 14, 0x3f372a);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 10, 0x443c2d);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 9, 0x483e2f);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 7, 0x4a402f);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 4, 0x4b4131);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 3, 0x564b38);
- DrawingArea.drawHorizontalLine(x, y + 14 + l1 + k1, 2, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 15, 0x443c2d);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 11, 0x4b4131);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 9, 0x514635);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 7, 0x544936);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 6, 0x564b38);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 4, 0x594e3a);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 3, 0x625640);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 2, 0x6a5c43);
- DrawingArea.drawHorizontalLine(x, y + 13 + l1 + k1, 1, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 15, 0x443c2d);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 14, 0x4b4131);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 12, 0x544936);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 11, 0x564b38);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 10, 0x594e3a);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 7, 0x5d513c);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 4, 0x61553e);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 3, 0x6e6046);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 2, 0x7b6a4d);
- DrawingArea.drawHorizontalLine(x, y + 12 + l1 + k1, 1, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 16, 0x000001);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 15, 0x4b4131);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 14, 0x514635);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 13, 0x564b38);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 11, 0x594e3a);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 9, 0x5d513c);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 7, 0x61553e);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 5, 0x655841);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 4, 0x6a5c43);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 3, 0x73654a);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 2, 0x7b6a4d);
- DrawingArea.drawHorizontalLine(x, y + 11 + l1 + k1, 1, 0x000001);
- }
- }
- private void updateNPCs(Stream stream, int i)
- {
- anInt839 = 0;
- anInt893 = 0;
- method139(stream);
- method46(i, stream);
- method86(stream);
- for(int k = 0; k < anInt839; k++)
- {
- int l = anIntArray840[k];
- if(npcArray[l].anInt1537 != loopCycle)
- {
- npcArray[l].desc = null;
- npcArray[l] = null;
- }
- }
- if(stream.currentOffset != i)
- {
- SignLink.reporterror(myUsername + " size mismatch in getnpcpos - pos:" + stream.currentOffset + " psize:" + i);
- throw new RuntimeException("eek");
- }
- for(int i1 = 0; i1 < npcCount; i1++)
- if(npcArray[npcIndices[i1]] == null)
- {
- SignLink.reporterror(myUsername + " null entry in npc list - pos:" + i1 + " size:" + npcCount);
- throw new RuntimeException("eek");
- }
- }
- private int cButtonHPos;
- private int cButtonCPos;
- private void processChatModeClick() {
- if(!fullScreenOn) {
- if(super.mouseX >= 5 && super.mouseX <= 61 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 0;
- inputTaken = true;
- } else if(super.mouseX >= 62 && super.mouseX <= 117 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 1;
- inputTaken = true;
- } else if(super.mouseX >= 119 && super.mouseX <= 174 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 2;
- inputTaken = true;
- } else if(super.mouseX >= 176 && super.mouseX <= 231 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 3;
- inputTaken = true;
- } else if(super.mouseX >= 233 && super.mouseX <= 288 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 4;
- inputTaken = true;
- } else if(super.mouseX >= 290 && super.mouseX <= 345 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 5;
- inputTaken = true;
- } else if(super.mouseX >= 347 && super.mouseX <= 402 && super.mouseY >= 482 && super.mouseY <= 503) {
- cButtonHPos = 6;
- inputTaken = true;
- } else if(super.mouseX >= 404 && super.mouseX <= 514 && super.mouseY >= 480 && super.mouseY <= 501) {
- cButtonHPos = 7;
- inputTaken = true;
- } else {
- cButtonHPos = -1;
- inputTaken = true;
- }
- if(super.clickMode3 == 1) {
- if(super.saveClickX >= 5 && super.saveClickX <= 61 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 0;
- chatTypeView = 0;
- inputTaken = true;
- } else if(super.saveClickX >= 62 && super.saveClickX <= 117 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 1;
- chatTypeView = 5;
- inputTaken = true;
- } else if(super.saveClickX >= 119 && super.saveClickX <= 174 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 2;
- chatTypeView = 1;
- inputTaken = true;
- } else if(super.saveClickX >= 176 && super.saveClickX <= 231 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 3;
- chatTypeView = 2;
- inputTaken = true;
- } else if(super.saveClickX >= 233 && super.saveClickX <= 288 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 4;
- chatTypeView = 11;
- inputTaken = true;
- } else if(super.saveClickX >= 290 && super.saveClickX <= 345 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 5;
- chatTypeView = 3;
- inputTaken = true;
- } else if(super.saveClickX >= 347 && super.saveClickX <= 402 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- cButtonCPos = 6;
- chatTypeView = 6;
- inputTaken = true;
- } else if(super.saveClickX >= 404 && super.saveClickX <= 515 && super.saveClickY >= 482 && super.saveClickY <= 505) {
- if(openInterfaceID == -1) {
- clearTopInterfaces();
- reportAbuseInput = "";
- canMute = false;
- for(int i = 0; i < RSInterface.interfaceCache.length; i++) {
- if(RSInterface.interfaceCache[i] == null || RSInterface.interfaceCache[i].contentType != 600)
- continue;
- reportAbuseInterfaceID = openInterfaceID = RSInterface.interfaceCache[i].parentID;
- break;
- }
- } else {
- pushMessage("Please close the interface you have open before using 'report abuse'", 0, "");
- }
- }
- }
- }
- }
- private void method33(int i) {
- int j = Varp.cache[i].anInt709;
- if(j == 0)
- return;
- int k = variousSettings[i];
- if(j == 1)
- {
- if(k == 1)
- Texture.method372(0.90000000000000002D);
- if(k == 2)
- Texture.method372(0.80000000000000004D);
- if(k == 3)
- Texture.method372(0.69999999999999996D);
- if(k == 4)
- Texture.method372(0.59999999999999998D);
- ItemDef.mruNodes1.unlinkAll();
- welcomeScreenRaised = true;
- }
- if(j == 3) {
- switch(k) { //Zoom
- case 4:
- CameraPos2 = 200;
- break;
- case 3:
- CameraPos2 = 400;
- break;
- case 0://0
- CameraPos2 = 600;
- break;
- case 1:
- CameraPos2 = 800;
- break;
- case 2://2
- CameraPos2 = 1000;
- break;
- }
- /*boolean flag1 = musicEnabled;
- if(k == 0)
- {
- adjustVolume(musicEnabled, 0);
- musicEnabled = true;
- }
- if(k == 1)
- {
- adjustVolume(musicEnabled, -400);
- musicEnabled = true;
- }
- if(k == 2)
- {
- adjustVolume(musicEnabled, -800);
- musicEnabled = true;
- }
- if(k == 3)
- {
- adjustVolume(musicEnabled, -1200);
- musicEnabled = true;
- }
- if(k == 4)
- musicEnabled = false;
- if(musicEnabled != flag1 && !lowMem)
- {
- if(musicEnabled)
- {
- nextSong = currentSong;
- songChanging = true;
- onDemandFetcher.method558(2, nextSong);
- } else
- {
- stopMidi();
- }
- prevSong = 0;
- }*/
- }
- if(j == 4) {
- if(k == 0)
- {
- soundEffectsEnabled = true;
- setWaveVolume(0);
- }
- if(k == 1)
- {
- soundEffectsEnabled = true;
- setWaveVolume(-400);
- }
- if(k == 2) {
- soundEffectsEnabled = true;
- setWaveVolume(-800);
- }
- if(k == 3) {
- soundEffectsEnabled = true;
- setWaveVolume(-1200);
- }
- if(k == 4)
- soundEffectsEnabled = false;
- }
- if(j == 5)
- anInt1253 = k;
- if(j == 6)
- anInt1249 = k;
- if(j == 8)
- {
- splitPrivateChat = k;
- inputTaken = true;
- }
- if(j == 9)
- anInt913 = k;
- }
- private void updateEntities() {
- try{
- int anInt974 = 0;
- for(int j = -1; j < playerCount + npcCount; j++) {
- Object obj;
- if(j == -1)
- obj = myPlayer;
- else
- if(j < playerCount)
- obj = playerArray[playerIndices[j]];
- else
- obj = npcArray[npcIndices[j - playerCount]];
- if(obj == null || !((Mobile)(obj)).isVisible())
- continue;
- if(obj instanceof Npc) {
- NpcDef npcDef = ((Npc)obj).desc;
- if(namesToggle) {
- String s = npcDef.name;
- s = s + combatDiffColor(myPlayer.combatLevel, npcDef.combatLevel) + " (level: " + npcDef.combatLevel + ")";
- if(npcDef.combatLevel != 0) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height+15);
- smallFont.drawCenteredString(0xFFFF33, spriteDrawX, s, spriteDrawY-8, true);
- } else {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height+15);
- smallFont.drawCenteredString(0xFFFF33, spriteDrawX, npcDef.name, spriteDrawY-8, true);
- }
- }
- if(npcDef.childrenIDs != null)
- npcDef = npcDef.method161();
- if(npcDef == null)
- continue;
- }
- if(j < playerCount) {
- int l = 45;
- Player player = (Player)obj;
- if(player.headIcon >= 0) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height + 15);
- if(spriteDrawX > -1) {
- if(player.skullIcon < 2) {
- skullIcons[player.skullIcon].drawSprite(spriteDrawX - 12, spriteDrawY - l);
- l += 25;//25
- }
- /*if(player.headIcon < 7) {
- headIcons[player.headIcon].drawSprite(spriteDrawX - 12, spriteDrawY - l);
- l += 20;//20
- }*/
- if(player.headIcon < 18) {
- headIcons[player.headIcon].drawSprite(spriteDrawX - 12, spriteDrawY - l);
- l += 26;
- }
- }
- }
- if(j >= 0 && anInt855 == 10 && anInt933 == playerIndices[j]) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height + 15);
- if(spriteDrawX > -1)
- headIconsHint[player.hintIcon].drawSprite(spriteDrawX - 12, spriteDrawY - l);
- l += 30;
- }
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height + 15);
- if(namesToggle)
- smallText.drawCenterAlignedString("<col="+titleColor(myPlayer.titleColor, 0)+">" + player.name, spriteDrawX, spriteDrawY-8, 0xffffff, 100, true);
- } else {
- NpcDef entityDef_1 = ((Npc)obj).desc;
- if(entityDef_1.anInt75 >= 0 && entityDef_1.anInt75 < headIcons.length) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height + 15);
- if(spriteDrawX > -1)
- headIcons[entityDef_1.anInt75].drawSprite(spriteDrawX - 12, spriteDrawY - 50);
- }
- if(anInt855 == 1 && anInt1222 == npcIndices[j - playerCount] && loopCycle % 20 < 10) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height + 15);
- if(spriteDrawX > -1)
- headIconsHint[0].drawSprite(spriteDrawX - 12, spriteDrawY - 50);
- }
- }
- if(((Mobile) (obj)).textSpoken != null && (j >= playerCount || publicChatMode == 0 || publicChatMode == 3 || publicChatMode == 1 && isFriendOrSelf(((Player)obj).name))) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height);
- if(spriteDrawX > -1 && anInt974 < maxChatsAtTime) {
- anIntArray979[anInt974] = boldFont.method384(((Mobile) (obj)).textSpoken) / 2;
- anIntArray978[anInt974] = boldFont.anInt1497;
- chatDrawXArray[anInt974] = spriteDrawX;
- chatDrawYArray[anInt974] = spriteDrawY;
- chatColorArray[anInt974] = ((Mobile) (obj)).textColor;
- chatAnimArray[anInt974] = ((Mobile) (obj)).textAnim;
- chatCycleArray[anInt974] = ((Mobile) (obj)).textCycle;
- chatSpokenArray[anInt974++] = ((Mobile) (obj)).textSpoken;
- if(anInt1249 == 0 && ((Mobile) (obj)).textAnim >= 1 && ((Mobile) (obj)).textAnim <= 3) {
- anIntArray978[anInt974] += 10;
- chatDrawYArray[anInt974] += 5;
- }
- if(anInt1249 == 0 && ((Mobile) (obj)).textAnim == 4)
- anIntArray979[anInt974] = 60;
- if(anInt1249 == 0 && ((Mobile) (obj)).textAnim == 5)
- anIntArray978[anInt974] += 5;
- }
- }
- if(((Mobile) (obj)).loopCycleStatus > loopCycle) {
- try{
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height + 15);
- if(spriteDrawX > -1) {
- int i1 = (((Mobile) (obj)).currentHealth * 30) / ((Mobile) (obj)).maxHealth;
- if(i1 > 30) {
- i1 = 30;
- }
- int HpPercent = (((Mobile) (obj)).currentHealth * 56) / ((Mobile) (obj)).maxHealth;
- if(HpPercent > 56) {
- HpPercent = 56;
- }
- if(adminMode) //Draws hp amount above bar
- smallText.drawCenterAlignedString((new StringBuilder()).append(((Mobile) (Mobile) obj).currentHealth).append("/").append(((Mobile) (Mobile) obj).maxHealth).toString(), spriteDrawX, spriteDrawY - 19, 0x3399ff, 100, true);
- //HPBar crap
- if(!hitbarToggle){
- DrawingArea.fillRect(spriteDrawX - 15, spriteDrawY - 3, i1, 5, 65280);
- DrawingArea.fillRect((spriteDrawX - 15) + i1, spriteDrawY - 3, 30 - i1, 5, 0xff0000);
- } else {
- cacheSprite[41].drawSprite(spriteDrawX - 28, spriteDrawY - 5);
- cacheSprite[42] = new Sprite(spriteLoc + "42.png", HpPercent, 7);
- cacheSprite[42].drawSprite(spriteDrawX - 28, spriteDrawY - 5);
- }
- }
- } catch(Exception e){ }
- }
- for(int j1 = 0; j1 < 4; j1++)
- if(((Mobile) (obj)).hitsLoopCycle[j1] > loopCycle) {
- npcScreenPos(((Mobile) (obj)), ((Mobile) (obj)).height / 2);
- if(spriteDrawX > -1) {
- switch(j1) {
- case 0:
- spriteDrawY -= 22;
- break;
- case 1:
- spriteDrawY += 0;
- break;
- case 2:
- spriteDrawY += 22;
- break;
- case 3:
- spriteDrawY += 44;
- break;
- }
- //TODO hitmark anims
- int anim = (loopCycle - ((Mobile) (obj)).hitsLoopCycle[j1]) / 2;
- int opacity = 255;
- if(anim >= -10)
- opacity = (int)((float)anim * -25.5);
- spriteDrawY -= anim / 1.5;
- String amount = Integer.toString(((Mobile) (obj)).hitArray[j1]);
- if(((Mobile) (obj)).hitArray[j1] == 0)
- newHitMark[6].drawSprite(spriteDrawX - 8, spriteDrawY - 12, opacity);
- else {
- if(((Mobile)(obj)).hitMarkTypes[j1] != 2) {
- spriteDrawX += 6;
- combatIcons[((Mobile)(obj)).hitType[j1]].drawSprite(spriteDrawX - (22 + amount.length() * 4), spriteDrawY - 12, opacity);
- if(amount.length() == 1)
- newHitMark[0].drawHDSprite(spriteDrawX - 8, spriteDrawY - 12, opacity);
- else if(amount.length() == 2)
- newHitMark[1].drawHDSprite(spriteDrawX - 12, spriteDrawY - 12, opacity);
- else if(amount.length() == 3)
- newHitMark[2].drawHDSprite(spriteDrawX - 16, spriteDrawY - 12, opacity);
- else if(amount.length() == 4)
- newHitMark[3].drawHDSprite(spriteDrawX - 20, spriteDrawY - 12, opacity);
- } else if(((Mobile) (obj)).hitMarkTypes[j1] == 2) {
- if(amount.length() == 1)
- newHitMark[4].drawHDSprite(spriteDrawX - 8, spriteDrawY - 12, opacity);
- else if(amount.length() == 2)
- newHitMark[5].drawHDSprite(spriteDrawX - 12, spriteDrawY - 12, opacity);
- }
- }
- if(((Mobile)(obj)).hitArray[j1] > 0)
- smallText.drawCenterAlignedString("<trans=" + opacity + ">" + String.valueOf(((Mobile) (obj)).hitArray[j1]), spriteDrawX, spriteDrawY + 3, 0xffffff, 0, true);
- }
- }
- }
- for(int k = 0; k < anInt974; k++) {
- int k1 = chatDrawXArray[k];
- int l1 = chatDrawYArray[k];
- int j2 = anIntArray979[k];
- int k2 = anIntArray978[k];
- boolean flag = true;
- while(flag)
- {
- flag = false;
- for(int l2 = 0; l2 < k; l2++)
- if(l1 + 2 > chatDrawYArray[l2] - anIntArray978[l2] && l1 - k2 < chatDrawYArray[l2] + 2 && k1 - j2 < chatDrawXArray[l2] + anIntArray979[l2] && k1 + j2 > chatDrawXArray[l2] - anIntArray979[l2] && chatDrawYArray[l2] - anIntArray978[l2] < l1)
- {
- l1 = chatDrawYArray[l2] - anIntArray978[l2];
- flag = true;
- }
- }
- spriteDrawX = chatDrawXArray[k];
- spriteDrawY = chatDrawYArray[k] = l1;
- String s = chatSpokenArray[k];
- if(publicChatMode != 2) {
- if(anInt1249 == 0) {
- int color = 0xffff00;
- if(chatColorArray[k] < 6)
- color = chatColor[chatColorArray[k]];
- if(chatColorArray[k] == 6)
- color = anInt1265 % 20 >= 10 ? 0xffff00 : 0xff0000;
- if(chatColorArray[k] == 7)
- color = anInt1265 % 20 >= 10 ? 65535 : 255;
- if(chatColorArray[k] == 8)
- color = anInt1265 % 20 >= 10 ? 0x80ff80 : 45056;
- if(chatColorArray[k] == 9) {
- int j3 = 150 - chatCycleArray[k];
- if(j3 < 50)
- color = 0xff0000 + 1280 * j3;
- else
- if(j3 < 100)
- color = 0xffff00 - 0x50000 * (j3 - 50);
- else
- if(j3 < 150)
- color = 65280 + 5 * (j3 - 100);
- }
- if(chatColorArray[k] == 10) {
- int k3 = 150 - chatCycleArray[k];
- if(k3 < 50)
- color = 0xff0000 + 5 * k3;
- else
- if(k3 < 100)
- color = 0xff00ff - 0x50000 * (k3 - 50);
- else
- if(k3 < 150)
- color = (255 + 0x50000 * (k3 - 100)) - 5 * (k3 - 100);
- }
- if(chatColorArray[k] == 11) {
- int l3 = 150 - chatCycleArray[k];
- if(l3 < 50)
- color = 0xffffff - 0x50005 * l3;
- else
- if(l3 < 100)
- color = 65280 + 0x50005 * (l3 - 50);
- else
- if(l3 < 150)
- color = 0xffffff - 0x50000 * (l3 - 100);
- }
- if(chatAnimArray[k] == 0) { //normal
- boldFont.drawText(0, s, spriteDrawY + 1, spriteDrawX);
- boldFont.drawText(color, s, spriteDrawY, spriteDrawX);
- }
- if(chatAnimArray[k] == 1) { //wave
- boldFont.drawWaveText(0, s, spriteDrawX, anInt1265, spriteDrawY + 1);
- boldFont.drawWaveText(color, s, spriteDrawX, anInt1265, spriteDrawY);
- }
- if(chatAnimArray[k] == 2) { //wave2
- boldFont.drawWave2Text(spriteDrawX, s, anInt1265, spriteDrawY + 1, 0);
- boldFont.drawWave2Text(spriteDrawX, s, anInt1265, spriteDrawY, color);
- }
- if(chatAnimArray[k] == 3) { //shake
- boldFont.drawShakeText(150 - chatCycleArray[k], s, anInt1265, spriteDrawY + 1, spriteDrawX, 0);
- boldFont.drawShakeText(150 - chatCycleArray[k], s, anInt1265, spriteDrawY, spriteDrawX, color);
- }
- if(chatAnimArray[k] == 4) { //scroll
- int i4 = boldFont.method384(s);
- int k4 = ((150 - chatCycleArray[k]) * (i4 + 100)) / 150;
- DrawingArea.setClip(spriteDrawX - 50, 0, spriteDrawX + 50, 334);
- boldFont.method385(0, s, spriteDrawY + 1, (spriteDrawX + 50) - k4);
- boldFont.method385(color, s, spriteDrawY, (spriteDrawX + 50) - k4);
- DrawingArea.removeClip();
- }
- if(chatAnimArray[k] == 5) { //slide
- int j4 = 150 - chatCycleArray[k];
- int l4 = 0;
- if(j4 < 25)
- l4 = j4 - 25;
- else
- if(j4 > 125)
- l4 = j4 - 125;
- DrawingArea.setClip(0, spriteDrawY - boldFont.anInt1497 - 1, 512, spriteDrawY + 5);
- boldFont.drawText(0, s, spriteDrawY + 1 + l4, spriteDrawX);
- boldFont.drawText(color, s, spriteDrawY + l4, spriteDrawX);
- DrawingArea.removeClip();
- }
- } else {
- boldFont.drawText(0, s, spriteDrawY + 1, spriteDrawX);
- boldFont.drawText(0xffff00, s, spriteDrawY, spriteDrawX);
- }
- }
- }
- } catch(Exception e){ }
- }
- private void delFriend(long l)
- {
- try
- {
- if(l == 0L)
- return;
- for(int i = 0; i < friendsCount; i++)
- {
- if(friendsListAsLongs[i] != l)
- continue;
- friendsCount--;
- needDrawTabArea = true;
- for(int j = i; j < friendsCount; j++)
- {
- friendsList[j] = friendsList[j + 1];
- friendsNodeIDs[j] = friendsNodeIDs[j + 1];
- friendsListAsLongs[j] = friendsListAsLongs[j + 1];
- }
- stream.createFrame(215);
- stream.writeQWord(l);
- break;
- }
- }
- catch(RuntimeException runtimeexception)
- {
- SignLink.reporterror("18622, " + false + ", " + l + ", " + runtimeexception.toString());
- throw new RuntimeException();
- }
- }
- public void drawSideIcons(){
- if(!fullScreenOn){
- /* Top sideIcons */
- if(tabInterfaceIDs[0] != -1)
- newSideIcons[0].drawSprite(8+3, 8);
- if(tabInterfaceIDs[1] != -1)
- newSideIcons[1].drawSprite(37+3, 8);
- if(tabInterfaceIDs[2] != -1)
- newSideIcons[2].drawSprite(67+3, 8);
- if(tabInterfaceIDs[14] != -1)
- newSideIcons[3].drawSprite(97+3, 8);
- if(tabInterfaceIDs[3] != -1)
- newSideIcons[4].drawSprite(127+3, 8);
- if(tabInterfaceIDs[4] != -1)
- newSideIcons[5].drawSprite(159+3, 8);
- if(tabInterfaceIDs[5] != -1)
- newSideIcons[6].drawSprite(187+3, 8);
- if(tabInterfaceIDs[6] != -1)
- newSideIcons[7].drawSprite(217+3, 8);
- /* Bottom sideIcons */
- if(tabInterfaceIDs[10] != -1)
- newSideIcons[15].drawSprite(8+3, 305);
- if(tabInterfaceIDs[9] != -1)
- newSideIcons[8].drawSprite(38+3, 306);
- if(tabInterfaceIDs[8] != -1)
- newSideIcons[9].drawSprite(70+3, 306);
- if(tabInterfaceIDs[7] != -1)
- newSideIcons[13].drawSprite(97+3, 307);
- if(tabInterfaceIDs[11] != -1)
- newSideIcons[10].drawSprite(127+3, 306);
- if(tabInterfaceIDs[12] != -1)
- newSideIcons[11].drawSprite(157+3, 306);
- if(tabInterfaceIDs[13] != -1)
- newSideIcons[12].drawSprite(187+3, 306);
- if(tabInterfaceIDs[15] != -1)
- newSideIcons[14].drawSprite(216+3, 307);
- }
- }
- public void drawRedStones() {
- if(!fullScreenOn) {
- drawTabHover();
- if(tabInterfaceIDs[tabID] != -1){
- if(tabID == 0)
- tabClicked.drawSprite(2+3, 0);
- if(tabID == 1)
- tabClicked.drawSprite(32+3, 0);
- if(tabID == 2)
- tabClicked.drawSprite(62+3, 0);
- if(tabID == 14)
- tabClicked.drawSprite(92+3, 0);
- if(tabID == 3)
- tabClicked.drawSprite(122+3, 0);
- if(tabID == 4)
- tabClicked.drawSprite(152+3, 0);
- if(tabID == 5)
- tabClicked.drawSprite(182+3, 0);
- if(tabID == 6)
- tabClicked.drawSprite(212+3, 0);
- if(tabID == 16)
- tabClicked.drawSprite(2+3, 298);
- if(tabID == 8)
- tabClicked.drawSprite(32+3, 298);
- if(tabID == 9)
- tabClicked.drawSprite(62+3, 298);
- if(tabID == 7)
- tabClicked.drawSprite(92+3, 298);
- if(tabID == 11)
- tabClicked.drawSprite(122+3, 298);
- if(tabID == 12)
- tabClicked.drawSprite(152+3, 298);
- if(tabID == 13)
- tabClicked.drawSprite(182+3, 298);
- if(tabID == 15)
- tabClicked.drawSprite(212+3, 298);
- }
- }
- }
- private void drawTabArea() {
- tabArea.initDrawingArea();
- tabBack[getSpriteID()].drawSprite(0, 0);
- if(spriteChanged)
- needDrawTabArea = true;
- tabAreaAltered = true;
- if(invOverlayInterfaceID == -1) {
- drawRedStones();
- drawSideIcons();
- }
- if(invOverlayInterfaceID != -1)
- drawInterface(0, 31, 37, RSInterface.interfaceCache[invOverlayInterfaceID]);
- else if(tabInterfaceIDs[tabID] != -1)
- drawInterface(0, 31, 37, RSInterface.interfaceCache[tabInterfaceIDs[tabID]]);
- if(menuOpen)
- drawMenu(516, 168);
- drawDeveloperConsole(showDeveloperConsole, 516, 168);
- tabArea.drawGraphics(516, 168, graphics);
- mainGameArea.initDrawingArea();
- Texture.anIntArray1472 = anIntArray1182;
- }
- private void method37(int j) {
- if(!lowMem) {
- if(Texture.anIntArray1480[17] >= j) {
- Background background = Texture.aBackgroundArray1474s[17];
- int k = background.imgWidth * background.imgHeight - 1;
- //fire cape apparently?
- int j1 = background.imgWidth * animationTimePassed * 2;
- byte abyte0[] = background.aByteArray1450;
- byte abyte3[] = aByteArray912;
- for(int i2 = 0; i2 <= k; i2++)
- abyte3[i2] = abyte0[i2 - j1 & k];
- background.aByteArray1450 = abyte3;
- aByteArray912 = abyte0;
- Texture.method370(17);
- anInt854++;
- if(anInt854 > 1235) {
- anInt854 = 0;
- stream.createFrame(226);
- stream.writeWordBigEndian(0);
- int l2 = stream.currentOffset;
- stream.writeWord(58722);
- stream.writeWordBigEndian(240);
- stream.writeWord((int)(Math.random() * 65536D));
- stream.writeWordBigEndian((int)(Math.random() * 256D));
- if((int)(Math.random() * 2D) == 0)
- stream.writeWord(51825);
- stream.writeWordBigEndian((int)(Math.random() * 256D));
- stream.writeWord((int)(Math.random() * 65536D));
- stream.writeWord(7130);
- stream.writeWord((int)(Math.random() * 65536D));
- stream.writeWord(61657);
- stream.writeBytes(stream.currentOffset - l2);
- }
- }
- if(Texture.anIntArray1480[24] >= j) {
- Background background_1 = Texture.aBackgroundArray1474s[24];
- int l = background_1.imgWidth * background_1.imgHeight - 1;
- int k1 = background_1.imgWidth * animationTimePassed * 2;
- byte abyte1[] = background_1.aByteArray1450;
- byte abyte4[] = aByteArray912;
- for(int j2 = 0; j2 <= l; j2++)
- abyte4[j2] = abyte1[j2 - k1 & l];
- background_1.aByteArray1450 = abyte4;
- aByteArray912 = abyte1;
- Texture.method370(24);
- }
- if(Texture.anIntArray1480[34] >= j) {
- Background background_2 = Texture.aBackgroundArray1474s[34];
- int i1 = background_2.imgWidth * background_2.imgHeight - 1;
- int l1 = background_2.imgWidth * animationTimePassed * 2;
- byte abyte2[] = background_2.aByteArray1450;
- byte abyte5[] = aByteArray912;
- for(int k2 = 0; k2 <= i1; k2++)
- abyte5[k2] = abyte2[k2 - l1 & i1];
- background_2.aByteArray1450 = abyte5;
- aByteArray912 = abyte2;
- Texture.method370(34);
- }
- if(Texture.anIntArray1480[40] >= j)
- {
- Background background_2 = Texture.aBackgroundArray1474s[40];
- int i1 = background_2.imgWidth * background_2.imgHeight - 1;
- int l1 = background_2.imgWidth * animationTimePassed * 2;
- byte abyte2[] = background_2.aByteArray1450;
- byte abyte5[] = aByteArray912;
- for(int k2 = 0; k2 <= i1; k2++)
- abyte5[k2] = abyte2[k2 - l1 & i1];
- background_2.aByteArray1450 = abyte5;
- aByteArray912 = abyte2;
- Texture.method370(40);
- }
- }
- }
- private void method38() {
- for(int i = -1; i < playerCount; i++) {
- int j;
- if(i == -1)
- j = myPlayerIndex;
- else
- j = playerIndices[i];
- Player player = playerArray[j];
- if(player != null && player.textCycle > 0) {
- player.textCycle--;
- if(player.textCycle == 0)
- player.textSpoken = null;
- }
- }
- for(int k = 0; k < npcCount; k++) {
- int l = npcIndices[k];
- Npc npc = npcArray[l];
- if(npc != null && npc.textCycle > 0) {
- npc.textCycle--;
- if(npc.textCycle == 0)
- npc.textSpoken = null;
- }
- }
- }
- private void calcCameraPos() {
- int i = anInt1098 * 128 + 64;
- int j = anInt1099 * 128 + 64;
- int k = method42(plane, j, i) - anInt1100;
- if(xCameraPos < i) {
- xCameraPos += anInt1101 + ((i - xCameraPos) * anInt1102) / 1000;
- if(xCameraPos > i)
- xCameraPos = i;
- }
- if(xCameraPos > i) {
- xCameraPos -= anInt1101 + ((xCameraPos - i) * anInt1102) / 1000;
- if(xCameraPos < i)
- xCameraPos = i;
- }
- if(zCameraPos < k) {
- zCameraPos += anInt1101 + ((k - zCameraPos) * anInt1102) / 1000;
- if(zCameraPos > k)
- zCameraPos = k;
- }
- if(zCameraPos > k) {
- zCameraPos -= anInt1101 + ((zCameraPos - k) * anInt1102) / 1000;
- if(zCameraPos < k)
- zCameraPos = k;
- }
- if(yCameraPos < j) {
- yCameraPos += anInt1101 + ((j - yCameraPos) * anInt1102) / 1000;
- if(yCameraPos > j)
- yCameraPos = j;
- }
- if(yCameraPos > j) {
- yCameraPos -= anInt1101 + ((yCameraPos - j) * anInt1102) / 1000;
- if(yCameraPos < j)
- yCameraPos = j;
- }
- i = anInt995 * 128 + 64;
- j = anInt996 * 128 + 64;
- k = method42(plane, j, i) - anInt997;
- int l = i - xCameraPos;
- int i1 = k - zCameraPos;
- int j1 = j - yCameraPos;
- int k1 = (int)Math.sqrt(l * l + j1 * j1);
- int l1 = (int)(Math.atan2(i1, k1) * 325.94900000000001D) & 0x7ff;
- int i2 = (int)(Math.atan2(l, j1) * -325.94900000000001D) & 0x7ff;
- if(l1 < 128)
- l1 = 128;
- if(l1 > 383)
- l1 = 383;
- if(yCameraCurve < l1) {
- yCameraCurve += anInt998 + ((l1 - yCameraCurve) * anInt999) / 1000;
- if(yCameraCurve > l1)
- yCameraCurve = l1;
- }
- if(yCameraCurve > l1) {
- yCameraCurve -= anInt998 + ((yCameraCurve - l1) * anInt999) / 1000;
- if(yCameraCurve < l1)
- yCameraCurve = l1;
- }
- int j2 = i2 - xCameraCurve;
- if(j2 > 1024)
- j2 -= 2048;
- if(j2 < -1024)
- j2 += 2048;
- if(j2 > 0) {
- xCameraCurve += anInt998 + (j2 * anInt999) / 1000;
- xCameraCurve &= 0x7ff;
- }
- if(j2 < 0) {
- xCameraCurve -= anInt998 + (-j2 * anInt999) / 1000;
- xCameraCurve &= 0x7ff;
- }
- int k2 = i2 - xCameraCurve;
- if(k2 > 1024)
- k2 -= 2048;
- if(k2 < -1024)
- k2 += 2048;
- if(k2 < 0 && j2 > 0 || k2 > 0 && j2 < 0)
- xCameraCurve = i2;
- }
- private void drawMenu(int x, int y) {
- int xPos = menuOffsetX - x;
- int yPos = menuOffsetY - y;
- int menuW = menuWidth;
- int menuH = menuHeight;
- needDrawTabArea = true;
- inputTaken = true;
- tabAreaAltered = true;
- DrawingArea.fillRect(xPos, yPos, menuW, menuH, 0xffffff, 200);
- DrawingArea.fillRect(xPos + 1, yPos + 1, menuW - 2, 18, 0, 100);
- DrawingArea.drawRect(xPos, yPos, menuW, menuH, 0, 150);
- DrawingArea.drawVerticalLine(xPos + menuW, yPos + 1, menuH, 0, 100);
- DrawingArea.drawHorizontalLine(xPos + 1, yPos + menuH, menuW - 1, 0, 100);
- DrawingArea.drawVerticalLine(xPos + menuW + 1, yPos + 1, menuH, 0, 50);
- DrawingArea.drawHorizontalLine(xPos + 1, yPos + menuH + 1, menuW - 1, 0, 50);
- regularFont.method385(0xffffff, "Choose Option", yPos + 14, xPos + 3);
- int mouseX = super.mouseX;
- int mouseY = super.mouseY;
- for(int l1 = 0; l1 < menuActionRow; l1++) {
- int textY = yPos + 31 + (menuActionRow - 1 - l1) * 15;
- int disColor = 0x555555;
- if(mouseX > xPos && mouseX < xPos + menuW && mouseY > textY - 13 && mouseY < textY + 3) {
- DrawingArea.fillRect(xPos + 2, textY - 11, menuWidth - 4, 15, 0, 50);
- disColor = 0x333333;
- }
- regularFont.drawString(false, xPos + 3, disColor, menuActionName[l1], textY);
- }
- /*int xPos = menuOffsetX - (x - 4);
- int yPos = (-y + 4) + menuOffsetY;
- int menuW = menuWidth;
- int menuH = menuHeight + 1;
- inputTaken = true;
- tabAreaAltered = true;
- DrawingArea.fillRect(xPos, yPos + 2, menuW, menuH - 4, 0x706a5e);
- DrawingArea.fillRect(xPos + 1, yPos + 1, menuW - 2, menuH - 2,
- 0x706a5e);
- DrawingArea.fillRect(xPos + 2, yPos, menuW - 4, menuH, 0x706a5e);
- DrawingArea.fillRect(xPos + 3, yPos + 1, menuW - 6, menuH - 2,
- 0x2d2822);
- DrawingArea.fillRect(xPos + 2, yPos + 2, menuW - 4, menuH - 4,
- 0x2d2822);
- DrawingArea.fillRect(xPos + 1, yPos + 3, menuW - 2, menuH - 6,
- 0x2d2822);
- DrawingArea.fillRect(xPos + 2, yPos + 19, menuW - 4, menuH - 22,
- 0x524a3d);
- DrawingArea.fillRect(xPos + 3, yPos + 20, menuW - 6, menuH - 22,
- 0x524a3d);
- DrawingArea.fillRect(xPos + 3, yPos + 20, menuW - 6, menuH - 23,
- 0x2b271c);
- DrawingArea.drawRect(xPos + 3, yPos + 2, menuW - 6, 1, 0x2a291b);
- DrawingArea.drawRect(xPos + 2, yPos + 3, menuW - 4, 1, 0x2a261b);
- DrawingArea.drawRect(xPos + 2, yPos + 4, menuW - 4, 1, 0x252116);
- DrawingArea.drawRect(xPos + 2, yPos + 5, menuW - 4, 1, 0x211e15);
- DrawingArea.drawRect(xPos + 2, yPos + 6, menuW - 4, 1, 0x1e1b12);
- DrawingArea.drawRect(xPos + 2, yPos + 7, menuW - 4, 1, 0x1a170e);
- DrawingArea.drawRect(xPos + 2, yPos + 8, menuW - 4, 2, 0x15120b);
- DrawingArea.drawRect(xPos + 2, yPos + 10, menuW - 4, 1, 0x100d08);
- DrawingArea.drawRect(xPos + 2, yPos + 11, menuW - 4, 1, 0x090a04);
- DrawingArea.drawRect(xPos + 2, yPos + 12, menuW - 4, 1, 0x080703);
- DrawingArea.drawRect(xPos + 2, yPos + 13, menuW - 4, 1, 0x090a04);
- DrawingArea.drawRect(xPos + 2, yPos + 14, menuW - 4, 1, 0x070802);
- DrawingArea.drawRect(xPos + 2, yPos + 15, menuW - 4, 1, 0x090a04);
- DrawingArea.drawRect(xPos + 2, yPos + 16, menuW - 4, 1, 0x070802);
- DrawingArea.drawRect(xPos + 2, yPos + 17, menuW - 4, 1, 0x090a04);
- DrawingArea.drawRect(xPos + 2, yPos + 18, menuW - 4, 1, 0x2a291b);
- DrawingArea.drawRect(xPos + 3, yPos + 19, menuW - 6, 1, 0x564943);
- boldText.drawLeftAlignedString("Choose Option", xPos + 3, yPos + 14,
- 0xc6b895, -1, false);
- int mouseX = super.mouseX - (x);
- int mouseY = (-y) + super.mouseY;
- for (int l1 = 0; l1 < menuActionRow; l1++) {
- int textY = yPos + 31 + (menuActionRow - 1 - l1) * 15;
- int disColor = 0xc6b895;
- if (mouseX > xPos && mouseX < xPos + menuW
- && mouseY > textY - 13 && mouseY < textY + 3) {
- DrawingArea.fillRect(xPos + 3, textY - 11, menuWidth - 6,
- 15, 0x6f695d);
- disColor = 0xeee5c6;
- }
- boldText.drawLeftAlignedString(menuActionName[l1], xPos + 3,
- textY, disColor, 0, false);
- }*/
- }
- private void addFriend(long l) {
- try {
- if(l == 0L)
- return;
- if(friendsCount >= 100 && anInt1046 != 1) {
- pushMessage("Your friendlist is full. Max of 100 for free users, and 200 for members", 0, "");
- return;
- }
- if(friendsCount >= 200) {
- pushMessage("Your friendlist is full. Max of 100 for free users, and 200 for members", 0, "");
- return;
- }
- String s = TextClass.fixName(TextClass.nameForLong(l));
- for(int i = 0; i < friendsCount; i++)
- if(friendsListAsLongs[i] == l) {
- pushMessage(s + " is already on your friend list", 0, "");
- return;
- }
- for(int j = 0; j < ignoreCount; j++)
- if(ignoreListAsLongs[j] == l) {
- pushMessage("Please remove " + s + " from your ignore list first", 0, "");
- return;
- }
- if(s.equals(myPlayer.name)) {
- return;
- } else {
- friendsList[friendsCount] = s;
- friendsListAsLongs[friendsCount] = l;
- friendsNodeIDs[friendsCount] = 0;
- friendsCount++;
- needDrawTabArea = true;
- stream.createFrame(188);
- stream.writeQWord(l);
- return;
- }
- } catch(RuntimeException runtimeexception) {
- SignLink.reporterror("15283, " + (byte)68 + ", " + l + ", " + runtimeexception.toString());
- }
- throw new RuntimeException();
- }
- private int method42(int i, int j, int k) {
- int l = k >> 7;
- int i1 = j >> 7;
- if(l < 0 || i1 < 0 || l > 103 || i1 > 103)
- return 0;
- int j1 = i;
- if(j1 < 3 && (byteGroundArray[1][l][i1] & 2) == 2)
- j1++;
- int k1 = k & 0x7f;
- int l1 = j & 0x7f;
- int i2 = intGroundArray[j1][l][i1] * (128 - k1) + intGroundArray[j1][l + 1][i1] * k1 >> 7;
- int j2 = intGroundArray[j1][l][i1 + 1] * (128 - k1) + intGroundArray[j1][l + 1][i1 + 1] * k1 >> 7;
- return i2 * (128 - l1) + j2 * l1 >> 7;
- }
- private static String intToKOrMil(int j) {
- if(j < 0x186a0)
- return String.valueOf(j);
- if(j < 0x989680)
- return j / 1000 + "K";
- else
- return j / 0xf4240 + "M";
- }
- public int canWalkDelay = 0;
- public int getDis(int coordX1, int coordY1, int coordX2, int coordY2)
- {
- int deltaX = coordX2 - coordX1;
- int deltaY = coordY2 - coordY1;
- return ((int)Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)));
- }
- public int random(int range)
- {
- return (int)(Math.random() * range);
- }
- public boolean withinDistance(int x1, int y1, int x2, int y2, int dis)
- {
- for(int i = 0; i <= dis; i++)
- {
- try{
- if((x1 + i) == x2 && ((y1 + i) == y2 || (y1 - i) == y2 || y1 == y2))
- return true;
- else
- if((x1 - i) == x2 && ((x1 + i) == y2 || (y1 - i) == y2 || y1 == y2))
- return true;
- else
- if(x1 == x2 && ((x1 + i) == y2 || (y1 - i) == y2 || y1 == y2))
- return true;
- } catch(Exception ex){
- System.out.println("Exception in following, method : WithingDistance");
- }
- }
- return false;
- }
- private void resetLogout() {
- try {
- if(socketStream != null)
- socketStream.close();
- }
- catch(Exception _ex) { }
- socketStream = null;
- alertHandler.alert = null;
- loggedIn = false;
- runClicked = true;
- musicOrb = false;
- restOrb = false;
- followPlayer = 0;
- followNPC = 0;
- followDistance = 1;
- prayClicked = false;
- xpClicked = false;
- drawXpBar = false;
- loginScreenState = 0;
- //myUsername = "";
- //myPassword = "";
- unlinkMRUNodes();
- sceneGraph.initToNull();
- for(int i = 0; i < 4; i++)
- aClass11Array1230[i].method210();
- System.gc();
- stopMidi();
- currentSong = -1;
- nextSong = -1;
- prevSong = 0;
- }
- private void charEditChangeGender() {
- charEditChanged = true;
- for(int j = 0; j < 7; j++) {
- charEditIdKit[j] = -1;
- for(int k = 0; k < IdentityKit.length; k++) {
- if(IdentityKit.cache[k].notSelected || IdentityKit.cache[k].bodyPartID != j + (charEditGender ? 0 : 7))
- continue;
- charEditIdKit[j] = k;
- break;
- }
- }
- }
- private void method46(int i, Stream stream) {
- while(stream.bitPosition + 21 < i * 8) {
- int k = stream.readBits(14);
- if(k == 16383)
- break;
- if(npcArray[k] == null)
- npcArray[k] = new Npc();
- Npc npc = npcArray[k];
- npcIndices[npcCount++] = k;
- npc.anInt1537 = loopCycle;
- int l = stream.readBits(5);
- if(l > 15)
- l -= 32;
- int i1 = stream.readBits(5);
- if(i1 > 15)
- i1 -= 32;
- int j1 = stream.readBits(1);
- npc.desc = NpcDef.forID(stream.readBits(14));//NPC FIX
- int k1 = stream.readBits(1);
- if(k1 == 1)
- anIntArray894[anInt893++] = k;
- npc.anInt1540 = npc.desc.aByte68;
- npc.anInt1504 = npc.desc.getDegreesToTurn;
- npc.anInt1554 = npc.desc.walkForwardsAnim;
- npc.anInt1555 = npc.desc.walkBackwardsAnim;
- npc.anInt1556 = npc.desc.walkLeftAnim;
- npc.anInt1557 = npc.desc.walkRightAnim;
- npc.anInt1511 = npc.desc.standAnim;
- npc.setPos(myPlayer.smallX[0] + i1, myPlayer.smallY[0] + l, j1 == 1);
- }
- stream.finishBitAccess();
- }
- public void processGameLoop() {
- if(rsAlreadyLoaded || loadingError || genericLoadingError)
- return;
- loopCycle++;
- if(!loggedIn)
- processLoginScreenInput();
- else
- mainGameProcessor();
- processOnDemandQueue();
- if(isNoclipping) Noclip();
- }
- private void method47(boolean flag) {
- if(myPlayer.x >> 7 == destX && myPlayer.y >> 7 == destY)
- destX = 0;
- int j = playerCount;
- if(flag)
- j = 1;
- for(int l = 0; l < j; l++) {
- Player player;
- int i1;
- if(flag) {
- player = myPlayer;
- i1 = myPlayerIndex << 14;
- } else {
- player = playerArray[playerIndices[l]];
- i1 = playerIndices[l] << 14;
- }
- if(player == null || !player.isVisible())
- continue;
- player.aBoolean1699 = (lowMem && playerCount > 50 || playerCount > 200) && !flag && player.anInt1517 == player.anInt1511;
- int j1 = player.x >> 7;
- int k1 = player.y >> 7;
- if(j1 < 0 || j1 >= 104 || k1 < 0 || k1 >= 104)
- continue;
- if(player.aModel_1714 != null && loopCycle >= player.anInt1707 && loopCycle < player.anInt1708) {
- player.aBoolean1699 = false;
- player.anInt1709 = method42(plane, player.y, player.x);
- sceneGraph.method286(plane, player.y, player, player.anInt1552, player.anInt1722, player.x, player.anInt1709, player.anInt1719, player.anInt1721, i1, player.anInt1720);
- continue;
- }
- if((player.x & 0x7f) == 64 && (player.y & 0x7f) == 64) {
- if(anIntArrayArray929[j1][k1] == anInt1265)
- continue;
- anIntArrayArray929[j1][k1] = anInt1265;
- }
- player.anInt1709 = method42(plane, player.y, player.x);
- sceneGraph.addEntityA(plane, player.anInt1552, player.anInt1709, i1, player.y, 60, player.x, player, player.aBoolean1541);
- }
- }
- private boolean promptUserForInput(RSInterface class9) {
- int j = class9.contentType;
- if(anInt900 == 2) {
- if(j == 201) {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 1;
- inputPromptTitle = "Enter name of friend to add to list";
- }
- if(j == 202) {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 2;
- inputPromptTitle = "Enter name of friend to delete from list";
- }
- }
- if(j == 205) {
- anInt1011 = 250;
- return true;
- }
- if(j == 501) {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 4;
- inputPromptTitle = "Enter name of player to add to list";
- }
- if(j == 502) {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 5;
- inputPromptTitle = "Enter name of player to delete from list";
- }
- if(j == 550) {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 6;
- inputPromptTitle = "Enter the name of the chat you wish to join";
- }
- if(j >= 300 && j <= 313) {
- int type = (j - 300) / 2;
- int direction = j & 1;
- int id = charEditIdKit[type];
- if(id != -1) {
- do {
- if(direction == 0 && --id < 0)
- id = IdentityKit.length - 1;
- if(direction == 1 && ++id >= IdentityKit.length)
- id = 0;
- } while(IdentityKit.cache[id].notSelected || IdentityKit.cache[id].bodyPartID != type + (charEditGender ? 0 : 7));
- charEditIdKit[type] = id;
- charEditChanged = true;
- }
- }
- if(j >= 314 && j <= 323) {
- int type = (j - 314) / 2;
- int direction = j & 1;
- int color = charEditColors[type];
- if(direction == 0 && --color < 0)
- color = charEditColorChoises[type].length - 1;
- if(direction == 1 && ++color >= charEditColorChoises[type].length)
- color = 0;
- charEditColors[type] = color;
- charEditChanged = true;
- }
- if(j == 324 && !charEditGender) {
- charEditGender = true;
- charEditChangeGender();
- }
- if(j == 325 && charEditGender) {
- charEditGender = false;
- charEditChangeGender();
- }
- if(j == 326) {
- stream.createFrame(101);
- stream.writeWordBigEndian(charEditGender ? 0 : 1);
- for(int i1 = 0; i1 < 7; i1++)
- stream.writeWordBigEndian(charEditIdKit[i1]);
- for(int l1 = 0; l1 < 5; l1++)
- stream.writeWordBigEndian(charEditColors[l1]);
- return true;
- }
- if(j == 613)
- canMute = !canMute;
- if(j >= 601 && j <= 612) {
- clearTopInterfaces();
- if(reportAbuseInput.length() > 0) {
- stream.createFrame(218);
- stream.writeQWord(TextClass.longForName(reportAbuseInput));
- stream.writeWordBigEndian(j - 601);
- stream.writeWordBigEndian(canMute ? 1 : 0);
- }
- }
- return false;
- }
- private void method49(Stream stream) {
- for(int j = 0; j < anInt893; j++) {
- int k = anIntArray894[j];
- Player player = playerArray[k];
- int l = stream.readUnsignedByte();
- if((l & 0x40) != 0)
- l += stream.readUnsignedByte() << 8;
- method107(l, k, stream, player);
- }
- }
- //method50
- private void drawMapScenes(int y, int primaryColor, int x, int secondaryColor, int z) {
- int interactableObjectUID = sceneGraph.getWallObjectUID(z, x, y);
- if(interactableObjectUID != 0) {
- int l1 = sceneGraph.getIDTAGForXYZ(z, x, y, interactableObjectUID);
- int direction = l1 >> 6 & 3;
- //east = 0, south = 1, west = 2, north = 3
- int type = l1 & 0x1f;
- int color = primaryColor; //white
- if(interactableObjectUID > 0)
- color = secondaryColor; //red
- int mapPixels[] = minimap.myPixels;
- int px = 24624 + x * 4 + (103 - y) * 512 * 4;
- int objectID = interactableObjectUID >> 14 & 0x7fff;
- ObjectDef object = ObjectDef.forID(objectID);
- if(object.mapSceneID != -1) {
- Background indexedImage_2 = mapScenes[object.mapSceneID];
- if(indexedImage_2 != null) {
- int width = (object.sizeX * 4 - indexedImage_2.imgWidth) / 2;
- int height = (object.sizeY * 4 - indexedImage_2.imgHeight) / 2;
- indexedImage_2.drawBackground(48 + x * 4 + width, 48 + (104 - y - object.sizeY) * 4 + height);
- }
- } else {
- if(type == 0 || type == 2)
- if(direction == 0) {
- mapPixels[px] = color;
- mapPixels[px + 512] = color;
- mapPixels[px + 1024] = color;
- mapPixels[px + 1536] = color;
- } else if(direction == 1) {
- mapPixels[px] = color;
- mapPixels[px + 1] = color;
- mapPixels[px + 2] = color;
- mapPixels[px + 3] = color;
- } else if(direction == 2) {
- mapPixels[px + 3] = color;
- mapPixels[px + 3 + 512] = color;
- mapPixels[px + 3 + 1024] = color;
- mapPixels[px + 3 + 1536] = color;
- } else if(direction == 3) {
- mapPixels[px + 1536] = color;
- mapPixels[px + 1536 + 1] = color;
- mapPixels[px + 1536 + 2] = color;
- mapPixels[px + 1536 + 3] = color;
- }
- if(type == 3)
- if(direction == 0)
- mapPixels[px] = color;
- else if(direction == 1)
- mapPixels[px + 3] = color;
- else if(direction == 2)
- mapPixels[px + 3 + 1536] = color;
- else if(direction == 3)
- mapPixels[px + 1536] = color;
- if(type == 2)
- if(direction == 3) {
- mapPixels[px] = color;
- mapPixels[px + 512] = color;
- mapPixels[px + 1024] = color;
- mapPixels[px + 1536] = color;
- } else if(direction == 0) {
- mapPixels[px] = color;
- mapPixels[px + 1] = color;
- mapPixels[px + 2] = color;
- mapPixels[px + 3] = color;
- } else if(direction == 1) {
- mapPixels[px + 3] = color;
- mapPixels[px + 3 + 512] = color;
- mapPixels[px + 3 + 1024] = color;
- mapPixels[px + 3 + 1536] = color;
- } else if(direction == 2) {
- mapPixels[px + 1536] = color;
- mapPixels[px + 1536 + 1] = color;
- mapPixels[px + 1536 + 2] = color;
- mapPixels[px + 1536 + 3] = color;
- }
- }
- }
- interactableObjectUID = sceneGraph.getInteractableObjectUID(z, x, y);
- if(interactableObjectUID != 0) {
- int i2 = sceneGraph.getIDTAGForXYZ(z, x, y, interactableObjectUID);
- int type2 = i2 >> 6 & 3;
- int j3 = i2 & 0x1f;
- int objectID2 = interactableObjectUID >> 14 & 0x7fff;
- ObjectDef object2 = ObjectDef.forID(objectID2);
- if(object2.mapSceneID != -1) {
- Background scene = mapScenes[object2.mapSceneID];
- if(scene != null) {
- int width2 = (object2.sizeX * 4 - scene.imgWidth) / 2;
- int height2 = (object2.sizeY * 4 - scene.imgHeight) / 2;
- scene.drawBackground(48 + x * 4 + width2, 48 + (104 - y - object2.sizeY) * 4 + height2);
- }
- } else if(j3 == 9) {
- int color2 = 0xeeeeee;
- if(interactableObjectUID > 0)
- color2 = 0xee0000;
- int mapPixels2[] = minimap.myPixels;
- int px2 = 24624 + x * 4 + (103 - y) * 512 * 4;
- if(type2 == 0 || type2 == 2) {
- mapPixels2[px2 + 1536] = color2;
- mapPixels2[px2 + 1024 + 1] = color2;
- mapPixels2[px2 + 512 + 2] = color2;
- mapPixels2[px2 + 3] = color2;
- } else {
- mapPixels2[px2] = color2;
- mapPixels2[px2 + 512 + 1] = color2;
- mapPixels2[px2 + 1024 + 2] = color2;
- mapPixels2[px2 + 1536 + 3] = color2;
- }
- }
- }
- interactableObjectUID = sceneGraph.getGroundDecorationUID(z, x, y);
- if(interactableObjectUID != 0) {
- int j2 = interactableObjectUID >> 14 & 0x7fff;
- ObjectDef class46 = ObjectDef.forID(j2);
- if(class46.mapSceneID != -1) {
- Background background = mapScenes[class46.mapSceneID];
- if(background != null) {
- int i4 = (class46.sizeX * 4 - background.imgWidth) / 2;
- int j4 = (class46.sizeY * 4 - background.imgHeight) / 2;
- background.drawBackground(48 + x * 4 + i4, 48 + (104 - y - class46.sizeY) * 4 + j4);
- }
- }
- }
- }
- private void loadTitleScreen() {
- //titleButton = new Sprite(titleStreamLoader, "titlebutton", 0);
- aBackgroundArray1152s = new Background[12];
- int j = 0;
- try {
- j = Integer.parseInt(getParameter("fl_icon"));
- } catch(Exception _ex) {
- }
- if(j == 0) {
- for(int k = 0; k < 12; k++)
- aBackgroundArray1152s[k] = new Background(titleStreamLoader, "runes", k);
- } else {
- for(int l = 0; l < 12; l++)
- aBackgroundArray1152s[l] = new Background(titleStreamLoader, "runes", 12 + (l & 3));
- }
- aSprite_1201 = new Sprite(128, 265);
- aSprite_1202 = new Sprite(128, 265);
- System.arraycopy(leftSideFlame.pixels, 0, aSprite_1201.myPixels, 0, 33920);
- System.arraycopy(rightSideFlame.pixels, 0, aSprite_1202.myPixels, 0, 33920);
- anIntArray851 = new int[256];
- for(int k1 = 0; k1 < 64; k1++)
- anIntArray851[k1] = k1 * 0x40000;
- for(int l1 = 0; l1 < 64; l1++)
- anIntArray851[l1 + 64] = 0xff0000 + 1024 * l1;
- for(int i2 = 0; i2 < 64; i2++)
- anIntArray851[i2 + 128] = 0xffff00 + 4 * i2;
- for(int j2 = 0; j2 < 64; j2++)
- anIntArray851[j2 + 192] = 0xffffff;
- anIntArray852 = new int[256];
- for(int k2 = 0; k2 < 64; k2++)
- anIntArray852[k2] = k2 * 1024;
- for(int l2 = 0; l2 < 64; l2++)
- anIntArray852[l2 + 64] = 65280 + 4 * l2;
- for(int i3 = 0; i3 < 64; i3++)
- anIntArray852[i3 + 128] = 65535 + 0x40000 * i3;
- for(int j3 = 0; j3 < 64; j3++)
- anIntArray852[j3 + 192] = 0xffffff;
- anIntArray853 = new int[256];
- for(int k3 = 0; k3 < 64; k3++)
- anIntArray853[k3] = k3 * 4;
- for(int l3 = 0; l3 < 64; l3++)
- anIntArray853[l3 + 64] = 255 + 0x40000 * l3;
- for(int i4 = 0; i4 < 64; i4++)
- anIntArray853[i4 + 128] = 0xff00ff + 1024 * i4;
- for(int j4 = 0; j4 < 64; j4++)
- anIntArray853[j4 + 192] = 0xffffff;
- //anIntArray850 = new int[256];
- anIntArray1190 = new int[32768];
- anIntArray1191 = new int[32768];
- randomizeBackground(null);
- //anIntArray828 = new int[32768];
- //anIntArray829 = new int[32768];
- if(!aBoolean831) {
- drawFlames = true;
- aBoolean831 = true;
- startRunnable(this, 2);
- }
- }
- public static void main(String args[]) {
- try {
- nodeID = 10;
- portOff = 0;
- setHighMem(); //sets high or low detail
- isMembers = true;
- SignLink.storeid = 32;
- SignLink.startpriv(InetAddress.getLocalHost());
- instance = new Client();
- instance.createClientFrame(765, 503);
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
- public static Client instance;
- private void loadingStages()
- {
- if(lowMem && loadingStage == 2 && ObjectManager.anInt131 != plane)
- {
- mainGameArea.initDrawingArea();
- cacheSprite[2].drawSprite(8, 9);
- mainGameArea.drawGraphics(4, 4, super.graphics);
- loadingStage = 1;
- aLong824 = System.currentTimeMillis();
- }
- if(loadingStage == 1)
- {
- int j = method54();
- if(j != 0 && System.currentTimeMillis() - aLong824 > 0x57e40L)
- {
- SignLink.reporterror(myUsername + " glcfb " + aLong1215 + "," + j + "," + lowMem + "," + decompressors[0] + "," + onDemandFetcher.getNodeCount() + "," + plane + "," + anInt1069 + "," + anInt1070);
- aLong824 = System.currentTimeMillis();
- }
- }
- if(loadingStage == 2 && plane != anInt985)
- {
- anInt985 = plane;
- method24(plane);
- }
- }
- private int method54() {
- for(int i = 0; i < terrainData.length; i++) {
- if(terrainData[i] == null && terrainIndices[i] != -1)
- return -1;
- if(aByteArrayArray1247[i] == null && anIntArray1236[i] != -1)
- return -2;
- }
- boolean flag = true;
- for(int j = 0; j < terrainData.length; j++) {
- byte abyte0[] = aByteArrayArray1247[j];
- if(abyte0 != null) {
- int k = (mapCoordinates[j] >> 8) * 64 - baseX;
- int l = (mapCoordinates[j] & 0xff) * 64 - baseY;
- if(loadGeneratedMap) {
- k = 10;
- l = 10;
- }
- flag &= ObjectManager.method189(k, abyte0, l);
- }
- }
- if(!flag)
- return -3;
- if(aBoolean1080) {
- return -4;
- } else {
- loadingStage = 2;
- ObjectManager.anInt131 = plane;
- method22();
- stream.createFrame(121);
- return 0;
- }
- }
- //TODO rename
- private void method55() {
- for(Projectile class30_sub2_sub4_sub4 = (Projectile)aClass19_1013.reverseGetFirst(); class30_sub2_sub4_sub4 != null; class30_sub2_sub4_sub4 = (Projectile)aClass19_1013.reverseGetNext())
- if(class30_sub2_sub4_sub4.anInt1597 != plane || loopCycle > class30_sub2_sub4_sub4.anInt1572)
- class30_sub2_sub4_sub4.unlink();
- else
- if(loopCycle >= class30_sub2_sub4_sub4.anInt1571)
- {
- if(class30_sub2_sub4_sub4.anInt1590 > 0)
- {
- Npc npc = npcArray[class30_sub2_sub4_sub4.anInt1590 - 1];
- if(npc != null && npc.x >= 0 && npc.x < 13312 && npc.y >= 0 && npc.y < 13312)
- class30_sub2_sub4_sub4.method455(loopCycle, npc.y, method42(class30_sub2_sub4_sub4.anInt1597, npc.y, npc.x) - class30_sub2_sub4_sub4.anInt1583, npc.x);
- }
- if(class30_sub2_sub4_sub4.anInt1590 < 0)
- {
- int j = -class30_sub2_sub4_sub4.anInt1590 - 1;
- Player player;
- if(j == unknownInt10)
- player = myPlayer;
- else
- player = playerArray[j];
- if(player != null && player.x >= 0 && player.x < 13312 && player.y >= 0 && player.y < 13312)
- class30_sub2_sub4_sub4.method455(loopCycle, player.y, method42(class30_sub2_sub4_sub4.anInt1597, player.y, player.x) - class30_sub2_sub4_sub4.anInt1583, player.x);
- }
- class30_sub2_sub4_sub4.method456(animationTimePassed);
- sceneGraph.addEntityA(plane, class30_sub2_sub4_sub4.anInt1595, (int)class30_sub2_sub4_sub4.aDouble1587, -1, (int)class30_sub2_sub4_sub4.aDouble1586, 60, (int)class30_sub2_sub4_sub4.aDouble1585, class30_sub2_sub4_sub4, false);
- }
- }
- public AppletContext getAppletContext()
- {
- if(SignLink.mainapp != null)
- return SignLink.mainapp.getAppletContext();
- else
- return super.getAppletContext();
- }
- private void drawLogo() {
- byte abyte0[] = titleStreamLoader.getDataForName("title.dat");
- Sprite sprite = new Sprite(abyte0, this);
- sprite = new Sprite("Sprites/background.png", 764, 502);
- leftSideFlame.initDrawingArea();
- sprite.method346(0, 0);
- rightSideFlame.initDrawingArea();
- sprite.method346(-637, 0);
- aRSImageProducer_1107.initDrawingArea();
- sprite.method346(-128, 0);
- aRSImageProducer_1108.initDrawingArea();
- sprite.method346(-202, -371);
- loginScreenArea.initDrawingArea();
- sprite.method346(-202, -171);
- gameLogo.initDrawingArea();
- sprite.method346(0, -265);
- aRSImageProducer_1113.initDrawingArea();
- sprite.method346(-562, -265);
- aRSImageProducer_1114.initDrawingArea();
- sprite.method346(-128, -171);
- aRSImageProducer_1115.initDrawingArea();
- sprite.method346(-562, -171);
- int ai[] = new int[sprite.myWidth];
- for(int j = 0; j < sprite.myHeight; j++) {
- for(int k = 0; k < sprite.myWidth; k++)
- ai[k] = sprite.myPixels[(sprite.myWidth - k - 1) + sprite.myWidth * j];
- System.arraycopy(ai, 0, sprite.myPixels, sprite.myWidth * j, sprite.myWidth);
- }
- /*leftSideFlame.initDrawingArea();
- sprite.method346(382, 0);
- rightSideFlame.initDrawingArea();
- sprite.method346(-255, 0);
- aRSImageProducer_1107.initDrawingArea();
- sprite.method346(254, 0);
- aRSImageProducer_1108.initDrawingArea();
- sprite.method346(180, -371);
- loginScreenArea.initDrawingArea();
- sprite.method346(180, -171);
- gameLogo.initDrawingArea();
- sprite.method346(382, -265);
- aRSImageProducer_1113.initDrawingArea();
- sprite.method346(-180, -265);
- aRSImageProducer_1114.initDrawingArea();
- sprite.method346(254, -171);
- aRSImageProducer_1115.initDrawingArea();
- sprite.method346(-180, -171);*/
- sprite = new Sprite(titleStreamLoader, "logo", 0);
- aRSImageProducer_1107.initDrawingArea();
- //sprite.drawSprite(382 - sprite.myWidth / 2 - 128, 18);
- sprite = null;
- System.gc();
- }
- private void processOnDemandQueue()
- {
- do
- {
- OnDemandData onDemandData;
- do
- {
- onDemandData = onDemandFetcher.getNextNode();
- if(onDemandData == null)
- return;
- if(onDemandData.dataType == 0)
- {
- Model.method460(onDemandData.buffer, onDemandData.ID);
- needDrawTabArea = true;
- if(backDialogID != -1)
- inputTaken = true;
- }
- //if(onDemandData.dataType == 1 && onDemandData.buffer != null)
- // Class36.method529(onDemandData.buffer, onDemandData.ID);
- if(onDemandData.dataType == 2 && onDemandData.ID == nextSong && onDemandData.buffer != null)
- saveMidi(songChanging, onDemandData.buffer);
- if(onDemandData.dataType == 3 && loadingStage == 1)
- {
- //System.out.println(onDemandData.ID);
- try {
- writeFile(onDemandData.buffer, "./maps/" + onDemandData.ID + ".dat");
- } catch (Exception e) {}
- for(int i = 0; i < terrainData.length; i++)
- {
- if(terrainIndices[i] == onDemandData.ID)
- {
- terrainData[i] = onDemandData.buffer;
- if(onDemandData.buffer == null) {
- terrainIndices[i] = -1;
- }
- break;
- }
- if(anIntArray1236[i] != onDemandData.ID)
- continue;
- aByteArrayArray1247[i] = onDemandData.buffer;
- if(onDemandData.buffer == null) {
- anIntArray1236[i] = -1;
- }
- break;
- }
- }
- } while(onDemandData.dataType != 93 || !onDemandFetcher.method564(onDemandData.ID));
- ObjectManager.method173(new Stream(onDemandData.buffer), onDemandFetcher);
- } while(true);
- }
- /*private void calcFlamesPosition()
- {
- char c = '\u0100';
- for(int j = 10; j < 117; j++)
- {
- int k = (int)(Math.random() * 100D);
- if(k < 50)
- anIntArray828[j + (c - 2 << 7)] = 255;
- }
- for(int l = 0; l < 100; l++)
- {
- int i1 = (int)(Math.random() * 124D) + 2;
- int k1 = (int)(Math.random() * 128D) + 128;
- int k2 = i1 + (k1 << 7);
- anIntArray828[k2] = 192;
- }
- for(int j1 = 1; j1 < c - 1; j1++)
- {
- for(int l1 = 1; l1 < 127; l1++)
- {
- int l2 = l1 + (j1 << 7);
- anIntArray829[l2] = (anIntArray828[l2 - 1] + anIntArray828[l2 + 1] + anIntArray828[l2 - 128] + anIntArray828[l2 + 128]) / 4;
- }
- }
- anInt1275 += 128;
- if(anInt1275 > anIntArray1190.length)
- {
- anInt1275 -= anIntArray1190.length;
- int i2 = (int)(Math.random() * 12D);
- randomizeBackground(aBackgroundArray1152s[i2]);
- }
- for(int j2 = 1; j2 < c - 1; j2++)
- {
- for(int i3 = 1; i3 < 127; i3++)
- {
- int k3 = i3 + (j2 << 7);
- int i4 = anIntArray829[k3 + 128] - anIntArray1190[k3 + anInt1275 & anIntArray1190.length - 1] / 5;
- if(i4 < 0)
- i4 = 0;
- anIntArray828[k3] = i4;
- }
- }
- System.arraycopy(anIntArray969, 1, anIntArray969, 0, c - 1);
- anIntArray969[c - 1] = (int)(Math.sin((double)loopCycle / 14D) * 16D + Math.sin((double)loopCycle / 15D) * 14D + Math.sin((double)loopCycle / 16D) * 12D);
- if(anInt1040 > 0)
- anInt1040 -= 4;
- if(anInt1041 > 0)
- anInt1041 -= 4;
- if(anInt1040 == 0 && anInt1041 == 0)
- {
- int l3 = (int)(Math.random() * 2000D);
- if(l3 == 0)
- anInt1040 = 1024;
- if(l3 == 1)
- anInt1041 = 1024;
- }
- }*/
- private boolean saveWave(byte abyte0[], int i)
- {
- return abyte0 == null || SignLink.wavesave(abyte0, i);
- }
- private void method60(int i)
- {
- RSInterface class9 = RSInterface.interfaceCache[i];
- for(int j = 0; j < class9.children.length; j++)
- {
- if(class9.children[j] == -1)
- break;
- RSInterface class9_1 = RSInterface.interfaceCache[class9.children[j]];
- if(class9_1.interfaceType == 1)
- method60(class9_1.id);
- class9_1.animationLength = 0;
- class9_1.animationDelay = 0;
- }
- }
- private void drawHeadIcon()
- {
- if(anInt855 != 2)
- return;
- calcEntityScreenPos((anInt934 - baseX << 7) + anInt937, anInt936 * 2, (anInt935 - baseY << 7) + anInt938);
- if(spriteDrawX > -1 && loopCycle % 20 < 10)
- headIconsHint[0].drawSprite(spriteDrawX - 12, spriteDrawY - 28);
- }
- boolean restOpacityUp = true;
- public static int[][] charEditColorChoises;
- private void mainGameProcessor()
- {
- if(restOrb) {
- if(restOpacityUp)
- restOpacity+=2;
- else
- restOpacity-=2;
- }
- if(restOpacity == 125)
- restOpacityUp = true;
- if(restOpacity == 225)
- restOpacityUp = false;
- if(anInt1104 > 1)
- anInt1104--;
- if(anInt1011 > 0)
- anInt1011--;
- if(anInt1500 != 0 || anInt1044 != 0 || anInt1129 != 0) {
- if(anInt1501 < 100) {
- anInt1501++;
- if(anInt1501 == 100) {
- if(anInt1500 != 0) {
- inputTaken = true;
- }
- if(anInt1044 != 0) {
- needDrawTabArea = true;
- }
- }
- }
- } else if(anInt1501 > 0) {
- anInt1501--;
- }
- for(int j = 0; j < 5; j++)
- if(!parsePacket())
- break;
- if(!loggedIn)
- return;
- try {
- canWalkDelay--;
- if(followNPC > 0)
- {
- Npc n = npcArray[followNPC];
- if(n != null)
- {
- if(!withinDistance(myPlayer.smallX[0], myPlayer.smallY[0], n.smallX[0], n.smallY[0], followDistance))
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, n.smallY[0], myPlayer.smallX[0], false, n.smallX[0]);
- }
- }
- }
- else if(followPlayer > 0 && canWalkDelay <= 0)
- {
- Player p = playerArray[followPlayer];
- if(p != null)
- {
- int dis = getDis(myPlayer.smallX[0], myPlayer.smallY[0], p.smallX[0], p.smallY[0]);
- if(dis > followDistance)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], followDistance, 0, p.smallY[0], myPlayer.smallX[0], false, p.smallX[0]);
- canWalkDelay = 30;
- }
- else if(dis == 0)
- {
- int rnd = random(4);
- if(rnd == 0)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, p.smallY[0], myPlayer.smallX[0], false, p.smallX[0] - 2);
- }
- else if(rnd == 1)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, p.smallY[0], myPlayer.smallX[0], false, p.smallX[0] + 2);
- }
- else if(rnd == 2)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, p.smallY[0] - 2, myPlayer.smallX[0], false, p.smallX[0]);
- }
- else if(rnd == 3)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, p.smallY[0] + 2, myPlayer.smallX[0], false, p.smallX[0]);
- }
- canWalkDelay = 60;
- }
- }
- }
- } catch(Exception ex){
- System.out.println("Exception in following, method : in process.)");
- }
- synchronized(mouseDetection.syncObject)
- {
- if(flagged)
- {
- if(super.clickMode3 != 0 || mouseDetection.coordsIndex >= 40)
- {
- stream.createFrame(45);
- stream.writeWordBigEndian(0);
- int j2 = stream.currentOffset;
- int j3 = 0;
- for(int j4 = 0; j4 < mouseDetection.coordsIndex; j4++)
- {
- if(j2 - stream.currentOffset >= 240)
- break;
- j3++;
- int l4 = mouseDetection.coordsY[j4];
- if(l4 < 0)
- l4 = 0;
- else
- if(l4 > 502)
- l4 = 502;
- int k5 = mouseDetection.coordsX[j4];
- if(k5 < 0)
- k5 = 0;
- else
- if(k5 > 764)
- k5 = 764;
- int i6 = l4 * 765 + k5;
- if(mouseDetection.coordsY[j4] == -1 && mouseDetection.coordsX[j4] == -1)
- {
- k5 = -1;
- l4 = -1;
- i6 = 0x7ffff;
- }
- if(k5 == anInt1237 && l4 == anInt1238)
- {
- if(anInt1022 < 2047)
- anInt1022++;
- } else
- {
- int j6 = k5 - anInt1237;
- anInt1237 = k5;
- int k6 = l4 - anInt1238;
- anInt1238 = l4;
- if(anInt1022 < 8 && j6 >= -32 && j6 <= 31 && k6 >= -32 && k6 <= 31)
- {
- j6 += 32;
- k6 += 32;
- stream.writeWord((anInt1022 << 12) + (j6 << 6) + k6);
- anInt1022 = 0;
- } else
- if(anInt1022 < 8)
- {
- stream.writeDWordBigEndian(0x800000 + (anInt1022 << 19) + i6);
- anInt1022 = 0;
- } else
- {
- stream.writeDWord(0xc0000000 + (anInt1022 << 19) + i6);
- anInt1022 = 0;
- }
- }
- }
- stream.writeBytes(stream.currentOffset - j2);
- if(j3 >= mouseDetection.coordsIndex)
- {
- mouseDetection.coordsIndex = 0;
- } else
- {
- mouseDetection.coordsIndex -= j3;
- for(int i5 = 0; i5 < mouseDetection.coordsIndex; i5++)
- {
- mouseDetection.coordsX[i5] = mouseDetection.coordsX[i5 + j3];
- mouseDetection.coordsY[i5] = mouseDetection.coordsY[i5 + j3];
- }
- }
- }
- } else
- {
- mouseDetection.coordsIndex = 0;
- }
- }
- if(super.clickMode3 != 0)
- {
- long l = (super.saveClickTime - aLong1220) / 50L;
- if(l > 4095L)
- l = 4095L;
- aLong1220 = super.saveClickTime;
- int k2 = super.saveClickY;
- if(k2 < 0)
- k2 = 0;
- else
- if(k2 > 502)
- k2 = 502;
- int k3 = super.saveClickX;
- if(k3 < 0)
- k3 = 0;
- else
- if(k3 > 764)
- k3 = 764;
- int k4 = k2 * 765 + k3;
- int j5 = 0;
- if(super.clickMode3 == 2)
- j5 = 1;
- int l5 = (int)l;
- stream.createFrame(241);
- stream.writeDWord((l5 << 20) + (j5 << 19) + k4);
- }
- if(anInt1016 > 0)
- anInt1016--;
- if(super.keyArray[1] == 1 || super.keyArray[2] == 1 || super.keyArray[3] == 1 || super.keyArray[4] == 1)
- aBoolean1017 = true;
- if(aBoolean1017 && anInt1016 <= 0)
- {
- anInt1016 = 20;
- aBoolean1017 = false;
- stream.createFrame(86);
- stream.writeWord(anInt1184);
- stream.method432(minimapInt1);
- }
- if(super.awtFocus && !aBoolean954)
- {
- aBoolean954 = true;
- stream.createFrame(3);
- stream.writeWordBigEndian(1);
- }
- if(!super.awtFocus && aBoolean954)
- {
- aBoolean954 = false;
- stream.createFrame(3);
- stream.writeWordBigEndian(0);
- }
- loadingStages();
- method115();
- method90();
- anInt1009++;
- if(anInt1009 > 750)
- dropClient();
- method114();
- method95();
- method38();
- animationTimePassed++;
- if(crossType != 0)
- {
- crossIndex += 20;
- if(crossIndex >= 400)
- crossType = 0;
- }
- if(atInventoryInterfaceType != 0)
- {
- atInventoryLoopCycle++;
- if(atInventoryLoopCycle >= 15)
- {
- if(atInventoryInterfaceType == 2)
- needDrawTabArea = true;
- if(atInventoryInterfaceType == 3)
- inputTaken = true;
- atInventoryInterfaceType = 0;
- }
- }
- if(activeInterfaceType != 0)
- {
- anInt989++;
- if(super.mouseX > anInt1087 + 5 || super.mouseX < anInt1087 - 5 || super.mouseY > anInt1088 + 5 || super.mouseY < anInt1088 - 5)
- aBoolean1242 = true;
- if(super.clickMode2 == 0)
- {
- if(activeInterfaceType == 2)
- needDrawTabArea = true;
- if(activeInterfaceType == 3)
- inputTaken = true;
- activeInterfaceType = 0;
- if(aBoolean1242 && anInt989 >= 10) //5 for lower switches
- {
- processRightClick();
- lastActiveInvInterface = -1;
- if(lastActiveInvInterface == anInt1084 && mouseInvInterfaceIndex != anInt1085)
- {
- RSInterface class9 = RSInterface.interfaceCache[anInt1084];
- int j1 = 0;
- if(anInt913 == 1 && class9.contentType == 206)
- j1 = 1;
- if(class9.inventory[mouseInvInterfaceIndex] <= 0)
- j1 = 0;
- if(class9.deletesTargetSlot)
- {
- int l2 = anInt1085;
- int l3 = mouseInvInterfaceIndex;
- class9.inventory[l3] = class9.inventory[l2];
- class9.inventoryValue[l3] = class9.inventoryValue[l2];
- class9.inventory[l2] = -1;
- class9.inventoryValue[l2] = 0;
- } else
- if(j1 == 1)
- {
- int i3 = anInt1085;
- for(int i4 = mouseInvInterfaceIndex; i3 != i4;)
- if(i3 > i4)
- {
- class9.swapInventoryItems(i3, i3 - 1);
- i3--;
- } else
- if(i3 < i4)
- {
- class9.swapInventoryItems(i3, i3 + 1);
- i3++;
- }
- } else
- {
- class9.swapInventoryItems(anInt1085, mouseInvInterfaceIndex);
- }
- stream.createFrame(214);
- stream.method433(anInt1084);
- stream.method424(j1);
- stream.method433(anInt1085);
- stream.method431(mouseInvInterfaceIndex);
- }
- } else
- if((anInt1253 == 1 || menuHasAddFriend(menuActionRow - 1)) && menuActionRow > 2)
- determineMenuSize();
- else
- if(menuActionRow > 0)
- doAction(menuActionRow - 1);
- atInventoryLoopCycle = 10;
- super.clickMode3 = 0;
- }
- }
- if(WorldController.anInt470 != -1)
- {
- int k = WorldController.anInt470;
- int k1 = WorldController.anInt471;
- boolean flag = doWalkTo(0, 0, 0, 0, myPlayer.smallY[0], 0, 0, k1, myPlayer.smallX[0], true, k);
- WorldController.anInt470 = -1;
- if(flag)
- {
- crossX = super.saveClickX - 4;
- crossY = super.saveClickY - 4;
- crossType = 1;
- crossIndex = 0;
- }
- }
- if(super.clickMode3 == 1 && chatBoxMessage != null)
- {
- chatBoxMessage = null;
- inputTaken = true;
- super.clickMode3 = 0;
- }
- if(!processMenuClick()) {
- processMainScreenClick();
- processTabClick();
- processChatModeClick();
- }
- if(super.clickMode2 == 1 || super.clickMode3 == 1)
- anInt1213++;
- if(anInt1500 != 0 || anInt1044 != 0 || anInt1129 != 0) {
- if(anInt1501 < 100) {
- anInt1501++;
- if(anInt1501 == 100) {
- if(anInt1500 != 0) {
- inputTaken = true;
- }
- if(anInt1044 != 0) {
- needDrawTabArea = true;
- }
- }
- }
- } else if(anInt1501 > 0) {
- anInt1501--;
- }
- if(loadingStage == 2)
- method108();
- if(loadingStage == 2 && aBoolean1160)
- calcCameraPos();
- for(int i1 = 0; i1 < 5; i1++)
- anIntArray1030[i1]++;
- method73();
- super.idleTime++;
- if(super.idleTime > 4500)
- {
- anInt1011 = 250;
- super.idleTime -= 500;
- stream.createFrame(202);
- }
- anInt988++;
- if(anInt988 > 500)
- {
- anInt988 = 0;
- int l1 = (int)(Math.random() * 8D);
- if((l1 & 1) == 1)
- anInt1278 += anInt1279;
- if((l1 & 2) == 2)
- anInt1131 += anInt1132;
- if((l1 & 4) == 4)
- anInt896 += anInt897;
- }
- if(anInt1278 < -50)
- anInt1279 = 2;
- if(anInt1278 > 50)
- anInt1279 = -2;
- if(anInt1131 < -55)
- anInt1132 = 2;
- if(anInt1131 > 55)
- anInt1132 = -2;
- if(anInt896 < -40)
- anInt897 = 1;
- if(anInt896 > 40)
- anInt897 = -1;
- anInt1254++;
- if(anInt1254 > 500)
- {
- anInt1254 = 0;
- int i2 = (int)(Math.random() * 8D);
- if((i2 & 1) == 1)
- minimapInt2 += anInt1210;
- if((i2 & 2) == 2)
- minimapInt3 += anInt1171;
- }
- if(minimapInt2 < -60)
- anInt1210 = 2;
- if(minimapInt2 > 60)
- anInt1210 = -2;
- if(minimapInt3 < -20)
- anInt1171 = 1;
- if(minimapInt3 > 10)
- anInt1171 = -1;
- anInt1010++;
- if(anInt1010 > 50)
- stream.createFrame(0);
- try
- {
- if(socketStream != null && stream.currentOffset > 0)
- {
- socketStream.queueBytes(stream.currentOffset, stream.buffer);
- stream.currentOffset = 0;
- anInt1010 = 0;
- }
- } catch(IOException _ex) {
- dropClient();
- } catch(Exception exception) {
- resetLogout();
- }
- }
- private void method63()
- {
- Class30_Sub1 class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetFirst();
- for(; class30_sub1 != null; class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetNext())
- if(class30_sub1.anInt1294 == -1) {
- class30_sub1.anInt1302 = 0;
- method89(class30_sub1);
- } else {
- class30_sub1.unlink();
- }
- }
- private void resetImageProducers() {
- if(aRSImageProducer_1107 != null)
- return;
- super.fullGameScreen = null;
- chatArea = null;
- miniMapArea = null;
- tabArea = null;
- mainGameArea = null;
- leftSideFlame = new RSImageProducer(128, 265, getGameComponent());
- DrawingArea.clear();
- rightSideFlame = new RSImageProducer(128, 265, getGameComponent());
- DrawingArea.clear();
- aRSImageProducer_1107 = new RSImageProducer(509, 171, getGameComponent());
- DrawingArea.clear();
- aRSImageProducer_1108 = new RSImageProducer(360, 132, getGameComponent());
- DrawingArea.clear();
- loginScreenArea = new RSImageProducer(clientWidth, clientHeight, getGameComponent());
- DrawingArea.clear();
- gameLogo = new RSImageProducer(202, 238, getGameComponent());
- DrawingArea.clear();
- aRSImageProducer_1113 = new RSImageProducer(203, 238, getGameComponent());
- DrawingArea.clear();
- aRSImageProducer_1114 = new RSImageProducer(74, 94, getGameComponent());
- DrawingArea.clear();
- aRSImageProducer_1115 = new RSImageProducer(75, 94, getGameComponent());
- DrawingArea.clear();
- if(titleStreamLoader != null) {
- //drawLogo();
- loadTitleScreen();
- }
- welcomeScreenRaised = true;
- }
- public void drawSmoothLoading(int i, String s) {
- for(float f = LP; f <= (float)i; f = (float)((double)f + 0.29999999999D))
- drawLoadingText((int)f, s);
- LP = i;
- }
- public void drawLoadingText(int i, String s) {
- if(titleStreamLoader == null) {
- super.drawLoadingText(i, s);
- return;
- }
- loginScreenArea.initDrawingArea();
- loadingPercent = i;
- loadingText = s;
- background.drawSprite(clientWidth / 2 - background.myWidth / 2, clientHeight / 2 - background.myHeight / 2);
- logo.drawHDSprite(15, clientHeight - 91 - 34, 255);
- DrawingArea.fillRect(0, clientHeight - 36, clientWidth, 36, 0);
- DrawingArea.fillRect(1, clientHeight - 35, clientWidth - 2, 34, 0x1F3D5C);
- int filled = (int)Math.round(loadingPercent*((float)clientWidth/100));
- DrawingArea.fillRect(1, clientHeight - 35, filled, 34, 0x336699);
- for(int a = 0; a <= 100; a++)
- DrawingArea.drawVerticalLine(1 - 100 + filled + a, clientHeight - 35, 34, 0xffffff, a / 2);
- regularText.drawLeftAlignedString("<trans=200>" + loadingText, clientWidth-regularFont.getTextWidth(loadingText) - 10, clientHeight - 13, 0xFFFFFD, -1, true);
- //loginScreenArea.drawGraphics(171, super.graphics, 202);
- loginScreenArea.drawGraphics(0, 0, super.graphics);
- if(welcomeScreenRaised)
- {
- welcomeScreenRaised = false;
- /*if(!aBoolean831)
- {
- leftSideFlame.drawGraphics(0, 0, super.graphics);
- rightSideFlame.drawGraphics(637, 0, super.graphics);
- }
- aRSImageProducer_1107.drawGraphics(128, 0, super.graphics);
- aRSImageProducer_1108.drawGraphics(202, 371, super.graphics);
- gameLogo.drawGraphics(0, 265, super.graphics);
- aRSImageProducer_1113.drawGraphics(562, 265, super.graphics);
- aRSImageProducer_1114.drawGraphics(128, 171, super.graphics);
- aRSImageProducer_1115.drawGraphics(562, 171, super.graphics);*/
- }
- }
- private void method65(int i, int j, int k, int l, RSInterface class9, int i1, boolean flag, int j1) {
- int anInt992;
- if(aBoolean972)
- anInt992 = 32;
- else
- anInt992 = 0;
- aBoolean972 = false;
- if(k >= i && k < i + 16 && l >= i1 && l < i1 + 16) {
- class9.scrollPosition -= anInt1213 * 4;
- if(flag) {
- needDrawTabArea = true;
- }
- } else if(k >= i && k < i + 16 && l >= (i1 + j) - 16 && l < i1 + j) {
- class9.scrollPosition += anInt1213 * 4;
- if(flag) {
- needDrawTabArea = true;
- }
- } else if(k >= i - anInt992 && k < i + 16 + anInt992 && l >= i1 + 16 && l < (i1 + j) - 16 && anInt1213 > 0) {
- int l1 = ((j - 32) * j) / j1;
- if(l1 < 8)
- l1 = 8;
- int i2 = l - i1 - 16 - l1 / 2;
- int j2 = j - 32 - l1;
- class9.scrollPosition = ((j1 - j) * i2) / j2;
- if(flag)
- needDrawTabArea = true;
- aBoolean972 = true;
- }
- }
- private boolean method66(int i, int j, int k)
- {
- int i1 = i >> 14 & 0x7fff;
- int j1 = sceneGraph.getIDTAGForXYZ(plane, k, j, i);
- if(j1 == -1)
- return false;
- int k1 = j1 & 0x1f;
- int l1 = j1 >> 6 & 3;
- if(k1 == 10 || k1 == 11 || k1 == 22)
- {
- ObjectDef class46 = ObjectDef.forID(i1);
- int i2;
- int j2;
- if(l1 == 0 || l1 == 2)
- {
- i2 = class46.sizeX;
- j2 = class46.sizeY;
- } else
- {
- i2 = class46.sizeY;
- j2 = class46.sizeX;
- }
- int k2 = class46.anInt768;
- if(l1 != 0)
- k2 = (k2 << l1 & 0xf) + (k2 >> 4 - l1);
- doWalkTo(2, 0, j2, 0, myPlayer.smallY[0], i2, k2, j, myPlayer.smallX[0], false, k);
- } else
- {
- doWalkTo(2, l1, 0, k1 + 1, myPlayer.smallY[0], 0, 0, j, myPlayer.smallX[0], false, k);
- }
- crossX = super.saveClickX - 4;
- crossY = super.saveClickY - 4;
- crossType = 2;
- crossIndex = 0;
- return true;
- }
- private NamedArchive streamLoaderForName(int i, String s, String s1, int j, int k) {
- byte abyte0[] = null;
- try {
- if(decompressors[0] != null) {
- abyte0 = decompressors[0].decompress(i);
- }
- if(abyte0 == null) {
- drawSmoothLoading(0, "Connecting to file server");
- abyte0 = decompressors[0].decompress(i);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- if(abyte0 != null) {
- NamedArchive archive = new NamedArchive(abyte0, s);
- return archive;
- }
- while(true) {
- drawSmoothLoading(0, "Error loading");
- try {
- Thread.sleep(1000);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- private void dropClient() {
- if(anInt1011 > 0) {
- resetLogout();
- return;
- }
- mainGameArea.initDrawingArea();
- cacheSprite[3].drawSprite(8,9);
- mainGameArea.drawGraphics(4, 4, super.graphics);
- miniMapOverlay = 0;
- destX = 0;
- RSSocket rsSocket = socketStream;
- loggedIn = false;
- loginFailures = 0;
- login(myUsername, myPassword, true);
- if(!loggedIn)
- resetLogout();
- try
- {
- rsSocket.close();
- }
- catch(Exception _ex)
- {
- }
- }
- private void doAction(int i)
- {
- if(i < 0)
- return;
- if(inputDialogState != 0)
- {
- inputDialogState = 0;
- inputTaken = true;
- }
- int j = menuActionCmd2[i];
- int k = menuActionCmd3[i];
- int l = menuActionID[i];
- int i1 = menuActionCmd1[i];
- if(l >= 2000)
- l -= 2000;
- if(l == 476) {
- alertHandler.close();
- }
- if(l == 582)
- {
- Npc npc = npcArray[i1];
- if(npc != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, npc.smallY[0], myPlayer.smallX[0], false, npc.smallX[0]);
- crossX = super.saveClickX - 4;
- crossY = super.saveClickY - 4;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(57);
- stream.method432(anInt1285);
- stream.method432(i1);
- stream.method431(anInt1283);
- stream.method432(anInt1284);
- }
- }
- if(l == 234)
- {
- boolean flag1 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag1)
- flag1 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX - 4;
- crossY = super.saveClickY - 4;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(236);
- stream.method431(k + baseY);
- stream.writeWord(i1);
- stream.method431(j + baseX);
- }
- if(l == 62 && method66(i1, k, j))
- {
- stream.createFrame(192);
- stream.writeWord(anInt1284);
- stream.method431(i1 >> 14 & 0x7fff);
- stream.method433(k + baseY);
- stream.method431(anInt1283);
- stream.method433(j + baseX);
- stream.writeWord(anInt1285);
- }
- if(l == 511)
- {
- boolean flag2 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag2)
- flag2 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX - 4;
- crossY = super.saveClickY - 4;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(25);
- stream.method431(anInt1284);
- stream.method432(anInt1285);
- stream.writeWord(i1);
- stream.method432(k + baseY);
- stream.method433(anInt1283);
- stream.writeWord(j + baseX);
- }
- if(l == 74)
- {
- stream.createFrame(122);
- stream.method433(k);
- stream.method432(j);
- stream.method431(i1);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- /*if(is480 || is508 || is525) {
- switch(l){
- case 1014: setTab(13); setSidebarInterface(13, 29500); break;//harp
- case 1013: setTab(12); setSidebarInterface(12, 147); break;//emotes
- case 1012: setTab(11); setSidebarInterface(11, 904); break;//options
- case 1010: setTab(9); setSidebarInterface(9, 5715); break;//ignore
- case 1009: setTab(8); setSidebarInterface(8, 5065); break;//friend
- case 1027: setTab(6); break;//spellbook
- case 1026: setTab(5); break;//prayer
- case 1030: setTab(4); setSidebarInterface(4, 1644); break;//worn
- case 1024: setTab(3); setSidebarInterface(3, 3213); break;//inventory
- case 1023: setTab(2); setSidebarInterface(2, 638); break;//quests
- case 1022: setTab(1); setSidebarInterface(1, 3917); break;//stats
- case 1021: setTab(0); break;//style
- case 1008: setTab(10); setSidebarInterface(10, 18128); break;//logout new clan
- case 1011: setTab(14); setSidebarInterface(14, 2449); break;//logout
- case 1502: setTab(7); setSidebarInterface(7, 2449); break;//clan
- }
- } else {
- switch(l){
- case 1014: setTab(13); setSidebarInterface(13, 29500); break;//harp
- case 1013: setTab(12); setSidebarInterface(12, 147); break;//emotes
- case 1012: setTab(11); setSidebarInterface(11, 904); break;//options
- case 1010: setTab(9); setSidebarInterface(9, 5715); break;//ignore
- case 1009: setTab(8); setSidebarInterface(8, 5065); break;//friend
- case 1027: setTab(6); break;//spellbook
- case 1026: setTab(5); break;//prayer
- case 1030: setTab(4); setSidebarInterface(4, 1644); break;//worn
- case 1024: setTab(3); setSidebarInterface(3, 3213); break;//inventory
- case 1023: setTab(2); setSidebarInterface(2, 638); break;//quests
- case 1022: setTab(1); setSidebarInterface(1, 3917); break;//stats
- case 1021: setTab(0); break;//style
- case 1008: setTab(7); setSidebarInterface(7, 18128); break;
- case 1011: setTab(10); setSidebarInterface(10, 2449); break;
- }
- }*/
- if(l >= 1902 && l <= 1911 && !showedName.equals("Error!") && !showedName.equals("") && StaffTabInUse) {
- StaffTabSelected = l - 1902;
- }
- switch(l){
- case 1050:
- runState = 1;
- if(!runClicked) {
- runClicked = true;
- stream.createFrame(185);
- stream.writeWord(153);
- } else {
- runClicked = false;
- stream.createFrame(185);
- stream.writeWord(152);
- }
- break;
- case 1500:
- if(!prayClicked){
- prayClicked = true;
- } else {
- prayClicked = false;
- }
- break;
- case 1501:
- runState = 2;
- if(!restOrb)
- restOrb = true;
- else
- restOrb = false;
- stream.createFrame(185);
- stream.writeWord(151);
- /*if(!musicOrb && restOrb){
- musicOrb = true;
- restOrb = false;
- } else if(musicOrb && !restOrb){
- musicOrb = false;
- restOrb = true;
- } else if(!musicOrb && !restOrb){
- musicOrb = false;
- restOrb = true;
- }*/
- break;
- /* Staff tab */
- case 1900: //Staff tab toggle
- if(!staffTabOpen)
- staffTabOpen = true;
- else {
- staffTabOpen = false;
- showedName = "";
- fixedName = "";
- StaffTabSelected = -1;
- writingOnStaffTab = false;
- staffTabInput = "";
- }
- break;
- case 1901: //Staff tab enter name
- writingOnStaffTab = true;
- showedName = "";
- fixedName = "";
- break;
- case 1912: //Staff tab sending action
- if(StaffTabSelected < 0) {
- pushMessage("Select an action first.", 0, "");
- return;
- }
- String action = "";
- switch(StaffTabSelected) {
- case 0: action = "mute"; break;
- case 1: action = "ipmute"; break;
- case 2: action = "unmute"; break;
- case 3: action = "jail"; break;
- case 4: action = "unjail"; break;
- case 5: action = "ban"; break;
- case 6: action = "ipban"; break;
- case 7: action = "unban"; break;
- case 8: action = "teleto"; break;
- case 9: action = "teletome";break;
- }
- String actionString = action + " " + fixedName.toLowerCase();
- stream.createFrame(103);
- stream.writeWordBigEndian(actionString.length() + 1);
- stream.writeString(actionString);
- break;
- case 1503:
- if(!drawXpBar)
- drawXpBar = true;
- else
- drawXpBar = false;
- break;
- case 1504:
- stream.createFrame(185);
- stream.writeWord(39480);
- myPlayer.xpCount = 0;
- break;
- }
- if(l == 315) {
- System.out.println("sendPacket185("+k+")");
- RSInterface class9 = RSInterface.interfaceCache[k];
- boolean flag8 = true;
- if(class9.contentType > 0)
- flag8 = promptUserForInput(class9);
- if(flag8) {
- switch(k){
- case 19144:
- sendFrame248(15106,3213);
- method60(15106);
- inputTaken = true;
- break;
- case 27615:
- setSidebarInterface(4, 1644);
- break;
- case 25843://arrow
- setSidebarInterface(11, 24500);
- break;
- case 27610://return
- setSidebarInterface(11, 904);
- break;
- case 27508://hp
- sendFrame126("OFF", 27528);
- if(hitbarToggle) {
- hitbarToggle = false;
- sendFrame126("OFF", 27528); sendFrame126("", 27524);
- } else {
- hitbarToggle = true;
- sendFrame126("@gre@ON", 27524); sendFrame126("", 27528);
- }
- break;
- case 27509://tooltips
- sendFrame126("OFF", 27529);
- if(tooltipToggle) {
- tooltipToggle = false;
- sendFrame126("OFF", 27529); sendFrame126("", 27525);
- } else {
- tooltipToggle= true;
- sendFrame126("@gre@ON", 27525); sendFrame126("", 27529);
- }
- break;
- case 27510://names
- sendFrame126("OFF", 27530);
- if(namesToggle) {
- namesToggle = false;
- sendFrame126("OFF", 27530); sendFrame126("", 27526);
- } else {
- namesToggle = true;
- sendFrame126("@gre@ON", 27526); sendFrame126("", 27530);
- }
- break;
- case 27532://gameframe
- if(miniMapOverlay == 2) {
- pushMessage("Switching gameframes is disabled while in barrows.", 0, "");
- } else {
- sendFrame126("459", 27531);
- /*if(is459) {
- is459 = false; is474 = true;
- sendFrame126("474", 27536);
- sendFrame126("", 27533); sendFrame126("", 27537); sendFrame126("", 27538); sendFrame126("", 27531);
- } else if(is474) {
- is474 = false; is480 = true;
- sendFrame126("483", 27536);
- sendFrame126("", 27533); sendFrame126("", 27537); sendFrame126("", 27538); sendFrame126("", 27531);
- } else if(is480) {
- is480 = false; is508 = true;
- sendFrame126("508", 27537);
- sendFrame126("", 27533); sendFrame126("", 27536); sendFrame126("", 27538); sendFrame126("", 27531);
- } else if(is508) {
- is508 = false; is525 = true;
- sendFrame126("525", 27538);
- sendFrame126("", 27536); sendFrame126("", 27537); sendFrame126("", 27533); sendFrame126("", 27531);
- } else if(is525) {
- is525 = false; is562 = true;
- sendFrame126("562", 27536);
- sendFrame126("", 27533); sendFrame126("", 27537); sendFrame126("", 27538); sendFrame126("", 27531);
- } else if(is562) {
- is562 = false; is508 = false; is525 = false; is480 = false; is474 = false; is459 = true;
- sendFrame126("", 27533); sendFrame126("", 27536); sendFrame126("", 27537); sendFrame126("", 27538);
- sendFrame126("377", 27531);
- }*/
- }
- break;
- case 27606://x10
- sendFrame126("OFF", 27605);
- if(newDamage) {
- newDamage = false;
- sendFrame126("OFF", 27605);
- sendFrame126("", 27604);
- } else {
- newDamage = true;
- sendFrame126("@gre@ON", 27604);
- sendFrame126("", 27605);
- }
- break;
- case 27521://shadow
- sendFrame126("OFF", 27603);
- if(playerShadow) {
- playerShadow = false;
- sendFrame126("OFF", 27603);
- sendFrame126("", 27602);
- unlinkMRUNodes();
- } else {
- playerShadow = true;
- sendFrame126("@gre@ON", 27602);
- sendFrame126("", 27603);
- unlinkMRUNodes();
- }
- break;
- case 29156://achievement
- setSidebarInterface(2, 29265);
- break;
- case 29267://Quest
- setSidebarInterface(2, 638);
- break;
- default:
- stream.createFrame(185);
- stream.writeWord(k);
- break;
- }
- }
- }
- if(l == 561)
- {
- Player player = playerArray[i1];
- if(player != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, player.smallY[0], myPlayer.smallX[0], false, player.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- anInt1188 += i1;
- if(anInt1188 >= 90)
- {
- stream.createFrame(136);
- anInt1188 = 0;
- }
- stream.createFrame(128);
- stream.writeWord(i1);
- }
- }
- if(l == 20)
- {
- Npc class30_sub2_sub4_sub1_sub1_1 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_1 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub1_1.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub1_1.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(155);
- stream.method431(i1);
- }
- }
- if(l == 779)
- {
- Player class30_sub2_sub4_sub1_sub2_1 = playerArray[i1];
- if(class30_sub2_sub4_sub1_sub2_1 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_1.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_1.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(153);
- stream.method431(i1);
- }
- }
- if(l == 516)
- if(!menuOpen)
- sceneGraph.gameScreenClick(super.saveClickY, super.saveClickX);
- else
- sceneGraph.gameScreenClick(k, j);
- if(l == 1062)
- {
- anInt924 += baseX;
- if(anInt924 >= 113)
- {
- stream.createFrame(183);
- stream.writeDWordBigEndian(0xe63271);
- anInt924 = 0;
- }
- method66(i1, k, j);
- stream.createFrame(228);
- stream.method432(i1 >> 14 & 0x7fff);
- stream.method432(k + baseY);
- stream.writeWord(j + baseX);
- }
- if(l == 679 && !aBoolean1149)
- {
- stream.createFrame(40);
- stream.writeWord(k);
- aBoolean1149 = true;
- }
- if(l == 431)
- {
- stream.createFrame(129);
- stream.method432(j);
- stream.writeWord(k);
- stream.method432(i1);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 337 || l == 42 || l == 792 || l == 322)
- {
- String s = menuActionName[i];
- int k1 = s.indexOf("@whi@");
- if(k1 != -1)
- {
- long l3 = TextClass.longForName(s.substring(k1 + 5).trim());
- if(l == 337)
- addFriend(l3);
- if(l == 42)
- addIgnore(l3);
- if(l == 792)
- delFriend(l3);
- if(l == 322)
- delIgnore(l3);
- }
- }
- if(l == 53)
- {
- stream.createFrame(135);
- stream.method431(j);
- stream.method432(k);
- stream.method431(i1);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 539)
- {
- stream.createFrame(16);
- stream.method432(i1);
- stream.method433(j);
- stream.method433(k);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 927) {
- String s1 = menuActionName[i];
- int l1 = s1.indexOf("@lre@");
- s1 = s1.substring(l1 + 5).trim();
- launchURL(s1);//Launches the URL in a web browser when clicked
- }
- if(l == 484 || l == 6)
- {
- String s1 = menuActionName[i];
- int l1 = s1.indexOf("@whi@");
- if(l1 != -1)
- {
- s1 = s1.substring(l1 + 5).trim();
- String s7 = TextClass.fixName(TextClass.nameForLong(TextClass.longForName(s1)));
- boolean flag9 = false;
- for(int j3 = 0; j3 < playerCount; j3++)
- {
- Player class30_sub2_sub4_sub1_sub2_7 = playerArray[playerIndices[j3]];
- if(class30_sub2_sub4_sub1_sub2_7 == null || class30_sub2_sub4_sub1_sub2_7.name == null || !class30_sub2_sub4_sub1_sub2_7.name.equalsIgnoreCase(s7))
- continue;
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_7.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_7.smallX[0]);
- if(l == 484)
- {
- stream.createFrame(39); // 139, trade fix
- stream.method431(playerIndices[j3]);
- }
- if(l == 6)
- {
- anInt1188 += i1;
- if(anInt1188 >= 90)
- {
- stream.createFrame(136);
- anInt1188 = 0;
- }
- stream.createFrame(128);
- stream.writeWord(playerIndices[j3]);
- }
- flag9 = true;
- break;
- }
- if(!flag9)
- pushMessage("Unable to find " + s7, 0, "");
- }
- }
- if(l == 870)
- {
- stream.createFrame(53);
- stream.writeWord(j);
- stream.method432(anInt1283);
- stream.method433(i1);
- stream.writeWord(anInt1284);
- stream.method431(anInt1285);
- stream.writeWord(k);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 847)
- {
- stream.createFrame(87);
- stream.method432(i1);
- stream.writeWord(k);
- stream.method432(j);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 626)
- {
- RSInterface class9_1 = RSInterface.interfaceCache[k];
- spellSelected = 1;
- spellID = class9_1.id;
- anInt1137 = k;
- spellUsableOn = class9_1.spellUsableOn;
- itemSelected = 0;
- needDrawTabArea = true;
- spellID = class9_1.id;
- String s4 = class9_1.selectedActionName;
- if(s4.indexOf(" ") != -1)
- s4 = s4.substring(0, s4.indexOf(" "));
- String s8 = class9_1.selectedActionName;
- if(s8.indexOf(" ") != -1)
- s8 = s8.substring(s8.indexOf(" ") + 1);
- if(s8.equals("on")) s8 = "@whi@->";
- spellTooltip = s4 + " " + "@gre@" + class9_1.spellName + " " + s8;
- //spellTooltip = s4 + " " + class9_1.spellName + " " + s8;
- //class9_1.disabledSprite.drawSprite(class9_1.xOffset, class9_1.yOffset, 0xffffff);
- //class9_1.disabledSprite.drawSprite(200,200);
- //System.out.println("Sprite: " + class9_1.disabledSprite.toString());
- if(spellUsableOn == 16)
- {
- needDrawTabArea = true;
- tabID = 3;
- tabAreaAltered = true;
- }
- return;
- }
- if(l == 78)
- {
- stream.createFrame(117);
- stream.method433(k);
- stream.method433(i1);
- stream.method431(j);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 27)
- {
- Player class30_sub2_sub4_sub1_sub2_2 = playerArray[i1];
- if(class30_sub2_sub4_sub1_sub2_2 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_2.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_2.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- anInt986 += i1;
- if(anInt986 >= 54)
- {
- stream.createFrame(189);
- stream.writeWordBigEndian(234);
- anInt986 = 0;
- }
- stream.createFrame(73);
- stream.method431(i1);
- }
- }
- /* Facing North */
- if(l == 1014) {
- minimapInt1 = 0;
- anInt1184 = 120;
- //minimapInt1 = (int) 20D;
- }
- /*if(l == 1800) {
- if(CameraPos1 > 4) { // 6
- pushMessage("You can't zoom out anymore.", 0, "");
- } else if(CameraPos1 < 5) { // 7
- CameraPos1++;
- CameraPos2 += 200;
- }
- }
- if(l == 1850) {
- if(CameraPos1 == 1) {
- pushMessage("You can't zoom in anymore.", 0, "");
- } else if(CameraPos1 > 1) {
- CameraPos1--;
- CameraPos2 -= 200;
- }
- }*/
- if(l == 213)
- {
- boolean flag3 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag3)
- flag3 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(79);
- stream.method431(k + baseY);
- stream.writeWord(i1);
- stream.method432(j + baseX);
- }
- if(l == 632)
- {
- stream.createFrame(145);
- stream.method432(k);
- stream.method432(j);
- stream.method432(i1);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 1005) {
- launchURL(SignLink.findCacheDir() + "tools/world_map/client.jar");
- pushMessage("World map's not working at the moment, sorry.", 0, "");
- }
- if(l == 1004) {
- if(tabInterfaceIDs[10] != -1) {
- needDrawTabArea = true;
- tabID = 10;
- tabAreaAltered = true;
- }
- }
- if(l == 1003) {
- clanChatMode = 2;
- inputTaken = true;
- }
- if(l == 1002) {
- clanChatMode = 1;
- inputTaken = true;
- }
- if(l == 1001) {
- clanChatMode = 0;
- inputTaken = true;
- }
- if(l == 1000) {
- cButtonCPos = 4;
- chatTypeView = 11;
- inputTaken = true;
- }
- if(l == 999) {
- cButtonCPos = 0;
- chatTypeView = 0;
- inputTaken = true;
- }
- if(l == 998) {
- cButtonCPos = 1;
- chatTypeView = 5;
- inputTaken = true;
- }
- if(l == 997) {
- publicChatMode = 3;
- inputTaken = true;
- }
- if(l == 996) {
- publicChatMode = 2;
- inputTaken = true;
- }
- if(l == 995) {
- publicChatMode = 1;
- inputTaken = true;
- }
- if(l == 994) {
- publicChatMode = 0;
- inputTaken = true;
- }
- if(l == 993) {
- cButtonCPos = 2;
- chatTypeView = 1;
- inputTaken = true;
- }
- if(l == 992) {
- privateChatMode = 2;
- inputTaken = true;
- }
- if(l == 991) {
- privateChatMode = 1;
- inputTaken = true;
- }
- if(l == 990) {
- privateChatMode = 0;
- inputTaken = true;
- }
- if(l == 989) {
- cButtonCPos = 3;
- chatTypeView = 2;
- inputTaken = true;
- }
- if(l == 987) {
- tradeMode = 2;
- inputTaken = true;
- }
- if(l == 986) {
- tradeMode = 1;
- inputTaken = true;
- }
- if(l == 985) {
- tradeMode = 0;
- inputTaken = true;
- }
- if(l == 1423) {
- yellChatMode = 2;
- inputTaken = true;
- }
- if(l == 1422) {
- yellChatMode = 1;
- inputTaken = true;
- }
- if(l == 1421) {
- yellChatMode = 0;
- inputTaken = true;
- }
- if(l == 984) {
- cButtonCPos = 5;
- chatTypeView = 3;
- inputTaken = true;
- }
- if(l == 1420) {
- chatTypeView = 6;
- inputTaken = true;
- }
- if(l == 983) {
- duelMode = 2;
- inputTaken = true;
- }
- if(l == 982) {
- duelMode = 1;
- inputTaken = true;
- }
- if(l == 981) {
- duelMode = 0;
- inputTaken = true;
- }
- if(l == 980) {
- cButtonCPos = 6;
- chatTypeView = 4;
- inputTaken = true;
- }
- if(l == 493)
- {
- stream.createFrame(75);
- stream.method433(k);
- stream.method431(j);
- stream.method432(i1);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 652)
- {
- boolean flag4 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag4)
- flag4 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(156);
- stream.method432(j + baseX);
- stream.method431(k + baseY);
- stream.method433(i1);
- }
- if(l == 94)
- {
- boolean flag5 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag5)
- flag5 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(181);
- stream.method431(k + baseY);
- stream.writeWord(i1);
- stream.method431(j + baseX);
- stream.method432(anInt1137);
- }
- if(l == 646)
- {
- stream.createFrame(185);
- stream.writeWord(k);
- RSInterface class9_2 = RSInterface.interfaceCache[k];
- if(class9_2.valueIndexArray != null && class9_2.valueIndexArray[0][0] == 5)
- {
- int i2 = class9_2.valueIndexArray[0][1];
- if(variousSettings[i2] != class9_2.requiredValues[0])
- {
- variousSettings[i2] = class9_2.requiredValues[0];
- method33(i2);
- needDrawTabArea = true;
- }
- }
- }
- if(l == 225)
- {
- Npc class30_sub2_sub4_sub1_sub1_2 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_2 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub1_2.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub1_2.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- anInt1226 += i1;
- if(anInt1226 >= 85)
- {
- stream.createFrame(230);
- stream.writeWordBigEndian(239);
- anInt1226 = 0;
- }
- stream.createFrame(17);
- stream.method433(i1);
- }
- }
- if(l == 965)
- {
- Npc class30_sub2_sub4_sub1_sub1_3 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_3 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub1_3.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub1_3.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- anInt1134++;
- if(anInt1134 >= 96)
- {
- stream.createFrame(152);
- stream.writeWordBigEndian(88);
- anInt1134 = 0;
- }
- stream.createFrame(21);
- stream.writeWord(i1);
- }
- }
- if(l == 413)
- {
- Npc class30_sub2_sub4_sub1_sub1_4 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_4 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub1_4.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub1_4.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(131);
- stream.method433(i1);
- stream.method432(anInt1137);
- }
- }
- if(l == 200)
- clearTopInterfaces();
- if(l == 1025)
- {
- Npc class30_sub2_sub4_sub1_sub1_5 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_5 != null)
- {
- NpcDef entityDef = class30_sub2_sub4_sub1_sub1_5.desc;
- if(entityDef.childrenIDs != null)
- entityDef = entityDef.method161();
- if(entityDef != null)
- {
- String s9;
- if(entityDef.description != null)
- s9 = new String(entityDef.description);
- else
- s9 = "It's " + addIndefiniteArticle(entityDef.name) + ".";
- pushMessage(s9, 0, "");
- }
- }
- }
- if(l == 900)
- {
- method66(i1, k, j);
- stream.createFrame(252);
- stream.method433(i1 >> 14 & 0x7fff);
- stream.method431(k + baseY);
- stream.method432(j + baseX);
- }
- if(l == 412)
- {
- Npc class30_sub2_sub4_sub1_sub1_6 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_6 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub1_6.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub1_6.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(72);
- stream.method432(i1);
- }
- }
- if(l == 365)
- {
- Player class30_sub2_sub4_sub1_sub2_3 = playerArray[i1];
- if(class30_sub2_sub4_sub1_sub2_3 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_3.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_3.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(249);
- stream.method432(i1);
- stream.method431(anInt1137);
- }
- }
- if(l == 729)
- {
- Player class30_sub2_sub4_sub1_sub2_4 = playerArray[i1];
- if(class30_sub2_sub4_sub1_sub2_4 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_4.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_4.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(39);
- stream.method431(i1);
- }
- }
- if(l == 577)
- {
- Player class30_sub2_sub4_sub1_sub2_5 = playerArray[i1];
- if(class30_sub2_sub4_sub1_sub2_5 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_5.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_5.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(139);
- stream.method431(i1);
- }
- }
- if(l == 956 && method66(i1, k, j))
- {
- stream.createFrame(35);
- stream.method431(j + baseX);
- stream.method432(anInt1137);
- stream.method432(k + baseY);
- stream.method431(i1 >> 14 & 0x7fff);
- }
- if(l == 567)
- {
- boolean flag6 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag6)
- flag6 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(23);
- stream.method431(k + baseY);
- stream.method431(i1);
- stream.method431(j + baseX);
- }
- if(l == 867)
- {
- if((i1 & 3) == 0)
- anInt1175++;
- if(anInt1175 >= 59)
- {
- stream.createFrame(200);
- stream.writeWord(25501);
- anInt1175 = 0;
- }
- stream.createFrame(43);
- stream.method431(k);
- stream.method432(i1);
- stream.method432(j);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 543)
- {
- stream.createFrame(237);
- stream.writeWord(j);
- stream.method432(i1);
- stream.writeWord(k);
- stream.method432(anInt1137);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 606)
- {
- String s2 = menuActionName[i];
- int j2 = s2.indexOf("@whi@");
- if(j2 != -1)
- if(openInterfaceID == -1)
- {
- clearTopInterfaces();
- reportAbuseInput = s2.substring(j2 + 5).trim();
- canMute = false;
- for(int i3 = 0; i3 < RSInterface.interfaceCache.length; i3++)
- {
- if(RSInterface.interfaceCache[i3] == null || RSInterface.interfaceCache[i3].contentType != 600)
- continue;
- reportAbuseInterfaceID = openInterfaceID = RSInterface.interfaceCache[i3].parentID;
- break;
- }
- } else
- {
- pushMessage("Please close the interface you have open before using 'report abuse'", 0, "");
- }
- }
- if(l == 491)
- {
- Player class30_sub2_sub4_sub1_sub2_6 = playerArray[i1];
- if(class30_sub2_sub4_sub1_sub2_6 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub2_6.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub2_6.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(14);
- //stream.method432(anInt1284);
- stream.writeWord(i1);
- //stream.writeWord(anInt1285);
- stream.method431(anInt1283);
- }
- }
- if(l == 639)
- {
- String s3 = menuActionName[i];
- int k2 = s3.indexOf("@whi@");
- if(k2 != -1)
- {
- long l4 = TextClass.longForName(s3.substring(k2 + 5).trim());
- int k3 = -1;
- for(int i4 = 0; i4 < friendsCount; i4++)
- {
- if(friendsListAsLongs[i4] != l4)
- continue;
- k3 = i4;
- break;
- }
- if(k3 != -1 && friendsNodeIDs[k3] > 0)
- {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 3;
- aLong953 = friendsListAsLongs[k3];
- inputPromptTitle = "Enter message to send to " + friendsList[k3];
- }
- }
- }
- if(l == 454)
- {
- stream.createFrame(41);
- stream.writeWord(i1);
- stream.method432(j);
- stream.method432(k);
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- if(RSInterface.interfaceCache[k].parentID == openInterfaceID)
- atInventoryInterfaceType = 1;
- if(RSInterface.interfaceCache[k].parentID == backDialogID)
- atInventoryInterfaceType = 3;
- }
- if(l == 478)
- {
- Npc class30_sub2_sub4_sub1_sub1_7 = npcArray[i1];
- if(class30_sub2_sub4_sub1_sub1_7 != null)
- {
- doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, class30_sub2_sub4_sub1_sub1_7.smallY[0], myPlayer.smallX[0], false, class30_sub2_sub4_sub1_sub1_7.smallX[0]);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- if((i1 & 3) == 0)
- anInt1155++;
- if(anInt1155 >= 53)
- {
- stream.createFrame(85);
- stream.writeWordBigEndian(66);
- anInt1155 = 0;
- }
- stream.createFrame(18);
- stream.method431(i1);
- }
- }
- if(l == 113)
- {
- method66(i1, k, j);
- stream.createFrame(70);
- stream.method431(j + baseX);
- stream.writeWord(k + baseY);
- stream.method433(i1 >> 14 & 0x7fff);
- }
- if(l == 872)
- {
- method66(i1, k, j);
- stream.createFrame(234);
- stream.method433(j + baseX);
- stream.method432(i1 >> 14 & 0x7fff);
- stream.method433(k + baseY);
- }
- if(l == 502)
- {
- method66(i1, k, j);
- stream.createFrame(132);
- stream.method433(j + baseX);
- stream.writeWord(i1 >> 14 & 0x7fff);
- stream.method432(k + baseY);
- }
- if(l == 1125)
- {
- atInventoryLoopCycle = 0;
- atInventoryInterface = k;
- atInventoryIndex = j;
- atInventoryInterfaceType = 2;
- ItemDef itemDef = ItemDef.forID(i1);
- RSInterface class9_4 = RSInterface.interfaceCache[k];
- String s5;
- if(class9_4 != null && class9_4.inventoryValue[j] >= 0x186a0) {
- s5 = formatValue(class9_4.inventoryValue[j], ".") + " x " + itemDef.name;
- } else
- /*if(itemDef.description != null)
- s5 = new String(itemDef.description);
- else*/
- s5 = "It's " + addIndefiniteArticle(itemDef.name) + ".";
- pushMessage(s5, 0, "");
- }
- if(l == 169)
- {
- stream.createFrame(185);
- stream.writeWord(k);
- RSInterface class9_3 = RSInterface.interfaceCache[k];
- if(class9_3.valueIndexArray != null && class9_3.valueIndexArray[0][0] == 5)
- {
- int l2 = class9_3.valueIndexArray[0][1];
- variousSettings[l2] = 1 - variousSettings[l2];
- method33(l2);
- needDrawTabArea = true;
- }
- }
- if(l == 447)
- {
- itemSelected = 1;
- anInt1283 = j;
- anInt1284 = k;
- anInt1285 = i1;
- selectedItemName = ItemDef.forID(i1).name;
- spellSelected = 0;
- needDrawTabArea = true;
- return;
- }
- if(l == 1226)
- {
- int j1 = i1 >> 14 & 0x7fff;
- ObjectDef class46 = ObjectDef.forID(j1);
- String s10;
- if(class46.description != null)
- s10 = new String(class46.description);
- else
- s10 = "It's " + addIndefiniteArticle(class46.name) + ".";
- pushMessage(s10, 0, "");
- }
- if(l == 244)
- {
- boolean flag7 = doWalkTo(2, 0, 0, 0, myPlayer.smallY[0], 0, 0, k, myPlayer.smallX[0], false, j);
- if(!flag7)
- flag7 = doWalkTo(2, 0, 1, 0, myPlayer.smallY[0], 1, 0, k, myPlayer.smallX[0], false, j);
- crossX = super.saveClickX;
- crossY = super.saveClickY;
- crossType = 2;
- crossIndex = 0;
- stream.createFrame(253);
- stream.method431(j + baseX);
- stream.method433(k + baseY);
- stream.method432(i1);
- }
- if(l == 1448)
- {
- ItemDef itemDef_1 = ItemDef.forID(i1);
- String s6;
- if(itemDef_1.description != null)
- s6 = new String(itemDef_1.description);
- else
- s6 = "It's " + addIndefiniteArticle(itemDef_1.name) + ".";
- pushMessage(s6, 0, "");
- }
- itemSelected = 0;
- spellSelected = 0;
- needDrawTabArea = true;
- }
- /*private void method70()
- {
- anInt1251 = 0;
- int j = (myPlayer.x >> 7) + baseX;
- int k = (myPlayer.y >> 7) + baseY;
- if(j >= 3053 && j <= 3156 && k >= 3056 && k <= 3136)
- anInt1251 = 1;
- if(j >= 3072 && j <= 3118 && k >= 9492 && k <= 9535)
- anInt1251 = 1;
- if(anInt1251 == 1 && j >= 3139 && j <= 3199 && k >= 3008 && k <= 3062)
- anInt1251 = 0;
- }*/
- public void run() {
- resetImageProducers();
- if(drawFlames) {
- //drawFlames();
- } else {
- super.run();
- }
- }
- private void build3dScreenMenu()
- {
- if(itemSelected == 0 && spellSelected == 0)
- {
- menuActionName[menuActionRow] = "Walk here";
- menuActionID[menuActionRow] = 516;
- menuActionCmd2[menuActionRow] = super.mouseX;
- menuActionCmd3[menuActionRow] = super.mouseY;
- menuActionRow++;
- }
- int j = -1;
- for(int k = 0; k < Model.anInt1687; k++)
- {
- int l = Model.anIntArray1688[k];
- int i1 = l & 0x7f;
- int j1 = l >> 7 & 0x7f;
- int k1 = l >> 29 & 3;
- int l1 = l >> 14 & 0x7fff;
- if(l == j)
- continue;
- j = l;
- if(k1 == 2 && sceneGraph.getIDTAGForXYZ(plane, i1, j1, l) >= 0)
- {
- ObjectDef class46 = ObjectDef.forID(l1);
- if(class46.childrenIDs != null)
- class46 = class46.method580();
- if(class46 == null)
- continue;
- if(itemSelected == 1)
- {
- menuActionName[menuActionRow] = "Use " + selectedItemName + " -> @cya@" + class46.name;
- menuActionID[menuActionRow] = 62;
- menuActionCmd1[menuActionRow] = l;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- } else
- if(spellSelected == 1)
- {
- if((spellUsableOn & 4) == 4)
- {
- menuActionName[menuActionRow] = spellTooltip + " @cya@" + class46.name;
- menuActionID[menuActionRow] = 956;
- menuActionCmd1[menuActionRow] = l;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- }
- } else
- {
- if(class46.itemActions != null)
- {
- for(int i2 = 4; i2 >= 0; i2--)
- if(class46.itemActions[i2] != null)
- {
- menuActionName[menuActionRow] = class46.itemActions[i2] + " @cya@" + class46.name;
- if(i2 == 0)
- menuActionID[menuActionRow] = 502;
- if(i2 == 1)
- menuActionID[menuActionRow] = 900;
- if(i2 == 2)
- menuActionID[menuActionRow] = 113;
- if(i2 == 3)
- menuActionID[menuActionRow] = 872;
- if(i2 == 4)
- menuActionID[menuActionRow] = 1062;
- menuActionCmd1[menuActionRow] = l;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- }
- }
- if(idToggle) {
- menuActionName[menuActionRow] = "Examine @cya@" + class46.name + " @gre@(@whi@" + l1 + "@gre@) (@whi@" + (i1 + baseX) + "," + (j1 + baseY) + "@gre@)";
- } else {
- menuActionName[menuActionRow] = "Examine @cya@" + class46.name;
- }
- menuActionID[menuActionRow] = 1226;
- menuActionCmd1[menuActionRow] = class46.type << 14;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- }
- }
- if(k1 == 1)
- {
- Npc npc = npcArray[l1];
- if(npc.desc.aByte68 == 1 && (npc.x & 0x7f) == 64 && (npc.y & 0x7f) == 64)
- {
- for(int j2 = 0; j2 < npcCount; j2++)
- {
- Npc npc2 = npcArray[npcIndices[j2]];
- if(npc2 != null && npc2 != npc && npc2.desc.aByte68 == 1 && npc2.x == npc.x && npc2.y == npc.y)
- buildAtNPCMenu(npc2.desc, npcIndices[j2], j1, i1);
- }
- for(int l2 = 0; l2 < playerCount; l2++)
- {
- Player player = playerArray[playerIndices[l2]];
- if(player != null && player.x == npc.x && player.y == npc.y)
- buildAtPlayerMenu(i1, playerIndices[l2], player, j1);
- }
- }
- buildAtNPCMenu(npc.desc, l1, j1, i1);
- }
- if(k1 == 0)
- {
- Player player = playerArray[l1];
- if((player.x & 0x7f) == 64 && (player.y & 0x7f) == 64)
- {
- for(int k2 = 0; k2 < npcCount; k2++)
- {
- Npc class30_sub2_sub4_sub1_sub1_2 = npcArray[npcIndices[k2]];
- if(class30_sub2_sub4_sub1_sub1_2 != null && class30_sub2_sub4_sub1_sub1_2.desc.aByte68 == 1 && class30_sub2_sub4_sub1_sub1_2.x == player.x && class30_sub2_sub4_sub1_sub1_2.y == player.y)
- buildAtNPCMenu(class30_sub2_sub4_sub1_sub1_2.desc, npcIndices[k2], j1, i1);
- }
- for(int i3 = 0; i3 < playerCount; i3++)
- {
- Player class30_sub2_sub4_sub1_sub2_2 = playerArray[playerIndices[i3]];
- if(class30_sub2_sub4_sub1_sub2_2 != null && class30_sub2_sub4_sub1_sub2_2 != player && class30_sub2_sub4_sub1_sub2_2.x == player.x && class30_sub2_sub4_sub1_sub2_2.y == player.y)
- buildAtPlayerMenu(i1, playerIndices[i3], class30_sub2_sub4_sub1_sub2_2, j1);
- }
- }
- buildAtPlayerMenu(i1, l1, player, j1);
- }
- if(k1 == 3)
- {
- NodeList class19 = groundArray[plane][i1][j1];
- if(class19 != null)
- {
- for(Item item = (Item)class19.getFirst(); item != null; item = (Item)class19.getNext())
- {
- ItemDef itemDef = ItemDef.forID(item.ID);
- if(itemSelected == 1)
- {
- menuActionName[menuActionRow] = "Use " + selectedItemName + " -> @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 511;
- menuActionCmd1[menuActionRow] = item.ID;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- } else
- if(spellSelected == 1)
- {
- if((spellUsableOn & 1) == 1)
- {
- menuActionName[menuActionRow] = spellTooltip + " @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 94;
- menuActionCmd1[menuActionRow] = item.ID;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- }
- } else
- {
- for(int j3 = 4; j3 >= 0; j3--)
- if(itemDef.groundActions != null && itemDef.groundActions[j3] != null)
- {
- menuActionName[menuActionRow] = itemDef.groundActions[j3] + " @lre@" + itemDef.name;
- if(j3 == 0)
- menuActionID[menuActionRow] = 652;
- if(j3 == 1)
- menuActionID[menuActionRow] = 567;
- if(j3 == 2)
- menuActionID[menuActionRow] = 234;
- if(j3 == 3)
- menuActionID[menuActionRow] = 244;
- if(j3 == 4)
- menuActionID[menuActionRow] = 213;
- menuActionCmd1[menuActionRow] = item.ID;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- } else
- if(j3 == 2)
- {
- menuActionName[menuActionRow] = "Take @lre@" + itemDef.name;
- menuActionID[menuActionRow] = 234;
- menuActionCmd1[menuActionRow] = item.ID;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- }
- if(idToggle) {
- menuActionName[menuActionRow] = "Examine @lre@" + itemDef.name + " @gre@(@whi@" + item.ID + "@gre@)";
- } else {
- menuActionName[menuActionRow] = "Examine @lre@" + itemDef.name;
- }
- menuActionID[menuActionRow] = 1448;
- menuActionCmd1[menuActionRow] = item.ID;
- menuActionCmd2[menuActionRow] = i1;
- menuActionCmd3[menuActionRow] = j1;
- menuActionRow++;
- }
- }
- }
- }
- }
- }
- public void cleanUpForQuit() {
- SignLink.reporterror = false;
- try {
- if(socketStream != null)
- socketStream.close();
- }
- catch(Exception _ex) { }
- socketStream = null;
- stopMidi();
- if(mouseDetection != null)
- mouseDetection.running = false;
- mouseDetection = null;
- onDemandFetcher.disable();
- onDemandFetcher = null;
- aStream_834 = null;
- stream = null;
- aStream_847 = null;
- inStream = null;
- mapCoordinates = null;
- terrainData = null;
- aByteArrayArray1247 = null;
- terrainIndices = null;
- anIntArray1236 = null;
- intGroundArray = null;
- byteGroundArray = null;
- sceneGraph = null;
- aClass11Array1230 = null;
- anIntArrayArray901 = null;
- anIntArrayArray825 = null;
- bigX = null;
- bigY = null;
- aByteArray912 = null;
- tabArea = null;
- mapEdgeIP = null;
- leftFrame = null;
- topFrame = null;
- rightFrame = null;
- miniMapArea = null;
- mainGameArea = null;
- chatArea = null;
- /* Null pointers for custom sprites */
- cacheSprite = null;
- chatBack = null;
- chatButtons = null;
- tabBack = null;
- magicAuto = null;
- tabHover = null;
- tabClicked = null;
- tabSelected = null;
- newSideIcons = null;
- mapBack = null;
- CustomMapback = null;
- sideIcons = null;
- sIcons483 = null;
- sIcons459 = null;
- redStones = null;
- compass = null;
- newHitMark = null;
- hitMarks = null;
- hitMark = null;
- headIcons = null;
- skullIcons = null;
- headIconsHint = null;
- crosses = null;
- mapDotItem = null;
- mapDotNPC = null;
- mapDotPlayer = null;
- mapDotFriend = null;
- mapDotTeam = null;
- mapScenes = null;
- mapFunctions = null;
- anIntArrayArray929 = null;
- playerArray = null;
- playerIndices = null;
- anIntArray894 = null;
- aStreamArray895s = null;
- anIntArray840 = null;
- npcArray = null;
- npcIndices = null;
- groundArray = null;
- aClass19_1179 = null;
- aClass19_1013 = null;
- aClass19_1056 = null;
- menuActionCmd2 = null;
- menuActionCmd3 = null;
- menuActionID = null;
- menuActionCmd1 = null;
- menuActionName = null;
- variousSettings = null;
- anIntArray1072 = null;
- anIntArray1073 = null;
- aSpriteArray1140 = null;
- minimap = null;
- friendsList = null;
- friendsListAsLongs = null;
- friendsNodeIDs = null;
- leftSideFlame = null;
- rightSideFlame = null;
- aRSImageProducer_1107 = null;
- aRSImageProducer_1108 = null;
- loginScreenArea = null;
- gameLogo = null;
- aRSImageProducer_1113 = null;
- aRSImageProducer_1114 = null;
- aRSImageProducer_1115 = null;
- multiOverlay = null;
- nullLoader();
- ObjectDef.nullLoader();
- NpcDef.nullLoader();
- ItemDef.nullLoader();
- Flo.cache = null;
- IdentityKit.cache = null;
- RSInterface.interfaceCache = null;
- Animation.anims = null;
- SpotAnim.cache = null;
- SpotAnim.aMRUNodes_415 = null;
- Varp.cache = null;
- super.fullGameScreen = null;
- Player.mruNodes = null;
- Texture.nullLoader();
- WorldController.nullLoader();
- Model.nullLoader();
- Class36.nullLoader();
- System.gc();
- }
- /*private void printDebug()
- {
- System.out.println("============");
- System.out.println("flame-cycle:" + anInt1208);
- if(onDemandFetcher != null)
- System.out.println("Od-cycle:" + onDemandFetcher.onDemandCycle);
- System.out.println("loop-cycle:" + loopCycle);
- System.out.println("draw-cycle:" + anInt1061);
- System.out.println("ptype:" + pktType);
- System.out.println("psize:" + pktSize);
- if(socketStream != null)
- socketStream.printDebug();
- super.shouldDebug = true;
- }*/
- Component getGameComponent() {
- if(SignLink.mainapp != null)
- return SignLink.mainapp;
- if(super.gameFrame != null)
- return super.gameFrame;
- else
- return this;
- }
- private void method73() {
- do {
- int j = readChar(-796);
- if(j == -1)
- break;
- if(showDeveloperConsole)
- handleDeveloperConsoleInput(j);
- else if(openInterfaceID != -1 && openInterfaceID == reportAbuseInterfaceID) {
- if(j == 8 && reportAbuseInput.length() > 0)
- reportAbuseInput = reportAbuseInput.substring(0, reportAbuseInput.length() - 1);
- if((j >= 97 && j <= 122 || j >= 65 && j <= 90 || j >= 48 && j <= 57 || j == 32) && reportAbuseInput.length() < 12)
- reportAbuseInput += (char)j;
- } else if(messagePromptRaised) {
- if(j >= 32 && j <= 122 && promptInput.length() < 80) {
- promptInput += (char)j;
- inputTaken = true;
- }
- if(j == 8 && promptInput.length() > 0) {
- promptInput = promptInput.substring(0, promptInput.length() - 1);
- inputTaken = true;
- }
- if(j == 13 || j == 10) {
- messagePromptRaised = false;
- inputTaken = true;
- if(friendsListAction == 1) {
- long l = TextClass.longForName(promptInput);
- addFriend(l);
- }
- if(friendsListAction == 2 && friendsCount > 0) {
- long l1 = TextClass.longForName(promptInput);
- delFriend(l1);
- }
- if(friendsListAction == 3 && promptInput.length() > 0) {
- stream.createFrame(126);
- stream.writeWordBigEndian(0);
- int k = stream.currentOffset;
- stream.writeQWord(aLong953);
- TextInput.method526(promptInput, stream);
- stream.writeBytes(stream.currentOffset - k);
- promptInput = TextInput.processText(promptInput);
- //promptInput = Censor.doCensor(promptInput);
- pushMessage(promptInput, 6, TextClass.fixName(TextClass.nameForLong(aLong953)));
- if(privateChatMode == 2) {
- privateChatMode = 1;
- ////aBoolean1233 = true;
- stream.createFrame(95);
- stream.writeWordBigEndian(publicChatMode);
- stream.writeWordBigEndian(privateChatMode);
- stream.writeWordBigEndian(tradeMode);
- }
- }
- if(friendsListAction == 4 && ignoreCount < 100) {
- long l2 = TextClass.longForName(promptInput);
- addIgnore(l2);
- }
- if(friendsListAction == 5 && ignoreCount > 0) {
- long l3 = TextClass.longForName(promptInput);
- delIgnore(l3);
- }
- if(friendsListAction == 6) {
- long l3 = TextClass.longForName(promptInput);
- chatJoin(l3);
- }
- }
- } else if(inputDialogState == 1) {
- if(j >= 48 && j <= 57 && amountOrNameInput.length() < 10 && !amountOrNameInput.toLowerCase().contains("k") && !amountOrNameInput.toLowerCase().contains("m") && !amountOrNameInput.toLowerCase().contains("b")) {
- amountOrNameInput += (char)j;
- inputTaken = true;
- }
- if(!amountOrNameInput.equals("") && amountOrNameInput.length() < 10 && (!amountOrNameInput.toLowerCase().contains("k") && !amountOrNameInput.toLowerCase().contains("m") && !amountOrNameInput.toLowerCase().contains("b")) && (j == 107 || j == 109 || j == 98)) {
- amountOrNameInput += (char)j;
- inputTaken = true;
- }
- if(j == 8 && amountOrNameInput.length() > 0) {
- amountOrNameInput = amountOrNameInput.substring(0, amountOrNameInput.length() - 1);
- inputTaken = true;
- }
- if(j == 13 || j == 10) {
- if(amountOrNameInput.length() > 0) {
- if(amountOrNameInput.toLowerCase().contains("k"))
- amountOrNameInput = amountOrNameInput.replaceAll("k", "000");
- else if(amountOrNameInput.toLowerCase().contains("m"))
- amountOrNameInput = amountOrNameInput.replaceAll("m", "000000");
- else if(amountOrNameInput.toLowerCase().contains("b"))
- amountOrNameInput = amountOrNameInput.replaceAll("b", "000000000");
- int i1 = 0;
- try {
- i1 = Integer.parseInt(amountOrNameInput);
- } catch(Exception _ex) { }
- stream.createFrame(208);
- stream.writeDWord(i1);
- }
- inputDialogState = 0;
- inputTaken = true;
- }
- } else if(inputDialogState == 2) {
- if(j >= 32 && j <= 122 && amountOrNameInput.length() < 12) {
- amountOrNameInput += (char)j;
- inputTaken = true;
- }
- if(j == 8 && amountOrNameInput.length() > 0) {
- amountOrNameInput = amountOrNameInput.substring(0, amountOrNameInput.length() - 1);
- inputTaken = true;
- }
- if(j == 13 || j == 10) {
- if(amountOrNameInput.length() > 0) {
- stream.createFrame(60);
- stream.writeQWord(TextClass.longForName(amountOrNameInput));
- }
- inputDialogState = 0;
- inputTaken = true;
- }
- } else if(writingOnStaffTab) {
- if((j >= 97 && j <= 122 || j >= 65 && j <= 90 || j >= 48 && j <= 57 || j == 32) && staffTabInput.length() < 12) {
- staffTabInput += (char)j;
- staffTabInput = TextClass.fixName(staffTabInput);
- }
- if((j == 13 || j == 10) && staffTabInput.length() > 0) {
- long l3 = TextClass.longForName(staffTabInput);
- String s = TextClass.nameForLong(l3);
- fixedName = TextClass.fixName(s);
- showedName = fixedName;
- writingOnStaffTab = false;
- }
- if(j == 8 && staffTabInput.length() > 0)
- staffTabInput = staffTabInput.substring(0, staffTabInput.length() - 1);
- } else if(backDialogID == -1 && !writingOnStaffTab) {
- if(j >= 32 && j <= 122 && inputString.length() < 80) {
- inputString += (char)j;
- inputTaken = true;
- }
- if(j == 8 && inputString.length() > 0) {
- inputString = inputString.substring(0, inputString.length() - 1);
- inputTaken = true;
- }
- if(j == 9)
- tabReply();
- if((j == 13 || j == 10) && inputString.length() > 0) {
- if((inputString.startsWith("::yell") || inputString.startsWith("**")) && myPrivilege != 0 && myPrivilege != 3) {
- if(System.currentTimeMillis() - yellTimer < 10000) {
- long seconds = 10-(System.currentTimeMillis() - yellTimer) / 1000;
- pushMessage("You have to wait "+seconds+" seconds to yell again.", 0, "");
- return;
- } else
- yellTimer = System.currentTimeMillis();
- }
- if(inputString.startsWith("/"))
- inputString = "::" + inputString;
- if(inputString.startsWith("**"))
- inputString = "::" + inputString;
- if(!inputString.startsWith("::") && myPlayer.isMuted == 1) {
- inputString = "";
- pushMessage("You are muted, no one can hear you.", 0, "");
- return;
- }
- if(inputString.startsWith("::")) {
- stream.createFrame(103);
- stream.writeWordBigEndian(inputString.length() - 1);
- stream.writeString(inputString.substring(2));
- } else {
- String s = inputString.toLowerCase();
- int color = 0;
- if(s.startsWith("yellow:"))
- {
- color = 0;
- inputString = inputString.substring(7);
- } else if(s.startsWith("red:"))
- {
- color = 1;
- inputString = inputString.substring(4);
- } else if(s.startsWith("green:"))
- {
- color = 2;
- inputString = inputString.substring(6);
- } else if(s.startsWith("cyan:"))
- {
- color = 3;
- inputString = inputString.substring(5);
- } else if(s.startsWith("purple:"))
- {
- color = 4;
- inputString = inputString.substring(7);
- } else if(s.startsWith("white:"))
- {
- color = 5;
- inputString = inputString.substring(6);
- } else if(s.startsWith("flash1:"))
- {
- color = 6;
- inputString = inputString.substring(7);
- } else if(s.startsWith("flash2:"))
- {
- color = 7;
- inputString = inputString.substring(7);
- } else if(s.startsWith("flash3:"))
- {
- color = 8;
- inputString = inputString.substring(7);
- } else if(s.startsWith("glow1:"))
- {
- color = 9;
- inputString = inputString.substring(6);
- } else if(s.startsWith("glow2:"))
- {
- color = 10;
- inputString = inputString.substring(6);
- } else if(s.startsWith("glow3:"))
- {
- color = 11;
- inputString = inputString.substring(6);
- }
- s = inputString.toLowerCase();
- int anim = 0;
- if(s.startsWith("wave:")) {
- anim = 1;
- inputString = inputString.substring(5);
- } else if(s.startsWith("wave2:")) {
- anim = 2;
- inputString = inputString.substring(6);
- } else if(s.startsWith("shake:")) {
- anim = 3;
- inputString = inputString.substring(6);
- } else if(s.startsWith("scroll:")) {
- anim = 4;
- inputString = inputString.substring(7);
- } else if(s.startsWith("slide:")) {
- anim = 5;
- inputString = inputString.substring(6);
- }
- stream.createFrame(4);
- stream.writeWordBigEndian(0);
- int j3 = stream.currentOffset;
- stream.method425(anim);
- stream.method425(color);
- aStream_834.currentOffset = 0;
- TextInput.method526(inputString, aStream_834);
- stream.method441(0, aStream_834.buffer, aStream_834.currentOffset);
- stream.writeBytes(stream.currentOffset - j3);
- //inputString = TextInput.processText(inputString);
- inputString = fixChat(inputString);
- //inputString = Censor.doCensor(inputString);
- myPlayer.textSpoken = inputString;
- myPlayer.textColor = color;
- myPlayer.textAnim = anim;
- myPlayer.textCycle = 150;
- //My players icons showing up when I speak
- String cr = "";
- if(myPrivilege == 4) cr = "@cr0@";
- if(myPrivilege == 3) cr = "@cr3@";
- if(myPrivilege == 2) cr = "@cr2@";
- if(myPrivilege == 1) cr = "@cr1@";
- pushMessage(myPlayer.textSpoken, 2, cr + "<col="+titleColor(myPlayer.titleColor, 0)+">" + myPlayer.title + "</col>" + myPlayer.name);
- /*if(publicChatMode == 2)
- {
- publicChatMode = 3;
- //aBoolean1233 = true;
- stream.createFrame(95);
- stream.writeWordBigEndian(publicChatMode);
- stream.writeWordBigEndian(privateChatMode);
- stream.writeWordBigEndian(tradeMode);
- }*/
- }
- inputString = "";
- inputTaken = true;
- }
- }
- } while(true);
- }
- private void buildPublicChat(int j)
- {
- int l = 0;
- for(int i1 = 0; i1 < 500; i1++)
- {
- if(chatMessages[i1] == null)
- continue;
- if(chatTypeView != 1)
- continue;
- int j1 = chatTypes[i1];
- String s = chatNames[i1];
- //String ct = chatMessages[i1];
- int k1 = (70 - l * 14 + 42) + chatAreaScrollPos + 4 + 5;
- if(k1 < -23)
- break;
- if(s != null && s.startsWith("@cr"))
- s = s.substring(5);
- if(s != null && s.startsWith("<col=")) {
- s = s.substring(s.indexOf("</col>")+6);
- }
- if((j1 == 1 || j1 == 2) && (j1 == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1 && !s.equals(myPlayer.name)) {
- /**if(myPrivilege >= 1) {
- menuActionName[menuActionRow] = "Report abuse @whi@" + s); //TEST
- menuActionID[menuActionRow] = 606;
- menuActionRow++;
- }**/
- menuActionName[menuActionRow] = "Add ignore @whi@" + s;
- menuActionID[menuActionRow] = 42;
- menuActionRow++;
- menuActionName[menuActionRow] = "Add friend @whi@" + s;
- menuActionID[menuActionRow] = 337;
- menuActionRow++;
- }
- l++;
- }
- }
- }
- private void buildFriendChat(int j)
- {
- int l = 0;
- for(int i1 = 0; i1 < 500; i1++) {
- if(chatMessages[i1] == null)
- continue;
- if(chatTypeView != 2)
- continue;
- int j1 = chatTypes[i1];
- String s = chatNames[i1];
- //String ct = chatMessages[i1];
- int k1 = (70 - l * 14 + 42) + chatAreaScrollPos + 4 + 5;
- if(k1 < -23)
- break;
- if(s != null && s.startsWith("@cr1@"))
- s = s.substring(5);
- if(s != null && s.startsWith("@cr3@"))
- s = s.substring(5);
- if(s != null && s.startsWith("@cr2@"))
- s = s.substring(5);
- if(s != null && s.startsWith("@cr0@"))
- s = s.substring(5);
- if((j1 == 5 || j1 == 6) && (splitPrivateChat == 0 || chatTypeView == 2) && (j1 == 6 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s)))
- l++;
- if((j1 == 3 || j1 == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (j1 == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s)))
- {
- if(j > k1 - 14 && j <= k1) {
- /**if(myPrivilege >= 1) {
- menuActionName[menuActionRow] = "Report abuse @whi@" + s;
- menuActionID[menuActionRow] = 606;
- menuActionRow++;
- }**/
- menuActionName[menuActionRow] = "Add ignore @whi@" + s;
- menuActionID[menuActionRow] = 42;
- menuActionRow++;
- menuActionName[menuActionRow] = "Add friend @whi@" + s;
- menuActionID[menuActionRow] = 337;
- menuActionRow++;
- }
- l++;
- }
- }
- }
- private void buildDuelorTrade(int j) {
- int l = 0;
- for(int i1 = 0; i1 < 500; i1++) {
- if(chatMessages[i1] == null)
- continue;
- if(chatTypeView != 3 && chatTypeView != 4)
- continue;
- int j1 = chatTypes[i1];
- String s = chatNames[i1];
- int k1 = (70 - l * 14 + 42) + chatAreaScrollPos + 4 + 5;
- if(k1 < -23)
- break;
- if(s != null && s.startsWith("@cr1@"))
- s = s.substring(5);
- if(s != null && s.startsWith("@cr3@"))
- s = s.substring(5);
- if(s != null && s.startsWith("@cr2@"))
- s = s.substring(5);
- if(s != null && s.startsWith("@cr0@"))
- s = s.substring(5);
- if(chatTypeView == 3 && j1 == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = "Accept trade @whi@" + s;
- menuActionID[menuActionRow] = 484;
- menuActionRow++;
- }
- l++;
- }
- if(chatTypeView == 4 && j1 == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = "Accept challenge @whi@" + s;
- menuActionID[menuActionRow] = 6;
- menuActionRow++;
- }
- l++;
- }
- if(j1 == 12) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = "Go-to @cya@" + s;
- menuActionID[menuActionRow] = 915;
- menuActionRow++;
- }
- l++;
- }
- }
- }
- private void buildChatAreaMenu(int j) { //RIGHTCLICK OPTIONS ON CHATBOX
- int l = 0;
- for(int i1 = 0; i1 < 500; i1++) {
- if(chatMessages[i1] == null)
- continue;
- int j1 = chatTypes[i1];
- int k1 = (70 - l * 14 + 42) + chatAreaScrollPos + 4 + 5;
- if(k1 < -23)
- break;
- String s = chatNames[i1];
- //String ct = chatMessages[i1];
- //boolean flag = false;
- if(chatTypeView == 1) {
- buildPublicChat(j);
- break;
- }
- if(chatTypeView == 2) {
- buildFriendChat(j);
- break;
- }
- if(chatTypeView == 3 || chatTypeView == 4) {
- buildDuelorTrade(j);
- break;
- }
- if(chatTypeView == 5) {
- break;
- }
- if(s != null && s.startsWith("@cr1")) {
- s = s.substring(5);
- //byte byte0 = 1;
- }
- if(s != null && s.startsWith("@cr3@")) {
- s = s.substring(5);
- /*boolean flag1 = true;
- byte byte0 = 2;*/
- }
- if(s != null && s.startsWith("@cr2@")) {
- s = s.substring(5);
- //byte byte0 = 3;
- }
- if(s != null && s.startsWith("@cr0@")) {
- s = s.substring(5);
- //byte byte0 = 4;
- }
- if(s != null && s.startsWith("<col=")) {
- s = s.substring(s.indexOf("</col>")+6);
- }
- if(j1 == 0)
- l++;
- if((j1 == 1 || j1 == 2) && (j1 == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1 && !s.equals(myPlayer.name)) {
- /**if(myPrivilege >= 1) {
- menuActionName[menuActionRow] = "Report abuse @whi@" + s; //LOL
- menuActionID[menuActionRow] = 606;
- menuActionRow++;
- }**/
- menuActionName[menuActionRow] = "Add ignore @whi@" + s;
- menuActionID[menuActionRow] = 42;
- menuActionRow++;
- menuActionName[menuActionRow] = "Add friend @whi@" + s;
- menuActionID[menuActionRow] = 337;
- menuActionRow++;
- }
- l++;
- }
- if((j1 == 3 || j1 == 7) && splitPrivateChat == 0 && (j1 == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1) {
- /*if(myPrivilege >= 1) {
- menuActionName[menuActionRow] = "Report abuse @whi@" + s;
- menuActionID[menuActionRow] = 606;
- menuActionRow++;
- }*/
- menuActionName[menuActionRow] = "Add ignore @whi@" + s;
- menuActionID[menuActionRow] = 42;
- menuActionRow++;
- menuActionName[menuActionRow] = "Add friend @whi@" + s;
- menuActionID[menuActionRow] = 337;
- menuActionRow++;
- }
- l++;
- }
- if(j1 == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = "Accept trade @whi@" + s;
- menuActionID[menuActionRow] = 484;
- menuActionRow++;
- }
- l++;
- }
- if((j1 == 5 || j1 == 6) && splitPrivateChat == 0 && privateChatMode < 2)
- l++;
- if(j1 == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s))) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = "Accept challenge @whi@" + s;
- menuActionID[menuActionRow] = 6;
- menuActionRow++;
- }
- l++;
- }
- if(j1 == 9) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = "Go-to @cya@" + s;
- menuActionID[menuActionRow] = 927;
- menuActionRow++;
- }
- l++;
- }
- if(j1 == 10) {
- if(j > k1 - 14 && j <= k1) {
- menuActionName[menuActionRow] = s;
- menuActionID[menuActionRow] = 1090;
- menuActionRow++;
- }
- l++;
- }
- }
- }
- private void drawFriendsListOrWelcomeScreen(RSInterface class9)
- {
- int j = class9.contentType;
- if(j >= 1 && j <= 100 || j >= 701 && j <= 800)
- {
- if(j == 1 && anInt900 == 0)
- {
- class9.disabledMessage = "Loading friend list";
- class9.atActionType = 0;
- return;
- }
- if(j == 1 && anInt900 == 1)
- {
- class9.disabledMessage = "Connecting to friendserver";
- class9.atActionType = 0;
- return;
- }
- if(j == 2 && anInt900 != 2)
- {
- class9.disabledMessage = "Please wait...";
- class9.atActionType = 0;
- return;
- }
- int k = friendsCount;
- if(anInt900 != 2)
- k = 0;
- if(j > 700)
- j -= 601;
- else
- j--;
- if(j >= k)
- {
- class9.disabledMessage = "";
- class9.atActionType = 0;
- return;
- } else
- {
- class9.disabledMessage = friendsList[j];
- class9.atActionType = 1;
- return;
- }
- }
- if(j >= 101 && j <= 200 || j >= 801 && j <= 900)
- {
- int l = friendsCount;
- if(anInt900 != 2)
- l = 0;
- if(j > 800)
- j -= 701;
- else
- j -= 101;
- if(j >= l)
- {
- class9.disabledMessage = "";
- class9.atActionType = 0;
- return;
- }
- if(friendsNodeIDs[j] == 10)
- class9.disabledMessage = "@gre@Online";
- else
- if(friendsNodeIDs[j] == nodeID)
- class9.disabledMessage = "@red@Offline";
- else
- class9.disabledMessage = "@red@Offline";
- class9.atActionType = 1;
- return;
- }
- if(j == 203)
- {
- int i1 = friendsCount;
- if(anInt900 != 2)
- i1 = 0;
- class9.scrollMax = i1 * 15 + 20;
- if(class9.scrollMax <= class9.height)
- class9.scrollMax = class9.height + 1;
- return;
- }
- if(j >= 401 && j <= 500)
- {
- if((j -= 401) == 0 && anInt900 == 0)
- {
- class9.disabledMessage = "Loading ignore list";
- class9.atActionType = 0;
- return;
- }
- if(j == 1 && anInt900 == 0)
- {
- class9.disabledMessage = "Please wait...";
- class9.atActionType = 0;
- return;
- }
- int j1 = ignoreCount;
- if(anInt900 == 0)
- j1 = 0;
- if(j >= j1)
- {
- class9.disabledMessage = "";
- class9.atActionType = 0;
- return;
- } else
- {
- class9.disabledMessage = TextClass.fixName(TextClass.nameForLong(ignoreListAsLongs[j]));
- class9.atActionType = 1;
- return;
- }
- }
- if(j == 503)
- {
- class9.scrollMax = ignoreCount * 15 + 20;
- if(class9.scrollMax <= class9.height)
- class9.scrollMax = class9.height + 1;
- return;
- }
- if(j == 327)
- {
- class9.modelRotationY = 150;
- class9.modelRotationX = (int)(Math.sin((double)loopCycle / 40D) * 256D) & 0x7ff;
- if(charEditChanged)
- {
- for(int k1 = 0; k1 < 7; k1++)
- {
- int l1 = charEditIdKit[k1];
- if(l1 >= 0 && !IdentityKit.cache[l1].method537())
- return;
- }
- charEditChanged = false;
- Model aclass30_sub2_sub4_sub6s[] = new Model[7];
- int i2 = 0;
- for(int j2 = 0; j2 < 7; j2++)
- {
- int k2 = charEditIdKit[j2];
- if(k2 >= 0)
- aclass30_sub2_sub4_sub6s[i2++] = IdentityKit.cache[k2].method538();
- }
- Model model = new Model(i2, aclass30_sub2_sub4_sub6s);
- for(int l2 = 0; l2 < 5; l2++)
- if(charEditColors[l2] != 0)
- {
- model.replaceColor(charEditColorChoises[l2][0], charEditColorChoises[l2][charEditColors[l2]]);
- if(l2 == 1)
- model.replaceColor(anIntArray1204[0], anIntArray1204[charEditColors[l2]]);
- }
- model.method469();
- model.method470(Animation.anims[myPlayer.anInt1511].anIntArray353[0]);
- model.method479(64, 850, -30, -50, -30, true);
- class9.disabledMediaType = 5;
- class9.disabledMediaID = 0;
- RSInterface.method208(aBoolean994, model);
- }
- return;
- }
- if(j == 328) { //character in equipment interface etc.
- RSInterface charDisplayModel = class9;
- /*int verticleTilt = 150;
- int animationSpeed = (int)(Math.sin((double)loopCycle / 40D) * 256D) & 0x7ff;
- rsInterface.modelRotationY = verticleTilt;
- rsInterface.modelRotationX = animationSpeed;*/
- charDisplayModel.modelZoom = 525;
- charDisplayModel.modelRotationY = 50;
- charDisplayModel.yOffset = 25;
- charDisplayModel.xOffset = 3;
- if(rollingCharacter) {
- if(charDisplayModel.modelRotationX >= 0)
- charDisplayModel.modelRotationX -= 10;
- if(charDisplayModel.modelRotationX < 0)
- charDisplayModel.modelRotationX = 2047;
- } else {
- if(charDisplayModel.modelRotationX != 0) {
- if(charDisplayModel.modelRotationX > 1023)
- charDisplayModel.modelRotationX += 20;
- else
- charDisplayModel.modelRotationX -= 20;
- if(charDisplayModel.modelRotationX < 0 || charDisplayModel.modelRotationX > 2047)
- charDisplayModel.modelRotationX = 0;
- }
- }
- if(charEditChanged) {
- Model characterDisplay = myPlayer.method452();
- for(int l2 = 0; l2 < 5; l2++)
- if(charEditColors[l2] != 0) {
- characterDisplay.replaceColor(charEditColorChoises[l2][0], charEditColorChoises[l2][charEditColors[l2]]);
- if(l2 == 1)
- characterDisplay.replaceColor(anIntArray1204[0], anIntArray1204[charEditColors[l2]]);
- }
- int staticFrame = myPlayer.anInt1511;
- characterDisplay.method469();
- characterDisplay.method470(Animation.anims[staticFrame].anIntArray353[0]);
- //characterDisplay.method479(64, 850, -30, -50, -30, true);
- charDisplayModel.disabledMediaType = 5;
- charDisplayModel.disabledMediaID = 0;
- RSInterface.method208(aBoolean994, characterDisplay);
- }
- return;
- }
- if(j == 324)
- {
- if(aSprite_931 == null)
- {
- aSprite_931 = class9.disabledSprite;
- aSprite_932 = class9.enabledSprite;
- }
- if(charEditGender)
- {
- class9.disabledSprite = aSprite_932;
- return;
- } else
- {
- class9.disabledSprite = aSprite_931;
- return;
- }
- }
- if(j == 325)
- {
- if(aSprite_931 == null)
- {
- aSprite_931 = class9.disabledSprite;
- aSprite_932 = class9.enabledSprite;
- }
- if(charEditGender)
- {
- class9.disabledSprite = aSprite_931;
- return;
- } else
- {
- class9.disabledSprite = aSprite_932;
- return;
- }
- }
- if(j == 600)
- {
- class9.disabledMessage = reportAbuseInput;
- if(loopCycle % 20 < 10)
- {
- class9.disabledMessage += "|";
- return;
- } else
- {
- class9.disabledMessage += " ";
- return;
- }
- }
- if(j == 613)
- if(myPrivilege >= 1)
- {
- if(canMute) {
- class9.disabledColor = 0xff0000;
- class9.disabledMessage = "Moderator option: Mute player for 48 hours: <ON>";
- } else {
- class9.disabledColor = 0xffffff;
- class9.disabledMessage = "Moderator option: Mute player for 48 hours: <OFF>";
- }
- } else {
- class9.disabledMessage = "";
- }
- if(j == 650 || j == 655)
- if(anInt1193 != 0)
- {
- String s;
- if(daysSinceLastLogin == 0)
- s = "earlier today";
- else
- if(daysSinceLastLogin == 1)
- s = "yesterday";
- else
- s = daysSinceLastLogin + " days ago";
- class9.disabledMessage = "You last logged in " + s + " from: " + SignLink.dns;
- } else
- {
- class9.disabledMessage = "";
- }
- if(j == 651)
- {
- if(unreadMessages == 0)
- {
- class9.disabledMessage = "0 unread messages";
- class9.disabledColor = 0xffff00;
- }
- if(unreadMessages == 1)
- {
- class9.disabledMessage = "1 unread disabledMessage";
- class9.disabledColor = 65280;
- }
- if(unreadMessages > 1)
- {
- class9.disabledMessage = unreadMessages + " unread messages";
- class9.disabledColor = 65280;
- }
- }
- if(j == 652)
- if(daysSinceRecovChange == 201)
- {
- if(membersInt == 1)
- class9.disabledMessage = "@yel@This is a non-members world: @whi@Since you are a member we";
- else
- class9.disabledMessage = "";
- } else
- if(daysSinceRecovChange == 200)
- {
- class9.disabledMessage = "You have not yet set any password recovery questions.";
- } else
- {
- String s1;
- if(daysSinceRecovChange == 0)
- s1 = "Earlier today";
- else
- if(daysSinceRecovChange == 1)
- s1 = "Yesterday";
- else
- s1 = daysSinceRecovChange + " days ago";
- class9.disabledMessage = s1 + " you changed your recovery questions";
- }
- if(j == 653)
- if(daysSinceRecovChange == 201)
- {
- if(membersInt == 1)
- class9.disabledMessage = "@whi@recommend you use a members world instead. You may use";
- else
- class9.disabledMessage = "";
- } else
- if(daysSinceRecovChange == 200)
- class9.disabledMessage = "We strongly recommend you do so now to secure your account.";
- else
- class9.disabledMessage = "If you do not remember making this change then cancel it immediately";
- if(j == 654)
- {
- if(daysSinceRecovChange == 201)
- if(membersInt == 1)
- {
- class9.disabledMessage = "@whi@this world but member benefits are unavailable whilst here.";
- return;
- } else
- {
- class9.disabledMessage = "";
- return;
- }
- if(daysSinceRecovChange == 200)
- {
- class9.disabledMessage = "Do this from the 'account management' area on our front webpage";
- return;
- }
- class9.disabledMessage = "Do this from the 'account management' area on our front webpage";
- }
- }
- public void tabReply() {
- String name = null;
- for(int j = 0; j < 100; j++)
- if(chatMessages[j] != null) {
- int chatType = chatTypes[j];
- if(chatType == 3 || chatType == 7) {
- name = chatNames[j];
- break;
- }
- }
- if(name != null && name.startsWith("@cr"))
- name = name.substring(6);
- if(name == null)
- pushMessage("You haven't received any messages to which you can reply.", 0, "");
- try {
- if(name != null) {
- long namel = TextClass.longForName(name.trim());
- int node = -1;
- for(int count = 0; count < friendsCount; count++) {
- if(friendsListAsLongs[count] != namel)
- continue;
- node = count;
- break;
- }
- if(node != -1 && friendsNodeIDs[node] > 0) {
- inputTaken = true;
- inputDialogState = 0;
- messagePromptRaised = true;
- promptInput = "";
- friendsListAction = 3;
- aLong953 = friendsListAsLongs[node];
- inputPromptTitle = "Enter message to send to " + friendsList[node];
- } else {
- pushMessage(capitalize(name)+" is currently offline.", 0, "");
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- private void drawSplitPrivateChat()
- {
- if(splitPrivateChat == 0)
- return;
- RSFont textDrawingArea = regularFont;
- int i = 0;
- if(anInt1104 != 0)
- i = 1;
- for(int j = 0; j < 100; j++)
- if(chatMessages[j] != null)
- {
- int k = chatTypes[j];
- String s = chatNames[j];
- byte byte1 = 0;
- if(s != null && s.startsWith("@cr1@")) {
- s = s.substring(5);
- byte1 = 1;
- }
- if(s != null && s.startsWith("@cr3@")) {//TEST
- s = s.substring(5);
- byte1 = 2;
- }
- if(s != null && s.startsWith("@cr2@")) {
- s = s.substring(5);
- byte1 = 3;
- }
- if(s != null && s.startsWith("@cr0@")) {
- s = s.substring(5);
- byte1 = 4;
- }
- if((k == 3 || k == 7) && (k == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s)))
- {
- int l = 329 - i * 13;
- int k1 = 4;
- textDrawingArea.method385(0, "From", l, k1); //PM
- textDrawingArea.method385(65535, "From", l - 1, k1);
- k1 += textDrawingArea.getTextWidth("From ");
- if(byte1 == 1) {
- modIcons[1].drawSprite(k1, l - 12);
- k1 += 14;
- }
- if(byte1 == 2) {
- modIcons[3].drawSprite(k1, l - 12);
- k1 += 14;
- }
- if(byte1 == 3) {
- modIcons[2].drawSprite(k1, l - 12);
- k1 += 14;
- }
- if(byte1 == 4) {
- modIcons[0].drawSprite(k1, l - 12);
- k1 += 14;
- }
- textDrawingArea.method385(0, s + ": " + chatMessages[j], l, k1);
- textDrawingArea.method385(65535, s + ": " + chatMessages[j], l - 1, k1);
- if(++i >= 5)
- return;
- }
- if(k == 5 && privateChatMode < 2)
- {
- int i1 = 329 - i * 13;
- textDrawingArea.method385(0, chatMessages[j], i1, 4);
- textDrawingArea.method385(65535, chatMessages[j], i1 - 1, 4);
- if(++i >= 5)
- return;
- }
- if(k == 6 && privateChatMode < 2)
- {
- int j1 = 329 - i * 13;
- textDrawingArea.method385(0, "To " + s + ": " + chatMessages[j], j1, 4);
- textDrawingArea.method385(65535, "To " + s + ": " + chatMessages[j], j1 - 1, 4);
- if(++i >= 5)
- return;
- }
- }
- }
- public void pushMessage(String s, int i, String s1) {
- if(s.startsWith(":cmd:")) {
- sendDeveloperConsole(s.substring(5));
- return;
- }
- if(s.startsWith(":xpcount:")) {
- myPlayer.xpCount = Integer.parseInt(s.substring(9));
- return;
- }
- if(s.startsWith(":yell:")) {
- i = 12;
- s = s.substring(6);
- s1 = s.substring(s.indexOf("<col=1783434>")+13, s.lastIndexOf("</col>"));
- }
- if(i == 0 && dialogID != -1) {
- chatBoxMessage = s;
- super.clickMode3 = 0;
- }
- if(backDialogID == -1)
- inputTaken = true;
- for(int j = 499; j > 0; j--) {
- chatTypes[j] = chatTypes[j - 1];
- chatNames[j] = chatNames[j - 1];
- chatMessages[j] = chatMessages[j - 1];
- chatRights[j] = chatRights[j - 1];
- clanNames[j] = clanNames[j - 1];
- }
- chatTypes[0] = i;
- chatNames[0] = s1;
- chatMessages[0] = s;
- chatRights[0] = rights;
- clanNames[0] = clanname;
- }
- public static void setTab(int id) {
- needDrawTabArea = true;
- tabID = id;
- tabAreaAltered = true;
- }
- public int tabHPos;
- private void processTabClick() {
- if(!fullScreenOn) {
- if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 95 && super.mouseY < 128){
- runHover = true;
- } else {
- runHover = false;
- }
- if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 52 && super.mouseY < 87){
- prayHover = true;
- } else {
- prayHover = false;
- }
- if(super.mouseX >= 765-24 && super.mouseX <= 765 && super.mouseY >= 3 && super.mouseY <= 25){
- logHover = true;
- } else {
- logHover = false;
- }
- }
- if(!fullScreenOn == false){
- if(super.clickMode3 == 1) {
- if(super.saveClickX >= 524 && super.saveClickX <= 561 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[0] != -1)
- {
- needDrawTabArea = true;
- tabID = 0;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 562 && super.saveClickX <= 594 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[1] != -1)
- {
- needDrawTabArea = true;
- tabID = 1;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 595 && super.saveClickX <= 626 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[2] != -1)
- {
- needDrawTabArea = true;
- tabID = 2;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 627 && super.saveClickX <= 660 && super.saveClickY >= 168 && super.saveClickY < 203 && tabInterfaceIDs[3] != -1)
- {
- needDrawTabArea = true;
- tabID = 3;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 661 && super.saveClickX <= 693 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[4] != -1)
- {
- needDrawTabArea = true;
- tabID = 4;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 694 && super.saveClickX <= 725 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[5] != -1)
- {
- needDrawTabArea = true;
- tabID = 5;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 726 && super.saveClickX <= 765 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[6] != -1)
- {
- needDrawTabArea = true;
- tabID = 6;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 524 && super.saveClickX <= 561 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[7] != -1)
- {
- needDrawTabArea = true;
- tabID = 7;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 562 && super.saveClickX <= 594 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[8] != -1)
- {
- needDrawTabArea = true;
- tabID = 8;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 595 && super.saveClickX <= 627 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[9] != -1)
- {
- needDrawTabArea = true;
- tabID = 9;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 627 && super.saveClickX <= 664 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[10] != -1)
- {
- needDrawTabArea = true;
- tabID = 10;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 661 && super.saveClickX <= 694 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[11] != -1)
- {
- needDrawTabArea = true;
- tabID = 11;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 695 && super.saveClickX <= 725 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[12] != -1)
- {
- needDrawTabArea = true;
- tabID = 12;
- tabAreaAltered = true;
- }
- if(super.saveClickX >= 726 && super.saveClickX <= 765 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[13] != -1)
- {
- needDrawTabArea = true;
- tabID = 13;
- tabAreaAltered = true;
- }
- }
- } else {
- if(super.mouseX >= 521 && super.mouseX <= 550 && super.mouseY >= 169 && super.mouseY < 205) {
- tabHPos = 0;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 552 && super.mouseX <= 581 && super.mouseY >= 168 && super.mouseY < 205) {
- tabHPos = 1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 582 && super.mouseX <= 611 && super.mouseY >= 168 && super.mouseY < 205) {
- tabHPos = 2;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 612 && super.mouseX <= 641 && super.mouseY >= 168 && super.mouseY < 203) {
- tabHPos = 3;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 642 && super.mouseX <= 671 && super.mouseY >= 168 && super.mouseY < 205) {
- tabHPos = 4;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 672 && super.mouseX <= 701 && super.mouseY >= 168 && super.mouseY < 205) {
- tabHPos = 5;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 702 && super.mouseX <= 731 && super.mouseY >= 169 && super.mouseY < 205) {
- tabHPos = 6;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 732 && super.mouseX <= 761 && super.mouseY >= 169 && super.mouseY < 205) {
- tabHPos = 7;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 522 && super.mouseX <= 551 && super.mouseY >= 466 && super.mouseY < 503) {
- tabHPos = 15;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 552 && super.mouseX <= 581 && super.mouseY >= 466 && super.mouseY < 503) {
- tabHPos = 8;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 582 && super.mouseX <= 611 && super.mouseY >= 466 && super.mouseY < 503) {
- tabHPos = 9;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 612 && super.mouseX <= 641 && super.mouseY >= 466 && super.mouseY < 503) {
- tabHPos = 10;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 642 && super.mouseX <= 671 && super.mouseY >= 466 && super.mouseY < 503) {
- tabHPos = 11;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 672 && super.mouseX <= 701 && super.mouseY >= 466 && super.mouseY < 503) {
- tabHPos = 12;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 702 && super.mouseX <= 731 && super.mouseY >= 466 && super.mouseY < 502) {
- tabHPos = 13;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if(super.mouseX >= 732 && super.mouseX <= 761 && super.mouseY >= 466 && super.mouseY < 502) {
- tabHPos = 14;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else {
- tabHPos = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- if(super.clickMode3 == 1) {
- if(super.saveClickX >= 522 && super.saveClickX <= 551 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[0] != -1) {
- needDrawTabArea = true;
- tabID = 0;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 552 && super.saveClickX <= 581 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[1] != -1) {
- needDrawTabArea = true;
- tabID = 1;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 582 && super.saveClickX <= 611 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[2] != -1) {
- needDrawTabArea = true;
- tabID = 2;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 612 && super.saveClickX <= 641 && super.saveClickY >= 168 && super.saveClickY < 203 && tabInterfaceIDs[14] != -1) {
- needDrawTabArea = true;
- tabID = 14;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 642 && super.saveClickX <= 671 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[3] != -1) {
- needDrawTabArea = true;
- tabID = 3;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 672 && super.saveClickX <= 701 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[4] != -1) {
- needDrawTabArea = true;
- tabID = 4;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 702 && super.saveClickX <= 731 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[5] != -1) {
- needDrawTabArea = true;
- tabID = 5;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 732 && super.saveClickX <= 761 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[6] != -1) {
- needDrawTabArea = true;
- tabID = 6;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 522 && super.saveClickX <= 551 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[16] != -1) {
- needDrawTabArea = true;
- tabID = 16;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 552 && super.saveClickX <= 581 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[8] != -1) {
- needDrawTabArea = true;
- tabID = 8;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 582 && super.saveClickX <= 611 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[9] != -1) {
- needDrawTabArea = true;
- tabID = 9;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 612 && super.saveClickX <= 641 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[7] != -1) {
- needDrawTabArea = true;
- tabID = 7;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 642 && super.saveClickX <= 671 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[11] != -1) {
- needDrawTabArea = true;
- tabID = 11;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 672 && super.saveClickX <= 701 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[12] != -1) {
- needDrawTabArea = true;
- tabID = 12;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 702 && super.saveClickX <= 731 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[13] != -1) {
- needDrawTabArea = true;
- tabID = 13;
- tabAreaAltered = true;
- } else if(super.saveClickX >= 732 && super.saveClickX <= 761 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[15] != -1) {
- needDrawTabArea = true;
- tabID = 15;
- tabAreaAltered = true;
- }
- /* Logout X */
- else if(super.saveClickX >= 742 && super.saveClickX <= 764 && super.saveClickY >= 1 && super.saveClickY < 24 && tabInterfaceIDs[10] != -1) {
- needDrawTabArea = true;
- tabID = 10;
- tabAreaAltered = true;
- }
- }
- }
- }
- private void resetImageProducers2() {
- if(chatArea != null)
- return;
- nullLoader();
- super.fullGameScreen = null;
- aRSImageProducer_1107 = null;
- aRSImageProducer_1108 = null;
- loginScreenArea = null;
- leftSideFlame = null;
- rightSideFlame = null;
- gameLogo = null;
- aRSImageProducer_1113 = null;
- aRSImageProducer_1114 = null;
- aRSImageProducer_1115 = null;
- chatArea = new RSImageProducer(516, 165, getGameComponent());
- miniMapArea = new RSImageProducer(249, 168, getGameComponent());
- DrawingArea.clear();
- CustomMapback[getSpriteID()].drawSprite(0, 0);
- tabArea = new RSImageProducer(250, 335, getGameComponent());
- mainGameArea = new RSImageProducer(512, 334, getGameComponent());
- DrawingArea.clear();
- welcomeScreenRaised = true;
- }
- public String getDocumentBaseHost() {
- if(SignLink.mainapp != null) {
- return SignLink.mainapp.getDocumentBase().getHost().toLowerCase();
- }
- return null;
- }
- private void method81(Sprite sprite, int j, int k) {
- int l = k * k + j * j;
- if(l > 4225 && l < 0x15f90) {
- int i1 = minimapInt1 + minimapInt2 & 0x7ff;
- int j1 = Model.modelIntArray1[i1];
- int k1 = Model.modelIntArray2[i1];
- j1 = (j1 * 256) / (minimapInt3 + 256);
- k1 = (k1 * 256) / (minimapInt3 + 256);
- int l1 = j * j1 + k * k1 >> 16;
- int i2 = j * k1 - k * j1 >> 16;
- double d = Math.atan2(l1, i2);
- int j2 = (int)(Math.sin(d) * 63D);
- int k2 = (int)(Math.cos(d) * 57D);
- mapEdge.method353(83 - k2 - 20, d, (94 + j2 + 4) - 10);
- CustomMapback[getSpriteID()].drawSprite(0, 0);
- return;
- } else {
- markMinimap(sprite, k, j, false);
- CustomMapback[getSpriteID()].drawSprite(0, 0);
- }
- }
- public void processRightClick() {
- if(activeInterfaceType != 0) {
- return;
- }
- menuActionName[0] = "Cancel";
- menuActionID[0] = 1107;
- menuActionRow = 1;
- if(fullscreenInterfaceID != -1) {
- anInt886 = 0;
- anInt1315 = 0;
- buildInterfaceMenu(8, RSInterface.interfaceCache[fullscreenInterfaceID], super.mouseX, 8, super.mouseY, 0);
- if(anInt886 != anInt1026) {
- anInt1026 = anInt886;
- }
- if(anInt1315 != anInt1129) {
- anInt1129 = anInt1315;
- }
- return;
- }
- buildSplitPrivateChatMenu();
- anInt886 = 0;
- anInt1315 = 0;
- if (super.mouseX > 0 && super.mouseY > 0 && super.mouseX < 516
- && super.mouseY < 338) {
- if(openInterfaceID != -1) {
- buildInterfaceMenu(4, RSInterface.interfaceCache[openInterfaceID], super.mouseX, 4, super.mouseY, 0);
- } else {
- build3dScreenMenu();
- }
- }
- if(anInt886 != anInt1026) {
- anInt1026 = anInt886;
- }
- if(anInt1315 != anInt1129) {
- anInt1129 = anInt1315;
- }
- anInt886 = 0;
- anInt1315 = 0;
- if (super.mouseX > 548 && super.mouseY > 207 && super.mouseX < 740 && super.mouseY < 468) {
- if(invOverlayInterfaceID != -1) {
- buildInterfaceMenu(548, RSInterface.interfaceCache[invOverlayInterfaceID], super.mouseX, 207, super.mouseY, 0);
- } else if(tabInterfaceIDs[tabID] != -1) {
- buildInterfaceMenu(548, RSInterface.interfaceCache[tabInterfaceIDs[tabID]], super.mouseX, 207, super.mouseY, 0);
- }
- }
- if(anInt886 != anInt1048) {
- needDrawTabArea = true;
- tabAreaAltered = true;
- anInt1048 = anInt886;
- }
- if(anInt1315 != anInt1044) {
- needDrawTabArea = true;
- tabAreaAltered = true;
- anInt1044 = anInt1315;
- }
- anInt886 = 0;
- anInt1315 = 0;
- if(super.mouseX > 0 && super.mouseY > 338 && super.mouseX < 490 && super.mouseY < 463) {
- if(backDialogID != -1) {
- buildInterfaceMenu(20, RSInterface.interfaceCache[backDialogID], super.mouseX, 358, super.mouseY, 0);
- } else if(super.mouseY < 463 && super.mouseX < 490) {
- buildChatAreaMenu(super.mouseY - 338);
- }
- }
- if(mouseLeftClickInArea(6, 512, 459, 475))
- writingOnStaffTab = false;
- if(backDialogID != -1 && anInt886 != anInt1039) {
- inputTaken = true;
- anInt1039 = anInt886;
- }
- if(backDialogID != -1 && anInt1315 != anInt1500) {
- inputTaken = true;
- anInt1500 = anInt1315;
- }
- /** Custom menu drawing */
- rightClickChatButtons();
- alertHandler.processMouse(super.mouseX, super.mouseY);
- determineBottomTabs();
- if(!fullScreenOn) {
- processMinimapActions();
- }
- boolean flag = false;
- while(!flag) {
- flag = true;
- for(int j = 0; j < menuActionRow - 1; j++) {
- if(menuActionID[j] < 1000 && menuActionID[j + 1] > 1000) {
- String s = menuActionName[j];
- menuActionName[j] = menuActionName[j + 1];
- menuActionName[j + 1] = s;
- int k = menuActionID[j];
- menuActionID[j] = menuActionID[j + 1];
- menuActionID[j + 1] = k;
- k = menuActionCmd2[j];
- menuActionCmd2[j] = menuActionCmd2[j + 1];
- menuActionCmd2[j + 1] = k;
- k = menuActionCmd3[j];
- menuActionCmd3[j] = menuActionCmd3[j + 1];
- menuActionCmd3[j + 1] = k;
- k = menuActionCmd1[j];
- menuActionCmd1[j] = menuActionCmd1[j + 1];
- menuActionCmd1[j + 1] = k;
- flag = false;
- }
- }
- }
- }
- /*private int method83(int i, int j, int k)
- {
- int l = 256 - k;
- return ((i & 0xff00ff) * l + (j & 0xff00ff) * k & 0xff00ff00) + ((i & 0xff00) * l + (j & 0xff00) * k & 0xff0000) >> 8;
- }*/
- private void login(String s, String s1, boolean flag)
- {
- if(s.length() == 0 || s1.length() == 0) {
- loginMessage1 = "You must input";
- loginMessage2 = "your username and password.";
- return;
- }
- SignLink.errorname = s;
- try
- {
- if(!flag)
- {
- //loginMessage1 = "";
- //loginMessage2 = "Connecting to server...";
- drawLoginScreen(true);
- }
- socketStream = new RSSocket(this, openSocket(43594));
- long l = TextClass.longForName(s);
- int i = (int)(l >> 16 & 31L);
- stream.currentOffset = 0;
- stream.writeWordBigEndian(14);
- stream.writeWordBigEndian(i);
- socketStream.queueBytes(2, stream.buffer);
- for(int j = 0; j < 8; j++)
- socketStream.read();
- int k = socketStream.read();
- int i1 = k;
- if(k == 0)
- {
- socketStream.flushInputStream(inStream.buffer, 8);
- inStream.currentOffset = 0;
- aLong1215 = inStream.readQWord();
- int ai[] = new int[4];
- ai[0] = (int)(Math.random() * 99999999D);
- ai[1] = (int)(Math.random() * 99999999D);
- ai[2] = (int)(aLong1215 >> 32);
- ai[3] = (int)aLong1215;
- stream.currentOffset = 0;
- stream.writeWordBigEndian(10);
- stream.writeDWord(ai[0]);
- stream.writeDWord(ai[1]);
- stream.writeDWord(ai[2]);
- stream.writeDWord(ai[3]);
- stream.writeDWord(123456);
- stream.writeString(s);
- stream.writeString(s1);
- stream.doKeys();
- aStream_847.currentOffset = 0;
- if(flag)
- aStream_847.writeWordBigEndian(18);
- else
- aStream_847.writeWordBigEndian(16);
- aStream_847.writeWordBigEndian(stream.currentOffset + 36 + 1 + 1 + 2);
- aStream_847.writeWordBigEndian(255);
- aStream_847.writeWord(317);
- aStream_847.writeWordBigEndian(lowMem ? 1 : 0);
- for(int l1 = 0; l1 < 9; l1++)
- aStream_847.writeDWord(expectedCRCs[l1]);
- aStream_847.writeBytes(stream.buffer, stream.currentOffset, 0);
- stream.encryption = new ISAACRandomGen(ai);
- for(int j2 = 0; j2 < 4; j2++)
- ai[j2] += 50;
- encryption = new ISAACRandomGen(ai);
- socketStream.queueBytes(aStream_847.currentOffset, aStream_847.buffer);
- k = socketStream.read();
- }
- if(k == 1)
- {
- try
- {
- Thread.sleep(2000L);
- }
- catch(Exception _ex) { }
- login(s, s1, flag);
- return;
- }
- if(k == 2)
- {
- myPrivilege = socketStream.read();
- flagged = socketStream.read() == 1;
- aLong1220 = 0L;
- anInt1022 = 0;
- mouseDetection.coordsIndex = 0;
- super.awtFocus = true;
- aBoolean954 = true;
- loggedIn = true;
- stream.currentOffset = 0;
- inStream.currentOffset = 0;
- pktType = -1;
- anInt841 = -1;
- anInt842 = -1;
- anInt843 = -1;
- pktSize = 0;
- anInt1009 = 0;
- anInt1104 = 0;
- anInt1011 = 0;
- anInt855 = 0;
- menuActionRow = 0;
- menuOpen = false;
- super.idleTime = 0;
- for(int j1 = 0; j1 < 100; j1++)
- chatMessages[j1] = null;
- itemSelected = 0;
- spellSelected = 0;
- loadingStage = 0;
- anInt1062 = 0;
- anInt1278 = (int)(Math.random() * 100D) - 50;
- anInt1131 = (int)(Math.random() * 110D) - 55;
- anInt896 = (int)(Math.random() * 80D) - 40;
- minimapInt2 = (int)(Math.random() * 120D) - 60;
- minimapInt3 = (int)(Math.random() * 30D) - 20;
- minimapInt1 = (int)(Math.random() * 20D) - 10 & 0x7ff;
- miniMapOverlay = 0;
- anInt985 = -1;
- destX = 0;
- destY = 0;
- playerCount = 0;
- npcCount = 0;
- for(int i2 = 0; i2 < maxPlayers; i2++)
- {
- playerArray[i2] = null;
- aStreamArray895s[i2] = null;
- }
- for(int k2 = 0; k2 < 16384; k2++)
- npcArray[k2] = null;
- myPlayer = playerArray[myPlayerIndex] = new Player();
- aClass19_1013.removeAll();
- aClass19_1056.removeAll();
- for(int l2 = 0; l2 < 4; l2++)
- {
- for(int i3 = 0; i3 < 104; i3++)
- {
- for(int k3 = 0; k3 < 104; k3++)
- groundArray[l2][i3][k3] = null;
- }
- }
- aClass19_1179 = new NodeList();
- fullscreenInterfaceID = -1;
- anInt900 = 0;
- friendsCount = 0;
- dialogID = -1;
- backDialogID = -1;
- openInterfaceID = -1;
- invOverlayInterfaceID = -1;
- anInt1018 = -1;
- aBoolean1149 = false;
- tabID = 3;
- inputDialogState = 0;
- menuOpen = false;
- messagePromptRaised = false;
- chatBoxMessage = null;
- anInt1055 = 0;
- anInt1054 = -1;
- charEditGender = true;
- charEditChangeGender();
- welcome();
- for(int j3 = 0; j3 < 5; j3++)
- charEditColors[j3] = 0;
- for(int l3 = 0; l3 < 5; l3++)
- {
- atPlayerActions[l3] = null;
- atPlayerArray[l3] = false;
- }
- anInt1175 = 0;
- anInt1134 = 0;
- anInt986 = 0;
- anInt1288 = 0;
- anInt924 = 0;
- anInt1188 = 0;
- anInt1155 = 0;
- anInt1226 = 0;
- resetImageProducers2();
- writeLoginData();
- return;
- }
- if(k == 3)
- {
- loginMessage1 = "";
- loginMessage2 = "Invalid username or password.";
- return;
- }
- if(k == 4)
- {
- loginMessage1 = "Your account is currently banned.";
- loginMessage2 = "You may appeal on forums.";
- return;
- }
- if(k == 5)
- {
- loginMessage1 = "Your account is already logged in.";
- loginMessage2 = "Try again in 60 secs...";
- return;
- }
- if(k == 6)
- {
- loginMessage1 = "Firyze has been updated!";
- loginMessage2 = "Please reload this page.";
- return;
- }
- if(k == 7)
- {
- loginMessage1 = "This world is full.";
- loginMessage2 = "Please use a different world.";
- return;
- }
- if(k == 8)
- {
- loginMessage1 = "Unable to connect.";
- loginMessage2 = "Login server offline.";
- return;
- }
- if(k == 9)
- {
- loginMessage1 = "Login limit exceeded.";
- loginMessage2 = "Too many connections from your address.";
- return;
- }
- if(k == 10)
- {
- loginMessage1 = "Unable to connect.";
- loginMessage2 = "Bad session id.";
- return;
- }
- if(k == 11)
- {
- loginMessage2 = "Login server rejected session.";
- loginMessage2 = "Please try again.";
- return;
- }
- if(k == 12)
- {
- loginMessage1 = "You need a members account to login to this world.";
- loginMessage2 = "Please subscribe, or use a different world.";
- return;
- }
- if(k == 13)
- {
- loginMessage1 = "Could not complete login.";
- loginMessage2 = "Please try using a different world.";
- return;
- }
- if(k == 14)
- {
- loginMessage1 = "The server is being updated.";
- loginMessage2 = "Please wait 1 minute and try again.";
- return;
- }
- if(k == 15)
- {
- loggedIn = true;
- stream.currentOffset = 0;
- inStream.currentOffset = 0;
- pktType = -1;
- anInt841 = -1;
- anInt842 = -1;
- anInt843 = -1;
- pktSize = 0;
- anInt1009 = 0;
- anInt1104 = 0;
- menuActionRow = 0;
- menuOpen = false;
- aLong824 = System.currentTimeMillis();
- return;
- }
- if(k == 16)
- {
- loginMessage1 = "Login attempts exceeded.";
- loginMessage2 = "Please wait 1 minute and try again.";
- return;
- }
- if(k == 17)
- {
- loginMessage1 = "You are standing in a members-only area.";
- loginMessage2 = "To play on this world move to a free area first";
- return;
- }
- if(k == 20)
- {
- loginMessage1 = "Invalid loginserver requested";
- loginMessage2 = "Please try using a different world.";
- return;
- }
- if(k == 21)
- {
- for(int k1 = socketStream.read(); k1 >= 0; k1--)
- {
- loginMessage1 = "You have only just left another world";
- loginMessage2 = "Your profile will be transferred in: " + k1 + " seconds";
- drawLoginScreen(true);
- try
- {
- Thread.sleep(1000L);
- }
- catch(Exception _ex) { }
- }
- login(s, s1, flag);
- return;
- }
- if(k == -1)
- {
- if(i1 == 0)
- {
- if(loginFailures < 2)
- {
- try
- {
- Thread.sleep(2000L);
- }
- catch(Exception _ex) { }
- loginFailures++;
- login(s, s1, flag);
- return;
- } else
- {
- loginMessage1 = "You must download the latest";
- loginMessage2 = "client at google.com";
- return;
- }
- } else
- {
- loginMessage1 = "No response from server.";
- loginMessage2 = "Wait or reload the client.";
- return;
- }
- } else
- {
- System.out.println("response:" + k);
- loginMessage1 = "Unexpected server response";
- loginMessage2 = "Please try using a different world.";
- return;
- }
- } catch (Exception e) {
- e.printStackTrace();
- loginMessage1 = "";
- }
- loginMessage2 = "Error connecting to server.";
- }
- private boolean doWalkTo(int i, int j, int k, int i1, int j1, int k1, int l1, int i2, int j2, boolean flag, int k2) {
- byte byte0 = 104;
- byte byte1 = 104;
- for(int l2 = 0; l2 < byte0; l2++) {
- for(int i3 = 0; i3 < byte1; i3++) {
- anIntArrayArray901[l2][i3] = 0;
- anIntArrayArray825[l2][i3] = 0x5f5e0ff;
- }
- }
- int j3 = j2;
- int k3 = j1;
- anIntArrayArray901[j2][j1] = 99;
- anIntArrayArray825[j2][j1] = 0;
- int l3 = 0;
- int i4 = 0;
- bigX[l3] = j2;
- bigY[l3++] = j1;
- boolean flag1 = false;
- int j4 = bigX.length;
- int ai[][] = aClass11Array1230[plane].anIntArrayArray294;
- while(i4 != l3)
- {
- j3 = bigX[i4];
- k3 = bigY[i4];
- i4 = (i4 + 1) % j4;
- if(j3 == k2 && k3 == i2)
- {
- flag1 = true;
- break;
- }
- if(i1 != 0)
- {
- if((i1 < 5 || i1 == 10) && aClass11Array1230[plane].method219(k2, j3, k3, j, i1 - 1, i2))
- {
- flag1 = true;
- break;
- }
- if(i1 < 10 && aClass11Array1230[plane].method220(k2, i2, k3, i1 - 1, j, j3))
- {
- flag1 = true;
- break;
- }
- }
- if(k1 != 0 && k != 0 && aClass11Array1230[plane].method221(i2, k2, j3, k, l1, k1, k3))
- {
- flag1 = true;
- break;
- }
- int l4 = anIntArrayArray825[j3][k3] + 1;
- if(j3 > 0 && anIntArrayArray901[j3 - 1][k3] == 0 && (ai[j3 - 1][k3] & 0x1280108) == 0)
- {
- bigX[l3] = j3 - 1;
- bigY[l3] = k3;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3 - 1][k3] = 2;
- anIntArrayArray825[j3 - 1][k3] = l4;
- }
- if(j3 < byte0 - 1 && anIntArrayArray901[j3 + 1][k3] == 0 && (ai[j3 + 1][k3] & 0x1280180) == 0)
- {
- bigX[l3] = j3 + 1;
- bigY[l3] = k3;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3 + 1][k3] = 8;
- anIntArrayArray825[j3 + 1][k3] = l4;
- }
- if(k3 > 0 && anIntArrayArray901[j3][k3 - 1] == 0 && (ai[j3][k3 - 1] & 0x1280102) == 0)
- {
- bigX[l3] = j3;
- bigY[l3] = k3 - 1;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3][k3 - 1] = 1;
- anIntArrayArray825[j3][k3 - 1] = l4;
- }
- if(k3 < byte1 - 1 && anIntArrayArray901[j3][k3 + 1] == 0 && (ai[j3][k3 + 1] & 0x1280120) == 0)
- {
- bigX[l3] = j3;
- bigY[l3] = k3 + 1;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3][k3 + 1] = 4;
- anIntArrayArray825[j3][k3 + 1] = l4;
- }
- if(j3 > 0 && k3 > 0 && anIntArrayArray901[j3 - 1][k3 - 1] == 0 && (ai[j3 - 1][k3 - 1] & 0x128010e) == 0 && (ai[j3 - 1][k3] & 0x1280108) == 0 && (ai[j3][k3 - 1] & 0x1280102) == 0)
- {
- bigX[l3] = j3 - 1;
- bigY[l3] = k3 - 1;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3 - 1][k3 - 1] = 3;
- anIntArrayArray825[j3 - 1][k3 - 1] = l4;
- }
- if(j3 < byte0 - 1 && k3 > 0 && anIntArrayArray901[j3 + 1][k3 - 1] == 0 && (ai[j3 + 1][k3 - 1] & 0x1280183) == 0 && (ai[j3 + 1][k3] & 0x1280180) == 0 && (ai[j3][k3 - 1] & 0x1280102) == 0)
- {
- bigX[l3] = j3 + 1;
- bigY[l3] = k3 - 1;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3 + 1][k3 - 1] = 9;
- anIntArrayArray825[j3 + 1][k3 - 1] = l4;
- }
- if(j3 > 0 && k3 < byte1 - 1 && anIntArrayArray901[j3 - 1][k3 + 1] == 0 && (ai[j3 - 1][k3 + 1] & 0x1280138) == 0 && (ai[j3 - 1][k3] & 0x1280108) == 0 && (ai[j3][k3 + 1] & 0x1280120) == 0)
- {
- bigX[l3] = j3 - 1;
- bigY[l3] = k3 + 1;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3 - 1][k3 + 1] = 6;
- anIntArrayArray825[j3 - 1][k3 + 1] = l4;
- }
- if(j3 < byte0 - 1 && k3 < byte1 - 1 && anIntArrayArray901[j3 + 1][k3 + 1] == 0 && (ai[j3 + 1][k3 + 1] & 0x12801e0) == 0 && (ai[j3 + 1][k3] & 0x1280180) == 0 && (ai[j3][k3 + 1] & 0x1280120) == 0)
- {
- bigX[l3] = j3 + 1;
- bigY[l3] = k3 + 1;
- l3 = (l3 + 1) % j4;
- anIntArrayArray901[j3 + 1][k3 + 1] = 12;
- anIntArrayArray825[j3 + 1][k3 + 1] = l4;
- }
- }
- anInt1264 = 0;
- if(!flag1)
- {
- if(flag)
- {
- int i5 = 100;
- for(int k5 = 1; k5 < 2; k5++)
- {
- for(int i6 = k2 - k5; i6 <= k2 + k5; i6++)
- {
- for(int l6 = i2 - k5; l6 <= i2 + k5; l6++)
- if(i6 >= 0 && l6 >= 0 && i6 < 104 && l6 < 104 && anIntArrayArray825[i6][l6] < i5)
- {
- i5 = anIntArrayArray825[i6][l6];
- j3 = i6;
- k3 = l6;
- anInt1264 = 1;
- flag1 = true;
- }
- }
- if(flag1)
- break;
- }
- }
- if(!flag1)
- return false;
- }
- i4 = 0;
- bigX[i4] = j3;
- bigY[i4++] = k3;
- int l5;
- for(int j5 = l5 = anIntArrayArray901[j3][k3]; j3 != j2 || k3 != j1; j5 = anIntArrayArray901[j3][k3])
- {
- if(j5 != l5)
- {
- l5 = j5;
- bigX[i4] = j3;
- bigY[i4++] = k3;
- }
- if((j5 & 2) != 0)
- j3++;
- else
- if((j5 & 8) != 0)
- j3--;
- if((j5 & 1) != 0)
- k3++;
- else
- if((j5 & 4) != 0)
- k3--;
- }
- // if(cancelWalk) { return i4 > 0; }
- if(i4 > 0)
- {
- int k4 = i4;
- if(k4 > 25)
- k4 = 25;
- i4--;
- int k6 = bigX[i4];
- int i7 = bigY[i4];
- anInt1288 += k4;
- if(anInt1288 >= 92)
- {
- stream.createFrame(36);
- stream.writeDWord(0);
- anInt1288 = 0;
- }
- if(i == 0) //on screen walking
- {
- stream.createFrame(164);
- stream.writeWordBigEndian(k4 + k4 + 3);
- restOrb = false;
- }
- if(i == 1) //minimap walking
- {
- stream.createFrame(248);
- stream.writeWordBigEndian(k4 + k4 + 3 + 14);
- restOrb = false;
- }
- if(i == 2)
- {
- stream.createFrame(98);
- stream.writeWordBigEndian(k4 + k4 + 3);
- restOrb = false;
- }
- stream.method433(k6 + baseX);
- destX = bigX[0];
- destY = bigY[0];
- for(int j7 = 1; j7 < k4; j7++)
- {
- i4--;
- stream.writeWordBigEndian(bigX[i4] - k6);
- stream.writeWordBigEndian(bigY[i4] - i7);
- }
- stream.method431(i7 + baseY);
- stream.method424(super.keyArray[5] != 1 ? 0 : 1);
- return true;
- }
- return i != 1;
- }
- private void method86(Stream stream)
- {
- for(int j = 0; j < anInt893; j++)
- {
- int k = anIntArray894[j];
- Npc npc = npcArray[k];
- int l = stream.readUnsignedByte();
- if((l & 0x10) != 0)
- {
- int i1 = stream.method434();
- if(i1 == 65535)
- i1 = -1;
- int i2 = stream.readUnsignedByte();
- if(i1 == npc.anim && i1 != -1)
- {
- int l2 = Animation.anims[i1].anInt365;
- if(l2 == 1)
- {
- npc.anInt1527 = 0;
- npc.anInt1528 = 0;
- npc.anInt1529 = i2;
- npc.anInt1530 = 0;
- }
- if(l2 == 2)
- npc.anInt1530 = 0;
- } else
- if(i1 == -1 || npc.anim == -1 || Animation.anims[i1].anInt359 >= Animation.anims[npc.anim].anInt359)
- {
- npc.anim = i1;
- npc.anInt1527 = 0;
- npc.anInt1528 = 0;
- npc.anInt1529 = i2;
- npc.anInt1530 = 0;
- npc.anInt1542 = npc.smallXYIndex;
- }
- }
- if((l & 8) != 0) {
- int j1 = stream.method426();
- int j2 = stream.method427();
- int type1 = stream.readUnsignedByte();
- npc.updateHitData(j2, j1, type1, loopCycle);
- npc.loopCycleStatus = loopCycle + 300;
- npc.currentHealth = stream.method426();
- npc.maxHealth = stream.readUnsignedByte();
- }
- if((l & 0x80) != 0) {
- npc.anInt1520 = stream.readUnsignedWord();
- int k1 = stream.readDWord();
- npc.anInt1524 = k1 >> 16;
- npc.anInt1523 = loopCycle + (k1 & 0xffff);
- npc.anInt1521 = 0;
- npc.anInt1522 = 0;
- if(npc.anInt1523 > loopCycle)
- npc.anInt1521 = -1;
- if(npc.anInt1520 == 65535)
- npc.anInt1520 = -1;
- }
- if((l & 0x20) != 0) {
- npc.interactingEntity = stream.readUnsignedWord();
- if(npc.interactingEntity == 65535)
- npc.interactingEntity = -1;
- }
- if((l & 1) != 0) {
- npc.textSpoken = stream.readString();
- npc.textCycle = 100;
- }
- if((l & 0x40) != 0) {
- int l1 = stream.method427();
- int k2 = stream.method428();
- int type2 = stream.readUnsignedByte();
- npc.updateHitData(k2, l1, type2, loopCycle);
- npc.loopCycleStatus = loopCycle + 300;
- npc.currentHealth = stream.method428();
- npc.maxHealth = stream.method427();
- }
- if((l & 2) != 0) {
- npc.desc = NpcDef.forID(stream.method436());
- npc.anInt1540 = npc.desc.aByte68;
- npc.anInt1504 = npc.desc.getDegreesToTurn;
- npc.anInt1554 = npc.desc.walkForwardsAnim;
- npc.anInt1555 = npc.desc.walkBackwardsAnim;
- npc.anInt1556 = npc.desc.walkLeftAnim;
- npc.anInt1557 = npc.desc.walkRightAnim;
- npc.anInt1511 = npc.desc.standAnim;
- }
- if((l & 4) != 0) {
- npc.anInt1538 = stream.method434();
- npc.anInt1539 = stream.method434();
- }
- }
- }
- private void buildAtNPCMenu(NpcDef entityDef, int i, int j, int k)
- {
- if(menuActionRow >= 400)
- return;
- if(entityDef.childrenIDs != null)
- entityDef = entityDef.method161();
- if(entityDef == null)
- return;
- if(!entityDef.canRightClick)
- return;
- String s = entityDef.name;
- if(entityDef.combatLevel != 0)
- s = s + combatDiffColor(myPlayer.combatLevel, entityDef.combatLevel) + " (level: " + entityDef.combatLevel + ")";
- if(itemSelected == 1)
- {
- menuActionName[menuActionRow] = "Use " + selectedItemName + " -> @yel@" + s;
- menuActionID[menuActionRow] = 582;
- menuActionCmd1[menuActionRow] = i;
- menuActionCmd2[menuActionRow] = k;
- menuActionCmd3[menuActionRow] = j;
- menuActionRow++;
- return;
- }
- if(spellSelected == 1)
- {
- if((spellUsableOn & 2) == 2)
- {
- menuActionName[menuActionRow] = spellTooltip + " @yel@" + s;
- menuActionID[menuActionRow] = 413;
- menuActionCmd1[menuActionRow] = i;
- menuActionCmd2[menuActionRow] = k;
- menuActionCmd3[menuActionRow] = j;
- menuActionRow++;
- }
- } else
- {
- if(entityDef.actions != null)
- {
- for(int l = 4; l >= 0; l--)
- if(entityDef.actions[l] != null && !entityDef.actions[l].equalsIgnoreCase("attack"))
- {
- menuActionName[menuActionRow] = entityDef.actions[l] + " @yel@" + s;
- if(l == 0)
- menuActionID[menuActionRow] = 20;
- if(l == 1)
- menuActionID[menuActionRow] = 412;
- if(l == 2)
- menuActionID[menuActionRow] = 225;
- if(l == 3)
- menuActionID[menuActionRow] = 965;
- if(l == 4)
- menuActionID[menuActionRow] = 478;
- menuActionCmd1[menuActionRow] = i;
- menuActionCmd2[menuActionRow] = k;
- menuActionCmd3[menuActionRow] = j;
- menuActionRow++;
- }
- }
- if(entityDef.actions != null)
- {
- for(int i1 = 4; i1 >= 0; i1--)
- if(entityDef.actions[i1] != null && entityDef.actions[i1].equalsIgnoreCase("attack"))
- {
- char c = '\0';
- if(entityDef.combatLevel > myPlayer.combatLevel)
- c = '\u07D0';
- menuActionName[menuActionRow] = entityDef.actions[i1] + " @yel@" + s;
- if(i1 == 0)
- menuActionID[menuActionRow] = 20 + c;
- if(i1 == 1)
- menuActionID[menuActionRow] = 412 + c;
- if(i1 == 2)
- menuActionID[menuActionRow] = 225 + c;
- if(i1 == 3)
- menuActionID[menuActionRow] = 965 + c;
- if(i1 == 4)
- menuActionID[menuActionRow] = 478 + c;
- menuActionCmd1[menuActionRow] = i;
- menuActionCmd2[menuActionRow] = k;
- menuActionCmd3[menuActionRow] = j;
- menuActionRow++;
- }
- }
- if(idToggle) {
- menuActionName[menuActionRow] = "Examine @yel@" + s + " @gre@(@whi@" + entityDef.id + "@gre@)";
- } else {
- menuActionName[menuActionRow] = "Examine @yel@" + s;
- }
- menuActionID[menuActionRow] = 1025;
- menuActionCmd1[menuActionRow] = i;
- menuActionCmd2[menuActionRow] = k;
- menuActionCmd3[menuActionRow] = j;
- menuActionRow++;
- }
- }
- private void buildAtPlayerMenu(int i, int j, Player player, int k)
- {
- if(player == myPlayer)
- return;
- if(menuActionRow >= 400)
- return;
- String s;
- if(player.title.length() == 0)
- s = player.name + combatDiffColor(myPlayer.combatLevel, player.combatLevel)
- + " (level: " + player.combatLevel + ")";
- else if(player.title.length() != 0)
- s = "@" + titleColor(player.titleColor, 1) + "@" + player.title + "@whi@"
- + player.name + combatDiffColor(myPlayer.combatLevel, player.combatLevel)
- + " (level: " + player.combatLevel + ")";
- else
- s = player.name + " (skill: " + player.skill + ")";
- if(itemSelected == 1)
- {
- menuActionName[menuActionRow] = "Use " + selectedItemName + " -> @whi@" + s;
- menuActionID[menuActionRow] = 491;
- menuActionCmd1[menuActionRow] = j;
- menuActionCmd2[menuActionRow] = i;
- menuActionCmd3[menuActionRow] = k;
- menuActionRow++;
- } else
- if(spellSelected == 1)
- {
- if((spellUsableOn & 8) == 8)
- {
- menuActionName[menuActionRow] = spellTooltip + " @whi@" + s;
- menuActionID[menuActionRow] = 365;
- menuActionCmd1[menuActionRow] = j;
- menuActionCmd2[menuActionRow] = i;
- menuActionCmd3[menuActionRow] = k;
- menuActionRow++;
- }
- } else
- {
- for(int l = 4; l >= 0; l--)
- if(atPlayerActions[l] != null)
- {
- menuActionName[menuActionRow] = atPlayerActions[l] + " @whi@" + s;
- char c = '\0';
- if(atPlayerActions[l].equals("Trade With"))
- atPlayerActions[l] = "Trade with";
- if(atPlayerActions[l].equalsIgnoreCase("attack"))
- {
- if(player.combatLevel > myPlayer.combatLevel)
- c = '\u07D0';
- if(myPlayer.team != 0 && player.team != 0)
- if(myPlayer.team == player.team)
- c = '\u07D0';
- else
- c = '\0';
- } else
- if(atPlayerArray[l])
- c = '\u07D0';
- if(l == 0)
- menuActionID[menuActionRow] = 561 + c;
- if(l == 1)
- menuActionID[menuActionRow] = 779 + c;
- if(l == 2)
- menuActionID[menuActionRow] = 27 + c;
- if(l == 3)
- menuActionID[menuActionRow] = 577 + c;
- if(l == 4)
- menuActionID[menuActionRow] = 729 + c;
- menuActionCmd1[menuActionRow] = j;
- menuActionCmd2[menuActionRow] = i;
- menuActionCmd3[menuActionRow] = k;
- menuActionRow++;
- }
- }
- for(int i1 = 0; i1 < menuActionRow; i1++)
- if(menuActionID[i1] == 516)
- {
- menuActionName[i1] = "Walk here @whi@" + s;
- return;
- }
- }
- private void method89(Class30_Sub1 class30_sub1)
- {
- int i = 0;
- int j = -1;
- int k = 0;
- int l = 0;
- if(class30_sub1.anInt1296 == 0)
- i = sceneGraph.getWallObjectUID(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
- if(class30_sub1.anInt1296 == 1)
- i = sceneGraph.method301(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
- if(class30_sub1.anInt1296 == 2)
- i = sceneGraph.getInteractableObjectUID(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
- if(class30_sub1.anInt1296 == 3)
- i = sceneGraph.getGroundDecorationUID(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
- if(i != 0)
- {
- int i1 = sceneGraph.getIDTAGForXYZ(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298, i);
- j = i >> 14 & 0x7fff;
- k = i1 & 0x1f;
- l = i1 >> 6;
- }
- class30_sub1.anInt1299 = j;
- class30_sub1.anInt1301 = k;
- class30_sub1.anInt1300 = l;
- }
- private void method90()
- {
- for(int i = 0; i < anInt1062; i++)
- if(anIntArray1250[i] <= 0)
- {
- boolean flag1 = false;
- try
- {
- if(anIntArray1207[i] == anInt874 && anIntArray1241[i] == anInt1289)
- {
- if(!replayWave())
- flag1 = true;
- } else
- {
- Stream stream = Sounds.method241(anIntArray1241[i], anIntArray1207[i]);
- if(System.currentTimeMillis() + (long)(stream.currentOffset / 22) > aLong1172 + (long)(anInt1257 / 22))
- {
- anInt1257 = stream.currentOffset;
- aLong1172 = System.currentTimeMillis();
- if(saveWave(stream.buffer, stream.currentOffset))
- {
- anInt874 = anIntArray1207[i];
- anInt1289 = anIntArray1241[i];
- } else
- {
- flag1 = true;
- }
- }
- }
- }
- catch(Exception exception) { }
- if(!flag1 || anIntArray1250[i] == -5)
- {
- anInt1062--;
- for(int j = i; j < anInt1062; j++)
- {
- anIntArray1207[j] = anIntArray1207[j + 1];
- anIntArray1241[j] = anIntArray1241[j + 1];
- anIntArray1250[j] = anIntArray1250[j + 1];
- }
- i--;
- } else
- {
- anIntArray1250[i] = -5;
- }
- } else
- {
- anIntArray1250[i]--;
- }
- if(prevSong > 0)
- {
- prevSong -= 20;
- if(prevSong < 0)
- prevSong = 0;
- if(prevSong == 0 && musicEnabled && !lowMem)
- {
- nextSong = currentSong;
- songChanging = true;
- onDemandFetcher.method558(2, nextSong);
- }
- }
- }
- void startUp()
- {
- //main();
- //models();
- new CacheDownloader(this).downloadCache();
- //setNewMaps();
- if(SignLink.sunjava)
- super.minDelay = 5;
- //aBoolean993 = true;
- String s = getDocumentBaseHost();
- if(SignLink.cache_dat != null) {
- for(int i = 0; i < 5; i++)
- decompressors[i] = new Decompressor(SignLink.cache_dat, SignLink.cache_idx[i], i + 1);
- }
- //repackCacheIndex(1);
- try {
- //repackCacheIndex(1);
- //maps();
- titleStreamLoader = streamLoaderForName(1, "title screen", "title", expectedCRCs[1], 25);
- smallFont = new RSFont(false, "p11_full", titleStreamLoader);
- regularFont = new RSFont(false, "p12_full", titleStreamLoader);
- boldFont = new RSFont(false, "b12_full", titleStreamLoader);
- fancyFont = new RSFont(true, "q8_full", titleStreamLoader);
- smallText = new TextFont(false, "p11_full", titleStreamLoader);
- regularText = new TextFont(false, "p12_full", titleStreamLoader);
- boldText = new TextFont(false, "b12_full", titleStreamLoader);
- fancyText = new TextFont(true, "q8_full", titleStreamLoader);
- //UserInterface.fonts = newFonts;
- smallText.unpackChatImages(chatImages);
- regularText.unpackChatImages(chatImages);
- boldText.unpackChatImages(chatImages);
- fancyText.unpackChatImages(chatImages);
- //drawLogo();
- loadTitleScreen();
- NamedArchive archive = streamLoaderForName(2, "config", "config", expectedCRCs[2], 30);
- NamedArchive interfaceArchive = streamLoaderForName(3, "interface", "interface", expectedCRCs[3], 35);
- NamedArchive mediaArchive = streamLoaderForName(4, "2d graphics", "media", expectedCRCs[4], 40);
- NamedArchive textureArchive = streamLoaderForName(6, "textures", "textures", expectedCRCs[6], 45);
- NamedArchive streamLoader_4 = streamLoaderForName(7, "chat system", "wordenc", expectedCRCs[7], 50);
- NamedArchive soundArchive = streamLoaderForName(8, "sound effects", "sounds", expectedCRCs[8], 55);
- byteGroundArray = new byte[4][104][104];
- intGroundArray = new int[4][105][105];
- sceneGraph = new WorldController(intGroundArray);
- for(int j = 0; j < 4; j++)
- aClass11Array1230[j] = new Class11();
- minimap = new Sprite(512, 512);
- NamedArchive streamLoader_6 = streamLoaderForName(5, "update list", "versionlist", expectedCRCs[5], 60);
- drawSmoothLoading(10, "Starting up");
- sendDeveloperConsole("This is developer console. To close, press ESC key on your keyboard.");
- onDemandFetcher = new OnDemandFetcher();
- onDemandFetcher.start(streamLoader_6, this);
- Class36.method528(onDemandFetcher.getAnimCount());
- Model.method459(onDemandFetcher.getModelCount(), onDemandFetcher);
- /* All 525 Models */
- drawSmoothLoading(20, "Loading gfx");
- ModelDecompressor.hdgfx();
- /* 525 End */
- ModelDecompressor.loadModelDataFile();
- drawSmoothLoading(30, "Loading models");
- preloadModels();
- drawSmoothLoading(40, "Loading animations");
- DataBase.loadAnimations();
- /* Custom sprite unpacking */
- drawSmoothLoading(50, "Loading images");
- loadExtraSprites();
- cacheSprite = new Sprite[cacheSpriteAmount];
- for(int i = 0; i < cacheSprite.length; i++)
- cacheSprite[i] = new Sprite(Integer.toString(i));
- /* Staff tab */
- StaffToggle = new Sprite("stafftab/SPRITE 0");
- StaffType = new Sprite("stafftab/SPRITE 1");
- StaffSelectBg = new Sprite("stafftab/SPRITE 2");
- StaffSelect = new Sprite("stafftab/SPRITE 3");
- StaffSelectH = new Sprite("stafftab/SPRITE 4");
- StaffSelected = new Sprite("stafftab/SPRITE 5");
- StaffSend = new Sprite("stafftab/SPRITE 6");
- StaffError = new Sprite("stafftab/SPRITE 7");
- for(int i = 0; i < newHitMark.length; i++) {
- newHitMark[i] = new Sprite("Player/Combat/newHitMark "+i);
- }
- compass = new Sprite(mediaArchive, "compass", 0);
- multiOverlay = new Sprite(mediaArchive, "overlay_multiway", 0);
- mapBack = new Background(mediaArchive, "mapback", 0);
- for(int c1 = 0; c1 <= 3; c1++)
- chatButtons[c1] = new Sprite(mediaArchive, "chatbuttons", c1);
- for(int j3 = 0; j3 <= 13; j3++)
- sideIcons[j3] = new Sprite(mediaArchive, "sideicons", j3);
- for(int j3 = 0; j3 <= 13; j3++)
- sIcons483[j3] = new Sprite("Gameframe/SIcons/483/"+j3+"");
- for(int j3 = 0; j3 <= 12; j3++)
- sIcons459[j3] = new Sprite("Gameframe/SIcons/459/SIDEICONS "+j3+"");
- for(int nSI = 0; nSI <= 15; nSI++)
- newSideIcons[nSI] = new Sprite("Gameframe/SIcons/562/icon "+nSI);
- tabHover = new Sprite("Gameframe/SIcons/562/tabhover");
- tabClicked = new Sprite("Gameframe/SIcons/562/tabclicked1");
- for(int i = 0; i <= 2; i++)
- tabSelected[i] = new Sprite("Gameframe/SIcons/562/tabselected " + i);
- for(int r1 = 0; r1 < 15; r1++)
- redStones[r1] = new Sprite("Gameframe/redstones/REDSTONES " + r1);
- mapEdge = new Sprite(mediaArchive, "mapedge", 0);
- mapEdge.method345();
- try
- {
- for(int k3 = 0; k3 < 100; k3++)
- mapScenes[k3] = new Background(mediaArchive, "mapscene", k3);
- }
- catch(Exception _ex) { }
- try
- {
- for(int l3 = 0; l3 < 100; l3++)
- mapFunctions[l3] = new Sprite(mediaArchive, "mapfunction", l3);
- }
- catch(Exception _ex) { }
- try
- {
- for(int i4 = 0; i4 < 20; i4++)
- hitMarks[i4] = new Sprite(mediaArchive, "hitmarks", i4);
- }
- catch(Exception _ex) { }
- try
- {
- for(int h1 = 0; h1 < 6; h1++)
- headIconsHint[h1] = new Sprite(mediaArchive, "headicons_hint", h1);
- } catch(Exception _ex) { }
- try {
- /*for(int j4 = 0; j4 < 8; j4++)
- headIcons[j4] = new Sprite(mediaArchive, "headicons_prayer", j4);*/
- for(int idx = 0; idx < 18; idx++)
- headIcons[idx] = new Sprite("Player/Prayer/Prayer "+idx);
- for(int j45 = 0; j45 < 3; j45++)
- skullIcons[j45] = new Sprite(mediaArchive, "headicons_pk", j45 );
- }//HERE
- catch(Exception _ex) { }
- mapFlag = new Sprite(mediaArchive, "mapmarker", 0);
- mapMarker = new Sprite(mediaArchive, "mapmarker", 1);
- for(int k4 = 0; k4 < 8; k4++)
- crosses[k4] = new Sprite(mediaArchive, "cross", k4);
- mapDotItem = new Sprite(mediaArchive, "mapdots", 0);
- mapDotNPC = new Sprite(mediaArchive, "mapdots", 1);
- mapDotPlayer = new Sprite(mediaArchive, "mapdots", 2);
- mapDotFriend = new Sprite(mediaArchive, "mapdots", 3);
- mapDotTeam = new Sprite(mediaArchive, "mapdots", 4);
- mapDotClan = new Sprite(mediaArchive, "mapdots", 5);
- scrollBar1 = new Sprite(mediaArchive, "scrollbar", 0);
- scrollBar2 = new Sprite(mediaArchive, "scrollbar", 1);
- scrollBar3 = new Sprite("Gameframe/SCROLLBAR 0");
- scrollBar4 = new Sprite("Gameframe/SCROLLBAR 1");
- Sprite sprite = new Sprite(mediaArchive, "screenframe", 2);
- rightFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
- sprite.method346(0, 0);
- sprite = new Sprite(mediaArchive, "mapedge", 0);
- mapEdgeIP = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
- sprite.method346(0, 0);
- int i5 = (int)(Math.random() * 21D) - 10;
- int j5 = (int)(Math.random() * 21D) - 10;
- int k5 = (int)(Math.random() * 21D) - 10;
- int l5 = (int)(Math.random() * 41D) - 20;
- for(int i6 = 0; i6 < 100; i6++)
- {
- if(mapFunctions[i6] != null)
- mapFunctions[i6].method344(i5 + l5, j5 + l5, k5 + l5);
- if(mapScenes[i6] != null)
- mapScenes[i6].method360(i5 + l5, j5 + l5, k5 + l5);
- }
- drawSmoothLoading(60, "Loading textures");
- Texture.method368(textureArchive);
- Texture.method372(0.80000000000000004D);
- Texture.method367();
- drawSmoothLoading(70, "Loading config");
- try {
- Animation.unpackConfig(archive);
- ObjectDef.unpackConfig(archive);
- Flo.unpackConfig(archive);
- ItemDef.unpackConfig(archive);
- NpcDef.unpackConfig(archive);
- IdentityKit.unpackConfig(archive);
- SpotAnim.unpackConfig(archive);
- Varp.unpackConfig(archive);
- VarBit.unpackConfig(archive);
- ItemDef.isMembers = true;
- } catch(Exception e) {
- e.printStackTrace();
- }
- drawSmoothLoading(80, "Loading interfaces");
- RSFont aclass30_sub2_sub1_sub4s[] = {
- smallFont, regularFont, boldFont, fancyFont
- };
- RSInterface.fonts = aclass30_sub2_sub1_sub4s;
- RSInterface.unpack(interfaceArchive, aclass30_sub2_sub1_sub4s, mediaArchive);
- drawSmoothLoading(100, "Preparing game engine");
- for(int j6 = 0; j6 < 33; j6++)
- {
- int k6 = 999;
- int i7 = 0;
- for(int k7 = 0; k7 < 34; k7++)
- {
- if(mapBack.aByteArray1450[k7 + j6 * mapBack.imgWidth] == 0)
- {
- if(k6 == 999)
- k6 = k7;
- continue;
- }
- if(k6 == 999)
- continue;
- i7 = k7;
- break;
- }
- compassClipRight[j6] = k6;
- compassClipLeft[j6] = i7 - k6;
- }
- for(int l6 = 1; l6 < 153; l6++) {
- int j7 = 999;
- int l7 = 0;
- for(int j8 = 24; j8 < 177; j8++) {
- if(mapBack.aByteArray1450[j8 + l6 * mapBack.imgWidth] == 0 && (j8 > 34 || l6 > 34)) {
- if(j7 == 999) {
- j7 = j8;
- }
- continue;
- }
- if(j7 == 999) {
- continue;
- }
- l7 = j8;
- break;
- }
- minimapClipRight[l6 - 1] = j7 - 24;
- minimapClipLeft[l6 - 1] = l7 - j7;
- }
- //fullscreen texture bug
- Texture.method365(765, 503);
- fullScreenTextureArray = Texture.anIntArray1472;
- Texture.method365(516, 165);//519
- anIntArray1180 = Texture.anIntArray1472;
- Texture.method365(250, 335);
- anIntArray1181 = Texture.anIntArray1472;
- Texture.method365(512, 334);//512 334
- anIntArray1182 = Texture.anIntArray1472;
- int ai[] = new int[9];
- for(int i8 = 0; i8 < 9; i8++)
- {
- int k8 = 128 + i8 * 32 + 15;
- int l8 = 600 + k8 * 3;
- int i9 = Texture.anIntArray1470[k8];
- ai[i8] = l8 * i9 >> 16;
- }
- WorldController.method310(500, 800, 512, 334, ai);
- Censor.loadConfig(streamLoader_4);
- mouseDetection = new MouseDetection(this);
- startRunnable(mouseDetection, 10);
- ObjectOnTile.clientInstance = this;
- ObjectDef.clientInstance = this;
- NpcDef.clientInstance = this;
- return;
- }
- catch(Exception exception)
- {
- exception.printStackTrace();
- SignLink.reporterror("loaderror " + loadingText + " " + loadingPercent);
- }
- loadingError = true;
- }
- private void method91(Stream stream, int i)
- {
- while(stream.bitPosition + 10 < i * 8)
- {
- int j = stream.readBits(11);
- if(j == 2047)
- break;
- if(playerArray[j] == null)
- {
- playerArray[j] = new Player();
- if(aStreamArray895s[j] != null)
- playerArray[j].updatePlayer(aStreamArray895s[j]);
- }
- playerIndices[playerCount++] = j;
- Player player = playerArray[j];
- player.anInt1537 = loopCycle;
- int k = stream.readBits(1);
- if(k == 1)
- anIntArray894[anInt893++] = j;
- int l = stream.readBits(1);
- int i1 = stream.readBits(5);
- if(i1 > 15)
- i1 -= 32;
- int j1 = stream.readBits(5);
- if(j1 > 15)
- j1 -= 32;
- player.setPos(myPlayer.smallX[0] + j1, myPlayer.smallY[0] + i1, l == 1);
- }
- stream.finishBitAccess();
- }
- private void processMainScreenClick() {
- if(miniMapOverlay != 0)
- return;
- if(super.clickMode3 == 1) {
- if(!fullScreenOn) {
- int i = super.saveClickX - 25 - 530;
- int j = super.saveClickY - 8;
- if(i >= 0 && j >= 0 && i < 146 && j < 151) {
- i -= 73;
- j -= 75;
- int k = minimapInt1 + minimapInt2 & 0x7ff;
- int i1 = Texture.anIntArray1470[k];
- int j1 = Texture.anIntArray1471[k];
- i1 = i1 * (minimapInt3 + 256) >> 8;
- j1 = j1 * (minimapInt3 + 256) >> 8;
- int k1 = j * i1 + i * j1 >> 11;
- int l1 = j * j1 - i * i1 >> 11;
- int i2 = myPlayer.x + k1 >> 7;
- int j2 = myPlayer.y - l1 >> 7;
- boolean flag1 = doWalkTo(1, 0, 0, 0, myPlayer.smallY[0], 0, 0, j2, myPlayer.smallX[0], true, i2);
- if(flag1) {
- stream.writeWordBigEndian(i);
- stream.writeWordBigEndian(j);
- stream.writeWord(minimapInt1);
- stream.writeWordBigEndian(57);
- stream.writeWordBigEndian(minimapInt2);
- stream.writeWordBigEndian(minimapInt3);
- stream.writeWordBigEndian(89);
- stream.writeWord(myPlayer.x);
- stream.writeWord(myPlayer.y);
- stream.writeWordBigEndian(anInt1264);
- stream.writeWordBigEndian(63);
- }
- }
- }
- anInt1117++;
- if(anInt1117 > 1151) {
- anInt1117 = 0;
- stream.createFrame(246);
- stream.writeWordBigEndian(0);
- int l = stream.currentOffset;
- if((int)(Math.random() * 2D) == 0)
- stream.writeWordBigEndian(101);
- stream.writeWordBigEndian(197);
- stream.writeWord((int)(Math.random() * 65536D));
- stream.writeWordBigEndian((int)(Math.random() * 256D));
- stream.writeWordBigEndian(67);
- stream.writeWord(14214);
- if((int)(Math.random() * 2D) == 0)
- stream.writeWord(29487);
- stream.writeWord((int)(Math.random() * 65536D));
- if((int)(Math.random() * 2D) == 0)
- stream.writeWordBigEndian(220);
- stream.writeWordBigEndian(180);
- stream.writeBytes(stream.currentOffset - l);
- }
- }
- }
- private String interfaceIntToString(int j) {
- if(j < 0x3b9ac9ff)
- return String.valueOf(j);
- else
- return "*";
- }
- private void showErrorScreen()
- {
- Graphics g = getGameComponent().getGraphics();
- g.setColor(Color.black);
- g.fillRect(0, 0, 765, 503);
- method4(1);
- if(loadingError)
- {
- aBoolean831 = false;
- g.setFont(new Font("Helvetica", 1, 16));
- g.setColor(Color.yellow);
- int k = 35;
- g.drawString("Sorry, an error has occured whilst loading Firyze.", 30, k);
- k += 50;
- g.setColor(Color.white);
- g.drawString("To fix this try the following (in order):", 30, k);
- k += 50;
- g.setColor(Color.white);
- g.setFont(new Font("Helvetica", 1, 12));
- g.drawString("1: Try closing and reopening the client and/or web browser", 30, k);
- k += 30;
- g.drawString("2: Try clearing your web-browsers cache from tools->internet options", 30, k);
- k += 30;
- g.drawString("3: Try rebooting your computer", 30, k);
- k += 30;
- g.drawString(" ", 30, k);
- k += 30;
- g.drawString("If problems still occur, visit the forums at google.com and request help", 30, k);
- }
- if(genericLoadingError)
- {
- aBoolean831 = false;
- g.setFont(new Font("Helvetica", 1, 20));
- g.setColor(Color.white);
- g.drawString("Error - unable to load game!", 50, 50);
- g.drawString("To play Firyze make sure you play from", 50, 100);
- g.drawString("google.com", 50, 150);
- }
- if(rsAlreadyLoaded)
- {
- aBoolean831 = false;
- g.setColor(Color.yellow);
- int l = 35;
- g.drawString("Error a copy of Firyze already appears to be loaded", 30, l);
- l += 50;
- g.setColor(Color.white);
- g.drawString("To fix this try the following (in order):", 30, l);
- l += 50;
- g.setColor(Color.white);
- g.setFont(new Font("Helvetica", 1, 12));
- g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, l);
- l += 30;
- g.drawString("2: Try rebooting your computer, and reloading", 30, l);
- l += 30;
- }
- }
- public URL getCodeBase() {
- try {
- return new URL(server +":" + (80 + portOff));
- } catch(Exception _ex) {
- }
- return null;
- }
- private void method95() {
- for(int j = 0; j < npcCount; j++) {
- int k = npcIndices[j];
- Npc npc = npcArray[k];
- if(npc != null)
- method96(npc);
- }
- }
- private void method96(Mobile entity)
- {
- if(entity.x < 128 || entity.y < 128 || entity.x >= 13184 || entity.y >= 13184)
- {
- entity.anim = -1;
- entity.anInt1520 = -1;
- entity.anInt1547 = 0;
- entity.anInt1548 = 0;
- entity.x = entity.smallX[0] * 128 + entity.anInt1540 * 64;
- entity.y = entity.smallY[0] * 128 + entity.anInt1540 * 64;
- entity.method446();
- }
- if(entity == myPlayer && (entity.x < 1536 || entity.y < 1536 || entity.x >= 11776 || entity.y >= 11776))
- {
- entity.anim = -1;
- entity.anInt1520 = -1;
- entity.anInt1547 = 0;
- entity.anInt1548 = 0;
- entity.x = entity.smallX[0] * 128 + entity.anInt1540 * 64;
- entity.y = entity.smallY[0] * 128 + entity.anInt1540 * 64;
- entity.method446();
- }
- if(entity.anInt1547 > loopCycle)
- method97(entity);
- else
- if(entity.anInt1548 >= loopCycle)
- method98(entity);
- else
- method99(entity);
- method100(entity);
- method101(entity);
- }
- private void method97(Mobile entity)
- {
- int i = entity.anInt1547 - loopCycle;
- int j = entity.anInt1543 * 128 + entity.anInt1540 * 64;
- int k = entity.anInt1545 * 128 + entity.anInt1540 * 64;
- entity.x += (j - entity.x) / i;
- entity.y += (k - entity.y) / i;
- entity.anInt1503 = 0;
- if(entity.anInt1549 == 0)
- entity.turnDirection = 1024;
- if(entity.anInt1549 == 1)
- entity.turnDirection = 1536;
- if(entity.anInt1549 == 2)
- entity.turnDirection = 0;
- if(entity.anInt1549 == 3)
- entity.turnDirection = 512;
- }
- private void method98(Mobile entity)
- {
- if(entity.anInt1548 == loopCycle || entity.anim == -1 || entity.anInt1529 != 0 || entity.anInt1528 + 1 > Animation.anims[entity.anim].method258(entity.anInt1527))
- {
- int i = entity.anInt1548 - entity.anInt1547;
- int j = loopCycle - entity.anInt1547;
- int k = entity.anInt1543 * 128 + entity.anInt1540 * 64;
- int l = entity.anInt1545 * 128 + entity.anInt1540 * 64;
- int i1 = entity.anInt1544 * 128 + entity.anInt1540 * 64;
- int j1 = entity.anInt1546 * 128 + entity.anInt1540 * 64;
- entity.x = (k * (i - j) + i1 * j) / i;
- entity.y = (l * (i - j) + j1 * j) / i;
- }
- entity.anInt1503 = 0;
- if(entity.anInt1549 == 0)
- entity.turnDirection = 1024;
- if(entity.anInt1549 == 1)
- entity.turnDirection = 1536;
- if(entity.anInt1549 == 2)
- entity.turnDirection = 0;
- if(entity.anInt1549 == 3)
- entity.turnDirection = 512;
- entity.anInt1552 = entity.turnDirection;
- }
- private void method99(Mobile entity)
- {
- entity.anInt1517 = entity.anInt1511;
- if(entity.smallXYIndex == 0)
- {
- entity.anInt1503 = 0;
- return;
- }
- if(entity.anim != -1 && entity.anInt1529 == 0)
- {
- Animation animation = Animation.anims[entity.anim];
- if(entity.anInt1542 > 0 && animation.anInt363 == 0)
- {
- entity.anInt1503++;
- return;
- }
- if(entity.anInt1542 <= 0 && animation.anInt364 == 0)
- {
- entity.anInt1503++;
- return;
- }
- }
- int i = entity.x;
- int j = entity.y;
- int k = entity.smallX[entity.smallXYIndex - 1] * 128 + entity.anInt1540 * 64;
- int l = entity.smallY[entity.smallXYIndex - 1] * 128 + entity.anInt1540 * 64;
- if(k - i > 256 || k - i < -256 || l - j > 256 || l - j < -256)
- {
- entity.x = k;
- entity.y = l;
- return;
- }
- if(i < k)
- {
- if(j < l)
- entity.turnDirection = 1280;
- else
- if(j > l)
- entity.turnDirection = 1792;
- else
- entity.turnDirection = 1536;
- } else
- if(i > k)
- {
- if(j < l)
- entity.turnDirection = 768;
- else
- if(j > l)
- entity.turnDirection = 256;
- else
- entity.turnDirection = 512;
- } else
- if(j < l)
- entity.turnDirection = 1024;
- else
- entity.turnDirection = 0;
- int i1 = entity.turnDirection - entity.anInt1552 & 0x7ff;
- if(i1 > 1024)
- i1 -= 2048;
- int j1 = entity.anInt1555;
- if(i1 >= -256 && i1 <= 256)
- j1 = entity.anInt1554;
- else
- if(i1 >= 256 && i1 < 768)
- j1 = entity.anInt1557;
- else
- if(i1 >= -768 && i1 <= -256)
- j1 = entity.anInt1556;
- if(j1 == -1)
- j1 = entity.anInt1554;
- entity.anInt1517 = j1;
- int k1 = 4;
- if(entity.anInt1552 != entity.turnDirection && entity.interactingEntity == -1 && entity.anInt1504 != 0)
- k1 = 2;
- if(entity.smallXYIndex > 2)
- k1 = 6;
- if(entity.smallXYIndex > 3)
- k1 = 8;
- if(entity.anInt1503 > 0 && entity.smallXYIndex > 1)
- {
- k1 = 8;
- entity.anInt1503--;
- }
- if(entity.aBooleanArray1553[entity.smallXYIndex - 1])
- k1 <<= 1;
- if(k1 >= 8 && entity.anInt1517 == entity.anInt1554 && entity.anInt1505 != -1)
- entity.anInt1517 = entity.anInt1505;
- if(i < k)
- {
- entity.x += k1;
- if(entity.x > k)
- entity.x = k;
- } else
- if(i > k)
- {
- entity.x -= k1;
- if(entity.x < k)
- entity.x = k;
- }
- if(j < l)
- {
- entity.y += k1;
- if(entity.y > l)
- entity.y = l;
- } else
- if(j > l)
- {
- entity.y -= k1;
- if(entity.y < l)
- entity.y = l;
- }
- if(entity.x == k && entity.y == l)
- {
- entity.smallXYIndex--;
- if(entity.anInt1542 > 0)
- entity.anInt1542--;
- }
- }
- private void method100(Mobile entity)
- {
- if(entity.anInt1504 == 0)
- return;
- if(entity.interactingEntity != -1 && entity.interactingEntity < 32768)
- {
- Npc npc = npcArray[entity.interactingEntity];
- if(npc != null)
- {
- int i1 = entity.x - npc.x;
- int k1 = entity.y - npc.y;
- if(i1 != 0 || k1 != 0)
- entity.turnDirection = (int)(Math.atan2(i1, k1) * 325.94900000000001D) & 0x7ff;
- }
- }
- if(entity.interactingEntity >= 32768)
- {
- int j = entity.interactingEntity - 32768;
- if(j == unknownInt10)
- j = myPlayerIndex;
- Player player = playerArray[j];
- if(player != null)
- {
- int l1 = entity.x - player.x;
- int i2 = entity.y - player.y;
- if(l1 != 0 || i2 != 0)
- entity.turnDirection = (int)(Math.atan2(l1, i2) * 325.94900000000001D) & 0x7ff;
- }
- }
- if((entity.anInt1538 != 0 || entity.anInt1539 != 0) && (entity.smallXYIndex == 0 || entity.anInt1503 > 0))
- {
- int k = entity.x - (entity.anInt1538 - baseX - baseX) * 64;
- int j1 = entity.y - (entity.anInt1539 - baseY - baseY) * 64;
- if(k != 0 || j1 != 0)
- entity.turnDirection = (int)(Math.atan2(k, j1) * 325.94900000000001D) & 0x7ff;
- entity.anInt1538 = 0;
- entity.anInt1539 = 0;
- }
- int l = entity.turnDirection - entity.anInt1552 & 0x7ff;
- if(l != 0)
- {
- if(l < entity.anInt1504 || l > 2048 - entity.anInt1504)
- entity.anInt1552 = entity.turnDirection;
- else
- if(l > 1024)
- entity.anInt1552 -= entity.anInt1504;
- else
- entity.anInt1552 += entity.anInt1504;
- entity.anInt1552 &= 0x7ff;
- if(entity.anInt1517 == entity.anInt1511 && entity.anInt1552 != entity.turnDirection)
- {
- if(entity.anInt1512 != -1)
- {
- entity.anInt1517 = entity.anInt1512;
- return;
- }
- entity.anInt1517 = entity.anInt1554;
- }
- }
- }
- private void method101(Mobile entity)
- {
- entity.aBoolean1541 = false;
- if(entity.anInt1517 != -1)
- {
- Animation animation = Animation.anims[entity.anInt1517];
- entity.anInt1519++;
- if(entity.anInt1518 < animation.anInt352 && entity.anInt1519 > animation.method258(entity.anInt1518))
- {
- entity.anInt1519 = 1; //Faster anims, 0 = slower
- entity.anInt1518++;
- }
- if(entity.anInt1518 >= animation.anInt352)
- {
- entity.anInt1519 = 0;
- entity.anInt1518 = 0;
- }
- }
- if(entity.anInt1520 != -1 && loopCycle >= entity.anInt1523)
- {
- if(entity.anInt1521 < 0)
- entity.anInt1521 = 0;
- Animation animation_1 = SpotAnim.cache[entity.anInt1520].aAnimation_407;
- for(entity.anInt1522++; entity.anInt1521 < animation_1.anInt352 && entity.anInt1522 > animation_1.method258(entity.anInt1521); entity.anInt1521++)//huhhhhh
- entity.anInt1522 -= animation_1.method258(entity.anInt1521);
- if(entity.anInt1521 >= animation_1.anInt352 && (entity.anInt1521 < 0 || entity.anInt1521 >= animation_1.anInt352))
- entity.anInt1520 = -1;
- }
- if(entity.anim != -1 && entity.anInt1529 <= 1)
- {
- Animation animation_2 = Animation.anims[entity.anim];
- if(animation_2.anInt363 == 1 && entity.anInt1542 > 0 && entity.anInt1547 <= loopCycle && entity.anInt1548 < loopCycle)
- {
- entity.anInt1529 = 1;
- return;
- }
- }
- if(entity.anim != -1 && entity.anInt1529 == 0)
- {
- Animation animation_3 = Animation.anims[entity.anim];
- for(entity.anInt1528++; entity.anInt1527 < animation_3.anInt352 && entity.anInt1528 > animation_3.method258(entity.anInt1527); entity.anInt1527++)
- entity.anInt1528 -= animation_3.method258(entity.anInt1527);
- if(entity.anInt1527 >= animation_3.anInt352)
- {
- entity.anInt1527 -= animation_3.anInt356;
- entity.anInt1530++;
- if(entity.anInt1530 >= animation_3.anInt362)
- entity.anim = -1;
- if(entity.anInt1527 < 0 || entity.anInt1527 >= animation_3.anInt352)
- entity.anim = -1;
- }
- entity.aBoolean1541 = animation_3.aBoolean358;
- }
- if(entity.anInt1529 > 0)
- entity.anInt1529--;
- }
- private void drawGameScreen() {
- if(fullscreenInterfaceID != -1 && (loadingStage == 2 || super.fullGameScreen != null)) {
- if(loadingStage == 2) {
- method119(animationTimePassed, fullscreenInterfaceID);
- if(openInterfaceID != -1) {
- method119(animationTimePassed, openInterfaceID);
- }
- animationTimePassed = 0;
- resetAllImageProducers();
- super.fullGameScreen.initDrawingArea();
- Texture.anIntArray1472 = fullScreenTextureArray;
- DrawingArea.clear();
- welcomeScreenRaised = true;
- if(openInterfaceID != -1) {
- RSInterface class9_1 = RSInterface.interfaceCache[openInterfaceID];
- if(class9_1.width == 512 && class9_1.height == 334 && class9_1.interfaceType == 0) {
- class9_1.width = 765;
- class9_1.height = 503;
- }
- drawInterface(0, 0, 8, class9_1);
- }
- RSInterface rsInterface = RSInterface.interfaceCache[fullscreenInterfaceID];
- if(rsInterface.width == 512 && rsInterface.height == 334 && rsInterface.interfaceType == 0) {
- rsInterface.width = 765;
- rsInterface.height = 503;
- }
- drawInterface(0, 0, 8, rsInterface);
- }
- drawCount++;
- super.fullGameScreen.drawGraphics(0, 0, super.graphics);
- return;
- } else {
- if(drawCount != 0) {
- resetImageProducers2();
- }
- }
- if(welcomeScreenRaised) {
- welcomeScreenRaised = false;
- needDrawTabArea = true;
- inputTaken = true;
- tabAreaAltered = true;
- if(loadingStage != 2) {
- if (!menuOpen) {
- processRightClick();
- drawTooltip();
- } else {
- drawMenu(4, 4);
- }
- mainGameArea.drawGraphics(4, 4, super.graphics);
- }
- }
- if(invOverlayInterfaceID != -1) {
- boolean flag1 = method119(animationTimePassed, invOverlayInterfaceID);
- if(flag1)
- needDrawTabArea = true;
- }
- if(loadingStage == 2) {
- mainGameArea.initDrawingArea();
- DrawingArea.clear();
- draw3DScreenMain();
- drawMinimap();
- drawTabArea();
- drawChatArea();
- drawFrames();
- }
- if(backDialogID == -1) {
- aClass9_1059.scrollPosition = chatAreaScrollMax - chatAreaScrollPos - 110;
- if(super.mouseX > 478 && super.mouseX < 580 && super.mouseY > 342)
- method65(494, 110, super.mouseX - 0, super.mouseY - 348, aClass9_1059, 0, false, chatAreaScrollMax);
- int i = chatAreaScrollMax - 110 - aClass9_1059.scrollPosition;
- if(i < 0)
- i = 0;
- if(i > chatAreaScrollMax - 110)
- i = chatAreaScrollMax - 110;
- if(chatAreaScrollPos != i) {
- chatAreaScrollPos = i;
- inputTaken = true;
- }
- }
- if(backDialogID != -1) {
- boolean flag2 = method119(animationTimePassed, backDialogID);
- if(flag2)
- inputTaken = true;
- }
- if(atInventoryInterfaceType == 3)
- inputTaken = true;
- if(activeInterfaceType == 3)
- inputTaken = true;
- if(chatBoxMessage != null)
- inputTaken = true;
- if(menuOpen && menuScreenArea == 2)
- inputTaken = true;
- inputTaken = true;
- if(anInt1054 != -1)
- tabAreaAltered = true;
- if(tabAreaAltered) {
- if(anInt1054 != -1 && anInt1054 == tabID) {
- anInt1054 = -1;
- stream.createFrame(120);
- stream.writeWordBigEndian(tabID);
- }
- tabAreaAltered = false;
- }
- animationTimePassed = 0;
- }
- private boolean buildFriendsListMenu(RSInterface class9) {
- int i = class9.contentType;
- if(i >= 1 && i <= 200 || i >= 701 && i <= 900)
- {
- if(i >= 801)
- i -= 701;
- else
- if(i >= 701)
- i -= 601;
- else
- if(i >= 101)
- i -= 101;
- else
- i--;
- menuActionName[menuActionRow] = "Remove @whi@" + friendsList[i];
- menuActionID[menuActionRow] = 792;
- menuActionRow++;
- menuActionName[menuActionRow] = "Message @whi@" + friendsList[i];
- menuActionID[menuActionRow] = 639;
- menuActionRow++;
- return true;
- }
- if(i >= 401 && i <= 500)
- {
- menuActionName[menuActionRow] = "Remove @whi@" + class9.disabledMessage;
- menuActionID[menuActionRow] = 322;
- menuActionRow++;
- return true;
- } else {
- return false;
- }
- }
- //method104
- private void renderStationaryGraphics() {
- StillGraphic sg = (StillGraphic)aClass19_1056.reverseGetFirst();
- for(; sg != null; sg = (StillGraphic)aClass19_1056.reverseGetNext())
- if(sg.plane != plane || sg.transformCompleted)
- sg.unlink();
- else
- if(loopCycle >= sg.loopCycle) {
- sg.animationStep(animationTimePassed);
- if(sg.transformCompleted)
- sg.unlink();
- else
- sceneGraph.addEntityA(sg.plane, 0, sg.z, -1, sg.y, 60, sg.x, sg, false);
- }
- }
- private void drawInterface(int j, int x, int y, RSInterface i) {
- if(i.interfaceType != 0 || i.children == null)
- return;
- if(i.interfaceShown && anInt1026 != i.id && anInt1048 != i.id && anInt1039 != i.id)
- return;
- int i1 = DrawingArea.clipStartX;
- int j1 = DrawingArea.clipStartY;
- int k1 = DrawingArea.clipEndX;
- int l1 = DrawingArea.clipEndY;
- DrawingArea.setClip(x, y, x + i.width, y + i.height);
- int i2 = i.children.length;
- for(int j2 = 0; j2 < i2; j2++) {
- int k2 = i.childX[j2] + x;
- int l2 = (i.childY[j2] + y) - j;
- RSInterface class9_1 = RSInterface.interfaceCache[i.children[j2]];
- k2 += class9_1.xOffset;
- l2 += class9_1.yOffset;
- if(class9_1.contentType > 0)
- drawFriendsListOrWelcomeScreen(class9_1);
- //here
- int[] IDs = {
- 1196, 1199, 1206, 1215, 1224, 1231, 1240, 1249, 1258, 1267, 1274, 1283, 1573,
- 1290, 1299, 1308, 1315, 1324, 1333, 1340, 1349, 1358, 1367, 1374, 1381, 1388,
- 1397, 1404, 1583, 12038, 1414, 1421, 1430, 1437, 1446, 1453, 1460, 1469, 15878,
- 1602, 1613, 1624, 7456, 1478, 1485, 1494, 1503, 1512, 1521, 1530, 1544, 1553,
- 1563, 1593, 1635, 12426, 12436, 12446, 12456, 6004, 18471,
- /* Ancients */
- 12940, 12988, 13036, 12902, 12862, 13046, 12964, 13012, 13054, 12920, 12882, 13062,
- 12952, 13000, 13070, 12912, 12872, 13080, 12976, 13024, 13088, 12930, 12892, 13096
- };
- for(int m5 = 0; m5 < IDs.length; m5++) {
- if(class9_1.id == IDs[m5] + 1) {
- if(m5 > 61)
- drawBlackBox(k2 + 1, l2);
- else
- drawBlackBox(k2, l2 + 1);
- }
- }
- int[] runeChildren = {
- 1202, 1203, 1209, 1210, 1211, 1218, 1219, 1220, 1227, 1228, 1234, 1235, 1236, 1243, 1244, 1245,
- 1252, 1253, 1254, 1261, 1262, 1263, 1270, 1271, 1277, 1278, 1279, 1286, 1287, 1293, 1294, 1295,
- 1302, 1303, 1304, 1311, 1312, 1318, 1319, 1320, 1327, 1328, 1329, 1336, 1337, 1343, 1344, 1345,
- 1352, 1353, 1354, 1361, 1362, 1363, 1370, 1371, 1377, 1378, 1384, 1385, 1391, 1392, 1393, 1400,
- 1401, 1407, 1408, 1410, 1417, 1418, 1424, 1425, 1426, 1433, 1434, 1440, 1441, 1442, 1449, 1450,
- 1456, 1457, 1463, 1464, 1465, 1472, 1473, 1474, 1481, 1482, 1488, 1489, 1490, 1497, 1498, 1499,
- 1506, 1507, 1508, 1515, 1516, 1517, 1524, 1525, 1526, 1533, 1534, 1535, 1547, 1548, 1549, 1556,
- 1557, 1558, 1566, 1567, 1568, 1576, 1577, 1578, 1586, 1587, 1588, 1596, 1597, 1598, 1605, 1606,
- 1607, 1616, 1617, 1618, 1627, 1628, 1629, 1638, 1639, 1640, 6007, 6008, 6011, 8673, 8674, 12041,
- 12042, 12429, 12430, 12431, 12439, 12440, 12441, 12449, 12450, 12451, 12459, 12460, 15881, 15882,
- 15885, 18474, 18475, 18478
- };
- for(int r = 0; r < runeChildren.length; r++)
- if(class9_1.id == runeChildren[r])
- class9_1.modelZoom = 775;
- if(class9_1.interfaceType == 0) {
- if(class9_1.scrollPosition > class9_1.scrollMax - class9_1.height)
- class9_1.scrollPosition = class9_1.scrollMax - class9_1.height;
- if(class9_1.scrollPosition < 0)
- class9_1.scrollPosition = 0;
- drawInterface(class9_1.scrollPosition, k2, l2, class9_1);
- if(class9_1.scrollMax > class9_1.height)
- drawScrollbar(k2 + class9_1.width, l2, class9_1.height, class9_1.scrollPosition, class9_1.scrollMax);
- } else if(class9_1.interfaceType != 1)
- if(class9_1.interfaceType == 2) {
- int i3 = 0;
- for(int l3 = 0; l3 < class9_1.height; l3++) {
- for(int l4 = 0; l4 < class9_1.width; l4++) {
- int k5 = k2 + l4 * (32 + class9_1.invSpritePadX);
- int j6 = l2 + l3 * (32 + class9_1.invSpritePadY);
- if(i3 < 20) {
- k5 += class9_1.spritesX[i3];
- j6 += class9_1.spritesY[i3];
- }
- if(class9_1.inventory[i3] > 0) {
- int k6 = 0;
- int j7 = 0;
- int j9 = class9_1.inventory[i3] - 1;
- if(k5 > DrawingArea.clipStartX - 32 && k5 < DrawingArea.clipEndX && j6 > DrawingArea.clipStartY - 32 && j6 < DrawingArea.clipEndY || activeInterfaceType != 0 && anInt1085 == i3) {
- int l9 = 0;
- if(itemSelected == 1 && anInt1283 == i3 && anInt1284 == class9_1.id)
- l9 = 0xffffff;
- Sprite Sprite_2 = ItemDef.getSprite(j9, class9_1.inventoryValue[i3], l9);
- if(Sprite_2 != null) {
- if(activeInterfaceType != 0 && anInt1085 == i3 && anInt1084 == class9_1.id) {
- k6 = super.mouseX - anInt1087;
- j7 = super.mouseY - anInt1088;
- if(k6 < 5 && k6 > -5)
- k6 = 0;
- if(j7 < 5 && j7 > -5)
- j7 = 0;
- if(anInt989 < 10) { //5 for lower switches
- k6 = 0;
- j7 = 0;
- }
- Sprite_2.drawSprite1(k5 + k6, j6 + j7);
- if(j6 + j7 < DrawingArea.clipStartY && i.scrollPosition > 0) {
- int i10 = (animationTimePassed * (DrawingArea.clipStartY - j6 - j7)) / 3;
- if(i10 > animationTimePassed * 10)
- i10 = animationTimePassed * 10;
- if(i10 > i.scrollPosition)
- i10 = i.scrollPosition;
- i.scrollPosition -= i10;
- anInt1088 += i10;
- }
- if(j6 + j7 + 32 > DrawingArea.clipEndY && i.scrollPosition < i.scrollMax - i.height) {
- int j10 = (animationTimePassed * ((j6 + j7 + 32) - DrawingArea.clipEndY)) / 3;
- if(j10 > animationTimePassed * 10)
- j10 = animationTimePassed * 10;
- if(j10 > i.scrollMax - i.height - i.scrollPosition)
- j10 = i.scrollMax - i.height - i.scrollPosition;
- i.scrollPosition += j10;
- anInt1088 -= j10;
- }
- } else if(atInventoryInterfaceType != 0 && atInventoryIndex == i3 && atInventoryInterface == class9_1.id)
- Sprite_2.drawSprite1(k5, j6);
- else
- Sprite_2.drawSprite(k5, j6);
- if(Sprite_2.maxWidth == 33 || class9_1.inventoryValue[i3] != 1)
- {
- int k10 = class9_1.inventoryValue[i3];
- smallFont.method385(0, intToKOrMil(k10), j6 + 10 + j7, k5 + 1 + k6);
- if(k10 >= 1)
- smallFont.method385(0xFFFF00, intToKOrMil(k10), j6 + 9 + j7, k5 + k6);
- if(k10 >= 100000)
- smallFont.method385(0xFFFFFF, intToKOrMil(k10), j6 + 9 + j7, k5 + k6);
- if(k10 >= 10000000)
- smallFont.method385(0x00FF80, intToKOrMil(k10), j6 + 9 + j7, k5 + k6);
- }
- }
- }
- } else if(class9_1.sprites != null && i3 < 20) {
- Sprite Sprite_1 = class9_1.sprites[i3];
- if(Sprite_1 != null)
- Sprite_1.drawSprite(k5, j6);
- }
- i3++;
- }
- }
- } else if(class9_1.interfaceType == 3) {
- boolean flag = false;
- if(anInt1039 == class9_1.id || anInt1048 == class9_1.id || anInt1026 == class9_1.id)
- flag = true;
- int j3;
- if(interfaceIsSelected(class9_1)) {
- j3 = class9_1.enabledColor;
- if(flag && class9_1.enabledHoverColor != 0)
- j3 = class9_1.enabledHoverColor;
- } else {
- j3 = class9_1.disabledColor;
- if(flag && class9_1.disabledHoverColor != 0)
- j3 = class9_1.disabledHoverColor;
- }
- if(class9_1.opacity == 0) {
- if(class9_1.boxFilled)
- DrawingArea.fillRect(k2, l2, class9_1.width, class9_1.height, j3);
- else
- DrawingArea.drawRect(k2, l2, class9_1.width, class9_1.height, j3);
- } else if(class9_1.boxFilled)
- DrawingArea.fillRect(k2, l2, class9_1.width, class9_1.height, j3, 256 - (class9_1.opacity & 0xff));
- else
- DrawingArea.drawRect(k2, l2, class9_1.width, class9_1.height, j3, 256 - (class9_1.opacity & 0xff));
- } else if(class9_1.interfaceType == 4) {
- RSFont textDrawingArea = class9_1.rsFonts;
- String s = class9_1.disabledMessage;
- boolean flag1 = false;
- if(anInt1039 == class9_1.id || anInt1048 == class9_1.id || anInt1026 == class9_1.id)
- flag1 = true;
- int i4;
- if(interfaceIsSelected(class9_1)) {
- i4 = class9_1.enabledColor;
- if(flag1 && class9_1.enabledHoverColor != 0)
- i4 = class9_1.enabledHoverColor;
- if(class9_1.enabledMessage.length() > 0)
- s = class9_1.enabledMessage;
- } else {
- i4 = class9_1.disabledColor;
- if(flag1 && class9_1.disabledHoverColor != 0)
- i4 = class9_1.disabledHoverColor;
- }
- if(class9_1.atActionType == 6 && aBoolean1149) {
- s = "Please wait...";
- i4 = class9_1.disabledColor;
- }
- if(DrawingArea.width == 516) {//519
- if(i4 == 0xffff00)
- i4 = 255;
- if(i4 == 49152)
- i4 = 0xffffff;
- }
- //Magic interface
- if((class9_1.parentID == 1151) || (class9_1.parentID == 12855)) {
- switch (i4) {
- case 16773120: i4 = 0xFE981F; break;
- case 7040819: i4 = 0xAF6A1A; break;
- }
- }
- //Skill interface
- int id = 4004; int id2 = 4005;
- if(class9_1.parentID == 3917 && class9_1.id != id && class9_1.id != id+2 && class9_1.id != id+4 && class9_1.id != id+6
- && class9_1.id != id+8 && class9_1.id != id+10 && class9_1.id != id+12 && class9_1.id != id+14 && class9_1.id != id+16
- && class9_1.id != id+18 && class9_1.id != id+20 && class9_1.id != id+23 && class9_1.id != id+24 && class9_1.id != id+26
- && class9_1.id != id+28 && class9_1.id != id+30 && class9_1.id != id+32 && class9_1.id != id+34 && class9_1.id != 13926
- && class9_1.id != 4152 && class9_1.id != 12166 && class9_1.id != id2 && class9_1.id != id2+2 && class9_1.id != id2+4 && class9_1.id != id2+6
- && class9_1.id != id2+8 && class9_1.id != id2+10 && class9_1.id != id2+12 && class9_1.id != id2+14 && class9_1.id != id2+16
- && class9_1.id != id2+18 && class9_1.id != id2+20 && class9_1.id != id2+23 && class9_1.id != id2+24 && class9_1.id != id2+26
- && class9_1.id != id2+28 && class9_1.id != id2+30 && class9_1.id != id2+32 && class9_1.id != id2+34 && class9_1.id != 13927
- && class9_1.id != 4153 && class9_1.id != 12167 && class9_1.id != 4026) {
- if(i4 == 16776960)
- i4 = 0x0000;
- class9_1.textShadowed = false;
- }
- /*if(class9_1.parentID == 3917) {
- for(int i = 4004; i < 4040; i++) {
- int[] moreData = {
- 13926, 4152, 12166, 13927,
- 4153, 12167, 4026
- };
- if(class9_1.id == i || class9_1.id == moreData[i]) {
- return;
- }
- if(i4 == 16776960) {
- i4 = 0x0000;
- class9_1.textShadowed = false;
- }
- }
- }*/
- for(int l6 = l2 + textDrawingArea.anInt1497; s.length() > 0; l6 += textDrawingArea.anInt1497)
- {
- if(s.indexOf("%") != -1)
- {
- do
- {
- int k7 = s.indexOf("%1");
- if(k7 == -1)
- break;
- if(class9_1.id < 4000 || class9_1.id > 5000 && class9_1.id !=13921 && class9_1.id !=13922 && class9_1.id !=12171 && class9_1.id !=12172)
- s = s.substring(0, k7) + methodR(extractInterfaceValues(class9_1, 0)) + s.substring(k7 + 2);
- else
- s = s.substring(0, k7) + interfaceIntToString(extractInterfaceValues(class9_1, 0)) + s.substring(k7 + 2);
- } while(true);
- do
- {
- int l7 = s.indexOf("%2");
- if(l7 == -1)
- break;
- s = s.substring(0, l7) + interfaceIntToString(extractInterfaceValues(class9_1, 1)) + s.substring(l7 + 2);
- } while(true);
- do
- {
- int i8 = s.indexOf("%3");
- if(i8 == -1)
- break;
- s = s.substring(0, i8) + interfaceIntToString(extractInterfaceValues(class9_1, 2)) + s.substring(i8 + 2);
- } while(true);
- do
- {
- int j8 = s.indexOf("%4");
- if(j8 == -1)
- break;
- s = s.substring(0, j8) + interfaceIntToString(extractInterfaceValues(class9_1, 3)) + s.substring(j8 + 2);
- } while(true);
- do
- {
- int k8 = s.indexOf("%5");
- if(k8 == -1)
- break;
- s = s.substring(0, k8) + interfaceIntToString(extractInterfaceValues(class9_1, 4)) + s.substring(k8 + 2);
- } while(true);
- }
- int l8 = s.indexOf("\\n");
- String s1;
- if(l8 != -1)
- {
- s1 = s.substring(0, l8);
- s = s.substring(l8 + 2);
- } else
- {
- s1 = s;
- s = "";
- }
- if(class9_1.textCentered)
- textDrawingArea.drawCenteredString(i4, k2 + class9_1.width / 2, s1, l6, class9_1.textShadowed);
- else
- textDrawingArea.drawString(class9_1.textShadowed, k2, i4, s1, l6);
- }
- } else if(class9_1.interfaceType == 5) {
- Sprite sprite;
- if(interfaceIsSelected(class9_1))
- sprite = class9_1.enabledSprite;
- else
- sprite = class9_1.disabledSprite;
- if(spellSelected == 1 && class9_1.id == spellID && spellID != 0 && sprite != null)
- sprite.drawSprite2(k2, l2, 0xffffff);
- else {
- if(Autocast && class9_1.id == autocastId)
- magicAuto.drawSprite(k2-3, l2-3);
- if(sprite != null)
- sprite.drawSprite(k2, l2);
- }
- if(sprite != null)
- sprite.drawSprite(k2, l2);
- } else if(class9_1.interfaceType == 6) {
- int k3 = Texture.textureInt1;
- int j4 = Texture.textureInt2;
- Texture.textureInt1 = k2 + class9_1.width / 2;
- Texture.textureInt2 = l2 + class9_1.height / 2;
- int i5 = Texture.anIntArray1470[class9_1.modelRotationY] * class9_1.modelZoom >> 16;
- int l5 = Texture.anIntArray1471[class9_1.modelRotationY] * class9_1.modelZoom >> 16;
- boolean flag2 = interfaceIsSelected(class9_1);
- int i7;
- if(flag2)
- i7 = class9_1.enabledAnimation;
- else
- i7 = class9_1.disabledAnimation;
- Model model;
- if(i7 == -1) {
- model = class9_1.method209(-1, -1, flag2);
- } else {
- Animation animation = Animation.anims[i7];
- model = class9_1.method209(animation.anIntArray354[class9_1.animationLength], animation.anIntArray353[class9_1.animationLength], flag2);
- }
- if(model != null)
- model.setRotation(class9_1.modelRotationX, 0, class9_1.modelRotationY, 0, i5, l5);
- DrawingArea.removeClip();
- Texture.textureInt1 = k3;
- Texture.textureInt2 = j4;
- } else if(class9_1.interfaceType == 7) {
- RSFont textDrawingArea_1 = class9_1.rsFonts;
- int k4 = 0;
- for(int j5 = 0; j5 < class9_1.height; j5++) {
- for(int i6 = 0; i6 < class9_1.width; i6++) {
- if(class9_1.inventory[k4] > 0) {
- ItemDef itemDef = ItemDef.forID(class9_1.inventory[k4] - 1);
- String s2 = itemDef.name;
- if(itemDef.description != null)
- s2 = itemDef.description;
- if(itemDef.stackable || class9_1.inventoryValue[k4] != 1)
- s2 = itemDef.name + " x" + intToKOrMilLongName(class9_1.inventoryValue[k4]);
- int i9 = k2 + i6 * (115 + class9_1.invSpritePadX);
- int k9 = l2 + j5 * (12 + class9_1.invSpritePadY);
- if(class9_1.textCentered)
- textDrawingArea_1.drawCenteredString(class9_1.disabledColor, i9 + class9_1.width / 2, s2, k9, class9_1.textShadowed);
- else
- textDrawingArea_1.drawString(class9_1.textShadowed, i9, class9_1.disabledColor, s2, k9);
- }
- k4++;
- }
- }
- }
- else if(class9_1.interfaceType == 8 && (anInt1500 == class9_1.id || anInt1044 == class9_1.id || anInt1129 == class9_1.id) && anInt1501 == 100) {
- int boxWidth = 0;
- int boxHeight = 0;
- RSFont textDrawingArea_2 = regularFont;
- for(String s1 = class9_1.disabledMessage; s1.length() > 0;) {
- int l7 = s1.indexOf("\\n");
- String s4;
- if(l7 != -1) {
- s4 = s1.substring(0, l7);
- s1 = s1.substring(l7 + 2);
- } else {
- s4 = s1;
- s1 = "";
- }
- int j10 = textDrawingArea_2.getTextWidth(s4);
- if(j10 > boxWidth) {
- boxWidth = j10;
- }
- boxHeight += textDrawingArea_2.anInt1497 + 1;
- }
- boxWidth += 6;
- boxHeight += 7;
- int xPos = (l2 + class9_1.width) - 5 - boxWidth;
- int yPos = k2 + class9_1.height + 5;
- if(xPos < l2 + 5) {
- xPos = l2 + 5;
- }
- if(xPos + boxWidth > j + i.width) {
- xPos = (j + i.width) - boxWidth;
- }
- if(yPos + boxHeight > x + i.height) {
- yPos = (x + i.height) - boxHeight;
- }
- DrawingArea.fillRect(xPos, yPos, boxWidth, boxHeight, 0xFFFFA0);
- DrawingArea.drawRect(xPos, yPos, boxWidth, boxHeight, 0);
- String s2 = class9_1.disabledMessage;
- for(int j11 = yPos + textDrawingArea_2.anInt1497 + 2; s2.length() > 0; j11 += textDrawingArea_2.anInt1497 + 1) {//anInt1497
- int l11 = s2.indexOf("\\n");
- String s5;
- if(l11 != -1) {
- s5 = s2.substring(0, l11);
- s2 = s2.substring(l11 + 2);
- } else {
- s5 = s2;
- s2 = "";
- }
- textDrawingArea_2.drawString(false, xPos + 3, 0, s5, j11);
- }
- } else if(class9_1.interfaceType == 9) {
- drawHoverBox(k2, l2, class9_1.disabledMessage);
- }
- }
- DrawingArea.setClip(i1, j1, k1, l1);
- }
- private void randomizeBackground(Background background) {
- int j = 256;
- for(int k = 0; k < anIntArray1190.length; k++)
- anIntArray1190[k] = 0;
- for(int l = 0; l < 5000; l++) {
- int i1 = (int)(Math.random() * 128D * (double)j);
- anIntArray1190[i1] = (int)(Math.random() * 256D);
- }
- for(int j1 = 0; j1 < 20; j1++) {
- for(int k1 = 1; k1 < j - 1; k1++) {
- for(int i2 = 1; i2 < 127; i2++) {
- int k2 = i2 + (k1 << 7);
- anIntArray1191[k2] = (anIntArray1190[k2 - 1] + anIntArray1190[k2 + 1] + anIntArray1190[k2 - 128] + anIntArray1190[k2 + 128]) / 4;
- }
- }
- int ai[] = anIntArray1190;
- anIntArray1190 = anIntArray1191;
- anIntArray1191 = ai;
- }
- if(background != null) {
- int l1 = 0;
- for(int j2 = 0; j2 < background.imgHeight; j2++) {
- for(int l2 = 0; l2 < background.imgWidth; l2++)
- if(background.aByteArray1450[l1++] != 0) {
- int i3 = l2 + 16 + background.anInt1454;
- int j3 = j2 + 16 + background.anInt1455;
- int k3 = i3 + (j3 << 7);
- anIntArray1190[k3] = 0;
- }
- }
- }
- }
- private void method107(int i, int j, Stream stream, Player player) {
- if((i & 0x400) != 0)
- {
- player.anInt1543 = stream.method428();
- player.anInt1545 = stream.method428();
- player.anInt1544 = stream.method428();
- player.anInt1546 = stream.method428();
- player.anInt1547 = stream.method436() + loopCycle;
- player.anInt1548 = stream.method435() + loopCycle;
- player.anInt1549 = stream.method428();
- player.method446();
- }
- if((i & 0x100) != 0) {
- player.anInt1520 = stream.method434();
- int k = stream.readDWord();
- player.anInt1524 = k >> 16;
- player.anInt1523 = loopCycle + (k & 0xffff);
- player.anInt1521 = 0;
- player.anInt1522 = 0;
- if(player.anInt1523 > loopCycle)
- player.anInt1521 = -1;
- if(player.anInt1520 == 65535)
- player.anInt1520 = -1;
- }
- if((i & 8) != 0) {
- int l = stream.method434();
- if(l == 65535)
- l = -1;
- int i2 = stream.method427();
- if(l == player.anim && l != -1) {
- int i3 = Animation.anims[l].anInt365;
- if(i3 == 1)
- {
- player.anInt1527 = 0;
- player.anInt1528 = 0;
- player.anInt1529 = i2;
- player.anInt1530 = 0;
- }
- if(i3 == 2)
- player.anInt1530 = 0;
- } else if(l == -1 || player.anim == -1 || Animation.anims[l].anInt359 >= Animation.anims[player.anim].anInt359) {
- player.anim = l;
- player.anInt1527 = 0;
- player.anInt1528 = 0;
- player.anInt1529 = i2;
- player.anInt1530 = 0;
- player.anInt1542 = player.smallXYIndex;
- }
- }
- if((i & 4) != 0) {
- player.textSpoken = stream.readString();
- if(player.textSpoken.charAt(0) == '~')
- {
- player.textSpoken = player.textSpoken.substring(1);
- pushMessage(player.textSpoken, 2, player.name);
- } else
- if(player == myPlayer)
- pushMessage(player.textSpoken, 2, player.name);
- player.textColor = 0;
- player.textAnim = 0;
- player.textCycle = 150;
- }
- if((i & 0x80) != 0) {
- //right fucking here
- int i1 = stream.method434();
- int j2 = stream.readUnsignedByte();
- int j3 = stream.method427();
- int k3 = stream.currentOffset;
- if(player.name != null && player.visible) {
- long l3 = TextClass.longForName(player.name);
- boolean flag = false;
- if(j2 <= 1) {
- for(int i4 = 0; i4 < ignoreCount; i4++) {
- if(ignoreListAsLongs[i4] != l3)
- continue;
- flag = true;
- break;
- }
- }
- if(!flag && anInt1251 == 0)
- try {
- aStream_834.currentOffset = 0;
- stream.method442(j3, 0, aStream_834.buffer);
- aStream_834.currentOffset = 0;
- String s = TextInput.method525(j3, aStream_834);
- //s = Censor.doCensor(s);
- player.textSpoken = s;
- player.textColor = i1 >> 8;
- player.privelage = j2;
- player.textAnim = i1 & 0xff;
- player.textCycle = 150;
- //Other players see your icon
- String cr = "";
- if(j2 == 4) cr = "@cr0@";
- if(j2 == 3) cr = "@cr3@";
- if(j2 == 2) cr = "@cr2@";
- if(j2 == 1) cr = "@cr1@";
- pushMessage(s, 2, cr + "<col="+titleColor(player.titleColor, 0)+">" + player.title + "</col>" + player.name);
- }
- catch(Exception exception)
- {
- SignLink.reporterror("cde2");
- }
- }
- stream.currentOffset = k3 + j3;
- }
- if((i & 1) != 0) {
- player.interactingEntity = stream.method434();
- if(player.interactingEntity == 65535)
- player.interactingEntity = -1;
- }
- if((i & 0x10) != 0) {
- int j1 = stream.method427();
- byte abyte0[] = new byte[j1];
- Stream stream_1 = new Stream(abyte0);
- stream.readBytes(j1, 0, abyte0);
- aStreamArray895s[j] = stream_1;
- player.updatePlayer(stream_1);
- }
- if((i & 2) != 0) {
- player.anInt1538 = stream.method436();
- player.anInt1539 = stream.method434();
- }
- if((i & 0x20) != 0) {
- int k1 = stream.readUnsignedByte();
- int k2 = stream.method426();
- int type1 = stream.readUnsignedByte();
- player.updateHitData(k2, k1, type1, loopCycle);
- player.loopCycleStatus = loopCycle + 300;
- player.currentHealth = stream.method427();
- player.maxHealth = stream.readUnsignedByte();
- }
- if((i & 0x200) != 0) {
- int l1 = stream.readUnsignedByte();
- int l2 = stream.method428();
- int type2 = stream.readUnsignedByte();
- player.updateHitData(l2, l1, type2, loopCycle);
- player.loopCycleStatus = loopCycle + 300;
- player.currentHealth = stream.readUnsignedByte();
- player.maxHealth = stream.method427();
- }
- }
- private void method108()
- {
- try
- {
- int j = myPlayer.x + anInt1278;
- int k = myPlayer.y + anInt1131;
- if(anInt1014 - j < -500 || anInt1014 - j > 500 || anInt1015 - k < -500 || anInt1015 - k > 500)
- {
- anInt1014 = j;
- anInt1015 = k;
- }
- if(anInt1014 != j)
- anInt1014 += (j - anInt1014) / 16;
- if(anInt1015 != k)
- anInt1015 += (k - anInt1015) / 16;
- if(super.keyArray[1] == 1)
- anInt1186 += (-24 - anInt1186) / 2;
- else
- if(super.keyArray[2] == 1)
- anInt1186 += (24 - anInt1186) / 2;
- else
- anInt1186 /= 2;
- if(super.keyArray[3] == 1)
- anInt1187 += (12 - anInt1187) / 2;
- else
- if(super.keyArray[4] == 1)
- anInt1187 += (-12 - anInt1187) / 2;
- else
- anInt1187 /= 2;
- minimapInt1 = minimapInt1 + anInt1186 / 2 & 0x7ff;
- anInt1184 += anInt1187 / 2;
- if(anInt1184 < 128)
- anInt1184 = 128;
- if(anInt1184 > 383)
- anInt1184 = 383;
- int l = anInt1014 >> 7;
- int i1 = anInt1015 >> 7;
- int j1 = method42(plane, anInt1015, anInt1014);
- int k1 = 0;
- if(l > 3 && i1 > 3 && l < 100 && i1 < 100)
- {
- for(int l1 = l - 4; l1 <= l + 4; l1++)
- {
- for(int k2 = i1 - 4; k2 <= i1 + 4; k2++)
- {
- int l2 = plane;
- if(l2 < 3 && (byteGroundArray[1][l1][k2] & 2) == 2)
- l2++;
- int i3 = j1 - intGroundArray[l2][l1][k2];
- if(i3 > k1)
- k1 = i3;
- }
- }
- }
- anInt1005++;
- if(anInt1005 > 1512)
- {
- anInt1005 = 0;
- stream.createFrame(77);
- stream.writeWordBigEndian(0);
- int i2 = stream.currentOffset;
- stream.writeWordBigEndian((int)(Math.random() * 256D));
- stream.writeWordBigEndian(101);
- stream.writeWordBigEndian(233);
- stream.writeWord(45092);
- if((int)(Math.random() * 2D) == 0)
- stream.writeWord(35784);
- stream.writeWordBigEndian((int)(Math.random() * 256D));
- stream.writeWordBigEndian(64);
- stream.writeWordBigEndian(38);
- stream.writeWord((int)(Math.random() * 65536D));
- stream.writeWord((int)(Math.random() * 65536D));
- stream.writeBytes(stream.currentOffset - i2);
- }
- int j2 = k1 * 192;
- if(j2 > 0x17f00)
- j2 = 0x17f00;
- if(j2 < 32768)
- j2 = 32768;
- if(j2 > anInt984)
- {
- anInt984 += (j2 - anInt984) / 24;
- return;
- }
- if(j2 < anInt984)
- {
- anInt984 += (j2 - anInt984) / 80;
- }
- }
- catch(Exception _ex)
- {
- SignLink.reporterror("glfc_ex " + myPlayer.x + "," + myPlayer.y + "," + anInt1014 + "," + anInt1015 + "," + anInt1069 + "," + anInt1070 + "," + baseX + "," + baseY);
- throw new RuntimeException("eek");
- }
- }
- public void processDrawing() {
- if(rsAlreadyLoaded || loadingError || genericLoadingError) {
- showErrorScreen();
- return;
- }
- //anInt1061++;
- if(!loggedIn) {
- drawLoginScreen(false);
- } else {
- drawGameScreen();
- }
- anInt1213 = 0;
- }
- private boolean isFriendOrSelf(String s) {
- if(s == null)
- return false;
- for(int i = 0; i < friendsCount; i++)
- if(s.equalsIgnoreCase(friendsList[i]))
- return true;
- return s.equalsIgnoreCase(myPlayer.name);
- }
- private static String combatDiffColor(int i, int j)
- {
- int k = i - j;
- if(!pvpWorld) {
- if(k < -9)
- return "@red@";
- if(k < -6)
- return "@or3@";
- if(k < -3)
- return "@or2@";
- if(k < 0)
- return "@or1@";
- if(k > 9)
- return "@gre@";
- if(k > 6)
- return "@gr3@";
- if(k > 3)
- return "@gr2@";
- if(k > 0)
- return "@gr1@";
- else
- return "@yel@";
- } else {
- if(k < -12)
- return "@whi@";
- if(k < -9)
- return "@red@";
- if(k < -6)
- return "@or3@";
- if(k < -3)
- return "@or2@";
- if(k < 0)
- return "@or1@";
- if(k > 12)
- return "@whi@";
- if(k > 9)
- return "@gre@";
- if(k > 6)
- return "@gr3@";
- if(k > 3)
- return "@gr2@";
- if(k > 0)
- return "@gr1@";
- else
- return "@yel@";
- }
- }
- private void setWaveVolume(int i)
- {
- SignLink.wavevol = i;
- }
- private int[] staffTabAnimations = {0,0,0};
- private void draw3dScreen() {
- if(snow) {
- method119(animationTimePassed, 11877);
- drawInterface(0, 0, 0, RSInterface.interfaceCache[11877]);
- }
- drawSplitPrivateChat();
- if(xpToDraw != 0 && drawFlag) {
- if(flagPos < 125)
- flagPos += 2;
- boldText.drawCenterAlignedString("+" + formatValue(xpToDraw, ",") + " xp", 256, 150-flagPos, 0xf5b241, 1, true);
- if(flagPos >= 125) {
- drawFlag = false;
- flagPos = 0;
- }
- } else {
- drawFlag = false;
- flagPos = 0;
- }
- if(drawXpBar) {
- String text = formatValue(myPlayer.xpCount, ",");
- if(myPlayer.xpCount > 214748364)
- text = "Lots!";
- if(xpToDraw > 0 && xpToDraw < 214748364)
- text = "+" + formatValue(xpToDraw, ",") + " xp " + text;
- int drawX = 483-regularFont.getTextWidth(text);
- cacheSprite[30].drawSprite(487, 49);
- regularText.drawLeftAlignedString(text, drawX, 65, 0xdcdcdc, 0, true);
- }
- if(anInt1055 == 1) {
- multiOverlay.drawSprite(472, 296-40); //MULTI ICON POSITION
- if(mouseInArea(479, 496, 263, 281) && openInterfaceID == -1)
- drawHoverBox(465-regularFont.getTextWidth("Multiway Combat"), 256, "Multiway Combat");
- }
- if(crossType == 1)
- {
- crosses[crossIndex / 100].drawSprite(crossX - 8, crossY - 8);
- anInt1142++;
- if(anInt1142 > 67)
- {
- anInt1142 = 0;
- stream.createFrame(78);
- }
- }
- if(crossType == 2)
- crosses[4 + crossIndex / 100].drawSprite(crossX - 8, crossY - 8);
- if(anInt1018 != -1)
- {
- method119(animationTimePassed, anInt1018);
- drawInterface(0, 0, 0, RSInterface.interfaceCache[anInt1018]);
- }
- drawStaffTab();
- processTaskDrawing();
- if(openInterfaceID != -1) {
- method119(animationTimePassed, openInterfaceID);
- drawInterface(0, 0, 0, RSInterface.interfaceCache[openInterfaceID]);
- }
- //method70();
- int x = baseX + (myPlayer.x - 6 >> 7);
- int y = baseY + (myPlayer.y - 6 >> 7);
- if(clientData) {
- int xPos = DrawingArea.width - 4;
- regularText.drawRightAlignedString("Fps: " + super.fps, xPos, 15, 0xffff00, -1, true);
- Runtime runtime = Runtime.getRuntime();
- int usedMemory = (int)((runtime.totalMemory() - runtime.freeMemory()) / 1024L);
- int maxMemory = (int)(runtime.totalMemory() / 1024L);
- regularText.drawRightAlignedString("Mem: " + usedMemory + "k / " + maxMemory + "k", xPos, 30, 0xffff00, -1, true);
- regularText.drawRightAlignedString("Mouse: " + super.mouseX + ", " + super.mouseY, xPos, 45, 0xffff00, -1, true);
- regularText.drawRightAlignedString("Coords: " + x + ", " + y, xPos, 60, 0xffff00, -1, true);
- regularText.drawRightAlignedString("Client size: " + clientWidth + "x" + clientHeight, xPos, 75, 0xffff00, -1, true);
- regularText.drawRightAlignedString("Loop cycle: " + loopCycle, xPos, 90, 0xffff00, -1, true);
- }
- if(anInt1104 != 0) {
- int j = anInt1104 / 50;
- int l = j / 60;
- j %= 60;
- if(j < 10)
- regularFont.method385(0xffff00, "System update in: " + l + ":0" + j, 329, 4);
- else
- regularFont.method385(0xffff00, "System update in: " + l + ":" + j, 329, 4);
- anInt849++;
- if(anInt849 > 75)
- {
- anInt849 = 0;
- stream.createFrame(148);
- }
- }
- alertHandler.processAlerts();
- }
- private void drawStaffTab() {
- if(myPrivilege >= 1 && myPrivilege <= 3 && StaffTabInUse && openInterfaceID == -1) {
- if(!staffTabOpen) {
- if(mouseInArea(496-staffTabAnimations[0], 515, 7, 38)) {
- StaffToggle.drawSprite(496-staffTabAnimations[0], 3, 230+staffTabAnimations[0]);
- if(staffTabAnimations[0] < 24)
- staffTabAnimations[0] += 2;
- } else {
- StaffToggle.drawSprite(496-staffTabAnimations[0], 3, 150+staffTabAnimations[0]);
- if(staffTabAnimations[0] > 0)
- staffTabAnimations[0] -= 2;
- }
- } else {
- StaffToggle.drawSprite(472, 3);
- staffTabAnimations[0] = 24;
- StaffType.drawSprite(343, 3);
- //if(mouseInArea(363, 477, 9, 30))
- if(showedName.length() == 0) {
- DrawingArea.fillRect(9, 349, 120, 21, 0xFFFFA0);
- if(staffTabInput.length() == 0 && !writingOnStaffTab)
- regularText.drawLeftAlignedString("Enter name...", 351, 22, 0xFFFFFD, 0, true);
- else if(staffTabInput.length() > 0 && !writingOnStaffTab)
- regularText.drawLeftAlignedString(staffTabInput, 351, 22, 0xFFFFFD, 0, true);
- else if(writingOnStaffTab)
- regularText.drawLeftAlignedString(staffTabInput + ((loopCycle % 40 < 20) ? "|" : ""), 351, 22, 0xFFFFFD, 0, true);
- } else if(showedName.equals("Error!")) {
- StaffError.drawSprite(350, 9);
- regularText.drawLeftAlignedString("Error!", 370, 22, 0xF3DE42, 0, true);
- } else {
- regularText.drawLeftAlignedString(showedName, 351, 22, 0xFFFFFD, 0, true);
- StaffSelectBg.drawSprite(343, 33, 200);
- smallFont.drawString(false, 376, 0xffffff, "Mute", 67);
- smallFont.drawString(false, 376, 0xffffff, "IP Mute", 90);
- smallFont.drawString(false, 376, 0xffffff, "Unmute", 113);
- smallFont.drawString(false, 376, 0xffffff, "Jail", 136);
- smallFont.drawString(false, 376, 0xffffff, "Unjail", 159);
- smallFont.drawString(false, 442, 0xffffff, "Ban", 67);
- smallFont.drawString(false, 442, 0xffffff, "IP Ban", 90);
- smallFont.drawString(false, 442, 0xffffff, "Unban", 113);
- smallFont.drawString(false, 442, 0xffffff, "Tele to", 136);
- smallFont.drawString(false, 442, 0xffffff, "Tele to me", 159);
- if(mouseInArea(355, 355+63, 54, 54+17))
- StaffSelectH.drawSprite(355, 54);
- else
- StaffSelect.drawSprite(355, 54);
- if(mouseInArea(355, 355+63, 77, 77+17))
- StaffSelectH.drawSprite(355, 77);
- else
- StaffSelect.drawSprite(355, 77);
- if(mouseInArea(355, 355+63, 100, 100+17))
- StaffSelectH.drawSprite(355, 100);
- else
- StaffSelect.drawSprite(355, 100);
- if(mouseInArea(355, 355+63, 123, 123+17))
- StaffSelectH.drawSprite(355, 123);
- else
- StaffSelect.drawSprite(355, 123);
- if(mouseInArea(355, 355+63, 146, 146+17))
- StaffSelectH.drawSprite(355, 146);
- else
- StaffSelect.drawSprite(355, 146);
- if(mouseInArea(421, 421+75, 54, 54+17))
- StaffSelectH.drawSprite(421, 54);
- else
- StaffSelect.drawSprite(421, 54);
- if(mouseInArea(421, 421+75, 77, 77+17))
- StaffSelectH.drawSprite(421, 77);
- else
- StaffSelect.drawSprite(421, 77);
- if(mouseInArea(421, 421+75, 100, 100+17))
- StaffSelectH.drawSprite(421, 100);
- else
- StaffSelect.drawSprite(421, 100);
- if(mouseInArea(421, 421+75, 123, 123+17))
- StaffSelectH.drawSprite(421, 123);
- else
- StaffSelect.drawSprite(421, 123);
- if(mouseInArea(421, 431+75, 146, 146+17))
- StaffSelectH.drawSprite(421, 146);
- else
- StaffSelect.drawSprite(421, 146);
- if(StaffTabSelected != -1) {
- int x = 0, y = 0;
- switch(StaffTabSelected) {
- case 0: x = 355; y = 54; break;
- case 1: x = 355; y = 77; break;
- case 2: x = 355; y = 100; break;
- case 3: x = 355; y = 123; break;
- case 4: x = 355; y = 146; break;
- case 5: x = 421; y = 54; break;
- case 6: x = 421; y = 77; break;
- case 7: x = 421; y = 100; break;
- case 8: x = 421; y = 123; break;
- case 9: x = 421; y = 146; break;
- }
- StaffSelected.drawSprite(x, y);
- StaffSend.drawSprite(430+staffTabAnimations[2], 182, staffTabAnimations[1]);
- if(staffTabAnimations[1] + 5 < 256)
- staffTabAnimations[1] += 5;
- if(mouseInArea(430, 490, 182, 213) && staffTabAnimations[2] <= 8)
- staffTabAnimations[2] += 2;
- if(!mouseInArea(430, 490, 182, 213) && staffTabAnimations[2] >= 2)
- staffTabAnimations[2] -= 2;
- } else {
- staffTabAnimations[1] = 0;
- staffTabAnimations[2] = 0;
- }
- }
- }
- }
- }
- private void addIgnore(long l)
- {
- try
- {
- if(l == 0L)
- return;
- if(ignoreCount >= 100)
- {
- pushMessage("Your ignore list is full. Max of 100 hit", 0, "");
- return;
- }
- String s = TextClass.fixName(TextClass.nameForLong(l));
- for(int j = 0; j < ignoreCount; j++)
- if(ignoreListAsLongs[j] == l)
- {
- pushMessage(s + " is already on your ignore list", 0, "");
- return;
- }
- for(int k = 0; k < friendsCount; k++)
- if(friendsListAsLongs[k] == l)
- {
- pushMessage("Please remove " + s + " from your friend list first", 0, "");
- return;
- }
- ignoreListAsLongs[ignoreCount++] = l;
- needDrawTabArea = true;
- stream.createFrame(133);
- stream.writeQWord(l);
- return;
- }
- catch(RuntimeException runtimeexception)
- {
- SignLink.reporterror("45688, " + l + ", " + 4 + ", " + runtimeexception.toString());
- }
- throw new RuntimeException();
- }
- private void method114()
- {
- for(int i = -1; i < playerCount; i++)
- {
- int j;
- if(i == -1)
- j = myPlayerIndex;
- else
- j = playerIndices[i];
- Player player = playerArray[j];
- if(player != null)
- method96(player);
- }
- }
- private void method115()
- {
- if(loadingStage == 2)
- {
- for(Class30_Sub1 class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetFirst(); class30_sub1 != null; class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetNext())
- {
- if(class30_sub1.anInt1294 > 0)
- class30_sub1.anInt1294--;
- if(class30_sub1.anInt1294 == 0)
- {
- if(class30_sub1.anInt1299 < 0 || ObjectManager.method178(class30_sub1.anInt1299, class30_sub1.anInt1301))
- {
- method142(class30_sub1.anInt1298, class30_sub1.anInt1295, class30_sub1.anInt1300, class30_sub1.anInt1301, class30_sub1.anInt1297, class30_sub1.anInt1296, class30_sub1.anInt1299);
- class30_sub1.unlink();
- }
- } else
- {
- if(class30_sub1.anInt1302 > 0)
- class30_sub1.anInt1302--;
- if(class30_sub1.anInt1302 == 0 && class30_sub1.anInt1297 >= 1 && class30_sub1.anInt1298 >= 1 && class30_sub1.anInt1297 <= 102 && class30_sub1.anInt1298 <= 102 && (class30_sub1.anInt1291 < 0 || ObjectManager.method178(class30_sub1.anInt1291, class30_sub1.anInt1293)))
- {
- method142(class30_sub1.anInt1298, class30_sub1.anInt1295, class30_sub1.anInt1292, class30_sub1.anInt1293, class30_sub1.anInt1297, class30_sub1.anInt1296, class30_sub1.anInt1291);
- class30_sub1.anInt1302 = -1;
- if(class30_sub1.anInt1291 == class30_sub1.anInt1299 && class30_sub1.anInt1299 == -1)
- class30_sub1.unlink();
- else
- if(class30_sub1.anInt1291 == class30_sub1.anInt1299 && class30_sub1.anInt1292 == class30_sub1.anInt1300 && class30_sub1.anInt1293 == class30_sub1.anInt1301)
- class30_sub1.unlink();
- }
- }
- }
- }
- }
- private void determineMenuSize() {
- int w = regularFont.getTextWidth("Choose Option");
- for(int j = 0; j < menuActionRow; j++) {
- int optW = 0;
- optW = regularFont.getTextWidth(menuActionName[j]);
- if(optW > w)
- w = optW;
- }
- w += 8;
- int h = 15 * menuActionRow + 22;
- int x = super.saveClickX - w / 2;
- if(x + w > 765)
- x = 765 - w;
- if(x < 0)
- x = 0;
- int y = super.saveClickY - 10;
- if(y + h > 503)
- y = 503 - h;
- if(y < 0)
- y = 0;
- menuOpen = true;
- menuScreenArea = 0;
- menuOffsetX = x;
- menuOffsetY = y;
- menuWidth = w;
- menuHeight = h;
- }
- private void method117(Stream stream)
- {
- stream.initBitAccess();
- int j = stream.readBits(1);
- if(j == 0)
- return;
- int k = stream.readBits(2);
- if(k == 0)
- {
- anIntArray894[anInt893++] = myPlayerIndex;
- return;
- }
- if(k == 1)
- {
- int l = stream.readBits(3);
- myPlayer.moveInDir(false, l);
- int k1 = stream.readBits(1);
- if(k1 == 1)
- anIntArray894[anInt893++] = myPlayerIndex;
- return;
- }
- if(k == 2)
- {
- int i1 = stream.readBits(3);
- myPlayer.moveInDir(true, i1);
- int l1 = stream.readBits(3);
- myPlayer.moveInDir(true, l1);
- int j2 = stream.readBits(1);
- if(j2 == 1)
- anIntArray894[anInt893++] = myPlayerIndex;
- return;
- }
- if(k == 3)
- {
- plane = stream.readBits(2);
- int j1 = stream.readBits(1);
- int i2 = stream.readBits(1);
- if(i2 == 1)
- anIntArray894[anInt893++] = myPlayerIndex;
- int k2 = stream.readBits(7);
- int l2 = stream.readBits(7);
- myPlayer.setPos(l2, k2, j1 == 1);
- }
- }
- private void nullLoader()
- {
- aBoolean831 = false;
- while(drawingFlames)
- {
- aBoolean831 = false;
- try
- {
- Thread.sleep(50L);
- }
- catch(Exception _ex) { }
- }
- //titleBox = null;
- titleBox1 = null;
- //titleButton = null;
- aBackgroundArray1152s = null;
- //anIntArray850 = null;
- anIntArray851 = null;
- anIntArray852 = null;
- anIntArray853 = null;
- anIntArray1190 = null;
- anIntArray1191 = null;
- //anIntArray828 = null;
- //anIntArray829 = null;
- aSprite_1201 = null;
- aSprite_1202 = null;
- }
- private boolean method119(int i, int j)
- {
- boolean flag1 = false;
- RSInterface class9 = RSInterface.interfaceCache[j];
- for(int k = 0; k < class9.children.length; k++)
- {
- if(class9.children[k] == -1)
- break;
- RSInterface class9_1 = RSInterface.interfaceCache[class9.children[k]];
- if(class9_1.interfaceType == 1)
- flag1 |= method119(i, class9_1.id);
- if(class9_1.interfaceType == 6 && (class9_1.disabledAnimation != -1 || class9_1.enabledAnimation != -1))
- {
- boolean flag2 = interfaceIsSelected(class9_1);
- int l;
- if(flag2)
- l = class9_1.enabledAnimation;
- else
- l = class9_1.disabledAnimation;
- if(l != -1)
- {
- Animation animation = Animation.anims[l];
- for(class9_1.animationDelay += i; class9_1.animationDelay > animation.method258(class9_1.animationLength);)
- {
- class9_1.animationDelay -= animation.method258(class9_1.animationLength) + 1;
- class9_1.animationLength++;
- if(class9_1.animationLength >= animation.anInt352)
- {
- class9_1.animationLength -= animation.anInt356;
- if(class9_1.animationLength < 0 || class9_1.animationLength >= animation.anInt352)
- class9_1.animationLength = 0;
- }
- flag1 = true;
- }
- }
- }
- }
- return flag1;
- }
- private int method120()
- {
- int j = 3;
- if(yCameraCurve < 310)
- {
- int k = xCameraPos >> 7;
- int l = yCameraPos >> 7;
- int i1 = myPlayer.x >> 7;
- int j1 = myPlayer.y >> 7;
- if((byteGroundArray[plane][k][l] & 4) != 0)
- j = plane;
- int k1;
- if(i1 > k)
- k1 = i1 - k;
- else
- k1 = k - i1;
- int l1;
- if(j1 > l)
- l1 = j1 - l;
- else
- l1 = l - j1;
- if(k1 > l1)
- {
- int i2 = (l1 * 0x10000) / k1;
- int k2 = 32768;
- while(k != i1)
- {
- if(k < i1)
- k++;
- else
- if(k > i1)
- k--;
- if((byteGroundArray[plane][k][l] & 4) != 0)
- j = plane;
- k2 += i2;
- if(k2 >= 0x10000)
- {
- k2 -= 0x10000;
- if(l < j1)
- l++;
- else
- if(l > j1)
- l--;
- if((byteGroundArray[plane][k][l] & 4) != 0)
- j = plane;
- }
- }
- } else
- {
- int j2 = (k1 * 0x10000) / l1;
- int l2 = 32768;
- while(l != j1)
- {
- if(l < j1)
- l++;
- else
- if(l > j1)
- l--;
- if((byteGroundArray[plane][k][l] & 4) != 0)
- j = plane;
- l2 += j2;
- if(l2 >= 0x10000)
- {
- l2 -= 0x10000;
- if(k < i1)
- k++;
- else
- if(k > i1)
- k--;
- if((byteGroundArray[plane][k][l] & 4) != 0)
- j = plane;
- }
- }
- }
- }
- if((byteGroundArray[plane][myPlayer.x >> 7][myPlayer.y >> 7] & 4) != 0)
- j = plane;
- return j;
- }
- private int method121()
- {
- int j = method42(plane, yCameraPos, xCameraPos);
- if(j - zCameraPos < 800 && (byteGroundArray[plane][xCameraPos >> 7][yCameraPos >> 7] & 4) != 0)
- return plane;
- else
- return 3;
- }
- private void delIgnore(long l)
- {
- try
- {
- if(l == 0L)
- return;
- for(int j = 0; j < ignoreCount; j++)
- if(ignoreListAsLongs[j] == l)
- {
- ignoreCount--;
- needDrawTabArea = true;
- System.arraycopy(ignoreListAsLongs, j + 1, ignoreListAsLongs, j, ignoreCount - j);
- stream.createFrame(74);
- stream.writeQWord(l);
- return;
- }
- return;
- }
- catch(RuntimeException runtimeexception)
- {
- SignLink.reporterror("47229, " + 3 + ", " + l + ", " + runtimeexception.toString());
- }
- throw new RuntimeException();
- }
- private void chatJoin(long l) {
- try {
- if(l == 0L)
- return;
- stream.createFrame(60);
- stream.writeQWord(l);
- return;
- }
- catch(RuntimeException runtimeexception)
- {
- SignLink.reporterror("47229, " + 3 + ", " + l + ", " + runtimeexception.toString());
- }
- throw new RuntimeException();
- }
- public String getParameter(String s)
- {
- if(SignLink.mainapp != null)
- return SignLink.mainapp.getParameter(s);
- else
- return super.getParameter(s);
- }
- /*private void adjustVolume(boolean flag, int i)
- {
- SignLink.midivol = i;
- if(flag)
- SignLink.midi = "voladjust";
- }*/
- private int extractInterfaceValues(RSInterface class9, int j)
- {
- if(class9.valueIndexArray == null || j >= class9.valueIndexArray.length)
- return -2;
- try
- {
- int ai[] = class9.valueIndexArray[j];
- int k = 0;
- int l = 0;
- int i1 = 0;
- do
- {
- int j1 = ai[l++];
- int k1 = 0;
- byte byte0 = 0;
- if(j1 == 0)
- return k;
- if(j1 == 1)
- k1 = currentStats[ai[l++]];
- if(j1 == 2)
- k1 = maxStats[ai[l++]];
- if(j1 == 3)
- k1 = currentExp[ai[l++]];
- if(j1 == 4)
- {
- RSInterface class9_1 = RSInterface.interfaceCache[ai[l++]];
- int k2 = ai[l++];
- if(k2 >= 0 && k2 < ItemDef.totalItems && (!ItemDef.forID(k2).membersObject || isMembers))
- {
- for(int j3 = 0; j3 < class9_1.inventory.length; j3++)
- if(class9_1.inventory[j3] == k2 + 1)
- k1 += class9_1.inventoryValue[j3];
- }
- }
- if(j1 == 5)
- k1 = variousSettings[ai[l++]];
- if(j1 == 6)
- k1 = anIntArray1019[maxStats[ai[l++]] - 1];
- if(j1 == 7)
- k1 = (variousSettings[ai[l++]] * 100) / 46875;
- if(j1 == 8)
- k1 = myPlayer.combatLevel;
- if(j1 == 9)
- {
- for(int l1 = 0; l1 < Skills.skillsCount; l1++)
- if(Skills.skillEnabled[l1])
- k1 += maxStats[l1];
- }
- if(j1 == 10)
- {
- RSInterface class9_2 = RSInterface.interfaceCache[ai[l++]];
- int l2 = ai[l++] + 1;
- if(l2 >= 0 && l2 < ItemDef.totalItems && (!ItemDef.forID(l2).membersObject || isMembers))
- {
- for(int k3 = 0; k3 < class9_2.inventory.length; k3++)
- {
- if(class9_2.inventory[k3] != l2)
- continue;
- k1 = 0x3b9ac9ff;
- break;
- }
- }
- }
- if(j1 == 11)
- k1 = energy;
- if(j1 == 12)
- k1 = weight;
- if(j1 == 13)
- {
- int i2 = variousSettings[ai[l++]];
- int i3 = ai[l++];
- k1 = (i2 & 1 << i3) == 0 ? 0 : 1;
- }
- if(j1 == 14)
- {
- int j2 = ai[l++];
- VarBit varBit = VarBit.cache[j2];
- int l3 = varBit.anInt648;
- int i4 = varBit.anInt649;
- int j4 = varBit.anInt650;
- int k4 = anIntArray1232[j4 - i4];
- k1 = variousSettings[l3] >> i4 & k4;
- }
- if(j1 == 15)
- byte0 = 1;
- if(j1 == 16)
- byte0 = 2;
- if(j1 == 17)
- byte0 = 3;
- if(j1 == 18)
- k1 = (myPlayer.x >> 7) + baseX;
- if(j1 == 19)
- k1 = (myPlayer.y >> 7) + baseY;
- if(j1 == 20)
- k1 = ai[l++];
- if(byte0 == 0)
- {
- if(i1 == 0)
- k += k1;
- if(i1 == 1)
- k -= k1;
- if(i1 == 2 && k1 != 0)
- k /= k1;
- if(i1 == 3)
- k *= k1;
- i1 = 0;
- } else
- {
- i1 = byte0;
- }
- } while(true);
- }
- catch(Exception _ex)
- {
- return -1;
- }
- }
- private void drawTooltip() {
- String s;
- if(itemSelected == 1 && menuActionRow < 2)
- s = "Use " + selectedItemName + " ->";
- else if(spellSelected == 1 && menuActionRow < 2)
- s = spellTooltip + " ->";
- else
- s = menuActionName[menuActionRow - 1];
- if(menuActionRow > 2)
- s = s + "@whi@ / " + (menuActionRow - 2) + " more options";
- if(s.equals("Cancel"))
- return;
- regularFont.method390(4, 0xffffff, s, loopCycle / 1000, 15); //chatTextDrawingArea for bolded, aTextDrawingArea_1271 for non-bolded
- }
- private void drawTooltipBox() {
- if(menuActionRow < 2 && itemSelected == 0 && spellSelected == 0)
- return;
- String s;
- if(itemSelected == 1 && menuActionRow < 2)
- s = "Use " + selectedItemName + " ->";
- else if(spellSelected == 1 && menuActionRow < 2)
- s = spellTooltip + "...";
- else
- s = menuActionName[menuActionRow - 1];
- if(tooltipToggle && !s.contains("Walk here") && !s.equals("Ok") && !s.equals("Select") && !s.equals("Auto Retaliate") && !s.contains("guide") &&
- !s.contains("Friend") && !s.contains("Name") && !s.contains("Chat") && !s.startsWith("Activate") && !s.contains("View") && !s.contains("Report") &&
- !s.startsWith("Toggle") && !s.equals("") && !s.equals(" ") && !s.startsWith("Show") && !s.equals("Hide") && !s.equals("Close") && !s.startsWith("Accept") &&
- !s.startsWith("Decline") && !s.startsWith("Confirm") && !s.startsWith("Cancel") && !s.equals("World Map")) {
- int Xpos = 0, Ypos = 0;
- int text = (boldFont.getTextWidth(menuActionName[menuActionRow - 1].replaceAll("@...@", "")))/9;
- if(super.mouseY + 38 > 501 - 12)
- Ypos = super.mouseY + 38 - 501 + 12;
- if(super.mouseX + 20 + text*10 + 10 > 764 - 13)
- Xpos = super.mouseX + 20 + text*10 + 10 - 764 + 13;
- cacheSprite[31].drawHDSprite(super.mouseX + 20 - Xpos, super.mouseY + 20 - Ypos);
- cacheSprite[37].drawHDSprite(super.mouseX + 20 - Xpos, super.mouseY + 31 - Ypos);
- cacheSprite[34].drawHDSprite(super.mouseX + 20 - Xpos, super.mouseY + 38 - Ypos);
- int size = (boldFont.getTextWidth(menuActionName[menuActionRow - 1].replaceAll("@...@", "")))/9;
- for(int i=0; i<size; i++) {
- cacheSprite[32].drawHDSprite(super.mouseX + 30 + (i*10) - Xpos, super.mouseY + 20 - Ypos);
- cacheSprite[35].drawHDSprite(super.mouseX + 30 + (i*10) - Xpos, super.mouseY + 38 - Ypos);
- cacheSprite[38].drawHDSprite(super.mouseX + 30 + (i*10) - Xpos, super.mouseY + 31 - Ypos);
- }
- cacheSprite[33].drawHDSprite(super.mouseX + 20 + size*10 + 10 - Xpos, super.mouseY + 20 - Ypos);
- cacheSprite[36].drawHDSprite(super.mouseX + 20 + size*10 + 10 - Xpos, super.mouseY + 38 - Ypos);
- cacheSprite[39].drawHDSprite(super.mouseX + 20 + size*10 + 10 - Xpos, super.mouseY + 31 - Ypos);
- boldFont.method390(super.mouseX + 33 - Xpos, 0xffffff, menuActionName[menuActionRow - 1], loopCycle / 1000, super.mouseY + 40 - Ypos);
- }
- }
- private void drawMinimap() {
- miniMapArea.initDrawingArea();
- if(miniMapOverlay == 2) {
- Black[getSpriteID()].drawSprite(0, 0);
- loadOrbs();
- return;
- }
- int i = minimapInt1 + minimapInt2 & 0x7ff;
- int j = 48 + myPlayer.x / 32;
- int l2 = 464 - myPlayer.y / 32;
- for(int j1 = 0; j1 < minimapClipLeft.length; j1++) {
- minimapClipLeft[j1] = 172;
- minimapClipRight[j1] = -22;
- }
- minimap.drawRotatedSprite(152, i, minimapClipLeft, 256 + minimapInt3, minimapClipRight, l2, 9, 38, 146, j);
- compass.drawRotatedSprite(33, minimapInt1, compassClipLeft, 256, compassClipRight, 25, 8, 11, 33, 25);
- for(int j5 = 0; j5 < anInt1071; j5++) {
- try {
- int k = (anIntArray1072[j5] * 4 + 2) - myPlayer.x / 32;
- int i3 = (anIntArray1073[j5] * 4 + 2) - myPlayer.y / 32;
- markMinimap(aSpriteArray1140[j5], k, i3, false);
- } catch(Exception exception) {
- }
- }
- for(int k5 = 0; k5 < 104; k5++) {
- for(int l5 = 0; l5 < 104; l5++) {
- NodeList class19 = groundArray[plane][k5][l5];
- if(class19 != null) {
- int l = (k5 * 4 + 2) - myPlayer.x / 32;
- int j3 = (l5 * 4 + 2) - myPlayer.y / 32;
- markMinimap(mapDotItem, l, j3, false);
- }
- }
- }
- for(int i6 = 0; i6 < npcCount; i6++) {
- Npc npc = npcArray[npcIndices[i6]];
- if(npc != null && npc.isVisible()) {
- NpcDef entityDef = npc.desc;
- if(entityDef.childrenIDs != null)
- entityDef = entityDef.method161();
- if(entityDef != null && entityDef.drawMinimapDot && entityDef.canRightClick) {
- int i1 = npc.x / 32 - myPlayer.x / 32;
- int k3 = npc.y / 32 - myPlayer.y / 32;
- markMinimap(mapDotNPC, i1, k3, false);
- }
- }
- }
- for(int j6 = 0; j6 < playerCount; j6++) {
- Player player = playerArray[playerIndices[j6]];
- if(player != null && player.isVisible()) {
- int j1 = player.x / 32 - myPlayer.x / 32;
- int l3 = player.y / 32 - myPlayer.y / 32;
- boolean flag1 = false;
- boolean flag3 = false;
- for(int j3 = 0; j3 < clanList.length; j3++) {
- if(clanList[j3] == null)
- continue;
- if(!clanList[j3].equalsIgnoreCase(player.name))
- continue;
- flag3 = true;
- break;
- }
- long l6 = TextClass.longForName(player.name);
- for(int k6 = 0; k6 < friendsCount; k6++) {
- if(l6 != friendsListAsLongs[k6] || friendsNodeIDs[k6] == 0)
- continue;
- flag1 = true;
- break;
- }
- boolean flag2 = false;
- if(myPlayer.team != 0 && player.team != 0 && myPlayer.team == player.team)
- flag2 = true;
- if(flag1)
- markMinimap(mapDotFriend, j1, l3, false);
- else if(flag3)
- markMinimap(mapDotClan, j1, l3, false);
- else if(flag2)
- markMinimap(mapDotTeam, j1, l3, false);
- else
- markMinimap(mapDotPlayer, j1, l3, false);
- }
- }
- if(anInt855 != 0 && loopCycle % 20 < 10) {
- if(anInt855 == 1 && anInt1222 >= 0 && anInt1222 < npcArray.length) {
- Npc class30_sub2_sub4_sub1_sub1_1 = npcArray[anInt1222];
- if(class30_sub2_sub4_sub1_sub1_1 != null) {
- int k1 = class30_sub2_sub4_sub1_sub1_1.x / 32 - myPlayer.x / 32;
- int i4 = class30_sub2_sub4_sub1_sub1_1.y / 32 - myPlayer.y / 32;
- method81(mapMarker, i4, k1);
- }
- }
- if(anInt855 == 2) {
- int l1 = ((anInt934 - baseX) * 4 + 2) - myPlayer.x / 32;
- int j4 = ((anInt935 - baseY) * 4 + 2) - myPlayer.y / 32;
- method81(mapMarker, j4, l1);
- }
- if(anInt855 == 10 && anInt933 >= 0 && anInt933 < playerArray.length) {
- Player class30_sub2_sub4_sub1_sub2_1 = playerArray[anInt933];
- if(class30_sub2_sub4_sub1_sub2_1 != null) {
- int i2 = class30_sub2_sub4_sub1_sub2_1.x / 32 - myPlayer.x / 32;
- int k4 = class30_sub2_sub4_sub1_sub2_1.y / 32 - myPlayer.y / 32;
- method81(mapMarker, k4, i2);
- }
- }
- }
- if(destX != 0) {
- int j2 = (destX * 4 + 2) - myPlayer.x / 32;
- int l4 = (destY * 4 + 2) - myPlayer.y / 32;
- markMinimap(mapFlag, j2, l4, false);
- }
- CustomMapback[getSpriteID()].drawSprite(0, 0);
- loadOrbs();
- DrawingArea.fillRect(108, 84, 3, 3, 0xffffff);
- if(menuOpen)
- drawMenu(516, 0);
- drawDeveloperConsole(showDeveloperConsole, 516, 0);
- miniMapArea.drawGraphics(516, 0, graphics);
- mainGameArea.initDrawingArea();
- }
- private void npcScreenPos(Mobile entity, int i) {
- calcEntityScreenPos(entity.x, i, entity.y);
- }
- private void calcEntityScreenPos(int i, int j, int l) {
- if(i < 128 || l < 128 || i > 13056 || l > 13056) {
- spriteDrawX = -1;
- spriteDrawY = -1;
- return;
- }
- int i1 = method42(plane, l, i) - j;
- i -= xCameraPos;
- i1 -= zCameraPos;
- l -= yCameraPos;
- int j1 = Model.modelIntArray1[yCameraCurve];
- int k1 = Model.modelIntArray2[yCameraCurve];
- int l1 = Model.modelIntArray1[xCameraCurve];
- int i2 = Model.modelIntArray2[xCameraCurve];
- int j2 = l * l1 + i * i2 >> 16;
- l = l * i2 - i * l1 >> 16;
- i = j2;
- j2 = i1 * k1 - l * j1 >> 16;
- l = i1 * j1 + l * k1 >> 16;
- i1 = j2;
- if(l >= 50) {
- spriteDrawX = Texture.textureInt1 + (i << 9) / l;
- spriteDrawY = Texture.textureInt2 + (i1 << 9) / l;
- } else {
- spriteDrawX = -1;
- spriteDrawY = -1;
- }
- }
- private void buildSplitPrivateChatMenu()
- {
- if(splitPrivateChat == 0)
- return;
- int i = 0;
- if(anInt1104 != 0)
- i = 1;
- for(int j = 0; j < 100; j++)
- if(chatMessages[j] != null)
- {
- int k = chatTypes[j];
- String s = chatNames[j];
- if(s != null && s.startsWith("@cr1@")) {
- s = s.substring(6);
- }
- if(s != null && s.startsWith("@cr2@")) {
- s = s.substring(6);
- }
- if(s != null && s.startsWith("@cr3@")) {
- s = s.substring(6);
- }
- if(s != null && s.startsWith("@cr0@")) {
- s = s.substring(6);
- }
- if((k == 3 || k == 7) && (k == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s)))
- {
- int l = 329 - i * 13;
- if(super.mouseX > 0 && super.mouseY > l - 10 && super.mouseY <= l + 3)
- {
- int i1 = regularFont.getTextWidth("From: " + s + chatMessages[j]) + 25;
- if(i1 > 450)
- i1 = 450;
- if(super.mouseX < 4 + i1)
- {
- menuActionName[menuActionRow] = "Add ignore @whi@" + s;
- menuActionID[menuActionRow] = 2042;
- menuActionRow++;
- menuActionName[menuActionRow] = "Add friend @whi@" + s;
- menuActionID[menuActionRow] = 2337;
- menuActionRow++;
- }
- }
- if(++i >= 5)
- return;
- }
- if((k == 5 || k == 6) && privateChatMode < 2 && ++i >= 5)
- return;
- }
- }
- private void method130(int j, int k, int l, int i1, int j1, int k1,
- int l1, int i2, int j2)
- {
- Class30_Sub1 class30_sub1 = null;
- for(Class30_Sub1 class30_sub1_1 = (Class30_Sub1)aClass19_1179.reverseGetFirst(); class30_sub1_1 != null; class30_sub1_1 = (Class30_Sub1)aClass19_1179.reverseGetNext())
- {
- if(class30_sub1_1.anInt1295 != l1 || class30_sub1_1.anInt1297 != i2 || class30_sub1_1.anInt1298 != j1 || class30_sub1_1.anInt1296 != i1)
- continue;
- class30_sub1 = class30_sub1_1;
- break;
- }
- if(class30_sub1 == null)
- {
- class30_sub1 = new Class30_Sub1();
- class30_sub1.anInt1295 = l1;
- class30_sub1.anInt1296 = i1;
- class30_sub1.anInt1297 = i2;
- class30_sub1.anInt1298 = j1;
- method89(class30_sub1);
- aClass19_1179.insertHead(class30_sub1);
- }
- class30_sub1.anInt1291 = k;
- class30_sub1.anInt1293 = k1;
- class30_sub1.anInt1292 = l;
- class30_sub1.anInt1302 = j2;
- class30_sub1.anInt1294 = j;
- }
- private boolean interfaceIsSelected(RSInterface class9)
- {
- if(class9.valueCompareType == null)
- return false;
- for(int i = 0; i < class9.valueCompareType.length; i++)
- {
- int j = extractInterfaceValues(class9, i);
- int k = class9.requiredValues[i];
- if(class9.valueCompareType[i] == 2)
- {
- if(j >= k)
- return false;
- } else
- if(class9.valueCompareType[i] == 3)
- {
- if(j <= k)
- return false;
- } else
- if(class9.valueCompareType[i] == 4)
- {
- if(j == k)
- return false;
- } else
- if(j != k)
- return false;
- }
- return true;
- }
- /*private DataInputStream openJagGrabInputStream(String s)
- throws IOException
- {
- // if(!aBoolean872)
- // if(SignLink.mainapp != null)
- // return SignLink.openurl(s);
- // else
- // return new DataInputStream((new URL(getCodeBase(), s)).openStream());
- if(aSocket832 != null)
- {
- try
- {
- aSocket832.close();
- System.out.println("Here5");
- }
- catch(Exception _ex) { }
- aSocket832 = null;
- }
- aSocket832 = openSocket(43594);//43594
- aSocket832.setSoTimeout(10000);
- java.io.InputStream inputstream = aSocket832.getInputStream();
- OutputStream outputstream = aSocket832.getOutputStream();
- outputstream.write(("JAGGRAB /" + s + "\n\n").getBytes());
- return new DataInputStream(inputstream);
- }*/
- /*private void doFlamesDrawing()
- {
- char c = '\u0100';
- if(anInt1040 > 0)
- {
- for(int i = 0; i < 256; i++)
- if(anInt1040 > 768)
- anIntArray850[i] = method83(anIntArray851[i], anIntArray852[i], 1024 - anInt1040);
- else
- if(anInt1040 > 256)
- anIntArray850[i] = anIntArray852[i];
- else
- anIntArray850[i] = method83(anIntArray852[i], anIntArray851[i], 256 - anInt1040);
- } else
- if(anInt1041 > 0)
- {
- for(int j = 0; j < 256; j++)
- if(anInt1041 > 768)
- anIntArray850[j] = method83(anIntArray851[j], anIntArray853[j], 1024 - anInt1041);
- else
- if(anInt1041 > 256)
- anIntArray850[j] = anIntArray853[j];
- else
- anIntArray850[j] = method83(anIntArray853[j], anIntArray851[j], 256 - anInt1041);
- } else
- {
- System.arraycopy(anIntArray851, 0, anIntArray850, 0, 256);
- }
- System.arraycopy(aSprite_1201.myPixels, 0, leftSideFlame.anIntArray315, 0, 33920);
- int i1 = 0;
- int j1 = 1152;
- for(int k1 = 1; k1 < c - 1; k1++)
- {
- int l1 = (anIntArray969[k1] * (c - k1)) / c;
- int j2 = 22 + l1;
- if(j2 < 0)
- j2 = 0;
- i1 += j2;
- for(int l2 = j2; l2 < 128; l2++)
- {
- int j3 = anIntArray828[i1++];
- if(j3 != 0)
- {
- int l3 = j3;
- int j4 = 256 - j3;
- j3 = anIntArray850[j3];
- int l4 = leftSideFlame.anIntArray315[j1];
- leftSideFlame.anIntArray315[j1++] = ((j3 & 0xff00ff) * l3 + (l4 & 0xff00ff) * j4 & 0xff00ff00) + ((j3 & 0xff00) * l3 + (l4 & 0xff00) * j4 & 0xff0000) >> 8;
- } else
- {
- j1++;
- }
- }
- j1 += j2;
- }
- leftSideFlame.drawGraphics(0, super.graphics, 0);
- System.arraycopy(aSprite_1202.myPixels, 0, rightSideFlame.anIntArray315, 0, 33920);
- i1 = 0;
- j1 = 1176;
- for(int k2 = 1; k2 < c - 1; k2++)
- {
- int i3 = (anIntArray969[k2] * (c - k2)) / c;
- int k3 = 103 - i3;
- j1 += i3;
- for(int i4 = 0; i4 < k3; i4++)
- {
- int k4 = anIntArray828[i1++];
- if(k4 != 0)
- {
- int i5 = k4;
- int j5 = 256 - k4;
- k4 = anIntArray850[k4];
- int k5 = rightSideFlame.anIntArray315[j1];
- rightSideFlame.anIntArray315[j1++] = ((k4 & 0xff00ff) * i5 + (k5 & 0xff00ff) * j5 & 0xff00ff00) + ((k4 & 0xff00) * i5 + (k5 & 0xff00) * j5 & 0xff0000) >> 8;
- } else
- {
- j1++;
- }
- }
- i1 += 128 - k3;
- j1 += 128 - k3 - i3;
- }
- rightSideFlame.drawGraphics(0, super.graphics, 637);
- }*/
- private void method134(Stream stream)
- {
- int j = stream.readBits(8);
- if(j < playerCount)
- {
- for(int k = j; k < playerCount; k++)
- anIntArray840[anInt839++] = playerIndices[k];
- }
- if(j > playerCount)
- {
- SignLink.reporterror(myUsername + " Too many players");
- throw new RuntimeException("eek");
- }
- playerCount = 0;
- for(int l = 0; l < j; l++)
- {
- int i1 = playerIndices[l];
- Player player = playerArray[i1];
- int j1 = stream.readBits(1);
- if(j1 == 0)
- {
- playerIndices[playerCount++] = i1;
- player.anInt1537 = loopCycle;
- } else
- {
- int k1 = stream.readBits(2);
- if(k1 == 0)
- {
- playerIndices[playerCount++] = i1;
- player.anInt1537 = loopCycle;
- anIntArray894[anInt893++] = i1;
- } else
- if(k1 == 1)
- {
- playerIndices[playerCount++] = i1;
- player.anInt1537 = loopCycle;
- int l1 = stream.readBits(3);
- player.moveInDir(false, l1);
- int j2 = stream.readBits(1);
- if(j2 == 1)
- anIntArray894[anInt893++] = i1;
- } else
- if(k1 == 2)
- {
- playerIndices[playerCount++] = i1;
- player.anInt1537 = loopCycle;
- int i2 = stream.readBits(3);
- player.moveInDir(true, i2);
- int k2 = stream.readBits(3);
- player.moveInDir(true, k2);
- int l2 = stream.readBits(1);
- if(l2 == 1)
- anIntArray894[anInt893++] = i1;
- } else
- if(k1 == 3)
- anIntArray840[anInt839++] = i1;
- }
- }
- }
- void drawFrames() {
- if(fullScreenOn)
- return;
- NamedArchive mediaArchive = streamLoaderForName(4, "2d graphics", "media", expectedCRCs[4], 40);
- Sprite sprite = new Sprite(mediaArchive, "screenframe", 0);
- leftFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
- sprite.method346(0, 0);
- if (menuOpen) {
- drawMenu(0, 4);
- }
- drawDeveloperConsole(showDeveloperConsole, 0, 4);
- sprite = new Sprite(mediaArchive, "screenframe", 1);
- topFrame = new RSImageProducer(516, sprite.myHeight, getGameComponent());
- sprite.method346(0, 0);
- if (menuOpen) {
- drawMenu(0, 0);
- }
- drawDeveloperConsole(showDeveloperConsole, 0, 0);
- topFrame.drawGraphics(0, 0, super.graphics);
- leftFrame.drawGraphics(0, 4, super.graphics);
- mainGameArea.initDrawingArea();
- }
- String developerConsoleInput = "";
- private void drawDeveloperConsole(boolean draw, int xOff, int yOff) {
- if(!draw)
- return;
- DrawingArea.fillRect(0-xOff, 0-yOff, clientWidth, 300, 0x2D1D6B, 100);
- DrawingArea.fillRect(0-xOff, 282-yOff, clientWidth, 1, 0xffffff, 255);
- boldFont.drawString(true, 10-xOff, 0xffffff, "-->", 295-yOff);
- boldFont.drawString(true, 37-xOff, 0xffffff, developerConsoleInput, 295-yOff);
- regularText.drawLeftAlignedString(loopCycle % 40 < 20 ? "|" : "", 36+boldFont.getTextWidth(developerConsoleInput)-xOff, 297-yOff, 0xffffff, -1, false);
- int yPos = 290 - yOff - 100 * 18;
- for(int i = 99; i >= 0; i--) {
- regularText.drawLeftAlignedString(developerConsoleHistory[i], 8-xOff, yPos, 0xffffff, 0, false);
- yPos += 18;
- }
- }
- private void handleDeveloperConsoleInput(int j) {
- if(j >= 32 && j <= 122 && developerConsoleInput.length() < 80) {
- developerConsoleInput += (char)j;
- inputTaken = true;
- }
- if(j == 8 && developerConsoleInput.length() > 0) {
- developerConsoleInput = developerConsoleInput.substring(0, developerConsoleInput.length() - 1);
- inputTaken = true;
- }
- if((j == 13 || j == 10) && developerConsoleInput.length() > 0) {
- sendDeveloperConsole("--> " + developerConsoleInput);
- if(loggedIn) {
- stream.createFrame(103);
- stream.writeWordBigEndian(developerConsoleInput.length() + 1);
- stream.writeString(developerConsoleInput);
- }
- developerConsoleInput = "";
- }
- }
- private String[] developerConsoleHistory = new String[100];
- private void sendDeveloperConsole(String message) {
- if(message.equalsIgnoreCase("--> cls")) {
- for(int i = 0; i < developerConsoleHistory.length; i++)
- developerConsoleHistory[i] = "";
- } else {
- for(int j = 99; j > 0; j--)
- developerConsoleHistory[j] = developerConsoleHistory[j - 1];
- developerConsoleHistory[0] = getTime() + ": " + message;
- }
- if(message.startsWith("-->"))
- handleDeveloperConsoleCommand(message.substring(4).toLowerCase());
- }
- private String getTime() {
- Calendar cal = Calendar.getInstance();
- SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
- return sdf.format(cal.getTime());
- }
- private void handleDeveloperConsoleCommand(String cmd) {
- if(cmd.equals("commands") || cmd.equals("help")) {
- sendDeveloperConsole("cls - Clear console");
- sendDeveloperConsole("adminmode - Toggle administrator mode");
- sendDeveloperConsole("mem - Toggle high and low");
- sendDeveloperConsole("src - Toggle resizable and fixed screen modes");
- if(myPrivilege == 3) {
- sendDeveloperConsole("noclip - Toggle noclip on and off");
- }
- }
- /*if(cmd.equals("src")) {
- fullScreenOn = !fullScreenOn;
- sendDeveloperConsole("Screen mode: " + (fullScreenOn ? "resizable" : "fixed"));
- if(fullScreenOn)
- setFullScreen();
- else
- setFixedScreen();
- }*/
- if(cmd.equals("adminmode")) {
- if(adminMode) {
- sendDeveloperConsole("Administator mode off");
- clientData = false;
- adminMode = false;
- idToggle = false;
- } else {
- sendDeveloperConsole("Administator mode on");
- clientData = true;
- adminMode = true;
- idToggle = true;
- }
- }
- if(cmd.equals("mem")) {
- if(lowMem) {
- setHighMem();
- sendDeveloperConsole("High memory set");
- } else {
- setLowMem();
- sendDeveloperConsole("Low memory set");
- }
- }
- if(myPrivilege == 3) {
- if(cmd.equals("noclip")) {
- isNoclipping = !isNoclipping;
- sendDeveloperConsole("Noclip " + (isNoclipping ? "on" : "off"));
- }
- }
- }
- boolean isNoclipping = false;
- private void Noclip() {
- for(int k1 = 0; k1 < 4; k1++) {
- for(int i2 = 1; i2 < 103; i2++) {
- for(int k2 = 1; k2 < 103; k2++) {
- aClass11Array1230[k1].anIntArrayArray294[i2][k2] = 0;
- }
- }
- }
- }
- void drawGlowBorderRect(int x, int y, int w, int h, int color, int maxOpacity, int thickness, boolean inset) {
- for(int i = 0; i < thickness; i++) {
- DrawingArea.drawRect(x+i, y+i, w-i*2, h-i*2, color, (int)((float)maxOpacity/thickness*(!inset ? i : thickness-i)));
- }
- }
- void drawGlowBorderRect2(int x, int y, int w, int h, int color, int maxOpacity, int thickness, boolean inset) {
- for(int i = 0; i < thickness; i++) {
- DrawingArea.drawRect(inset ? x+i : x-i, inset ? y+i : y-i, inset ? w-i*2 : w+i*2, inset ? h-i*2 : h+i*2, color, (int)((float)maxOpacity/thickness*(thickness-i)));
- }
- }
- private void drawLoginBox(int centerX, int centerY) {
- DrawingArea.fillRect(centerX - 240, centerY - 70, 480, 190, 0xffffff, 25); //outside border
- DrawingArea.fillRect(centerX - 235, centerY - 65, 470, 180, 0, 75); //block box
- Sprite shadow = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/shadow.png", 498, 302);
- shadow.drawHDSprite(centerX - 250, centerY - 172);
- Sprite login = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/login.png", 30, 30);
- login.drawSprite(centerX + 150, centerY, mouseInArea(centerX + 150, centerX + 180, centerY, centerY + 30) ? 70 : 50);
- DrawingArea.fillRect(centerX - 180, centerY, 160, 30, 0xffffff, mouseInArea(centerX - 180, centerX - 180 + 160, centerY, centerY + 30) ? 70 : 50); //username bg
- DrawingArea.fillRect(centerX - 15, centerY, 160, 30, 0xffffff, mouseInArea(centerX - 15, centerX - 15 + 160, centerY, centerY + 30) ? 70 : 50); //password bg
- boldText.drawLeftAlignedString("<trans=100>Username:", centerX - 180, centerY - 10, 0xffffff, -1, true);
- boldText.drawLeftAlignedString("<trans=100>Password:", centerX - 15, centerY - 10, 0xffffff, -1, true);
- boldFont.drawString(true, centerX - 172, 0xffffff, capitalize(myUsername) + ((loginScreenCursorPos == 0) & (loopCycle % 40 < 20) ? "@yel@|" : ""), centerY + 20);
- boldFont.drawString(true, centerX - 7, 0xffffff, TextClass.passwordAsterisks(myPassword) + ((loginScreenCursorPos == 1) & (loopCycle % 40 < 20) ? "@yel@|" : ""), centerY + 20);
- DrawingArea.fillRect(centerX - 175, centerY + 50, 20, 20, 0xffffff, mouseInArea(centerX - 175, centerX - 45, centerY + 50, centerY + 70) ? 75 : 50); //remember me box bg
- boldText.drawLeftAlignedString("<trans=100>Remember me?", centerX - 150, centerY + 67, 0xffffff, -1, true);
- if(rememberMe) {
- Sprite rememberme = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/rememberme.png", 20, 20);
- rememberme.setTransparency(255, 0, 255);
- rememberme.drawSprite(centerX - 175, centerY + 50, 100);
- }
- if(nameRemembered) {
- Sprite delete = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/delete.png", 24, 25);
- delete.drawHDSprite(353, 350, mouseInArea(353, 377, 350, 375) ? 150 : 75);
- if(mouseInArea(353, 377, 350, 375)) {
- Sprite pointer = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/pointer.png", 47, 17);
- pointer.drawHDSprite(318, 337, 100);
- }
- }
- if(loginMessage1.length() > 0 || loginMessage2.length() > 0) {
- //DrawingArea.method335(0, 200, 324, 250, 230, 220); //error bg
- DrawingArea.fillRect(0, 0, clientWidth, clientHeight, 0, 150);
- Sprite errorfade = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/errorfade.png", 300, 300);
- Sprite error = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/error.png", 125, 109);
- errorfade.drawHDSprite(clientWidth / 2 - errorfade.myWidth / 2, clientHeight / 2 - 150);
- error.drawSprite(clientWidth / 2 - error.myWidth / 2, clientHeight / 2 - 100);
- if(loginMessage1.length() > 0) {
- boldFont.drawCenteredString(0xffff00, clientWidth / 2, loginMessage1, clientHeight / 2 + 38, true);
- boldFont.drawCenteredString(0xffff00, clientWidth / 2, loginMessage2, clientHeight / 2 + 56, true);
- } else
- boldFont.drawCenteredString(0xffff00, clientWidth / 2, loginMessage2, clientHeight / 2 + 45, true);
- }
- }
- int anim = 0, anim2 = 100;
- private void drawLoginScreen(boolean flag) {
- int centerX = clientWidth / 2;
- int centerY = clientHeight / 2;
- resetImageProducers();
- if(loopCycle < 15) {
- background.drawSprite(centerX - background.myWidth / 2, centerY - background.myHeight / 2, loopCycle);
- loginScreenArea.drawGraphics(0, 0, super.graphics);
- return;
- }
- loginScreenArea.initDrawingArea();
- background.drawSprite(centerX - background.myWidth / 2, centerY - background.myHeight / 2);
- if(loginScreenState == 0) {
- Sprite play = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/continue.png", 120, 120);
- play.drawHDSprite(325, 255, anim);
- if(mouseInArea(325, 445, 255, 375) && anim < 200 || anim < 100)
- anim += 10;
- else if(!mouseInArea(325, 445, 255, 375) && anim > 100)
- anim -= 10;
- logo.drawHDSprite(clientWidth / 2 - 160, clientHeight / 2 - 165, 40);
- }
- if(loginScreenState == 1) {
- Sprite play = new Sprite(firyze.net.SignLink.findCacheDir() + "images/Gameframe/Login/continue.png", 120, 120);
- play.drawHDSprite(325, 255, anim);
- if(anim > 0)
- anim -= 10;
- else
- loginScreenState = 2;
- logo.drawHDSprite(clientWidth / 2 - 160, clientHeight / 2 - 165, 40);
- }
- if(loginScreenState == 2) {
- drawLoginBox(centerX, centerY);
- if(anim2 > 0) {
- background.drawSprite(centerX - background.myWidth / 2, centerY - background.myHeight / 2, (int)(2.55*anim2));
- logo.drawHDSprite(clientWidth / 2 - 160, clientHeight / 2 - 165, (int)(.4*anim2));
- anim2 -= 7;
- }
- }
- //logo.drawRGBAImage(centerX - logo.myWidth / 2 - 9, centerY - logo.myHeight - 74, 35);
- drawDeveloperConsole(showDeveloperConsole, 0, 0);
- loginScreenArea.drawGraphics(0, 0, super.graphics);
- if(welcomeScreenRaised) {
- welcomeScreenRaised = false;
- /*aRSImageProducer_1107.drawGraphics(128, 0, super.graphics);
- aRSImageProducer_1108.drawGraphics(202, 371, super.graphics);
- gameLogo.drawGraphics(0, 265, super.graphics);
- aRSImageProducer_1113.drawGraphics(562, 265, super.graphics);
- aRSImageProducer_1114.drawGraphics(128, 171, super.graphics);
- aRSImageProducer_1115.drawGraphics(562, 171, super.graphics);*/
- }
- }
- /*private void drawFlames()
- {
- try
- {
- long l = System.currentTimeMillis();
- int i = 0;
- int j = 20;
- while(aBoolean831)
- {
- doFlamesDrawing();
- if(++i > 10)
- {
- long l1 = System.currentTimeMillis();
- int k = (int)(l1 - l) / 10 - j;
- j = 40 - k;
- if(j < 5)
- j = 5;
- i = 0;
- l = l1;
- }
- try
- {
- Thread.sleep(j);
- }
- catch(Exception _ex) { }
- }
- } catch(Exception _ex) { }
- drawingFlames = false;
- }
- }*/
- public void raiseWelcomeScreen()
- {
- welcomeScreenRaised = true;
- }
- private void method137(Stream stream, int j)
- {
- if(j == 84)
- {
- int k = stream.readUnsignedByte();
- int j3 = anInt1268 + (k >> 4 & 7);
- int i6 = anInt1269 + (k & 7);
- int l8 = stream.readUnsignedWord();
- int k11 = stream.readUnsignedWord();
- int l13 = stream.readUnsignedWord();
- if(j3 >= 0 && i6 >= 0 && j3 < 104 && i6 < 104)
- {
- NodeList class19_1 = groundArray[plane][j3][i6];
- if(class19_1 != null)
- {
- for(Item class30_sub2_sub4_sub2_3 = (Item)class19_1.reverseGetFirst(); class30_sub2_sub4_sub2_3 != null; class30_sub2_sub4_sub2_3 = (Item)class19_1.reverseGetNext())
- {
- if(class30_sub2_sub4_sub2_3.ID != (l8 & 0x7fff) || class30_sub2_sub4_sub2_3.anInt1559 != k11)
- continue;
- class30_sub2_sub4_sub2_3.anInt1559 = l13;
- break;
- }
- spawnGroundItem(j3, i6);
- }
- }
- return;
- }
- if(j == 105)
- {
- int l = stream.readUnsignedByte();
- int k3 = anInt1268 + (l >> 4 & 7);
- int j6 = anInt1269 + (l & 7);
- int i9 = stream.readUnsignedWord();
- int l11 = stream.readUnsignedByte();
- int i14 = l11 >> 4 & 0xf;
- int i16 = l11 & 7;
- if(myPlayer.smallX[0] >= k3 - i14 && myPlayer.smallX[0] <= k3 + i14 && myPlayer.smallY[0] >= j6 - i14 && myPlayer.smallY[0] <= j6 + i14 && soundEffectsEnabled && !lowMem && anInt1062 < 50)
- {
- anIntArray1207[anInt1062] = i9;
- anIntArray1241[anInt1062] = i16;
- anIntArray1250[anInt1062] = Sounds.anIntArray326[i9];
- anInt1062++;
- }
- }
- if(j == 215)
- {
- int i1 = stream.method435();
- int l3 = stream.method428();
- int k6 = anInt1268 + (l3 >> 4 & 7);
- int j9 = anInt1269 + (l3 & 7);
- int i12 = stream.method435();
- int j14 = stream.readUnsignedWord();
- if(k6 >= 0 && j9 >= 0 && k6 < 104 && j9 < 104 && i12 != unknownInt10)
- {
- Item class30_sub2_sub4_sub2_2 = new Item();
- class30_sub2_sub4_sub2_2.ID = i1;
- class30_sub2_sub4_sub2_2.anInt1559 = j14;
- if(groundArray[plane][k6][j9] == null)
- groundArray[plane][k6][j9] = new NodeList();
- groundArray[plane][k6][j9].insertHead(class30_sub2_sub4_sub2_2);
- spawnGroundItem(k6, j9);
- }
- return;
- }
- if(j == 156)
- {
- int j1 = stream.method426();
- int i4 = anInt1268 + (j1 >> 4 & 7);
- int l6 = anInt1269 + (j1 & 7);
- int k9 = stream.readUnsignedWord();
- if(i4 >= 0 && l6 >= 0 && i4 < 104 && l6 < 104)
- {
- NodeList class19 = groundArray[plane][i4][l6];
- if(class19 != null)
- {
- for(Item item = (Item)class19.reverseGetFirst(); item != null; item = (Item)class19.reverseGetNext())
- {
- if(item.ID != (k9 & 0x7fff))
- continue;
- item.unlink();
- break;
- }
- if(class19.reverseGetFirst() == null)
- groundArray[plane][i4][l6] = null;
- spawnGroundItem(i4, l6);
- }
- }
- return;
- }
- if(j == 160)
- {
- int k1 = stream.method428();
- int j4 = anInt1268 + (k1 >> 4 & 7);
- int i7 = anInt1269 + (k1 & 7);
- int l9 = stream.method428();
- int j12 = l9 >> 2;
- int k14 = l9 & 3;
- int j16 = anIntArray1177[j12];
- int j17 = stream.method435();
- if(j4 >= 0 && i7 >= 0 && j4 < 103 && i7 < 103)
- {
- int j18 = intGroundArray[plane][j4][i7];
- int i19 = intGroundArray[plane][j4 + 1][i7];
- int l19 = intGroundArray[plane][j4 + 1][i7 + 1];
- int k20 = intGroundArray[plane][j4][i7 + 1];
- if(j16 == 0)
- {
- Object1 class10 = sceneGraph.method296(plane, j4, i7);
- if(class10 != null)
- {
- int k21 = class10.uid >> 14 & 0x7fff;
- if(j12 == 2)
- {
- class10.aClass30_Sub2_Sub4_278 = new ObjectOnTile(k21, 4 + k14, 2, i19, l19, j18, k20, j17, false);
- class10.aClass30_Sub2_Sub4_279 = new ObjectOnTile(k21, k14 + 1 & 3, 2, i19, l19, j18, k20, j17, false);
- } else
- {
- class10.aClass30_Sub2_Sub4_278 = new ObjectOnTile(k21, k14, j12, i19, l19, j18, k20, j17, false);
- }
- }
- }
- if(j16 == 1)
- {
- Object2 class26 = sceneGraph.method297(j4, i7, plane);
- if(class26 != null)
- class26.aClass30_Sub2_Sub4_504 = new ObjectOnTile(class26.uid >> 14 & 0x7fff, 0, 4, i19, l19, j18, k20, j17, false);
- }
- if(j16 == 2)
- {
- Object5 class28 = sceneGraph.method298(j4, i7, plane);
- if(j12 == 11)
- j12 = 10;
- if(class28 != null)
- class28.aClass30_Sub2_Sub4_521 = new ObjectOnTile(class28.uid >> 14 & 0x7fff, k14, j12, i19, l19, j18, k20, j17, false);
- }
- if(j16 == 3)
- {
- Object3 class49 = sceneGraph.method299(i7, j4, plane);
- if(class49 != null)
- class49.aClass30_Sub2_Sub4_814 = new ObjectOnTile(class49.uid >> 14 & 0x7fff, k14, 22, i19, l19, j18, k20, j17, false);
- }
- }
- return;
- }
- if(j == 147)
- {
- int l1 = stream.method428();
- int k4 = anInt1268 + (l1 >> 4 & 7);
- int j7 = anInt1269 + (l1 & 7);
- int i10 = stream.readUnsignedWord();
- byte byte0 = stream.method430();
- int l14 = stream.method434();
- byte byte1 = stream.method429();
- int k17 = stream.readUnsignedWord();
- int k18 = stream.method428();
- int j19 = k18 >> 2;
- int i20 = k18 & 3;
- int l20 = anIntArray1177[j19];
- byte byte2 = stream.readSignedByte();
- int l21 = stream.readUnsignedWord();
- byte byte3 = stream.method429();
- Player player;
- if(i10 == unknownInt10)
- player = myPlayer;
- else
- player = playerArray[i10];
- if(player != null)
- {
- ObjectDef class46 = ObjectDef.forID(l21);
- int i22 = intGroundArray[plane][k4][j7];
- int j22 = intGroundArray[plane][k4 + 1][j7];
- int k22 = intGroundArray[plane][k4 + 1][j7 + 1];
- int l22 = intGroundArray[plane][k4][j7 + 1];
- Model model = class46.method578(j19, i20, i22, j22, k22, l22, -1);
- if(model != null)
- {
- method130(k17 + 1, -1, 0, l20, j7, 0, plane, k4, l14 + 1);
- player.anInt1707 = l14 + loopCycle;
- player.anInt1708 = k17 + loopCycle;
- player.aModel_1714 = model;
- int i23 = class46.sizeX;
- int j23 = class46.sizeY;
- if(i20 == 1 || i20 == 3)
- {
- i23 = class46.sizeY;
- j23 = class46.sizeX;
- }
- player.anInt1711 = k4 * 128 + i23 * 64;
- player.anInt1713 = j7 * 128 + j23 * 64;
- player.anInt1712 = method42(plane, player.anInt1713, player.anInt1711);
- if(byte2 > byte0)
- {
- byte byte4 = byte2;
- byte2 = byte0;
- byte0 = byte4;
- }
- if(byte3 > byte1)
- {
- byte byte5 = byte3;
- byte3 = byte1;
- byte1 = byte5;
- }
- player.anInt1719 = k4 + byte2;
- player.anInt1721 = k4 + byte0;
- player.anInt1720 = j7 + byte3;
- player.anInt1722 = j7 + byte1;
- }
- }
- }
- if(j == 151)
- {
- int i2 = stream.method426();
- int l4 = anInt1268 + (i2 >> 4 & 7);
- int k7 = anInt1269 + (i2 & 7);
- int j10 = stream.method434();
- int k12 = stream.method428();
- int i15 = k12 >> 2;
- int k16 = k12 & 3;
- int l17 = anIntArray1177[i15];
- if(l4 >= 0 && k7 >= 0 && l4 < 104 && k7 < 104)
- method130(-1, j10, k16, l17, k7, i15, plane, l4, 0);
- return;
- }
- if(j == 4)
- {
- int j2 = stream.readUnsignedByte();
- int i5 = anInt1268 + (j2 >> 4 & 7);
- int l7 = anInt1269 + (j2 & 7);
- int k10 = stream.readUnsignedWord();
- int l12 = stream.readUnsignedByte();
- int j15 = stream.readUnsignedWord();
- if(i5 >= 0 && l7 >= 0 && i5 < 104 && l7 < 104)
- {
- i5 = i5 * 128 + 64;
- l7 = l7 * 128 + 64;
- StillGraphic class30_sub2_sub4_sub3 = new StillGraphic(plane, loopCycle, j15, k10, method42(plane, l7, i5) - l12, l7, i5);
- aClass19_1056.insertHead(class30_sub2_sub4_sub3);
- }
- return;
- }
- if(j == 44)
- {
- int k2 = stream.method436();
- int j5 = stream.readUnsignedWord();
- int i8 = stream.readUnsignedByte();
- int l10 = anInt1268 + (i8 >> 4 & 7);
- int i13 = anInt1269 + (i8 & 7);
- if(l10 >= 0 && i13 >= 0 && l10 < 104 && i13 < 104)
- {
- Item class30_sub2_sub4_sub2_1 = new Item();
- class30_sub2_sub4_sub2_1.ID = k2;
- class30_sub2_sub4_sub2_1.anInt1559 = j5;
- if(groundArray[plane][l10][i13] == null)
- groundArray[plane][l10][i13] = new NodeList();
- groundArray[plane][l10][i13].insertHead(class30_sub2_sub4_sub2_1);
- spawnGroundItem(l10, i13);
- }
- return;
- }
- if(j == 101)
- {
- int l2 = stream.method427();
- int k5 = l2 >> 2;
- int j8 = l2 & 3;
- int i11 = anIntArray1177[k5];
- int j13 = stream.readUnsignedByte();
- int k15 = anInt1268 + (j13 >> 4 & 7);
- int l16 = anInt1269 + (j13 & 7);
- if(k15 >= 0 && l16 >= 0 && k15 < 104 && l16 < 104)
- method130(-1, -1, j8, i11, l16, k5, plane, k15, 0);
- return;
- }
- if(j == 117)
- {
- int i3 = stream.readUnsignedByte();
- int l5 = anInt1268 + (i3 >> 4 & 7);
- int k8 = anInt1269 + (i3 & 7);
- int j11 = l5 + stream.readSignedByte();
- int k13 = k8 + stream.readSignedByte();
- int l15 = stream.readSignedWord();
- int i17 = stream.readUnsignedWord();
- int i18 = stream.readUnsignedByte() * 4;
- int l18 = stream.readUnsignedByte() * 4;
- int k19 = stream.readUnsignedWord();
- int j20 = stream.readUnsignedWord();
- int i21 = stream.readUnsignedByte();
- int j21 = stream.readUnsignedByte();
- if(l5 >= 0 && k8 >= 0 && l5 < 104 && k8 < 104 && j11 >= 0 && k13 >= 0 && j11 < 104 && k13 < 104 && i17 != 65535)
- {
- l5 = l5 * 128 + 64;
- k8 = k8 * 128 + 64;
- j11 = j11 * 128 + 64;
- k13 = k13 * 128 + 64;
- Projectile class30_sub2_sub4_sub4 = new Projectile(i21, l18, k19 + loopCycle, j20 + loopCycle, j21, plane, method42(plane, k8, l5) - i18, k8, l5, l15, i17);
- class30_sub2_sub4_sub4.method455(k19 + loopCycle, k13, method42(plane, k13, j11) - l18, j11);
- aClass19_1013.insertHead(class30_sub2_sub4_sub4);
- }
- }
- }
- private static void setLowMem()
- {
- WorldController.lowMem = true;
- Texture.lowMem = true;
- lowMem = true;
- ObjectManager.lowMem = false;
- ObjectDef.lowMem = true;
- }
- private static void setHighMem() {
- WorldController.lowMem = false;
- Texture.lowMem = false;
- lowMem = false;
- ObjectManager.lowMem = false;
- ObjectDef.lowMem = false;
- }
- private void method139(Stream stream)
- {
- stream.initBitAccess();
- int k = stream.readBits(8);
- if(k < npcCount)
- {
- for(int l = k; l < npcCount; l++)
- anIntArray840[anInt839++] = npcIndices[l];
- }
- if(k > npcCount)
- {
- SignLink.reporterror(myUsername + " Too many npcs");
- throw new RuntimeException("eek");
- }
- npcCount = 0;
- for(int i1 = 0; i1 < k; i1++)
- {
- int j1 = npcIndices[i1];
- Npc npc = npcArray[j1];
- int k1 = stream.readBits(1);
- if(k1 == 0)
- {
- npcIndices[npcCount++] = j1;
- npc.anInt1537 = loopCycle;
- } else
- {
- int l1 = stream.readBits(2);
- if(l1 == 0)
- {
- npcIndices[npcCount++] = j1;
- npc.anInt1537 = loopCycle;
- anIntArray894[anInt893++] = j1;
- } else
- if(l1 == 1)
- {
- npcIndices[npcCount++] = j1;
- npc.anInt1537 = loopCycle;
- int i2 = stream.readBits(3);
- npc.moveInDir(false, i2);
- int k2 = stream.readBits(1);
- if(k2 == 1)
- anIntArray894[anInt893++] = j1;
- } else
- if(l1 == 2)
- {
- npcIndices[npcCount++] = j1;
- npc.anInt1537 = loopCycle;
- int j2 = stream.readBits(3);
- npc.moveInDir(true, j2);
- int l2 = stream.readBits(3);
- npc.moveInDir(true, l2);
- int i3 = stream.readBits(1);
- if(i3 == 1)
- anIntArray894[anInt893++] = j1;
- } else
- if(l1 == 3)
- anIntArray840[anInt839++] = j1;
- }
- }
- }
- private void processLoginScreenInput() {
- if(showDeveloperConsole) {
- int j = readChar(-796);
- if(j != -1)
- handleDeveloperConsoleInput(j);
- }
- int centerX = clientWidth / 2;
- int centerY = clientHeight / 2;
- if(loginScreenState == 0) {
- if(mouseLeftClickInArea(325, 445, 255, 375)) {
- loginScreenState = 1;
- loginScreenCursorPos = 0;
- }
- } else {
- if(loginScreenState == 2) {
- if((loginMessage1.length() > 0 || loginMessage2.length() > 0) && super.clickMode3 == 1) {
- loginMessage1 = "";
- loginMessage2 = "";
- return;
- }
- if(mouseLeftClickInArea(centerX - 175, centerX - 45, centerY + 50, centerY + 70))
- rememberMe = !rememberMe;
- if(mouseLeftClickInArea(353, 377, 350, 375)) {
- try { deleteLoginData(); } catch (Exception e) { }
- }
- if(mouseLeftClickInArea(centerX - 180, centerX - 20, centerY, centerY + 30))
- loginScreenCursorPos = 0;
- if(mouseLeftClickInArea(centerX - 15, centerX + 145, centerY, centerY + 30))
- loginScreenCursorPos = 1;
- if(mouseLeftClickInArea(centerX + 150, centerX + 180, centerY, centerY + 30)) {
- loginFailures = 0;
- login(capitalize(myUsername), myPassword, false);
- if(loggedIn)
- return;
- }
- if(showDeveloperConsole) {
- drawDeveloperConsole(true, 0, 0);
- return;
- }
- do {
- int l1 = readChar(-796);
- if(l1 == -1)
- break;
- boolean flag1 = false;
- for(int i2 = 0; i2 < validUserPassChars.length(); i2++) {
- if(l1 != validUserPassChars.charAt(i2))
- continue;
- flag1 = true;
- break;
- }
- if(loginScreenCursorPos == 0) {
- if(l1 == 8 && myUsername.length() > 0)
- myUsername = myUsername.substring(0, myUsername.length() - 1);
- if(l1 == 9 || l1 == 10 || l1 == 13)
- loginScreenCursorPos = 1;
- if(flag1)
- myUsername += (char)l1;
- if(myUsername.length() > 12)
- myUsername = capitalize(myUsername.substring(0, 12));
- } else if(loginScreenCursorPos == 1) {
- if(l1 == 8 && myPassword.length() > 0)
- myPassword = myPassword.substring(0, myPassword.length() - 1);
- if(l1 == 9 || l1 == 10 || l1 == 13) {
- if(myUsername.length() == 0 || myPassword.length() == 0)
- loginScreenCursorPos = 0;
- else
- login(myUsername, myPassword, false);
- }
- if(flag1)
- myPassword += (char)l1;
- if(myPassword.length() > 20)
- myPassword = myPassword.substring(0, 20);
- }
- } while(true);
- return;
- }
- if(loginScreenState == 3) {
- int k = super.clientWidth / 2;
- int j1 = super.clientHeight / 2 + 50;
- j1 += 20;
- if(super.clickMode3 == 1 && super.saveClickX >= k - 75 && super.saveClickX <= k + 75 && super.saveClickY >= j1 - 20 && super.saveClickY <= j1 + 20)
- loginScreenState = 0;
- }
- }
- }
- private void markMinimap(Sprite sprite, int i, int j, boolean flag) {
- int k = minimapInt1 + minimapInt2 & 0x7ff;
- int l = i * i + j * j;
- if(flag)
- return;
- if(l > 6400)
- return;
- int i1 = Model.modelIntArray1[k];
- int j1 = Model.modelIntArray2[k];
- i1 = (i1 * 256) / (minimapInt3 + 256);
- j1 = (j1 * 256) / (minimapInt3 + 256);
- int k1 = j * i1 + i * j1 >> 16;
- int l1 = j * j1 - i * i1 >> 16;
- if(!fullScreenOn) {
- sprite.drawSprite(((106 + k1) - sprite.maxWidth / 2) + 4 , 89 - l1 - sprite.maxHeight / 2 - 4);
- }
- CustomMapback[getSpriteID()].drawSprite(0, 0);
- }
- public boolean mouseInArea(int xMin, int xMax, int yMin, int yMax) {
- return super.mouseX >= xMin && super.mouseX <= xMax && super.mouseY >= yMin && super.mouseY <= yMax;
- }
- public boolean mouseLeftClickInArea(int xMin, int xMax, int yMin, int yMax) {
- return super.clickMode3 == 1 && super.saveClickX >= xMin && super.saveClickX <= xMax && super.saveClickY >= yMin && super.saveClickY <= yMax;
- }
- public int flagPos = 72;
- public int runState = 1;
- public boolean logHover = false;
- public boolean xpHover = false;
- public boolean xpClicked = false;
- public boolean drawXpBar = false;
- public boolean drawFlag = false;
- public int xpToDraw = 0;
- public Sprite[] globe = new Sprite[5];
- public static boolean globeState[] = {
- false, false
- };
- public void drawXpOrb() {
- if(super.mouseX >= 516 && super.mouseX <= 550 && super.mouseY >= 46 && super.mouseY <= 80){
- xpHover = true;
- } else {
- xpHover = false;
- }
- if(super.clickMode3 == 1 && super.saveClickX >= 516 && super.saveClickX <= 550 && super.saveClickY >= 46 && super.saveClickY <= 80) {
- if(!xpClicked) {
- xpClicked = true;
- drawXpBar = true;
- } else {
- xpClicked = false;
- drawXpBar = false;
- }
- }
- if(!xpHover) {
- cacheSprite[26].drawSprite(0, 46);
- } else {
- cacheSprite[25].drawSprite(0, 46);
- }
- }
- public void drawGlobe(){
- if(!fullScreenOn) {
- if(super.clickMode3 == 1){
- if(super.saveClickX >= 522 && super.saveClickX <= 558 && super.saveClickY >= 124 && super.saveClickY < 161){
- if(globeState[0]){
- globeState[0] = false;
- } else {
- globeState[0] = true;
- }
- }
- }
- if(super.mouseX >= 522 && super.mouseX <= 558 && super.mouseY >= 124 && super.mouseY < 161){
- globeState[1] = true;
- } else {
- globeState[1] = false;
- }
- }
- }
- public void drawLogout(){
- if(!fullScreenOn) {
- if(!logHover){
- cacheSprite[27].drawSprite(226, 1);
- } else {
- cacheSprite[28].drawSprite(226, 1);
- }
- if(super.clickMode2 == 1 && super.mouseX >= 765-24 && super.mouseX <= 765 && super.mouseY >= 1 && super.mouseY <= 25){
- cacheSprite[29].drawSprite(226, 1);
- }
- }
- }
- public void loadOrbs() {
- drawLogout();
- drawHP();
- drawXpOrb();
- drawPrayer();
- drawRunOrb();
- drawSummo();
- if(!fullScreenOn) {
- drawGlobe();
- if(globeState[0] && globeState[1]) {
- cacheSprite[44].drawSprite(10, 123);
- } else if(globeState[1]) {
- cacheSprite[44].drawSprite(10, 123);
- } else if(globeState[0]) {
- cacheSprite[43].drawSprite(10, 123);
- } else {
- cacheSprite[43].drawSprite(10, 123);
- }
- }
- }
- public Sprite[] Black = new Sprite[5];
- public void loadExtraSprites(){
- magicAuto = new Sprite("Misc/magicAuto");
- for(int j3 = 0; j3 <= 26; j3++) {
- LOGIN[j3] = new Sprite("Login/Buttons/BUTTON "+j3+"");
- }
- for(int i = 0; i < globe.length; i++) {
- globe[i] = new Sprite("Gameframe/Globes/Globe "+i+"");
- }
- for(int i = 0; i <= 4; i++){
- chatBack[i] = new Sprite("Gameframe/Gameframes/chatArea "+i+"");
- }
- for(int i = 0; i <= 4; i++){
- tabBack[i] = new Sprite("Gameframe/Gameframes/tabArea "+i+"");
- }
- for(int i = 0; i <= 4; i++){
- CustomMapback[i] = new Sprite("Gameframe/Gameframes/Mapback "+i+"");
- }
- for(int i = 0; i <= 6; i++){
- modIcons[i] = new Sprite("Player/MODICONS "+i+"");
- chatImages[i] = new Sprite("Player/MODICONS "+i+"");
- }
- for(int i = 0; i <= 3; i++) {
- combatIcons[i] = new Sprite("Player/combatIcon "+i+"");
- }
- for(int i = 0; i <= 4; i++){
- Black[i] = new Sprite("Gameframe/Gameframes/Black "+i+"");
- }
- for(int i4 = 0; i4 < 3; i4++) {
- hitMark[i4] = new Sprite("Player/Hits "+i4+"");
- }
- qc = new Sprite("Gameframe/Quickchat");
- }
- public boolean restOrb = false;
- public boolean musicOrb = false;
- public boolean prayClicked = false;
- public boolean prayHover = false;
- public boolean runClicked = true;
- public boolean runHover = false;
- private int[] anIntArray1019;
- private void rightClickChatButtons() {
- if(!fullScreenOn) {
- if(super.mouseX >= 5 && super.mouseX <= 61 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "View all";
- menuActionID[1] = 999;
- menuActionRow = 2;
- } else if(super.mouseX >= 62 && super.mouseX <= 117 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "View game";
- menuActionID[1] = 998;
- menuActionRow = 2;
- } else if(super.mouseX >= 119 && super.mouseX <= 174 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "Hide public";
- menuActionID[1] = 997;
- menuActionName[2] = "Off public";
- menuActionID[2] = 996;
- menuActionName[3] = "Friends public";
- menuActionID[3] = 995;
- menuActionName[4] = "On public";
- menuActionID[4] = 994;
- menuActionName[5] = "View public";
- menuActionID[5] = 993;
- menuActionRow = 6;
- } else if(super.mouseX >= 176 && super.mouseX <= 231 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "Off private";
- menuActionID[1] = 992;
- menuActionName[2] = "Friends private";
- menuActionID[2] = 991;
- menuActionName[3] = "On private";
- menuActionID[3] = 990;
- menuActionName[4] = "View private";
- menuActionID[4] = 989;
- menuActionRow = 5;
- } else if(super.mouseX >= 233 && super.mouseX <= 288 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "Off clan chat";
- menuActionID[1] = 1003;
- menuActionName[2] = "Friends clan chat";
- menuActionID[2] = 1002;
- menuActionName[3] = "On clan chat";
- menuActionID[3] = 1001;
- menuActionName[4] = "View clan chat";
- menuActionID[4] = 1000;
- menuActionRow = 5;
- } else if(super.mouseX >= 290 && super.mouseX <= 345 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "Off trade";
- menuActionID[1] = 987;
- menuActionName[2] = "Friends trade";
- menuActionID[2] = 986;
- menuActionName[3] = "On trade";
- menuActionID[3] = 985;
- menuActionName[4] = "View trade";
- menuActionID[4] = 984;
- menuActionRow = 5;
- } else if(super.mouseX >= 347 && super.mouseX <= 402 && super.mouseY >= 482 && super.mouseY <= 503) {
- menuActionName[1] = "Off yell";
- menuActionID[1] = 1423;
- menuActionName[2] = "Friends yell";
- menuActionID[2] = 1422;
- menuActionName[3] = "On yell";
- menuActionID[3] = 1421;
- menuActionName[4] = "View yell";
- menuActionID[4] = 1420;
- menuActionRow = 5;
- } else if(super.mouseX >= 404 && super.mouseX <= 514 && super.mouseY >= 480 && super.mouseY <= 501) {
- menuActionName[1] = "Report abuse";
- menuActionID[1] = 606;
- menuActionRow = 2;
- }
- }
- }
- public void determineBottomTabs() {
- if ((this.mouseX >= 521) && (this.mouseX <= 550) && (this.mouseY >= 169) && (this.mouseY < 205)) {
- this.tabHPos = 0;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 552) && (this.mouseX <= 581) && (this.mouseY >= 168) && (this.mouseY < 205)) {
- this.tabHPos = 1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 582) && (this.mouseX <= 611) && (this.mouseY >= 168) && (this.mouseY < 205)) {
- this.tabHPos = 2;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 612) && (this.mouseX <= 641) && (this.mouseY >= 168) && (this.mouseY < 203)) {
- this.tabHPos = 3;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 642) && (this.mouseX <= 671) && (this.mouseY >= 168) && (this.mouseY < 205)) {
- this.tabHPos = 4;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 672) && (this.mouseX <= 701) && (this.mouseY >= 168) && (this.mouseY < 205)) {
- this.tabHPos = 5;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 702) && (this.mouseX <= 731) && (this.mouseY >= 169) && (this.mouseY < 205)) {
- this.tabHPos = 6;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 732) && (this.mouseX <= 761) && (this.mouseY >= 169) && (this.mouseY < 205)) {
- this.tabHPos = 7;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 522) && (this.mouseX <= 551) && (this.mouseY >= 466) && (this.mouseY < 503)) {
- this.tabHPos = 15;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 552) && (this.mouseX <= 581) && (this.mouseY >= 466) && (this.mouseY < 503)) {
- this.tabHPos = 8;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 582) && (this.mouseX <= 611) && (this.mouseY >= 466) && (this.mouseY < 503)) {
- this.tabHPos = 9;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 612) && (this.mouseX <= 641) && (this.mouseY >= 466) && (this.mouseY < 503)) {
- this.tabHPos = 10;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 642) && (this.mouseX <= 671) && (this.mouseY >= 466) && (this.mouseY < 503)) {
- this.tabHPos = 11;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 672) && (this.mouseX <= 701) && (this.mouseY >= 466) && (this.mouseY < 503)) {
- this.tabHPos = 12;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 702) && (this.mouseX <= 731) && (this.mouseY >= 466) && (this.mouseY < 502)) {
- this.tabHPos = 13;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else if ((this.mouseX >= 732) && (this.mouseX <= 761) && (this.mouseY >= 466) && (this.mouseY < 502)) {
- this.tabHPos = 14;
- needDrawTabArea = true;
- tabAreaAltered = true;
- } else {
- this.tabHPos = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- if (this.clickMode3 == 1) {
- if ((this.saveClickX >= 522) && (this.saveClickX <= 551) && (this.saveClickY >= 169) && (this.saveClickY < 205) && (tabInterfaceIDs[0] != -1)) {
- needDrawTabArea = true;
- tabID = 0;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 552) && (this.saveClickX <= 581) && (this.saveClickY >= 168) && (this.saveClickY < 205) && (tabInterfaceIDs[1] != -1)) {
- needDrawTabArea = true;
- tabID = 1;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 582) && (this.saveClickX <= 611) && (this.saveClickY >= 168) && (this.saveClickY < 205) && (tabInterfaceIDs[2] != -1)) {
- needDrawTabArea = true;
- tabID = 2;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 612) && (this.saveClickX <= 641) && (this.saveClickY >= 168) && (this.saveClickY < 203) && (tabInterfaceIDs[14] != -1)) {
- needDrawTabArea = true;
- tabID = 14;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 642) && (this.saveClickX <= 671) && (this.saveClickY >= 168) && (this.saveClickY < 205) && (tabInterfaceIDs[3] != -1)) {
- needDrawTabArea = true;
- tabID = 3;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 672) && (this.saveClickX <= 701) && (this.saveClickY >= 168) && (this.saveClickY < 205) && (tabInterfaceIDs[4] != -1)) {
- needDrawTabArea = true;
- tabID = 4;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 702) && (this.saveClickX <= 731) && (this.saveClickY >= 169) && (this.saveClickY < 205) && (tabInterfaceIDs[5] != -1)) {
- needDrawTabArea = true;
- tabID = 5;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 732) && (this.saveClickX <= 761) && (this.saveClickY >= 169) && (this.saveClickY < 205) && (tabInterfaceIDs[6] != -1)) {
- needDrawTabArea = true;
- tabID = 6;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 522) && (this.saveClickX <= 551) && (this.saveClickY >= 466) && (this.saveClickY < 503) && (tabInterfaceIDs[16] != -1)) {
- needDrawTabArea = true;
- tabID = 16;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 552) && (this.saveClickX <= 581) && (this.saveClickY >= 466) && (this.saveClickY < 503) && (tabInterfaceIDs[8] != -1)) {
- needDrawTabArea = true;
- tabID = 8;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 582) && (this.saveClickX <= 611) && (this.saveClickY >= 466) && (this.saveClickY < 503) && (tabInterfaceIDs[9] != -1)) {
- needDrawTabArea = true;
- tabID = 9;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 612) && (this.saveClickX <= 641) && (this.saveClickY >= 466) && (this.saveClickY < 503) && (tabInterfaceIDs[7] != -1)) {
- needDrawTabArea = true;
- tabID = 7;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 642) && (this.saveClickX <= 671) && (this.saveClickY >= 466) && (this.saveClickY < 503) && (tabInterfaceIDs[11] != -1)) {
- needDrawTabArea = true;
- tabID = 11;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 672) && (this.saveClickX <= 701) && (this.saveClickY >= 466) && (this.saveClickY < 503) && (tabInterfaceIDs[12] != -1)) {
- needDrawTabArea = true;
- tabID = 12;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 702) && (this.saveClickX <= 731) && (this.saveClickY >= 466) && (this.saveClickY < 502) && (tabInterfaceIDs[13] != -1)) {
- needDrawTabArea = true;
- tabID = 13;
- tabAreaAltered = true;
- } else if ((this.saveClickX >= 732) && (this.saveClickX <= 761) && (this.saveClickY >= 466) && (this.saveClickY < 502) && (tabInterfaceIDs[15] != -1)) {
- needDrawTabArea = true;
- tabID = 15;
- tabAreaAltered = true;
- }
- }
- }
- private void processMinimapActions()
- {
- if ((openInterfaceID == 19148) && (mouseLeftClickInArea(185, 343, 34, 313))) {
- if (this.rollingCharacter)
- this.rollingCharacter = false;
- else {
- this.rollingCharacter = true;
- }
- }
- if ((this.mouseX >= 531) && (this.mouseX <= 557) && (this.mouseY >= 7) && (this.mouseY <= 40)) {
- this.menuActionName[1] = "Face North";
- this.menuActionID[1] = 1014;
- this.menuActionRow = 2;
- }
- if ((this.myPrivilege >= 1) && (this.myPrivilege <= 3) && (this.StaffTabInUse) && (openInterfaceID == -1)) {
- if (mouseInArea(484, 515, 0, 35)) {
- this.menuActionName[1] = "Toggle staff options";
- this.menuActionID[1] = 1900;
- this.menuActionRow = 2;
- }
- if ((mouseInArea(363, 477, 9, 30)) && (this.staffTabOpen)) {
- this.menuActionName[1] = "Enter name";
- this.menuActionID[1] = 1901;
- this.menuActionRow = 2;
- }
- if ((mouseInArea(430, 490, 182, 213)) && (this.StaffTabSelected != -1)) {
- this.menuActionName[1] = "Send action";
- this.menuActionID[1] = 1912;
- this.menuActionRow = 2;
- }
- if ((!this.showedName.equals("Error!")) && (!this.showedName.equals(""))) {
- if (mouseInArea(355, 418, 54, 71)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1902;
- this.menuActionRow = 2;
- } else if (mouseInArea(355, 418, 77, 94)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1903;
- this.menuActionRow = 2;
- } else if (mouseInArea(355, 418, 100, 117)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1904;
- this.menuActionRow = 2;
- } else if (mouseInArea(355, 418, 123, 140)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1905;
- this.menuActionRow = 2;
- } else if (mouseInArea(355, 418, 146, 163)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1906;
- this.menuActionRow = 2;
- } else if (mouseInArea(421, 496, 54, 71)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1907;
- this.menuActionRow = 2;
- } else if (mouseInArea(421, 496, 77, 94)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1908;
- this.menuActionRow = 2;
- } else if (mouseInArea(421, 496, 100, 117)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1909;
- this.menuActionRow = 2;
- } else if (mouseInArea(421, 496, 123, 140)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1910;
- this.menuActionRow = 2;
- } else if (mouseInArea(421, 496, 146, 163)) {
- this.menuActionName[1] = "Select";
- this.menuActionID[1] = 1911;
- this.menuActionRow = 2;
- }
- }
- }
- if ((this.is508) || (this.is525) || (this.is562)) {
- if ((this.mouseX >= 527) && (this.mouseX <= 560) && (this.mouseY >= 126) && (this.mouseY <= 159)) {
- this.menuActionName[1] = "World Map";
- this.menuActionID[1] = 1005;
- this.menuActionRow = 2;
- }
- if ((this.mouseX >= 706) && (this.mouseX <= 762) && (this.mouseY >= 95) && (this.mouseY < 128)) {
- if (!this.runClicked)
- this.menuActionName[2] = "Turn run mode on";
- else if (this.runClicked) {
- this.menuActionName[2] = "Turn run mode off";
- }
- this.menuActionID[2] = 1050;
- this.menuActionRow = 2;
- this.menuActionName[1] = "Rest";
- this.menuActionID[1] = 1501;
- this.menuActionRow = 3;
- }
- if ((this.mouseX >= 516) && (this.mouseX <= 550) && (this.mouseY >= 46) && (this.mouseY < 80)) {
- if (!this.drawXpBar)
- this.menuActionName[2] = "Show XP counter";
- else
- this.menuActionName[2] = "Hide XP counter";
- this.menuActionID[2] = 1503;
- this.menuActionRow = 2;
- this.menuActionName[1] = "Reset";
- this.menuActionID[1] = 1504;
- this.menuActionRow = 3;
- }
- if ((this.mouseX >= 706) && (this.mouseX <= 762) && (this.mouseY >= 52) && (this.mouseY < 87)) {
- if (!this.prayClicked)
- this.menuActionName[1] = "Turn quick prayers on";
- else if (this.prayClicked) {
- this.menuActionName[1] = "Turn quick prayers off";
- }
- this.menuActionID[1] = 1500;
- this.menuActionRow = 2;
- }
- }
- }
- public int getOrbTextColor(int statusInt) {
- if ((statusInt >= 75) && (statusInt <= 100))
- return 65280;
- if ((statusInt >= 50) && (statusInt <= 74))
- return 16776960;
- if ((statusInt >= 25) && (statusInt <= 49)) {
- return 16750623;
- }
- return 16711680;
- }
- public int getOrbFill(int statusInt) {
- return (100 - statusInt) * 27 / 100;
- }
- public void drawHP()
- {
- String cHP = RSInterface.interfaceCache[4016].disabledMessage; cHP = cHP.replaceAll("%", "");
- int currentHP = Integer.parseInt(cHP);
- String mHP = RSInterface.interfaceCache[4017].disabledMessage; mHP = mHP.replaceAll("%", "");
- int maxHP2 = Integer.parseInt(mHP);
- int health = (int)(currentHP / maxHP2 * 100.0D);
- cacheSprite[4].drawSprite(174, 14);
- cacheSprite[9 + myPlayer.isPoisoned].drawSprite(177, 17);
- if (health != 100) {
- DrawingArea.setClip(117, 17, 144, 17 + getOrbFill(health));
- cacheSprite[8].drawSprite(177, 17);
- DrawingArea.removeClip();
- }
- if (health > 20 || loopCycle % 20 < 10) {
- cacheSprite[16].drawSprite(183, 25);
- }
- smallText.drawCenterAlignedString(""+currentHP, 215, 40, getOrbTextColor(health), 0, false);
- }
- public void drawPrayer()
- {
- String cPR = RSInterface.interfaceCache[4012].disabledMessage;
- int currentPR = Integer.parseInt(cPR);
- String mPR = RSInterface.interfaceCache[4013].disabledMessage;
- int maxPR2 = Integer.parseInt(mPR);
- int prayer = (int)(currentPR / maxPR2 * 100.0D);
- cacheSprite[prayHover ? 5 : 4].drawSprite(190, 53);
- cacheSprite[prayClicked ? 12 : 11].drawSprite(193, 56);
- if (prayer != 100) {
- DrawingArea.setClip(194, 56, 221, 56 + getOrbFill(prayer));
- cacheSprite[8].drawSprite(194, 56);
- DrawingArea.removeClip();
- }
- if (prayer == 0 || prayer > 25 || loopCycle % 20 < 10) {
- cacheSprite[17].drawSprite(197, 60);
- }
- smallText.drawCenterAlignedString(RSInterface.interfaceCache[4012].disabledMessage, 231, 79, getOrbTextColor(prayer), 0, false);
- }
- public void drawRunOrb()
- {
- if (energy < 1) {
- runClicked = false;
- }
- cacheSprite[runHover ? 5 : 4].drawSprite(190, 92);
- cacheSprite[runClicked ? 14 : 13].drawSprite(193, 95);
- if (energy != 100) {
- DrawingArea.setClip(194, 95, 221, 95 + getOrbFill(energy));
- cacheSprite[8].drawSprite(194, 95);
- DrawingArea.removeClip();
- }
- cacheSprite[restOrb ? 20 : runClicked ? 19 : 18].drawSprite(199, 99);
- smallText.drawCenterAlignedString(""+energy, 231, 117, getOrbTextColor(energy), 0, false);
- if (restOrb) {
- cacheSprite[24].drawHDSprite(175, 75, restOpacity);
- }
- }
- public void drawSummo() {
- String cSummo = RSInterface.interfaceCache[29802].disabledMessage; cSummo = cSummo.replaceAll("%", "");
- int currentSummo = Integer.parseInt(cSummo);
- String mSummo = RSInterface.interfaceCache[29803].disabledMessage; mSummo = mSummo.replaceAll("%", "");
- int maxSummo = Integer.parseInt(mSummo);
- int summo = (int)(currentSummo / maxSummo * 100.0D);
- cacheSprite[4].drawSprite(174, 128);
- cacheSprite[15].drawSprite(177, 131);
- if (summo != 100) {
- DrawingArea.setClip(177, 131, 205, 131 + getOrbFill(summo));
- cacheSprite[8].drawSprite(177, 131);
- DrawingArea.removeClip();
- }
- cacheSprite[22].drawSprite(183, 137);
- smallText.drawCenterAlignedString(""+currentSummo, 215, 154, getOrbTextColor(summo), 0, false);
- }
- private void method142(int i, int j, int k, int l, int i1, int j1, int k1)
- {
- if ((i1 >= 1) && (i >= 1) && (i1 <= 102) && (i <= 102))
- {
- if ((lowMem) && (j != this.plane))
- return;
- int i2 = 0;
- if (j1 == 0)
- i2 = this.sceneGraph.getWallObjectUID(j, i1, i);
- if (j1 == 1)
- i2 = this.sceneGraph.method301(j, i1, i);
- if (j1 == 2)
- i2 = this.sceneGraph.getInteractableObjectUID(j, i1, i);
- if (j1 == 3)
- i2 = this.sceneGraph.getGroundDecorationUID(j, i1, i);
- if (i2 != 0)
- {
- int i3 = this.sceneGraph.getIDTAGForXYZ(j, i1, i, i2);
- int j2 = i2 >> 14 & 0x7FFF;
- int k2 = i3 & 0x1F;
- int l2 = i3 >> 6;
- if (j1 == 0)
- {
- this.sceneGraph.method291(i1, j, i, (byte)-119);
- ObjectDef class46 = ObjectDef.forID(j2);
- if (class46.aBoolean767)
- this.aClass11Array1230[j].method215(l2, k2, class46.aBoolean757, i1, i);
- }
- if (j1 == 1)
- this.sceneGraph.method292(i, j, i1);
- if (j1 == 2)
- {
- this.sceneGraph.method293(j, i1, i);
- ObjectDef class46_1 = ObjectDef.forID(j2);
- if ((i1 + class46_1.sizeX > 103) || (i + class46_1.sizeX > 103) || (i1 + class46_1.sizeY > 103) || (i + class46_1.sizeY > 103))
- return;
- if (class46_1.aBoolean767)
- this.aClass11Array1230[j].method216(l2, class46_1.sizeX, i1, i, class46_1.sizeY, class46_1.aBoolean757);
- }
- if (j1 == 3)
- {
- this.sceneGraph.method294(j, i, i1);
- ObjectDef class46_2 = ObjectDef.forID(j2);
- if ((class46_2.aBoolean767) && (class46_2.hasActions))
- this.aClass11Array1230[j].method218(i, i1);
- }
- }
- if (k1 >= 0)
- {
- int j3 = j;
- if ((j3 < 3) && ((this.byteGroundArray[1][i1][i] & 0x2) == 2))
- j3++;
- ObjectManager.method188(this.sceneGraph, k, i, l, j3, this.aClass11Array1230[j], this.intGroundArray, i1, k1, j);
- }
- }
- }
- private void updatePlayers(int i, Stream stream)
- {
- this.anInt839 = 0;
- this.anInt893 = 0;
- method117(stream);
- method134(stream);
- method91(stream, i);
- method49(stream);
- for (int k = 0; k < this.anInt839; k++)
- {
- int l = this.anIntArray840[k];
- if (this.playerArray[l].anInt1537 != loopCycle) {
- this.playerArray[l] = null;
- }
- }
- if (stream.currentOffset != i)
- {
- SignLink.reporterror("Error packet size mismatch in getplayer pos:" + stream.currentOffset + " psize:" + i);
- throw new RuntimeException("eek");
- }
- for (int i1 = 0; i1 < this.playerCount; i1++)
- if (this.playerArray[this.playerIndices[i1]] == null)
- {
- SignLink.reporterror(myUsername + " null entry in pl list - pos:" + i1 + " size:" + this.playerCount);
- throw new RuntimeException("eek");
- }
- }
- private void setCameraPos(int j, int k, int l, int i1, int j1, int k1)
- {
- int l1 = 2048 - k & 0x7FF;
- int i2 = 2048 - j1 & 0x7FF;
- int j2 = 0;
- int k2 = 0;
- int l2 = j;
- if (l1 != 0)
- {
- int i3 = Model.modelIntArray1[l1];
- int k3 = Model.modelIntArray2[l1];
- int i4 = k2 * k3 - l2 * i3 >> 16;
- l2 = k2 * i3 + l2 * k3 >> 16;
- k2 = i4;
- }
- if (i2 != 0)
- {
- int j3 = Model.modelIntArray1[i2];
- int l3 = Model.modelIntArray2[i2];
- int j4 = l2 * j3 + j2 * l3 >> 16;
- l2 = l2 * l3 - j2 * j3 >> 16;
- j2 = j4;
- }
- this.xCameraPos = (l - j2);
- this.zCameraPos = (i1 - k2);
- this.yCameraPos = (k1 - l2);
- this.yCameraCurve = k;
- this.xCameraCurve = j1;
- }
- public void updateStrings(String str, int i) {
- switch (i) { case 1675:
- sendFrame126(str, 17508); break;
- case 1676:
- sendFrame126(str, 17509); break;
- case 1677:
- sendFrame126(str, 17510); break;
- case 1678:
- sendFrame126(str, 17511); break;
- case 1679:
- sendFrame126(str, 17512); break;
- case 1680:
- sendFrame126(str, 17513); break;
- case 1681:
- sendFrame126(str, 17514); break;
- case 1682:
- sendFrame126(str, 17515); break;
- case 1683:
- sendFrame126(str, 17516); break;
- case 1684:
- sendFrame126(str, 17517); break;
- case 1686:
- sendFrame126(str, 17518); break;
- case 1687:
- sendFrame126(str, 17519);
- case 1685: }
- }
- public void sendFrame126(String str, int i) {
- RSInterface.interfaceCache[i].disabledMessage = str;
- if (RSInterface.interfaceCache[i].parentID == tabInterfaceIDs[tabID])
- needDrawTabArea = true;
- }
- public void sendPacket185(int button, int toggle, int interfaceType) {
- switch (interfaceType) {
- case 135:
- RSInterface class9 = RSInterface.interfaceCache[button];
- boolean flag8 = true;
- if (class9.contentType > 0)
- flag8 = promptUserForInput(class9);
- if (flag8) {
- this.stream.createFrame(185);
- this.stream.writeWord(button);
- }
- break;
- case 646:
- this.stream.createFrame(185);
- this.stream.writeWord(button);
- RSInterface class9_2 = RSInterface.interfaceCache[button];
- if ((class9_2.valueIndexArray != null) && (class9_2.valueIndexArray[0][0] == 5) &&
- (this.variousSettings[toggle] != class9_2.requiredValues[0])) {
- this.variousSettings[toggle] = class9_2.requiredValues[0];
- method33(toggle);
- needDrawTabArea = true;
- }
- break;
- case 169:
- this.stream.createFrame(185);
- this.stream.writeWord(button);
- RSInterface class9_3 = RSInterface.interfaceCache[button];
- if ((class9_3.valueIndexArray != null) && (class9_3.valueIndexArray[0][0] == 5)) {
- this.variousSettings[toggle] = (1 - this.variousSettings[toggle]);
- method33(toggle);
- needDrawTabArea = true;
- }
- switch (button) {
- case 19136:
- System.out.println("toggle = " + toggle);
- if (toggle == 0)
- sendFrame36(173, toggle);
- if (toggle == 1)
- sendPacket185(153, 173, 646);
- break;
- }
- break;
- }
- }
- public void sendFrame36(int id, int state) {
- this.anIntArray1045[id] = state;
- if (this.variousSettings[id] != state) {
- this.variousSettings[id] = state;
- method33(id);
- needDrawTabArea = true;
- if (this.dialogID != -1)
- inputTaken = true;
- }
- }
- public void sendFrame219()
- {
- if (this.invOverlayInterfaceID != -1) {
- this.invOverlayInterfaceID = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- openInterfaceID = -1;
- this.aBoolean1149 = false;
- }
- public void sendFrame248(int interfaceID, int sideInterfaceID) {
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- openInterfaceID = interfaceID;
- this.invOverlayInterfaceID = sideInterfaceID;
- needDrawTabArea = true;
- tabAreaAltered = true;
- this.aBoolean1149 = false;
- }
- private boolean parsePacket()
- {
- if (this.socketStream == null)
- return false;
- try {
- int i = this.socketStream.available();
- if (i == 0)
- return false;
- if (this.pktType == -1) {
- this.socketStream.flushInputStream(this.inStream.buffer, 1);
- this.pktType = (this.inStream.buffer[0] & 0xFF);
- if (this.encryption != null)
- this.pktType = (this.pktType - this.encryption.getNextKey() & 0xFF);
- this.pktSize = SizeConstants.packetSizes[this.pktType];
- i--;
- }
- if (this.pktSize == -1)
- if (i > 0) {
- this.socketStream.flushInputStream(this.inStream.buffer, 1);
- this.pktSize = (this.inStream.buffer[0] & 0xFF);
- i--;
- } else {
- return false;
- }
- if (this.pktSize == -2)
- if (i > 1) {
- this.socketStream.flushInputStream(this.inStream.buffer, 2);
- this.inStream.currentOffset = 0;
- this.pktSize = this.inStream.readUnsignedWord();
- i -= 2;
- } else {
- return false;
- }
- if (i < this.pktSize)
- return false;
- this.inStream.currentOffset = 0;
- this.socketStream.flushInputStream(this.inStream.buffer, this.pktSize);
- this.anInt1009 = 0;
- this.anInt843 = this.anInt842;
- this.anInt842 = this.anInt841;
- this.anInt841 = this.pktType;
- switch (this.pktType)
- {
- case 81:
- updatePlayers(this.pktSize, this.inStream);
- this.aBoolean1080 = false;
- this.pktType = -1;
- return true;
- case 176:
- this.daysSinceRecovChange = this.inStream.method427();
- this.unreadMessages = this.inStream.method435();
- this.membersInt = this.inStream.readUnsignedByte();
- this.anInt1193 = this.inStream.method440();
- this.daysSinceLastLogin = this.inStream.readUnsignedWord();
- if ((this.anInt1193 != 0) && (openInterfaceID == -1)) {
- SignLink.dnslookup(TextClass.method586(this.anInt1193));
- clearTopInterfaces();
- char c = 'ʊ';
- if ((this.daysSinceRecovChange != 201) || (this.membersInt == 1))
- c = 'ʏ';
- this.reportAbuseInput = "";
- this.canMute = false;
- for (int k9 = 0; k9 < RSInterface.interfaceCache.length; k9++) {
- if ((RSInterface.interfaceCache[k9] != null) && (RSInterface.interfaceCache[k9].contentType == c))
- {
- openInterfaceID = RSInterface.interfaceCache[k9].parentID;
- }
- }
- }
- this.pktType = -1;
- return true;
- case 64:
- this.anInt1268 = this.inStream.method427();
- this.anInt1269 = this.inStream.method428();
- for (int j = this.anInt1268; j < this.anInt1268 + 8; j++) {
- for (int l9 = this.anInt1269; l9 < this.anInt1269 + 8; l9++)
- if (this.groundArray[this.plane][j][l9] != null) {
- this.groundArray[this.plane][j][l9] = null;
- spawnGroundItem(j, l9);
- }
- }
- for (Class30_Sub1 class30_sub1 = (Class30_Sub1)this.aClass19_1179.reverseGetFirst(); class30_sub1 != null; class30_sub1 = (Class30_Sub1)this.aClass19_1179.reverseGetNext())
- if ((class30_sub1.anInt1297 >= this.anInt1268) && (class30_sub1.anInt1297 < this.anInt1268 + 8) && (class30_sub1.anInt1298 >= this.anInt1269) && (class30_sub1.anInt1298 < this.anInt1269 + 8) && (class30_sub1.anInt1295 == this.plane))
- class30_sub1.anInt1294 = 0;
- this.pktType = -1;
- return true;
- case 185:
- int k = this.inStream.method436();
- RSInterface.interfaceCache[k].disabledMediaType = 3;
- if (myPlayer.desc == null)
- RSInterface.interfaceCache[k].disabledMediaID = ((myPlayer.anIntArray1700[0] << 25) + (myPlayer.anIntArray1700[4] << 20) + (myPlayer.equipment[0] << 15) + (myPlayer.equipment[8] << 10) + (myPlayer.equipment[11] << 5) + myPlayer.equipment[1]);
- else
- RSInterface.interfaceCache[k].disabledMediaID = ((int)(305419896L + myPlayer.desc.id));
- this.pktType = -1;
- return true;
- case 217:
- try
- {
- this.name = this.inStream.readString();
- this.disabledMessage = this.inStream.readString();
- this.clanname = this.inStream.readString();
- this.rights = this.inStream.readUnsignedWord();
- System.out.println(this.clanname);
- pushMessage(this.disabledMessage, 16, this.name);
- } catch (Exception e) {
- e.printStackTrace();
- }
- this.pktType = -1;
- return true;
- case 107:
- this.aBoolean1160 = false;
- for (int l = 0; l < 5; l++)
- this.aBooleanArray876[l] = false;
- this.pktType = -1;
- return true;
- case 72:
- int i1 = this.inStream.method434();
- RSInterface class9 = RSInterface.interfaceCache[i1];
- for (int k15 = 0; k15 < class9.inventory.length; k15++) {
- class9.inventory[k15] = -1;
- class9.inventory[k15] = 0;
- }
- this.pktType = -1;
- return true;
- case 214:
- this.ignoreCount = (this.pktSize / 8);
- for (int j1 = 0; j1 < this.ignoreCount; j1++)
- this.ignoreListAsLongs[j1] = this.inStream.readQWord();
- this.pktType = -1;
- return true;
- case 166:
- this.aBoolean1160 = true;
- this.anInt1098 = this.inStream.readUnsignedByte();
- this.anInt1099 = this.inStream.readUnsignedByte();
- this.anInt1100 = this.inStream.readUnsignedWord();
- this.anInt1101 = this.inStream.readUnsignedByte();
- this.anInt1102 = this.inStream.readUnsignedByte();
- if (this.anInt1102 >= 100) {
- this.xCameraPos = (this.anInt1098 * 128 + 64);
- this.yCameraPos = (this.anInt1099 * 128 + 64);
- this.zCameraPos = (method42(this.plane, this.yCameraPos, this.xCameraPos) - this.anInt1100);
- }
- this.pktType = -1;
- return true;
- case 134:
- needDrawTabArea = true;
- int k1 = this.inStream.readUnsignedByte();
- int i10 = this.inStream.method439();
- int l15 = this.inStream.readUnsignedByte();
- int oldXp = this.currentExp[k1];
- this.currentExp[k1] = i10;
- this.currentStats[k1] = l15;
- this.maxStats[k1] = 1;
- if (i10 - oldXp > 0) {
- this.xpToDraw = (i10 - oldXp);
- if (this.drawXpBar) {
- this.drawFlag = true;
- }
- }
- for (int k20 = 0; k20 < 98; k20++)
- if (i10 >= anIntArray1019[k20])
- this.maxStats[k1] = (k20 + 2);
- this.pktType = -1;
- return true;
- case 71:
- int l1 = this.inStream.readUnsignedWord();
- int j10 = this.inStream.method426();
- if (l1 == 65535)
- l1 = -1;
- tabInterfaceIDs[j10] = l1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- this.pktType = -1;
- return true;
- case 74:
- int i2 = this.inStream.method434();
- if (i2 == 65535)
- i2 = -1;
- if ((i2 != this.currentSong) && (this.musicEnabled) && (!lowMem) && (this.prevSong == 0)) {
- this.nextSong = i2;
- this.songChanging = true;
- this.onDemandFetcher.method558(2, this.nextSong);
- }
- this.currentSong = i2;
- this.pktType = -1;
- return true;
- case 121:
- int j2 = this.inStream.method436();
- int k10 = this.inStream.method435();
- if ((this.musicEnabled) && (!lowMem)) {
- this.nextSong = j2;
- this.songChanging = false;
- this.onDemandFetcher.method558(2, this.nextSong);
- this.prevSong = k10;
- }
- this.pktType = -1;
- return true;
- case 109:
- resetLogout();
- this.pktType = -1;
- return false;
- case 70:
- int k2 = this.inStream.readSignedWord();
- int l10 = this.inStream.method437();
- int i16 = this.inStream.method434();
- RSInterface class9_5 = RSInterface.interfaceCache[i16];
- class9_5.xOffset = k2;
- class9_5.yOffset = l10;
- this.pktType = -1;
- return true;
- case 73:
- case 241:
- int l2 = this.anInt1069;
- int i11 = this.anInt1070;
- if (this.pktType == 73) {
- l2 = this.inStream.method435();
- i11 = this.inStream.readUnsignedWord();
- this.loadGeneratedMap = false;
- }
- if (this.pktType == 241) {
- i11 = this.inStream.method435();
- this.inStream.initBitAccess();
- for (int j16 = 0; j16 < 4; j16++) {
- for (int l20 = 0; l20 < 13; l20++) {
- for (int j23 = 0; j23 < 13; j23++) {
- int i26 = this.inStream.readBits(1);
- if (i26 == 1)
- this.anIntArrayArrayArray1129[j16][l20][j23] = this.inStream.readBits(26);
- else
- this.anIntArrayArrayArray1129[j16][l20][j23] = -1;
- }
- }
- }
- this.inStream.finishBitAccess();
- l2 = this.inStream.readUnsignedWord();
- this.loadGeneratedMap = true;
- }
- if ((this.anInt1069 == l2) && (this.anInt1070 == i11) && (this.loadingStage == 2)) {
- this.pktType = -1;
- return true;
- }
- this.anInt1069 = l2;
- this.anInt1070 = i11;
- this.baseX = ((this.anInt1069 - 6) * 8);
- this.baseY = ((this.anInt1070 - 6) * 8);
- this.aBoolean1141 = (((this.anInt1069 / 8 == 48) || (this.anInt1069 / 8 == 49)) && (this.anInt1070 / 8 == 48));
- if ((this.anInt1069 / 8 == 48) && (this.anInt1070 / 8 == 148))
- this.aBoolean1141 = true;
- this.loadingStage = 1;
- this.aLong824 = System.currentTimeMillis();
- mainGameArea.initDrawingArea();
- this.cacheSprite[2].drawSprite(8, 9);
- mainGameArea.drawGraphics(4, 4, this.graphics);
- if (this.pktType == 73) {
- int k16 = 0;
- for (int i21 = (this.anInt1069 - 6) / 8; i21 <= (this.anInt1069 + 6) / 8; i21++) {
- for (int k23 = (this.anInt1070 - 6) / 8; k23 <= (this.anInt1070 + 6) / 8; k23++)
- k16++;
- }
- this.terrainData = new byte[k16][];
- this.aByteArrayArray1247 = new byte[k16][];
- this.mapCoordinates = new int[k16];
- this.terrainIndices = new int[k16];
- this.anIntArray1236 = new int[k16];
- k16 = 0;
- for (int l23 = (this.anInt1069 - 6) / 8; l23 <= (this.anInt1069 + 6) / 8; l23++) {
- for (int j26 = (this.anInt1070 - 6) / 8; j26 <= (this.anInt1070 + 6) / 8; j26++) {
- this.mapCoordinates[k16] = ((l23 << 8) + j26);
- if ((this.aBoolean1141) && ((j26 == 49) || (j26 == 149) || (j26 == 147) || (l23 == 50) || ((l23 == 49) && (j26 == 47)))) {
- this.terrainIndices[k16] = -1;
- this.anIntArray1236[k16] = -1;
- k16++;
- } else {
- int k28 = this.terrainIndices[k16] = this.onDemandFetcher.method562(0, j26, l23);
- if (k28 != -1)
- this.onDemandFetcher.method558(3, k28);
- int j30 = this.anIntArray1236[k16] = this.onDemandFetcher.method562(1, j26, l23);
- if (j30 != -1)
- this.onDemandFetcher.method558(3, j30);
- k16++;
- }
- }
- }
- }
- if (this.pktType == 241) {
- int l16 = 0;
- int[] ai = new int[676];
- for (int i24 = 0; i24 < 4; i24++) {
- for (int k26 = 0; k26 < 13; k26++) {
- for (int l28 = 0; l28 < 13; l28++) {
- int k30 = this.anIntArrayArrayArray1129[i24][k26][l28];
- if (k30 != -1) {
- int k31 = k30 >> 14 & 0x3FF;
- int i32 = k30 >> 3 & 0x7FF;
- int k32 = (k31 / 8 << 8) + i32 / 8;
- for (int j33 = 0; j33 < l16; j33++) {
- if (ai[j33] == k32)
- {
- k32 = -1;
- }
- }
- if (k32 != -1)
- ai[(l16++)] = k32;
- }
- }
- }
- }
- this.terrainData = new byte[l16][];
- this.aByteArrayArray1247 = new byte[l16][];
- this.mapCoordinates = new int[l16];
- this.terrainIndices = new int[l16];
- this.anIntArray1236 = new int[l16];
- for (int l26 = 0; l26 < l16; l26++) {
- int i29 = this.mapCoordinates[l26] = ai[l26];
- int l30 = i29 >> 8 & 0xFF;
- int l31 = i29 & 0xFF;
- int j32 = this.terrainIndices[l26] = this.onDemandFetcher.method562(0, l31, l30);
- if (j32 != -1)
- this.onDemandFetcher.method558(3, j32);
- int i33 = this.anIntArray1236[l26] = this.onDemandFetcher.method562(1, l31, l30);
- if (i33 != -1)
- this.onDemandFetcher.method558(3, i33);
- }
- }
- int i17 = this.baseX - this.anInt1036;
- int j21 = this.baseY - this.anInt1037;
- this.anInt1036 = this.baseX;
- this.anInt1037 = this.baseY;
- for (int j24 = 0; j24 < 16384; j24++) {
- Npc npc = this.npcArray[j24];
- if (npc != null) {
- for (int j29 = 0; j29 < 10; j29++) {
- npc.smallX[j29] -= i17;
- npc.smallY[j29] -= j21;
- }
- npc.x -= i17 * 128;
- npc.y -= j21 * 128;
- }
- }
- for (int i27 = 0; i27 < this.maxPlayers; i27++) {
- Player player = this.playerArray[i27];
- if (player != null) {
- for (int i31 = 0; i31 < 10; i31++) {
- player.smallX[i31] -= i17;
- player.smallY[i31] -= j21;
- }
- player.x -= i17 * 128;
- player.y -= j21 * 128;
- }
- }
- this.aBoolean1080 = true;
- byte byte1 = 0;
- byte byte2 = 104;
- byte byte3 = 1;
- if (i17 < 0) {
- byte1 = 103;
- byte2 = -1;
- byte3 = -1;
- }
- byte byte4 = 0;
- byte byte5 = 104;
- byte byte6 = 1;
- if (j21 < 0) {
- byte4 = 103;
- byte5 = -1;
- byte6 = -1;
- }
- for (int k33 = byte1; k33 != byte2; k33 += byte3) {
- for (int l33 = byte4; l33 != byte5; l33 += byte6) {
- int i34 = k33 + i17;
- int j34 = l33 + j21;
- for (int k34 = 0; k34 < 4; k34++)
- if ((i34 >= 0) && (j34 >= 0) && (i34 < 104) && (j34 < 104))
- this.groundArray[k34][k33][l33] = this.groundArray[k34][i34][j34];
- else
- this.groundArray[k34][k33][l33] = null;
- }
- }
- for (Class30_Sub1 class30_sub1_1 = (Class30_Sub1)this.aClass19_1179.reverseGetFirst(); class30_sub1_1 != null; class30_sub1_1 = (Class30_Sub1)this.aClass19_1179.reverseGetNext()) {
- class30_sub1_1.anInt1297 -= i17;
- class30_sub1_1.anInt1298 -= j21;
- if ((class30_sub1_1.anInt1297 < 0) || (class30_sub1_1.anInt1298 < 0) || (class30_sub1_1.anInt1297 >= 104) || (class30_sub1_1.anInt1298 >= 104))
- class30_sub1_1.unlink();
- }
- if (this.destX != 0) {
- this.destX -= i17;
- this.destY -= j21;
- }
- this.aBoolean1160 = false;
- this.pktType = -1;
- return true;
- case 208:
- int i3 = this.inStream.method437();
- if (i3 >= 0)
- method60(i3);
- this.anInt1018 = i3;
- this.pktType = -1;
- return true;
- case 99:
- this.miniMapOverlay = this.inStream.readUnsignedByte();
- this.pktType = -1;
- return true;
- case 75:
- int j3 = this.inStream.method436();
- int j11 = this.inStream.method436();
- RSInterface.interfaceCache[j11].disabledMediaType = 2;
- RSInterface.interfaceCache[j11].disabledMediaID = j3;
- this.pktType = -1;
- return true;
- case 114:
- this.anInt1104 = (this.inStream.method434() * 30);
- this.pktType = -1;
- return true;
- case 60:
- this.anInt1269 = this.inStream.readUnsignedByte();
- this.anInt1268 = this.inStream.method427();
- while (this.inStream.currentOffset < this.pktSize) {
- int k3 = this.inStream.readUnsignedByte();
- method137(this.inStream, k3);
- }
- this.pktType = -1;
- return true;
- case 35:
- int l3 = this.inStream.readUnsignedByte();
- int k11 = this.inStream.readUnsignedByte();
- int j17 = this.inStream.readUnsignedByte();
- int k21 = this.inStream.readUnsignedByte();
- this.aBooleanArray876[l3] = true;
- this.anIntArray873[l3] = k11;
- this.anIntArray1203[l3] = j17;
- this.anIntArray928[l3] = k21;
- this.anIntArray1030[l3] = 0;
- this.pktType = -1;
- return true;
- case 174:
- this.followPlayer = 0;
- this.followNPC = 0;
- int l11z = this.inStream.readUnsignedWord();
- int iq = this.inStream.readUnsignedByte();
- this.followDistance = this.inStream.readUnsignedWord();
- if (iq == 0)
- {
- this.followNPC = l11z;
- }
- else if (iq == 1)
- {
- this.followPlayer = l11z;
- }
- this.pktType = -1;
- return true;
- case 104:
- int j4 = this.inStream.method427();
- int i12 = this.inStream.method426();
- String s6 = this.inStream.readString();
- if ((j4 >= 1) && (j4 <= 5)) {
- if (s6.equalsIgnoreCase("null"))
- s6 = null;
- this.atPlayerActions[(j4 - 1)] = s6;
- this.atPlayerArray[(j4 - 1)] = i12 == 0;
- }
- this.pktType = -1;
- return true;
- case 78:
- this.destX = 0;
- this.pktType = -1;
- return true;
- case 253:
- String s = this.inStream.readString();
- if (s.startsWith("Alert##")) {
- String[] args = s.split("##");
- if (args.length == 3)
- this.alertHandler.alert = new Alert("Notification", args[1], args[2]);
- else if (args.length == 4) {
- this.alertHandler.alert = new Alert(args[1], args[2], args[3]);
- }
- this.pktType = -1;
- return true;
- }
- if (s.endsWith(":tradereq:")) {
- String s3 = s.substring(0, s.indexOf(":"));
- long l17 = TextClass.longForName(s3);
- boolean flag2 = false;
- for (int j27 = 0; j27 < this.ignoreCount; j27++)
- if (this.ignoreListAsLongs[j27] == l17)
- {
- flag2 = true;
- }
- if ((!flag2) && (this.anInt1251 == 0))
- pushMessage("wishes to trade with you.", 4, s3);
- } else if (s.endsWith(":clan:")) {
- String s4 = s.substring(0, s.indexOf(":"));
- pushMessage("Clan: ", 8, s4);
- } else if (s.endsWith("#url#")) {
- String text = s.substring(0, s.indexOf("-"));
- s = s.substring(text.length() + 1).trim();
- String link = s.substring(0, s.indexOf("#"));
- pushMessage(text, 9, link);
- } else if (s.endsWith(":resetautocast:")) {
- this.Autocast = false;
- this.autocastId = 0;
- this.magicAuto.drawSprite(1000, 1000);
- } else if (s.endsWith(":duelreq:")) {
- String s4 = s.substring(0, s.indexOf(":"));
- long l18 = TextClass.longForName(s4);
- boolean flag3 = false;
- for (int k27 = 0; k27 < this.ignoreCount; k27++) {
- if (this.ignoreListAsLongs[k27] == l18)
- {
- flag3 = true;
- }
- }
- if ((!flag3) && (this.anInt1251 == 0))
- pushMessage("wishes to duel with you.", 8, s4);
- } else if (s.endsWith(":chalreq:")) {
- String s5 = s.substring(0, s.indexOf(":"));
- long l19 = TextClass.longForName(s5);
- boolean flag4 = false;
- for (int l27 = 0; l27 < this.ignoreCount; l27++) {
- if (this.ignoreListAsLongs[l27] == l19)
- {
- flag4 = true;
- }
- }
- if ((!flag4) && (this.anInt1251 == 0)) {
- String s8 = s.substring(s.indexOf(":") + 1, s.length() - 9);
- pushMessage(s8, 8, s5);
- }
- } else {
- pushMessage(s, 0, "");
- }
- this.pktType = -1;
- return true;
- case 1:
- for (int k4 = 0; k4 < this.playerArray.length; k4++)
- if (this.playerArray[k4] != null)
- this.playerArray[k4].anim = -1;
- for (int j12 = 0; j12 < this.npcArray.length; j12++)
- if (this.npcArray[j12] != null)
- this.npcArray[j12].anim = -1;
- this.pktType = -1;
- return true;
- case 50:
- long l4 = this.inStream.readQWord();
- int i18 = this.inStream.readUnsignedByte();
- String s7 = TextClass.fixName(TextClass.nameForLong(l4));
- for (int k24 = 0; k24 < this.friendsCount; k24++) {
- if (l4 == this.friendsListAsLongs[k24])
- {
- if (this.friendsNodeIDs[k24] != i18) {
- this.friendsNodeIDs[k24] = i18;
- needDrawTabArea = true;
- if (i18 >= 2) {
- pushMessage(s7 + " has logged in.", 5, "");
- }
- if (i18 <= 1) {
- pushMessage(s7 + " has logged out.", 5, "");
- }
- }
- s7 = null;
- }
- }
- if ((s7 != null) && (this.friendsCount < 200)) {
- this.friendsListAsLongs[this.friendsCount] = l4;
- this.friendsList[this.friendsCount] = s7;
- this.friendsNodeIDs[this.friendsCount] = i18;
- this.friendsCount += 1;
- needDrawTabArea = true;
- }
- for (boolean flag6 = false; !flag6;)
- {
- flag6 = true;
- for (int index = 0; index < friendsCount - 1; index++) {
- if (((this.friendsNodeIDs[index] != nodeID) && (this.friendsNodeIDs[(index + 1)] == nodeID)) || ((this.friendsNodeIDs[index] == 0) && (this.friendsNodeIDs[(index + 1)] != 0))) {
- int j31 = this.friendsNodeIDs[index];
- this.friendsNodeIDs[index] = this.friendsNodeIDs[(index + 1)];
- this.friendsNodeIDs[(index + 1)] = j31;
- String s10 = this.friendsList[index];
- this.friendsList[index] = this.friendsList[(index + 1)];
- this.friendsList[(index + 1)] = s10;
- long l32 = this.friendsListAsLongs[index];
- this.friendsListAsLongs[index] = this.friendsListAsLongs[(index + 1)];
- this.friendsListAsLongs[(index + 1)] = l32;
- needDrawTabArea = true;
- flag6 = false;
- }
- }
- }
- this.pktType = -1;
- return true;
- case 110:
- if (tabID == 12)
- needDrawTabArea = true;
- this.energy = this.inStream.readUnsignedByte();
- this.pktType = -1;
- return true;
- case 254:
- this.anInt855 = this.inStream.readUnsignedByte();
- if (this.anInt855 == 1)
- this.anInt1222 = this.inStream.readUnsignedWord();
- if ((this.anInt855 >= 2) && (this.anInt855 <= 6)) {
- if (this.anInt855 == 2) {
- this.anInt937 = 64;
- this.anInt938 = 64;
- }
- if (this.anInt855 == 3) {
- this.anInt937 = 0;
- this.anInt938 = 64;
- }
- if (this.anInt855 == 4) {
- this.anInt937 = 128;
- this.anInt938 = 64;
- }
- if (this.anInt855 == 5) {
- this.anInt937 = 64;
- this.anInt938 = 0;
- }
- if (this.anInt855 == 6) {
- this.anInt937 = 64;
- this.anInt938 = 128;
- }
- this.anInt855 = 2;
- this.anInt934 = this.inStream.readUnsignedWord();
- this.anInt935 = this.inStream.readUnsignedWord();
- this.anInt936 = this.inStream.readUnsignedByte();
- }
- if (this.anInt855 == 10)
- this.anInt933 = this.inStream.readUnsignedWord();
- this.pktType = -1;
- return true;
- case 248:
- int i5 = this.inStream.method435();
- int k12 = this.inStream.readUnsignedWord();
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- openInterfaceID = i5;
- this.invOverlayInterfaceID = k12;
- needDrawTabArea = true;
- tabAreaAltered = true;
- this.aBoolean1149 = false;
- this.pktType = -1;
- return true;
- case 79:
- int j5 = this.inStream.method434();
- int l12 = this.inStream.method435();
- RSInterface class9_3 = RSInterface.interfaceCache[j5];
- if ((class9_3 != null) && (class9_3.interfaceType == 0)) {
- if (l12 < 0)
- l12 = 0;
- if (l12 > class9_3.scrollMax - class9_3.height)
- l12 = class9_3.scrollMax - class9_3.height;
- class9_3.scrollPosition = l12;
- }
- this.pktType = -1;
- return true;
- case 68:
- for (int k5 = 0; k5 < this.variousSettings.length; k5++)
- if (this.variousSettings[k5] != this.anIntArray1045[k5]) {
- this.variousSettings[k5] = this.anIntArray1045[k5];
- method33(k5);
- needDrawTabArea = true;
- }
- this.pktType = -1;
- return true;
- case 196:
- long l5 = this.inStream.readQWord();
- int j18 = this.inStream.readDWord();
- int l21 = this.inStream.readUnsignedByte();
- boolean flag5 = false;
- if (l21 <= 1) {
- for (int l29 = 0; l29 < this.ignoreCount; l29++) {
- if (this.ignoreListAsLongs[l29] == l5)
- {
- flag5 = true;
- }
- }
- }
- if ((!flag5) && (this.anInt1251 == 0))
- {
- try
- {
- String s9 = TextInput.method525(this.pktSize - 13, this.inStream);
- if (l21 == 4)
- pushMessage(s9, 7, "@cr0@ " + TextClass.fixName(TextClass.nameForLong(l5)));
- else if (l21 == 3)
- pushMessage(s9, 7, "@cr3@ " + TextClass.fixName(TextClass.nameForLong(l5)));
- else if (l21 == 2)
- pushMessage(s9, 7, "@cr2@ " + TextClass.fixName(TextClass.nameForLong(l5)));
- else if (l21 == 1)
- pushMessage(s9, 7, "@cr1@ " + TextClass.fixName(TextClass.nameForLong(l5)));
- else
- pushMessage(s9, 3, TextClass.fixName(TextClass.nameForLong(l5)));
- }
- catch (Exception exception1) {
- SignLink.reporterror("cde1");
- }
- }
- this.pktType = -1;
- return true;
- case 85:
- this.anInt1269 = this.inStream.method427();
- this.anInt1268 = this.inStream.method427();
- this.pktType = -1;
- return true;
- case 24:
- this.anInt1054 = this.inStream.method428();
- if (this.anInt1054 == tabID) {
- if (this.anInt1054 == 3)
- tabID = 1;
- else
- tabID = 3;
- needDrawTabArea = true;
- }
- this.pktType = -1;
- return true;
- case 246:
- int i6 = this.inStream.method434();
- int i13 = this.inStream.readUnsignedWord();
- int k18 = this.inStream.readUnsignedWord();
- if (k18 == 65535) {
- RSInterface.interfaceCache[i6].disabledMediaType = 0;
- this.pktType = -1;
- return true;
- }
- ItemDef itemDef = ItemDef.forID(k18);
- RSInterface.interfaceCache[i6].disabledMediaType = 4;
- RSInterface.interfaceCache[i6].disabledMediaID = k18;
- RSInterface.interfaceCache[i6].modelRotationY = itemDef.modelRotationY;
- RSInterface.interfaceCache[i6].modelRotationX = itemDef.modelRotationX;
- RSInterface.interfaceCache[i6].modelZoom = (itemDef.modelZoom * 100 / i13);
- this.pktType = -1;
- return true;
- case 171:
- boolean flag1 = this.inStream.readUnsignedByte() == 1;
- int j13 = this.inStream.readUnsignedWord();
- RSInterface.interfaceCache[j13].interfaceShown = flag1;
- this.pktType = -1;
- return true;
- case 142:
- int j6 = this.inStream.method434();
- method60(j6);
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- this.invOverlayInterfaceID = j6;
- needDrawTabArea = true;
- tabAreaAltered = true;
- openInterfaceID = -1;
- this.aBoolean1149 = false;
- this.pktType = -1;
- return true;
- case 126:
- String text = this.inStream.readString();
- int frame = this.inStream.method435();
- if (text.startsWith("www.")) {
- launchURL(text);
- this.pktType = -1;
- return true;
- }
- updateStrings(text, frame);
- sendFrame126(text, frame);
- if ((frame >= 18144) && (frame <= 18244)) {
- this.clanList[(frame - 18144)] = text;
- }
- this.pktType = -1;
- return true;
- case 206:
- this.publicChatMode = this.inStream.readUnsignedByte();
- this.privateChatMode = this.inStream.readUnsignedByte();
- this.tradeMode = this.inStream.readUnsignedByte();
- inputTaken = true;
- this.pktType = -1;
- return true;
- case 240:
- if (tabID == 12)
- needDrawTabArea = true;
- this.weight = this.inStream.readSignedWord();
- this.pktType = -1;
- return true;
- case 8:
- int k6 = this.inStream.method436();
- int l13 = this.inStream.readUnsignedWord();
- RSInterface.interfaceCache[k6].disabledMediaType = 1;
- RSInterface.interfaceCache[k6].disabledMediaID = l13;
- this.pktType = -1;
- return true;
- case 122:
- int l6 = this.inStream.method436();
- int i14 = this.inStream.method436();
- int i19 = i14 >> 10 & 0x1F;
- int i22 = i14 >> 5 & 0x1F;
- int l24 = i14 & 0x1F;
- RSInterface.interfaceCache[l6].disabledColor = ((i19 << 19) + (i22 << 11) + (l24 << 3));
- this.pktType = -1;
- return true;
- case 53:
- needDrawTabArea = true;
- int i7 = this.inStream.readUnsignedWord();
- RSInterface class9_1 = RSInterface.interfaceCache[i7];
- int j19 = this.inStream.readUnsignedWord();
- for (int j22 = 0; j22 < j19; j22++) {
- int i25 = this.inStream.readUnsignedByte();
- if (i25 == 255)
- i25 = this.inStream.method440();
- class9_1.inventory[j22] = this.inStream.method436();
- class9_1.inventoryValue[j22] = i25;
- }
- for (int j25 = j19; j25 < class9_1.inventory.length; j25++) {
- class9_1.inventory[j25] = 0;
- class9_1.inventoryValue[j25] = 0;
- }
- this.pktType = -1;
- return true;
- case 230:
- int j7 = this.inStream.method435();
- int j14 = this.inStream.readUnsignedWord();
- int k19 = this.inStream.readUnsignedWord();
- int k22 = this.inStream.method436();
- RSInterface.interfaceCache[j14].modelRotationY = k19;
- RSInterface.interfaceCache[j14].modelRotationX = k22;
- RSInterface.interfaceCache[j14].modelZoom = j7;
- this.pktType = -1;
- return true;
- case 221:
- this.anInt900 = this.inStream.readUnsignedByte();
- needDrawTabArea = true;
- this.pktType = -1;
- return true;
- case 177:
- this.aBoolean1160 = true;
- this.anInt995 = this.inStream.readUnsignedByte();
- this.anInt996 = this.inStream.readUnsignedByte();
- this.anInt997 = this.inStream.readUnsignedWord();
- this.anInt998 = this.inStream.readUnsignedByte();
- this.anInt999 = this.inStream.readUnsignedByte();
- if (this.anInt999 >= 100) {
- int k7 = this.anInt995 * 128 + 64;
- int k14 = this.anInt996 * 128 + 64;
- int i20 = method42(this.plane, k14, k7) - this.anInt997;
- int l22 = k7 - this.xCameraPos;
- int k25 = i20 - this.zCameraPos;
- int j28 = k14 - this.yCameraPos;
- int i30 = (int)Math.sqrt(l22 * l22 + j28 * j28);
- this.yCameraCurve = ((int)(Math.atan2(k25, i30) * 325.94900000000001D) & 0x7FF);
- this.xCameraCurve = ((int)(Math.atan2(l22, j28) * -325.94900000000001D) & 0x7FF);
- if (this.yCameraCurve < 128)
- this.yCameraCurve = 128;
- if (this.yCameraCurve > 383)
- this.yCameraCurve = 383;
- }
- this.pktType = -1;
- return true;
- case 249:
- this.anInt1046 = this.inStream.method426();
- this.unknownInt10 = this.inStream.method436();
- this.pktType = -1;
- return true;
- case 65:
- updateNPCs(this.inStream, this.pktSize);
- this.pktType = -1;
- return true;
- case 27:
- this.messagePromptRaised = false;
- this.inputDialogState = 1;
- this.amountOrNameInput = "";
- inputTaken = true;
- this.pktType = -1;
- return true;
- case 187:
- this.messagePromptRaised = false;
- this.inputDialogState = 2;
- this.amountOrNameInput = "";
- inputTaken = true;
- this.pktType = -1;
- return true;
- case 97:
- int l7 = this.inStream.readUnsignedWord();
- method60(l7);
- if (this.invOverlayInterfaceID != -1) {
- this.invOverlayInterfaceID = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- if (l7 == 15244) {
- openInterfaceID = 15774;
- this.fullscreenInterfaceID = 15244;
- } else {
- openInterfaceID = l7;
- }
- this.aBoolean1149 = false;
- this.pktType = -1;
- return true;
- case 218:
- int i8 = this.inStream.method438();
- this.dialogID = i8;
- inputTaken = true;
- this.pktType = -1;
- return true;
- case 87:
- int j8 = this.inStream.method434();
- int l14 = this.inStream.method439();
- this.anIntArray1045[j8] = l14;
- if (this.variousSettings[j8] != l14) {
- this.variousSettings[j8] = l14;
- method33(j8);
- needDrawTabArea = true;
- if (this.dialogID != -1)
- inputTaken = true;
- }
- this.pktType = -1;
- return true;
- case 36:
- int k8 = this.inStream.method434();
- byte byte0 = this.inStream.readSignedByte();
- this.anIntArray1045[k8] = byte0;
- if (this.variousSettings[k8] != byte0) {
- this.variousSettings[k8] = byte0;
- method33(k8);
- needDrawTabArea = true;
- if (this.dialogID != -1)
- inputTaken = true;
- }
- this.pktType = -1;
- return true;
- case 61:
- this.anInt1055 = this.inStream.readUnsignedByte();
- this.pktType = -1;
- return true;
- case 200:
- int l8 = this.inStream.readUnsignedWord();
- int i15 = this.inStream.readSignedWord();
- RSInterface class9_4 = RSInterface.interfaceCache[l8];
- class9_4.disabledAnimation = i15;
- class9_4.modelZoom = 1600;
- if (i15 == -1) {
- class9_4.animationLength = 0;
- class9_4.animationDelay = 0;
- }
- this.pktType = -1;
- return true;
- case 219:
- if (this.invOverlayInterfaceID != -1) {
- this.invOverlayInterfaceID = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- openInterfaceID = -1;
- this.aBoolean1149 = false;
- this.pktType = -1;
- return true;
- case 34:
- needDrawTabArea = true;
- int i9 = this.inStream.readUnsignedWord();
- RSInterface class9_2 = RSInterface.interfaceCache[i9];
- while (this.inStream.currentOffset < this.pktSize) {
- int j20 = this.inStream.method422();
- int i23 = this.inStream.readUnsignedWord();
- int l25 = this.inStream.readUnsignedByte();
- if (l25 == 255)
- l25 = this.inStream.readDWord();
- if ((j20 >= 0) && (j20 < class9_2.inventory.length)) {
- class9_2.inventory[j20] = i23;
- class9_2.inventoryValue[j20] = l25;
- }
- }
- this.pktType = -1;
- return true;
- case 4:
- case 44:
- case 84:
- case 101:
- case 105:
- case 117:
- case 147:
- case 151:
- case 156:
- case 160:
- case 215:
- method137(this.inStream, this.pktType);
- this.pktType = -1;
- return true;
- case 106:
- tabID = this.inStream.method427();
- needDrawTabArea = true;
- tabAreaAltered = true;
- this.pktType = -1;
- return true;
- case 164:
- int j9 = this.inStream.method434();
- method60(j9);
- if (this.invOverlayInterfaceID != -1) {
- this.invOverlayInterfaceID = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- this.backDialogID = j9;
- inputTaken = true;
- openInterfaceID = -1;
- this.aBoolean1149 = false;
- this.pktType = -1;
- return true;
- }
- SignLink.reporterror("T1 - " + this.pktType + "," + this.pktSize + " - " + this.anInt842 + "," + this.anInt843);
- }
- catch (IOException _ex) {
- dropClient();
- } catch (Exception exception) {
- exception.printStackTrace();
- String s2 = "T2 - " + this.pktType + "," + this.anInt842 + "," + this.anInt843 + " - " + this.pktSize + "," + (this.baseX + myPlayer.smallX[0]) + "," + (this.baseY + myPlayer.smallY[0]) + " - ";
- for (int j15 = 0; (j15 < this.pktSize) && (j15 < 50); j15++)
- s2 = s2 + this.inStream.buffer[j15] + ",";
- SignLink.reporterror(s2);
- }
- this.pktType = -1;
- return true;
- }
- private void draw3DScreenMain()
- {
- this.anInt1265 += 1;
- method47(true);
- method26(true);
- method47(false);
- method26(false);
- method55();
- renderStationaryGraphics();
- if (!this.aBoolean1160) {
- int i = this.anInt1184;
- if (this.anInt984 / 256 > i)
- i = this.anInt984 / 256;
- if ((this.aBooleanArray876[4]) && (this.anIntArray1203[4] + 128 > i))
- i = this.anIntArray1203[4] + 128;
- int k = this.minimapInt1 + this.anInt896 & 0x7FF;
- setCameraPos(this.CameraPos2 + i * this.CameraPos1, i, this.anInt1014, method42(this.plane, myPlayer.y, myPlayer.x) - 50, k, this.anInt1015);
- }
- int j;
- if (!this.aBoolean1160)
- j = method120();
- else
- j = method121();
- int l = this.xCameraPos;
- int i1 = this.zCameraPos;
- int j1 = this.yCameraPos;
- int k1 = this.yCameraCurve;
- int l1 = this.xCameraCurve;
- for (int i2 = 0; i2 < 5; i2++)
- if (this.aBooleanArray876[i2]) {
- int j2 = (int)(Math.random() * (this.anIntArray873[i2] * 2 + 1) - this.anIntArray873[i2] + Math.sin(this.anIntArray1030[i2] * (this.anIntArray928[i2] / 100.0D)) * this.anIntArray1203[i2]);
- if (i2 == 0)
- this.xCameraPos += j2;
- if (i2 == 1)
- this.zCameraPos += j2;
- if (i2 == 2)
- this.yCameraPos += j2;
- if (i2 == 3)
- this.xCameraCurve = (this.xCameraCurve + j2 & 0x7FF);
- if (i2 == 4) {
- this.yCameraCurve += j2;
- if (this.yCameraCurve < 128)
- this.yCameraCurve = 128;
- if (this.yCameraCurve > 383)
- this.yCameraCurve = 383;
- }
- }
- int k2 = Texture.anInt1481;
- Model.aBoolean1684 = true;
- Model.anInt1687 = 0;
- Model.modelClickX = this.mouseX - 4;
- Model.modelClickY = this.mouseY - 4;
- DrawingArea.clear();
- if (this.fogSky)
- DrawingArea.fillRect(0, 0, 512, 334, 13156520);
- this.sceneGraph.draw3DScreen(this.xCameraPos, this.yCameraPos, this.xCameraCurve, this.zCameraPos, j, this.yCameraCurve);
- this.sceneGraph.clearObj5Cache();
- updateEntities();
- drawHeadIcon();
- method37(k2);
- draw3dScreen();
- if (!menuOpen) {
- processRightClick();
- drawTooltip();
- } else {
- drawMenu(4, 4);
- }
- drawDeveloperConsole(showDeveloperConsole, 4, 4);
- mainGameArea.drawGraphics(4, 4, this.graphics);
- xCameraPos = l;
- zCameraPos = i1;
- yCameraPos = j1;
- yCameraCurve = k1;
- xCameraCurve = l1;
- }
- public void sendFrame97(int interfaceID)
- {
- method60(interfaceID);
- if (this.invOverlayInterfaceID != -1) {
- this.invOverlayInterfaceID = -1;
- needDrawTabArea = true;
- tabAreaAltered = true;
- }
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- }
- if (this.inputDialogState != 0) {
- this.inputDialogState = 0;
- inputTaken = true;
- }
- openInterfaceID = interfaceID;
- this.aBoolean1149 = false;
- }
- public void clearTopInterfaces() {
- this.stream.createFrame(130);
- if (this.invOverlayInterfaceID != -1) {
- this.invOverlayInterfaceID = -1;
- needDrawTabArea = true;
- this.aBoolean1149 = false;
- tabAreaAltered = true;
- }
- if (this.backDialogID != -1) {
- this.backDialogID = -1;
- inputTaken = true;
- this.aBoolean1149 = false;
- }
- openInterfaceID = -1;
- this.fullscreenInterfaceID = -1;
- }
- public Client() {
- this.LP = 0.0F;
- this.tabHPos = -1;
- this.alertHandler = new AlertHandler(this);
- this.fullscreenInterfaceID = -1;
- this.chatRights = new int[500];
- this.clanNames = new String[500];
- this.chatTypeView = 0;
- this.clanChatMode = 0;
- this.cButtonHPos = -1;
- this.cButtonCPos = 0;
- server = "127.0.0.1";
- this.anIntArrayArray825 = new int[104][104];
- this.friendsNodeIDs = new int['È'];
- this.groundArray = new NodeList[4][104][104];
- this.aBoolean831 = false;
- this.aStream_834 = new Stream(new byte[17000]);
- this.npcArray = new Npc[16384];
- this.npcIndices = new int[16384];
- this.anIntArray840 = new int[1000];
- this.aStream_847 = Stream.create();
- this.soundEffectsEnabled = true;
- openInterfaceID = -1;
- this.currentExp = new int[27];
- this.anIntArray873 = new int[5];
- this.anInt874 = -1;
- this.aBooleanArray876 = new boolean[5];
- this.drawFlames = false;
- this.reportAbuseInput = "";
- this.unknownInt10 = -1;
- this.menuOpen = false;
- this.inputString = "";
- this.maxPlayers = 2048;
- this.myPlayerIndex = 2047;
- this.playerArray = new Player[this.maxPlayers];
- this.playerIndices = new int[this.maxPlayers];
- this.anIntArray894 = new int[this.maxPlayers];
- this.aStreamArray895s = new Stream[this.maxPlayers];
- this.anInt897 = 1;
- this.anIntArrayArray901 = new int[104][104];
- this.anInt902 = 7759444;
- this.aByteArray912 = new byte[16384];
- this.currentStats = new int[27];
- this.ignoreListAsLongs = new long[100];
- this.loadingError = false;
- this.anInt927 = 3353893;
- this.anIntArray928 = new int[5];
- this.anIntArrayArray929 = new int[104][104];
- this.chatTypes = new int[500];
- this.chatNames = new String[500];
- this.chatMessages = new String[500];
- this.chatButtons = new Sprite[4];
- this.sideIcons = new Sprite[14];
- this.sIcons483 = new Sprite[14];
- this.tabSelected = new Sprite[3];
- this.newSideIcons = new Sprite[16];
- this.sIcons459 = new Sprite[13];
- this.redStones = new Sprite[16];
- this.aBoolean954 = true;
- this.friendsListAsLongs = new long['È'];
- this.currentSong = -1;
- this.drawingFlames = false;
- this.spriteDrawX = -1;
- this.spriteDrawY = -1;
- this.compassClipRight = new int[33];
- this.decompressors = new Decompressor[5];
- this.variousSettings = new int[2000];
- this.aBoolean972 = false;
- this.maxChatsAtTime = 50;
- this.chatDrawXArray = new int[this.maxChatsAtTime];
- this.chatDrawYArray = new int[this.maxChatsAtTime];
- this.anIntArray978 = new int[this.maxChatsAtTime];
- this.anIntArray979 = new int[this.maxChatsAtTime];
- this.chatColorArray = new int[this.maxChatsAtTime];
- this.chatAnimArray = new int[this.maxChatsAtTime];
- this.chatCycleArray = new int[this.maxChatsAtTime];
- this.chatSpokenArray = new String[this.maxChatsAtTime];
- this.anInt985 = -1;
- this.hitMarks = new Sprite[24];
- this.hitMark = new Sprite[4];
- this.charEditColors = new int[5];
- this.aBoolean994 = false;
- this.anInt1002 = 2301979;
- this.amountOrNameInput = "";
- this.aClass19_1013 = new NodeList();
- this.aBoolean1017 = false;
- this.anInt1018 = -1;
- this.anIntArray1030 = new int[5];
- this.charEditChanged = false;
- this.mapFunctions = new Sprite[100];
- this.dialogID = -1;
- this.maxStats = new int[27];
- this.anIntArray1045 = new int[2000];
- this.charEditGender = true;
- this.minimapClipRight = new int[''];
- this.anInt1054 = -1;
- this.aClass19_1056 = new NodeList();
- this.compassClipLeft = new int[33];
- this.aClass9_1059 = new RSInterface();
- this.mapScenes = new Background[100];
- this.barFillColor = 5063219;
- this.charEditIdKit = new int[7];
- this.anIntArray1072 = new int[1000];
- this.anIntArray1073 = new int[1000];
- this.aBoolean1080 = false;
- this.friendsList = new String['È'];
- this.inStream = Stream.create();
- this.expectedCRCs = new int[9];
- this.menuActionCmd2 = new int[500];
- this.menuActionCmd3 = new int[500];
- this.menuActionID = new int[500];
- this.menuActionCmd1 = new int[500];
- this.headIcons = new Sprite[29];
- this.skullIcons = new Sprite[20];
- this.headIconsHint = new Sprite[20];
- tabAreaAltered = false;
- this.inputPromptTitle = "";
- this.atPlayerActions = new String[5];
- this.atPlayerArray = new boolean[5];
- this.anIntArrayArrayArray1129 = new int[4][13][13];
- this.anInt1132 = 2;
- this.aSpriteArray1140 = new Sprite[1000];
- this.aBoolean1141 = false;
- this.aBoolean1149 = false;
- this.crosses = new Sprite[8];
- this.musicEnabled = true;
- needDrawTabArea = false;
- this.loggedIn = false;
- this.canMute = false;
- this.loadGeneratedMap = false;
- this.aBoolean1160 = false;
- this.anInt1171 = 1;
- myUsername = "";
- myPassword = "";
- this.genericLoadingError = false;
- this.reportAbuseInterfaceID = -1;
- this.aClass19_1179 = new NodeList();
- this.anInt1184 = 128;
- this.invOverlayInterfaceID = -1;
- this.stream = Stream.create();
- this.menuActionName = new String[500];
- this.anIntArray1203 = new int[5];
- this.anIntArray1207 = new int[50];
- this.anInt1210 = 2;
- chatAreaScrollPos = 78;
- this.promptInput = "";
- this.modIcons = new Sprite[7];
- this.chatImages = new Sprite[7];
- tabID = 3;
- inputTaken = false;
- this.songChanging = true;
- this.minimapClipLeft = new int[''];
- this.aClass11Array1230 = new Class11[4];
- this.anIntArray1241 = new int[50];
- this.aBoolean1242 = false;
- this.anIntArray1250 = new int[50];
- this.rsAlreadyLoaded = false;
- this.welcomeScreenRaised = true;
- this.messagePromptRaised = false;
- this.loginMessage1 = "";
- this.loginMessage2 = "";
- this.backDialogID = -1;
- this.anInt1279 = 2;
- this.bigX = new int[4000];
- this.bigY = new int[4000];
- this.anInt1289 = -1;
- }
- public void resetAllImageProducers()
- {
- if (this.fullGameScreen != null) {
- return;
- }
- this.chatArea = null;
- this.miniMapArea = null;
- this.tabArea = null;
- this.mainGameArea = null;
- this.aRSImageProducer_1125 = null;
- this.aRSImageProducer_1107 = null;
- this.aRSImageProducer_1108 = null;
- this.loginScreenArea = null;
- this.leftSideFlame = null;
- this.rightSideFlame = null;
- this.gameLogo = null;
- this.aRSImageProducer_1113 = null;
- this.aRSImageProducer_1114 = null;
- this.aRSImageProducer_1115 = null;
- this.fullGameScreen = new RSImageProducer(765, 503, getGameComponent());
- this.welcomeScreenRaised = true;
- }
- public int getSpriteID() {
- this.spriteChanged = true;
- if (this.is562)
- return 4;
- if (this.is459)
- return 3;
- if (this.is480)
- return 2;
- if ((this.is508) || (this.is525))
- return 1;
- if (this.is474) {
- return 0;
- }
- return 0;
- }
- public void launchURL(String url) {
- String osName = System.getProperty("os.name");
- try {
- if (osName.startsWith("Mac OS")) {
- Class fileMgr = Class.forName("com.apple.eio.FileManager");
- Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] { String.class });
- openURL.invoke(null, new Object[] { url });
- } else if (osName.startsWith("Windows")) {
- Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
- } else {
- String[] browsers = { "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape", "safari" };
- String browser = null;
- for (int count = 0; (count < browsers.length) && (browser == null); count++)
- if (Runtime.getRuntime().exec(new String[] { "which", browsers[count] }).waitFor() == 0)
- browser = browsers[count];
- if (browser == null) {
- throw new Exception("Could not find web browser");
- }
- Runtime.getRuntime().exec(new String[] { browser, url });
- }
- } catch (Exception e) {
- pushMessage("Failed to open URL.", 0, "");
- }
- }
- public boolean is459 = false;
- public boolean is474 = false;
- public boolean is480 = false;
- public boolean is508 = false;
- public boolean is525 = false;
- public boolean is562 = true;
- public Sprite alertBack;
- public Sprite alertBorder;
- public Sprite alertBorderH;
- Sprite[] interactionHovers = new Sprite[9];
- public int MapX;
- public int MapY;
- private Sprite HPBarFull;
- private Sprite HPBarEmpty;
- public Sprite[] ORBS = new Sprite[23];
- public Sprite[] LOGOUT = new Sprite[5];
- public Sprite xpOrb;
- public Sprite xpCounter;
- public Sprite xpFlag;
- int restOpacity = 125;
- public int rights;
- public Sprite Increase;
- public Sprite Decrease;
- private Sprite StaffToggle;
- private Sprite StaffType;
- private Sprite StaffSelectBg;
- private Sprite StaffSelect;
- private Sprite StaffSelectH;
- private Sprite StaffSelected;
- private Sprite StaffSend;
- private Sprite StaffError;
- public String name;
- public String disabledMessage;
- public String clanname;
- private final int[] chatRights;
- private final String[] clanNames;
- public int chatTypeView;
- public int clanChatMode;
- public int duelMode;
- private Sprite reestablish;
- private Sprite[] chatButtons;
- private Sprite mapArea;
- private Sprite tabHover;
- private Sprite tabClicked;
- private Sprite[] tabSelected;
- private Sprite[] newSideIcons;
- public Sprite[] CustomMapback = new Sprite[5];
- public Sprite[] chatBack = new Sprite[5];
- public Sprite[] tabBack = new Sprite[5];
- private RSImageProducer leftFrame;
- private RSImageProducer topFrame;
- private RSImageProducer rightFrame;
- private int ignoreCount;
- private long aLong824;
- private int[][] anIntArrayArray825;
- private int[] friendsNodeIDs;
- private NodeList[][][] groundArray;
- private volatile boolean aBoolean831;
- private int loginScreenState;
- private Stream aStream_834;
- private Npc[] npcArray;
- private int npcCount;
- private int[] npcIndices;
- private int anInt839;
- private int[] anIntArray840;
- private int anInt841;
- private int anInt842;
- private int anInt843;
- private String chatBoxMessage;
- private int privateChatMode;
- private Stream aStream_847;
- private boolean soundEffectsEnabled;
- private static int anInt849;
- private int[] anIntArray851;
- private int[] anIntArray852;
- private int[] anIntArray853;
- private static int anInt854;
- private int anInt855;
- public static int openInterfaceID;
- private int xCameraPos;
- private int zCameraPos;
- private int yCameraPos;
- private int yCameraCurve;
- private int xCameraCurve;
- public int myPrivilege;
- private final int[] currentExp;
- private Sprite[] redStones;
- private Sprite mapFlag;
- private Sprite mapMarker;
- private final int[] anIntArray873;
- private int anInt874;
- private final boolean[] aBooleanArray876;
- private int weight;
- private MouseDetection mouseDetection;
- private volatile boolean drawFlames;
- private String reportAbuseInput;
- private int unknownInt10;
- private boolean menuOpen;
- private int anInt886;
- private String inputString;
- private final int maxPlayers;
- private final int myPlayerIndex;
- private Player[] playerArray;
- private int playerCount;
- private int[] playerIndices;
- private int anInt893;
- private int[] anIntArray894;
- private Stream[] aStreamArray895s;
- private int anInt896;
- private int anInt897;
- private int friendsCount;
- private int anInt900;
- private int[][] anIntArrayArray901;
- private final int anInt902;
- private byte[] aByteArray912;
- private int anInt913;
- private int crossX;
- private int crossY;
- private int crossIndex;
- private int crossType;
- private int plane;
- private final int[] currentStats;
- private static int anInt924;
- private final long[] ignoreListAsLongs;
- private boolean loadingError;
- private final int anInt927;
- private final int[] anIntArray928;
- private int[][] anIntArrayArray929;
- private Sprite aSprite_931;
- private Sprite aSprite_932;
- private int anInt933;
- private int anInt934;
- private int anInt935;
- private int anInt936;
- private int anInt937;
- private int anInt938;
- private final int[] chatTypes;
- private final String[] chatNames;
- private final String[] chatMessages;
- private int animationTimePassed;
- private WorldController sceneGraph;
- private Sprite[] sideIcons;
- private Sprite[] sIcons483;
- private Sprite[] sIcons459;
- private int menuScreenArea;
- private int menuOffsetX;
- private int menuOffsetY;
- private int menuWidth;
- private int menuHeight;
- private long aLong953;
- private boolean aBoolean954;
- private long[] friendsListAsLongs;
- private String[] clanList = new String[100];
- private int currentSong;
- private static int nodeID = 10;
- static int portOff;
- static boolean clientData;
- private static boolean isMembers = true;
- private static boolean lowMem;
- private volatile boolean drawingFlames;
- private int spriteDrawX;
- private int spriteDrawY;
- private final int[] chatColor = {
- 16776960, 16711680, 65280, 65535, 16711935, 16777215 };
- public Sprite titleBox1;
- private final int[] compassClipRight;
- final Decompressor[] decompressors;
- public int[] variousSettings;
- private boolean aBoolean972;
- private final int maxChatsAtTime;
- private final int[] chatDrawXArray;
- private final int[] chatDrawYArray;
- private final int[] anIntArray978;
- private final int[] anIntArray979;
- private final int[] chatColorArray;
- private final int[] chatAnimArray;
- private final int[] chatCycleArray;
- private final String[] chatSpokenArray;
- private int anInt984;
- private int anInt985;
- private static int anInt986;
- private Sprite[] hitMarks;
- private Sprite[] hitMark;
- private Sprite[] newHitMark = new Sprite[7];
- private int anInt988;
- private int anInt989;
- private final int[] charEditColors;
- private final boolean aBoolean994;
- private int anInt995;
- private int anInt996;
- private int anInt997;
- private int anInt998;
- private int anInt999;
- private ISAACRandomGen encryption;
- private Sprite mapEdge;
- private Sprite multiOverlay;
- private final int anInt1002;
- static final int[][] chatEditColorChoises = {
- {
- 6798, 107, 10283, 16, 4797, 7744, 5799, 4634, 33697, 22433,
- 2983, 54193 },
- {
- 8741, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153,
- 56621, 4783, 1341, 16578, 35003, 25239 },
- {
- 25238, 8742, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094,
- 10153, 56621, 4783, 1341, 16578, 35003 },
- {
- 4626, 11146, 6439, 12, 4758, 10270 },
- {
- 4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574 } };
- private String amountOrNameInput;
- private static int anInt1005;
- private int daysSinceLastLogin;
- private int pktSize;
- private int pktType;
- private int anInt1009;
- private int anInt1010;
- private int anInt1011;
- private NodeList aClass19_1013;
- private int anInt1014;
- private int anInt1015;
- private int anInt1016;
- private boolean aBoolean1017;
- private int anInt1018;
- private int miniMapOverlay;
- private int anInt1022;
- private int loadingStage;
- private Sprite scrollBar1;
- private Sprite scrollBar2;
- private Sprite scrollBar3;
- private Sprite scrollBar4;
- private int anInt1026;
- private final int[] anIntArray1030;
- private boolean charEditChanged;
- private Sprite[] mapFunctions;
- private int baseX;
- private int baseY;
- private int anInt1036;
- private int anInt1037;
- private int loginFailures;
- private int anInt1039;
- private int dialogID;
- private final int[] maxStats;
- private final int[] anIntArray1045;
- private int anInt1046;
- private boolean charEditGender;
- private int anInt1048;
- private String loadingText;
- private static int anInt1051;
- private final int[] minimapClipRight;
- private NamedArchive titleStreamLoader;
- private int anInt1054;
- private int anInt1055;
- private NodeList aClass19_1056;
- private final int[] compassClipLeft;
- public final RSInterface aClass9_1059;
- private Background[] mapScenes;
- private int anInt1062;
- private final int barFillColor;
- private int friendsListAction;
- private final int[] charEditIdKit;
- private int mouseInvInterfaceIndex;
- private int lastActiveInvInterface;
- public OnDemandFetcher onDemandFetcher;
- private int anInt1069;
- private int anInt1070;
- private int anInt1071;
- private int[] anIntArray1072;
- private int[] anIntArray1073;
- private Sprite mapDotItem;
- private Sprite mapDotNPC;
- private Sprite mapDotPlayer;
- private Sprite mapDotFriend;
- private Sprite mapDotTeam;
- private Sprite mapDotClan;
- private int loadingPercent;
- public float LP;
- private boolean aBoolean1080;
- private String[] friendsList;
- private Stream inStream;
- private int anInt1084;
- private int anInt1085;
- private int activeInterfaceType;
- private int anInt1087;
- private int anInt1088;
- public static int chatAreaScrollMax;
- private final int[] expectedCRCs;
- public int[] menuActionCmd2;
- public int[] menuActionCmd3;
- public int[] menuActionID;
- public int[] menuActionCmd1;
- private Sprite[] headIcons;
- private Sprite[] skullIcons;
- private Sprite[] headIconsHint;
- private static int anInt1097;
- private int anInt1098;
- private int anInt1099;
- private int anInt1100;
- private int anInt1101;
- private int anInt1102;
- public static boolean tabAreaAltered;
- private int anInt1104;
- private RSImageProducer aRSImageProducer_1107;
- private RSImageProducer aRSImageProducer_1108;
- private RSImageProducer loginScreenArea;
- private RSImageProducer leftSideFlame;
- private RSImageProducer rightSideFlame;
- private RSImageProducer gameLogo;
- private RSImageProducer aRSImageProducer_1113;
- private RSImageProducer aRSImageProducer_1114;
- private RSImageProducer aRSImageProducer_1115;
- private static int anInt1117;
- private int membersInt;
- private String inputPromptTitle;
- private Sprite compass;
- private RSImageProducer aRSImageProducer_1125;
- public static Player myPlayer;
- private final String[] atPlayerActions;
- private final boolean[] atPlayerArray;
- private final int[][][] anIntArrayArrayArray1129;
- public static final int[] tabInterfaceIDs = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1 };
- private int anInt1131;
- private int anInt1132;
- public int menuActionRow;
- private static int anInt1134;
- private int spellSelected;
- private int anInt1137;
- private int spellUsableOn;
- private String spellTooltip;
- private Sprite[] aSpriteArray1140;
- private boolean aBoolean1141;
- private static int anInt1142;
- public int energy;
- private boolean aBoolean1149;
- private Sprite[] crosses;
- private boolean musicEnabled;
- private Background[] aBackgroundArray1152s;
- public static boolean needDrawTabArea;
- private int unreadMessages;
- private static int anInt1155;
- private static boolean fpsOn;
- public boolean loggedIn;
- private boolean canMute;
- private boolean loadGeneratedMap;
- private boolean aBoolean1160;
- public static int loopCycle;
- private static final String validUserPassChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"£$%^&*()-_=+[{]};:'@#~,<.>/?\\| ";
- private RSImageProducer tabArea;
- private RSImageProducer mapEdgeIP;
- private RSImageProducer miniMapArea;
- static RSImageProducer mainGameArea;
- private RSImageProducer chatArea;
- private int daysSinceRecovChange;
- private RSSocket socketStream;
- private int minimapInt3;
- private int anInt1171;
- private long aLong1172;
- private static String myUsername;
- private static String myPassword;
- private static int anInt1175;
- private boolean genericLoadingError;
- private final int[] anIntArray1177 = {
- 0, 0, 0, 0, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 3 };
- private int reportAbuseInterfaceID;
- private NodeList aClass19_1179;
- private int[] anIntArray1180;
- private int[] anIntArray1181;
- static int[] anIntArray1182;
- private byte[][] terrainData;
- private int anInt1184;
- private int minimapInt1;
- private int anInt1186;
- private int anInt1187;
- private static int anInt1188;
- private int invOverlayInterfaceID;
- private int[] anIntArray1190;
- private int[] anIntArray1191;
- public Stream stream;
- private int anInt1193;
- private int splitPrivateChat;
- private Background mapBack;
- public String[] menuActionName;
- private Sprite aSprite_1201;
- private Sprite aSprite_1202;
- private final int[] anIntArray1203;
- public static final int[] anIntArray1204 = {
- 9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145,
- 58654, 5027, 1457, 16565, 34991, 25486 };
- private static boolean flagged;
- private final int[] anIntArray1207;
- private int minimapInt2;
- private int anInt1210;
- public static int chatAreaScrollPos;
- private String promptInput;
- private int anInt1213;
- private int[][][] intGroundArray;
- private long aLong1215;
- private int loginScreenCursorPos;
- public final Sprite[] modIcons;
- private long aLong1220;
- public static int tabID;
- private int anInt1222;
- public static boolean inputTaken;
- public int inputDialogState;
- private static int anInt1226;
- private int nextSong;
- private boolean songChanging;
- private final int[] minimapClipLeft;
- private Class11[] aClass11Array1230;
- public static int[] anIntArray1232;
- private int[] mapCoordinates;
- private int[] terrainIndices;
- private int[] anIntArray1236;
- private int anInt1237;
- private int anInt1238;
- public final int anInt1239 = 100;
- private final int[] anIntArray1241;
- private boolean aBoolean1242;
- private int atInventoryLoopCycle;
- private int atInventoryInterface;
- private int atInventoryIndex;
- private int atInventoryInterfaceType;
- private byte[][] aByteArrayArray1247;
- private int tradeMode;
- private int anInt1249;
- private final int[] anIntArray1250;
- private int anInt1251;
- private final boolean rsAlreadyLoaded;
- private int anInt1253;
- private int anInt1254;
- private boolean welcomeScreenRaised;
- private boolean messagePromptRaised;
- private int anInt1257;
- private byte[][][] byteGroundArray;
- private int prevSong;
- private int destX;
- private int destY;
- private Sprite minimap;
- private int anInt1264;
- private int anInt1265;
- private String loginMessage1;
- private String loginMessage2;
- private int anInt1268;
- private int anInt1269;
- public RSFont smallFont;
- public RSFont regularFont;
- private RSFont boldFont;
- private RSFont fancyFont;
- private int backDialogID;
- private int anInt1278;
- private int anInt1279;
- private int[] bigX;
- private int[] bigY;
- private int itemSelected;
- private int anInt1283;
- private int anInt1284;
- private int anInt1285;
- private String selectedItemName;
- private int publicChatMode;
- private int yellChatMode;
- private static int anInt1288;
- private int anInt1289;
- public static int anInt1290;
- public int drawCount;
- public int fullscreenInterfaceID;
- public int anInt1044;
- public int anInt1129;
- public int anInt1315;
- public int anInt1500;
- public int anInt1501;
- public int[] fullScreenTextureArray;
- public boolean spriteChanged = false;
- public Sprite[] cacheSprite;
- }
Advertisement
Add Comment
Please, Sign In to add comment