Advertisement
Guest User

Untitled

a guest
Mar 30th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.23 KB | None | 0 0
  1. // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.kpdus.com/jad.html
  3. // Decompiler options: packimports(3)
  4.  
  5. import java.applet.AppletContext;
  6. import java.awt.*;
  7. import java.io.*;
  8. import java.math.BigInteger;
  9. import java.net.*;
  10. import java.util.zip.CRC32;
  11. import java.util.zip.*;
  12. import java.lang.reflect.Method;
  13. import sign.signlink;
  14. import javax.swing.*;
  15.  
  16. public class client extends RSApplet {
  17. public final String titleColor(final int i, int type) {
  18. String titleChatbox = "", titleRightclick = "";
  19. switch (i) {
  20.  
  21. case 0: //orange
  22. titleChatbox = "13132800";
  23. titleRightclick = "ort";
  24. break;
  25.  
  26. case 1: //purple
  27. titleChatbox = "11158698";
  28. titleRightclick = "put";
  29. break;
  30.  
  31. case 2: //red
  32. titleChatbox = "12656646";
  33. titleRightclick = "ret";
  34. break;
  35.  
  36. case 3: //green
  37. titleChatbox = "26112";
  38. titleRightclick = "grt";
  39. break;
  40. }
  41. if(type == 0)
  42. return titleChatbox;
  43. else
  44. return titleRightclick;
  45. }
  46.  
  47. public int colorOfSplat = 0;
  48. public String hitText = "";
  49. public Sprite hitSprite = null;
  50. public int splatX = 0;
  51. public int splatY = 0;
  52. public int fadeOffset = 0;
  53. public int hitmarkWait = 0;
  54. public boolean addY = false;
  55.  
  56. public Sprite[] bigSplats = new Sprite[3];
  57. //public Sprite[] combatIcons = new Sprite[10];
  58. //public Sprite[] combatIcons = new Sprite[4];
  59.  
  60. public boolean
  61. is459 = false,
  62. is474 = false,
  63. is480 = false,
  64. is508 = false,
  65. is525 = false,
  66. is562 = true,
  67. idToggle = false,
  68. hitbarToggle = true,
  69. menuToggle = true,
  70. namesToggle = false,
  71. hitmarks = true;
  72. public static boolean
  73. newDamage = true,
  74. normalLogin = true,//KEEP TRUE!
  75. newHits = true;
  76. //public static boolean newDamage = true, newHits = true, normalLogin = true;
  77. public int getXPForLevel(int i)
  78. {
  79. int j = 0;
  80. int k = 0;
  81. for(int l = 1; l <= i; l++)
  82. {
  83. j = (int)((double)j + Math.floor((double)l + 300D * Math.pow(2D, (double)l / 7D)));
  84. if(l >= i)
  85. return k;
  86. k = (int)Math.floor(j / 4);
  87. }
  88.  
  89. return 0;
  90. }
  91. public String skillNames[] = {
  92. "Attack", "Hitpoints", "Mining", "Strength", "Agility", "Smithing", "Defence", "Herblore", "Fishing", "Range",
  93. "Thieving", "Cooking", "Prayer", "Crafting", "Firemaking", "Magic", "Fletching", "Woodcutting", "Rune", "Slayer",
  94. "Farming", "Construction", "Hunter", "Summoning", "Dungeoneering"
  95. };
  96. public TextDrawingArea newSmallFont;
  97. public TextDrawingArea newRegularFont;
  98. public TextDrawingArea newBoldFont;
  99. public TextDrawingArea newFancyFont;
  100. public Sprite[] chatImages = new Sprite[7];
  101. public AlertHandler alertHandler;
  102. public Sprite alertBack;
  103. public Sprite alertBorder;
  104. public Sprite alertBorderH;
  105.  
  106. private Sprite LFull;
  107. private Sprite LEmpty;
  108. public int followPlayer = 0;
  109. public int followNPC = 0;
  110. public int followDistance = 1;
  111. public boolean selectAction;
  112. public int isClicked;
  113. public Sprite[] LOGIN = new Sprite[27];
  114. public Sprite[] combatIcons = new Sprite[4];
  115. public Sprite qc;
  116.  
  117. public void welcome() {
  118. }
  119.  
  120. public void addLoginScreenHover(Sprite[] spriteName,int spriteId, int Xpos, int Ypos, int hoverId){
  121. spriteName[spriteId].drawSprite(Xpos, Ypos);
  122. if(super.mouseX >= Xpos && super.mouseX <= Xpos + spriteName[spriteId].myWidth && super.mouseY >= Ypos+3 && super.mouseY <= Ypos+spriteName[spriteId].myHeight+2){
  123. spriteName[hoverId].drawSprite(Xpos, Ypos);
  124. }
  125. }
  126.  
  127. public void setSidebarInterface(int sidebarID, int interfaceID) {
  128. tabInterfaceIDs[sidebarID] = interfaceID;
  129. tabID = sidebarID;
  130. needDrawTabArea = true;
  131. tabAreaAltered = true;
  132. }
  133.  
  134. public int positions[] = new int[2000];
  135. public int landScapes[] = new int[2000];
  136. public int objects[] = new int[2000];
  137.  
  138. public void setNewMaps() {
  139. try {
  140. BufferedReader in = new BufferedReader(new FileReader(signlink.findcachedir()+"Maps/mapConfig.txt"));
  141. String s;
  142. int D = 0;
  143. while ((s = in.readLine()) != null) {
  144. positions[D] = Integer.parseInt(s.substring(s.indexOf("=")+1,s.indexOf("(")));
  145. landScapes[D] = Integer.parseInt(s.substring(s.indexOf("(")+1,s.indexOf(")")));
  146. objects[D] = Integer.parseInt(s.substring(s.indexOf("[")+1,s.indexOf("]")));
  147. D++;
  148. }
  149. } catch (IOException e) {
  150. e.printStackTrace();
  151. }
  152. }
  153.  
  154. public static String capitalize(String s) {
  155. for (int i = 0; i < s.length(); i++) {
  156. if (i == 0) {
  157. s = String.format( "%s%s",
  158. Character.toUpperCase(s.charAt(0)),
  159. s.substring(1) );
  160. }
  161. if (!Character.isLetterOrDigit(s.charAt(i))) {
  162. if (i + 1 < s.length()) {
  163. s = String.format( "%s%s%s",
  164. s.subSequence(0, i+1),
  165. Character.toUpperCase(s.charAt(i + 1)),
  166. s.substring(i+2) );
  167. }
  168. }
  169. }
  170. return s;
  171. }
  172.  
  173. public int MapX, MapY;
  174. public static int spellID = 0;
  175. private static String intToKOrMilLongName(int i) {
  176. String s = String.valueOf(i);
  177. for(int k = s.length() - 3; k > 0; k -= 3)
  178. s = s.substring(0, k) + "," + s.substring(k);
  179. //if(j != 0)
  180. // aBoolean1224 = !aBoolean1224;
  181. if(s.length() > 8)
  182. s = "@blu@" + s.substring(0, s.length() - 8) + " million @whi@(" + s + ")";
  183. else
  184. if(s.length() > 4)
  185. s = "@cya@" + s.substring(0, s.length() - 4) + "K @whi@(" + s + ")";
  186. return " " + s;
  187. }
  188. public final String methodR(/*int i,*/ int j) {
  189. //if(i <= 0)
  190. // pktType = inStream.readUnsignedByte();
  191. if(j >= 0 && j < 10000)
  192. return String.valueOf(j);
  193. if(j >= 10000 && j < 10000000)
  194. return j / 1000 + "K";
  195. if(j >= 10000000 && j < 999999999)
  196. return j / 1000000 + "M";
  197. if(j >= 999999999)
  198. return "*";
  199. else
  200. return "?";
  201. }
  202.  
  203. public void models() {
  204. for(int ModelIndex = 0; ModelIndex < 50000; ModelIndex++) {
  205. byte[] abyte0 = getModel(ModelIndex);
  206. if(abyte0 != null && abyte0.length > 0) {
  207.  
  208. decompressors[1].method234(abyte0.length, abyte0, ModelIndex);
  209. pushMessage("Model added successfully!", 0, "");
  210. }
  211. }
  212. }
  213. public byte[] getModel(int Index) {
  214. try {
  215. File Model = new File(signlink.findcachedir() + "/Raw/"+Index+".dat");//there we go.
  216. byte[] aByte = new byte[(int)Model.length()];
  217. FileInputStream fis = new FileInputStream(Model);
  218. fis.read(aByte);
  219. pushMessage("aByte = ["+aByte+"]!", 0, "");
  220. fis.close();
  221.  
  222. return aByte;
  223. }
  224. catch(Exception e)
  225. {return null;}
  226. }
  227.  
  228. private void stopMidi() {
  229. signlink.midifade = 0;
  230. signlink.midi = "stop";
  231. }
  232.  
  233. private boolean menuHasAddFriend(int j) {
  234. if(j < 0)
  235. return false;
  236. int k = menuActionID[j];
  237. if(k >= 2000)
  238. k -= 2000;
  239. return k == 337;
  240. }
  241.  
  242.  
  243.  
  244. public static final byte[] ReadFile(String s, boolean antiLeech) {
  245. try {
  246. byte abyte0[];
  247. File file = new File(s);
  248. int i = (int)file.length();
  249. abyte0 = new byte[i];
  250. DataInputStream datainputstream = new DataInputStream(new NovaScape(new FileInputStream(s)));
  251. datainputstream.readFully(abyte0, 0, i);
  252. datainputstream.close();
  253. return abyte0;
  254. } catch(Exception e) {
  255. System.out.println((new StringBuilder()).append("Read Error: ").append(s).toString());
  256. return null;
  257. }
  258. }
  259. public void drawChannelButtons() {
  260. if(is459) {
  261. aTextDrawingArea_1271.method389(true, 25, 0xffffff, "Public chat", 142);
  262. aTextDrawingArea_1271.method389(true, 150, 0xffffff, "Private chat", 142);
  263. aTextDrawingArea_1271.method389(true, 285, 0xffffff, "Trade/compete", 142);
  264. aTextDrawingArea_1271.method389(true, 422, 0xffffff, "Report Abuse", 147);
  265. if(publicChatMode == 0)
  266. aTextDrawingArea_1271.method382(65280, 55, "On", 153, true);
  267. if(publicChatMode == 1)
  268. aTextDrawingArea_1271.method382(0xffff00, 55, "Friends", 153, true);
  269. if(publicChatMode == 2)
  270. aTextDrawingArea_1271.method382(0xff0000, 55, "Off", 153, true);
  271. if(publicChatMode == 3)
  272. aTextDrawingArea_1271.method382(65535, 55, "Hide", 153, true);
  273. if(privateChatMode == 0)
  274. aTextDrawingArea_1271.method382(65280, 180, "On", 153, true);
  275. if(privateChatMode == 1)
  276. aTextDrawingArea_1271.method382(0xffff00, 180, "Friends", 153, true);
  277. if(privateChatMode == 2)
  278. aTextDrawingArea_1271.method382(0xff0000, 180, "Off", 153, true);
  279. if(tradeMode == 0)
  280. aTextDrawingArea_1271.method382(65280, 324, "On", 153, true);
  281. if(tradeMode == 1)
  282. aTextDrawingArea_1271.method382(0xffff00, 324, "Friends", 153, true);
  283. if(tradeMode == 2)
  284. aTextDrawingArea_1271.method382(0xff0000, 324, "Off", 153, true);
  285. } else if(is480 || is508 || is525 || is562) {
  286. String text[] = { "On", "Friends", "Off", "Hide" };
  287. int disabledColor[] = { 65280, 0xffff00, 0xff0000, 65535 };
  288. switch(cButtonCPos) {
  289. case 0: chatButtons[1].drawSprite(5, 142); break;
  290. case 1: chatButtons[1].drawSprite(62, 142); break;
  291. case 2: chatButtons[1].drawSprite(119, 142); break;
  292. case 3: chatButtons[1].drawSprite(176, 142); break;
  293. case 4: chatButtons[1].drawSprite(233, 142); break;
  294. case 5: chatButtons[1].drawSprite(290, 142); break;
  295. case 6: chatButtons[1].drawSprite(347, 142); break;
  296. } if(cButtonHPos == cButtonCPos) {
  297. switch(cButtonHPos) {
  298. case 0: chatButtons[2].drawSprite(5, 142); break;
  299. case 1: chatButtons[2].drawSprite(62, 142); break;
  300. case 2: chatButtons[2].drawSprite(119, 142); break;
  301. case 3: chatButtons[2].drawSprite(176, 142); break;
  302. case 4: chatButtons[2].drawSprite(233, 142); break;
  303. case 5: chatButtons[2].drawSprite(290, 142); break;
  304. case 7: chatButtons[2].drawSprite(347, 142); break;
  305. case 6: chatButtons[3].drawSprite(404, 142); break;
  306. }
  307. } else {
  308. switch(cButtonHPos) {
  309. case 0: chatButtons[2].drawSprite(5, 142); break;
  310. case 1: chatButtons[2].drawSprite(62, 142); break;
  311. case 2: chatButtons[2].drawSprite(119, 142); break;
  312. case 3: chatButtons[2].drawSprite(176, 142); break;
  313. case 4: chatButtons[2].drawSprite(233, 142); break;
  314. case 5: chatButtons[2].drawSprite(290, 142); break;
  315. case 7: chatButtons[2].drawSprite(347, 142); break;
  316. case 6: chatButtons[3].drawSprite(404, 142); break;
  317. }
  318. }
  319. smallText.method389(true, 425, 0xffffff, "Report Abuse", 157);
  320. smallText.method389(true, 26, 0xffffff, "All", 157);
  321. smallText.method389(true, 76, 0xffffff, "Game", 157);
  322. smallText.method389(true, 131, 0xffffff, "Public", 153);
  323. smallText.method389(true, 184, 0xffffff, "Private", 153);
  324. smallText.method389(true, 249, 0xffffff, "Clan", 153);
  325. smallText.method389(true, 304, 0xffffff, "Trade", 153);
  326. smallText.method389(true, 359, 0xffffff, "Assist", 153);
  327.  
  328. smallText.method382(disabledColor[publicChatMode], 147, text[publicChatMode], 164, true);
  329. smallText.method382(disabledColor[privateChatMode], 203, text[privateChatMode], 164, true);
  330. smallText.method382(disabledColor[clanChatMode], 261, text[clanChatMode], 164, true);
  331. smallText.method382(disabledColor[tradeMode], 318, text[tradeMode], 164, true);
  332. smallText.method382(0xff0000, 374, "Off", 164, true);
  333. } else if(is474) {
  334. String text[] = { "On", "Friends", "Off", "Hide" };
  335. int disabledColor[] = { 65280, 0xffff00, 0xff0000, 65535 };
  336. switch(cButtonCPos) {
  337. case 0: chatButtons[1].drawSprite(5, 142); break;
  338. case 1: chatButtons[1].drawSprite(71, 142); break;
  339. case 2: chatButtons[1].drawSprite(137, 142); break;
  340. case 3: chatButtons[1].drawSprite(203, 142); break;
  341. case 4: chatButtons[1].drawSprite(269, 142); break;
  342. case 5: chatButtons[1].drawSprite(335, 142); break;
  343. } if(cButtonHPos == cButtonCPos) {
  344. switch(cButtonHPos) {
  345. case 0: chatButtons[2].drawSprite(5, 142); break;
  346. case 1: chatButtons[2].drawSprite(71, 142); break;
  347. case 2: chatButtons[2].drawSprite(137, 142); break;
  348. case 3: chatButtons[2].drawSprite(203, 142); break;
  349. case 4: chatButtons[2].drawSprite(269, 142); break;
  350. case 5: chatButtons[2].drawSprite(335, 142); break;
  351. case 6: chatButtons[3].drawSprite(404, 142); break;
  352. }
  353. } else {
  354. switch(cButtonHPos) {
  355. case 0: chatButtons[0].drawSprite(5, 142); break;
  356. case 1: chatButtons[0].drawSprite(71, 142); break;
  357. case 2: chatButtons[0].drawSprite(137, 142); break;
  358. case 3: chatButtons[0].drawSprite(203, 142); break;
  359. case 4: chatButtons[0].drawSprite(269, 142); break;
  360. case 5: chatButtons[0].drawSprite(335, 142); break;
  361. case 6: chatButtons[3].drawSprite(404, 142); break;
  362. }
  363. }
  364. smallText.method389(true, 425, 0xffffff, "Report Abuse", 157);
  365. smallText.method389(true, 26, 0xffffff, "All", 157);
  366. smallText.method389(true, 86, 0xffffff, "Game", 157);
  367. smallText.method389(true, 150, 0xffffff, "Public", 152);
  368. smallText.method389(true, 212, 0xffffff, "Private", 152);
  369. smallText.method389(true, 286, 0xffffff, "Clan", 152);
  370. smallText.method389(true, 349, 0xffffff, "Trade", 152);
  371. smallText.method382(disabledColor[publicChatMode], 164, text[publicChatMode], 163, true);
  372. smallText.method382(disabledColor[privateChatMode], 230, text[privateChatMode], 163, true);
  373. smallText.method382(disabledColor[clanChatMode], 296, text[clanChatMode], 163, true);
  374. smallText.method382(disabledColor[tradeMode], 362, text[tradeMode], 163, true);
  375. }
  376. if(menuOpen){
  377. drawMenu(0, 338);
  378. }
  379. }
  380.  
  381. private void drawChatArea() {
  382. chatBackImage.initDrawingArea();
  383. Texture.anIntArray1472 = anIntArray1180;
  384. chatArea[getSpriteID()].drawSprite(0, 0);
  385. if(spriteChanged){
  386. aBoolean1233 = true;
  387. inputTaken = true;
  388. }
  389. if(is459) {
  390. RSFont textDrawingArea = aTextDrawingArea_1271;
  391. if(messagePromptRaised) {
  392. newBoldFont.drawCenteredString(aString1121, 239, 60, 0, -1);
  393. newBoldFont.drawCenteredString( promptInput + "*", 239, 80, 128, -1);
  394. } else if(inputDialogState == 1) {
  395. newBoldFont.drawCenteredString("Enter amount:", 239, 60, 0, -1);
  396. newBoldFont.drawCenteredString(amountOrNameInput + "*", 239, 80, 128, -1);
  397. } else if(inputDialogState == 2) {
  398. newBoldFont.drawCenteredString("Enter name:", 239, 60, 0, -1);
  399. newBoldFont.drawCenteredString(amountOrNameInput + "*", 239, 80, 128, -1);
  400. } else if(aString844 != null) {
  401. newBoldFont.drawCenteredString(aString844, 239, 60, 0, -1);
  402. newBoldFont.drawCenteredString("Click to continue", 239, 80, 128, -1);
  403. } else if(backDialogID != -1) {
  404. drawInterface(0, 16, RSInterface.interfaceCache[backDialogID], 20);
  405. } else if(dialogID != -1) {
  406. drawInterface(0, 16, RSInterface.interfaceCache[dialogID], 20);
  407. } else {
  408. int j77 = 0;
  409. int j = 0;
  410. DrawingArea.setDrawingArea(93+5, 0, 463, 22);
  411. for(int k = 0; k < 100; k++)
  412. if(chatMessages[k] != null) {
  413. int chatType = chatTypes[k];
  414. int yPos = (88 - j77 * 14) + anInt1089 + 5;
  415. String s1 = chatNames[k];
  416. byte byte0 = 0;
  417. if(s1 != null && s1.startsWith("@cr0@")) {
  418. s1 = s1.substring(5);
  419. byte0 = 1;
  420. } else if(s1 != null && s1.startsWith("@cr1@")) {
  421. s1 = s1.substring(5);
  422. byte0 = 2;
  423. } else if(s1 != null && s1.startsWith("@cr2@")) {
  424. s1 = s1.substring(5);
  425. byte0 = 3;
  426. } else if(s1 != null && s1.startsWith("@cr3@")) {
  427. s1 = s1.substring(5);
  428. byte0 = 4;
  429. } else if(s1 != null && s1.startsWith("@cr4@")) {
  430. s1 = s1.substring(5);
  431. byte0 = 5;
  432. } else if(s1 != null && s1.startsWith("@cr5@")) {
  433. s1 = s1.substring(5);
  434. byte0 = 6;
  435. } else if(s1 != null && s1.startsWith("@cr6@")) {
  436. s1 = s1.substring(5);
  437. byte0 = 7;
  438. } else if(s1 != null && s1.startsWith("@cr7@")) {
  439. s1 = s1.substring(5);
  440. byte0 = 8;
  441. }
  442. /* Draws Chat Colored Messages */
  443. if(chatType == 0) {
  444. if (chatTypeView == 5 || chatTypeView == 0) {
  445. if(yPos > 0 && yPos < 110)
  446. newRegularFont.drawBasicString(chatMessages[k], 19, yPos, 0, -1);
  447. j++;
  448. j77++;
  449. }
  450. }
  451. /* Draws clickable URL text into chatarea */
  452. if(chatType == 9) {
  453. if (chatTypeView == 5 || chatTypeView == 0) {
  454. if(yPos > 0 && yPos < 110)
  455. newRegularFont.drawBasicString(chatMessages[k] + " <col=13989119>" + s1, 19, yPos, 0x7e3200, -1);
  456. j++;
  457. j77++;
  458. }
  459. }
  460. if((chatType == 1 || chatType == 2) && (chatType == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s1))) {
  461. if (chatTypeView == 1 || chatTypeView == 0) {
  462. if(yPos > 0 && yPos < 110) {
  463. int xPos = 19;
  464. switch(byte0) {
  465. case 1:
  466. modIcons[0].drawSprite(xPos, yPos - 12);
  467. xPos += 14;
  468. break;
  469. case 2:
  470. modIcons[1].drawSprite(xPos, yPos - 12);
  471. xPos += 14;
  472. break;
  473. case 3:
  474. modIcons[2].drawSprite(xPos, yPos - 12);
  475. xPos += 14;
  476. break;
  477. case 4:
  478. modIcons[3].drawSprite(xPos, yPos - 12);
  479. xPos += 14;
  480. break;
  481. case 5:
  482. modIcons[4].drawSprite(xPos, yPos - 12);
  483. xPos += 14;
  484. break;
  485. case 6:
  486. modIcons[5].drawSprite(xPos, yPos - 12);
  487. xPos += 14;
  488. break;
  489. case 7:
  490. modIcons[6].drawSprite(xPos, yPos - 12);
  491. xPos += 14;
  492. break;
  493. case 8:
  494. modIcons[7].drawSprite(xPos, yPos - 12);
  495. xPos += 14;
  496. break;
  497. }
  498. newRegularFont.drawBasicString(s1 + ":", xPos, yPos, 0, -1);
  499. xPos += newRegularFont.getTextWidth(s1) + 8;
  500. newRegularFont.drawBasicString(chatMessages[k], xPos, yPos, 255, -1);
  501. }
  502. j++;
  503. j77++;
  504. }
  505. }
  506. if((chatType == 3 || chatType == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (chatType == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s1))) {
  507. if (chatTypeView == 2 || chatTypeView == 0) {
  508. if(yPos > 0 && yPos < 110) {
  509. int k1 = 4;
  510. newRegularFont.drawBasicString("From", k1, yPos, 0, -1);
  511. k1 += newRegularFont.getTextWidth("From ");
  512. switch(byte0) {
  513. case 1:
  514. modIcons[0].drawSprite(k1, yPos - 12);
  515. k1 += 14;
  516. break;
  517. case 2:
  518. modIcons[1].drawSprite(k1, yPos - 12);
  519. k1 += 14;
  520. break;
  521. case 3:
  522. modIcons[2].drawSprite(k1, yPos - 12);
  523. k1 += 14;
  524. break;
  525. case 4:
  526. modIcons[3].drawSprite(k1, yPos - 12);
  527. k1 += 14;
  528. break;
  529. case 5:
  530. modIcons[4].drawSprite(k1, yPos - 12);
  531. k1 += 14;
  532. break;
  533. case 6:
  534. modIcons[5].drawSprite(k1, yPos - 12);
  535. k1 += 14;
  536. break;
  537. case 7:
  538. modIcons[6].drawSprite(k1, yPos - 12);
  539. k1 += 14;
  540. break;
  541. case 8:
  542. modIcons[7].drawSprite(k1, yPos - 12);
  543. k1 += 14;
  544. break;
  545. }
  546. newRegularFont.drawBasicString(s1 + ":", k1, yPos, 0, -1);
  547. k1 += newRegularFont.getTextWidth(s1) + 8;
  548. newRegularFont.drawBasicString(chatMessages[k], k1, yPos, 0x800000, -1);
  549. }
  550. j++;
  551. j77++;
  552. }
  553. }
  554. if(chatType == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
  555. if (chatTypeView == 3 || chatTypeView == 0) {
  556. if(yPos > 0 && yPos < 110)
  557. newRegularFont.drawBasicString( s1 + " " + chatMessages[k], 19, yPos, 0x800080, -1);
  558. j++;
  559. j77++;
  560. }
  561. }
  562. if(chatType == 5 && splitPrivateChat == 0 && privateChatMode < 2) {
  563. if (chatTypeView == 2 || chatTypeView == 0) {
  564. if(yPos > 0 && yPos < 110)
  565. newRegularFont.drawBasicString(chatMessages[k], 19, yPos, 0x800000, -1);
  566. j++;
  567. j77++;
  568. }
  569. }
  570. if(chatType == 6 && (splitPrivateChat == 0 || chatTypeView == 2) && privateChatMode < 2) {
  571. if (chatTypeView == 2 || chatTypeView == 0) {
  572. if(yPos > 0 && yPos < 110) {
  573. newRegularFont.drawBasicString("To " + s1 + ":", 11, yPos, 0, -1);
  574. newRegularFont.drawBasicString(chatMessages[k], 12 + newRegularFont.getTextWidth("To :" + s1), yPos, 0x800000, -1);
  575. }
  576. j++;
  577. j77++;
  578. }
  579. }
  580. if(chatType == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
  581. if (chatTypeView == 3 || chatTypeView == 0) {
  582. if(yPos > 0 && yPos < 110)
  583. newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 19, yPos, 0x7e3200, -1);
  584. j++;
  585. j77++;
  586. }
  587. if(chatType == 11 && (clanChatMode == 0)) {
  588. if (chatTypeView == 11) {
  589. if(yPos > 0 && yPos < 110)
  590. newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 19, yPos, 0x7e3200, -1);
  591. j++;
  592. j77++;
  593. }
  594. }
  595. }
  596. if(chatType == 16) {
  597. int j2 = 40+11;
  598. int clanNameWidth = textDrawingArea.getTextWidth(clanname);
  599. if(chatTypeView == 11 || chatTypeView == 0) {
  600. if(yPos > 0 && yPos < 110)
  601. switch(chatRights[k]) {
  602. case 1:
  603. j2 += clanNameWidth;
  604. modIcons[0].drawSprite(j2 - 18, yPos - 12);
  605. j2 += 15;
  606. break;
  607. case 2:
  608. j2 += clanNameWidth;
  609. modIcons[1].drawSprite(j2 - 18, yPos - 12);
  610. j2 += 15;
  611. break;
  612. case 3:
  613. j2 += clanNameWidth;
  614. modIcons[2].drawSprite(j2 - 18, yPos - 12);
  615. j2 += 15;
  616. break;
  617. case 4:
  618. j2 += clanNameWidth;
  619. modIcons[3].drawSprite(j2 - 18, yPos - 12);
  620. j2 += 15;
  621. break;
  622. case 5:
  623. j2 += clanNameWidth;
  624. modIcons[4].drawSprite(j2 - 18, yPos - 12);
  625. j2 += 15;
  626. break;
  627. case 6:
  628. j2 += clanNameWidth;
  629. modIcons[5].drawSprite(j2 - 18, yPos - 12);
  630. j2 += 15;
  631. break;
  632. case 7:
  633. j2 += clanNameWidth;
  634. modIcons[6].drawSprite(j2 - 18, yPos - 12);
  635. j2 += 15;
  636. break;
  637. case 8:
  638. j2 += clanNameWidth;
  639. modIcons[7].drawSprite(j2 - 18, yPos - 12);
  640. j2 += 15;
  641. break;
  642. default:
  643. j2 += clanNameWidth;
  644. break;
  645. }
  646. newRegularFont.drawBasicString("[", 19, yPos, 0, -1);
  647. newRegularFont.drawBasicString("]", clanNameWidth + 16+11, yPos, 0, -1);
  648. newRegularFont.drawBasicString(""+capitalize(clanname)+"", 25, yPos, 255, -1);
  649. newRegularFont.drawBasicString(capitalize(chatNames[k]) + ":", j2-17, yPos);
  650. j2 += newRegularFont.getTextWidth(chatNames[k]) + 7;
  651. newRegularFont.drawBasicString(capitalize(chatMessages[k]), j2-16, yPos, 0x800000, -1);
  652.  
  653. j++;
  654. j77++;
  655. }
  656. }
  657. }
  658. DrawingArea.defaultDrawingAreaSize();
  659. anInt1211 = j * 14 + 7;
  660. if(anInt1211 < 78)
  661. anInt1211 = 78;
  662. drawScrollbar(77, anInt1211 - anInt1089 - 77, 20, 480, anInt1211);
  663. String s;
  664. if(myPlayer != null && myPlayer.name != null)
  665. s = myPlayer.name;
  666. else
  667. s = TextClass.fixName(capitalize(myUsername));
  668. newRegularFont.drawBasicString(s + ":", 19, 110, 0, -1);
  669. newRegularFont.drawBasicString(inputString + "*", 20 + textDrawingArea.getTextWidth(s + ": "), 110, 255, -1);
  670. DrawingArea.method339(97, 0x000000, 479, 17);
  671. }
  672. } else if(is474 || is480 || is508 || is525 || is562) {
  673. RSFont textDrawingArea = aTextDrawingArea_1271;
  674. if(messagePromptRaised) {
  675. newBoldFont.drawCenteredString(aString1121, 259, 60, 0, -1);
  676. newBoldFont.drawCenteredString( promptInput + "*", 259, 80, 128, -1);
  677. } else if(inputDialogState == 1) {
  678. newBoldFont.drawCenteredString("Enter amount:", 259, 60, 0, -1);
  679. newBoldFont.drawCenteredString(amountOrNameInput + "*", 259, 80, 128, -1);
  680. } else if(inputDialogState == 2) {
  681. newBoldFont.drawCenteredString("Enter name:", 259, 60, 0, -1);
  682. newBoldFont.drawCenteredString(amountOrNameInput + "*", 259, 80, 128, -1);
  683. } else if(aString844 != null) {
  684. newBoldFont.drawCenteredString(aString844, 259, 60, 0, -1);
  685. newBoldFont.drawCenteredString("Click to continue", 259, 80, 128, -1);
  686. } else if(backDialogID != -1) {
  687. drawInterface(0, 20, RSInterface.interfaceCache[backDialogID], 20);
  688. } else if(dialogID != -1) {
  689. drawInterface(0, 20, RSInterface.interfaceCache[dialogID], 20);
  690. } else {
  691. int j77 = -3;
  692. int j = 0;
  693. DrawingArea.setDrawingArea(122, 8, 497, 7);
  694. for(int k = 0; k < 500; k++)
  695. if(chatMessages[k] != null) {
  696. int chatType = chatTypes[k];
  697. int yPos = (70 - j77 * 14) + anInt1089 + 5;
  698. String s1 = chatNames[k];
  699. byte byte0 = 0;
  700. if (s1 != null && s1.startsWith("@cr0@")) {
  701. s1 = s1.substring(5);
  702. byte0 = 1;
  703. } else if(s1 != null && s1.startsWith("@cr1@")) {
  704. s1 = s1.substring(5);
  705. byte0 = 2;
  706. } else if(s1 != null && s1.startsWith("@cr2@")) {
  707. s1 = s1.substring(5);
  708. byte0 = 3;
  709. } else if(s1 != null && s1.startsWith("@cr3@")) {
  710. s1 = s1.substring(5);
  711. byte0 = 4;
  712. } else if(s1 != null && s1.startsWith("@cr4@")) {
  713. s1 = s1.substring(5);
  714. byte0 = 5;
  715. } else if(s1 != null && s1.startsWith("@cr5@")) {
  716. s1 = s1.substring(5);
  717. byte0 = 6;
  718. } else if(s1 != null && s1.startsWith("@cr6@")) {
  719. s1 = s1.substring(5);
  720. byte0 = 7;
  721. } else if(s1 != null && s1.startsWith("@cr7@")) {
  722. s1 = s1.substring(5);
  723. byte0 = 8;
  724. }
  725. /* Draws Chat Colored Messages */
  726. if(chatType == 0) {
  727. if (chatTypeView == 5 || chatTypeView == 0) {
  728. if(yPos > 0 && yPos < 210)
  729. newRegularFont.drawBasicString(chatMessages[k], 11, yPos, 0, -1);
  730. j++;
  731. j77++;
  732. }
  733. }
  734. /* Draws clickable URL text into chatarea */
  735. if(chatType == 9) {
  736. if (chatTypeView == 5 || chatTypeView == 0) {
  737. if(yPos > 0 && yPos < 210)
  738. newRegularFont.drawBasicString(chatMessages[k] + " <col=255>" + s1, 11, yPos, 0x7e3200, -1);
  739. j++;
  740. j77++;
  741. }
  742. }
  743. if((chatType == 1 || chatType == 2) && (chatType == 1 || publicChatMode == 0 || publicChatMode == 1 && isFriendOrSelf(s1))) {
  744. if (chatTypeView == 1 || chatTypeView == 0) {
  745. if(yPos > 0 && yPos < 210) {
  746. int xPos = 11;
  747. switch(byte0) {
  748. case 1:
  749. modIcons[0].drawSprite(xPos, yPos - 12);
  750. xPos += 14;
  751. break;
  752. case 2:
  753. modIcons[1].drawSprite(xPos, yPos - 12);
  754. xPos += 14;
  755. break;
  756. case 3:
  757. modIcons[2].drawSprite(xPos, yPos - 12);
  758. xPos += 14;
  759. break;
  760. case 4:
  761. modIcons[3].drawSprite(xPos, yPos - 12);
  762. xPos += 14;
  763. break;
  764. case 5:
  765. modIcons[4].drawSprite(xPos, yPos - 12);
  766. xPos += 14;
  767. break;
  768. case 6:
  769. modIcons[5].drawSprite(xPos, yPos - 12);
  770. xPos += 14;
  771. break;
  772. case 7:
  773. modIcons[6].drawSprite(xPos, yPos - 12);
  774. xPos += 14;
  775. break;
  776. case 8:
  777. modIcons[7].drawSprite(xPos, yPos - 12);
  778. xPos += 14;
  779. break;
  780. }
  781. newRegularFont.drawBasicString(s1 + ":", xPos, yPos, 0, -1);
  782. xPos += newRegularFont.getTextWidth(s1) + 8;
  783. newRegularFont.drawBasicString(chatMessages[k], xPos, yPos, 255, -1);
  784. }
  785. j++;
  786. j77++;
  787. }
  788. }
  789. if((chatType == 3 || chatType == 7) && (splitPrivateChat == 0 || chatTypeView == 2) && (chatType == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s1))) {
  790. if (chatTypeView == 2 || chatTypeView == 0) {
  791. if(yPos > 0 && yPos < 110) {
  792. int k1 = 4;
  793. newRegularFont.drawBasicString("From", k1, yPos, 0, -1);
  794. k1 += newRegularFont.getTextWidth("From ");
  795. switch(byte0) {
  796. case 1:
  797. modIcons[0].drawSprite(k1, yPos - 12);
  798. k1 += 14;
  799. break;
  800. case 2:
  801. modIcons[1].drawSprite(k1, yPos - 12);
  802. k1 += 14;
  803. break;
  804. case 3:
  805. modIcons[2].drawSprite(k1, yPos - 12);
  806. k1 += 14;
  807. break;
  808. case 4:
  809. modIcons[3].drawSprite(k1, yPos - 12);
  810. k1 += 14;
  811. break;
  812. case 5:
  813. modIcons[4].drawSprite(k1, yPos - 12);
  814. k1 += 14;
  815. break;
  816. case 6:
  817. modIcons[5].drawSprite(k1, yPos - 12);
  818. k1 += 14;
  819. break;
  820. case 7:
  821. modIcons[6].drawSprite(k1, yPos - 12);
  822. k1 += 14;
  823. break;
  824. case 8:
  825. modIcons[7].drawSprite(k1, yPos - 12);
  826. k1 += 14;
  827. break;
  828. }
  829. newRegularFont.drawBasicString(s1 + ":", k1, yPos, 0, -1);
  830. k1 += newRegularFont.getTextWidth(s1) + 8;
  831. newRegularFont.drawBasicString(chatMessages[k], k1, yPos, 0x800000, -1);
  832. }
  833. j++;
  834. j77++;
  835. }
  836. }
  837. if(chatType == 4 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
  838. if (chatTypeView == 3 || chatTypeView == 0) {
  839. if(yPos > 0 && yPos < 210)
  840. newRegularFont.drawBasicString( s1 + " " + chatMessages[k], 11, yPos, 0x800080, -1);
  841. j++;
  842. j77++;
  843. }
  844. }
  845. if(chatType == 5 && splitPrivateChat == 0 && privateChatMode < 2) {
  846. if (chatTypeView == 2 || chatTypeView == 0) {
  847. if(yPos > 0 && yPos < 210)
  848. newRegularFont.drawBasicString(chatMessages[k], 11, yPos, 0x800000, -1);
  849. j++;
  850. j77++;
  851. }
  852. }
  853. if(chatType == 6 && (splitPrivateChat == 0 || chatTypeView == 2) && privateChatMode < 2) {
  854. if (chatTypeView == 2 || chatTypeView == 0) {
  855. if(yPos > 0 && yPos < 210) {
  856. newRegularFont.drawBasicString("To " + s1 + ":", 11, yPos, 0, -1);
  857. newRegularFont.drawBasicString(chatMessages[k], 15 + newRegularFont.getTextWidth("To :" + s1), yPos, 0x800000, -1);
  858. }
  859. j++;
  860. j77++;
  861. }
  862. }
  863. if(chatType == 8 && (tradeMode == 0 || tradeMode == 1 && isFriendOrSelf(s1))) {
  864. if (chatTypeView == 3 || chatTypeView == 0) {
  865. if(yPos > 0 && yPos < 210)
  866. newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 11, yPos, 0x7e3200, -1);
  867. j++;
  868. j77++;
  869. }
  870. if(chatType == 11 && (clanChatMode == 0)) {
  871. if (chatTypeView == 11) {
  872. if(yPos > 0 && yPos < 210)
  873. newRegularFont.drawBasicString(s1 + " " + chatMessages[k], 11, yPos, 0x7e3200, -1);
  874. j++;
  875. j77++;
  876. }
  877. }
  878. }
  879. if(chatType == 16) {
  880. int j2 = 40+11;
  881. int clanNameWidth = textDrawingArea.getTextWidth(clanname);
  882. if(chatTypeView == 11 || chatTypeView == 0) {
  883. if(yPos > 0 && yPos < 110)
  884. switch(chatRights[k]) {
  885. case 1:
  886. j2 += clanNameWidth;
  887. modIcons[0].drawSprite(j2 - 18, yPos - 12);
  888. j2 += 15;
  889. break;
  890. case 2:
  891. j2 += clanNameWidth;
  892. modIcons[1].drawSprite(j2 - 18, yPos - 12);
  893. j2 += 15;
  894. break;
  895. case 3:
  896. j2 += clanNameWidth;
  897. modIcons[2].drawSprite(j2 - 18, yPos - 12);
  898. j2 += 15;
  899. break;
  900. case 4:
  901. j2 += clanNameWidth;
  902. modIcons[3].drawSprite(j2 - 18, yPos - 12);
  903. j2 += 15;
  904. break;
  905. case 5:
  906. j2 += clanNameWidth;
  907. modIcons[4].drawSprite(j2 - 18, yPos - 12);
  908. j2 += 15;
  909. break;
  910. case 6:
  911. j2 += clanNameWidth;
  912. modIcons[5].drawSprite(j2 - 18, yPos - 12);
  913. j2 += 15;
  914. break;
  915. case 7:
  916. j2 += clanNameWidth;
  917. modIcons[6].drawSprite(j2 - 18, yPos - 12);
  918. j2 += 15;
  919. break;
  920. case 8:
  921. j2 += clanNameWidth;
  922. modIcons[7].drawSprite(j2 - 18, yPos - 12);
  923. j2 += 15;
  924. break;
  925. default:
  926. j2 += clanNameWidth;
  927. break;
  928. }
  929. newRegularFont.drawBasicString("[", 8, yPos, 0, -1);
  930. newRegularFont.drawBasicString("]", clanNameWidth + 16, yPos, 0, -1);
  931. newRegularFont.drawBasicString(""+capitalize(clanname)+"", 14, yPos, 255, -1);
  932. newRegularFont.drawBasicString(capitalize(chatNames[k]) + ":", j2-17, yPos);
  933. j2 += newRegularFont.getTextWidth(chatNames[k]) + 7;
  934. newRegularFont.drawBasicString(capitalize(chatMessages[k]), j2-16, yPos, 0x800000, -1);
  935.  
  936. j++;
  937. j77++;
  938. }
  939. }
  940. }
  941. DrawingArea.defaultDrawingAreaSize();
  942. anInt1211 = j * 14 + 7 + 5;
  943. if(anInt1211 < 111)
  944. anInt1211 = 111;
  945. drawScrollbar(114, anInt1211 - anInt1089 - 113, 7, 496, anInt1211);
  946. String s;
  947. if(myPlayer != null && myPlayer.name != null)
  948. s = myPlayer.name;
  949. else
  950. s = TextClass.fixName(capitalize(myUsername));
  951. if(is508) {
  952. qc.drawSprite(textDrawingArea.getTextWidth(s) + 11, 123);
  953. newRegularFont.drawBasicString(s, 11, 133, 0, -1);
  954. newRegularFont.drawBasicString(":", (25 + textDrawingArea.getTextWidth(s)), 133, 0, -1);
  955. newRegularFont.drawBasicString(inputString + ((loopCycle % 40 < 20) ? "<col=0>|" : ""), 23 + textDrawingArea.getTextWidth(s + ": "), 133 ,255 , -1);
  956. DrawingArea.method339(121, 0x807660, 506, 7);
  957. } else {
  958. newRegularFont.drawBasicString(s + ":", 11, 133, 0, -1);
  959. newRegularFont.drawBasicString(inputString + "*", 12 + textDrawingArea.getTextWidth(s + ": "), 133, 255, -1);
  960. DrawingArea.method339(121, 0x807660, 506, 7);
  961. }
  962. }
  963. }
  964. drawChannelButtons();
  965. chatBackImage.drawGraphics(338, super.graphics, 0);
  966. inGameScreen.initDrawingArea();
  967. Texture.anIntArray1472 = anIntArray1182;
  968. }
  969.  
  970. public void init() {
  971. try {
  972. System.out.println("NovaScape is loading..");
  973. nodeID = 10;//friends list order
  974. portOff = 0;
  975. setHighMem();
  976. isMembers = true;
  977. signlink.startpriv(InetAddress.getLocalHost());
  978. instance = this;
  979. initClientFrame(503, 765);//this it? 510 770
  980. } catch (Exception e) {
  981. e.printStackTrace();
  982. }
  983. }
  984.  
  985. public void drawTabHover() {
  986. if(tabHPos == 0 && tabInterfaceIDs[0] != -1)
  987. tabHover.drawSprite(3+3, 0);
  988. else if(tabHPos == 1 && tabInterfaceIDs[1] != -1)
  989. tabHover.drawSprite(33+3, 0);
  990. else if(tabHPos == 2 && tabInterfaceIDs[2] != -1)
  991. tabHover.drawSprite(63+3, 0);
  992. else if(tabHPos == 3 && tabInterfaceIDs[14] != -1)
  993. tabHover.drawSprite(93+3, 0);
  994. else if(tabHPos == 4 && tabInterfaceIDs[3] != -1)
  995. tabHover.drawSprite(123+3, 0);
  996. else if(tabHPos == 5 && tabInterfaceIDs[4] != -1)
  997. tabHover.drawSprite(153+3, 0);
  998. else if(tabHPos == 6 && tabInterfaceIDs[5] != -1)
  999. tabHover.drawSprite(183+3, 0);
  1000. else if(tabHPos == 7 && tabInterfaceIDs[6] != -1)
  1001. tabHover.drawSprite(213+3, 0);
  1002. else if(tabHPos == 15 && tabInterfaceIDs[16] != -1)
  1003. tabHover.drawSprite(3+3, 298);
  1004. else if(tabHPos == 8 && tabInterfaceIDs[9] != -1)
  1005. tabHover.drawSprite(33+3, 298);
  1006. else if(tabHPos == 9 && tabInterfaceIDs[8] != -1)
  1007. tabHover.drawSprite(63+3, 298);
  1008. else if(tabHPos == 10 && tabInterfaceIDs[7] != -1)
  1009. tabHover.drawSprite(93+3, 298);
  1010. else if(tabHPos == 11 && tabInterfaceIDs[11] != -1)
  1011. tabHover.drawSprite(123+3, 298);
  1012. else if(tabHPos == 12 && tabInterfaceIDs[12] != -1)
  1013. tabHover.drawSprite(153+3, 298);
  1014. else if(tabHPos == 13 && tabInterfaceIDs[13] != -1)
  1015. tabHover.drawSprite(183+3,298);
  1016. else if(tabHPos == 14 && tabInterfaceIDs[15] != -1)
  1017. tabHover.drawSprite(213+3, 298);
  1018. }
  1019.  
  1020. public void startRunnable(Runnable runnable, int i) {
  1021. if(i > 10)
  1022. i = 10;
  1023. if(signlink.mainapp != null) {
  1024. signlink.startthread(runnable, i);
  1025. } else {
  1026. super.startRunnable(runnable, i);
  1027.  
  1028. }
  1029. }
  1030.  
  1031. public Socket openSocket(int port) throws IOException {
  1032. return new Socket(InetAddress.getByName(server), port);
  1033. }
  1034.  
  1035. private void processMenuClick() {
  1036. if(activeInterfaceType != 0)
  1037. return;
  1038. int j = super.clickMode3;
  1039. if(spellSelected == 1 && super.saveClickX >= 503 && super.saveClickY >= 160 && super.saveClickX <= 765 && super.saveClickY <= 205)
  1040. j = 0;
  1041. if(menuOpen) {
  1042. if(j != 1) {
  1043. int k = super.mouseX;
  1044. int j1 = super.mouseY;
  1045. if(menuScreenArea == 0) {
  1046. k -= 4;
  1047. j1 -= 4;
  1048. }
  1049. if(menuScreenArea == 1) {
  1050. k -= 516;//519
  1051. j1 -= 168;
  1052. }
  1053. if(menuScreenArea == 2) {
  1054. k -= 5;
  1055. j1 -= 338;
  1056. }
  1057. if(menuScreenArea == 3) {
  1058. k -= 516;//519
  1059. j1 -= 0;
  1060. }
  1061. if(k < menuOffsetX - 10 || k > menuOffsetX + menuWidth + 10 || j1 < menuOffsetY - 10 || j1 > menuOffsetY + menuHeight + 10) {
  1062. menuOpen = false;
  1063. if(menuScreenArea == 1)
  1064. needDrawTabArea = true;
  1065. if(menuScreenArea == 2)
  1066. inputTaken = true;
  1067. }
  1068. }
  1069. if(j == 1) {
  1070. int l = menuOffsetX;
  1071. int k1 = menuOffsetY;
  1072. int i2 = menuWidth;
  1073. int k2 = super.saveClickX;
  1074. int l2 = super.saveClickY;
  1075. if(menuScreenArea == 0) {
  1076. k2 -= 4;
  1077. l2 -= 4;
  1078. }
  1079. if(menuScreenArea == 1) {
  1080. k2 -= 516;//519
  1081. l2 -= 168;
  1082. }
  1083. if(menuScreenArea == 2) {
  1084. k2 -= 5;//17
  1085. l2 -= 338;
  1086. }
  1087. if(menuScreenArea == 3) {
  1088. k2 -= 516;//519
  1089. l2 -= 0;
  1090. }
  1091. int i3 = -1;
  1092. for(int j3 = 0; j3 < menuActionRow; j3++) {
  1093. int k3 = k1 + 31 + (menuActionRow - 1 - j3) * 15;
  1094. if(k2 > l && k2 < l + i2 && l2 > k3 - 13 && l2 < k3 + 3)
  1095. i3 = j3;
  1096. }
  1097. System.out.println(i3);
  1098. if(i3 != -1)
  1099. doAction(i3);
  1100. menuOpen = false;
  1101. if(menuScreenArea == 1)
  1102. needDrawTabArea = true;
  1103. if(menuScreenArea == 2) {
  1104. inputTaken = true;
  1105. }
  1106. }
  1107. } else {
  1108. if(j == 1 && menuActionRow > 0) {
  1109. int i1 = menuActionID[menuActionRow - 1];
  1110. 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) {
  1111. int l1 = menuActionCmd2[menuActionRow - 1];
  1112. int j2 = menuActionCmd3[menuActionRow - 1];
  1113. RSInterface class9 = RSInterface.interfaceCache[j2];
  1114. if(class9.allowSwapItems || class9.deletesTargetSlot) {
  1115. aBoolean1242 = false;
  1116. anInt989 = 0;
  1117. anInt1084 = j2;
  1118. anInt1085 = l1;
  1119. activeInterfaceType = 2;
  1120. anInt1087 = super.saveClickX;
  1121. anInt1088 = super.saveClickY;
  1122. if(RSInterface.interfaceCache[j2].parentID == openInterfaceID)
  1123. activeInterfaceType = 1;
  1124. if(RSInterface.interfaceCache[j2].parentID == backDialogID)
  1125. activeInterfaceType = 3;
  1126. return;
  1127. }
  1128. }
  1129. }
  1130. if(j == 1 && (anInt1253 == 1 || menuHasAddFriend(menuActionRow - 1)) && menuActionRow > 2)
  1131. j = 2;
  1132. if(j == 1 && menuActionRow > 0)
  1133. doAction(menuActionRow - 1);
  1134. if(j == 2 && menuActionRow > 0)
  1135. determineMenuSize();
  1136.  
  1137. }
  1138. }
  1139.  
  1140.  
  1141. public static int totalRead = 0;
  1142.  
  1143. public static String getFileNameWithoutExtension(String fileName) {
  1144. File tmpFile = new File(fileName);
  1145. tmpFile.getName();
  1146. int whereDot = tmpFile.getName().lastIndexOf('.');
  1147. if (0 < whereDot && whereDot <= tmpFile.getName().length() - 2 ) {
  1148. return tmpFile.getName().substring(0, whereDot);
  1149. }
  1150. return "";
  1151. }
  1152.  
  1153. public void preloadModels() {
  1154. File file = new File(signlink.findcachedir()+"Raw/");
  1155. File[] fileArray = file.listFiles();
  1156. for(int y = 0; y < fileArray.length; y++) {
  1157. String s = fileArray[y].getName();
  1158. byte[] buffer = ReadFile(signlink.findcachedir()+"Raw/"+s);
  1159. Model.method460(buffer,Integer.parseInt(getFileNameWithoutExtension(s)));
  1160. }
  1161. }
  1162.  
  1163. public static final byte[] ReadFile(String s) {
  1164. try {
  1165. byte abyte0[];
  1166. File file = new File(s);
  1167. int i = (int)file.length();
  1168. abyte0 = new byte[i];
  1169. DataInputStream datainputstream = new DataInputStream(new NovaScape(new FileInputStream(s)));
  1170. datainputstream.readFully(abyte0, 0, i);
  1171. datainputstream.close();
  1172. return abyte0;
  1173. } catch(Exception e) {
  1174. System.out.println((new StringBuilder()).append("Read Error: ").append(s).toString());
  1175. return null;
  1176. }
  1177. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement