/src/client.java
Java | 14250 lines | 13574 code | 515 blank | 161 comment | 5747 complexity | c84f324eb1577dbe3c4ea323038d9df6 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
- // Jad home page: http://www.kpdus.com/jad.html
- // Decompiler options: packimports(3)
- import java.applet.AppletContext;
- import java.awt.*;
- import java.io.*;
- import java.math.BigInteger;
- import java.net.*;
- import java.text.NumberFormat;
- import java.util.zip.CRC32;
- import java.lang.reflect.Method;
- import sign.signlink;
- import javax.swing.*;
- public class client extends RSApplet {
-
- public int MapX, MapY;
- public static int spellID = 0;
- public static boolean newDamage = false;
-
- /**fullscreen**/
- public boolean drawLongTabs;
- private Graphics bufferGraphics;
- private Image buffer;
- private Sprite multiOverlay2;
- public static int Zoom = 0;
- public boolean menuToggle = true;
- public static boolean fog = true;
- public static boolean newMap;
- public static boolean is474 = false;
- public static boolean is554 = false;
-
- public static boolean isFullScreen, hasBeenBlanked;
- public static int extraWidth = 1280 -765, extraHeight = 1024 - 503,
- clientWidth = 0, clientHeight = 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(j != 0)
- // aBoolean1224 = !aBoolean1224;
- if(s.length() > 8)
- s = "@gre@" + s.substring(0, s.length() - 8) + " million @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 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;
- }
- }
- public void models() {
- for(int ModelIndex = 0; ModelIndex < 29191; 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("./model/"+Index+".gz");
- 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() {
- int y = isFullScreen ? extraHeight + 334 : 0;
- String text[] = { "On", "Friends", "Off", "Hide" };
- int textColor[] = { 65280, 0xffff00, 0xff0000, 65535 };
- /* Button hovering */
- if(!newMap && isFullScreen) {
- /* Draws main buttons sprite */
- chatButtons.drawSprite2(5, 143+y);
- if(cButtonHPos == 7) {
- reportH.drawSprite(404, 143+y);
- }
- if(cButtonCPos == 0)
- chatButtonC.drawSprite(5, 143+y);
- else if(cButtonCPos == 1)
- chatButtonC.drawSprite(62, 143+y);
- else if(cButtonCPos == 2)
- chatButtonC.drawSprite(119, 143+y);
- else if(cButtonCPos == 3)
- chatButtonC.drawSprite(176, 143+y);
- else if(cButtonCPos == 4)
- chatButtonC.drawSprite(233, 143+y);
- else if(cButtonCPos == 5)
- chatButtonC.drawSprite(290, 143+y);
- else if(cButtonCPos == 6)
- chatButtonC.drawSprite(347, 143+y);
- if(cButtonHPos == cButtonCPos) {
- if(cButtonHPos == 0)
- chatButtonHC.drawSprite(5, 143+y);
- else if(cButtonHPos == 1)
- chatButtonHC.drawSprite(62, 143+y);
- else if(cButtonHPos == 2)
- chatButtonHC.drawSprite(119, 143+y);
- else if(cButtonHPos == 3)
- chatButtonHC.drawSprite(176, 143+y);
- else if(cButtonHPos == 4)
- chatButtonHC.drawSprite(233, 143+y);
- else if(cButtonHPos == 5)
- chatButtonHC.drawSprite(290, 143+y);
- else if(cButtonHPos == 6)
- chatButtonHC.drawSprite(347, 143+y);
- } else {
- if(cButtonHPos == 0)
- chatButtonH.drawSprite(5, 143+y);
- else if(cButtonHPos == 1)
- chatButtonH.drawSprite(62, 143+y);
- else if(cButtonHPos == 2)
- chatButtonH.drawSprite(119, 143+y);
- else if(cButtonHPos == 3)
- chatButtonH.drawSprite(176, 143+y);
- else if(cButtonHPos == 4)
- chatButtonH.drawSprite(233, 143+y);
- else if(cButtonHPos == 5)
- chatButtonH.drawSprite(290, 143+y);
- else if(cButtonHPos == 6)
- chatButtonH.drawSprite(347, 143+y);
- }
- /* Button text */
- smallText.method389(true, 427, 0xffffff, "Report Abuse", 158+y);
- smallText.method389(true, 26, 0xffffff, "All", 158+y);
- smallText.method389(true, 77, 0xffffff, "Game", 158+y);
- smallText.method389(true, 131, 0xffffff, "Public", 153+y);
- smallText.method389(true, 185, 0xffffff, "Private", 153+y);
- smallText.method389(true, 249, 0xffffff, "Clan", 153+y);
- smallText.method389(true, 304, 0xffffff, "Trade", 153+y);
- smallText.method389(true, 363, 0xffffff, "Duel", 153+y);
- /* Chat modes */
- smallText.method382(textColor[publicChatMode], 146, text[publicChatMode], 164+y, true);
- smallText.method382(textColor[privateChatMode], 203, text[privateChatMode], 164+y, true);
- smallText.method382(textColor[clanChatMode], 260, text[clanChatMode], 164+y, true);
- smallText.method382(textColor[tradeMode], 317, text[tradeMode], 164+y, true);
- smallText.method382(textColor[duelMode], 374, text[duelMode], 164+y, true);
- } else
- /* Button hovering */
- if(!newMap) {
- /* Draws main buttons sprite */
- chatButtons.drawSprite(5, 143+y);
- if(cButtonHPos == 7) {
- reportH.drawSprite(404, 143+y);
- }
- if(cButtonCPos == 0)
- chatButtonC.drawSprite(5, 143+y);
- else if(cButtonCPos == 1)
- chatButtonC.drawSprite(62, 143+y);
- else if(cButtonCPos == 2)
- chatButtonC.drawSprite(119, 143+y);
- else if(cButtonCPos == 3)
- chatButtonC.drawSprite(176, 143+y);
- else if(cButtonCPos == 4)
- chatButtonC.drawSprite(233, 143+y);
- else if(cButtonCPos == 5)
- chatButtonC.drawSprite(290, 143+y);
- else if(cButtonCPos == 6)
- chatButtonC.drawSprite(347, 143+y);
- if(cButtonHPos == cButtonCPos) {
- if(cButtonHPos == 0)
- chatButtonHC.drawSprite(5, 143+y);
- else if(cButtonHPos == 1)
- chatButtonHC.drawSprite(62, 143+y);
- else if(cButtonHPos == 2)
- chatButtonHC.drawSprite(119, 143+y);
- else if(cButtonHPos == 3)
- chatButtonHC.drawSprite(176, 143+y);
- else if(cButtonHPos == 4)
- chatButtonHC.drawSprite(233, 143+y);
- else if(cButtonHPos == 5)
- chatButtonHC.drawSprite(290, 143+y);
- else if(cButtonHPos == 6)
- chatButtonHC.drawSprite(347, 143+y);
- } else {
- if(cButtonHPos == 0)
- chatButtonH.drawSprite(5, 143+y);
- else if(cButtonHPos == 1)
- chatButtonH.drawSprite(62, 143+y);
- else if(cButtonHPos == 2)
- chatButtonH.drawSprite(119, 143+y);
- else if(cButtonHPos == 3)
- chatButtonH.drawSprite(176, 143+y);
- else if(cButtonHPos == 4)
- chatButtonH.drawSprite(233, 143+y);
- else if(cButtonHPos == 5)
- chatButtonH.drawSprite(290, 143+y);
- else if(cButtonHPos == 6)
- chatButtonH.drawSprite(347, 143+y);
- }
- /* Button text */
- smallText.method389(true, 427, 0xffffff, "Report Abuse", 158+y);
- smallText.method389(true, 26, 0xffffff, "All", 158+y);
- smallText.method389(true, 77, 0xffffff, "Game", 158+y);
- smallText.method389(true, 131, 0xffffff, "Public", 153+y);
- smallText.method389(true, 185, 0xffffff, "Private", 153+y);
- smallText.method389(true, 249, 0xffffff, "Clan", 153+y);
- smallText.method389(true, 304, 0xffffff, "Trade", 153+y);
- smallText.method389(true, 363, 0xffffff, "Duel", 153+y);
- /* Chat modes */
- smallText.method382(textColor[publicChatMode], 146, text[publicChatMode], 164+y, true);
- smallText.method382(textColor[privateChatMode], 203, text[privateChatMode], 164+y, true);
- smallText.method382(textColor[clanChatMode], 260, text[clanChatMode], 164+y, true);
- smallText.method382(textColor[tradeMode], 317, text[tradeMode], 164+y, true);
- smallText.method382(textColor[duelMode], 374, text[duelMode], 164+y, true);
- } else
- if(newMap) {
- /* Draws main buttons sprite */
- chatButtons.drawSprite2(5, 142+y);
- /* Button hovering */
- if(cButtonHPos == 7) {
- reportH.drawSprite(404, 142+y);
- }
- if(cButtonCPos == 0)
- chatButtonC.drawSprite(5, 142+y);
- else if(cButtonCPos == 1)
- chatButtonC.drawSprite(71, 142+y);
- else if(cButtonCPos == 2)
- chatButtonC.drawSprite(137, 142+y);
- else if(cButtonCPos == 3)
- chatButtonC.drawSprite(203, 142+y);
- else if(cButtonCPos == 4)
- chatButtonC.drawSprite(269, 142+y);
- else if(cButtonCPos == 5)
- chatButtonC.drawSprite(335, 142+y);
- if(cButtonHPos == cButtonCPos) {
- if(cButtonHPos == 0)
- chatButtonHC.drawSprite(5, 140+y);
- else if(cButtonHPos == 1)
- chatButtonHC.drawSprite(71, 140+y);
- else if(cButtonHPos == 2)
- chatButtonHC.drawSprite(137, 140+y);
- else if(cButtonHPos == 3)
- chatButtonHC.drawSprite(203, 142+y);
- else if(cButtonHPos == 4)
- chatButtonHC.drawSprite(269, 142+y);
- else if(cButtonHPos == 5)
- chatButtonHC.drawSprite(335, 142+y);
- } else {
- if(cButtonHPos == 0)
- chatButtonH.drawSprite(5, 142+y);
- else if(cButtonHPos == 1)
- chatButtonH.drawSprite(71, 142+y);
- else if(cButtonHPos == 2)
- chatButtonH.drawSprite(137, 142+y);
- else if(cButtonHPos == 3)
- chatButtonH.drawSprite(203, 142+y);
- else if(cButtonHPos == 4)
- chatButtonH.drawSprite(269, 142+y);
- else if(cButtonHPos == 5)
- chatButtonH.drawSprite(335, 142+y);
- }
- /* Button text */
- smallText.method389(true, 425, 0xffffff, "Report Abuse", 157+y);
- smallText.method389(true, 26, 0xffffff, "All", 157+y);
- smallText.method389(true, 86, 0xffffff, "Game", 157+y);
- smallText.method389(true, 150, 0xffffff, "Public", 152+y);
- smallText.method389(true, 212, 0xffffff, "Private", 152+y);
- smallText.method389(true, 286, 0xffffff, "Clan", 152+y);
- smallText.method389(true, 349, 0xffffff, "Trade", 152+y);
- /* Chat modes */
- smallText.method382(textColor[publicChatMode], 164, text[publicChatMode], 163+y, true);
- smallText.method382(textColor[privateChatMode], 230, text[privateChatMode], 163+y, true);
- smallText.method382(textColor[clanChatMode], 296, text[clanChatMode], 163+y, true);
- smallText.method382(textColor[tradeMode], 362, text[tradeMode], 163+y, true);
- } else
- if(newMap) {
- /* Draws main buttons sprite */
- chatButtons.drawSprite(5, 142+y);
- /* Button hovering */
- if(cButtonHPos == 7) {
- reportH.drawSprite(404, 142+y);
- }
- if(cButtonCPos == 0)
- chatButtonC.drawSprite(5, 142+y);
- else if(cButtonCPos == 1)
- chatButtonC.drawSprite(71, 142+y);
- else if(cButtonCPos == 2)
- chatButtonC.drawSprite(137, 142+y);
- else if(cButtonCPos == 3)
- chatButtonC.drawSprite(203, 142+y);
- else if(cButtonCPos == 4)
- chatButtonC.drawSprite(269, 142+y);
- else if(cButtonCPos == 5)
- chatButtonC.drawSprite(335, 142+y);
- if(cButtonHPos == cButtonCPos) {
- if(cButtonHPos == 0)
- chatButtonHC.drawSprite(5, 140+y);
- else if(cButtonHPos == 1)
- chatButtonHC.drawSprite(71, 140+y);
- else if(cButtonHPos == 2)
- chatButtonHC.drawSprite(137, 140+y);
- else if(cButtonHPos == 3)
- chatButtonHC.drawSprite(203, 142+y);
- else if(cButtonHPos == 4)
- chatButtonHC.drawSprite(269, 142+y);
- else if(cButtonHPos == 5)
- chatButtonHC.drawSprite(335, 142+y);
- } else {
- if(cButtonHPos == 0)
- chatButtonH.drawSprite(5, 142+y);
- else if(cButtonHPos == 1)
- chatButtonH.drawSprite(71, 142+y);
- else if(cButtonHPos == 2)
- chatButtonH.drawSprite(137, 142+y);
- else if(cButtonHPos == 3)
- chatButtonH.drawSprite(203, 142+y);
- else if(cButtonHPos == 4)
- chatButtonH.drawSprite(269, 142+y);
- else if(cButtonHPos == 5)
- chatButtonH.drawSprite(335, 142+y);
- }
- /* Button text */
- smallText.method389(true, 425, 0xffffff, "Report Abuse", 157+y);
- smallText.method389(true, 26, 0xffffff, "All", 157+y);
- smallText.method389(true, 86, 0xffffff, "Game", 157+y);
- smallText.method389(true, 150, 0xffffff, "Public", 152+y);
- smallText.method389(true, 212, 0xffffff, "Private", 152+y);
- smallText.method389(true, 286, 0xffffff, "Clan", 152+y);
- smallText.method389(true, 349, 0xffffff, "Trade", 152+y);
- /* Chat modes */
- smallText.method382(textColor[publicChatMode], 164, text[publicChatMode], 163+y, true);
- smallText.method382(textColor[privateChatMode], 230, text[privateChatMode], 163+y, true);
- smallText.method382(textColor[clanChatMode], 296, text[clanChatMode], 163+y, true);
- smallText.method382(textColor[tradeMode], 362, text[tradeMode], 163+y, true);
- }
- }
- private void drawChatArea()
- {
- int yPosOffset = isFullScreen ? clientHeight - 166 : 0;
- int xPosOffset = isFullScreen ? 0 : 0;
- if (!isFullScreen)
- aRSImageProducer_1166.initDrawingArea();
- Texture.anIntArray1472 = anIntArray1180;
- int y = isFullScreen ? extraHeight + 334 : 0;
- if (isFullScreen && displayChat)
- chatArea.drawSprite2(0, 0+y);
- else if(!isFullScreen){
- chatArea.drawSprite(0, 0);
- }
- drawChannelButtons();
- TextDrawingArea textDrawingArea = aTextDrawingArea_1271;
- if(displayChat || !isFullScreen) {
- if(messagePromptRaised) {
- chatTextDrawingArea.drawText(0, aString1121, 60+y, 259);
- chatTextDrawingArea.drawText(128, promptInput + "*", 80+y, 259);
- } else if(inputDialogState == 1) {
- chatTextDrawingArea.drawText(0, "Enter amount:", 60+y, 259);
- chatTextDrawingArea.drawText(128, amountOrNameInput + "*", 80+y, 259);
- } else if(inputDialogState == 2) {
- chatTextDrawingArea.drawText(0, "Enter name:", 60+y, 259);
- chatTextDrawingArea.drawText(128, amountOrNameInput + "*", 80+y, 259);
- } else if(aString844 != null) {
- chatTextDrawingArea.drawText(0, aString844, 60+y, 259);
- chatTextDrawingArea.drawText(128, "Click to continue", 80+y, 259);
- } else if(backDialogID != -1) {
- drawInterface(0, 20, RSInterface.interfaceCache[backDialogID], 20+y);
- } else if(dialogID != -1d) {
- drawInterface(0, 20, RSInterface.interfaceCache[dialogID], 20+y);
- } else {
- int j77 = -3;
- int j = 0;
- DrawingArea.setDrawingArea(122+y, 8, 497, 7+y);
- for(int k = 0; k < 500; k++)
- if(chatMessages[k] != null) {
- int chatType = chatTypes[k];
- int yPos = (70 - j77 * 14) + anInt1089 + 5;
- String s1 = chatNames[k];
- byte byte0 = 0;
- if(s1 != null && s1.startsWith("@cr1@")) {
- s1 = s1.substring(5);
- byte0 = 1;
- } else if(s1 != null && s1.startsWith("@cr2@")) {
- s1 = s1.substring(5);
- byte0 = 2;
- } else if(s1 != null && s1.startsWith("@cr3@")) {
- s1 = s1.substring(5);
- byte0 = 3;
- }
- if(chatType == 0) {
- if (chatTypeView == 5 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210)
- textDrawingArea.method389(false, 11, 0, chatMessages[k], yPos+y);//chat color enabled
- j++;
- j77++;
- }
- }
- if((chatType == 1 || chatType == 2) && (chatType == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 1 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210) {
- int xPos = 11;
- if(byte0 == 1) {
- modIcons[0].drawBackground(xPos + 1, yPos - 12+y);
- xPos += 14;
- } else if(byte0 == 2) {
- modIcons[1].drawBackground(xPos + 1, yPos - 12+y);
- xPos += 14;
- } else if(byte0 == 3) {
- modIcons[2].drawBackground(xPos + 1, yPos - 12+y);
- xPos += 14;
- }
- textDrawingArea.method385(0, s1 + ":", yPos+y, xPos);
- xPos += textDrawingArea.getTextWidth(s1) + 8;
- textDrawingArea.method389(false, xPos, 255, chatMessages[k], yPos+y);
- }
- j++;
- j77++;
- }
- }
- if((chatType == 3 || chatType == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (chatType == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 2 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210) {
- int k1 = 11;
- textDrawingArea.method385(0, "From", yPos+y, k1);
- k1 += textDrawingArea.getTextWidth("From ");
- if(byte0 == 1) {
- modIcons[0].drawBackground(k1, yPos - 12+y);
- k1 += 12;
- } else if(byte0 == 2) {
- modIcons[1].drawBackground(k1, yPos - 12+y);
- k1 += 12;
- } else if(byte0 == 3) {
- modIcons[2].drawBackground(k1, yPos - 12+y);
- k1 += 12;
- }
- textDrawingArea.method385(0, s1 + ":", yPos+y, k1);
- k1 += textDrawingArea.getTextWidth(s1) + 8;
- textDrawingArea.method385(0x800000, chatMessages[k], yPos+y, k1);
- }
- j++;
- j77++;
- }
- }
- if(chatType == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 3 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210)
- textDrawingArea.method385(0x800080, s1 + " " + chatMessages[k], yPos+y, 11);
- j++;
- j77++;
- }
- }
- if(chatType == 5 && splitPrivateChat == 0 && privateChatMode < 2) {
- if (chatTypeView == 2 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210)
- textDrawingArea.method385(0x800000, chatMessages[k], yPos+y, 11);
- j++;
- j77++;
- }
- }
- if(chatType == 6 && (splitPrivateChat == 0 || chatTypeView == 2) && privateChatMode < 2) {
- if (chatTypeView == 2 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210) {
- textDrawingArea.method385(0, "To " + s1 + ":", yPos+y, 11);
- textDrawingArea.method385(0x800000, chatMessages[k], yPos+y, 15 + textDrawingArea.getTextWidth("To :" + s1));
- }
- j++;
- j77++;
- }
- }
- if(chatType == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
- if (chatTypeView == 3 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210)
- textDrawingArea.method385(0x7e3200, s1 + " " + chatMessages[k], yPos+y, 11);
- j++;
- j77++;
- }
- if(chatType == 11 && (clanChatMode == 0)) {
- if (chatTypeView == 11) {
- if(yPos > 0 && yPos < 210)
- textDrawingArea.method385(0x7e3200, s1 + " " + chatMessages[k], yPos+y, 11);
- j++;
- j77++;
- }
- if(chatType == 12) {
- if(yPos > 0 && yPos < 110)
- textDrawingArea.method385(0x7e3200, chatMessages[k] + " @blu@" + s1, yPos+y, 11);
- j++;
- }
- }
- }
- if(chatType == 16) {
- int j2 = 40;
- int clanNameWidth = textDrawingArea.getTextWidth(clanname);
- if(chatTypeView == 11 || chatTypeView == 0) {
- if(yPos > 0 && yPos < 210)
- switch(chatRights[k]) {
- case 1:
- j2 += clanNameWidth;
- modIcons[0].drawBackground(j2 - 18, yPos - 12+y);
- j2 += 14;
- break;
-
- case 2:
- j2 += clanNameWidth;
- modIcons[1].drawBackground(j2 - 18, yPos - 12+y);
- j2 += 14;
- break;
-
- case 3:
- j2 += clanNameWidth;
- modIcons[1].drawBackground(j2 - 18, yPos - 12+y);
- j2 += 14;
- break;
-
- default:
- j2 += clanNameWidth;
- break;
- }
- textDrawingArea.method385(0, "[", yPos+y, 8);
- textDrawingArea.method385(255, ""+clanname+"", yPos+y, 14);
- textDrawingArea.method385(0, "]", yPos+y, clanNameWidth + 14);
-
- textDrawingArea.method385(0, chatNames[k]+":", yPos+y, j2 - 17); //j2
- j2 += textDrawingArea.getTextWidth(chatNames[k]) + 7;
- textDrawingArea.method385(0x800000, chatMessages[k], yPos+y, j2 - 16);//j2
- j++;
- j77++;
- }
- }
- }
- DrawingArea.defaultDrawingAreaSize();
- anInt1211 = j * 14 + 7 + 5;
- if(anInt1211 < 111)
- anInt1211 = 111;
- drawScrollbar(114, anInt1211 - anInt1089 - 113, 7+y, 496, anInt1211);
- String s;
- if(myPlayer != null && myPlayer.name != null)
- s = myPlayer.name;
- else
- s = TextClass.fixName(myUsername);
- textDrawingArea.method385(0, s + ":", 133+y, 11);
- textDrawingArea.drawChatInput(255, 12 + textDrawingArea.getTextWidth(s + ": "), inputString + "*", 133+y, false);
- DrawingArea.method339(121+y, 0x807660, 506, 7);
- }
- if(menuOpen && menuScreenArea == 2) {
- drawMenu();
- }
- if (!isFullScreen)
- aRSImageProducer_1166.drawGraphics(338+extraHeight, isFullScreen ? bufferGraphics : super.graphics, 0);
- aRSImageProducer_1165.initDrawingArea();
- Texture.anIntArray1472 = anIntArray1182;
- }
- }
- public void init() {
- nodeID = 10;
- portOff = 0;
- setHighMem();
- isMembers = true;
- initClientFrame(482, 765);
- }
- 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 void processMenuClick() {
- if(activeInterfaceType != 0)
- return;
- int j = super.clickMode3;
- if(spellSelected == 1 && super.saveClickX >= 516 && 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 -= 519;
- j1 -= 168;
- }
- if(menuScreenArea == 2) {
- k -= 17;
- j1 -= 338;
- }
- if(menuScreenArea == 3) {
- k -= 519;
- 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 -= 519;
- l2 -= 168;
- }
- if(menuScreenArea == 2) {
- k2 -= 17;
- l2 -= 338;
- }
- if(menuScreenArea == 3) {
- k2 -= 519;
- 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;
- }
- }
- } 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) {
- 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;
- }
- }
- }
- if(j == 1 && (anInt1253 == 1 || menuHasAddFriend(menuActionRow - 1)) && menuActionRow > 2)
- j = 2;
- if(j == 1 && menuActionRow > 0)
- doAction(menuActionRow - 1);
- if(j == 2 && menuActionRow > 0)
- determineMenuSize();
- }
- }
- 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("./Raw/");
- File[] fileArray = file.listFiles();
- for(int y = 0; y < fileArray.length; y++) {
- String s = fileArray[y].getName();
- byte[] buffer = ReadFile("./Raw/"+s);
- Model.method460(buffer,Integer.parseInt(getFileNameWithoutExtension(s)));
- }
- }
- private void saveMidi(boolean flag, byte abyte0[])
- {
- signlink.midifade = flag ? 1 : 0;
- signlink.midisave(abyte0, abyte0.length);
- }
- private void method22()
- {
- try
- {
- anInt985 = -1;
- aClass19_1056.removeAll();
- aClass19_1013.removeAll();
- Texture.method366();
- unlinkMRUNodes();
- worldController.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 = aByteArrayArray1183.length;
- stream.createFrame(0);
- if(!aBoolean1159)
- {
- for(int i3 = 0; i3 < k2; i3++)
- {
- int i4 = (anIntArray1234[i3] >> 8) * 64 - baseX;
- int k5 = (anIntArray1234[i3] & 0xff) * 64 - baseY;
- byte abyte0[] = aByteArrayArray1183[i3];
- if (FileOperations.FileExists(signlink.findcachedir()+"maps/"+anIntArray1235[i3]+".dat"))
- abyte0 = FileOperations.ReadFile(signlink.findcachedir()+"maps/"+anIntArray1235[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 = (anIntArray1234[j4] >> 8) * 64 - baseX;
- int k7 = (anIntArray1234[j4] & 0xff) * 64 - baseY;
- byte abyte2[] = aByteArrayArray1183[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(abyte1 != null)
- {
- int l8 = (anIntArray1234[i6] >> 8) * 64 - baseX;
- int k9 = (anIntArray1234[i6] & 0xff) * 64 - baseY;
- objectManager.method190(l8, aClass11Array1230, k9, worldController, abyte1);
- }
- }
- }
- if(aBoolean1159)
- {
- 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 < anIntArray1234.length; l11++)
- {
- if(anIntArray1234[l11] != j11 || aByteArrayArray1183[l11] == null)
- continue;
- objectManager.method179(i9, l9, aClass11Array1230, k4 * 8, (j10 & 7) * 8, aByteArrayArray1183[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 < anIntArray1234.length; k12++)
- {
- if(anIntArray1234[k12] != j12 || aByteArrayArray1247[k12] == null)
- continue;
- //objectManager.method183(aClass11Array1230, worldController, k10, j8 * 8, (i12 & 7) * 8, l6, aByteArrayArray1247[k12], (k11 & 7) * 8, i11, j9 * 8);
- byte abyte0[] = aByteArrayArray1247[k12];
- if (FileOperations.FileExists(signlink.findcachedir()+"maps/"+anIntArray1235[k12]+".dat"))
- abyte0 = FileOperations.ReadFile(signlink.findcachedir()+"maps/"+anIntArray1235[k12]+".dat");
- objectManager.method183(aClass11Array1230, worldController, k10, j8 * 8, (i12 & 7) * 8, l6, aByteArrayArray1247[k12], (k11 & 7) * 8, i11, j9 * 8);
- break;
- }
- }
- }
- }
- }
- }
- stream.createFrame(0);
- objectManager.method171(aClass11Array1230, worldController);
- aRSImageProducer_1165.initDrawingArea();
- stream.createFrame(0);
- int k3 = ObjectManager.anInt145;
- if(k3 > plane)
- k3 = plane;
- if(k3 < plane - 1)
- k3 = plane - 1;
- if(lowMem)
- worldController.method275(ObjectManager.anInt145);
- else
- worldController.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);
- }
- if(lowMem && signlink.cache_dat != null)
- {
- int j = onDemandFetcher.getVersionCount(0);
- for(int i1 = 0; i1 < j; i1++)
- {
- int l1 = onDemandFetcher.getModelIndex(i1);
- if((l1 & 0x79) == 0)
- Model.method461(i1);
- }
- }
- 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;
- }
- 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();
- EntityDef.mruNodes.unlinkAll();
- ItemDef.mruNodes2.unlinkAll();
- ItemDef.mruNodes1.unlinkAll();
- Player.mruNodes.unlinkAll();
- SpotAnim.aMRUNodes_415.unlinkAll();
- }
- private void method24(int i)
- {
- int ai[] = aClass30_Sub2_Sub1_Sub1_1263.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)
- worldController.method309(ai, i1, i, k1, l);
- if(i < 3 && (byteGroundArray[i + 1][k1][l] & 8) != 0)
- worldController.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;
- aClass30_Sub2_Sub1_Sub1_1263.method343();
- for(int i2 = 1; i2 < 103; i2++)
- {
- for(int j2 = 1; j2 < 103; j2++)
- {
- if((byteGroundArray[i][j2][i2] & 0x18) == 0)
- method50(i2, j1, j2, l1, i);
- if(i < 3 && (byteGroundArray[i + 1][j2][i2] & 8) != 0)
- method50(i2, j1, j2, l1, i + 1);
- }
- }
- aRSImageProducer_1165.initDrawingArea();
- anInt1071 = 0;
- for(int k2 = 0; k2 < 104; k2++)
- {
- for(int l2 = 0; l2 < 104; l2++)
- {
- int i3 = worldController.method303(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++;
- }
- }
- aClass30_Sub2_Sub1_Sub1Array1140[anInt1071] = mapFunctions[j3];
- anIntArray1072[anInt1071] = k3;
- anIntArray1073[anInt1071] = l3;
- anInt1071++;
- }
- }
- }
- }
- }
- private void spawnGroundItem(int i, int j)
- {
- NodeList class19 = groundArray[plane][i][j];
- if(class19 == null)
- {
- worldController.method295(plane, i, j);
- 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 class30_sub2_sub4_sub2_1 = (Item)class19.reverseGetFirst(); class30_sub2_sub4_sub2_1 != null; class30_sub2_sub4_sub2_1 = (Item)class19.reverseGetNext())
- {
- if(class30_sub2_sub4_sub2_1.ID != ((Item) (obj)).ID && obj1 == null)
- obj1 = class30_sub2_sub4_sub2_1;
- if(class30_sub2_sub4_sub2_1.ID != ((Item) (obj)).ID && class30_sub2_sub4_sub2_1.ID != ((Item) (obj1)).ID && obj2 == null)
- obj2 = class30_sub2_sub4_sub2_1;
- }
- int i1 = i + (j << 7) + 0x60000000;
- worldController.method281(i, i1, ((Animable) (obj1)), method42(plane, j * 128 + 64, i * 128 + 64), ((Animable) (obj2)), ((Animable) (obj)), plane, j);
- }
- 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.aBoolean84)
- k += 0x80000000;
- worldController.method285(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();
- }
- private void loadError()
- {
- String s = "ondemand";//was a constant parameter
- System.out.println(s);
- try
- {
- getAppletContext().showDocument(new URL(getCodeBase(), "loaderror_" + s + ".html"));
- }
- catch(Exception exception)
- {
- exception.printStackTrace();
- }
- do
- try
- {
- Thread.sleep(1000L);
- }
- catch(Exception _ex) { }
- while(true);
- }
-
- public void drawHoverBox(int xPos, int yPos, String text) {
- String[] results = text.split("\n");
- int height = (results.length * 16) + 6;
- int width;
- width = chatTextDrawingArea.getTextWidth(results[0]) + 6;
- for(int i = 1; i < results.length; i++)
- if(width <= chatTextDrawingArea.getTextWidth(results[i]) + 6)
- width = chatTextDrawingArea.getTextWidth(results[i]) + 6;
- DrawingArea.drawPixels(height, yPos, xPos, 0xFFFFA0, width);
- DrawingArea.fillPixels(xPos, width, height, 0, yPos);
- yPos += 14;
- for(int i = 0; i < results.length; i++) {
- chatTextDrawingArea.method389(false, xPos + 3, 0, results[i], yPos);
- yPos += 16;
- }
- }
-
- private void buildInterfaceMenu(int i, RSInterface class9, int k, int l, int i1, int j1)
- {
- if(class9.type != 0 || class9.children == null || class9.isMouseoverTriggered)
- return;
- if(k < i || i1 < l || k > i + class9.width || i1 > l + class9.height)
- return;
- int k1 = class9.children.length;
- for(int l1 = 0; l1 < k1; l1++)
- {
- int i2 = class9.childX[l1] + i;
- int j2 = (class9.childY[l1] + l) - j1;
- RSInterface class9_1 = RSInterface.interfaceCache[class9.children[l1]];
- i2 += class9_1.anInt263;
- j2 += class9_1.anInt265;
- if((class9_1.mOverInterToTrigger >= 0 || class9_1.anInt216 != 0) && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height)
- if(class9_1.mOverInterToTrigger >= 0)
- anInt886 = class9_1.mOverInterToTrigger;
- else
- anInt886 = class9_1.id;
- if (class9_1.type == 8 && k >= i2 && i1 >= j2 && k < i2 + class9_1.width && i1 < j2 + class9_1.height) {
- anInt1315 = class9_1.id;
- }
- if(class9_1.type == 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);
- menuActionName[menuActionRow] = class9_1.tooltip + ", " + class9_1.id;
- 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] = 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);
- menuActionName[menuActionRow] = class9_1.tooltip + ", " + class9_1.id;
- 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);
- menuActionName[menuActionRow] = class9_1.tooltip + ", " + class9_1.id;
- 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);
- menuActionName[menuActionRow] = class9_1.tooltip + ", " + class9_1.id;
- menuActionID[menuActionRow] = 679;
- menuActionCmd3[menuActionRow] = class9_1.id;
- menuActionRow++;
- }
- if(class9_1.type == 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.inv[k2] > 0)
- {
- ItemDef itemDef = ItemDef.forID(class9_1.inv[k2] - 1);
- if(itemSelected == 1 && class9_1.isInventoryInterface)
- {
- if(class9_1.id != anInt1284 || k2 != anInt1283)
- {
- menuActionName[menuActionRow] = "Use " + selectedItemName + " with @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.actions != null && itemDef.actions[l3] != null)
- {
- menuActionName[menuActionRow] = itemDef.actions[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.actions != null)
- {
- for(int i4 = 2; i4 >= 0; i4--)
- if(itemDef.actions[i4] != null)
- {
- menuActionName[menuActionRow] = itemDef.actions[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.actions != null)
- {
- for(int j4 = 4; j4 >= 0; j4--)
- if(class9_1.actions[j4] != null)
- {
- menuActionName[menuActionRow] = class9_1.actions[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++;
- }
- }
- //menuActionName[menuActionRow] = "Examine @lre@" + itemDef.name + " @gre@(@whi@" + (class9_1.inv[k2] - 1) + "@gre@)";
- 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 j, int k, int l, int i1, int j1) {
- scrollBar1.drawSprite(i1, l);
- scrollBar2.drawSprite(i1, (l + j) - 16);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x000001, 16);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x3d3426, 15);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x342d21, 13);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x2e281d, 11);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x29241b, 10);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x252019, 9);
- DrawingArea.drawPixels(j - 32, l + 16, i1, 0x000001, 1);
- int k1 = ((j - 32) * j) / j1;
- if(k1 < 8)
- k1 = 8;
- int l1 = ((j - 32 - k1) * k) / (j1 - j);
- DrawingArea.drawPixels(k1, l + 16 + l1, i1, barFillColor, 16);
- DrawingArea.method341(l + 16 + l1, 0x000001, k1, i1);
- DrawingArea.method341(l + 16 + l1, 0x817051, k1, i1 + 1);
- DrawingArea.method341(l + 16 + l1, 0x73654a, k1, i1 + 2);
- DrawingArea.method341(l + 16 + l1, 0x6a5c43, k1, i1 + 3);
- DrawingArea.method341(l + 16 + l1, 0x6a5c43, k1, i1 + 4);
- DrawingArea.method341(l + 16 + l1, 0x655841, k1, i1 + 5);
- DrawingArea.method341(l + 16 + l1, 0x655841, k1, i1 + 6);
- DrawingArea.method341(l + 16 + l1, 0x61553e, k1, i1 + 7);
- DrawingArea.method341(l + 16 + l1, 0x61553e, k1, i1 + 8);
- DrawingArea.method341(l + 16 + l1, 0x5d513c, k1, i1 + 9);
- DrawingArea.method341(l + 16 + l1, 0x5d513c, k1, i1 + 10);
- DrawingArea.method341(l + 16 + l1, 0x594e3a, k1, i1 + 11);
- DrawingArea.method341(l + 16 + l1, 0x594e3a, k1, i1 + 12);
- DrawingArea.method341(l + 16 + l1, 0x514635, k1, i1 + 13);
- DrawingArea.method341(l + 16 + l1, 0x4b4131, k1, i1 + 14);
- DrawingArea.method339(l + 16 + l1, 0x000001, 15, i1);
- DrawingArea.method339(l + 17 + l1, 0x000001, 15, i1);
- DrawingArea.method339(l + 17 + l1, 0x655841, 14, i1);
- DrawingArea.method339(l + 17 + l1, 0x6a5c43, 13, i1);
- DrawingArea.method339(l + 17 + l1, 0x6d5f48, 11, i1);
- DrawingArea.method339(l + 17 + l1, 0x73654a, 10, i1);
- DrawingArea.method339(l + 17 + l1, 0x76684b, 7, i1);
- DrawingArea.method339(l + 17 + l1, 0x7b6a4d, 5, i1);
- DrawingArea.method339(l + 17 + l1, 0x7e6e50, 4, i1);
- DrawingArea.method339(l + 17 + l1, 0x817051, 3, i1);
- DrawingArea.method339(l + 17 + l1, 0x000001, 2, i1);
- DrawingArea.method339(l + 18 + l1, 0x000001, 16, i1);
- DrawingArea.method339(l + 18 + l1, 0x564b38, 15, i1);
- DrawingArea.method339(l + 18 + l1, 0x5d513c, 14, i1);
- DrawingArea.method339(l + 18 + l1, 0x625640, 11, i1);
- DrawingArea.method339(l + 18 + l1, 0x655841, 10, i1);
- DrawingArea.method339(l + 18 + l1, 0x6a5c43, 7, i1);
- DrawingArea.method339(l + 18 + l1, 0x6e6046, 5, i1);
- DrawingArea.method339(l + 18 + l1, 0x716247, 4, i1);
- DrawingArea.method339(l + 18 + l1, 0x7b6a4d, 3, i1);
- DrawingArea.method339(l + 18 + l1, 0x817051, 2, i1);
- DrawingArea.method339(l + 18 + l1, 0x000001, 1, i1);
- DrawingArea.method339(l + 19 + l1, 0x000001, 16, i1);
- DrawingArea.method339(l + 19 + l1, 0x514635, 15, i1);
- DrawingArea.method339(l + 19 + l1, 0x564b38, 14, i1);
- DrawingArea.method339(l + 19 + l1, 0x5d513c, 11, i1);
- DrawingArea.method339(l + 19 + l1, 0x61553e, 9, i1);
- DrawingArea.method339(l + 19 + l1, 0x655841, 7, i1);
- DrawingArea.method339(l + 19 + l1, 0x6a5c43, 5, i1);
- DrawingArea.method339(l + 19 + l1, 0x6e6046, 4, i1);
- DrawingArea.method339(l + 19 + l1, 0x73654a, 3, i1);
- DrawingArea.method339(l + 19 + l1, 0x817051, 2, i1);
- DrawingArea.method339(l + 19 + l1, 0x000001, 1, i1);
- DrawingArea.method339(l + 20 + l1, 0x000001, 16, i1);
- DrawingArea.method339(l + 20 + l1, 0x4b4131, 15, i1);
- DrawingArea.method339(l + 20 + l1, 0x544936, 14, i1);
- DrawingArea.method339(l + 20 + l1, 0x594e3a, 13, i1);
- DrawingArea.method339(l + 20 + l1, 0x5d513c, 10, i1);
- DrawingArea.method339(l + 20 + l1, 0x61553e, 8, i1);
- DrawingArea.method339(l + 20 + l1, 0x655841, 6, i1);
- DrawingArea.method339(l + 20 + l1, 0x6a5c43, 4, i1);
- DrawingArea.method339(l + 20 + l1, 0x73654a, 3, i1);
- DrawingArea.method339(l + 20 + l1, 0x817051, 2, i1);
- DrawingArea.method339(l + 20 + l1, 0x000001, 1, i1);
- DrawingArea.method341(l + 16 + l1, 0x000001, k1, i1 + 15);
- DrawingArea.method339(l + 15 + l1 + k1, 0x000001, 16, i1);
- DrawingArea.method339(l + 14 + l1 + k1, 0x000001, 15, i1);
- …
Large files files are truncated, but you can click here to view the full file