Guest User

Client.java 2

a guest
Jul 10th, 2014
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 267.24 KB | None | 0 0
  1. if(j == 613)
  2. if(myPrivilege >= 1)
  3. {
  4. if(canMute) {
  5. class9.disabledColor = 0xff0000;
  6. class9.disabledMessage = "Moderator option: Mute player for 48 hours: <ON>";
  7. } else {
  8. class9.disabledColor = 0xffffff;
  9. class9.disabledMessage = "Moderator option: Mute player for 48 hours: <OFF>";
  10. }
  11. } else {
  12. class9.disabledMessage = "";
  13. }
  14. if(j == 650 || j == 655)
  15. if(anInt1193 != 0)
  16. {
  17. String s;
  18. if(daysSinceLastLogin == 0)
  19. s = "earlier today";
  20. else
  21. if(daysSinceLastLogin == 1)
  22. s = "yesterday";
  23. else
  24. s = daysSinceLastLogin + " days ago";
  25. class9.disabledMessage = "You last logged in " + s + " from: " + signlink.dns;
  26. } else
  27. {
  28. class9.disabledMessage = "";
  29. }
  30. if(j == 651)
  31. {
  32. if(unreadMessages == 0)
  33. {
  34. class9.disabledMessage = "0 unread messages";
  35. class9.disabledColor = 0xffff00;
  36. }
  37. if(unreadMessages == 1)
  38. {
  39. class9.disabledMessage = "1 unread disabledMessage";
  40. class9.disabledColor = 65280;
  41. }
  42. if(unreadMessages > 1)
  43. {
  44. class9.disabledMessage = unreadMessages + " unread messages";
  45. class9.disabledColor = 65280;
  46. }
  47. }
  48. if(j == 652)
  49. if(daysSinceRecovChange == 201)
  50. {
  51. if(membersInt == 1)
  52. class9.disabledMessage = "@yel@This is a non-members world: @whi@Since you are a member we";
  53. else
  54. class9.disabledMessage = "";
  55. } else
  56. if(daysSinceRecovChange == 200)
  57. {
  58. class9.disabledMessage = "You have not yet set any password recovery questions.";
  59. } else
  60. {
  61. String s1;
  62. if(daysSinceRecovChange == 0)
  63. s1 = "Earlier today";
  64. else
  65. if(daysSinceRecovChange == 1)
  66. s1 = "Yesterday";
  67. else
  68. s1 = daysSinceRecovChange + " days ago";
  69. class9.disabledMessage = s1 + " you changed your recovery questions";
  70. }
  71. if(j == 653)
  72. if(daysSinceRecovChange == 201)
  73. {
  74. if(membersInt == 1)
  75. class9.disabledMessage = "@whi@recommend you use a members world instead. You may use";
  76. else
  77. class9.disabledMessage = "";
  78. } else
  79. if(daysSinceRecovChange == 200)
  80. class9.disabledMessage = "We strongly recommend you do so now to secure your account.";
  81. else
  82. class9.disabledMessage = "If you do not remember making this change then cancel it immediately";
  83. if(j == 654)
  84. {
  85. if(daysSinceRecovChange == 201)
  86. if(membersInt == 1)
  87. {
  88. class9.disabledMessage = "@whi@this world but member benefits are unavailable whilst here.";
  89. return;
  90. } else
  91. {
  92. class9.disabledMessage = "";
  93. return;
  94. }
  95. if(daysSinceRecovChange == 200)
  96. {
  97. class9.disabledMessage = "Do this from the 'account management' area on our front webpage";
  98. return;
  99. }
  100. class9.disabledMessage = "Do this from the 'account management' area on our front webpage";
  101. }
  102. }
  103.  
  104. private void drawSplitPrivateChat()
  105. {
  106. if(splitPrivateChat == 0)
  107. return;
  108. RSFont textDrawingArea = aTextDrawingArea_1271;
  109. int i = 0;
  110. if(anInt1104 != 0)
  111. i = 1;
  112. for(int j = 0; j < 100; j++)
  113. if(chatMessages[j] != null)
  114. {
  115. int k = chatTypes[j];
  116. String s = chatNames[j];
  117. byte byte1 = 0;
  118. if(s != null && s.startsWith("@cr1@")) {
  119. s = s.substring(5);
  120. byte1 = 1;
  121. }
  122. if(s != null && s.startsWith("@cr2@")) {
  123. s = s.substring(5);
  124. byte1 = 2;
  125. }
  126. if(s != null && s.startsWith("@cr3@")) {
  127. s = s.substring(5);
  128. byte1 = 3;
  129. }
  130. if(s != null && s.startsWith("@cr4@")) {
  131. s = s.substring(5);
  132. byte1 = 4;
  133. }
  134. if(s != null && s.startsWith("@cr5@")) {
  135. s = s.substring(5);
  136. byte1 = 5;
  137. }
  138. if(s != null && s.startsWith("@cr6@")) {
  139. s = s.substring(5);
  140. byte1 = 6;
  141. }
  142. if(s != null && s.startsWith("@cr7@")) {
  143. s = s.substring(5);
  144. byte1 = 7;
  145. }
  146. if(s != null && s.startsWith("@cr8@")) {
  147. s = s.substring(5);
  148. byte1 = 8;
  149. }
  150. if(s != null && s.startsWith("@cr9@")) {
  151. s = s.substring(5);
  152. byte1 = 9;
  153. }
  154. if(s != null && s.startsWith("@cr10@")) {
  155. s = s.substring(6);
  156. byte1 = 10;
  157. }
  158. if(s != null && s.startsWith("@cr11@")) {
  159. s = s.substring(6);
  160. byte1 = 11;
  161. }
  162. if(s != null && s.startsWith("@cr12@")) {
  163. s = s.substring(6);
  164. byte1 = 12;
  165. }
  166. if(s != null && s.startsWith("@cr13@")) {
  167. s = s.substring(6);
  168. byte1 = 13;
  169. }
  170. if((k == 3 || k == 7) && (k == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s)))
  171. {
  172. int l = 329 - i * 13;
  173. int k1 = 4;
  174. textDrawingArea.method385(0, "From", l, k1);
  175. textDrawingArea.method385(65535, "From", l - 1, k1);
  176. k1 += textDrawingArea.getTextWidth("From ");
  177. if(byte1 == 1) {
  178. modIcons[0].drawSprite(k1, l - 12);
  179. k1 += 12;
  180. }
  181. if(byte1 == 2) {
  182. modIcons[1].drawSprite(k1, l - 12);
  183. k1 += 12;
  184. }
  185. if(byte1 == 3) {
  186. modIcons[2].drawSprite(k1, l - 12);
  187. k1 += 12;
  188. }
  189. if(byte1 == 4) {
  190. modIcons[3].drawSprite(k1, l - 12);
  191. k1 += 12;
  192. }
  193. if(byte1 == 5) {
  194. modIcons[4].drawSprite(k1, l - 12);
  195. k1 += 12;
  196. }
  197. if(byte1 == 6) {
  198. modIcons[5].drawSprite(k1, l - 12);
  199. k1 += 12;
  200. }
  201. if(byte1 == 7) {
  202. modIcons[6].drawSprite(k1, l - 12);
  203. k1 += 12;
  204. }
  205. if(byte1 == 8) {
  206. modIcons[7].drawSprite(k1, l - 12);
  207. k1 += 12;
  208. }
  209. if(byte1 == 9) {
  210. modIcons[8].drawSprite(k1, l - 12);
  211. k1 += 12;
  212. }
  213. if(byte1 == 10) {
  214. modIcons[9].drawSprite(k1, l - 12);
  215. k1 += 12;
  216. }
  217. if(byte1 == 11) {
  218. modIcons[10].drawSprite(k1, l - 12);
  219. k1 += 12;
  220. }
  221. if(byte1 == 12) {
  222. modIcons[11].drawSprite(k1, l - 12);
  223. k1 += 12;
  224. }
  225. if(byte1 == 13) {
  226. modIcons[12].drawSprite(k1, l - 12);
  227. k1 += 12;
  228. }
  229. textDrawingArea.method385(0, s + ": " + chatMessages[j], l, k1);
  230. textDrawingArea.method385(65535, s + ": " + chatMessages[j], l - 1, k1);
  231. if(++i >= 5)
  232. return;
  233. }
  234. if(k == 5 && privateChatMode < 2)
  235. {
  236. int i1 = 329 - i * 13;
  237. textDrawingArea.method385(0, chatMessages[j], i1, 4);
  238. textDrawingArea.method385(65535, chatMessages[j], i1 - 1, 4);
  239. if(++i >= 5)
  240. return;
  241. }
  242. if(k == 6 && privateChatMode < 2)
  243. {
  244. int j1 = 329 - i * 13;
  245. textDrawingArea.method385(0, "To " + s + ": " + chatMessages[j], j1, 4);
  246. textDrawingArea.method385(65535, "To " + s + ": " + chatMessages[j], j1 - 1, 4);
  247. if(++i >= 5)
  248. return;
  249. }
  250. }
  251.  
  252. }
  253.  
  254. public void pushMessage(String s, int i, String s1) {
  255. /**try {
  256. if (chatMessages[0].equals(s) && chatNames[0].equals(s1)) return; // Stop spammers
  257. if (chatNames[0].equals(s1) && chatNames[1].equals(s1) && chatNames[0].equals(s1)) return;
  258. } catch (Exception e) {}*/
  259. if(i == 0 && dialogID != -1) {
  260. aString844 = s;
  261. super.clickMode3 = 0;
  262. }
  263. if(backDialogID == -1)
  264. inputTaken = true;
  265. for(int j = 499; j > 0; j--) {
  266. chatTypes[j] = chatTypes[j - 1];
  267. chatNames[j] = chatNames[j - 1];
  268. chatMessages[j] = chatMessages[j - 1];
  269. chatRights[j] = chatRights[j - 1];
  270. }
  271. chatTypes[0] = i;
  272. chatNames[0] = s1;
  273. chatMessages[0] = s;
  274. chatRights[0] = rights;
  275. }
  276.  
  277. public static void setTab(int id) {
  278. needDrawTabArea = true;
  279. tabID = id;
  280. tabAreaAltered = true;
  281. }
  282. public int tabHPos;
  283. private void processTabClick() {
  284. runHover = super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 95 && super.mouseY < 128;
  285. logHover = super.mouseX >= 765-24 && super.mouseX <= 765 && super.mouseY >= 3 && super.mouseY <= 25;
  286. advisorHover = super.mouseX > 724 && super.mouseX < 743 && super.mouseY > 1 && super.mouseY < 20;
  287.  
  288. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  289. if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 95 && super.mouseY < 128){
  290. runHover = true;
  291. } else {
  292. runHover = false;
  293. }
  294. if (super.mouseX >= 695 && super.mouseX <= 751 && super.mouseY >= 134 && super.mouseY < 165) {
  295. summHover = true;
  296. } else {
  297. summHover = false;
  298. }
  299. if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 52 && super.mouseY < 87){
  300. prayHover = true;
  301. } else {
  302. prayHover = false;
  303. }
  304. if(super.mouseX >= 765-24 && super.mouseX <= 765 && super.mouseY >= 3 && super.mouseY <= 25){
  305. logHover = true;
  306. } else {
  307. logHover = false;
  308. }
  309. }
  310. if(is562 == false){
  311. if(super.clickMode3 == 1) {
  312. if(super.saveClickX >= 524 && super.saveClickX <= 561 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[0] != -1)
  313. {
  314. needDrawTabArea = true;
  315. tabID = 0;
  316. tabAreaAltered = true;
  317. }
  318. if(super.saveClickX >= 562 && super.saveClickX <= 594 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[1] != -1)
  319. {
  320. needDrawTabArea = true;
  321. tabID = 1;
  322. tabAreaAltered = true;
  323. }
  324. if(super.saveClickX >= 595 && super.saveClickX <= 626 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[2] != -1)
  325. {
  326. needDrawTabArea = true;
  327. tabID = 2;
  328. tabAreaAltered = true;
  329. }
  330. if(super.saveClickX >= 627 && super.saveClickX <= 660 && super.saveClickY >= 168 && super.saveClickY < 203 && tabInterfaceIDs[3] != -1)
  331. {
  332. needDrawTabArea = true;
  333. tabID = 3;
  334. tabAreaAltered = true;
  335. }
  336. if(super.saveClickX >= 661 && super.saveClickX <= 693 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[4] != -1)
  337. {
  338. needDrawTabArea = true;
  339. tabID = 4;
  340. tabAreaAltered = true;
  341. }
  342. if(super.saveClickX >= 694 && super.saveClickX <= 725 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[5] != -1)
  343. {
  344. needDrawTabArea = true;
  345. tabID = 5;
  346. tabAreaAltered = true;
  347. }
  348. if(super.saveClickX >= 726 && super.saveClickX <= 765 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[6] != -1)
  349. {
  350. needDrawTabArea = true;
  351. tabID = 6;
  352. tabAreaAltered = true;
  353. }
  354. if(super.saveClickX >= 524 && super.saveClickX <= 561 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[7] != -1)
  355. {
  356. needDrawTabArea = true;
  357. tabID = 7;
  358. tabAreaAltered = true;
  359. }
  360. if(super.saveClickX >= 562 && super.saveClickX <= 594 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[8] != -1)
  361. {
  362. needDrawTabArea = true;
  363. tabID = 8;
  364. tabAreaAltered = true;
  365. }
  366. if(super.saveClickX >= 595 && super.saveClickX <= 627 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[9] != -1)
  367. {
  368. needDrawTabArea = true;
  369. tabID = 9;
  370. tabAreaAltered = true;
  371. }
  372. if(super.saveClickX >= 627 && super.saveClickX <= 664 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[10] != -1)
  373. {
  374. needDrawTabArea = true;
  375. tabID = 10;
  376. tabAreaAltered = true;
  377. }
  378. if(super.saveClickX >= 661 && super.saveClickX <= 694 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[11] != -1)
  379. {
  380. needDrawTabArea = true;
  381. tabID = 11;
  382. tabAreaAltered = true;
  383. }
  384. if(super.saveClickX >= 695 && super.saveClickX <= 725 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[12] != -1)
  385. {
  386. needDrawTabArea = true;
  387. tabID = 12;
  388. tabAreaAltered = true;
  389. }
  390. if(super.saveClickX >= 726 && super.saveClickX <= 765 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[13] != -1)
  391. {
  392. needDrawTabArea = true;
  393. tabID = 13;
  394. tabAreaAltered = true;
  395. }
  396. }
  397. } else {
  398. if(super.mouseX >= 521 && super.mouseX <= 550 && super.mouseY >= 169 && super.mouseY < 205) {
  399. tabHPos = 0;
  400. needDrawTabArea = true;
  401. tabAreaAltered = true;
  402. } else if(super.mouseX >= 552 && super.mouseX <= 581 && super.mouseY >= 168 && super.mouseY < 205) {
  403. tabHPos = 1;
  404. needDrawTabArea = true;
  405. tabAreaAltered = true;
  406. } else if(super.mouseX >= 582 && super.mouseX <= 611 && super.mouseY >= 168 && super.mouseY < 205) {
  407. tabHPos = 2;
  408. needDrawTabArea = true;
  409. tabAreaAltered = true;
  410. } else if(super.mouseX >= 612 && super.mouseX <= 641 && super.mouseY >= 168 && super.mouseY < 203) {
  411. tabHPos = 3;
  412. needDrawTabArea = true;
  413. tabAreaAltered = true;
  414. } else if(super.mouseX >= 642 && super.mouseX <= 671 && super.mouseY >= 168 && super.mouseY < 205) {
  415. tabHPos = 4;
  416. needDrawTabArea = true;
  417. tabAreaAltered = true;
  418. } else if(super.mouseX >= 672 && super.mouseX <= 701 && super.mouseY >= 168 && super.mouseY < 205) {
  419. tabHPos = 5;
  420. needDrawTabArea = true;
  421. tabAreaAltered = true;
  422. } else if(super.mouseX >= 702 && super.mouseX <= 731 && super.mouseY >= 169 && super.mouseY < 205) {
  423. tabHPos = 6;
  424. needDrawTabArea = true;
  425. tabAreaAltered = true;
  426. } else if(super.mouseX >= 732 && super.mouseX <= 761 && super.mouseY >= 169 && super.mouseY < 205) {
  427. tabHPos = 7;
  428. needDrawTabArea = true;
  429. tabAreaAltered = true;
  430. } else if(super.mouseX >= 522 && super.mouseX <= 551 && super.mouseY >= 466 && super.mouseY < 503) {
  431. tabHPos = 15;
  432. needDrawTabArea = true;
  433. tabAreaAltered = true;
  434. } else if(super.mouseX >= 552 && super.mouseX <= 581 && super.mouseY >= 466 && super.mouseY < 503) {
  435. tabHPos = 8;
  436. needDrawTabArea = true;
  437. tabAreaAltered = true;
  438. } else if(super.mouseX >= 582 && super.mouseX <= 611 && super.mouseY >= 466 && super.mouseY < 503) {
  439. tabHPos = 9;
  440. needDrawTabArea = true;
  441. tabAreaAltered = true;
  442. } else if(super.mouseX >= 612 && super.mouseX <= 641 && super.mouseY >= 466 && super.mouseY < 503) {
  443. tabHPos = 10;
  444. needDrawTabArea = true;
  445. tabAreaAltered = true;
  446. } else if(super.mouseX >= 642 && super.mouseX <= 671 && super.mouseY >= 466 && super.mouseY < 503) {
  447. tabHPos = 11;
  448. needDrawTabArea = true;
  449. tabAreaAltered = true;
  450. } else if(super.mouseX >= 672 && super.mouseX <= 701 && super.mouseY >= 466 && super.mouseY < 503) {
  451. tabHPos = 12;
  452. needDrawTabArea = true;
  453. tabAreaAltered = true;
  454. } else if(super.mouseX >= 702 && super.mouseX <= 731 && super.mouseY >= 466 && super.mouseY < 502) {
  455. tabHPos = 13;
  456. needDrawTabArea = true;
  457. tabAreaAltered = true;
  458. } else if(super.mouseX >= 732 && super.mouseX <= 761 && super.mouseY >= 466 && super.mouseY < 502) {
  459. tabHPos = 14;
  460. needDrawTabArea = true;
  461. tabAreaAltered = true;
  462. } else {
  463. tabHPos = -1;
  464. needDrawTabArea = true;
  465. tabAreaAltered = true;
  466. }
  467. if(super.clickMode3 == 1) {
  468. if(super.saveClickX >= 522 && super.saveClickX <= 551 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[0] != -1) {
  469. needDrawTabArea = true;
  470. tabID = 0;
  471. tabAreaAltered = true;
  472. } else if(super.saveClickX >= 552 && super.saveClickX <= 581 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[1] != -1) {
  473. needDrawTabArea = true;
  474. tabID = 1;
  475. tabAreaAltered = true;
  476. } else if(super.saveClickX >= 582 && super.saveClickX <= 611 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[2] != -1) {
  477. needDrawTabArea = true;
  478. tabID = 2;
  479. tabAreaAltered = true;
  480. } else if(super.saveClickX >= 612 && super.saveClickX <= 641 && super.saveClickY >= 168 && super.saveClickY < 203 && tabInterfaceIDs[14] != -1) {
  481. needDrawTabArea = true;
  482. tabID = 14;
  483. tabAreaAltered = true;
  484. } else if(super.saveClickX >= 642 && super.saveClickX <= 671 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[3] != -1) {
  485. needDrawTabArea = true;
  486. tabID = 3;
  487. tabAreaAltered = true;
  488. } else if(super.saveClickX >= 672 && super.saveClickX <= 701 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[4] != -1) {
  489. needDrawTabArea = true;
  490. tabID = 4;
  491. tabAreaAltered = true;
  492. } else if(super.saveClickX >= 702 && super.saveClickX <= 731 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[5] != -1) {
  493. needDrawTabArea = true;
  494. tabID = 5;
  495. tabAreaAltered = true;
  496. } else if(super.saveClickX >= 732 && super.saveClickX <= 761 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[6] != -1) {
  497. needDrawTabArea = true;
  498. tabID = 6;
  499. tabAreaAltered = true;
  500. } else if(super.saveClickX >= 522 && super.saveClickX <= 551 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[16] != -1) {
  501. needDrawTabArea = true;
  502. tabID = 16;
  503. tabAreaAltered = true;
  504. } else if(super.saveClickX >= 552 && super.saveClickX <= 581 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[8] != -1) {
  505. needDrawTabArea = true;
  506. tabID = 8;
  507. tabAreaAltered = true;
  508. } else if(super.saveClickX >= 582 && super.saveClickX <= 611 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[9] != -1) {
  509. needDrawTabArea = true;
  510. tabID = 9;
  511. tabAreaAltered = true;
  512. } else if(super.saveClickX >= 612 && super.saveClickX <= 641 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[7] != -1) {
  513. needDrawTabArea = true;
  514. tabID = 7;
  515. tabAreaAltered = true;
  516. } else if(super.saveClickX >= 642 && super.saveClickX <= 671 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[11] != -1) {
  517. needDrawTabArea = true;
  518. tabID = 11;
  519. tabAreaAltered = true;
  520. } else if(super.saveClickX >= 672 && super.saveClickX <= 701 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[12] != -1) {
  521. needDrawTabArea = true;
  522. tabID = 12;
  523. tabAreaAltered = true;
  524. } else if(super.saveClickX >= 702 && super.saveClickX <= 731 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[13] != -1) {
  525. needDrawTabArea = true;
  526. tabID = 13;
  527. tabAreaAltered = true;
  528. } else if(super.saveClickX >= 732 && super.saveClickX <= 761 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[15] != -1) {
  529. needDrawTabArea = true;
  530. tabID = 15;
  531. tabAreaAltered = true;
  532. }
  533. /* Logout X */
  534. else if(super.saveClickX >= 742 && super.saveClickX <= 764 && super.saveClickY >= 1 && super.saveClickY < 24 && tabInterfaceIDs[10] != -1) {
  535. needDrawTabArea = true;
  536. tabID = 10;
  537. tabAreaAltered = true;
  538. }
  539.  
  540. }
  541. }
  542.  
  543. }
  544.  
  545. private void resetImageProducers2() {
  546. if(chatBackImage != null)
  547. return;
  548. nullLoader();
  549. super.fullGameScreen = null;
  550. aRSImageProducer_1107 = null;
  551. aRSImageProducer_1108 = null;
  552. loginScreenArea = null;
  553. leftSideFlame = null;
  554. rightSideFlame = null;
  555. gameLogo = null;
  556. aRSImageProducer_1113 = null;
  557. aRSImageProducer_1114 = null;
  558. aRSImageProducer_1115 = null;
  559. chatBackImage = new RSImageProducer(516, 165, getGameComponent());//519
  560. mapBackImage = new RSImageProducer(249, 168, getGameComponent());//
  561. DrawingArea.setAllPixelsToZero();
  562. //mapBack.drawBackground(0, 0);
  563. CustomMapback[getSpriteID()].drawSprite(0, 0);
  564. inventoryBackImage = new RSImageProducer(250, 335, getGameComponent());
  565. inGameScreen = new RSImageProducer(512, 334, getGameComponent());
  566. DrawingArea.setAllPixelsToZero();
  567. //aRSImageProducer_1123 = new RSImageProducer(496, 50, getGameComponent());
  568. aRSImageProducer_1124 = new RSImageProducer(269, 37, getGameComponent());
  569. aRSImageProducer_1125 = new RSImageProducer(249, 45, getGameComponent());
  570. welcomeScreenRaised = true;
  571. }
  572.  
  573. public String getDocumentBaseHost() {
  574. if (signlink.mainapp != null) {
  575. return signlink.mainapp.getDocumentBase().getHost().toLowerCase();
  576. }
  577. return null;
  578. }
  579.  
  580. private void method81(Sprite sprite, int j, int k) {
  581. int l = k * k + j * j;
  582. if(l > 4225 && l < 0x15f90) {
  583. int i1 = minimapInt1 + minimapInt2 & 0x7ff;
  584. int j1 = Model.modelIntArray1[i1];
  585. int k1 = Model.modelIntArray2[i1];
  586. j1 = (j1 * 256) / (minimapInt3 + 256);
  587. k1 = (k1 * 256) / (minimapInt3 + 256);
  588. int l1 = j * j1 + k * k1 >> 16;
  589. int i2 = j * k1 - k * j1 >> 16;
  590. double d = Math.atan2(l1, i2);
  591. int j2 = (int)(Math.sin(d) * 63D);
  592. int k2 = (int)(Math.cos(d) * 57D);
  593. mapEdge.method353(83 - k2 - 20, d, (94 + j2 + 4) - 10);
  594. CustomMapback[getSpriteID()].drawSprite(0, 0);
  595. return;
  596. } else {
  597. markMinimap(sprite, k, j, false);
  598. CustomMapback[getSpriteID()].drawSprite(0, 0);
  599. }
  600. }
  601.  
  602. public void processRightClick() {
  603. if (activeInterfaceType != 0) {
  604. return;
  605. }
  606. menuActionName[0] = "Cancel";
  607. menuActionID[0] = 1107;
  608. menuActionRow = 1;
  609. if (fullscreenInterfaceID != -1) {
  610. anInt886 = 0;
  611. anInt1315 = 0;
  612. buildInterfaceMenu(8, RSInterface.interfaceCache[fullscreenInterfaceID], super.mouseX, 8, super.mouseY, 0);
  613. if (anInt886 != anInt1026) {
  614. anInt1026 = anInt886;
  615. }
  616. if (anInt1315 != anInt1129) {
  617. anInt1129 = anInt1315;
  618. }
  619. return;
  620. }
  621. buildSplitPrivateChatMenu();
  622. anInt886 = 0;
  623. anInt1315 = 0;
  624. if (super.mouseX > 0 && super.mouseY > 0 && super.mouseX < 516 && super.mouseY < 338) {
  625. if (openInterfaceID != -1) {
  626. buildInterfaceMenu(4, RSInterface.interfaceCache[openInterfaceID], super.mouseX, 4, super.mouseY, 0);
  627. } else {
  628. build3dScreenMenu();
  629. }
  630. }
  631. if (anInt886 != anInt1026) {
  632. anInt1026 = anInt886;
  633. }
  634. if (anInt1315 != anInt1129) {
  635. anInt1129 = anInt1315;
  636. }
  637. anInt886 = 0;
  638. anInt1315 = 0;
  639. if(super.mouseX > 548 && super.mouseY > 207 && super.mouseX < 740 && super.mouseY < 468) {
  640. if(invOverlayInterfaceID != -1) {
  641. buildInterfaceMenu(548, RSInterface.interfaceCache[invOverlayInterfaceID], super.mouseX, 207, super.mouseY, 0);
  642. } else if(tabInterfaceIDs[tabID] != -1) {
  643. buildInterfaceMenu(548, RSInterface.interfaceCache[tabInterfaceIDs[tabID]], super.mouseX, 207, super.mouseY, 0);
  644. }
  645. }
  646. if (anInt886 != anInt1048) {
  647. needDrawTabArea = true;
  648. tabAreaAltered = true;
  649. anInt1048 = anInt886;
  650. }
  651. if (anInt1315 != anInt1044) {
  652. needDrawTabArea = true;
  653. tabAreaAltered = true;
  654. anInt1044 = anInt1315;
  655. }
  656. anInt886 = 0;
  657. anInt1315 = 0;
  658. if(super.mouseX > 0 && super.mouseY > 338 && super.mouseX < 490 && super.mouseY < 463) {
  659. if(backDialogID != -1) {
  660. buildInterfaceMenu(20, RSInterface.interfaceCache[backDialogID], super.mouseX, 358, super.mouseY, 0);
  661. } else if(super.mouseY < 463 && super.mouseX < 490) {
  662. buildChatAreaMenu(super.mouseY - 338);
  663. }
  664. }
  665. if (backDialogID != -1 && anInt886 != anInt1039) {
  666. inputTaken = true;
  667. anInt1039 = anInt886;
  668. }
  669. if (backDialogID != -1 && anInt1315 != anInt1500) {
  670. inputTaken = true;
  671. anInt1500 = anInt1315;
  672. }
  673. /** Custom menu drawing */
  674. rightClickChatButtons();
  675. alertHandler.processMouse(super.mouseX, super.mouseY); determineTopTabs();
  676. determineBottomTabs();
  677.  
  678. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  679. processMinimapActions();
  680. }
  681.  
  682. boolean flag = false;
  683. while (!flag) {
  684. flag = true;
  685. for (int j = 0; j < menuActionRow - 1; j++) {
  686. if (menuActionID[j] < 1000 && menuActionID[j + 1] > 1000) {
  687. String s = menuActionName[j];
  688. menuActionName[j] = menuActionName[j + 1];
  689. menuActionName[j + 1] = s;
  690. int k = menuActionID[j];
  691. menuActionID[j] = menuActionID[j + 1];
  692. menuActionID[j + 1] = k;
  693. k = menuActionCmd2[j];
  694. menuActionCmd2[j] = menuActionCmd2[j + 1];
  695. menuActionCmd2[j + 1] = k;
  696. k = menuActionCmd3[j];
  697. menuActionCmd3[j] = menuActionCmd3[j + 1];
  698. menuActionCmd3[j + 1] = k;
  699. k = menuActionCmd1[j];
  700. menuActionCmd1[j] = menuActionCmd1[j + 1];
  701. menuActionCmd1[j + 1] = k;
  702. flag = false;
  703. }
  704. }
  705. }
  706. }
  707.  
  708. private int method83(int i, int j, int k)
  709. {
  710. int l = 256 - k;
  711. return ((i & 0xff00ff) * l + (j & 0xff00ff) * k & 0xff00ff00) + ((i & 0xff00) * l + (j & 0xff00) * k & 0xff0000) >> 8;
  712. }
  713.  
  714. private void login(String s, String s1, boolean flag)
  715. {
  716. typingPassword = false;
  717. if (!decentUserAndPass()) {
  718. if (myUsername.length() <= 3)
  719. loginMessage1 = "@red@Your username must contain 4 characters.";
  720. else if (myPassword.length() <= 4)
  721. loginMessage2 = "@red@Your password must contain 5 characters.";
  722. return;
  723. }
  724. signlink.errorname = s;
  725. try
  726. {
  727. if(!flag)
  728. {
  729. loginMessage1 = "";
  730. loginMessage2 = "Connecting to server...";
  731. drawLoginScreen(true);
  732. }
  733. socketStream = new RSSocket(this, openSocket(43594));
  734. long l = TextClass.longForName(s);
  735. int i = (int)(l >> 16 & 31L);
  736. stream.currentOffset = 0;
  737. stream.writeWordBigEndian(14);
  738. stream.writeWordBigEndian(i);
  739. socketStream.queueBytes(2, stream.buffer);
  740. for(int j = 0; j < 8; j++)
  741. socketStream.read();
  742.  
  743. int k = socketStream.read();
  744. int i1 = k;
  745. if(k == 0)
  746. {
  747. socketStream.flushInputStream(inStream.buffer, 8);
  748. inStream.currentOffset = 0;
  749. aLong1215 = inStream.readQWord();
  750. int ai[] = new int[4];
  751. ai[0] = (int)(Math.random() * 99999999D);
  752. ai[1] = (int)(Math.random() * 99999999D);
  753. ai[2] = (int)(aLong1215 >> 32);
  754. ai[3] = (int)aLong1215;
  755. stream.currentOffset = 0;
  756. stream.writeWordBigEndian(10);
  757. stream.writeDWord(ai[0]);
  758. stream.writeDWord(ai[1]);
  759. stream.writeDWord(ai[2]);
  760. stream.writeDWord(ai[3]);
  761. stream.writeDWord(signlink.uid);
  762. stream.writeString(s);
  763. stream.writeString(s1);
  764. stream.doKeys();
  765. aStream_847.currentOffset = 0;
  766. if(flag)
  767. aStream_847.writeWordBigEndian(18);
  768. else
  769. aStream_847.writeWordBigEndian(16);
  770. aStream_847.writeWordBigEndian(stream.currentOffset + 36 + 1 + 1 + 2);
  771. aStream_847.writeWordBigEndian(255);
  772. aStream_847.writeWord(317);
  773. aStream_847.writeWordBigEndian(lowMem ? 1 : 0);
  774. for(int l1 = 0; l1 < 9; l1++)
  775. aStream_847.writeDWord(expectedCRCs[l1]);
  776.  
  777. aStream_847.writeBytes(stream.buffer, stream.currentOffset, 0);
  778. stream.encryption = new ISAACRandomGen(ai);
  779. for(int j2 = 0; j2 < 4; j2++)
  780. ai[j2] += 50;
  781.  
  782. encryption = new ISAACRandomGen(ai);
  783. socketStream.queueBytes(aStream_847.currentOffset, aStream_847.buffer);
  784. k = socketStream.read();
  785. }
  786. if(k == 1)
  787. {
  788. try
  789. {
  790. Thread.sleep(2000L);
  791. }
  792. catch(Exception _ex) { }
  793. login(s, s1, flag);
  794. return;
  795. }
  796. if(k == 2)
  797. {
  798. myPrivilege = socketStream.read();
  799. flagged = socketStream.read() == 1;
  800. aLong1220 = 0L;
  801. anInt1022 = 0;
  802. mouseDetection.coordsIndex = 0;
  803. super.awtFocus = true;
  804. aBoolean954 = true;
  805. loggedIn = true;
  806. stream.currentOffset = 0;
  807. inStream.currentOffset = 0;
  808. pktType = -1;
  809. anInt841 = -1;
  810. anInt842 = -1;
  811. anInt843 = -1;
  812. pktSize = 0;
  813. anInt1009 = 0;
  814. anInt1104 = 0;
  815. anInt1011 = 0;
  816. anInt855 = 0;
  817. menuActionRow = 0;
  818. menuOpen = false;
  819. super.idleTime = 0;
  820. for(int j1 = 0; j1 < 100; j1++)
  821. chatMessages[j1] = null;
  822.  
  823. itemSelected = 0;
  824. spellSelected = 0;
  825. loadingStage = 0;
  826. anInt1062 = 0;
  827. anInt1278 = (int)(Math.random() * 100D) - 50;
  828. anInt1131 = (int)(Math.random() * 110D) - 55;
  829. anInt896 = (int)(Math.random() * 80D) - 40;
  830. minimapInt2 = (int)(Math.random() * 120D) - 60;
  831. minimapInt3 = (int)(Math.random() * 30D) - 20;
  832. minimapInt1 = (int)(Math.random() * 20D) - 10 & 0x7ff;
  833. anInt1021 = 0;
  834. anInt985 = -1;
  835. destX = 0;
  836. destY = 0;
  837. playerCount = 0;
  838. npcCount = 0;
  839. for(int i2 = 0; i2 < maxPlayers; i2++)
  840. {
  841. playerArray[i2] = null;
  842. aStreamArray895s[i2] = null;
  843. }
  844.  
  845. for(int k2 = 0; k2 < 16384; k2++)
  846. npcArray[k2] = null;
  847.  
  848. myPlayer = playerArray[myPlayerIndex] = new Player();
  849. aClass19_1013.removeAll();
  850. aClass19_1056.removeAll();
  851. for(int l2 = 0; l2 < 4; l2++)
  852. {
  853. for(int i3 = 0; i3 < 104; i3++)
  854. {
  855. for(int k3 = 0; k3 < 104; k3++)
  856. groundArray[l2][i3][k3] = null;
  857.  
  858. }
  859.  
  860. }
  861. aClass19_1179 = new NodeList();
  862. fullscreenInterfaceID = -1;
  863. anInt900 = 0;
  864. friendsCount = 0;
  865. dialogID = -1;
  866. backDialogID = -1;
  867. openInterfaceID = -1;
  868. invOverlayInterfaceID = -1;
  869. anInt1018 = -1;
  870. aBoolean1149 = false;
  871. tabID = 3;
  872. inputDialogState = 0;
  873. menuOpen = false;
  874. messagePromptRaised = false;
  875. aString844 = null;
  876. anInt1055 = 0;
  877. anInt1054 = -1;
  878. aBoolean1047 = true;
  879. method45();
  880. welcome();
  881. for(int j3 = 0; j3 < 5; j3++)
  882. anIntArray990[j3] = 0;
  883.  
  884. for(int l3 = 0; l3 < 5; l3++)
  885. {
  886. atPlayerActions[l3] = null;
  887. atPlayerArray[l3] = false;
  888. }
  889.  
  890. anInt1175 = 0;
  891. anInt1134 = 0;
  892. anInt986 = 0;
  893. anInt1288 = 0;
  894. anInt924 = 0;
  895. anInt1188 = 0;
  896. anInt1155 = 0;
  897. anInt1226 = 0;
  898. int anInt941 = 0;
  899. int anInt1260 = 0;
  900. resetImageProducers2();
  901. return;
  902. }
  903. if(k == 3)
  904. {
  905. loginMessage1 = "";
  906. loginMessage2 = "Invalid username or password.";
  907. return;
  908. }
  909. if(k == 4)
  910. {
  911. loginMessage1 = "Your account has been disabled.";
  912. loginMessage2 = "Please check your disabledMessage-center for details.";
  913. return;
  914. }
  915. if(k == 5)
  916. {
  917. loginMessage1 = "Your account is already logged in.";
  918. loginMessage2 = "Try again in 60 secs...";
  919. return;
  920. }
  921. if(k == 6)
  922. {
  923. loginMessage1 = "Primal Project has been updated!";
  924. loginMessage2 = "Please reload this page.";
  925. return;
  926. }
  927. if(k == 7)
  928. {
  929. loginMessage1 = "This world is full.";
  930. loginMessage2 = "Please use a different world.";
  931. return;
  932. }
  933. if(k == 8)
  934. {
  935. loginMessage1 = "Unable to connect.";
  936. loginMessage2 = "Login server offline.";
  937. return;
  938. }
  939. if(k == 9)
  940. {
  941. loginMessage1 = "Login limit exceeded.";
  942. loginMessage2 = "Too many connections from your address.";
  943. return;
  944. }
  945. if(k == 10)
  946. {
  947. loginMessage1 = "Unable to connect.";
  948. loginMessage2 = "Bad session id.";
  949. return;
  950. }
  951. if(k == 11)
  952. {
  953. loginMessage2 = "Login server rejected session.";
  954. loginMessage2 = "Please try again.";
  955. return;
  956. }
  957. if(k == 12)
  958. {
  959. loginMessage1 = "You need a members account to login to this world.";
  960. loginMessage2 = "Please subscribe, or use a different world.";
  961. return;
  962. }
  963. if(k == 13)
  964. {
  965. loginMessage1 = "Could not complete login.";
  966. loginMessage2 = "Please try using a different world.";
  967. return;
  968. }
  969. if(k == 14)
  970. {
  971. loginMessage1 = "The server is being updated.";
  972. loginMessage2 = "Please wait 1 minute and try again.";
  973. return;
  974. }
  975. if(k == 15)
  976. {
  977. loggedIn = true;
  978. stream.currentOffset = 0;
  979. inStream.currentOffset = 0;
  980. pktType = -1;
  981. anInt841 = -1;
  982. anInt842 = -1;
  983. anInt843 = -1;
  984. pktSize = 0;
  985. anInt1009 = 0;
  986. anInt1104 = 0;
  987. menuActionRow = 0;
  988. menuOpen = false;
  989. aLong824 = System.currentTimeMillis();
  990. return;
  991. }
  992. if(k == 16)
  993. {
  994. loginMessage1 = "Login attempts exceeded.";
  995. loginMessage2 = "Please wait 1 minute and try again.";
  996. return;
  997. }
  998. if(k == 17)
  999. {
  1000. loginMessage1 = "You are standing in a members-only area.";
  1001. loginMessage2 = "To play on this world move to a free area first";
  1002. return;
  1003. }
  1004. if(k == 20)
  1005. {
  1006. loginMessage1 = "Invalid loginserver requested";
  1007. loginMessage2 = "Please try using a different world.";
  1008. return;
  1009. }
  1010. if(k == 21)
  1011. {
  1012. for(int k1 = socketStream.read(); k1 >= 0; k1--)
  1013. {
  1014. loginMessage1 = "You have only just left another world";
  1015. loginMessage2 = "Your profile will be transferred in: " + k1 + " seconds";
  1016. drawLoginScreen(true);
  1017. try
  1018. {
  1019. Thread.sleep(1000L);
  1020. }
  1021. catch(Exception _ex) { }
  1022. }
  1023.  
  1024. login(s, s1, flag);
  1025. return;
  1026. }
  1027. if(k == -1)
  1028. {
  1029. if(i1 == 0)
  1030. {
  1031. if(loginFailures < 2)
  1032. {
  1033. try
  1034. {
  1035. Thread.sleep(2000L);
  1036. }
  1037. catch(Exception _ex) { }
  1038. loginFailures++;
  1039. login(s, s1, flag);
  1040. return;
  1041. } else
  1042. {
  1043. loginMessage1 = "An Update Is Avaible, A window should pop up and click Download, If";
  1044. loginMessage2 = "not then Please Go to www.PrimalProject.co.uk to Download.";
  1045. launchURL("http://www.primalproject.co.uk/PrimalProject.jar");
  1046. return;
  1047. }
  1048. } else
  1049. {
  1050. loginMessage1 = "No response from server";
  1051. loginMessage2 = "Please try using a different world.";
  1052. return;
  1053. }
  1054. } else
  1055. {
  1056. System.out.println("response:" + k);
  1057. loginMessage1 = "Unexpected server response";
  1058. loginMessage2 = "Please try using a different world.";
  1059. return;
  1060. }
  1061. }
  1062. catch(IOException _ex)
  1063. {
  1064. loginMessage1 = "";
  1065. }
  1066. loginMessage2 = "Error connecting to server.";
  1067. }
  1068.  
  1069. private boolean decentUserAndPass() {
  1070. return (myUsername.length() > 3 && myPassword.length() > 4) ? true : false;
  1071. }
  1072.  
  1073. private boolean typingPassword = false;
  1074.  
  1075. 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) {
  1076. byte byte0 = 104;
  1077. byte byte1 = 104;
  1078. for(int l2 = 0; l2 < byte0; l2++) {
  1079. for(int i3 = 0; i3 < byte1; i3++) {
  1080. anIntArrayArray901[l2][i3] = 0;
  1081. anIntArrayArray825[l2][i3] = 0x5f5e0ff;
  1082. }
  1083. }
  1084. int j3 = j2;
  1085. int k3 = j1;
  1086. anIntArrayArray901[j2][j1] = 99;
  1087. anIntArrayArray825[j2][j1] = 0;
  1088. int l3 = 0;
  1089. int i4 = 0;
  1090. bigX[l3] = j2;
  1091. bigY[l3++] = j1;
  1092. boolean flag1 = false;
  1093. int j4 = bigX.length;
  1094. int ai[][] = aClass11Array1230[plane].anIntArrayArray294;
  1095. while(i4 != l3)
  1096. {
  1097. j3 = bigX[i4];
  1098. k3 = bigY[i4];
  1099. i4 = (i4 + 1) % j4;
  1100. if(j3 == k2 && k3 == i2)
  1101. {
  1102. flag1 = true;
  1103. break;
  1104. }
  1105. if(i1 != 0)
  1106. {
  1107. if((i1 < 5 || i1 == 10) && aClass11Array1230[plane].method219(k2, j3, k3, j, i1 - 1, i2))
  1108. {
  1109. flag1 = true;
  1110. break;
  1111. }
  1112. if(i1 < 10 && aClass11Array1230[plane].method220(k2, i2, k3, i1 - 1, j, j3))
  1113. {
  1114. flag1 = true;
  1115. break;
  1116. }
  1117. }
  1118. if(k1 != 0 && k != 0 && aClass11Array1230[plane].method221(i2, k2, j3, k, l1, k1, k3))
  1119. {
  1120. flag1 = true;
  1121. break;
  1122. }
  1123. int l4 = anIntArrayArray825[j3][k3] + 1;
  1124. if(j3 > 0 && anIntArrayArray901[j3 - 1][k3] == 0 && (ai[j3 - 1][k3] & 0x1280108) == 0)
  1125. {
  1126. bigX[l3] = j3 - 1;
  1127. bigY[l3] = k3;
  1128. l3 = (l3 + 1) % j4;
  1129. anIntArrayArray901[j3 - 1][k3] = 2;
  1130. anIntArrayArray825[j3 - 1][k3] = l4;
  1131. }
  1132. if(j3 < byte0 - 1 && anIntArrayArray901[j3 + 1][k3] == 0 && (ai[j3 + 1][k3] & 0x1280180) == 0)
  1133. {
  1134. bigX[l3] = j3 + 1;
  1135. bigY[l3] = k3;
  1136. l3 = (l3 + 1) % j4;
  1137. anIntArrayArray901[j3 + 1][k3] = 8;
  1138. anIntArrayArray825[j3 + 1][k3] = l4;
  1139. }
  1140. if(k3 > 0 && anIntArrayArray901[j3][k3 - 1] == 0 && (ai[j3][k3 - 1] & 0x1280102) == 0)
  1141. {
  1142. bigX[l3] = j3;
  1143. bigY[l3] = k3 - 1;
  1144. l3 = (l3 + 1) % j4;
  1145. anIntArrayArray901[j3][k3 - 1] = 1;
  1146. anIntArrayArray825[j3][k3 - 1] = l4;
  1147. }
  1148. if(k3 < byte1 - 1 && anIntArrayArray901[j3][k3 + 1] == 0 && (ai[j3][k3 + 1] & 0x1280120) == 0)
  1149. {
  1150. bigX[l3] = j3;
  1151. bigY[l3] = k3 + 1;
  1152. l3 = (l3 + 1) % j4;
  1153. anIntArrayArray901[j3][k3 + 1] = 4;
  1154. anIntArrayArray825[j3][k3 + 1] = l4;
  1155. }
  1156. 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)
  1157. {
  1158. bigX[l3] = j3 - 1;
  1159. bigY[l3] = k3 - 1;
  1160. l3 = (l3 + 1) % j4;
  1161. anIntArrayArray901[j3 - 1][k3 - 1] = 3;
  1162. anIntArrayArray825[j3 - 1][k3 - 1] = l4;
  1163. }
  1164. 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)
  1165. {
  1166. bigX[l3] = j3 + 1;
  1167. bigY[l3] = k3 - 1;
  1168. l3 = (l3 + 1) % j4;
  1169. anIntArrayArray901[j3 + 1][k3 - 1] = 9;
  1170. anIntArrayArray825[j3 + 1][k3 - 1] = l4;
  1171. }
  1172. 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)
  1173. {
  1174. bigX[l3] = j3 - 1;
  1175. bigY[l3] = k3 + 1;
  1176. l3 = (l3 + 1) % j4;
  1177. anIntArrayArray901[j3 - 1][k3 + 1] = 6;
  1178. anIntArrayArray825[j3 - 1][k3 + 1] = l4;
  1179. }
  1180. 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)
  1181. {
  1182. bigX[l3] = j3 + 1;
  1183. bigY[l3] = k3 + 1;
  1184. l3 = (l3 + 1) % j4;
  1185. anIntArrayArray901[j3 + 1][k3 + 1] = 12;
  1186. anIntArrayArray825[j3 + 1][k3 + 1] = l4;
  1187. }
  1188. }
  1189. anInt1264 = 0;
  1190. if(!flag1)
  1191. {
  1192. if(flag)
  1193. {
  1194. int i5 = 100;
  1195. for(int k5 = 1; k5 < 2; k5++)
  1196. {
  1197. for(int i6 = k2 - k5; i6 <= k2 + k5; i6++)
  1198. {
  1199. for(int l6 = i2 - k5; l6 <= i2 + k5; l6++)
  1200. if(i6 >= 0 && l6 >= 0 && i6 < 104 && l6 < 104 && anIntArrayArray825[i6][l6] < i5)
  1201. {
  1202. i5 = anIntArrayArray825[i6][l6];
  1203. j3 = i6;
  1204. k3 = l6;
  1205. anInt1264 = 1;
  1206. flag1 = true;
  1207. }
  1208.  
  1209. }
  1210.  
  1211. if(flag1)
  1212. break;
  1213. }
  1214.  
  1215. }
  1216. if(!flag1)
  1217. return false;
  1218. }
  1219. i4 = 0;
  1220. bigX[i4] = j3;
  1221. bigY[i4++] = k3;
  1222. int l5;
  1223. for(int j5 = l5 = anIntArrayArray901[j3][k3]; j3 != j2 || k3 != j1; j5 = anIntArrayArray901[j3][k3])
  1224. {
  1225. if(j5 != l5)
  1226. {
  1227. l5 = j5;
  1228. bigX[i4] = j3;
  1229. bigY[i4++] = k3;
  1230. }
  1231. if((j5 & 2) != 0)
  1232. j3++;
  1233. else
  1234. if((j5 & 8) != 0)
  1235. j3--;
  1236. if((j5 & 1) != 0)
  1237. k3++;
  1238. else
  1239. if((j5 & 4) != 0)
  1240. k3--;
  1241. }
  1242. // if(cancelWalk) { return i4 > 0; }
  1243.  
  1244.  
  1245. if(i4 > 0)
  1246. {
  1247. int k4 = i4;
  1248. if(k4 > 25)
  1249. k4 = 25;
  1250. i4--;
  1251. int k6 = bigX[i4];
  1252. int i7 = bigY[i4];
  1253. anInt1288 += k4;
  1254. if(anInt1288 >= 92)
  1255. {
  1256. stream.createFrame(36);
  1257. stream.writeDWord(0);
  1258. anInt1288 = 0;
  1259. }
  1260. if(i == 0)
  1261. {
  1262. stream.createFrame(164);
  1263. stream.writeWordBigEndian(k4 + k4 + 3);
  1264. }
  1265. if(i == 1)
  1266. {
  1267. stream.createFrame(248);
  1268. stream.writeWordBigEndian(k4 + k4 + 3 + 14);
  1269. }
  1270. if(i == 2)
  1271. {
  1272. stream.createFrame(98);
  1273. stream.writeWordBigEndian(k4 + k4 + 3);
  1274. }
  1275. stream.method433(k6 + baseX);
  1276. destX = bigX[0];
  1277. destY = bigY[0];
  1278. for(int j7 = 1; j7 < k4; j7++)
  1279. {
  1280. i4--;
  1281. stream.writeWordBigEndian(bigX[i4] - k6);
  1282. stream.writeWordBigEndian(bigY[i4] - i7);
  1283. }
  1284.  
  1285. stream.method431(i7 + baseY);
  1286. stream.method424(super.keyArray[5] != 1 ? 0 : 1);
  1287. return true;
  1288. }
  1289. return i != 1;
  1290. }
  1291.  
  1292. private void method86(Stream stream)
  1293. {
  1294. for(int j = 0; j < anInt893; j++)
  1295. {
  1296. int k = anIntArray894[j];
  1297. NPC npc = npcArray[k];
  1298. int l = stream.readUnsignedByte();
  1299. if((l & 0x10) != 0)
  1300. {
  1301. int i1 = stream.method434();
  1302. if(i1 == 65535)
  1303. i1 = -1;
  1304. int i2 = stream.readUnsignedByte();
  1305. if(i1 == npc.anim && i1 != -1)
  1306. {
  1307. int l2 = Animation.anims[i1].anInt365;
  1308. if(l2 == 1)
  1309. {
  1310. npc.anInt1527 = 0;
  1311. npc.anInt1528 = 0;
  1312. npc.anInt1529 = i2;
  1313. npc.anInt1530 = 0;
  1314. }
  1315. if(l2 == 2)
  1316. npc.anInt1530 = 0;
  1317. } else
  1318. if(i1 == -1 || npc.anim == -1 || Animation.anims[i1].anInt359 >= Animation.anims[npc.anim].anInt359)
  1319. {
  1320. npc.anim = i1;
  1321. npc.anInt1527 = 0;
  1322. npc.anInt1528 = 0;
  1323. npc.anInt1529 = i2;
  1324. npc.anInt1530 = 0;
  1325. npc.anInt1542 = npc.smallXYIndex;
  1326. }
  1327. }
  1328. if ((l & 8) != 0) {
  1329. int j1 = stream.method426();
  1330. int j2 = stream.method427();
  1331. int type1 = stream.readUnsignedByte();
  1332. npc.updateHitData(j2, j1, type1, loopCycle);
  1333. npc.loopCycleStatus = loopCycle + 300;
  1334. npc.currentHealth = stream.method426();
  1335. npc.maxHealth = stream.readUnsignedByte();
  1336. }
  1337. if((l & 0x80) != 0)
  1338. {
  1339. npc.anInt1520 = stream.readUnsignedWord();
  1340. int k1 = stream.readDWord();
  1341. npc.anInt1524 = k1 >> 16;
  1342. npc.anInt1523 = loopCycle + (k1 & 0xffff);
  1343. npc.anInt1521 = 0;
  1344. npc.anInt1522 = 0;
  1345. if(npc.anInt1523 > loopCycle)
  1346. npc.anInt1521 = -1;
  1347. if(npc.anInt1520 == 65535)
  1348. npc.anInt1520 = -1;
  1349. }
  1350. if((l & 0x20) != 0)
  1351. {
  1352. npc.interactingEntity = stream.readUnsignedWord();
  1353. if(npc.interactingEntity == 65535)
  1354. npc.interactingEntity = -1;
  1355. }
  1356. if((l & 1) != 0)
  1357. {
  1358. npc.textSpoken = stream.readString();
  1359. npc.textCycle = 100;
  1360. // entityMessage(npc);
  1361.  
  1362. }
  1363. if ((l & 0x40) != 0) {
  1364. int l1 = stream.method427();
  1365. int k2 = stream.method428();
  1366. int type2 = stream.readUnsignedByte();
  1367. npc.updateHitData(k2, l1, type2, loopCycle);
  1368. npc.loopCycleStatus = loopCycle + 300;
  1369. npc.currentHealth = stream.method428();
  1370. npc.maxHealth = stream.method427();
  1371. }
  1372. if((l & 2) != 0)
  1373. {
  1374. npc.desc = EntityDef.forID(stream.method436());
  1375. npc.anInt1540 = npc.desc.aByte68;
  1376. npc.anInt1504 = npc.desc.anInt79;
  1377. npc.anInt1554 = npc.desc.anInt67;
  1378. npc.anInt1555 = npc.desc.anInt58;
  1379. npc.anInt1556 = npc.desc.anInt83;
  1380. npc.anInt1557 = npc.desc.anInt55;
  1381. npc.anInt1511 = npc.desc.anInt77;
  1382. }
  1383. if((l & 4) != 0)
  1384. {
  1385. npc.anInt1538 = stream.method434();
  1386. npc.anInt1539 = stream.method434();
  1387. }
  1388. }
  1389. }
  1390.  
  1391. private void buildAtNPCMenu(EntityDef entityDef, int i, int j, int k)
  1392. {
  1393. if(menuActionRow >= 400)
  1394. return;
  1395. if(entityDef.childrenIDs != null)
  1396. entityDef = entityDef.method161();
  1397. if(entityDef == null)
  1398. return;
  1399. if(!entityDef.aBoolean84)
  1400. return;
  1401. String s = entityDef.name;
  1402. if(entityDef.combatLevel != 0)
  1403. s = s + combatDiffColor(myPlayer.combatLevel, entityDef.combatLevel) + " (level-" + entityDef.combatLevel + ")";
  1404. if(itemSelected == 1)
  1405. {
  1406. menuActionName[menuActionRow] = "Use " + selectedItemName + " with @yel@" + s;
  1407. menuActionID[menuActionRow] = 582;
  1408. menuActionCmd1[menuActionRow] = i;
  1409. menuActionCmd2[menuActionRow] = k;
  1410. menuActionCmd3[menuActionRow] = j;
  1411. menuActionRow++;
  1412. return;
  1413. }
  1414. if(spellSelected == 1)
  1415. {
  1416. if((spellUsableOn & 2) == 2)
  1417. {
  1418. menuActionName[menuActionRow] = spellTooltip + " @yel@" + s;
  1419. menuActionID[menuActionRow] = 413;
  1420. menuActionCmd1[menuActionRow] = i;
  1421. menuActionCmd2[menuActionRow] = k;
  1422. menuActionCmd3[menuActionRow] = j;
  1423. menuActionRow++;
  1424. }
  1425. } else
  1426. {
  1427. if(entityDef.itemActions != null)
  1428. {
  1429. for(int l = 4; l >= 0; l--)
  1430. if(entityDef.itemActions[l] != null && !entityDef.itemActions[l].equalsIgnoreCase("attack"))
  1431. {
  1432. menuActionName[menuActionRow] = entityDef.itemActions[l] + " @yel@" + s;
  1433. if(l == 0)
  1434. menuActionID[menuActionRow] = 20;
  1435. if(l == 1)
  1436. menuActionID[menuActionRow] = 412;
  1437. if(l == 2)
  1438. menuActionID[menuActionRow] = 225;
  1439. if(l == 3)
  1440. menuActionID[menuActionRow] = 965;
  1441. if(l == 4)
  1442. menuActionID[menuActionRow] = 478;
  1443. menuActionCmd1[menuActionRow] = i;
  1444. menuActionCmd2[menuActionRow] = k;
  1445. menuActionCmd3[menuActionRow] = j;
  1446. menuActionRow++;
  1447. }
  1448.  
  1449. }
  1450. if(entityDef.itemActions != null)
  1451. {
  1452. for(int i1 = 4; i1 >= 0; i1--)
  1453. if(entityDef.itemActions[i1] != null && entityDef.itemActions[i1].equalsIgnoreCase("attack"))
  1454. {
  1455. char c = '\0';
  1456. if(entityDef.combatLevel > myPlayer.combatLevel)
  1457. c = '\u07D0';
  1458. menuActionName[menuActionRow] = entityDef.itemActions[i1] + " @yel@" + s;
  1459. if(i1 == 0)
  1460. menuActionID[menuActionRow] = 20 + c;
  1461. if(i1 == 1)
  1462. menuActionID[menuActionRow] = 412 + c;
  1463. if(i1 == 2)
  1464. menuActionID[menuActionRow] = 225 + c;
  1465. if(i1 == 3)
  1466. menuActionID[menuActionRow] = 965 + c;
  1467. if(i1 == 4)
  1468. menuActionID[menuActionRow] = 478 + c;
  1469. menuActionCmd1[menuActionRow] = i;
  1470. menuActionCmd2[menuActionRow] = k;
  1471. menuActionCmd3[menuActionRow] = j;
  1472. menuActionRow++;
  1473. }
  1474.  
  1475. }
  1476. if(idToggle == true) {
  1477. menuActionName[menuActionRow] = "Examine @yel@" + s + " @gre@(@whi@" + entityDef.interfaceType + "@gre@)";
  1478. } else {
  1479. menuActionName[menuActionRow] = "Examine @yel@" + s;
  1480. }
  1481. menuActionID[menuActionRow] = 1025;
  1482. menuActionCmd1[menuActionRow] = i;
  1483. menuActionCmd2[menuActionRow] = k;
  1484. menuActionCmd3[menuActionRow] = j;
  1485. menuActionRow++;
  1486. }
  1487. }
  1488.  
  1489. private void buildAtPlayerMenu(int i, int j, Player player, int k)
  1490. {
  1491. if(player == myPlayer)
  1492. return;
  1493. if(menuActionRow >= 400)
  1494. return;
  1495. String s;
  1496. if (player.skill == 0) {
  1497. s = player.name
  1498. + combatDiffColor(myPlayer.combatLevel, player.combatLevel)
  1499. + " (level-" + player.combatLevel + ")";
  1500. } else {
  1501. s = "@or2@" + getRank(player.skill) + "@whi@ " + player.name
  1502. + combatDiffColor(myPlayer.combatLevel, player.combatLevel)
  1503. + " (level-" + player.combatLevel + ")";
  1504. }
  1505. if(itemSelected == 1)
  1506. {
  1507. menuActionName[menuActionRow] = "Use " + selectedItemName + " -> @whi@" + s;
  1508. menuActionID[menuActionRow] = 491;
  1509. menuActionCmd1[menuActionRow] = j;
  1510. menuActionCmd2[menuActionRow] = i;
  1511. menuActionCmd3[menuActionRow] = k;
  1512. menuActionRow++;
  1513. } else
  1514. if(spellSelected == 1)
  1515. {
  1516. if((spellUsableOn & 8) == 8)
  1517. {
  1518. menuActionName[menuActionRow] = spellTooltip + " @whi@" + s;
  1519. menuActionID[menuActionRow] = 365;
  1520. menuActionCmd1[menuActionRow] = j;
  1521. menuActionCmd2[menuActionRow] = i;
  1522. menuActionCmd3[menuActionRow] = k;
  1523. menuActionRow++;
  1524. }
  1525. } else
  1526. {
  1527. for(int l = 4; l >= 0; l--)
  1528. if(atPlayerActions[l] != null)
  1529. {
  1530. menuActionName[menuActionRow] = atPlayerActions[l] + " @whi@" + s;
  1531. char c = '\0';
  1532. if(atPlayerActions[l].equalsIgnoreCase("attack"))
  1533. {
  1534. if(player.combatLevel > myPlayer.combatLevel)
  1535. c = '\u07D0';
  1536. if(myPlayer.team != 0 && player.team != 0)
  1537. if(myPlayer.team == player.team)
  1538. c = '\u07D0';
  1539. else
  1540. c = '\0';
  1541. } else
  1542. if(atPlayerArray[l])
  1543. c = '\u07D0';
  1544. if(l == 0)
  1545. menuActionID[menuActionRow] = 561 + c;
  1546. if(l == 1)
  1547. menuActionID[menuActionRow] = 779 + c;
  1548. if(l == 2)
  1549. menuActionID[menuActionRow] = 27 + c;
  1550. if(l == 3)
  1551. menuActionID[menuActionRow] = 577 + c;
  1552. if(l == 4)
  1553. menuActionID[menuActionRow] = 729 + c;
  1554. menuActionCmd1[menuActionRow] = j;
  1555. menuActionCmd2[menuActionRow] = i;
  1556. menuActionCmd3[menuActionRow] = k;
  1557. menuActionRow++;
  1558. }
  1559.  
  1560. }
  1561. for(int i1 = 0; i1 < menuActionRow; i1++)
  1562. if(menuActionID[i1] == 516)
  1563. {
  1564. menuActionName[i1] = "Walk here @whi@" + s;
  1565. return;
  1566. }
  1567.  
  1568. }
  1569.  
  1570. private void method89(Class30_Sub1 class30_sub1)
  1571. {
  1572. int i = 0;
  1573. int j = -1;
  1574. int k = 0;
  1575. int l = 0;
  1576. if(class30_sub1.anInt1296 == 0)
  1577. i = worldController.method300(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
  1578. if(class30_sub1.anInt1296 == 1)
  1579. i = worldController.method301(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
  1580. if(class30_sub1.anInt1296 == 2)
  1581. i = worldController.method302(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
  1582. if(class30_sub1.anInt1296 == 3)
  1583. i = worldController.method303(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298);
  1584. if(i != 0)
  1585. {
  1586. int i1 = worldController.method304(class30_sub1.anInt1295, class30_sub1.anInt1297, class30_sub1.anInt1298, i);
  1587. j = i >> 14 & 0x7fff;
  1588. k = i1 & 0x1f;
  1589. l = i1 >> 6;
  1590. }
  1591. class30_sub1.anInt1299 = j;
  1592. class30_sub1.anInt1301 = k;
  1593. class30_sub1.anInt1300 = l;
  1594. }
  1595.  
  1596. private void method90()
  1597. {
  1598. for(int i = 0; i < anInt1062; i++)
  1599. if(anIntArray1250[i] <= 0)
  1600. {
  1601. boolean flag1 = false;
  1602. try
  1603. {
  1604. if(anIntArray1207[i] == anInt874 && anIntArray1241[i] == anInt1289)
  1605. {
  1606. if(!replayWave())
  1607. flag1 = true;
  1608. } else
  1609. {
  1610. Stream stream = Sounds.method241(anIntArray1241[i], anIntArray1207[i]);
  1611. if(System.currentTimeMillis() + (long)(stream.currentOffset / 22) > aLong1172 + (long)(anInt1257 / 22))
  1612. {
  1613. anInt1257 = stream.currentOffset;
  1614. aLong1172 = System.currentTimeMillis();
  1615. if(saveWave(stream.buffer, stream.currentOffset))
  1616. {
  1617. anInt874 = anIntArray1207[i];
  1618. anInt1289 = anIntArray1241[i];
  1619. } else
  1620. {
  1621. flag1 = true;
  1622. }
  1623. }
  1624. }
  1625. }
  1626. catch(Exception exception) { }
  1627. if(!flag1 || anIntArray1250[i] == -5)
  1628. {
  1629. anInt1062--;
  1630. for(int j = i; j < anInt1062; j++)
  1631. {
  1632. anIntArray1207[j] = anIntArray1207[j + 1];
  1633. anIntArray1241[j] = anIntArray1241[j + 1];
  1634. anIntArray1250[j] = anIntArray1250[j + 1];
  1635. }
  1636.  
  1637. i--;
  1638. } else
  1639. {
  1640. anIntArray1250[i] = -5;
  1641. }
  1642. } else
  1643. {
  1644. anIntArray1250[i]--;
  1645. }
  1646.  
  1647. if(prevSong > 0)
  1648. {
  1649. prevSong -= 20;
  1650. if(prevSong < 0)
  1651. prevSong = 0;
  1652. if(prevSong == 0 && musicEnabled && !lowMem)
  1653. {
  1654. nextSong = currentSong;
  1655. songChanging = true;
  1656. onDemandFetcher.method558(2, nextSong);
  1657. }
  1658. }
  1659. }
  1660.  
  1661. /* public static void compress(int ID) {
  1662. try {
  1663. String inF = "C:/DSPK/gzip/"+ ID +".dat";
  1664. String outF = "C:/DSPK/gzip/"+ ID;
  1665. File inF2 = new File(inF);
  1666. File outF2 = new File(outF);
  1667. System.out.println("GZipping: " + inF2 + " file");
  1668. FileOutputStream FOS = new FileOutputStream(outF2 + ".gz");
  1669. GZIPOutputStream GZOS = new GZIPOutputStream(FOS);
  1670. FileInputStream FIN = new FileInputStream(inF2);
  1671. BufferedInputStream IN = new BufferedInputStream(FIN);
  1672. byte[] buffer = new byte[1024];
  1673. int i;
  1674. while ((i = IN.read(buffer)) >= 0) {
  1675. GZOS.write(buffer, 0, i);
  1676. }
  1677. System.out.println("File has been GZipped succesfully");
  1678. IN.close();
  1679. GZOS.close();
  1680. }
  1681. catch(IOException e) {
  1682. System.out.println("Error: " + e);
  1683. }
  1684. compress(ID + 1);
  1685. }
  1686. void main() {
  1687. compress(29);
  1688. }*/
  1689.  
  1690.  
  1691. void startUp()
  1692. {
  1693. drawLoadingText(40, "Starting up");
  1694. if(signlink.sunjava)
  1695. super.minDelay = 5;
  1696. aBoolean993 = true;
  1697. boolean flag = true;
  1698. String s = getDocumentBaseHost();
  1699. if(signlink.cache_dat != null) {
  1700. for(int i = 0; i < 5; i++)
  1701. decompressors[i] = new Decompressor(signlink.cache_dat, signlink.cache_idx[i], i + 1);
  1702. }
  1703. try {
  1704. titleStreamLoader = streamLoaderForName(1, "title screen", "title", expectedCRCs[1], 25);
  1705. smallText = new RSFont(false, "p11_full", titleStreamLoader);
  1706. aTextDrawingArea_1271 = new RSFont(false, "p12_full", titleStreamLoader);
  1707. chatTextDrawingArea = new RSFont(false, "b12_full", titleStreamLoader);
  1708. RSFont aTextDrawingArea_1273 = new RSFont(true, "q8_full", titleStreamLoader);
  1709.  
  1710. newSmallFont = new TextDrawingArea(false, "p11_full", titleStreamLoader);
  1711. newRegularFont = new TextDrawingArea(false, "p12_full", titleStreamLoader);
  1712. newBoldFont = new TextDrawingArea(false, "b12_full", titleStreamLoader);
  1713. newFancyFont = new TextDrawingArea(true, "q8_full", titleStreamLoader);
  1714. //UserInterface.fonts = newFonts;
  1715. newSmallFont.unpackChatImages(chatImages);
  1716. newRegularFont.unpackChatImages(chatImages);
  1717. newBoldFont.unpackChatImages(chatImages);
  1718. newFancyFont.unpackChatImages(chatImages);
  1719.  
  1720. drawLogo();
  1721. loadTitleScreen();
  1722. NamedArchive archive = streamLoaderForName(2, "config", "config", expectedCRCs[2], 30);
  1723. NamedArchive streamLoader_1 = streamLoaderForName(3, "interface", "interface", expectedCRCs[3], 35);
  1724. NamedArchive mediaArchive = streamLoaderForName(4, "2d graphics", "media", expectedCRCs[4], 40);
  1725. NamedArchive streamLoader_3 = streamLoaderForName(6, "textures", "textures", expectedCRCs[6], 45);
  1726. NamedArchive streamLoader_4 = streamLoaderForName(7, "chat system", "wordenc", expectedCRCs[7], 50);
  1727. NamedArchive streamLoader_5 = streamLoaderForName(8, "sound effects", "sounds", expectedCRCs[8], 55);
  1728. byteGroundArray = new byte[4][104][104];
  1729. intGroundArray = new int[4][105][105];
  1730. worldController = new WorldController(intGroundArray);
  1731. for(int j = 0; j < 4; j++)
  1732. aClass11Array1230[j] = new Class11();
  1733. aSprite_1263 = new Sprite(512, 512);
  1734. NamedArchive streamLoader_6 = streamLoaderForName(5, "update list", "versionlist", expectedCRCs[5], 60);
  1735. drawLoadingText(60, "Unpacking Media");
  1736. onDemandFetcher = new OnDemandFetcher();
  1737. onDemandFetcher.start(streamLoader_6, this);
  1738. Class36.method528(onDemandFetcher.getAnimCount());
  1739. Model.method459(onDemandFetcher.getModelCount(), onDemandFetcher);
  1740. /* All 525 Models */
  1741. ModelDecompressor.hdgfx();
  1742. System.out.println("Loaded 525 graphics...");
  1743. /* 525 End */
  1744. ModelDecompressor.models();
  1745. System.out.println("Loaded Compressed Models..");
  1746. drawLoadingText(70, "Loading Models..");
  1747. ModelDecompressor.loadModelDataFile();
  1748. drawLoadingText(80, "Unpacking Models..");
  1749. preloadModels();
  1750. DataBase.loadAnimations();
  1751.  
  1752. /* Custom sprite unpacking */
  1753. SUM[15] = new Sprite("SUM 15");
  1754. SUM[16] = new Sprite("SUM 16");
  1755. SUM[17] = new Sprite("SUM 17");
  1756. Increase = new Sprite("Interfaces/Zoom/INCREASE");
  1757. Decrease = new Sprite("Interfaces/Zoom/DECREASE");
  1758. loadExtraSprites();
  1759. loadingPleaseWait = new Sprite("loadingPleaseWait");
  1760. reestablish = new Sprite("reestablish");
  1761. hitMarks[20] = new Sprite("hitMark");
  1762. hitMarks[21] = new Sprite("hitMark2");
  1763. hitMarks[22] = new Sprite("hitMark3");
  1764. hitMarks[23] = new Sprite("hitMark4");
  1765. compass = new Sprite(mediaArchive, "compass", 0);
  1766. mapArea = new Sprite("maparea");
  1767. multiOverlay = new Sprite(mediaArchive, "overlay_multiway", 0);
  1768. HPBarFull = new Sprite(sign.signlink.findcachedir() + "Sprites/Player/HP 0.PNG", 1);
  1769. HPBarEmpty = new Sprite(sign.signlink.findcachedir() + "Sprites/Player/HP 1.PNG", 1);
  1770. /**/
  1771.  
  1772. mapBack = new Background(mediaArchive, "mapback", 0);
  1773. for(int i = 0; i <= 3; i++) {
  1774. combatIcons[i] = new Sprite("Player/combatIcon "+i+"");
  1775. }
  1776.  
  1777. for(int c1 = 0; c1 <= 3; c1++)
  1778. chatButtons[c1] = new Sprite(mediaArchive, "chatbuttons", c1);
  1779.  
  1780. for(int j3 = 0; j3 <= 13; j3++)
  1781. sideIcons[j3] = new Sprite(mediaArchive, "sideicons", j3);
  1782.  
  1783. for(int j3 = 0; j3 <= 13; j3++)
  1784. sIcons483[j3] = new Sprite("Gameframe/SIcons/483/"+j3+"");
  1785.  
  1786. for(int j3 = 0; j3 <= 12; j3++)
  1787. sIcons459[j3] = new Sprite("Gameframe/SIcons/459/SIDEICONS "+j3+"");
  1788.  
  1789. for(int nSI = 0; nSI <= 15; nSI++)
  1790. newSideIcons[nSI] = new Sprite("Gameframe/SIcons/562/icon "+nSI);
  1791.  
  1792. tabHover = new Sprite("Gameframe/SIcons/562/tabhover");
  1793. tabClicked = new Sprite("Gameframe/SIcons/562/tabclicked1");
  1794.  
  1795. for(int i = 0; i <= 3; i++) {
  1796. combatIcons[i] = new Sprite("Player/combatIcon "+i+"");
  1797. }
  1798.  
  1799. for(int r1 = 0; r1 < 15; r1++)
  1800. redStones[r1] = new Sprite("redstones " + r1);
  1801. mapEdge = new Sprite(mediaArchive, "mapedge", 0);
  1802. mapEdge.method345();
  1803. try
  1804. {
  1805. for(int k3 = 0; k3 < 100; k3++)
  1806. mapScenes[k3] = new Background(mediaArchive, "mapscene", k3);
  1807. }
  1808. catch(Exception _ex) { }
  1809. try
  1810. {
  1811. for(int l3 = 0; l3 < 100; l3++)
  1812. mapFunctions[l3] = new Sprite(mediaArchive, "mapfunction", l3);
  1813. }
  1814. catch(Exception _ex) { }
  1815. try
  1816. {
  1817. for(int i4 = 0; i4 < 20; i4++)
  1818. hitMarks[i4] = new Sprite(mediaArchive, "hitmarks", i4);
  1819. }
  1820. catch(Exception _ex) { }
  1821. try
  1822. {
  1823. for(int h1 = 0; h1 < 6; h1++)
  1824. headIconsHint[h1] = new Sprite(mediaArchive, "headicons_hint", h1);
  1825. } catch(Exception _ex) { }
  1826. try {
  1827. for(int j4 = 0; j4 < 8; j4++)
  1828. headIcons[j4] = new Sprite(mediaArchive, "headicons_prayer", j4);
  1829. for(int idx = 0; idx < 18; idx++)
  1830. headIcons[idx] = new Sprite("Player/Prayer/Prayer "+idx);
  1831. for(int j45 = 0; j45 < 3; j45++)
  1832. skullIcons[j45] = new Sprite(mediaArchive, "headicons_pk", j45 );
  1833. }
  1834. catch(Exception _ex) { }
  1835. mapFlag = new Sprite(mediaArchive, "mapmarker", 0);
  1836. mapMarker = new Sprite(mediaArchive, "mapmarker", 1);
  1837. for(int k4 = 0; k4 < 8; k4++)
  1838. crosses[k4] = new Sprite(mediaArchive, "cross", k4);
  1839.  
  1840. mapDotItem = new Sprite(mediaArchive, "mapdots", 0);
  1841. mapDotNPC = new Sprite(mediaArchive, "mapdots", 1);
  1842. mapDotPlayer = new Sprite(mediaArchive, "mapdots", 2);
  1843. mapDotFriend = new Sprite(mediaArchive, "mapdots", 3);
  1844. mapDotTeam = new Sprite(mediaArchive, "mapdots", 4);
  1845. mapDotClan = new Sprite(mediaArchive, "mapdots", 5);
  1846.  
  1847. scrollBar1 = new Sprite(mediaArchive, "scrollbar", 0);
  1848. scrollBar2 = new Sprite(mediaArchive, "scrollbar", 1);
  1849. alertBack = new Sprite("alertback");
  1850. alertBorder = new Sprite("alertborder");
  1851. alertBorderH = new Sprite("alertborderh");
  1852. scrollBar3 = new Sprite("Gameframe/SCROLLBAR 0");
  1853. scrollBar4 = new Sprite("Gameframe/SCROLLBAR 1");
  1854.  
  1855. Sprite sprite = new Sprite(mediaArchive, "screenframe", 0);
  1856. leftFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
  1857. sprite.method346(0, 0);
  1858. sprite = new Sprite(mediaArchive, "screenframe", 1);
  1859. topFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
  1860. sprite.method346(0, 0);
  1861. sprite = new Sprite(mediaArchive, "screenframe", 2);
  1862. rightFrame = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
  1863. sprite.method346(0, 0);
  1864. sprite = new Sprite(mediaArchive, "mapedge", 0);
  1865. mapEdgeIP = new RSImageProducer(sprite.myWidth, sprite.myHeight, getGameComponent());
  1866. sprite.method346(0, 0);
  1867.  
  1868. int i5 = (int)(Math.random() * 21D) - 10;
  1869. int j5 = (int)(Math.random() * 21D) - 10;
  1870. int k5 = (int)(Math.random() * 21D) - 10;
  1871. int l5 = (int)(Math.random() * 41D) - 20;
  1872. for(int i6 = 0; i6 < 100; i6++)
  1873. {
  1874. if(mapFunctions[i6] != null)
  1875. mapFunctions[i6].method344(i5 + l5, j5 + l5, k5 + l5);
  1876. if(mapScenes[i6] != null)
  1877. mapScenes[i6].method360(i5 + l5, j5 + l5, k5 + l5);
  1878. }
  1879. drawLoadingText(83, "Unpacking textures");
  1880. Texture.method368(streamLoader_3);
  1881. Texture.method372(0.80000000000000004D);
  1882. Texture.method367();
  1883. drawLoadingText(86, "Unpacking config");
  1884. try {
  1885. Animation.unpackConfig(archive);
  1886. ObjectDef.unpackConfig(archive);
  1887. Flo.unpackConfig(archive);
  1888. ItemDef.unpackConfig(archive);
  1889. EntityDef.unpackConfig(archive);
  1890. IdentityKit.unpackConfig(archive);
  1891. SpotAnim.unpackConfig(archive);
  1892. Varp.unpackConfig(archive);
  1893. VarBit.unpackConfig(archive);
  1894. ItemDef.isMembers = true;
  1895. } catch(Exception e) {
  1896. e.printStackTrace();
  1897. }
  1898. drawLoadingText(95, "Unpacking interfaces");
  1899. RSFont aclass30_sub2_sub1_sub4s[] = {
  1900. smallText, aTextDrawingArea_1271, chatTextDrawingArea, aTextDrawingArea_1273
  1901. };
  1902. RSInterface.fonts = aclass30_sub2_sub1_sub4s;
  1903. RSInterface.unpack(streamLoader_1, aclass30_sub2_sub1_sub4s, mediaArchive);
  1904. drawLoadingText(100, "Preparing game engine");
  1905. for(int j6 = 0; j6 < 33; j6++)
  1906. {
  1907. int k6 = 999;
  1908. int i7 = 0;
  1909. for(int k7 = 0; k7 < 34; k7++)
  1910. {
  1911. if(mapBack.aByteArray1450[k7 + j6 * mapBack.anInt1452] == 0)
  1912. {
  1913. if(k6 == 999)
  1914. k6 = k7;
  1915. continue;
  1916. }
  1917. if(k6 == 999)
  1918. continue;
  1919. i7 = k7;
  1920. break;
  1921. }
  1922.  
  1923. anIntArray968[j6] = k6;
  1924. anIntArray1057[j6] = i7 - k6;
  1925. }
  1926. for (int l6 = 1; l6 < 153; l6++) {
  1927. int j7 = 999;
  1928. int l7 = 0;
  1929. for (int j8 = 24; j8 < 177; j8++) {
  1930. if (mapBack.aByteArray1450[j8 + l6 * mapBack.anInt1452] == 0 && (j8 > 34 || l6 > 34)) {
  1931. if (j7 == 999) {
  1932. j7 = j8;
  1933. }
  1934. continue;
  1935. }
  1936. if (j7 == 999) {
  1937. continue;
  1938. }
  1939. l7 = j8;
  1940. break;
  1941. }
  1942.  
  1943. anIntArray1052[l6 - 1] = j7 - 24;
  1944. anIntArray1229[l6 - 1] = l7 - j7;
  1945. }
  1946. Texture.method365(765, 503);
  1947. fullScreenTextureArray = Texture.anIntArray1472;
  1948. Texture.method365(516, 165);//519
  1949. anIntArray1180 = Texture.anIntArray1472;
  1950. Texture.method365(250, 335);
  1951. anIntArray1181 = Texture.anIntArray1472;
  1952. Texture.method365(512, 334);//512 334
  1953. anIntArray1182 = Texture.anIntArray1472;
  1954.  
  1955. int ai[] = new int[9];
  1956. for(int i8 = 0; i8 < 9; i8++)
  1957. {
  1958. int k8 = 128 + i8 * 32 + 15;
  1959. int l8 = 600 + k8 * 3;
  1960. int i9 = Texture.anIntArray1470[k8];
  1961. ai[i8] = l8 * i9 >> 16;
  1962. }
  1963.  
  1964. WorldController.method310(500, 800, 512, 334, ai);
  1965.  
  1966. Censor.loadConfig(streamLoader_4);
  1967. mouseDetection = new MouseDetection(this);
  1968. startRunnable(mouseDetection, 10);
  1969. Animable_Sub5.clientInstance = this;
  1970. ObjectDef.clientInstance = this;
  1971. EntityDef.clientInstance = this;
  1972. return;
  1973. }
  1974. catch(Exception exception)
  1975. {
  1976. exception.printStackTrace();
  1977. signlink.reporterror("loaderror " + aString1049 + " " + anInt1079);
  1978. }
  1979. loadingError = true;
  1980. }
  1981.  
  1982. private void method91(Stream stream, int i)
  1983. {
  1984. while(stream.bitPosition + 10 < i * 8)
  1985. {
  1986. int j = stream.readBits(11);
  1987. if(j == 2047)
  1988. break;
  1989. if(playerArray[j] == null)
  1990. {
  1991. playerArray[j] = new Player();
  1992. if(aStreamArray895s[j] != null)
  1993. playerArray[j].updatePlayer(aStreamArray895s[j]);
  1994. }
  1995. playerIndices[playerCount++] = j;
  1996. Player player = playerArray[j];
  1997. player.anInt1537 = loopCycle;
  1998. int k = stream.readBits(1);
  1999. if(k == 1)
  2000. anIntArray894[anInt893++] = j;
  2001. int l = stream.readBits(1);
  2002. int i1 = stream.readBits(5);
  2003. if(i1 > 15)
  2004. i1 -= 32;
  2005. int j1 = stream.readBits(5);
  2006. if(j1 > 15)
  2007. j1 -= 32;
  2008. player.setPos(myPlayer.smallX[0] + j1, myPlayer.smallY[0] + i1, l == 1);
  2009. }
  2010. stream.finishBitAccess();
  2011. }
  2012.  
  2013. private void processMainScreenClick() {
  2014. if(anInt1021 != 0)
  2015. return;
  2016. if(super.clickMode3 == 1) {
  2017. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  2018. int i = super.saveClickX - 25 - 530;//
  2019. int j = super.saveClickY - 8;
  2020. if(i >= 0 && j >= 0 && i < 146 && j < 151) {
  2021. i -= 73;
  2022. j -= 75;
  2023. int k = minimapInt1 + minimapInt2 & 0x7ff;
  2024. int i1 = Texture.anIntArray1470[k];
  2025. int j1 = Texture.anIntArray1471[k];
  2026. i1 = i1 * (minimapInt3 + 256) >> 8;
  2027. j1 = j1 * (minimapInt3 + 256) >> 8;
  2028. int k1 = j * i1 + i * j1 >> 11;
  2029. int l1 = j * j1 - i * i1 >> 11;
  2030. int i2 = myPlayer.x + k1 >> 7;
  2031. int j2 = myPlayer.y - l1 >> 7;
  2032. boolean flag1 = doWalkTo(1, 0, 0, 0, myPlayer.smallY[0], 0, 0, j2, myPlayer.smallX[0], true, i2);
  2033. if(flag1) {
  2034. stream.writeWordBigEndian(i);
  2035. stream.writeWordBigEndian(j);
  2036. stream.writeWord(minimapInt1);
  2037. stream.writeWordBigEndian(57);
  2038. stream.writeWordBigEndian(minimapInt2);
  2039. stream.writeWordBigEndian(minimapInt3);
  2040. stream.writeWordBigEndian(89);
  2041. stream.writeWord(myPlayer.x);
  2042. stream.writeWord(myPlayer.y);
  2043. stream.writeWordBigEndian(anInt1264);
  2044. stream.writeWordBigEndian(63);
  2045. }
  2046. }
  2047. } else {
  2048. int i = super.saveClickX - 25 - 545;//545
  2049. int j = super.saveClickY - 5 - 4;
  2050. if(i >= 0 && j >= 0 && i < 146 && j < 151) {
  2051. i -= 73;
  2052. j -= 75;
  2053. int k = minimapInt1 + minimapInt2 & 0x7ff;
  2054. int i1 = Texture.anIntArray1470[k];
  2055. int j1 = Texture.anIntArray1471[k];
  2056. i1 = i1 * (minimapInt3 + 256) >> 8;
  2057. j1 = j1 * (minimapInt3 + 256) >> 8;
  2058. int k1 = j * i1 + i * j1 >> 11;
  2059. int l1 = j * j1 - i * i1 >> 11;
  2060. int i2 = myPlayer.x + k1 >> 7;
  2061. int j2 = myPlayer.y - l1 >> 7;
  2062. boolean flag1 = doWalkTo(1, 0, 0, 0, myPlayer.smallY[0], 0, 0, j2, myPlayer.smallX[0], true, i2);
  2063. if(flag1) {
  2064. stream.writeWordBigEndian(i);
  2065. stream.writeWordBigEndian(j);
  2066. stream.writeWord(minimapInt1);
  2067. stream.writeWordBigEndian(57);
  2068. stream.writeWordBigEndian(minimapInt2);
  2069. stream.writeWordBigEndian(minimapInt3);
  2070. stream.writeWordBigEndian(89);
  2071. stream.writeWord(myPlayer.x);
  2072. stream.writeWord(myPlayer.y);
  2073. stream.writeWordBigEndian(anInt1264);
  2074. stream.writeWordBigEndian(63);
  2075. }
  2076. }
  2077. }
  2078. anInt1117++;
  2079. if(anInt1117 > 1151) {
  2080. anInt1117 = 0;
  2081. stream.createFrame(246);
  2082. stream.writeWordBigEndian(0);
  2083. int l = stream.currentOffset;
  2084. if((int)(Math.random() * 2D) == 0)
  2085. stream.writeWordBigEndian(101);
  2086. stream.writeWordBigEndian(197);
  2087. stream.writeWord((int)(Math.random() * 65536D));
  2088. stream.writeWordBigEndian((int)(Math.random() * 256D));
  2089. stream.writeWordBigEndian(67);
  2090. stream.writeWord(14214);
  2091. if((int)(Math.random() * 2D) == 0)
  2092. stream.writeWord(29487);
  2093. stream.writeWord((int)(Math.random() * 65536D));
  2094. if((int)(Math.random() * 2D) == 0)
  2095. stream.writeWordBigEndian(220);
  2096. stream.writeWordBigEndian(180);
  2097. stream.writeBytes(stream.currentOffset - l);
  2098. }
  2099. }
  2100. }
  2101.  
  2102. private String interfaceIntToString(int j) {
  2103. if(j < 0x3b9ac9ff)
  2104. return String.valueOf(j);
  2105. else
  2106. return "*";
  2107. }
  2108.  
  2109. private void showErrorScreen()
  2110. {
  2111. Graphics g = getGameComponent().getGraphics();
  2112. g.setColor(Color.black);
  2113. g.fillRect(0, 0, 765, 503);
  2114. method4(1);
  2115. if(loadingError)
  2116. {
  2117. aBoolean831 = false;
  2118. g.setFont(new Font("Helvetica", 1, 16));
  2119. g.setColor(Color.yellow);
  2120. int k = 35;
  2121. g.drawString("Sorry, an error has occured whilst loading Primal Project.", 30, k);
  2122. k += 50;
  2123. g.setColor(Color.white);
  2124. g.drawString("To fix this try the following (in order):", 30, k);
  2125. k += 50;
  2126. g.setColor(Color.white);
  2127. g.setFont(new Font("Helvetica", 1, 12));
  2128. g.drawString("1: Try closing and reopening the client and/or web browser", 30, k);
  2129. k += 30;
  2130. g.drawString("2: Try clearing your web-browsers cache from tools->internet options", 30, k);
  2131. k += 30;
  2132. g.drawString("3: Try rebooting your computer", 30, k);
  2133. k += 30;
  2134. g.drawString(" ", 30, k);
  2135. k += 30;
  2136. g.drawString("If problems still occur, visit the forums at www.primalproject.co.uk and request help", 30, k);
  2137. }
  2138. if(genericLoadingError)
  2139. {
  2140. aBoolean831 = false;
  2141. g.setFont(new Font("Helvetica", 1, 20));
  2142. g.setColor(Color.white);
  2143. g.drawString("Error - unable to load game!", 50, 50);
  2144. g.drawString("To play Primal Project make sure you play from", 50, 100);
  2145. g.drawString("http://www.primalproject.co.uk", 50, 150);
  2146. }
  2147. if(rsAlreadyLoaded)
  2148. {
  2149. aBoolean831 = false;
  2150. g.setColor(Color.yellow);
  2151. int l = 35;
  2152. g.drawString("Error a copy of Primal Project already appears to be loaded", 30, l);
  2153. l += 50;
  2154. g.setColor(Color.white);
  2155. g.drawString("To fix this try the following (in order):", 30, l);
  2156. l += 50;
  2157. g.setColor(Color.white);
  2158. g.setFont(new Font("Helvetica", 1, 12));
  2159. g.drawString("1: Try closing ALL open web-browser windows, and reloading", 30, l);
  2160. l += 30;
  2161. g.drawString("2: Try rebooting your computer, and reloading", 30, l);
  2162. l += 30;
  2163. }
  2164. }
  2165.  
  2166. public URL getCodeBase() {
  2167.  
  2168.  
  2169. try {
  2170. return new URL(server +":" + (80 + portOff));
  2171. } catch(Exception _ex) {
  2172. }
  2173. return null;
  2174. }
  2175.  
  2176. private void method95() {
  2177. for(int j = 0; j < npcCount; j++) {
  2178. int k = npcIndices[j];
  2179. NPC npc = npcArray[k];
  2180. if(npc != null)
  2181. method96(npc);
  2182. }
  2183. }
  2184.  
  2185. private void method96(Entity entity)
  2186. {
  2187. if(entity.x < 128 || entity.y < 128 || entity.x >= 13184 || entity.y >= 13184)
  2188. {
  2189. entity.anim = -1;
  2190. entity.anInt1520 = -1;
  2191. entity.anInt1547 = 0;
  2192. entity.anInt1548 = 0;
  2193. entity.x = entity.smallX[0] * 128 + entity.anInt1540 * 64;
  2194. entity.y = entity.smallY[0] * 128 + entity.anInt1540 * 64;
  2195. entity.method446();
  2196. }
  2197. if(entity == myPlayer && (entity.x < 1536 || entity.y < 1536 || entity.x >= 11776 || entity.y >= 11776))
  2198. {
  2199. entity.anim = -1;
  2200. entity.anInt1520 = -1;
  2201. entity.anInt1547 = 0;
  2202. entity.anInt1548 = 0;
  2203. entity.x = entity.smallX[0] * 128 + entity.anInt1540 * 64;
  2204. entity.y = entity.smallY[0] * 128 + entity.anInt1540 * 64;
  2205. entity.method446();
  2206. }
  2207. if(entity.anInt1547 > loopCycle)
  2208. method97(entity);
  2209. else
  2210. if(entity.anInt1548 >= loopCycle)
  2211. method98(entity);
  2212. else
  2213. method99(entity);
  2214. method100(entity);
  2215. method101(entity);
  2216. }
  2217.  
  2218. private void method97(Entity entity)
  2219. {
  2220. int i = entity.anInt1547 - loopCycle;
  2221. int j = entity.anInt1543 * 128 + entity.anInt1540 * 64;
  2222. int k = entity.anInt1545 * 128 + entity.anInt1540 * 64;
  2223. entity.x += (j - entity.x) / i;
  2224. entity.y += (k - entity.y) / i;
  2225. entity.anInt1503 = 0;
  2226. if(entity.anInt1549 == 0)
  2227. entity.turnDirection = 1024;
  2228. if(entity.anInt1549 == 1)
  2229. entity.turnDirection = 1536;
  2230. if(entity.anInt1549 == 2)
  2231. entity.turnDirection = 0;
  2232. if(entity.anInt1549 == 3)
  2233. entity.turnDirection = 512;
  2234. }
  2235.  
  2236. private void method98(Entity entity)
  2237. {
  2238. if(entity.anInt1548 == loopCycle || entity.anim == -1 || entity.anInt1529 != 0 || entity.anInt1528 + 1 > Animation.anims[entity.anim].method258(entity.anInt1527))
  2239. {
  2240. int i = entity.anInt1548 - entity.anInt1547;
  2241. int j = loopCycle - entity.anInt1547;
  2242. int k = entity.anInt1543 * 128 + entity.anInt1540 * 64;
  2243. int l = entity.anInt1545 * 128 + entity.anInt1540 * 64;
  2244. int i1 = entity.anInt1544 * 128 + entity.anInt1540 * 64;
  2245. int j1 = entity.anInt1546 * 128 + entity.anInt1540 * 64;
  2246. entity.x = (k * (i - j) + i1 * j) / i;
  2247. entity.y = (l * (i - j) + j1 * j) / i;
  2248. }
  2249. entity.anInt1503 = 0;
  2250. if(entity.anInt1549 == 0)
  2251. entity.turnDirection = 1024;
  2252. if(entity.anInt1549 == 1)
  2253. entity.turnDirection = 1536;
  2254. if(entity.anInt1549 == 2)
  2255. entity.turnDirection = 0;
  2256. if(entity.anInt1549 == 3)
  2257. entity.turnDirection = 512;
  2258. entity.anInt1552 = entity.turnDirection;
  2259. }
  2260.  
  2261. private void method99(Entity entity)
  2262. {
  2263. entity.anInt1517 = entity.anInt1511;
  2264. if(entity.smallXYIndex == 0)
  2265. {
  2266. entity.anInt1503 = 0;
  2267. return;
  2268. }
  2269. if(entity.anim != -1 && entity.anInt1529 == 0)
  2270. {
  2271. Animation animation = Animation.anims[entity.anim];
  2272. if(entity.anInt1542 > 0 && animation.anInt363 == 0)
  2273. {
  2274. entity.anInt1503++;
  2275. return;
  2276. }
  2277. if(entity.anInt1542 <= 0 && animation.anInt364 == 0)
  2278. {
  2279. entity.anInt1503++;
  2280. return;
  2281. }
  2282. }
  2283. int i = entity.x;
  2284. int j = entity.y;
  2285. int k = entity.smallX[entity.smallXYIndex - 1] * 128 + entity.anInt1540 * 64;
  2286. int l = entity.smallY[entity.smallXYIndex - 1] * 128 + entity.anInt1540 * 64;
  2287. if(k - i > 256 || k - i < -256 || l - j > 256 || l - j < -256)
  2288. {
  2289. entity.x = k;
  2290. entity.y = l;
  2291. return;
  2292. }
  2293. if(i < k)
  2294. {
  2295. if(j < l)
  2296. entity.turnDirection = 1280;
  2297. else
  2298. if(j > l)
  2299. entity.turnDirection = 1792;
  2300. else
  2301. entity.turnDirection = 1536;
  2302. } else
  2303. if(i > k)
  2304. {
  2305. if(j < l)
  2306. entity.turnDirection = 768;
  2307. else
  2308. if(j > l)
  2309. entity.turnDirection = 256;
  2310. else
  2311. entity.turnDirection = 512;
  2312. } else
  2313. if(j < l)
  2314. entity.turnDirection = 1024;
  2315. else
  2316. entity.turnDirection = 0;
  2317. int i1 = entity.turnDirection - entity.anInt1552 & 0x7ff;
  2318. if(i1 > 1024)
  2319. i1 -= 2048;
  2320. int j1 = entity.anInt1555;
  2321. if(i1 >= -256 && i1 <= 256)
  2322. j1 = entity.anInt1554;
  2323. else
  2324. if(i1 >= 256 && i1 < 768)
  2325. j1 = entity.anInt1557;
  2326. else
  2327. if(i1 >= -768 && i1 <= -256)
  2328. j1 = entity.anInt1556;
  2329. if(j1 == -1)
  2330. j1 = entity.anInt1554;
  2331. entity.anInt1517 = j1;
  2332. int k1 = 4;
  2333. if(entity.anInt1552 != entity.turnDirection && entity.interactingEntity == -1 && entity.anInt1504 != 0)
  2334. k1 = 2;
  2335. if(entity.smallXYIndex > 2)
  2336. k1 = 6;
  2337. if(entity.smallXYIndex > 3)
  2338. k1 = 8;
  2339. if(entity.anInt1503 > 0 && entity.smallXYIndex > 1)
  2340. {
  2341. k1 = 8;
  2342. entity.anInt1503--;
  2343. }
  2344. if(entity.aBooleanArray1553[entity.smallXYIndex - 1])
  2345. k1 <<= 1;
  2346. if(k1 >= 8 && entity.anInt1517 == entity.anInt1554 && entity.anInt1505 != -1)
  2347. entity.anInt1517 = entity.anInt1505;
  2348. if(i < k)
  2349. {
  2350. entity.x += k1;
  2351. if(entity.x > k)
  2352. entity.x = k;
  2353. } else
  2354. if(i > k)
  2355. {
  2356. entity.x -= k1;
  2357. if(entity.x < k)
  2358. entity.x = k;
  2359. }
  2360. if(j < l)
  2361. {
  2362. entity.y += k1;
  2363. if(entity.y > l)
  2364. entity.y = l;
  2365. } else
  2366. if(j > l)
  2367. {
  2368. entity.y -= k1;
  2369. if(entity.y < l)
  2370. entity.y = l;
  2371. }
  2372. if(entity.x == k && entity.y == l)
  2373. {
  2374. entity.smallXYIndex--;
  2375. if(entity.anInt1542 > 0)
  2376. entity.anInt1542--;
  2377. }
  2378. }
  2379.  
  2380. private void method100(Entity entity)
  2381. {
  2382. if(entity.anInt1504 == 0)
  2383. return;
  2384. if(entity.interactingEntity != -1 && entity.interactingEntity < 32768)
  2385. {
  2386. NPC npc = npcArray[entity.interactingEntity];
  2387. if(npc != null)
  2388. {
  2389. int i1 = entity.x - npc.x;
  2390. int k1 = entity.y - npc.y;
  2391. if(i1 != 0 || k1 != 0)
  2392. entity.turnDirection = (int)(Math.atan2(i1, k1) * 325.94900000000001D) & 0x7ff;
  2393. }
  2394. }
  2395. if(entity.interactingEntity >= 32768)
  2396. {
  2397. int j = entity.interactingEntity - 32768;
  2398. if(j == unknownInt10)
  2399. j = myPlayerIndex;
  2400. Player player = playerArray[j];
  2401. if(player != null)
  2402. {
  2403. int l1 = entity.x - player.x;
  2404. int i2 = entity.y - player.y;
  2405. if(l1 != 0 || i2 != 0)
  2406. entity.turnDirection = (int)(Math.atan2(l1, i2) * 325.94900000000001D) & 0x7ff;
  2407. }
  2408. }
  2409. if((entity.anInt1538 != 0 || entity.anInt1539 != 0) && (entity.smallXYIndex == 0 || entity.anInt1503 > 0))
  2410. {
  2411. int k = entity.x - (entity.anInt1538 - baseX - baseX) * 64;
  2412. int j1 = entity.y - (entity.anInt1539 - baseY - baseY) * 64;
  2413. if(k != 0 || j1 != 0)
  2414. entity.turnDirection = (int)(Math.atan2(k, j1) * 325.94900000000001D) & 0x7ff;
  2415. entity.anInt1538 = 0;
  2416. entity.anInt1539 = 0;
  2417. }
  2418. int l = entity.turnDirection - entity.anInt1552 & 0x7ff;
  2419. if(l != 0)
  2420. {
  2421. if(l < entity.anInt1504 || l > 2048 - entity.anInt1504)
  2422. entity.anInt1552 = entity.turnDirection;
  2423. else
  2424. if(l > 1024)
  2425. entity.anInt1552 -= entity.anInt1504;
  2426. else
  2427. entity.anInt1552 += entity.anInt1504;
  2428. entity.anInt1552 &= 0x7ff;
  2429. if(entity.anInt1517 == entity.anInt1511 && entity.anInt1552 != entity.turnDirection)
  2430. {
  2431. if(entity.anInt1512 != -1)
  2432. {
  2433. entity.anInt1517 = entity.anInt1512;
  2434. return;
  2435. }
  2436. entity.anInt1517 = entity.anInt1554;
  2437. }
  2438. }
  2439. }
  2440.  
  2441. private void method101(Entity entity)
  2442. {
  2443. entity.aBoolean1541 = false;
  2444. if(entity.anInt1517 != -1)
  2445. {
  2446. Animation animation = Animation.anims[entity.anInt1517];
  2447. entity.anInt1519++;
  2448. if(entity.anInt1518 < animation.anInt352 && entity.anInt1519 > animation.method258(entity.anInt1518))
  2449. {
  2450. entity.anInt1519 = 0;
  2451. entity.anInt1518++;
  2452. }
  2453. if(entity.anInt1518 >= animation.anInt352)
  2454. {
  2455. entity.anInt1519 = 0;
  2456. entity.anInt1518 = 0;
  2457. }
  2458. }
  2459. if(entity.anInt1520 != -1 && loopCycle >= entity.anInt1523)
  2460. {
  2461. if(entity.anInt1521 < 0)
  2462. entity.anInt1521 = 0;
  2463. Animation animation_1 = SpotAnim.cache[entity.anInt1520].aAnimation_407;
  2464. for(entity.anInt1522++; entity.anInt1521 < animation_1.anInt352 && entity.anInt1522 > animation_1.method258(entity.anInt1521); entity.anInt1521++)//huhhhhh
  2465. entity.anInt1522 -= animation_1.method258(entity.anInt1521);
  2466.  
  2467. if(entity.anInt1521 >= animation_1.anInt352 && (entity.anInt1521 < 0 || entity.anInt1521 >= animation_1.anInt352))
  2468. entity.anInt1520 = -1;
  2469. }
  2470. if(entity.anim != -1 && entity.anInt1529 <= 1)
  2471. {
  2472. Animation animation_2 = Animation.anims[entity.anim];
  2473. if(animation_2.anInt363 == 1 && entity.anInt1542 > 0 && entity.anInt1547 <= loopCycle && entity.anInt1548 < loopCycle)
  2474. {
  2475. entity.anInt1529 = 1;
  2476. return;
  2477. }
  2478. }
  2479. if(entity.anim != -1 && entity.anInt1529 == 0)
  2480. {
  2481. Animation animation_3 = Animation.anims[entity.anim];
  2482. for(entity.anInt1528++; entity.anInt1527 < animation_3.anInt352 && entity.anInt1528 > animation_3.method258(entity.anInt1527); entity.anInt1527++)
  2483. entity.anInt1528 -= animation_3.method258(entity.anInt1527);
  2484.  
  2485. if(entity.anInt1527 >= animation_3.anInt352)
  2486. {
  2487. entity.anInt1527 -= animation_3.anInt356;
  2488. entity.anInt1530++;
  2489. if(entity.anInt1530 >= animation_3.anInt362)
  2490. entity.anim = -1;
  2491. if(entity.anInt1527 < 0 || entity.anInt1527 >= animation_3.anInt352)
  2492. entity.anim = -1;
  2493. }
  2494. entity.aBoolean1541 = animation_3.aBoolean358;
  2495. }
  2496. if(entity.anInt1529 > 0)
  2497. entity.anInt1529--;
  2498. }
  2499.  
  2500. private void drawGameScreen()
  2501. {
  2502. if (fullscreenInterfaceID != -1 && (loadingStage == 2 || super.fullGameScreen != null)) {
  2503. if (loadingStage == 2) {
  2504. method119(anInt945, fullscreenInterfaceID);
  2505. if (openInterfaceID != -1) {
  2506. method119(anInt945, openInterfaceID);
  2507. }
  2508. anInt945 = 0;
  2509. resetAllImageProducers();
  2510. super.fullGameScreen.initDrawingArea();
  2511. Texture.anIntArray1472 = fullScreenTextureArray;
  2512. DrawingArea.setAllPixelsToZero();
  2513. welcomeScreenRaised = true;
  2514. if (openInterfaceID != -1) {
  2515. RSInterface class9_1 = RSInterface.interfaceCache[openInterfaceID];
  2516. if (class9_1.width == 512 && class9_1.height == 334 && class9_1.interfaceType == 0) {
  2517. class9_1.width = 765;
  2518. class9_1.height = 503;
  2519. }
  2520. drawInterface(0, 0, class9_1, 8);
  2521. }
  2522. RSInterface rsInterface = RSInterface.interfaceCache[fullscreenInterfaceID];
  2523. if (rsInterface.width == 512 && rsInterface.height == 334 && rsInterface.interfaceType == 0) {
  2524. rsInterface.width = 765;
  2525. rsInterface.height = 503;
  2526. }
  2527. drawInterface(0, 0, rsInterface, 8);
  2528.  
  2529. if (!menuOpen) {
  2530. processRightClick();
  2531. drawTooltip();
  2532. } else {
  2533. drawMenu(0, 0);
  2534. }
  2535. }
  2536. drawCount++;
  2537. super.fullGameScreen.drawGraphics(0, super.graphics, 0);
  2538. return;
  2539. } else {
  2540. if (drawCount != 0) {
  2541. resetImageProducers2();
  2542. }
  2543. }
  2544. if(welcomeScreenRaised) {
  2545. welcomeScreenRaised = false;
  2546. topFrame.drawGraphics(0, super.graphics, 0);
  2547. leftFrame.drawGraphics(4, super.graphics, 0);
  2548. //rightFrame.drawGraphics(4, super.graphics, 516);
  2549. //mapEdgeIP.drawGraphics(4, super.graphics, 516);//519
  2550. needDrawTabArea = true;
  2551. inputTaken = true;
  2552. tabAreaAltered = true;
  2553. aBoolean1233 = true;
  2554.  
  2555. if(loadingStage != 2) {
  2556. inGameScreen.drawGraphics(4, super.graphics, 4);
  2557. mapBackImage.drawGraphics(0, super.graphics, 516);//545
  2558.  
  2559. }
  2560. }
  2561. if(menuOpen)
  2562. needDrawTabArea = true;
  2563. if(menuOpen)
  2564. drawMenu(4,4);
  2565.  
  2566. if(invOverlayInterfaceID != -1)
  2567. {
  2568. boolean flag1 = method119(anInt945, invOverlayInterfaceID);
  2569. if(flag1)
  2570. needDrawTabArea = true;
  2571. }
  2572. if(atInventoryInterfaceType == 2)
  2573. needDrawTabArea = true;
  2574. if(activeInterfaceType == 2)
  2575. needDrawTabArea = true;
  2576. drawTabArea();
  2577. if(loadingStage == 2) {
  2578. method146();
  2579. }
  2580. if(backDialogID == -1)
  2581. {
  2582. if(is474 || is480 || is508 || is525 || is562) {
  2583. aClass9_1059.scrollPosition = anInt1211 - anInt1089 - 110;
  2584. if(super.mouseX > 478 && super.mouseX < 580 && super.mouseY > 342)
  2585. method65(494, 110, super.mouseX - 0, super.mouseY - 348, aClass9_1059, 0, false, anInt1211);
  2586. int i = anInt1211 - 110 - aClass9_1059.scrollPosition;
  2587. if(i < 0)
  2588. i = 0;
  2589. if(i > anInt1211 - 110)
  2590. i = anInt1211 - 110;
  2591. if(anInt1089 != i) {
  2592. anInt1089 = i;
  2593. inputTaken = true;
  2594. }
  2595. } else {
  2596. aClass9_1059.scrollPosition = anInt1211 - anInt1089 - 77;
  2597. if(super.mouseX > 448 && super.mouseX < 560 && super.mouseY > 332)
  2598. method65(463, 77, super.mouseX - 17, super.mouseY - 357, aClass9_1059, 0, false, anInt1211);
  2599. int i = anInt1211 - 77 - aClass9_1059.scrollPosition;
  2600. if(i < 0)
  2601. i = 0;
  2602. if(i > anInt1211 - 77)
  2603. i = anInt1211 - 77;
  2604. if(anInt1089 != i) {
  2605. anInt1089 = i;
  2606. inputTaken = true;
  2607. }
  2608. }
  2609. }
  2610. if(backDialogID != -1) {
  2611. boolean flag2 = method119(anInt945, backDialogID);
  2612. if(flag2)
  2613. inputTaken = true;
  2614. }
  2615. if(atInventoryInterfaceType == 3)
  2616. inputTaken = true;
  2617. if(activeInterfaceType == 3)
  2618. inputTaken = true;
  2619. if(aString844 != null)
  2620. inputTaken = true;
  2621. if(menuOpen && menuScreenArea == 2)
  2622. inputTaken = true;
  2623. if(inputTaken) {
  2624. drawChatArea();
  2625. inputTaken = false;
  2626. }
  2627. if(loadingStage == 2) {
  2628. drawMinimap();
  2629. mapBackImage.drawGraphics(0, super.graphics, 516);//545
  2630. }
  2631. if(anInt1054 != -1)
  2632. tabAreaAltered = true;
  2633. if(tabAreaAltered)
  2634. {
  2635. if(anInt1054 != -1 && anInt1054 == tabID)
  2636. {
  2637. anInt1054 = -1;
  2638. stream.createFrame(120);
  2639. stream.writeWordBigEndian(tabID);
  2640. }
  2641. tabAreaAltered = false;
  2642. aRSImageProducer_1125.initDrawingArea();
  2643. inGameScreen.initDrawingArea();
  2644. }
  2645. if(menuOpen){
  2646. drawMenu(516, 466);
  2647. }
  2648. anInt945 = 0;
  2649. }
  2650.  
  2651. private boolean buildFriendsListMenu(RSInterface class9)
  2652. {
  2653. int i = class9.contentType;
  2654. if(i >= 1 && i <= 200 || i >= 701 && i <= 900)
  2655. {
  2656. if(i >= 801)
  2657. i -= 701;
  2658. else
  2659. if(i >= 701)
  2660. i -= 601;
  2661. else
  2662. if(i >= 101)
  2663. i -= 101;
  2664. else
  2665. i--;
  2666. menuActionName[menuActionRow] = "Remove @whi@" + friendsList[i];
  2667. menuActionID[menuActionRow] = 792;
  2668. menuActionRow++;
  2669. menuActionName[menuActionRow] = "Message @whi@" + friendsList[i];
  2670. menuActionID[menuActionRow] = 639;
  2671. menuActionRow++;
  2672. return true;
  2673. }
  2674. if(i >= 401 && i <= 500)
  2675. {
  2676. menuActionName[menuActionRow] = "Remove @whi@" + class9.disabledMessage;
  2677. menuActionID[menuActionRow] = 322;
  2678. menuActionRow++;
  2679. return true;
  2680. } else
  2681. {
  2682. return false;
  2683. }
  2684. }
  2685.  
  2686. private void method104()
  2687. {
  2688. Animable_Sub3 class30_sub2_sub4_sub3 = (Animable_Sub3)aClass19_1056.reverseGetFirst();
  2689. for(; class30_sub2_sub4_sub3 != null; class30_sub2_sub4_sub3 = (Animable_Sub3)aClass19_1056.reverseGetNext())
  2690. if(class30_sub2_sub4_sub3.anInt1560 != plane || class30_sub2_sub4_sub3.aBoolean1567)
  2691. class30_sub2_sub4_sub3.unlink();
  2692. else
  2693. if(loopCycle >= class30_sub2_sub4_sub3.anInt1564)
  2694. {
  2695. class30_sub2_sub4_sub3.method454(anInt945);
  2696. if(class30_sub2_sub4_sub3.aBoolean1567)
  2697. class30_sub2_sub4_sub3.unlink();
  2698. else
  2699. worldController.method285(class30_sub2_sub4_sub3.anInt1560, 0, class30_sub2_sub4_sub3.anInt1563, -1, class30_sub2_sub4_sub3.anInt1562, 60, class30_sub2_sub4_sub3.anInt1561, class30_sub2_sub4_sub3, false);
  2700. }
  2701.  
  2702. }
  2703.  
  2704. private void drawInterface(int j, int k, RSInterface class9, int l) {
  2705.  
  2706. if(class9.interfaceType != 0 || class9.children == null)
  2707. return;
  2708. if(class9.interfaceShown && anInt1026 != class9.id && anInt1048 != class9.id && anInt1039 != class9.id)
  2709. return;
  2710. int i1 = DrawingArea.topX;
  2711. int j1 = DrawingArea.topY;
  2712. int k1 = DrawingArea.bottomX;
  2713. int l1 = DrawingArea.bottomY;
  2714. DrawingArea.setDrawingArea(l + class9.height, k, k + class9.width, l);
  2715. int i2 = class9.children.length;
  2716. for(int j2 = 0; j2 < i2; j2++) {
  2717. int k2 = class9.childX[j2] + k;
  2718. int l2 = (class9.childY[j2] + l) - j;
  2719. RSInterface class9_1 = RSInterface.interfaceCache[class9.children[j2]];
  2720. k2 += class9_1.xOffset;
  2721. l2 += class9_1.yOffset;
  2722. if(class9_1.contentType > 0)
  2723. drawFriendsListOrWelcomeScreen(class9_1);
  2724. //here
  2725. int[] IDs = {
  2726. 1196, 1199, 1206, 1215, 1224, 1231, 1240, 1249, 1258, 1267, 1274, 1283, 1573,
  2727. 1290, 1299, 1308, 1315, 1324, 1333, 1340, 1349, 1358, 1367, 1374, 1381, 1388,
  2728. 1397, 1404, 1583, 12038, 1414, 1421, 1430, 1437, 1446, 1453, 1460, 1469, 15878,
  2729. 1602, 1613, 1624, 7456, 1478, 1485, 1494, 1503, 1512, 1521, 1530, 1544, 1553,
  2730. 1563, 1593, 1635, 12426, 12436, 12446, 12456, 6004, 18471,
  2731. /* Ancients */
  2732. 12940, 12988, 13036, 12902, 12862, 13046, 12964, 13012, 13054, 12920, 12882, 13062,
  2733. 12952, 13000, 13070, 12912, 12872, 13080, 12976, 13024, 13088, 12930, 12892, 13096
  2734. };
  2735. for(int m5 = 0; m5 < IDs.length; m5++) {
  2736. if(class9_1.id == IDs[m5] + 1) {
  2737. if(m5 > 61)
  2738. drawBlackBox(k2 + 1, l2);
  2739. else
  2740. drawBlackBox(k2, l2 + 1);
  2741. }
  2742. }
  2743. int[] runeChildren = {
  2744. 1202, 1203, 1209, 1210, 1211, 1218, 1219, 1220, 1227, 1228, 1234, 1235, 1236, 1243, 1244, 1245,
  2745. 1252, 1253, 1254, 1261, 1262, 1263, 1270, 1271, 1277, 1278, 1279, 1286, 1287, 1293, 1294, 1295,
  2746. 1302, 1303, 1304, 1311, 1312, 1318, 1319, 1320, 1327, 1328, 1329, 1336, 1337, 1343, 1344, 1345,
  2747. 1352, 1353, 1354, 1361, 1362, 1363, 1370, 1371, 1377, 1378, 1384, 1385, 1391, 1392, 1393, 1400,
  2748. 1401, 1407, 1408, 1410, 1417, 1418, 1424, 1425, 1426, 1433, 1434, 1440, 1441, 1442, 1449, 1450,
  2749. 1456, 1457, 1463, 1464, 1465, 1472, 1473, 1474, 1481, 1482, 1488, 1489, 1490, 1497, 1498, 1499,
  2750. 1506, 1507, 1508, 1515, 1516, 1517, 1524, 1525, 1526, 1533, 1534, 1535, 1547, 1548, 1549, 1556,
  2751. 1557, 1558, 1566, 1567, 1568, 1576, 1577, 1578, 1586, 1587, 1588, 1596, 1597, 1598, 1605, 1606,
  2752. 1607, 1616, 1617, 1618, 1627, 1628, 1629, 1638, 1639, 1640, 6007, 6008, 6011, 8673, 8674, 12041,
  2753. 12042, 12429, 12430, 12431, 12439, 12440, 12441, 12449, 12450, 12451, 12459, 12460, 15881, 15882,
  2754. 15885, 18474, 18475, 18478
  2755. };
  2756. for(int r = 0; r < runeChildren.length; r++)
  2757. if(class9_1.id == runeChildren[r])
  2758. class9_1.modelZoom = 775;
  2759.  
  2760.  
  2761. if(class9_1.interfaceType == 0) {
  2762. if(class9_1.scrollPosition > class9_1.scrollMax - class9_1.height)
  2763. class9_1.scrollPosition = class9_1.scrollMax - class9_1.height;
  2764. if(class9_1.scrollPosition < 0)
  2765. class9_1.scrollPosition = 0;
  2766. drawInterface(class9_1.scrollPosition, k2, class9_1, l2);
  2767. if(class9_1.scrollMax > class9_1.height)
  2768. drawScrollbar(class9_1.height, class9_1.scrollPosition, l2, k2 + class9_1.width, class9_1.scrollMax);
  2769. } else if(class9_1.interfaceType != 1)
  2770. if(class9_1.interfaceType == 2) {
  2771. int i3 = 0;
  2772. for(int l3 = 0; l3 < class9_1.height; l3++) {
  2773. for(int l4 = 0; l4 < class9_1.width; l4++) {
  2774. int k5 = k2 + l4 * (32 + class9_1.invSpritePadX);
  2775. int j6 = l2 + l3 * (32 + class9_1.invSpritePadY);
  2776. if(i3 < 20) {
  2777. k5 += class9_1.spritesX[i3];
  2778. j6 += class9_1.spritesY[i3];
  2779. }
  2780. if(class9_1.inventory[i3] > 0) {
  2781. int k6 = 0;
  2782. int j7 = 0;
  2783. int j9 = class9_1.inventory[i3] - 1;
  2784. if(k5 > DrawingArea.topX - 32 && k5 < DrawingArea.bottomX && j6 > DrawingArea.topY - 32 && j6 < DrawingArea.bottomY || activeInterfaceType != 0 && anInt1085 == i3) {
  2785. int l9 = 0;
  2786. if(itemSelected == 1 && anInt1283 == i3 && anInt1284 == class9_1.id)
  2787. l9 = 0xffffff;
  2788. Sprite Sprite_2 = ItemDef.getSprite(j9, class9_1.inventoryValue[i3], l9);
  2789. if(Sprite_2 != null) {
  2790. if(activeInterfaceType != 0 && anInt1085 == i3 && anInt1084 == class9_1.id) {
  2791. k6 = super.mouseX - anInt1087;
  2792. j7 = super.mouseY - anInt1088;
  2793. if(k6 < 5 && k6 > -5)
  2794. k6 = 0;
  2795. if(j7 < 5 && j7 > -5)
  2796. j7 = 0;
  2797. if(anInt989 < 5) {
  2798. k6 = 0;
  2799. j7 = 0;
  2800. }
  2801. Sprite_2.drawSprite1(k5 + k6, j6 + j7);
  2802. if(j6 + j7 < DrawingArea.topY && class9.scrollPosition > 0) {
  2803. int i10 = (anInt945 * (DrawingArea.topY - j6 - j7)) / 3;
  2804. if(i10 > anInt945 * 10)
  2805. i10 = anInt945 * 10;
  2806. if(i10 > class9.scrollPosition)
  2807. i10 = class9.scrollPosition;
  2808. class9.scrollPosition -= i10;
  2809. anInt1088 += i10;
  2810. }
  2811. if(j6 + j7 + 32 > DrawingArea.bottomY && class9.scrollPosition < class9.scrollMax - class9.height) {
  2812. int j10 = (anInt945 * ((j6 + j7 + 32) - DrawingArea.bottomY)) / 3;
  2813. if(j10 > anInt945 * 10)
  2814. j10 = anInt945 * 10;
  2815. if(j10 > class9.scrollMax - class9.height - class9.scrollPosition)
  2816. j10 = class9.scrollMax - class9.height - class9.scrollPosition;
  2817. class9.scrollPosition += j10;
  2818. anInt1088 -= j10;
  2819. }
  2820. } else if(atInventoryInterfaceType != 0 && atInventoryIndex == i3 && atInventoryInterface == class9_1.id)
  2821. Sprite_2.drawSprite1(k5, j6);
  2822. else
  2823. Sprite_2.drawSprite(k5, j6);
  2824. if(Sprite_2.maxWidth == 33 || class9_1.inventoryValue[i3] != 1)
  2825. {
  2826. int k10 = class9_1.inventoryValue[i3];
  2827. smallText.method385(0, intToKOrMil(k10), j6 + 10 + j7, k5 + 1 + k6);
  2828. if(k10 >= 1)
  2829. smallText.method385(0xFFFF00, intToKOrMil(k10), j6 + 9 + j7, k5 + k6);
  2830. if(k10 >= 100000)
  2831. smallText.method385(0xFFFFFF, intToKOrMil(k10), j6 + 9 + j7, k5 + k6);
  2832. if(k10 >= 10000000)
  2833. smallText.method385(0x00FF80, intToKOrMil(k10), j6 + 9 + j7, k5 + k6);
  2834. }
  2835. }
  2836. }
  2837. } else if(class9_1.sprites != null && i3 < 20) {
  2838. Sprite Sprite_1 = class9_1.sprites[i3];
  2839. if(Sprite_1 != null)
  2840. Sprite_1.drawSprite(k5, j6);
  2841. }
  2842. i3++;
  2843. }
  2844. }
  2845. } else if(class9_1.interfaceType == 3) {
  2846. boolean flag = false;
  2847. if(anInt1039 == class9_1.id || anInt1048 == class9_1.id || anInt1026 == class9_1.id)
  2848. flag = true;
  2849. int j3;
  2850. if(interfaceIsSelected(class9_1)) {
  2851. j3 = class9_1.enabledColor;
  2852. if(flag && class9_1.enabledHoverColor != 0)
  2853. j3 = class9_1.enabledHoverColor;
  2854. } else {
  2855. j3 = class9_1.disabledColor;
  2856. if(flag && class9_1.disabledHoverColor != 0)
  2857. j3 = class9_1.disabledHoverColor;
  2858. }
  2859. if(class9_1.opacity == 0) {
  2860. if(class9_1.boxFilled)
  2861. DrawingArea.drawPixels(class9_1.height, l2, k2, j3, class9_1.width);
  2862. else
  2863. DrawingArea.fillPixels(k2, class9_1.width, class9_1.height, j3, l2);
  2864. } else if(class9_1.boxFilled)
  2865. DrawingArea.method335(j3, l2, class9_1.width, class9_1.height, 256 - (class9_1.opacity & 0xff), k2);
  2866. else
  2867. DrawingArea.method338(l2, class9_1.height, 256 - (class9_1.opacity & 0xff), j3, class9_1.width, k2);
  2868. } else if(class9_1.interfaceType == 4) {
  2869. RSFont textDrawingArea = class9_1.rsFonts;
  2870. String s = class9_1.disabledMessage;
  2871. boolean flag1 = false;
  2872. if(anInt1039 == class9_1.id || anInt1048 == class9_1.id || anInt1026 == class9_1.id)
  2873. flag1 = true;
  2874. int i4;
  2875. if(interfaceIsSelected(class9_1)) {
  2876. i4 = class9_1.enabledColor;
  2877. if(flag1 && class9_1.enabledHoverColor != 0)
  2878. i4 = class9_1.enabledHoverColor;
  2879. if(class9_1.enabledMessage.length() > 0)
  2880. s = class9_1.enabledMessage;
  2881. } else {
  2882. i4 = class9_1.disabledColor;
  2883. if(flag1 && class9_1.disabledHoverColor != 0)
  2884. i4 = class9_1.disabledHoverColor;
  2885. }
  2886. if(class9_1.atActionType == 6 && aBoolean1149) {
  2887. s = "Please wait...";
  2888. i4 = class9_1.disabledColor;
  2889. }
  2890. if(DrawingArea.width == 516) {//519
  2891. if(i4 == 0xffff00)
  2892. i4 = 255;
  2893. if(i4 == 49152)
  2894. i4 = 0xffffff;
  2895. }
  2896. //Magic interface
  2897. if((class9_1.parentID == 1151) || (class9_1.parentID == 12855)) {
  2898. switch (i4) {
  2899. case 16773120: i4 = 0xFE981F; break;
  2900. case 7040819: i4 = 0xAF6A1A; break;
  2901. }
  2902. }
  2903. //Skill interface
  2904. int id = 4004; int id2 = 4005;
  2905. if(class9_1.parentID == 3917 && class9_1.id != id && class9_1.id != id+2 && class9_1.id != id+4 && class9_1.id != id+6
  2906. && 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
  2907. && 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
  2908. && class9_1.id != id+28 && class9_1.id != id+30 && class9_1.id != id+32 && class9_1.id != id+34 && class9_1.id != 13926
  2909. && 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
  2910. && 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
  2911. && 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
  2912. && class9_1.id != id2+28 && class9_1.id != id2+30 && class9_1.id != id2+32 && class9_1.id != id2+34 && class9_1.id != 13927
  2913. && class9_1.id != 4153 && class9_1.id != 12167 && class9_1.id != 4026) {
  2914. if(i4 == 16776960)
  2915. i4 = 0x0000;
  2916. class9_1.textShadowed = false;
  2917. }
  2918. /*if(class9_1.parentID == 3917) {
  2919. for(int i = 4004; i < 4040; i++) {
  2920. int[] moreData = {
  2921. 13926, 4152, 12166, 13927,
  2922. 4153, 12167, 4026
  2923. };
  2924. if(class9_1.id == i || class9_1.id == moreData[i]) {
  2925. return;
  2926. }
  2927. if(i4 == 16776960) {
  2928. i4 = 0x0000;
  2929. class9_1.textShadowed = false;
  2930. }
  2931. }
  2932. }*/
  2933. for(int l6 = l2 + textDrawingArea.anInt1497; s.length() > 0; l6 += textDrawingArea.anInt1497)
  2934. {
  2935. if(s.indexOf("%") != -1)
  2936. {
  2937. do
  2938. {
  2939. int k7 = s.indexOf("%1");
  2940. if(k7 == -1)
  2941. break;
  2942. 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)
  2943. s = s.substring(0, k7) + methodR(extractInterfaceValues(class9_1, 0)) + s.substring(k7 + 2);
  2944. else
  2945. s = s.substring(0, k7) + interfaceIntToString(extractInterfaceValues(class9_1, 0)) + s.substring(k7 + 2);
  2946. } while(true);
  2947. do
  2948. {
  2949. int l7 = s.indexOf("%2");
  2950. if(l7 == -1)
  2951. break;
  2952. s = s.substring(0, l7) + interfaceIntToString(extractInterfaceValues(class9_1, 1)) + s.substring(l7 + 2);
  2953. } while(true);
  2954. do
  2955. {
  2956. int i8 = s.indexOf("%3");
  2957. if(i8 == -1)
  2958. break;
  2959. s = s.substring(0, i8) + interfaceIntToString(extractInterfaceValues(class9_1, 2)) + s.substring(i8 + 2);
  2960. } while(true);
  2961. do
  2962. {
  2963. int j8 = s.indexOf("%4");
  2964. if(j8 == -1)
  2965. break;
  2966. s = s.substring(0, j8) + interfaceIntToString(extractInterfaceValues(class9_1, 3)) + s.substring(j8 + 2);
  2967. } while(true);
  2968. do
  2969. {
  2970. int k8 = s.indexOf("%5");
  2971. if(k8 == -1)
  2972. break;
  2973. s = s.substring(0, k8) + interfaceIntToString(extractInterfaceValues(class9_1, 4)) + s.substring(k8 + 2);
  2974. } while(true);
  2975. }
  2976. int l8 = s.indexOf("\\n");
  2977. String s1;
  2978. if(l8 != -1)
  2979. {
  2980. s1 = s.substring(0, l8);
  2981. s = s.substring(l8 + 2);
  2982. } else
  2983. {
  2984. s1 = s;
  2985. s = "";
  2986. }
  2987. if(class9_1.textCentered)
  2988. textDrawingArea.method382(i4, k2 + class9_1.width / 2, s1, l6, class9_1.textShadowed);
  2989. else
  2990. textDrawingArea.method389(class9_1.textShadowed, k2, i4, s1, l6);
  2991. }
  2992. } else if(class9_1.interfaceType == 5) {
  2993. //whats this?
  2994.  
  2995. Sprite sprite;
  2996. if(interfaceIsSelected(class9_1))
  2997. sprite = class9_1.enabledSprite;
  2998. else
  2999. sprite = class9_1.disabledSprite;
  3000. if(spellSelected == 1 && class9_1.id == spellID && spellID != 0 && sprite != null) {
  3001. sprite.drawSprite2(k2, l2, 0xffffff);
  3002. } else {
  3003. if(Autocast && class9_1.id == autocastId)
  3004. magicAuto.drawSprite(k2-3, l2-3);
  3005. if (sprite != null)
  3006. sprite.drawSprite(k2, l2);
  3007. }
  3008. if(sprite != null)
  3009. sprite.drawSprite(k2, l2);
  3010. } else if(class9_1.interfaceType == 6) {
  3011. int k3 = Texture.textureInt1;
  3012. int j4 = Texture.textureInt2;
  3013. Texture.textureInt1 = k2 + class9_1.width / 2;
  3014. Texture.textureInt2 = l2 + class9_1.height / 2;
  3015. int i5 = Texture.anIntArray1470[class9_1.modelRotationY] * class9_1.modelZoom >> 16;
  3016. int l5 = Texture.anIntArray1471[class9_1.modelRotationY] * class9_1.modelZoom >> 16;
  3017. boolean flag2 = interfaceIsSelected(class9_1);
  3018. int i7;
  3019. if(flag2)
  3020. i7 = class9_1.enabledAnimation;
  3021. else
  3022. i7 = class9_1.disabledAnimation;
  3023. Model model;
  3024. if(i7 == -1) {
  3025. model = class9_1.method209(-1, -1, flag2);
  3026. } else {
  3027. Animation animation = Animation.anims[i7];
  3028. model = class9_1.method209(animation.anIntArray354[class9_1.animationLength], animation.anIntArray353[class9_1.animationLength], flag2);
  3029. }
  3030. if(model != null)
  3031. model.method482(class9_1.modelRotationX, 0, class9_1.modelRotationY, 0, i5, l5);
  3032. Texture.textureInt1 = k3;
  3033. Texture.textureInt2 = j4;
  3034. } else if(class9_1.interfaceType == 7) {
  3035. RSFont textDrawingArea_1 = class9_1.rsFonts;
  3036. int k4 = 0;
  3037. for(int j5 = 0; j5 < class9_1.height; j5++) {
  3038. for(int i6 = 0; i6 < class9_1.width; i6++) {
  3039. if(class9_1.inventory[k4] > 0) {
  3040. ItemDef itemDef = ItemDef.forID(class9_1.inventory[k4] - 1);
  3041. String s2 = itemDef.name;
  3042. if(itemDef.stackable || class9_1.inventoryValue[k4] != 1)
  3043. s2 = s2 + " x" + intToKOrMilLongName(class9_1.inventoryValue[k4]);
  3044. int i9 = k2 + i6 * (115 + class9_1.invSpritePadX);
  3045. int k9 = l2 + j5 * (12 + class9_1.invSpritePadY);
  3046. if(class9_1.textCentered)
  3047. textDrawingArea_1.method382(class9_1.disabledColor, i9 + class9_1.width / 2, s2, k9, class9_1.textShadowed);
  3048. else
  3049. textDrawingArea_1.method389(class9_1.textShadowed, i9, class9_1.disabledColor, s2, k9);
  3050. }
  3051. k4++;
  3052. }
  3053. }
  3054. }
  3055. if(class9_1.type == 8) {
  3056. String hoverText;
  3057. if (interfaceIsSelected(class9_1)){
  3058. hoverText = class9_1.aString228;
  3059. }else
  3060. hoverText = class9_1.message;
  3061. drawHoverBox(k2, l2, hoverText);
  3062. }
  3063. else if (class9_1.interfaceType == 8 && (anInt1500 == class9_1.id || anInt1044 == class9_1.id || anInt1129 == class9_1.id) && anInt1501 == 100) {
  3064. int boxWidth = 0;
  3065. int boxHeight = 0;
  3066. RSFont textDrawingArea_2 = aTextDrawingArea_1271;
  3067. for (String s1 = class9_1.disabledMessage; s1.length() > 0;) {
  3068. int l7 = s1.indexOf("\\n");
  3069. String s4;
  3070. if (l7 != -1) {
  3071. s4 = s1.substring(0, l7);
  3072. s1 = s1.substring(l7 + 2);
  3073. } else {
  3074. s4 = s1;
  3075. s1 = "";
  3076. }
  3077. int j10 = textDrawingArea_2.getTextWidth(s4);
  3078. if (j10 > boxWidth) {
  3079. boxWidth = j10;
  3080. }
  3081. boxHeight += textDrawingArea_2.anInt1497 + 1;
  3082. }
  3083. boxWidth += 6;
  3084. boxHeight += 7;
  3085. int xPos = (l2 + class9_1.width) - 5 - boxWidth;
  3086. int yPos = k2 + class9_1.height + 5;
  3087. if (xPos < l2 + 5) {
  3088. xPos = l2 + 5;
  3089. }
  3090. if (xPos + boxWidth > j + class9.width) {
  3091. xPos = (j + class9.width) - boxWidth;
  3092. }
  3093. if (yPos + boxHeight > k + class9.height) {
  3094. yPos = (k + class9.height) - boxHeight;
  3095. }
  3096. DrawingArea.method336(boxHeight, yPos, xPos, 0xFFFFA0, boxWidth);
  3097. DrawingArea.fillPixels(xPos, boxWidth, boxHeight, 0, yPos);
  3098. String s2 = class9_1.disabledMessage;
  3099. for (int j11 = yPos + textDrawingArea_2.anInt1497 + 2; s2.length() > 0; j11 += textDrawingArea_2.anInt1497 + 1) {//anInt1497
  3100. int l11 = s2.indexOf("\\n");
  3101. String s5;
  3102. if (l11 != -1) {
  3103. s5 = s2.substring(0, l11);
  3104. s2 = s2.substring(l11 + 2);
  3105. } else {
  3106. s5 = s2;
  3107. s2 = "";
  3108. }
  3109. textDrawingArea_2.method389(false, xPos + 3, 0, s5, j11);
  3110. }
  3111. } else if (class9_1.interfaceType == 9) {
  3112. drawHoverBox(k2, l2, class9_1.disabledMessage);
  3113. }else if (class9_1.interfaceType == 10 && (anInt1500 == class9_1.id || anInt1044 == class9_1.id || anInt1129 == class9_1.id) && !menuOpen) {
  3114. int boxWidth = 0;
  3115. int boxHeight = 0;
  3116.  
  3117. TextDrawingArea textDrawingArea_2 = newRegularFont;
  3118. for (String s1 = class9_1.disabledMessage; s1.length() > 0;) {
  3119. int l7 = s1.indexOf("\\n");
  3120. String s4;
  3121. if (l7 != -1) {
  3122. s4 = s1.substring(0, l7);
  3123. s1 = s1.substring(l7 + 2);
  3124. } else {
  3125. s4 = s1;
  3126. s1 = "";
  3127. }
  3128. int j10 = textDrawingArea_2.getTextWidth(s4);
  3129. if (j10 > boxWidth) {
  3130. boxWidth = j10;
  3131. }
  3132. boxHeight += textDrawingArea_2.baseCharacterHeight + 1;
  3133. }
  3134. boxWidth += 6;
  3135. boxHeight += 7;
  3136. int xPos = (k2 + class9_1.width) - 5 - boxWidth;
  3137. int yPos = l2 + class9_1.height + 5;
  3138. if (xPos < k2 + 5) {
  3139. xPos = k2 + 5;
  3140. }
  3141. if (xPos + boxWidth > j + class9.width) {
  3142. xPos = (j + class9.width) - boxWidth;
  3143. }
  3144. if (yPos + boxHeight > k + class9.height) {
  3145. yPos = (k + class9.height) - boxHeight;
  3146. }
  3147. if(class9.isInventoryInterface)
  3148. {
  3149. if(xPos + boxWidth + j > 249)
  3150. xPos = 251 - boxWidth - j;
  3151. if(yPos + boxHeight + k > 261)
  3152. yPos = 245 - boxHeight - k;
  3153. }
  3154. DrawingArea.method336(boxHeight, yPos, xPos, 0xFFFFA0, boxWidth);
  3155. DrawingArea.fillPixels(xPos, boxWidth, boxHeight, 0, yPos);
  3156. String s2 = class9_1.disabledMessage;
  3157. for (int j11 = yPos + textDrawingArea_2.baseCharacterHeight + 2; s2.length() > 0; j11 += textDrawingArea_2.baseCharacterHeight + 1) {//anInt1497
  3158. int l11 = s2.indexOf("\\n");
  3159. String s5;
  3160. if (l11 != -1) {
  3161. s5 = s2.substring(0, l11);
  3162. s2 = s2.substring(l11 + 2);
  3163. } else {
  3164. s5 = s2;
  3165. s2 = "";
  3166. }
  3167. // textDrawingArea_2.method389(false, xPos + 3, 0, s5, j11);
  3168. textDrawingArea_2.drawBasicString(s5, xPos+3,j11, 0, -1);
  3169. }
  3170. }
  3171. }
  3172. DrawingArea.setDrawingArea(l1, i1, k1, j1);
  3173. }
  3174.  
  3175. private void randomizeBackground(Background background) {
  3176. int j = 256;
  3177. for(int k = 0; k < anIntArray1190.length; k++)
  3178. anIntArray1190[k] = 0;
  3179.  
  3180. for(int l = 0; l < 5000; l++) {
  3181. int i1 = (int)(Math.random() * 128D * (double)j);
  3182. anIntArray1190[i1] = (int)(Math.random() * 256D);
  3183. }
  3184. for(int j1 = 0; j1 < 20; j1++) {
  3185. for(int k1 = 1; k1 < j - 1; k1++) {
  3186. for(int i2 = 1; i2 < 127; i2++) {
  3187. int k2 = i2 + (k1 << 7);
  3188. anIntArray1191[k2] = (anIntArray1190[k2 - 1] + anIntArray1190[k2 + 1] + anIntArray1190[k2 - 128] + anIntArray1190[k2 + 128]) / 4;
  3189. }
  3190.  
  3191. }
  3192. int ai[] = anIntArray1190;
  3193. anIntArray1190 = anIntArray1191;
  3194. anIntArray1191 = ai;
  3195. }
  3196. if(background != null) {
  3197. int l1 = 0;
  3198. for(int j2 = 0; j2 < background.anInt1453; j2++) {
  3199. for(int l2 = 0; l2 < background.anInt1452; l2++)
  3200. if(background.aByteArray1450[l1++] != 0) {
  3201. int i3 = l2 + 16 + background.anInt1454;
  3202. int j3 = j2 + 16 + background.anInt1455;
  3203. int k3 = i3 + (j3 << 7);
  3204. anIntArray1190[k3] = 0;
  3205. }
  3206. }
  3207. }
  3208. }
  3209.  
  3210. private void method107(int i, int j, Stream stream, Player player)
  3211. {
  3212. if((i & 0x400) != 0)
  3213. {
  3214. player.anInt1543 = stream.method428();
  3215. player.anInt1545 = stream.method428();
  3216. player.anInt1544 = stream.method428();
  3217. player.anInt1546 = stream.method428();
  3218. player.anInt1547 = stream.method436() + loopCycle;
  3219. player.anInt1548 = stream.method435() + loopCycle;
  3220. player.anInt1549 = stream.method428();
  3221. player.method446();
  3222. }
  3223. if((i & 0x100) != 0)
  3224. {
  3225. player.anInt1520 = stream.method434();
  3226. int k = stream.readDWord();
  3227. player.anInt1524 = k >> 16;
  3228. player.anInt1523 = loopCycle + (k & 0xffff);
  3229. player.anInt1521 = 0;
  3230. player.anInt1522 = 0;
  3231. if(player.anInt1523 > loopCycle)
  3232. player.anInt1521 = -1;
  3233. if(player.anInt1520 == 65535)
  3234. player.anInt1520 = -1;
  3235. }
  3236. if((i & 8) != 0)
  3237. {
  3238. int l = stream.method434();
  3239. if(l == 65535)
  3240. l = -1;
  3241. int i2 = stream.method427();
  3242. if(l == player.anim && l != -1)
  3243. {
  3244. int i3 = Animation.anims[l].anInt365;
  3245. if(i3 == 1)
  3246. {
  3247. player.anInt1527 = 0;
  3248. player.anInt1528 = 0;
  3249. player.anInt1529 = i2;
  3250. player.anInt1530 = 0;
  3251. }
  3252. if(i3 == 2)
  3253. player.anInt1530 = 0;
  3254. } else
  3255. if(l == -1 || player.anim == -1 || Animation.anims[l].anInt359 >= Animation.anims[player.anim].anInt359)
  3256. {
  3257. player.anim = l;
  3258. player.anInt1527 = 0;
  3259. player.anInt1528 = 0;
  3260. player.anInt1529 = i2;
  3261. player.anInt1530 = 0;
  3262. player.anInt1542 = player.smallXYIndex;
  3263. }
  3264. }
  3265. if((i & 4) != 0)
  3266. {
  3267. player.textSpoken = stream.readString();
  3268. if(player.textSpoken.charAt(0) == '~')
  3269. {
  3270. player.textSpoken = player.textSpoken.substring(1);
  3271. pushMessage(player.textSpoken, 2, player.name);
  3272. } else
  3273. if(player == myPlayer)
  3274. pushMessage(player.textSpoken, 2, player.name);
  3275. player.anInt1513 = 0;
  3276. player.anInt1531 = 0;
  3277. player.textCycle = 150;
  3278. }
  3279. if((i & 0x80) != 0)
  3280. {
  3281. //right fucking here
  3282. int i1 = stream.method434();
  3283. int j2 = stream.readUnsignedByte();
  3284. int j3 = stream.method427();
  3285. int k3 = stream.currentOffset;
  3286. if(player.name != null && player.visible)
  3287. {
  3288. long l3 = TextClass.longForName(player.name);
  3289. boolean flag = false;
  3290. if(j2 <= 1)
  3291. {
  3292. for(int i4 = 0; i4 < ignoreCount; i4++)
  3293. {
  3294. if(ignoreListAsLongs[i4] != l3)
  3295. continue;
  3296. flag = true;
  3297. break;
  3298. }
  3299.  
  3300. }
  3301. if(!flag && anInt1251 == 0)
  3302. try
  3303. {
  3304. aStream_834.currentOffset = 0;
  3305. stream.method442(j3, 0, aStream_834.buffer);
  3306. aStream_834.currentOffset = 0;
  3307. String s = TextInput.method525(j3, aStream_834);
  3308. //s = Censor.doCensor(s);
  3309. player.textSpoken = s;
  3310. player.anInt1513 = i1 >> 8;
  3311. player.privelage = j2;
  3312. player.anInt1531 = i1 & 0xff;
  3313. player.textCycle = 150;
  3314. //Other players see your icon
  3315. switch (j2) {
  3316. case 1:
  3317. pushMessage(s, 1, "@cr1@" + player.name);
  3318. break;
  3319. case 2:
  3320. pushMessage(s, 1, "@cr2@" + player.name);
  3321. break;
  3322. case 3:
  3323. pushMessage(s, 1, "@cr3@" + player.name);
  3324. break;
  3325. case 4:
  3326. pushMessage(s, 1, "@cr4@" + player.name);
  3327. break;
  3328. case 5:
  3329. pushMessage(s, 1, "@cr5@" + player.name);
  3330. break;
  3331. case 6:
  3332. pushMessage(s, 1, "@cr6@" + player.name);
  3333. break;
  3334. case 7:
  3335. pushMessage(s, 1, "@cr7@" + player.name);
  3336. break;
  3337. case 8:
  3338. pushMessage(s, 1, "@cr8@" + player.name);
  3339. break;
  3340. case 9:
  3341. pushMessage(s, 1, "@cr9@" + player.name);
  3342. break;
  3343. case 10:
  3344. pushMessage(s, 1, "@cr10@" + player.name);
  3345. break;
  3346. case 11:
  3347. pushMessage(s, 1, "@cr11@" + player.name);
  3348. break;
  3349. case 12:
  3350. pushMessage(s, 1, "@cr12@" + player.name);
  3351. break;
  3352. case 13:
  3353. pushMessage(s, 1, "@cr13@" + player.name);
  3354. break;
  3355. default:
  3356. pushMessage(s, 2, player.name);
  3357. break;
  3358. }
  3359. /**if(j2 == 4)
  3360. pushMessage(s, 1, "@cr4@<col=13132800>"+getRank(player.skill)+"</col>" + player.name);
  3361. else if(j2 == 3)
  3362. pushMessage(s, 1, "@cr2@<col=13132800>"+getRank(player.skill)+"</col>" + player.name);
  3363. else if(j2 == 5)
  3364. pushMessage(s, 1, "@cr5@<col=13132800>"+getRank(player.skill)+"</col>" + player.name);
  3365. else if(j2 == 6)
  3366. pushMessage(s, 1, "@cr6@<col=13132800>"+getRank(player.skill)+"</col>" + player.name);
  3367. else if(j2 == 2)
  3368. pushMessage(s, 1, "@cr2@<col=13132800>"+getRank(player.skill)+"</col>" + player.name);
  3369. else if (j2 == 1)
  3370. pushMessage(s, 1, "@cr1@<col=13132800>"+getRank(player.skill)+"</col>" + player.name);
  3371. else
  3372. pushMessage(s, 2, "<col=13132800>"+getRank(player.skill)+"</col>" + player.name);*/
  3373. }
  3374. catch(Exception exception)
  3375. {
  3376. signlink.reporterror("cde2");
  3377. }
  3378. }
  3379. stream.currentOffset = k3 + j3;
  3380. }
  3381. if((i & 1) != 0)
  3382. {
  3383. player.interactingEntity = stream.method434();
  3384. if(player.interactingEntity == 65535)
  3385. player.interactingEntity = -1;
  3386. }
  3387. if((i & 0x10) != 0)
  3388. {
  3389. int j1 = stream.method427();
  3390. byte abyte0[] = new byte[j1];
  3391. Stream stream_1 = new Stream(abyte0);
  3392. stream.readBytes(j1, 0, abyte0);
  3393. aStreamArray895s[j] = stream_1;
  3394. player.updatePlayer(stream_1);
  3395. }
  3396. if((i & 2) != 0)
  3397. {
  3398. player.anInt1538 = stream.method436();
  3399. player.anInt1539 = stream.method434();
  3400. }
  3401. if ((i & 0x20) != 0) {
  3402. int k1 = stream.readUnsignedByte();
  3403. int k2 = stream.method426();
  3404. int type1 = stream.readUnsignedByte();
  3405. player.updateHitData(k2, k1, type1, loopCycle);
  3406. player.loopCycleStatus = loopCycle + 300;
  3407. player.currentHealth = stream.method427();
  3408. player.maxHealth = stream.readUnsignedByte();
  3409. }
  3410. if ((i & 0x200) != 0) {
  3411. int l1 = stream.readUnsignedByte();
  3412. int l2 = stream.method428();
  3413. int type2 = stream.readUnsignedByte();
  3414. player.updateHitData(l2, l1, type2, loopCycle);
  3415. player.loopCycleStatus = loopCycle + 300;
  3416. player.currentHealth = stream.readUnsignedByte();
  3417. player.maxHealth = stream.method427();
  3418. }
  3419. }
  3420.  
  3421. private void method108()
  3422. {
  3423. try
  3424. {
  3425. int j = myPlayer.x + anInt1278;
  3426. int k = myPlayer.y + anInt1131;
  3427. if(anInt1014 - j < -500 || anInt1014 - j > 500 || anInt1015 - k < -500 || anInt1015 - k > 500)
  3428. {
  3429. anInt1014 = j;
  3430. anInt1015 = k;
  3431. }
  3432. if(anInt1014 != j)
  3433. anInt1014 += (j - anInt1014) / 16;
  3434. if(anInt1015 != k)
  3435. anInt1015 += (k - anInt1015) / 16;
  3436. if(super.keyArray[1] == 1)
  3437. anInt1186 += (-24 - anInt1186) / 2;
  3438. else
  3439. if(super.keyArray[2] == 1)
  3440. anInt1186 += (24 - anInt1186) / 2;
  3441. else
  3442. anInt1186 /= 2;
  3443. if(super.keyArray[3] == 1)
  3444. anInt1187 += (12 - anInt1187) / 2;
  3445. else
  3446. if(super.keyArray[4] == 1)
  3447. anInt1187 += (-12 - anInt1187) / 2;
  3448. else
  3449. anInt1187 /= 2;
  3450. minimapInt1 = minimapInt1 + anInt1186 / 2 & 0x7ff;
  3451. anInt1184 += anInt1187 / 2;
  3452. if(anInt1184 < 128)
  3453. anInt1184 = 128;
  3454. if(anInt1184 > 383)
  3455. anInt1184 = 383;
  3456. int l = anInt1014 >> 7;
  3457. int i1 = anInt1015 >> 7;
  3458. int j1 = method42(plane, anInt1015, anInt1014);
  3459. int k1 = 0;
  3460. if(l > 3 && i1 > 3 && l < 100 && i1 < 100)
  3461. {
  3462. for(int l1 = l - 4; l1 <= l + 4; l1++)
  3463. {
  3464. for(int k2 = i1 - 4; k2 <= i1 + 4; k2++)
  3465. {
  3466. int l2 = plane;
  3467. if(l2 < 3 && (byteGroundArray[1][l1][k2] & 2) == 2)
  3468. l2++;
  3469. int i3 = j1 - intGroundArray[l2][l1][k2];
  3470. if(i3 > k1)
  3471. k1 = i3;
  3472. }
  3473.  
  3474. }
  3475.  
  3476. }
  3477. anInt1005++;
  3478. if(anInt1005 > 1512)
  3479. {
  3480. anInt1005 = 0;
  3481. stream.createFrame(77);
  3482. stream.writeWordBigEndian(0);
  3483. int i2 = stream.currentOffset;
  3484. stream.writeWordBigEndian((int)(Math.random() * 256D));
  3485. stream.writeWordBigEndian(101);
  3486. stream.writeWordBigEndian(233);
  3487. stream.writeWord(45092);
  3488. if((int)(Math.random() * 2D) == 0)
  3489. stream.writeWord(35784);
  3490. stream.writeWordBigEndian((int)(Math.random() * 256D));
  3491. stream.writeWordBigEndian(64);
  3492. stream.writeWordBigEndian(38);
  3493. stream.writeWord((int)(Math.random() * 65536D));
  3494. stream.writeWord((int)(Math.random() * 65536D));
  3495. stream.writeBytes(stream.currentOffset - i2);
  3496. }
  3497. int j2 = k1 * 192;
  3498. if(j2 > 0x17f00)
  3499. j2 = 0x17f00;
  3500. if(j2 < 32768)
  3501. j2 = 32768;
  3502. if(j2 > anInt984)
  3503. {
  3504. anInt984 += (j2 - anInt984) / 24;
  3505. return;
  3506. }
  3507. if(j2 < anInt984)
  3508. {
  3509. anInt984 += (j2 - anInt984) / 80;
  3510. }
  3511. }
  3512. catch(Exception _ex)
  3513. {
  3514. signlink.reporterror("glfc_ex " + myPlayer.x + "," + myPlayer.y + "," + anInt1014 + "," + anInt1015 + "," + anInt1069 + "," + anInt1070 + "," + baseX + "," + baseY);
  3515. throw new RuntimeException("eek");
  3516. }
  3517. }
  3518.  
  3519. public void processDrawing()
  3520. {
  3521. if(rsAlreadyLoaded || loadingError || genericLoadingError)
  3522. {
  3523. showErrorScreen();
  3524. return;
  3525. }
  3526. anInt1061++;
  3527. if(!loggedIn) {
  3528. drawLoginScreen(false);
  3529. }else{
  3530. drawGameScreen();
  3531. }
  3532. anInt1213 = 0;
  3533. }
  3534.  
  3535. private boolean isFriendOrSelf(String s)
  3536. {
  3537. if(s == null)
  3538. return false;
  3539. for(int i = 0; i < friendsCount; i++)
  3540. if(s.equalsIgnoreCase(friendsList[i]))
  3541. return true;
  3542. return s.equalsIgnoreCase(myPlayer.name);
  3543. }
  3544.  
  3545. private static String combatDiffColor(int i, int j)
  3546. {
  3547. int k = i - j;
  3548. if(k < -9)
  3549. return "@red@";
  3550. if(k < -6)
  3551. return "@or3@";
  3552. if(k < -3)
  3553. return "@or2@";
  3554. if(k < 0)
  3555. return "@or1@";
  3556. if(k > 9)
  3557. return "@gre@";
  3558. if(k > 6)
  3559. return "@gr3@";
  3560. if(k > 3)
  3561. return "@gr2@";
  3562. if(k > 0)
  3563. return "@gr1@";
  3564. else
  3565. return "@yel@";
  3566. }
  3567.  
  3568. private void setWaveVolume(int i)
  3569. {
  3570. signlink.wavevol = i;
  3571. }
  3572.  
  3573. private void draw3dScreen()
  3574. {
  3575. alertHandler.processAlerts();
  3576. drawSplitPrivateChat();
  3577. if(crossType == 1)
  3578. {
  3579. crosses[crossIndex / 100].drawSprite(crossX - 8 - 4, crossY - 8 - 4);
  3580. anInt1142++;
  3581. if(anInt1142 > 67)
  3582. {
  3583. anInt1142 = 0;
  3584. stream.createFrame(78);
  3585. }
  3586. }
  3587. if(crossType == 2)
  3588. crosses[4 + crossIndex / 100].drawSprite(crossX - 8 - 4, crossY - 8 - 4);
  3589. if(anInt1018 != -1)
  3590. {
  3591. method119(anInt945, anInt1018);
  3592. drawInterface(0, 0, RSInterface.interfaceCache[anInt1018], 0);
  3593. }
  3594. if(openInterfaceID != -1)
  3595. {
  3596. method119(anInt945, openInterfaceID);
  3597. drawInterface(0, 0, RSInterface.interfaceCache[openInterfaceID], 0);
  3598. }
  3599. method70();
  3600. if(!menuOpen)
  3601. {
  3602. processRightClick();
  3603. drawTooltip();
  3604. } else
  3605. drawMenu(4, 4);
  3606. if(anInt1055 == 1)
  3607. multiOverlay.drawSprite(472, 296);
  3608. if(fpsOn)
  3609. {
  3610. char c = '\u01FB';
  3611. int k = 20;
  3612. int i1 = 0xffff00;
  3613. if(super.fps < 15)
  3614. i1 = 0xff0000;
  3615. aTextDrawingArea_1271.method380("Fps:" + super.fps, c, i1, k);
  3616. k += 15;
  3617. Runtime runtime = Runtime.getRuntime();
  3618. int j1 = (int)((runtime.totalMemory() - runtime.freeMemory()) / 1024L);
  3619. i1 = 0xffff00;
  3620. if(j1 > 0x2000000 && lowMem)
  3621. i1 = 0xff0000;
  3622. aTextDrawingArea_1271.method380("Mem:" + j1 + "k", c, 0xffff00, k);
  3623. k += 15;
  3624. }
  3625. int i1 = 0xffff00;
  3626. int x = baseX + (myPlayer.x - 6 >> 7);
  3627. int y = baseY + (myPlayer.y - 6 >> 7);
  3628. if (clientData)
  3629. {
  3630. char c = '\u01FB';
  3631. int k = 20;
  3632. if(super.fps < 15)
  3633. i1 = 0xff0000;
  3634. aTextDrawingArea_1271.method385(0xffff00, "Fps: " + super.fps, 285, 5);
  3635. Runtime runtime = Runtime.getRuntime();
  3636. int j1 = (int)((runtime.totalMemory() - runtime.freeMemory()) / 1024L);
  3637. i1 = 0xffff00;
  3638. if(j1 > 0x2000000 && lowMem)
  3639. i1 = 0xff0000;
  3640. k += 15;
  3641. aTextDrawingArea_1271.method385(0xffff00, "Mem: " + j1 + "k", 299, 5);
  3642. aTextDrawingArea_1271.method385(0xffff00, "Mouse X: " + super.mouseX + " , Mouse Y: " + super.mouseY, 314, 5);
  3643. aTextDrawingArea_1271.method385(0xffff00, "Coords: " + x + ", " + y, 329, 5);
  3644. }
  3645. if(anInt1104 != 0)
  3646. {
  3647. int j = anInt1104 / 50;
  3648. int l = j / 60;
  3649. j %= 60;
  3650. if(j < 10)
  3651. aTextDrawingArea_1271.method385(0xffff00, "System update in: " + l + ":0" + j, 329, 4);
  3652. else
  3653. aTextDrawingArea_1271.method385(0xffff00, "System update in: " + l + ":" + j, 329, 4);
  3654. anInt849++;
  3655. if(anInt849 > 75)
  3656. {
  3657. anInt849 = 0;
  3658. stream.createFrame(148);
  3659. }
  3660. }
  3661. }
  3662.  
  3663. private void addIgnore(long l)
  3664. {
  3665. try
  3666. {
  3667. if(l == 0L)
  3668. return;
  3669. if(ignoreCount >= 100)
  3670. {
  3671. pushMessage("Your ignore list is full. Max of 100 hit", 0, "");
  3672. return;
  3673. }
  3674. String s = TextClass.fixName(TextClass.nameForLong(l));
  3675. for(int j = 0; j < ignoreCount; j++)
  3676. if(ignoreListAsLongs[j] == l)
  3677. {
  3678. pushMessage(s + " is already on your ignore list", 0, "");
  3679. return;
  3680. }
  3681. for(int k = 0; k < friendsCount; k++)
  3682. if(friendsListAsLongs[k] == l)
  3683. {
  3684. pushMessage("Please remove " + s + " from your friend list first", 0, "");
  3685. return;
  3686. }
  3687.  
  3688. ignoreListAsLongs[ignoreCount++] = l;
  3689. needDrawTabArea = true;
  3690. stream.createFrame(133);
  3691. stream.writeQWord(l);
  3692. return;
  3693. }
  3694. catch(RuntimeException runtimeexception)
  3695. {
  3696. signlink.reporterror("45688, " + l + ", " + 4 + ", " + runtimeexception.toString());
  3697. }
  3698. throw new RuntimeException();
  3699. }
  3700.  
  3701. private void method114()
  3702. {
  3703. for(int i = -1; i < playerCount; i++)
  3704. {
  3705. int j;
  3706. if(i == -1)
  3707. j = myPlayerIndex;
  3708. else
  3709. j = playerIndices[i];
  3710. Player player = playerArray[j];
  3711. if(player != null)
  3712. method96(player);
  3713. }
  3714.  
  3715. }
  3716.  
  3717. private void method115()
  3718. {
  3719. if(loadingStage == 2)
  3720. {
  3721. for(Class30_Sub1 class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetFirst(); class30_sub1 != null; class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetNext())
  3722. {
  3723. if(class30_sub1.anInt1294 > 0)
  3724. class30_sub1.anInt1294--;
  3725. if(class30_sub1.anInt1294 == 0)
  3726. {
  3727. if(class30_sub1.anInt1299 < 0 || ObjectManager.method178(class30_sub1.anInt1299, class30_sub1.anInt1301))
  3728. {
  3729. method142(class30_sub1.anInt1298, class30_sub1.anInt1295, class30_sub1.anInt1300, class30_sub1.anInt1301, class30_sub1.anInt1297, class30_sub1.anInt1296, class30_sub1.anInt1299);
  3730. class30_sub1.unlink();
  3731. }
  3732. } else
  3733. {
  3734. if(class30_sub1.anInt1302 > 0)
  3735. class30_sub1.anInt1302--;
  3736. 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)))
  3737. {
  3738. method142(class30_sub1.anInt1298, class30_sub1.anInt1295, class30_sub1.anInt1292, class30_sub1.anInt1293, class30_sub1.anInt1297, class30_sub1.anInt1296, class30_sub1.anInt1291);
  3739. class30_sub1.anInt1302 = -1;
  3740. if(class30_sub1.anInt1291 == class30_sub1.anInt1299 && class30_sub1.anInt1299 == -1)
  3741. class30_sub1.unlink();
  3742. else
  3743. if(class30_sub1.anInt1291 == class30_sub1.anInt1299 && class30_sub1.anInt1292 == class30_sub1.anInt1300 && class30_sub1.anInt1293 == class30_sub1.anInt1301)
  3744. class30_sub1.unlink();
  3745. }
  3746. }
  3747. }
  3748.  
  3749. }
  3750. }
  3751.  
  3752.  
  3753. private void determineMenuSize() {
  3754. int i = chatTextDrawingArea.getTextWidth("Choose Option");
  3755. for(int j = 0; j < menuActionRow; j++)
  3756. {
  3757. int k = chatTextDrawingArea.getTextWidth(menuActionName[j]);
  3758. if(k > i)
  3759. i = k;
  3760. }
  3761. i += 8;
  3762. int l = 15 * menuActionRow + 21;
  3763. if(super.saveClickX > 0 && super.saveClickY > 0 && super.saveClickX < 765 && super.saveClickY < 503) {
  3764. int i1 = super.saveClickX - i / 2;
  3765. if(i1 + i > 765){
  3766. i1 = 765 - i;
  3767. }
  3768. if(i1 < 0){
  3769. i1 = 0;
  3770. }
  3771. int l1 = super.saveClickY - 0;
  3772. if(l1 + l > 503){
  3773. l1 = 503 - l;
  3774. }
  3775. if(l1 < 0){
  3776. l1 = 0;
  3777. }
  3778. menuOpen = true;
  3779. menuOffsetX = i1;
  3780. menuOffsetY = l1;
  3781. menuWidth = i;
  3782. menuHeight = 15 * menuActionRow + 22;
  3783. }
  3784. }
  3785.  
  3786. private void method117(Stream stream)
  3787. {
  3788. stream.initBitAccess();
  3789. int j = stream.readBits(1);
  3790. if(j == 0)
  3791. return;
  3792. int k = stream.readBits(2);
  3793. if(k == 0)
  3794. {
  3795. anIntArray894[anInt893++] = myPlayerIndex;
  3796. return;
  3797. }
  3798. if(k == 1)
  3799. {
  3800. int l = stream.readBits(3);
  3801. myPlayer.moveInDir(false, l);
  3802. int k1 = stream.readBits(1);
  3803. if(k1 == 1)
  3804. anIntArray894[anInt893++] = myPlayerIndex;
  3805. return;
  3806. }
  3807. if(k == 2)
  3808. {
  3809. int i1 = stream.readBits(3);
  3810. myPlayer.moveInDir(true, i1);
  3811. int l1 = stream.readBits(3);
  3812. myPlayer.moveInDir(true, l1);
  3813. int j2 = stream.readBits(1);
  3814. if(j2 == 1)
  3815. anIntArray894[anInt893++] = myPlayerIndex;
  3816. return;
  3817. }
  3818. if(k == 3)
  3819. {
  3820. plane = stream.readBits(2);
  3821. int j1 = stream.readBits(1);
  3822. int i2 = stream.readBits(1);
  3823. if(i2 == 1)
  3824. anIntArray894[anInt893++] = myPlayerIndex;
  3825. int k2 = stream.readBits(7);
  3826. int l2 = stream.readBits(7);
  3827. myPlayer.setPos(l2, k2, j1 == 1);
  3828. }
  3829. }
  3830.  
  3831. private void nullLoader()
  3832. {
  3833. aBoolean831 = false;
  3834. while(drawingFlames)
  3835. {
  3836. aBoolean831 = false;
  3837. try
  3838. {
  3839. Thread.sleep(50L);
  3840. }
  3841. catch(Exception _ex) { }
  3842. }
  3843. titleBox = null;
  3844. titleBox1 = null;
  3845. titleButton = null;
  3846. aBackgroundArray1152s = null;
  3847. anIntArray850 = null;
  3848. anIntArray851 = null;
  3849. anIntArray852 = null;
  3850. anIntArray853 = null;
  3851. anIntArray1190 = null;
  3852. anIntArray1191 = null;
  3853. anIntArray828 = null;
  3854. anIntArray829 = null;
  3855. aSprite_1201 = null;
  3856. aSprite_1202 = null;
  3857. }
  3858.  
  3859. private boolean method119(int i, int j)
  3860. {
  3861. boolean flag1 = false;
  3862. RSInterface class9 = RSInterface.interfaceCache[j];
  3863. for(int k = 0; k < class9.children.length; k++)
  3864. {
  3865. if(class9.children[k] == -1)
  3866. break;
  3867. RSInterface class9_1 = RSInterface.interfaceCache[class9.children[k]];
  3868. if(class9_1.interfaceType == 1)
  3869. flag1 |= method119(i, class9_1.id);
  3870. if(class9_1.interfaceType == 6 && (class9_1.disabledAnimation != -1 || class9_1.enabledAnimation != -1))
  3871. {
  3872. boolean flag2 = interfaceIsSelected(class9_1);
  3873. int l;
  3874. if(flag2)
  3875. l = class9_1.enabledAnimation;
  3876. else
  3877. l = class9_1.disabledAnimation;
  3878. if(l != -1)
  3879. {
  3880. Animation animation = Animation.anims[l];
  3881. for(class9_1.animationDelay += i; class9_1.animationDelay > animation.method258(class9_1.animationLength);)
  3882. {
  3883. class9_1.animationDelay -= animation.method258(class9_1.animationLength) + 1;
  3884. class9_1.animationLength++;
  3885. if(class9_1.animationLength >= animation.anInt352)
  3886. {
  3887. class9_1.animationLength -= animation.anInt356;
  3888. if(class9_1.animationLength < 0 || class9_1.animationLength >= animation.anInt352)
  3889. class9_1.animationLength = 0;
  3890. }
  3891. flag1 = true;
  3892. }
  3893.  
  3894. }
  3895. }
  3896. }
  3897.  
  3898. return flag1;
  3899. }
  3900.  
  3901. private int method120()
  3902. {
  3903. int j = 3;
  3904. if(yCameraCurve < 310)
  3905. {
  3906. int k = xCameraPos >> 7;
  3907. int l = yCameraPos >> 7;
  3908. int i1 = myPlayer.x >> 7;
  3909. int j1 = myPlayer.y >> 7;
  3910. if((byteGroundArray[plane][k][l] & 4) != 0)
  3911. j = plane;
  3912. int k1;
  3913. if(i1 > k)
  3914. k1 = i1 - k;
  3915. else
  3916. k1 = k - i1;
  3917. int l1;
  3918. if(j1 > l)
  3919. l1 = j1 - l;
  3920. else
  3921. l1 = l - j1;
  3922. if(k1 > l1)
  3923. {
  3924. int i2 = (l1 * 0x10000) / k1;
  3925. int k2 = 32768;
  3926. while(k != i1)
  3927. {
  3928. if(k < i1)
  3929. k++;
  3930. else
  3931. if(k > i1)
  3932. k--;
  3933. if((byteGroundArray[plane][k][l] & 4) != 0)
  3934. j = plane;
  3935. k2 += i2;
  3936. if(k2 >= 0x10000)
  3937. {
  3938. k2 -= 0x10000;
  3939. if(l < j1)
  3940. l++;
  3941. else
  3942. if(l > j1)
  3943. l--;
  3944. if((byteGroundArray[plane][k][l] & 4) != 0)
  3945. j = plane;
  3946. }
  3947. }
  3948. } else
  3949. {
  3950. int j2 = (k1 * 0x10000) / l1;
  3951. int l2 = 32768;
  3952. while(l != j1)
  3953. {
  3954. if(l < j1)
  3955. l++;
  3956. else
  3957. if(l > j1)
  3958. l--;
  3959. if((byteGroundArray[plane][k][l] & 4) != 0)
  3960. j = plane;
  3961. l2 += j2;
  3962. if(l2 >= 0x10000)
  3963. {
  3964. l2 -= 0x10000;
  3965. if(k < i1)
  3966. k++;
  3967. else
  3968. if(k > i1)
  3969. k--;
  3970. if((byteGroundArray[plane][k][l] & 4) != 0)
  3971. j = plane;
  3972. }
  3973. }
  3974. }
  3975. }
  3976. if((byteGroundArray[plane][myPlayer.x >> 7][myPlayer.y >> 7] & 4) != 0)
  3977. j = plane;
  3978. return j;
  3979. }
  3980.  
  3981. private int method121()
  3982. {
  3983. int j = method42(plane, yCameraPos, xCameraPos);
  3984. if(j - zCameraPos < 800 && (byteGroundArray[plane][xCameraPos >> 7][yCameraPos >> 7] & 4) != 0)
  3985. return plane;
  3986. else
  3987. return 3;
  3988. }
  3989.  
  3990. private void delIgnore(long l)
  3991. {
  3992. try
  3993. {
  3994. if(l == 0L)
  3995. return;
  3996. for(int j = 0; j < ignoreCount; j++)
  3997. if(ignoreListAsLongs[j] == l)
  3998. {
  3999. ignoreCount--;
  4000. needDrawTabArea = true;
  4001. System.arraycopy(ignoreListAsLongs, j + 1, ignoreListAsLongs, j, ignoreCount - j);
  4002.  
  4003. stream.createFrame(74);
  4004. stream.writeQWord(l);
  4005. return;
  4006. }
  4007.  
  4008. return;
  4009. }
  4010. catch(RuntimeException runtimeexception)
  4011. {
  4012. signlink.reporterror("47229, " + 3 + ", " + l + ", " + runtimeexception.toString());
  4013. }
  4014. throw new RuntimeException();
  4015. }
  4016.  
  4017.  
  4018. private void chatJoin(long l) {
  4019. try {
  4020. if(l == 0L)
  4021. return;
  4022. stream.createFrame(60);
  4023. stream.writeQWord(l);
  4024. return;
  4025. }
  4026. catch(RuntimeException runtimeexception)
  4027. {
  4028. signlink.reporterror("47229, " + 3 + ", " + l + ", " + runtimeexception.toString());
  4029. }
  4030. throw new RuntimeException();
  4031.  
  4032. }
  4033.  
  4034. public String getParameter(String s)
  4035. {
  4036. if(signlink.mainapp != null)
  4037. return signlink.mainapp.getParameter(s);
  4038. else
  4039. return super.getParameter(s);
  4040. }
  4041.  
  4042. private void adjustVolume(boolean flag, int i)
  4043. {
  4044. signlink.midivol = i;
  4045. if(flag)
  4046. signlink.midi = "voladjust";
  4047. }
  4048.  
  4049. private int extractInterfaceValues(RSInterface class9, int j)
  4050. {
  4051. if(class9.valueIndexArray == null || j >= class9.valueIndexArray.length)
  4052. return -2;
  4053. try
  4054. {
  4055. int ai[] = class9.valueIndexArray[j];
  4056. int k = 0;
  4057. int l = 0;
  4058. int i1 = 0;
  4059. do
  4060. {
  4061. int j1 = ai[l++];
  4062. int k1 = 0;
  4063. byte byte0 = 0;
  4064. if(j1 == 0)
  4065. return k;
  4066. if(j1 == 1)
  4067. k1 = currentStats[ai[l++]];
  4068. if(j1 == 2)
  4069. k1 = maxStats[ai[l++]];
  4070. if(j1 == 3)
  4071. k1 = currentExp[ai[l++]];
  4072. if(j1 == 4)
  4073. {
  4074. RSInterface class9_1 = RSInterface.interfaceCache[ai[l++]];
  4075. int k2 = ai[l++];
  4076. if(k2 >= 0 && k2 < ItemDef.totalItems && (!ItemDef.forID(k2).membersObject || isMembers))
  4077. {
  4078. for(int j3 = 0; j3 < class9_1.inventory.length; j3++)
  4079. if(class9_1.inventory[j3] == k2 + 1)
  4080. k1 += class9_1.inventoryValue[j3];
  4081.  
  4082. }
  4083. }
  4084. if(j1 == 5)
  4085. k1 = variousSettings[ai[l++]];
  4086. if(j1 == 6)
  4087. k1 = anIntArray1019[maxStats[ai[l++]] - 1];
  4088. if(j1 == 7)
  4089. k1 = (variousSettings[ai[l++]] * 100) / 46875;
  4090. if(j1 == 8)
  4091. k1 = myPlayer.combatLevel;
  4092. if(j1 == 9)
  4093. {
  4094. for(int l1 = 0; l1 < Skills.skillsCount; l1++)
  4095. if(Skills.skillEnabled[l1])
  4096. k1 += maxStats[l1];
  4097.  
  4098. }
  4099. if(j1 == 10)
  4100. {
  4101. RSInterface class9_2 = RSInterface.interfaceCache[ai[l++]];
  4102. int l2 = ai[l++] + 1;
  4103. if(l2 >= 0 && l2 < ItemDef.totalItems && (!ItemDef.forID(l2).membersObject || isMembers))
  4104. {
  4105. for(int k3 = 0; k3 < class9_2.inventory.length; k3++)
  4106. {
  4107. if(class9_2.inventory[k3] != l2)
  4108. continue;
  4109. k1 = 0x3b9ac9ff;
  4110. break;
  4111. }
  4112.  
  4113. }
  4114. }
  4115. if(j1 == 11)
  4116. k1 = energy;
  4117. if(j1 == 12)
  4118. k1 = weight;
  4119. if(j1 == 13)
  4120. {
  4121. int i2 = variousSettings[ai[l++]];
  4122. int i3 = ai[l++];
  4123. k1 = (i2 & 1 << i3) == 0 ? 0 : 1;
  4124. }
  4125. if(j1 == 14)
  4126. {
  4127. int j2 = ai[l++];
  4128. VarBit varBit = VarBit.cache[j2];
  4129. int l3 = varBit.anInt648;
  4130. int i4 = varBit.anInt649;
  4131. int j4 = varBit.anInt650;
  4132. int k4 = anIntArray1232[j4 - i4];
  4133. k1 = variousSettings[l3] >> i4 & k4;
  4134. }
  4135. if(j1 == 15)
  4136. byte0 = 1;
  4137. if(j1 == 16)
  4138. byte0 = 2;
  4139. if(j1 == 17)
  4140. byte0 = 3;
  4141. if(j1 == 18)
  4142. k1 = (myPlayer.x >> 7) + baseX;
  4143. if(j1 == 19)
  4144. k1 = (myPlayer.y >> 7) + baseY;
  4145. if(j1 == 20)
  4146. k1 = ai[l++];
  4147. if(byte0 == 0)
  4148. {
  4149. if(i1 == 0)
  4150. k += k1;
  4151. if(i1 == 1)
  4152. k -= k1;
  4153. if(i1 == 2 && k1 != 0)
  4154. k /= k1;
  4155. if(i1 == 3)
  4156. k *= k1;
  4157. i1 = 0;
  4158. } else
  4159. {
  4160. i1 = byte0;
  4161. }
  4162. } while(true);
  4163. }
  4164. catch(Exception _ex)
  4165. {
  4166. return -1;
  4167. }
  4168. }
  4169.  
  4170. private void drawTooltip() {
  4171. if(menuActionRow < 2 && itemSelected == 0 && spellSelected == 0)
  4172. return;
  4173. String s;
  4174. if(itemSelected == 1 && menuActionRow < 2)
  4175. s = "Use " + selectedItemName + " with...";
  4176. else if(spellSelected == 1 && menuActionRow < 2)
  4177. s = spellTooltip + "...";
  4178. else
  4179. s = menuActionName[menuActionRow - 1];
  4180. if(menuActionRow > 2)
  4181. s = s + "@whi@ / " + (menuActionRow - 2) + " more options";
  4182. chatTextDrawingArea.method390(4, 0xffffff, s, loopCycle / 1000, 15);
  4183. }
  4184.  
  4185. private void drawMinimap() {
  4186. int compassX, compassY, MapY, MapX;
  4187.  
  4188. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  4189. compassX = 11;
  4190. compassY = 8;
  4191. MapY = 9;
  4192. MapX = 38;
  4193. } else if(is474) {
  4194. compassX = 30;
  4195. compassY = 4;
  4196. MapY = 9;
  4197. MapX = 50;
  4198. } else {
  4199. compassX = 30+5;
  4200. compassY = 4;
  4201. MapY = 9;
  4202. MapX = 50+6;
  4203. }
  4204. mapBackImage.initDrawingArea();
  4205. drawSumm();
  4206. Increase.drawSprite(174, 135);
  4207. Decrease.drawSprite(230, 150);
  4208. if (anInt1021 == 2) {
  4209. Black[getSpriteID()].drawSprite(0, 0);
  4210. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  4211. loadOrbs();
  4212. }
  4213. compass.method352(33, minimapInt1, anIntArray1057, 256, anIntArray968, 25, compassY, compassX-1, 33, 25);
  4214. if(menuOpen){
  4215. drawMenu(516, 0);
  4216. }
  4217. inGameScreen.initDrawingArea();
  4218. return;
  4219. }
  4220. int i = minimapInt1 + minimapInt2 & 0x7ff;
  4221. int j = 48 + myPlayer.x / 32;
  4222. int l2 = 464 - myPlayer.y / 32;
  4223.  
  4224. for(int j1 = 0; j1 < anIntArray1229.length; j1++){
  4225. anIntArray1229[j1] = 172;
  4226. anIntArray1052[j1] = -22;
  4227. }
  4228. aSprite_1263.method352(152, i, anIntArray1229, 256 + minimapInt3, anIntArray1052, l2, MapY, MapX, 146, j);
  4229. compass.method352(33, minimapInt1, anIntArray1057, 256, anIntArray968, 25, compassY, compassX-1, 33, 25);
  4230.  
  4231. for(int j5 = 0; j5 < anInt1071; j5++) {
  4232. try {
  4233. int k = (anIntArray1072[j5] * 4 + 2) - myPlayer.x / 32;
  4234. int i3 = (anIntArray1073[j5] * 4 + 2) - myPlayer.y / 32;
  4235. markMinimap(aSpriteArray1140[j5], k, i3, false);
  4236. } catch(Exception exception) {
  4237. }
  4238. }
  4239.  
  4240. for(int k5 = 0; k5 < 104; k5++) {
  4241. for(int l5 = 0; l5 < 104; l5++) {
  4242. NodeList class19 = groundArray[plane][k5][l5];
  4243. if(class19 != null) {
  4244. int l = (k5 * 4 + 2) - myPlayer.x / 32;
  4245. int j3 = (l5 * 4 + 2) - myPlayer.y / 32;
  4246. markMinimap(mapDotItem, l, j3, false);
  4247. }
  4248. }
  4249. }
  4250.  
  4251. for(int i6 = 0; i6 < npcCount; i6++) {
  4252. NPC npc = npcArray[npcIndices[i6]];
  4253. if(npc != null && npc.isVisible()) {
  4254. EntityDef entityDef = npc.desc;
  4255. if(entityDef.childrenIDs != null)
  4256. entityDef = entityDef.method161();
  4257. if(entityDef != null && entityDef.aBoolean87 && entityDef.aBoolean84) {
  4258. int i1 = npc.x / 32 - myPlayer.x / 32;
  4259. int k3 = npc.y / 32 - myPlayer.y / 32;
  4260. markMinimap(mapDotNPC, i1, k3, false);
  4261. }
  4262. }
  4263. }
  4264. for(int j6 = 0; j6 < playerCount; j6++) {
  4265. Player player = playerArray[playerIndices[j6]];
  4266. if(player != null && player.isVisible()) {
  4267. int j1 = player.x / 32 - myPlayer.x / 32;
  4268. int l3 = player.y / 32 - myPlayer.y / 32;
  4269. boolean flag1 = false;
  4270. boolean flag3 = false;
  4271. for (int j3 = 0; j3 < clanList.length; j3++) {
  4272. if (clanList[j3] == null)
  4273. continue;
  4274. if (!clanList[j3].equalsIgnoreCase(player.name))
  4275. continue;
  4276. flag3 = true;
  4277. break;
  4278. }
  4279. long l6 = TextClass.longForName(player.name);
  4280. for(int k6 = 0; k6 < friendsCount; k6++) {
  4281. if(l6 != friendsListAsLongs[k6] || friendsNodeIDs[k6] == 0)
  4282. continue;
  4283. flag1 = true;
  4284. break;
  4285. }
  4286. boolean flag2 = false;
  4287. if(myPlayer.team != 0 && player.team != 0 && myPlayer.team == player.team)
  4288. flag2 = true;
  4289. if(flag1)
  4290. markMinimap(mapDotFriend, j1, l3, false);
  4291. else if(flag3)
  4292. markMinimap(mapDotClan, j1, l3, false);
  4293. else if(flag2)
  4294. markMinimap(mapDotTeam, j1, l3, false);
  4295. else
  4296. markMinimap(mapDotPlayer, j1, l3, false);
  4297. }
  4298. }
  4299. if(anInt855 != 0 && loopCycle % 20 < 10) {
  4300. if(anInt855 == 1 && anInt1222 >= 0 && anInt1222 < npcArray.length) {
  4301. NPC class30_sub2_sub4_sub1_sub1_1 = npcArray[anInt1222];
  4302. if(class30_sub2_sub4_sub1_sub1_1 != null) {
  4303. int k1 = class30_sub2_sub4_sub1_sub1_1.x / 32 - myPlayer.x / 32;
  4304. int i4 = class30_sub2_sub4_sub1_sub1_1.y / 32 - myPlayer.y / 32;
  4305. method81(mapMarker, i4, k1);
  4306. }
  4307. }
  4308. if(anInt855 == 2) {
  4309. int l1 = ((anInt934 - baseX) * 4 + 2) - myPlayer.x / 32;
  4310. int j4 = ((anInt935 - baseY) * 4 + 2) - myPlayer.y / 32;
  4311. method81(mapMarker, j4, l1);
  4312. }
  4313. if(anInt855 == 10 && anInt933 >= 0 && anInt933 < playerArray.length) {
  4314. Player class30_sub2_sub4_sub1_sub2_1 = playerArray[anInt933];
  4315. if(class30_sub2_sub4_sub1_sub2_1 != null) {
  4316. int i2 = class30_sub2_sub4_sub1_sub2_1.x / 32 - myPlayer.x / 32;
  4317. int k4 = class30_sub2_sub4_sub1_sub2_1.y / 32 - myPlayer.y / 32;
  4318. method81(mapMarker, k4, i2);
  4319. }
  4320. }
  4321. }
  4322. if(destX != 0) {
  4323. int j2 = (destX * 4 + 2) - myPlayer.x / 32;
  4324. int l4 = (destY * 4 + 2) - myPlayer.y / 32;
  4325. markMinimap(mapFlag, j2, l4, false);
  4326. }
  4327. CustomMapback[getSpriteID()].drawSprite(0, 0);
  4328. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  4329. loadOrbs();
  4330. DrawingArea.drawPixels(3, 84, 108, 0xffffff, 3);
  4331. } else {
  4332. DrawingArea.drawPixels(3, 84, 124, 0xffffff, 3);
  4333. }
  4334. if(menuOpen)
  4335. drawMenu(516, 0);
  4336. inGameScreen.initDrawingArea();
  4337. }
  4338.  
  4339. private void npcScreenPos(Entity entity, int i) {
  4340. calcEntityScreenPos(entity.x, i, entity.y);
  4341. }
  4342.  
  4343. private void calcEntityScreenPos(int i, int j, int l) {
  4344. if(i < 128 || l < 128 || i > 13056 || l > 13056) {
  4345. spriteDrawX = -1;
  4346. spriteDrawY = -1;
  4347. return;
  4348. }
  4349. int i1 = method42(plane, l, i) - j;
  4350. i -= xCameraPos;
  4351. i1 -= zCameraPos;
  4352. l -= yCameraPos;
  4353. int j1 = Model.modelIntArray1[yCameraCurve];
  4354. int k1 = Model.modelIntArray2[yCameraCurve];
  4355. int l1 = Model.modelIntArray1[xCameraCurve];
  4356. int i2 = Model.modelIntArray2[xCameraCurve];
  4357. int j2 = l * l1 + i * i2 >> 16;
  4358. l = l * i2 - i * l1 >> 16;
  4359. i = j2;
  4360. j2 = i1 * k1 - l * j1 >> 16;
  4361. l = i1 * j1 + l * k1 >> 16;
  4362. i1 = j2;
  4363. if(l >= 50) {
  4364. spriteDrawX = Texture.textureInt1 + (i << 9) / l;
  4365. spriteDrawY = Texture.textureInt2 + (i1 << 9) / l;
  4366. } else {
  4367. spriteDrawX = -1;
  4368. spriteDrawY = -1;
  4369. }
  4370. }
  4371.  
  4372. private void buildSplitPrivateChatMenu()
  4373. {
  4374. if(splitPrivateChat == 0)
  4375. return;
  4376. int i = 0;
  4377. if(anInt1104 != 0)
  4378. i = 1;
  4379. for(int j = 0; j < 100; j++)
  4380. if(chatMessages[j] != null)
  4381. {
  4382. int k = chatTypes[j];
  4383. String s = chatNames[j];
  4384. boolean flag1 = false;
  4385. if(s != null && s.startsWith("@cr1@")) {
  4386. s = s.substring(5);
  4387. boolean flag2 = true;
  4388. byte byte0 = 1;
  4389. }
  4390. if(s != null && s.startsWith("@cr2@")) {
  4391. s = s.substring(5);
  4392. byte byte0 = 2;
  4393. }
  4394. if(s != null && s.startsWith("@cr3@")) {
  4395. s = s.substring(5);
  4396. byte byte0 = 3;
  4397. }
  4398. if(s != null && s.startsWith("@cr4@")) {
  4399. s = s.substring(5);
  4400. byte byte0 = 4;
  4401. }
  4402. if(s != null && s.startsWith("@cr5@")) {
  4403. s = s.substring(5);
  4404. byte byte0 = 5;
  4405. }
  4406. if(s != null && s.startsWith("@cr6@")) {
  4407. s = s.substring(5);
  4408. byte byte0 = 6;
  4409. }
  4410. if(s != null && s.startsWith("@cr7@")) {
  4411. s = s.substring(5);
  4412. byte byte0 = 7;
  4413. }
  4414. if(s != null && s.startsWith("@cr8@")) {
  4415. s = s.substring(5);
  4416. byte byte0 = 8;
  4417. }
  4418. if(s != null && s.startsWith("@cr9@")) {
  4419. s = s.substring(5);
  4420. byte byte0 = 9;
  4421. }
  4422. if(s != null && s.startsWith("@cr10@")) {
  4423. s = s.substring(6);
  4424. byte byte0 = 10;
  4425. }
  4426. if(s != null && s.startsWith("@cr11@")) {
  4427. s = s.substring(6);
  4428. byte byte0 = 11;
  4429. }
  4430. if(s != null && s.startsWith("@cr12@")) {
  4431. s = s.substring(6);
  4432. byte byte0 = 12;
  4433. }
  4434. if(s != null && s.startsWith("@cr13@")) {
  4435. s = s.substring(6);
  4436. byte byte0 = 13;
  4437. }
  4438. if((k == 3 || k == 7) && (k == 7 || privateChatMode == 0 || privateChatMode == 1 && isFriendOrSelf(s)))
  4439. {
  4440. int l = 329 - i * 13;
  4441. if(super.mouseX > 4 && super.mouseY - 4 > l - 10 && super.mouseY - 4 <= l + 3)
  4442. {
  4443. int i1 = aTextDrawingArea_1271.getTextWidth("From: " + s + chatMessages[j]) + 25;
  4444. if(i1 > 450)
  4445. i1 = 450;
  4446. if(super.mouseX < 4 + i1)
  4447. {
  4448. if(myPrivilege >= 1)
  4449. {
  4450. menuActionName[menuActionRow] = "Report abuse @whi@";
  4451. menuActionID[menuActionRow] = 2606;
  4452. menuActionRow++;
  4453. }
  4454. menuActionName[menuActionRow] = "Add ignore";
  4455. menuActionID[menuActionRow] = 42;
  4456. menuActionRow++;
  4457. menuActionName[menuActionRow] = "Add friend";
  4458. menuActionID[menuActionRow] = 337;
  4459. menuActionRow++;
  4460. }
  4461. }
  4462. if(++i >= 5)
  4463. return;
  4464. }
  4465. if((k == 5 || k == 6) && privateChatMode < 2 && ++i >= 5)
  4466. return;
  4467. }
  4468.  
  4469. }
  4470.  
  4471. private void method130(int j, int k, int l, int i1, int j1, int k1,
  4472. int l1, int i2, int j2)
  4473. {
  4474. Class30_Sub1 class30_sub1 = null;
  4475. for(Class30_Sub1 class30_sub1_1 = (Class30_Sub1)aClass19_1179.reverseGetFirst(); class30_sub1_1 != null; class30_sub1_1 = (Class30_Sub1)aClass19_1179.reverseGetNext())
  4476. {
  4477. if(class30_sub1_1.anInt1295 != l1 || class30_sub1_1.anInt1297 != i2 || class30_sub1_1.anInt1298 != j1 || class30_sub1_1.anInt1296 != i1)
  4478. continue;
  4479. class30_sub1 = class30_sub1_1;
  4480. break;
  4481. }
  4482.  
  4483. if(class30_sub1 == null)
  4484. {
  4485. class30_sub1 = new Class30_Sub1();
  4486. class30_sub1.anInt1295 = l1;
  4487. class30_sub1.anInt1296 = i1;
  4488. class30_sub1.anInt1297 = i2;
  4489. class30_sub1.anInt1298 = j1;
  4490. method89(class30_sub1);
  4491. aClass19_1179.insertHead(class30_sub1);
  4492. }
  4493. class30_sub1.anInt1291 = k;
  4494. class30_sub1.anInt1293 = k1;
  4495. class30_sub1.anInt1292 = l;
  4496. class30_sub1.anInt1302 = j2;
  4497. class30_sub1.anInt1294 = j;
  4498. }
  4499.  
  4500. private boolean interfaceIsSelected(RSInterface class9)
  4501. {
  4502. if(class9.valueCompareType == null)
  4503. return false;
  4504. for(int i = 0; i < class9.valueCompareType.length; i++)
  4505. {
  4506. int j = extractInterfaceValues(class9, i);
  4507. int k = class9.requiredValues[i];
  4508. if(class9.valueCompareType[i] == 2)
  4509. {
  4510. if(j >= k)
  4511. return false;
  4512. } else
  4513. if(class9.valueCompareType[i] == 3)
  4514. {
  4515. if(j <= k)
  4516. return false;
  4517. } else
  4518. if(class9.valueCompareType[i] == 4)
  4519. {
  4520. if(j == k)
  4521. return false;
  4522. } else
  4523. if(j != k)
  4524. return false;
  4525. }
  4526.  
  4527. return true;
  4528. }
  4529.  
  4530. private DataInputStream openJagGrabInputStream(String s)
  4531. throws IOException
  4532. {
  4533. // if(!aBoolean872)
  4534. // if(signlink.mainapp != null)
  4535. // return signlink.openurl(s);
  4536. // else
  4537. // return new DataInputStream((new URL(getCodeBase(), s)).openStream());
  4538. if(aSocket832 != null)
  4539. {
  4540. try
  4541. {
  4542. aSocket832.close();
  4543. System.out.println("Here5");
  4544. }
  4545. catch(Exception _ex) { }
  4546. aSocket832 = null;
  4547. }
  4548. aSocket832 = openSocket(43594);//43594
  4549. aSocket832.setSoTimeout(10000);
  4550. java.io.InputStream inputstream = aSocket832.getInputStream();
  4551. OutputStream outputstream = aSocket832.getOutputStream();
  4552. outputstream.write(("JAGGRAB /" + s + "\n\n").getBytes());
  4553. return new DataInputStream(inputstream);
  4554. }
  4555.  
  4556. private void doFlamesDrawing()
  4557. {
  4558. char c = '\u0100';
  4559. if(anInt1040 > 0)
  4560. {
  4561. for(int i = 0; i < 256; i++)
  4562. if(anInt1040 > 768)
  4563. anIntArray850[i] = method83(anIntArray851[i], anIntArray852[i], 1024 - anInt1040);
  4564. else
  4565. if(anInt1040 > 256)
  4566. anIntArray850[i] = anIntArray852[i];
  4567. else
  4568. anIntArray850[i] = method83(anIntArray852[i], anIntArray851[i], 256 - anInt1040);
  4569.  
  4570. } else
  4571. if(anInt1041 > 0)
  4572. {
  4573. for(int j = 0; j < 256; j++)
  4574. if(anInt1041 > 768)
  4575. anIntArray850[j] = method83(anIntArray851[j], anIntArray853[j], 1024 - anInt1041);
  4576. else
  4577. if(anInt1041 > 256)
  4578. anIntArray850[j] = anIntArray853[j];
  4579. else
  4580. anIntArray850[j] = method83(anIntArray853[j], anIntArray851[j], 256 - anInt1041);
  4581.  
  4582. } else
  4583. {
  4584. System.arraycopy(anIntArray851, 0, anIntArray850, 0, 256);
  4585.  
  4586. }
  4587. System.arraycopy(aSprite_1201.myPixels, 0, leftSideFlame.anIntArray315, 0, 33920);
  4588.  
  4589. int i1 = 0;
  4590. int j1 = 1152;
  4591. for(int k1 = 1; k1 < c - 1; k1++)
  4592. {
  4593. int l1 = (anIntArray969[k1] * (c - k1)) / c;
  4594. int j2 = 22 + l1;
  4595. if(j2 < 0)
  4596. j2 = 0;
  4597. i1 += j2;
  4598. for(int l2 = j2; l2 < 128; l2++)
  4599. {
  4600. int j3 = anIntArray828[i1++];
  4601. if(j3 != 0)
  4602. {
  4603. int l3 = j3;
  4604. int j4 = 256 - j3;
  4605. j3 = anIntArray850[j3];
  4606. int l4 = leftSideFlame.anIntArray315[j1];
  4607. leftSideFlame.anIntArray315[j1++] = ((j3 & 0xff00ff) * l3 + (l4 & 0xff00ff) * j4 & 0xff00ff00) + ((j3 & 0xff00) * l3 + (l4 & 0xff00) * j4 & 0xff0000) >> 8;
  4608. } else
  4609. {
  4610. j1++;
  4611. }
  4612. }
  4613.  
  4614. j1 += j2;
  4615. }
  4616.  
  4617. leftSideFlame.drawGraphics(0, super.graphics, 0);
  4618. System.arraycopy(aSprite_1202.myPixels, 0, rightSideFlame.anIntArray315, 0, 33920);
  4619.  
  4620. i1 = 0;
  4621. j1 = 1176;
  4622. for(int k2 = 1; k2 < c - 1; k2++)
  4623. {
  4624. int i3 = (anIntArray969[k2] * (c - k2)) / c;
  4625. int k3 = 103 - i3;
  4626. j1 += i3;
  4627. for(int i4 = 0; i4 < k3; i4++)
  4628. {
  4629. int k4 = anIntArray828[i1++];
  4630. if(k4 != 0)
  4631. {
  4632. int i5 = k4;
  4633. int j5 = 256 - k4;
  4634. k4 = anIntArray850[k4];
  4635. int k5 = rightSideFlame.anIntArray315[j1];
  4636. rightSideFlame.anIntArray315[j1++] = ((k4 & 0xff00ff) * i5 + (k5 & 0xff00ff) * j5 & 0xff00ff00) + ((k4 & 0xff00) * i5 + (k5 & 0xff00) * j5 & 0xff0000) >> 8;
  4637. } else
  4638. {
  4639. j1++;
  4640. }
  4641. }
  4642.  
  4643. i1 += 128 - k3;
  4644. j1 += 128 - k3 - i3;
  4645. }
  4646.  
  4647. rightSideFlame.drawGraphics(0, super.graphics, 637);
  4648. }
  4649.  
  4650. private void method134(Stream stream)
  4651. {
  4652. int j = stream.readBits(8);
  4653. if(j < playerCount)
  4654. {
  4655. for(int k = j; k < playerCount; k++)
  4656. anIntArray840[anInt839++] = playerIndices[k];
  4657.  
  4658. }
  4659. if(j > playerCount)
  4660. {
  4661. signlink.reporterror(myUsername + " Too many players");
  4662. throw new RuntimeException("eek");
  4663. }
  4664. playerCount = 0;
  4665. for(int l = 0; l < j; l++)
  4666. {
  4667. int i1 = playerIndices[l];
  4668. Player player = playerArray[i1];
  4669. int j1 = stream.readBits(1);
  4670. if(j1 == 0)
  4671. {
  4672. playerIndices[playerCount++] = i1;
  4673. player.anInt1537 = loopCycle;
  4674. } else
  4675. {
  4676. int k1 = stream.readBits(2);
  4677. if(k1 == 0)
  4678. {
  4679. playerIndices[playerCount++] = i1;
  4680. player.anInt1537 = loopCycle;
  4681. anIntArray894[anInt893++] = i1;
  4682. } else
  4683. if(k1 == 1)
  4684. {
  4685. playerIndices[playerCount++] = i1;
  4686. player.anInt1537 = loopCycle;
  4687. int l1 = stream.readBits(3);
  4688. player.moveInDir(false, l1);
  4689. int j2 = stream.readBits(1);
  4690. if(j2 == 1)
  4691. anIntArray894[anInt893++] = i1;
  4692. } else
  4693. if(k1 == 2)
  4694. {
  4695. playerIndices[playerCount++] = i1;
  4696. player.anInt1537 = loopCycle;
  4697. int i2 = stream.readBits(3);
  4698. player.moveInDir(true, i2);
  4699. int k2 = stream.readBits(3);
  4700. player.moveInDir(true, k2);
  4701. int l2 = stream.readBits(1);
  4702. if(l2 == 1)
  4703. anIntArray894[anInt893++] = i1;
  4704. } else
  4705. if(k1 == 3)
  4706. anIntArray840[anInt839++] = i1;
  4707. }
  4708. }
  4709. }
  4710.  
  4711. private void drawLoginScreen(boolean flag) {
  4712. if (normalLogin == true) {
  4713. resetImageProducers();
  4714. loginScreenArea.initDrawingArea();
  4715. titleBox.drawSprite(0, 0);
  4716. char c = '\u0168';
  4717. char c1 = '\310';
  4718. if(loginScreenState == 0) {
  4719. int i = c1 / 2 + 80;
  4720. smallText.method382(0x75a9a9, c / 2, onDemandFetcher.statusString, i, true);
  4721. i = c1 / 2 - 20;
  4722. chatTextDrawingArea.method382(0xffff00, c / 2, "Welcome to Primal Project", i, true);
  4723. i += 30;
  4724. int l = c / 2 - 80;
  4725. int k1 = c1 / 2 + 20;
  4726. titleButton.drawSprite(l - 73, k1 - 20);
  4727. chatTextDrawingArea.method382(0xffffff, l, "Information", k1 + 5, true);
  4728. l = c / 2 + 80;
  4729. titleButton.drawSprite(l - 73, k1 - 20);
  4730. chatTextDrawingArea.method382(0xffffff, l, "Play", k1 + 5, true);
  4731. }
  4732. if(loginScreenState == 2) {
  4733. int j = c1 / 2 - 40;
  4734. if(loginMessage1.length() > 0) {
  4735. chatTextDrawingArea.method382(0xffff00, c / 2, loginMessage1, j - 15, true);
  4736. chatTextDrawingArea.method382(0xffff00, c / 2, loginMessage2, j, true);
  4737. j += 30;
  4738. } else {
  4739. chatTextDrawingArea.method382(0xffff00, c / 2, loginMessage2, j - 7, true);
  4740. j += 30;
  4741. }
  4742. chatTextDrawingArea.method389(true, c / 2 - 90, 0xffffff, "Username: " + capitalize(myUsername) + ((loginScreenCursorPos == 0) & (loopCycle % 40 < 20) ? "@yel@|" : ""), j);
  4743. j += 15;
  4744. chatTextDrawingArea.method389(true, c / 2 - 88, 0xffffff, "Password: " + TextClass.passwordAsterisks(myPassword) + ((loginScreenCursorPos == 1) & (loopCycle % 40 < 20) ? "@yel@|" : ""), j);
  4745. j += 15;
  4746. if(!flag) {
  4747. int i1 = c / 2 - 80;
  4748. int l1 = c1 / 2 + 50;
  4749. titleButton.drawSprite(i1 - 73, l1 - 20);
  4750. chatTextDrawingArea.method382(0xffffff, i1, "Enter World", l1 + 5, true);
  4751. i1 = c / 2 + 80;
  4752. titleButton.drawSprite(i1 - 73, l1 - 20);
  4753. chatTextDrawingArea.method382(0xffffff, i1, "Return", l1 + 5, true);
  4754. }
  4755. }
  4756. if(loginScreenState == 3) {
  4757. chatTextDrawingArea.method382(0xffff00, c / 2, "Primal Project Information", c1 / 2 - 60, true);
  4758. int k = c1 / 2 - 35;
  4759. chatTextDrawingArea.method382(0xffffff, c / 2, "Our Website: www.primalproject.co.uk", k, true);
  4760. k += 15;
  4761. chatTextDrawingArea.method382(0xffffff, c / 2, "Please Vote for us DAILY with ::vote", k, true);
  4762. k += 15;
  4763. chatTextDrawingArea.method382(0xffffff, c / 2, "Reporting Glitches on the Forum is Rewarded.", k, true);
  4764. k += 15;
  4765. chatTextDrawingArea.method382(0xffffff, c / 2, "To login, go back and Click Play.", k, true);
  4766. k += 15;
  4767. int j1 = c / 2;
  4768. int i2 = c1 / 2 + 50;
  4769. titleButton.drawSprite(j1 - 73, i2 - 20);
  4770. chatTextDrawingArea.method382(0xffffff, j1, "Go Back", i2 + 5, true);
  4771. }
  4772. loginScreenArea.drawGraphics(171, super.graphics, 202);
  4773. if(welcomeScreenRaised) {
  4774. welcomeScreenRaised = false;
  4775. aRSImageProducer_1107.drawGraphics(0, super.graphics, 128);
  4776. aRSImageProducer_1108.drawGraphics(371, super.graphics, 202);
  4777. gameLogo.drawGraphics(265, super.graphics, 0);
  4778. aRSImageProducer_1113.drawGraphics(265, super.graphics, 562);
  4779. aRSImageProducer_1114.drawGraphics(171, super.graphics, 128);
  4780. aRSImageProducer_1115.drawGraphics(171, super.graphics, 562);
  4781. }
  4782. } else if(normalLogin == false) {
  4783. resetImageProducers();
  4784. loginScreenArea.initDrawingArea();
  4785. byte abyte0[] = titleStreamLoader.getDataForName("title.dat");
  4786. Sprite loginArea = new Sprite(abyte0, this);
  4787. loginArea.drawSprite(0, 0);
  4788.  
  4789. if(loginScreenState == 0) {
  4790. titleBox1.drawSprite(237-204, 138+25);
  4791. addLoginScreenHover(LOGIN, 8, 287-204, 182+25, 9);
  4792. if (super.saveClickX >= 361-204 && super.saveClickX <= 361-204+34 && super.saveClickY >= 360+15 && super.saveClickY <= 360+15+15) {
  4793. }
  4794. Sprite scrollLine = new Sprite("Login/Random/LINE");
  4795. scrollLine.drawSprite(297-204, 277+25);
  4796. scrollLine.drawSprite(297-204, 356+25);
  4797. smallText.method382(0xffffff, 332-204, "Standard Detail", 351+25, false);
  4798. smallText.method382(0xffffff, 428-204, "High Detail", 351+25, false);
  4799. if (super.saveClickX >= 306-204 && super.saveClickX <= 362-204 && super.saveClickY >= 303+25 && super.saveClickY <= 336+25) {
  4800. isClicked = 0;
  4801. }
  4802. if(super.saveClickX >= 402-204 && super.saveClickX <= 458-204 && super.saveClickY >= 302+25 && super.saveClickY <= 336+25) {
  4803. isClicked = 1;
  4804. }
  4805. if(isClicked != 0){
  4806. LOGIN[26].drawSprite(401-204, 303+25);
  4807. addLoginScreenHover(LOGIN, 25, 305-204, 303+25, 20);
  4808. LOGIN[22].drawSprite(446-204, 326+25);
  4809. } else if(isClicked == 0) {
  4810. LOGIN[20].drawSprite(305-204, 303+25);
  4811. addLoginScreenHover(LOGIN, 21, 401-204, 303+25, 27);
  4812. LOGIN[22].drawSprite(350-204, 326+25);
  4813. }
  4814. loginScreenArea.drawGraphics(0, super.graphics, 0);
  4815. }
  4816. if(loginScreenState == 1) {
  4817. titleBox1.drawSprite(237-204, 138+25);
  4818. LOGIN[0].drawSprite(333-204, 182+25);
  4819. LOGIN[1].drawSprite(344-204, 253+32);
  4820. LOGIN[2].drawSprite(346-204, 308+40);
  4821. LOGIN[5].drawSprite(290-204, 267+25);
  4822. LOGIN[5].drawSprite(290-204, 329+25);
  4823. addLoginScreenHover(LOGIN, 3, 358-204, 380+25, 4);
  4824. addLoginScreenHover(LOGIN, 6, 338-204, 415+25, 7);
  4825. smallText.method382(0xffffff, 380-204, "World 1", 212+25, false);
  4826. smallText.method382(0xffe1be, 380-204, myUsername, 238+25, false);
  4827. smallText.method382(0xffe1bef, 380-204, myPassword, 237+25, false);
  4828. chatTextDrawingArea.method389(true, 311-204, 0x461e00, capitalize(myUsername) + ((loginScreenCursorPos == 0) & (loopCycle % 40 < 20) ? "|" : ""), 288+25);
  4829. chatTextDrawingArea.method389(true, 311-204, 0x461e00, TextClass.passwordAsterisks(myPassword) + ((loginScreenCursorPos == 1) & (loopCycle % 40 < 20) ? "|" : ""), 349+25);
  4830. loginScreenArea.drawGraphics(0, super.graphics, 0);
  4831. }
  4832. }
  4833. }
  4834.  
  4835. private void drawFlames()
  4836. {
  4837. if(normalLogin == true) {
  4838. try
  4839. {
  4840. long l = System.currentTimeMillis();
  4841. int i = 0;
  4842. int j = 20;
  4843. while(aBoolean831)
  4844. {
  4845. anInt1208++;
  4846. if(normalLogin == true) {
  4847. //calcFlamesPosition();
  4848. //calcFlamesPosition();
  4849. }
  4850. doFlamesDrawing();
  4851. if(++i > 10)
  4852. {
  4853. long l1 = System.currentTimeMillis();
  4854. int k = (int)(l1 - l) / 10 - j;
  4855. j = 40 - k;
  4856. if(j < 5)
  4857. j = 5;
  4858. i = 0;
  4859. l = l1;
  4860. }
  4861. try
  4862. {
  4863. Thread.sleep(j);
  4864. }
  4865. catch(Exception _ex) { }
  4866. }
  4867. } catch(Exception _ex) { }
  4868. drawingFlames = false;
  4869. } else if(normalLogin == false) {
  4870.  
  4871. }
  4872. }
  4873.  
  4874. public void raiseWelcomeScreen()
  4875. {
  4876. welcomeScreenRaised = true;
  4877. }
  4878.  
  4879. private void method137(Stream stream, int j)
  4880. {
  4881. if(j == 84)
  4882. {
  4883. int k = stream.readUnsignedByte();
  4884. int j3 = anInt1268 + (k >> 4 & 7);
  4885. int i6 = anInt1269 + (k & 7);
  4886. int l8 = stream.readUnsignedWord();
  4887. int k11 = stream.readUnsignedWord();
  4888. int l13 = stream.readUnsignedWord();
  4889. if(j3 >= 0 && i6 >= 0 && j3 < 104 && i6 < 104)
  4890. {
  4891. NodeList class19_1 = groundArray[plane][j3][i6];
  4892. if(class19_1 != null)
  4893. {
  4894. 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())
  4895. {
  4896. if(class30_sub2_sub4_sub2_3.ID != (l8 & 0x7fff) || class30_sub2_sub4_sub2_3.anInt1559 != k11)
  4897. continue;
  4898. class30_sub2_sub4_sub2_3.anInt1559 = l13;
  4899. break;
  4900. }
  4901.  
  4902. spawnGroundItem(j3, i6);
  4903. }
  4904. }
  4905. return;
  4906. }
  4907. if(j == 105)
  4908. {
  4909. int l = stream.readUnsignedByte();
  4910. int k3 = anInt1268 + (l >> 4 & 7);
  4911. int j6 = anInt1269 + (l & 7);
  4912. int i9 = stream.readUnsignedWord();
  4913. int l11 = stream.readUnsignedByte();
  4914. int i14 = l11 >> 4 & 0xf;
  4915. int i16 = l11 & 7;
  4916. if(myPlayer.smallX[0] >= k3 - i14 && myPlayer.smallX[0] <= k3 + i14 && myPlayer.smallY[0] >= j6 - i14 && myPlayer.smallY[0] <= j6 + i14 && aBoolean848 && !lowMem && anInt1062 < 50)
  4917. {
  4918. anIntArray1207[anInt1062] = i9;
  4919. anIntArray1241[anInt1062] = i16;
  4920. anIntArray1250[anInt1062] = Sounds.anIntArray326[i9];
  4921. anInt1062++;
  4922. }
  4923. }
  4924. if(j == 215)
  4925. {
  4926. int i1 = stream.method435();
  4927. int l3 = stream.method428();
  4928. int k6 = anInt1268 + (l3 >> 4 & 7);
  4929. int j9 = anInt1269 + (l3 & 7);
  4930. int i12 = stream.method435();
  4931. int j14 = stream.readUnsignedWord();
  4932. if(k6 >= 0 && j9 >= 0 && k6 < 104 && j9 < 104 && i12 != unknownInt10)
  4933. {
  4934. Item class30_sub2_sub4_sub2_2 = new Item();
  4935. class30_sub2_sub4_sub2_2.ID = i1;
  4936. class30_sub2_sub4_sub2_2.anInt1559 = j14;
  4937. if(groundArray[plane][k6][j9] == null)
  4938. groundArray[plane][k6][j9] = new NodeList();
  4939. groundArray[plane][k6][j9].insertHead(class30_sub2_sub4_sub2_2);
  4940. spawnGroundItem(k6, j9);
  4941. }
  4942. return;
  4943. }
  4944. if(j == 156)
  4945. {
  4946. int j1 = stream.method426();
  4947. int i4 = anInt1268 + (j1 >> 4 & 7);
  4948. int l6 = anInt1269 + (j1 & 7);
  4949. int k9 = stream.readUnsignedWord();
  4950. if(i4 >= 0 && l6 >= 0 && i4 < 104 && l6 < 104)
  4951. {
  4952. NodeList class19 = groundArray[plane][i4][l6];
  4953. if(class19 != null)
  4954. {
  4955. for(Item item = (Item)class19.reverseGetFirst(); item != null; item = (Item)class19.reverseGetNext())
  4956. {
  4957. if(item.ID != (k9 & 0x7fff))
  4958. continue;
  4959. item.unlink();
  4960. break;
  4961. }
  4962.  
  4963. if(class19.reverseGetFirst() == null)
  4964. groundArray[plane][i4][l6] = null;
  4965. spawnGroundItem(i4, l6);
  4966. }
  4967. }
  4968. return;
  4969. }
  4970. if(j == 160)
  4971. {
  4972. int k1 = stream.method428();
  4973. int j4 = anInt1268 + (k1 >> 4 & 7);
  4974. int i7 = anInt1269 + (k1 & 7);
  4975. int l9 = stream.method428();
  4976. int j12 = l9 >> 2;
  4977. int k14 = l9 & 3;
  4978. int j16 = anIntArray1177[j12];
  4979. int j17 = stream.method435();
  4980. if(j4 >= 0 && i7 >= 0 && j4 < 103 && i7 < 103)
  4981. {
  4982. int j18 = intGroundArray[plane][j4][i7];
  4983. int i19 = intGroundArray[plane][j4 + 1][i7];
  4984. int l19 = intGroundArray[plane][j4 + 1][i7 + 1];
  4985. int k20 = intGroundArray[plane][j4][i7 + 1];
  4986. if(j16 == 0)
  4987. {
  4988. Object1 class10 = worldController.method296(plane, j4, i7);
  4989. if(class10 != null)
  4990. {
  4991. int k21 = class10.uid >> 14 & 0x7fff;
  4992. if(j12 == 2)
  4993. {
  4994. class10.aClass30_Sub2_Sub4_278 = new Animable_Sub5(k21, 4 + k14, 2, i19, l19, j18, k20, j17, false);
  4995. class10.aClass30_Sub2_Sub4_279 = new Animable_Sub5(k21, k14 + 1 & 3, 2, i19, l19, j18, k20, j17, false);
  4996. } else
  4997. {
  4998. class10.aClass30_Sub2_Sub4_278 = new Animable_Sub5(k21, k14, j12, i19, l19, j18, k20, j17, false);
  4999. }
  5000. }
  5001. }
  5002. if(j16 == 1)
  5003. {
  5004. Object2 class26 = worldController.method297(j4, i7, plane);
  5005. if(class26 != null)
  5006. class26.aClass30_Sub2_Sub4_504 = new Animable_Sub5(class26.uid >> 14 & 0x7fff, 0, 4, i19, l19, j18, k20, j17, false);
  5007. }
  5008. if(j16 == 2)
  5009. {
  5010. Object5 class28 = worldController.method298(j4, i7, plane);
  5011. if(j12 == 11)
  5012. j12 = 10;
  5013. if(class28 != null)
  5014. class28.aClass30_Sub2_Sub4_521 = new Animable_Sub5(class28.uid >> 14 & 0x7fff, k14, j12, i19, l19, j18, k20, j17, false);
  5015. }
  5016. if(j16 == 3)
  5017. {
  5018. Object3 class49 = worldController.method299(i7, j4, plane);
  5019. if(class49 != null)
  5020. class49.aClass30_Sub2_Sub4_814 = new Animable_Sub5(class49.uid >> 14 & 0x7fff, k14, 22, i19, l19, j18, k20, j17, false);
  5021. }
  5022. }
  5023. return;
  5024. }
  5025. if(j == 147)
  5026. {
  5027. int l1 = stream.method428();
  5028. int k4 = anInt1268 + (l1 >> 4 & 7);
  5029. int j7 = anInt1269 + (l1 & 7);
  5030. int i10 = stream.readUnsignedWord();
  5031. byte byte0 = stream.method430();
  5032. int l14 = stream.method434();
  5033. byte byte1 = stream.method429();
  5034. int k17 = stream.readUnsignedWord();
  5035. int k18 = stream.method428();
  5036. int j19 = k18 >> 2;
  5037. int i20 = k18 & 3;
  5038. int l20 = anIntArray1177[j19];
  5039. byte byte2 = stream.readSignedByte();
  5040. int l21 = stream.readUnsignedWord();
  5041. byte byte3 = stream.method429();
  5042. Player player;
  5043. if(i10 == unknownInt10)
  5044. player = myPlayer;
  5045. else
  5046. player = playerArray[i10];
  5047. if(player != null)
  5048. {
  5049. ObjectDef class46 = ObjectDef.forID(l21);
  5050. int i22 = intGroundArray[plane][k4][j7];
  5051. int j22 = intGroundArray[plane][k4 + 1][j7];
  5052. int k22 = intGroundArray[plane][k4 + 1][j7 + 1];
  5053. int l22 = intGroundArray[plane][k4][j7 + 1];
  5054. Model model = class46.method578(j19, i20, i22, j22, k22, l22, -1);
  5055. if(model != null)
  5056. {
  5057. method130(k17 + 1, -1, 0, l20, j7, 0, plane, k4, l14 + 1);
  5058. player.anInt1707 = l14 + loopCycle;
  5059. player.anInt1708 = k17 + loopCycle;
  5060. player.aModel_1714 = model;
  5061. int i23 = class46.anInt744;
  5062. int j23 = class46.anInt761;
  5063. if(i20 == 1 || i20 == 3)
  5064. {
  5065. i23 = class46.anInt761;
  5066. j23 = class46.anInt744;
  5067. }
  5068. player.anInt1711 = k4 * 128 + i23 * 64;
  5069. player.anInt1713 = j7 * 128 + j23 * 64;
  5070. player.anInt1712 = method42(plane, player.anInt1713, player.anInt1711);
  5071. if(byte2 > byte0)
  5072. {
  5073. byte byte4 = byte2;
  5074. byte2 = byte0;
  5075. byte0 = byte4;
  5076. }
  5077. if(byte3 > byte1)
  5078. {
  5079. byte byte5 = byte3;
  5080. byte3 = byte1;
  5081. byte1 = byte5;
  5082. }
  5083. player.anInt1719 = k4 + byte2;
  5084. player.anInt1721 = k4 + byte0;
  5085. player.anInt1720 = j7 + byte3;
  5086. player.anInt1722 = j7 + byte1;
  5087. }
  5088. }
  5089. }
  5090. if(j == 151)
  5091. {
  5092. int i2 = stream.method426();
  5093. int l4 = anInt1268 + (i2 >> 4 & 7);
  5094. int k7 = anInt1269 + (i2 & 7);
  5095. int j10 = stream.method434();
  5096. int k12 = stream.method428();
  5097. int i15 = k12 >> 2;
  5098. int k16 = k12 & 3;
  5099. int l17 = anIntArray1177[i15];
  5100. if(l4 >= 0 && k7 >= 0 && l4 < 104 && k7 < 104)
  5101. method130(-1, j10, k16, l17, k7, i15, plane, l4, 0);
  5102. return;
  5103. }
  5104. if(j == 4)
  5105. {
  5106. int j2 = stream.readUnsignedByte();
  5107. int i5 = anInt1268 + (j2 >> 4 & 7);
  5108. int l7 = anInt1269 + (j2 & 7);
  5109. int k10 = stream.readUnsignedWord();
  5110. int l12 = stream.readUnsignedByte();
  5111. int j15 = stream.readUnsignedWord();
  5112. if(i5 >= 0 && l7 >= 0 && i5 < 104 && l7 < 104)
  5113. {
  5114. i5 = i5 * 128 + 64;
  5115. l7 = l7 * 128 + 64;
  5116. Animable_Sub3 class30_sub2_sub4_sub3 = new Animable_Sub3(plane, loopCycle, j15, k10, method42(plane, l7, i5) - l12, l7, i5);
  5117. aClass19_1056.insertHead(class30_sub2_sub4_sub3);
  5118. }
  5119. return;
  5120. }
  5121. if(j == 44)
  5122. {
  5123. int k2 = stream.method436();
  5124. int j5 = stream.readUnsignedWord();
  5125. int i8 = stream.readUnsignedByte();
  5126. int l10 = anInt1268 + (i8 >> 4 & 7);
  5127. int i13 = anInt1269 + (i8 & 7);
  5128. if(l10 >= 0 && i13 >= 0 && l10 < 104 && i13 < 104)
  5129. {
  5130. Item class30_sub2_sub4_sub2_1 = new Item();
  5131. class30_sub2_sub4_sub2_1.ID = k2;
  5132. class30_sub2_sub4_sub2_1.anInt1559 = j5;
  5133. if(groundArray[plane][l10][i13] == null)
  5134. groundArray[plane][l10][i13] = new NodeList();
  5135. groundArray[plane][l10][i13].insertHead(class30_sub2_sub4_sub2_1);
  5136. spawnGroundItem(l10, i13);
  5137. }
  5138. return;
  5139. }
  5140. if(j == 101)
  5141. {
  5142. int l2 = stream.method427();
  5143. int k5 = l2 >> 2;
  5144. int j8 = l2 & 3;
  5145. int i11 = anIntArray1177[k5];
  5146. int j13 = stream.readUnsignedByte();
  5147. int k15 = anInt1268 + (j13 >> 4 & 7);
  5148. int l16 = anInt1269 + (j13 & 7);
  5149. if(k15 >= 0 && l16 >= 0 && k15 < 104 && l16 < 104)
  5150. method130(-1, -1, j8, i11, l16, k5, plane, k15, 0);
  5151. return;
  5152. }
  5153. if(j == 117)
  5154. {
  5155. int i3 = stream.readUnsignedByte();
  5156. int l5 = anInt1268 + (i3 >> 4 & 7);
  5157. int k8 = anInt1269 + (i3 & 7);
  5158. int j11 = l5 + stream.readSignedByte();
  5159. int k13 = k8 + stream.readSignedByte();
  5160. int l15 = stream.readSignedWord();
  5161. int i17 = stream.readUnsignedWord();
  5162. int i18 = stream.readUnsignedByte() * 4;
  5163. int l18 = stream.readUnsignedByte() * 4;
  5164. int k19 = stream.readUnsignedWord();
  5165. int j20 = stream.readUnsignedWord();
  5166. int i21 = stream.readUnsignedByte();
  5167. int j21 = stream.readUnsignedByte();
  5168. if(l5 >= 0 && k8 >= 0 && l5 < 104 && k8 < 104 && j11 >= 0 && k13 >= 0 && j11 < 104 && k13 < 104 && i17 != 65535)
  5169. {
  5170. l5 = l5 * 128 + 64;
  5171. k8 = k8 * 128 + 64;
  5172. j11 = j11 * 128 + 64;
  5173. k13 = k13 * 128 + 64;
  5174. Animable_Sub4 class30_sub2_sub4_sub4 = new Animable_Sub4(i21, l18, k19 + loopCycle, j20 + loopCycle, j21, plane, method42(plane, k8, l5) - i18, k8, l5, l15, i17);
  5175. class30_sub2_sub4_sub4.method455(k19 + loopCycle, k13, method42(plane, k13, j11) - l18, j11);
  5176. aClass19_1013.insertHead(class30_sub2_sub4_sub4);
  5177. }
  5178. }
  5179. }
  5180.  
  5181. private static void setLowMem()
  5182. {
  5183. WorldController.lowMem = true;
  5184. Texture.lowMem = true;
  5185. lowMem = true;
  5186. ObjectManager.lowMem = true;
  5187. ObjectDef.lowMem = true;
  5188. }
  5189.  
  5190. private void method139(Stream stream)
  5191. {
  5192. stream.initBitAccess();
  5193. int k = stream.readBits(8);
  5194. if(k < npcCount)
  5195. {
  5196. for(int l = k; l < npcCount; l++)
  5197. anIntArray840[anInt839++] = npcIndices[l];
  5198.  
  5199. }
  5200. if(k > npcCount)
  5201. {
  5202. signlink.reporterror(myUsername + " Too many npcs");
  5203. throw new RuntimeException("eek");
  5204. }
  5205. npcCount = 0;
  5206. for(int i1 = 0; i1 < k; i1++)
  5207. {
  5208. int j1 = npcIndices[i1];
  5209. NPC npc = npcArray[j1];
  5210. int k1 = stream.readBits(1);
  5211. if(k1 == 0)
  5212. {
  5213. npcIndices[npcCount++] = j1;
  5214. npc.anInt1537 = loopCycle;
  5215. } else
  5216. {
  5217. int l1 = stream.readBits(2);
  5218. if(l1 == 0)
  5219. {
  5220. npcIndices[npcCount++] = j1;
  5221. npc.anInt1537 = loopCycle;
  5222. anIntArray894[anInt893++] = j1;
  5223. } else
  5224. if(l1 == 1)
  5225. {
  5226. npcIndices[npcCount++] = j1;
  5227. npc.anInt1537 = loopCycle;
  5228. int i2 = stream.readBits(3);
  5229. npc.moveInDir(false, i2);
  5230. int k2 = stream.readBits(1);
  5231. if(k2 == 1)
  5232. anIntArray894[anInt893++] = j1;
  5233. } else
  5234. if(l1 == 2)
  5235. {
  5236. npcIndices[npcCount++] = j1;
  5237. npc.anInt1537 = loopCycle;
  5238. int j2 = stream.readBits(3);
  5239. npc.moveInDir(true, j2);
  5240. int l2 = stream.readBits(3);
  5241. npc.moveInDir(true, l2);
  5242. int i3 = stream.readBits(1);
  5243. if(i3 == 1)
  5244. anIntArray894[anInt893++] = j1;
  5245. } else
  5246. if(l1 == 3)
  5247. anIntArray840[anInt839++] = j1;
  5248. }
  5249. }
  5250.  
  5251. }
  5252.  
  5253. private void processLoginScreenInput() {
  5254. //if(normalLogin == true) {
  5255. if(loginScreenState == 0) {
  5256. int i = super.myWidth / 2 - 80;
  5257. int l = super.myHeight / 2 + 20;
  5258. l += 20;
  5259. if(super.clickMode3 == 1 && super.saveClickX >= i - 75 && super.saveClickX <= i + 75 && super.saveClickY >= l - 20 && super.saveClickY <= l + 20) {
  5260. loginScreenState = 3;
  5261. loginScreenCursorPos = 0;
  5262. }
  5263. i = super.myWidth / 2 + 80;
  5264. if(super.clickMode3 == 1 && super.saveClickX >= i - 75 && super.saveClickX <= i + 75 && super.saveClickY >= l - 20 && super.saveClickY <= l + 20) {
  5265. loginMessage1 = " Welcome to Primal Project";
  5266. loginMessage2 = "Enter your username & password.";
  5267. loginScreenState = 2;
  5268. loginScreenCursorPos = 0;
  5269. }
  5270. } else {
  5271. if(loginScreenState == 2) {
  5272. int j = super.myHeight / 2 - 40;
  5273. j += 30;
  5274. j += 25;
  5275. if(super.clickMode3 == 1 && super.saveClickY >= j - 15 && super.saveClickY < j)
  5276. loginScreenCursorPos = 0;
  5277. j += 15;
  5278. if(super.clickMode3 == 1 && super.saveClickY >= j - 15 && super.saveClickY < j)
  5279. loginScreenCursorPos = 1;
  5280. j += 15;
  5281. int i1 = super.myWidth / 2 - 80;
  5282. int k1 = super.myHeight / 2 + 50;
  5283. k1 += 20;
  5284. if(super.clickMode3 == 1 && super.saveClickX >= i1 - 75 && super.saveClickX <= i1 + 75 && super.saveClickY >= k1 - 20 && super.saveClickY <= k1 + 20) {
  5285. loginFailures = 0;
  5286. login(capitalize(myUsername), myPassword, false);
  5287. if(loggedIn)
  5288. return;
  5289. }
  5290. i1 = super.myWidth / 2 + 80;
  5291. if(super.clickMode3 == 1 && super.saveClickX >= i1 - 75 && super.saveClickX <= i1 + 75 && super.saveClickY >= k1 - 20 && super.saveClickY <= k1 + 20) {
  5292. loginScreenState = 0;
  5293. myUsername = "";
  5294. myPassword = "";
  5295. }
  5296. do {
  5297. int l1 = readChar(-796);
  5298. if(l1 == -1)
  5299. break;
  5300. boolean flag1 = false;
  5301. for(int i2 = 0; i2 < validUserPassChars.length(); i2++) {
  5302. if(l1 != validUserPassChars.charAt(i2))
  5303. continue;
  5304. flag1 = true;
  5305. break;
  5306. } if(loginScreenCursorPos == 0) {
  5307. if(l1 == 8 && myUsername.length() > 0)
  5308. myUsername = myUsername.substring(0, myUsername.length() - 1);
  5309. if(l1 == 9 || l1 == 10 || l1 == 13)
  5310. loginScreenCursorPos = 1;
  5311. if(flag1)
  5312. myUsername += (char)l1;
  5313. if(myUsername.length() > 12)
  5314. myUsername = capitalize(myUsername.substring(0, 12));
  5315. } else if(loginScreenCursorPos == 1) {
  5316. typingPassword = true;
  5317. if(l1 == 8 && myPassword.length() > 0)
  5318. myPassword = myPassword.substring(0, myPassword.length() - 1);
  5319. if(l1 == 9 || l1 == 10 || l1 == 13)
  5320. loginScreenCursorPos = 0;
  5321. if(flag1)
  5322. myPassword += (char)l1;
  5323. if(myPassword.length() > 20)
  5324. myPassword = myPassword.substring(0, 20);
  5325. }
  5326. } while(true);
  5327. return;
  5328. }
  5329. if(loginScreenState == 3) {
  5330. int k = super.myWidth / 2;
  5331. int j1 = super.myHeight / 2 + 50;
  5332. j1 += 20;
  5333. if(super.clickMode3 == 1 && super.saveClickX >= k - 75 && super.saveClickX <= k + 75 && super.saveClickY >= j1 - 20 && super.saveClickY <= j1 + 20)
  5334. loginScreenState = 0;
  5335. }
  5336. }
  5337. //} else if(normalLogin == false) {
  5338.  
  5339. /** Custom Login Screen areas and crap */
  5340. //}
  5341. }
  5342.  
  5343. private void markMinimap(Sprite sprite, int i, int j, boolean flag) {
  5344. int k = minimapInt1 + minimapInt2 & 0x7ff;
  5345. int l = i * i + j * j;
  5346. if(flag)
  5347. return;
  5348. if(l > 6400)
  5349. return;
  5350. int i1 = Model.modelIntArray1[k];
  5351. int j1 = Model.modelIntArray2[k];
  5352. i1 = (i1 * 256) / (minimapInt3 + 256);
  5353. j1 = (j1 * 256) / (minimapInt3 + 256);
  5354. int k1 = j * i1 + i * j1 >> 16;
  5355. int l1 = j * j1 - i * i1 >> 16;
  5356. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  5357. sprite.drawSprite(((106 + k1) - sprite.maxWidth / 2) + 4 , 89 - l1 - sprite.maxHeight / 2 - 4);
  5358. } else {
  5359. sprite.drawSprite(((122 + k1) - sprite.maxWidth / 2) + 4 , 89 - l1 - sprite.maxHeight / 2 - 4);
  5360. }
  5361. CustomMapback[getSpriteID()].drawSprite(0, 0);
  5362. }
  5363.  
  5364. public int flagPos = 72;
  5365. public int runState = 1;
  5366. public boolean logHover = false;
  5367. public boolean advisorHover = false;
  5368. public boolean xpHover = false;
  5369. public boolean xpClicked = false;
  5370. public boolean drawXpBar = false;
  5371. public boolean drawFlag = false;
  5372. public int xpToDraw = 0;
  5373. public int testXp = 0;
  5374. public Sprite[] globe = new Sprite[3];
  5375. public Sprite[] ORBS = new Sprite[18];
  5376. public Sprite[] SUM = new Sprite[18];
  5377. public Sprite[] LOGOUT = new Sprite[5];
  5378. public Sprite[] ADVISOR = new Sprite[5];
  5379. public Sprite xpOrb;
  5380. public Sprite sprite1;
  5381. public Sprite xpFlag;
  5382.  
  5383. public static boolean globeState[] = {
  5384. false, false
  5385. };
  5386. public void drawXpOrb() {
  5387. if(super.mouseX >= 516 && super.mouseX <= 550 && super.mouseY >= 46 && super.mouseY <= 80){
  5388. xpHover = true;
  5389. } else {
  5390. xpHover = false;
  5391. }
  5392. if(super.clickMode3 == 1 && super.saveClickX >= 516 && super.saveClickX <= 550 && super.saveClickY >= 46 && super.saveClickY <= 80) {
  5393. if(!xpClicked) {
  5394. xpClicked = true;
  5395. drawXpBar = true;
  5396. } else {
  5397. xpClicked = false;
  5398. drawXpBar = false;
  5399. }
  5400. }
  5401. if(!xpClicked) {
  5402. if(!xpHover) {
  5403. ORBS[17].drawSprite(0, 46);
  5404. } else {
  5405. ORBS[16].drawSprite(0, 46);
  5406. }
  5407. } else {
  5408. if(!xpHover) {
  5409. ORBS[17].drawSprite(0, 46);
  5410. } else {
  5411. ORBS[16].drawSprite(0, 46);
  5412. }
  5413. }
  5414. }
  5415. public void drawGlobe(){
  5416. if(is508 == true || is525 == true || is562 == true) {
  5417. if(super.clickMode3 == 1){
  5418. if(super.saveClickX >= 522 && super.saveClickX <= 558 && super.saveClickY >= 124 && super.saveClickY < 161){
  5419. if(globeState[0]){
  5420. globeState[0] = false;
  5421. } else {
  5422. globeState[0] = true;
  5423. }
  5424. }
  5425. }
  5426. if(super.mouseX >= 522 && super.mouseX <= 558 && super.mouseY >= 124 && super.mouseY < 161){
  5427. globeState[1] = true;
  5428. } else {
  5429. globeState[1] = false;
  5430. }
  5431. } else {
  5432. }
  5433. }
  5434.  
  5435. public void drawAdv() {
  5436. ADVISOR[!advisorHover ? 0 : 1].drawSprite(207, 0);
  5437. if(super.clickMode2 == 1 && super.mouseX > 724 && super.mouseX < 743 && super.mouseY > 1 && super.mouseY < 20) {
  5438. ADVISOR[2].drawSprite(207, 0);
  5439. }
  5440. }
  5441. public void drawLogout() {
  5442. LOGOUT[!logHover ? 0 : 1].drawSprite(228, 0);
  5443. if(super.clickMode2 == 1 && super.mouseX >= 765-26 && super.mouseX <= 763 && super.mouseY >= 6 && super.mouseY <= 30){
  5444. LOGOUT[2].drawSprite(228, 0);
  5445. setTab(10);
  5446. }
  5447. }
  5448. public Sprite coinOrb;
  5449. public Sprite coinPart;
  5450. public boolean coinToggle = false;
  5451. public Sprite coinOrbPart;
  5452.  
  5453. public void drawCoinParts(){
  5454. if(!coinToggle){
  5455. if(super.mouseX >= 512 && super.mouseX <= 546 && super.mouseY >= 87 && super.mouseY <= 118){
  5456. coinOrbPart = new Sprite("MoneyPouch/coinpart hover");
  5457. } else {
  5458. coinOrbPart = new Sprite("MoneyPouch/coinpart normal");
  5459. }
  5460. }
  5461. coinOrbPart.drawSprite(505+4, 93-11);
  5462. }
  5463.  
  5464. public void drawCoinOrb(){//512 nontoggle
  5465. if(!coinToggle) {//436,87 534 x 118 y
  5466. if(super.mouseX >= 512 && super.mouseX <= 546 && super.mouseY >= 87 && super.mouseY <= 118){
  5467. coinOrb = new Sprite("MoneyPouch/coin simple hover");
  5468. } else {
  5469. coinOrb = new Sprite("MoneyPouch/coin simple normal");
  5470. }
  5471. } else if(coinToggle) {
  5472. if(super.mouseX >= 436 && super.mouseX <= 546 && super.mouseY >= 87 && super.mouseY <= 118){
  5473. coinOrb = new Sprite("MoneyPouch/coin simple hover toggle");
  5474. coinPart = new Sprite("MoneyPouch/coin complex hover toggle");
  5475. } else {
  5476. coinOrb = new Sprite("MoneyPouch/coin simple normal toggle");
  5477. coinPart = new Sprite("MoneyPouch/coin complex normal toggle");
  5478. }
  5479. }
  5480. coinOrb.drawSprite(520-300-200-20-4, 47+37);//+37
  5481.  
  5482. if(super.mouseX >= 436 && super.mouseX <= 546 && super.mouseY >= 87 && super.mouseY <= 118) {
  5483. coinPart = new Sprite("MoneyPouch/coin complex hover toggle");
  5484. coinOrb = new Sprite("MoneyPouch/coin simple hover");
  5485. }
  5486. }
  5487.  
  5488. public void loadOrbs() {
  5489. drawLogout();
  5490. drawHP();
  5491. drawAdv();
  5492. Increase.drawSprite(235, 135);
  5493. Decrease.drawSprite(235, 150);
  5494. drawCoinOrb();
  5495. drawSumm();
  5496. if(is562){
  5497. drawXpOrb();
  5498. }
  5499. drawPrayer();
  5500. drawRunOrb();
  5501. if(is508 == true) {
  5502. globe[0].drawSprite(10, 123);
  5503. } else if(is525 == true || is562 == true) {
  5504. drawGlobe();
  5505. if (globeState[0] && globeState[1]) {
  5506. globe[2].drawSprite(10, 123);
  5507. } else if (globeState[1]) {
  5508. globe[2].drawSprite(10, 123);
  5509. } else if (globeState[0]) {
  5510. globe[1].drawSprite(10, 123);
  5511. } else {
  5512. globe[1].drawSprite(10, 123);
  5513. }
  5514. }
  5515. }
  5516. public Sprite[] Black = new Sprite[5];
  5517.  
  5518. public void loadExtraSprites(){
  5519. magicAuto = new Sprite("Misc/magicAuto");
  5520. sprite1 = new Sprite("Gameframe/sprite1");
  5521. xpFlag = new Sprite("Gameframe/xpFlag");
  5522. for(int i = 1; i <= 17; i++) {
  5523. ORBS[i] = new Sprite("Gameframe/Orbs/ORBS "+i+"");
  5524. }
  5525. for(int i = 1; i <= 17; i++) {
  5526. SUM[i] = new Sprite("Gameframe/Orbs/SUM "+i+"");
  5527. }
  5528. for(int i = 0; i <= 4;i++) {
  5529. LOGOUT[i] = new Sprite("Gameframe/X "+i+"");
  5530. }
  5531. for(int i = 0; i <= 4; i++) {
  5532. ADVISOR[i] = new Sprite("Gameframe/A " + i + "");
  5533. }
  5534. for (int j3 = 0; j3 <= 26; j3++) {
  5535. LOGIN[j3] = new Sprite("Login/Buttons/BUTTON "+j3+"");
  5536. }
  5537. for (int i = 0; i <= 2; i++) {
  5538. globe[i] = new Sprite("Gameframe/Globe "+i+"");
  5539. }
  5540. for(int i = 0; i <= 4; i++){
  5541. chatArea[i] = new Sprite("Gameframe/Gameframes/chatArea "+i+"");
  5542. }
  5543. for(int i = 0; i <= 4; i++){
  5544. tabArea[i] = new Sprite("Gameframe/Gameframes/tabArea "+i+"");
  5545. }
  5546. for(int i = 0; i <= 4; i++){
  5547. CustomMapback[i] = new Sprite("Gameframe/Gameframes/Mapback "+i+"");
  5548. }
  5549. for(int i = 0; i <= 13; i++){
  5550. modIcons[i] = new Sprite("Player/Crowns/MODICONS "+i+"");
  5551. }
  5552. for(int i = 0; i <= 13; i++){
  5553. chatImages[i] = new Sprite("Player/Crowns/MODICONS "+i+"");
  5554. }
  5555. for(int i = 0; i <= 4; i++){
  5556. Black[i] = new Sprite("Gameframe/Gameframes/Black "+i+"");
  5557. }
  5558. for(int i4 = 0; i4 < 3; i4++) {
  5559. hitMark[i4] = new Sprite("Player/Hits "+i4+"");
  5560. }
  5561. qc = new Sprite("Gameframe/Quickchat");
  5562. }
  5563.  
  5564. public boolean restOrb = false;
  5565. public boolean musicOrb = false;
  5566.  
  5567. public boolean prayHover = false;
  5568. public boolean runClicked = true;
  5569. public boolean runHover = false;
  5570. public Sprite magicAuto;
  5571. public boolean Autocast = false;
  5572. public int autocastId = 0;
  5573.  
  5574. private void rightClickChatButtons() {
  5575. if(is480 == true || is508 == true || is525 == true || is562 == true) {
  5576. if(super.mouseX >= 5 && super.mouseX <= 61 && super.mouseY >= 482 && super.mouseY <= 503) {
  5577. menuActionName[1] = "View All";
  5578. menuActionID[1] = 999;
  5579. menuActionRow = 2;
  5580. } else if(super.mouseX >= 62 && super.mouseX <= 117 && super.mouseY >= 482 && super.mouseY <= 503) {
  5581. menuActionName[1] = "View Game";
  5582. menuActionID[1] = 998;
  5583. menuActionRow = 2;
  5584. } else if(super.mouseX >= 119 && super.mouseX <= 174 && super.mouseY >= 482 && super.mouseY <= 503) {
  5585. menuActionName[1] = "Hide public";
  5586. menuActionID[1] = 997;
  5587. menuActionName[2] = "Off public";
  5588. menuActionID[2] = 996;
  5589. menuActionName[3] = "Friends public";
  5590. menuActionID[3] = 995;
  5591. menuActionName[4] = "On public";
  5592. menuActionID[4] = 994;
  5593. menuActionName[5] = "View public";
  5594. menuActionID[5] = 993;
  5595. menuActionRow = 6;
  5596. } else if(super.mouseX >= 176 && super.mouseX <= 231 && super.mouseY >= 482 && super.mouseY <= 503) {
  5597. menuActionName[1] = "Off private";
  5598. menuActionID[1] = 992;
  5599. menuActionName[2] = "Friends private";
  5600. menuActionID[2] = 991;
  5601. menuActionName[3] = "On private";
  5602. menuActionID[3] = 990;
  5603. menuActionName[4] = "View private";
  5604. menuActionID[4] = 989;
  5605. menuActionRow = 5;
  5606. } else if(super.mouseX >= 233 && super.mouseX <= 288 && super.mouseY >= 482 && super.mouseY <= 503) {
  5607. menuActionName[1] = "Off clan chat";
  5608. menuActionID[1] = 1003;
  5609. menuActionName[2] = "Friends clan chat";
  5610. menuActionID[2] = 1002;
  5611. menuActionName[3] = "On clan chat";
  5612. menuActionID[3] = 1001;
  5613. menuActionName[4] = "View clan chat";
  5614. menuActionID[4] = 1000;
  5615. menuActionRow = 5;
  5616. } else if(super.mouseX >= 290 && super.mouseX <= 345 && super.mouseY >= 482 && super.mouseY <= 503) {
  5617. menuActionName[1] = "Off trade";
  5618. menuActionID[1] = 987;
  5619. menuActionName[2] = "Friends trade";
  5620. menuActionID[2] = 986;
  5621. menuActionName[3] = "On trade";
  5622. menuActionID[3] = 985;
  5623. menuActionName[4] = "View trade";
  5624. menuActionID[4] = 984;
  5625. menuActionRow = 5;
  5626. } else if(super.mouseX >= 347 && super.mouseX <= 402 && super.mouseY >= 482 && super.mouseY <= 503) {
  5627. menuActionName[1] = "Off assist";
  5628. menuActionID[1] = -1;
  5629. menuActionName[2] = "Friends assist";
  5630. menuActionID[2] = -1;
  5631. menuActionName[3] = "On assist";
  5632. menuActionID[3] = -1;
  5633. menuActionName[4] = "View assist";
  5634. menuActionID[4] = -1;
  5635. menuActionRow = 5;
  5636. } else if(super.mouseX >= 404 && super.mouseX <= 514 && super.mouseY >= 480 && super.mouseY <= 501) {
  5637. menuActionName[1] = "Report Abuse";
  5638. menuActionID[1] = 606;
  5639. menuActionRow = 2;
  5640. }
  5641. } else if(is474) {
  5642. if(super.mouseX >= 5 && super.mouseX <= 61 && super.mouseY >= 482 && super.mouseY <= 503) {
  5643. menuActionName[1] = "View All";
  5644. menuActionID[1] = 999;
  5645. menuActionRow = 2;
  5646. } else if(super.mouseX >= 71 && super.mouseX <= 127 && super.mouseY >= 482 && super.mouseY <= 503) {
  5647. menuActionName[1] = "View Game";
  5648. menuActionID[1] = 998;
  5649. menuActionRow = 2;
  5650. } else if(super.mouseX >= 137 && super.mouseX <= 193 && super.mouseY >= 482 && super.mouseY <= 503) {
  5651. menuActionName[1] = "Hide public";
  5652. menuActionID[1] = 997;
  5653. menuActionName[2] = "Off public";
  5654. menuActionID[2] = 996;
  5655. menuActionName[3] = "Friends public";
  5656. menuActionID[3] = 995;
  5657. menuActionName[4] = "On public";
  5658. menuActionID[4] = 994;
  5659. menuActionName[5] = "View public";
  5660. menuActionID[5] = 993;
  5661. menuActionRow = 6;
  5662. } else if(super.mouseX >= 203 && super.mouseX <= 259 && super.mouseY >= 482 && super.mouseY <= 503) {
  5663. menuActionName[1] = "Off private";
  5664. menuActionID[1] = 992;
  5665. menuActionName[2] = "Friends private";
  5666. menuActionID[2] = 991;
  5667. menuActionName[3] = "On private";
  5668. menuActionID[3] = 990;
  5669. menuActionName[4] = "View private";
  5670. menuActionID[4] = 989;
  5671. menuActionRow = 5;
  5672. } else if(super.mouseX >= 269 && super.mouseX <= 325 && super.mouseY >= 482 && super.mouseY <= 503) {
  5673. menuActionName[1] = "Off clan chat";
  5674. menuActionID[1] = 1003;
  5675. menuActionName[2] = "Friends clan chat";
  5676. menuActionID[2] = 1002;
  5677. menuActionName[3] = "On clan chat";
  5678. menuActionID[3] = 1001;
  5679. menuActionName[4] = "View clan chat";
  5680. menuActionID[4] = 1000;
  5681. menuActionRow = 5;
  5682. } else if(super.mouseX >= 335 && super.mouseX <= 391 && super.mouseY >= 482 && super.mouseY <= 503) {
  5683. menuActionName[1] = "Off trade";
  5684. menuActionID[1] = 987;
  5685. menuActionName[2] = "Friends trade";
  5686. menuActionID[2] = 986;
  5687. menuActionName[3] = "On trade";
  5688. menuActionID[3] = 985;
  5689. menuActionName[4] = "View trade";
  5690. menuActionID[4] = 984;
  5691. menuActionRow = 5;
  5692. } else if(super.mouseX >= 404 && super.mouseX <= 514 && super.mouseY >= 480 && super.mouseY <= 501) {
  5693. menuActionName[1] = "Report Abuse";
  5694. menuActionID[1] = 606;
  5695. menuActionRow = 2;
  5696. }
  5697. } else {
  5698.  
  5699. }
  5700.  
  5701. }
  5702.  
  5703. public void determineTopTabs(){
  5704. if(is474 || is480 || is508 || is525) {
  5705. if(super.mouseX >= 522 && super.mouseX <= 559 && super.mouseY >= 168 && super.mouseY < 203) {
  5706. menuActionName[1] = "Combat Options";
  5707. menuActionID[1] = 1021;
  5708. menuActionRow = 2;
  5709. } else if(super.mouseX >= 560 && super.mouseX <= 592 && super.mouseY >= 168 && super.mouseY < 203) {
  5710. menuActionName[1] = "Stats";
  5711. menuActionID[1] = 1022;
  5712. menuActionRow = 2;
  5713. } else if(super.mouseX >= 593 && super.mouseX <= 625 && super.mouseY >= 168 && super.mouseY < 203) {
  5714. menuActionName[1] = "Quest List";
  5715. menuActionID[1] = 1023;
  5716. menuActionRow = 2;
  5717. } else if(super.mouseX >= 626 && super.mouseX <= 658 && super.mouseY >= 168 && super.mouseY < 203) {
  5718. menuActionName[1] = "Inventory";
  5719. menuActionID[1] = 1024;
  5720. menuActionRow = 2;
  5721. } else if(super.mouseX >= 659 && super.mouseX <= 691 && super.mouseY >= 168 && super.mouseY < 203) {
  5722. menuActionName[1] = "Worn Equipment";
  5723. menuActionID[1] = 1030;
  5724. menuActionRow = 2;
  5725. } else if(super.mouseX >= 692 && super.mouseX <= 724 && super.mouseY >= 168 && super.mouseY < 203) {
  5726. menuActionName[1] = "Prayer";
  5727. menuActionID[1] = 1026;
  5728. menuActionRow = 2;
  5729. } else if(super.mouseX >= 725 && super.mouseX <= 762 && super.mouseY >= 168 && super.mouseY < 203) {
  5730. menuActionName[1] = "Magic";
  5731. menuActionID[1] = 1027;
  5732. menuActionRow = 2;
  5733. }
  5734. } else if(is562) {
  5735.  
  5736. }
  5737. }
  5738.  
  5739. public void determineBottomTabs(){
  5740. if(is480 || is508 || is525) {
  5741. if(super.mouseX >= 522 && super.mouseX <= 559 && super.mouseY >= 466 && super.mouseY < 503) {
  5742. menuActionName[1] = "Logout";
  5743. menuActionID[1] = 1502;
  5744. menuActionRow = 2;
  5745. } else if(super.mouseX >= 626 && super.mouseX <= 658 && super.mouseY >= 466 && super.mouseY < 503) {
  5746. menuActionName[1] = "Clan Chat";
  5747. menuActionID[1] = 1008;
  5748. menuActionRow = 2;
  5749. } else if(super.mouseX >= 742 && super.mouseX <= 764 && super.mouseY >= 1 && super.mouseY <= 23) {
  5750. menuActionName[1] = "Logout";
  5751. menuActionID[1] = 1011;
  5752. menuActionRow = 2;
  5753. }
  5754. } else if(is474 && !is562) {
  5755. if(super.mouseX >= 522 && super.mouseX <= 559 && super.mouseY >= 466 && super.mouseY < 503) {
  5756. menuActionName[1] = "Clan Chat";
  5757. menuActionID[1] = 1008;
  5758. menuActionRow = 2;
  5759. } else if(super.mouseX >= 626 && super.mouseX <= 658 && super.mouseY >= 466 && super.mouseY < 503) {
  5760. menuActionName[1] = "Logout";
  5761. menuActionID[1] = 1011;
  5762. menuActionRow = 2;
  5763. }
  5764. } else if(is562){
  5765. if(super.mouseX >= 521 && super.mouseX <= 550 && super.mouseY >= 169 && super.mouseY < 205) {
  5766. tabHPos = 0;
  5767. needDrawTabArea = true;
  5768. tabAreaAltered = true;
  5769. } else if(super.mouseX >= 552 && super.mouseX <= 581 && super.mouseY >= 168 && super.mouseY < 205) {
  5770. tabHPos = 1;
  5771. needDrawTabArea = true;
  5772. tabAreaAltered = true;
  5773. } else if(super.mouseX >= 582 && super.mouseX <= 611 && super.mouseY >= 168 && super.mouseY < 205) {
  5774. tabHPos = 2;
  5775. needDrawTabArea = true;
  5776. tabAreaAltered = true;
  5777. } else if(super.mouseX >= 612 && super.mouseX <= 641 && super.mouseY >= 168 && super.mouseY < 203) {
  5778. tabHPos = 3;
  5779. needDrawTabArea = true;
  5780. tabAreaAltered = true;
  5781. } else if(super.mouseX >= 642 && super.mouseX <= 671 && super.mouseY >= 168 && super.mouseY < 205) {
  5782. tabHPos = 4;
  5783. needDrawTabArea = true;
  5784. tabAreaAltered = true;
  5785. } else if(super.mouseX >= 672 && super.mouseX <= 701 && super.mouseY >= 168 && super.mouseY < 205) {
  5786. tabHPos = 5;
  5787. needDrawTabArea = true;
  5788. tabAreaAltered = true;
  5789. } else if(super.mouseX >= 702 && super.mouseX <= 731 && super.mouseY >= 169 && super.mouseY < 205) {
  5790. tabHPos = 6;
  5791. needDrawTabArea = true;
  5792. tabAreaAltered = true;
  5793. } else if(super.mouseX >= 732 && super.mouseX <= 761 && super.mouseY >= 169 && super.mouseY < 205) {
  5794. tabHPos = 7;
  5795. needDrawTabArea = true;
  5796. tabAreaAltered = true;
  5797. } else if(super.mouseX >= 522 && super.mouseX <= 551 && super.mouseY >= 466 && super.mouseY < 503) {
  5798. tabHPos = 15;
  5799. needDrawTabArea = true;
  5800. tabAreaAltered = true;
  5801. } else if(super.mouseX >= 552 && super.mouseX <= 581 && super.mouseY >= 466 && super.mouseY < 503) {
  5802. tabHPos = 8;
  5803. needDrawTabArea = true;
  5804. tabAreaAltered = true;
  5805. } else if(super.mouseX >= 582 && super.mouseX <= 611 && super.mouseY >= 466 && super.mouseY < 503) {
  5806. tabHPos = 9;
  5807. needDrawTabArea = true;
  5808. tabAreaAltered = true;
  5809. } else if(super.mouseX >= 612 && super.mouseX <= 641 && super.mouseY >= 466 && super.mouseY < 503) {
  5810. tabHPos = 10;
  5811. needDrawTabArea = true;
  5812. tabAreaAltered = true;
  5813. } else if(super.mouseX >= 642 && super.mouseX <= 671 && super.mouseY >= 466 && super.mouseY < 503) {
  5814. tabHPos = 11;
  5815. needDrawTabArea = true;
  5816. tabAreaAltered = true;
  5817. } else if(super.mouseX >= 672 && super.mouseX <= 701 && super.mouseY >= 466 && super.mouseY < 503) {
  5818. tabHPos = 12;
  5819. needDrawTabArea = true;
  5820. tabAreaAltered = true;
  5821. } else if(super.mouseX >= 702 && super.mouseX <= 731 && super.mouseY >= 466 && super.mouseY < 502) {
  5822. tabHPos = 13;
  5823. needDrawTabArea = true;
  5824. tabAreaAltered = true;
  5825. } else if(super.mouseX >= 732 && super.mouseX <= 761 && super.mouseY >= 466 && super.mouseY < 502) {
  5826. tabHPos = 14;
  5827. needDrawTabArea = true;
  5828. tabAreaAltered = true;
  5829. } else {
  5830. tabHPos = -1;
  5831. needDrawTabArea = true;
  5832. tabAreaAltered = true;
  5833. }
  5834. if(super.clickMode3 == 1) {
  5835. if(super.saveClickX >= 522 && super.saveClickX <= 551 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[0] != -1) {
  5836. needDrawTabArea = true;
  5837. tabID = 0;
  5838. tabAreaAltered = true;
  5839. } else if(super.saveClickX >= 552 && super.saveClickX <= 581 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[1] != -1) {
  5840. needDrawTabArea = true;
  5841. tabID = 1;
  5842. tabAreaAltered = true;
  5843. } else if(super.saveClickX >= 582 && super.saveClickX <= 611 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[2] != -1) {
  5844. needDrawTabArea = true;
  5845. tabID = 2;
  5846. tabAreaAltered = true;
  5847. } else if(super.saveClickX >= 612 && super.saveClickX <= 641 && super.saveClickY >= 168 && super.saveClickY < 203 && tabInterfaceIDs[14] != -1) {
  5848. needDrawTabArea = true;
  5849. tabID = 14;
  5850. tabAreaAltered = true;
  5851. } else if(super.saveClickX >= 642 && super.saveClickX <= 671 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[3] != -1) {
  5852. needDrawTabArea = true;
  5853. tabID = 3;
  5854. tabAreaAltered = true;
  5855. } else if(super.saveClickX >= 672 && super.saveClickX <= 701 && super.saveClickY >= 168 && super.saveClickY < 205 && tabInterfaceIDs[4] != -1) {
  5856. needDrawTabArea = true;
  5857. tabID = 4;
  5858. tabAreaAltered = true;
  5859. } else if(super.saveClickX >= 702 && super.saveClickX <= 731 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[5] != -1) {
  5860. needDrawTabArea = true;
  5861. tabID = 5;
  5862. tabAreaAltered = true;
  5863. } else if(super.saveClickX >= 732 && super.saveClickX <= 761 && super.saveClickY >= 169 && super.saveClickY < 205 && tabInterfaceIDs[6] != -1) {
  5864. needDrawTabArea = true;
  5865. tabID = 6;
  5866. tabAreaAltered = true;
  5867. } else if(super.saveClickX >= 522 && super.saveClickX <= 551 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[16] != -1) {
  5868. needDrawTabArea = true;
  5869. tabID = 16;
  5870. tabAreaAltered = true;
  5871. } else if(super.saveClickX >= 552 && super.saveClickX <= 581 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[8] != -1) {
  5872. needDrawTabArea = true;
  5873. tabID = 8;
  5874. tabAreaAltered = true;
  5875. } else if(super.saveClickX >= 582 && super.saveClickX <= 611 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[9] != -1) {
  5876. needDrawTabArea = true;
  5877. tabID = 9;
  5878. tabAreaAltered = true;
  5879. } else if(super.saveClickX >= 612 && super.saveClickX <= 641 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[7] != -1) {
  5880. needDrawTabArea = true;
  5881. tabID = 7;
  5882. tabAreaAltered = true;
  5883. } else if(super.saveClickX >= 642 && super.saveClickX <= 671 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[11] != -1) {
  5884. needDrawTabArea = true;
  5885. tabID = 11;
  5886. tabAreaAltered = true;
  5887. } else if(super.saveClickX >= 672 && super.saveClickX <= 701 && super.saveClickY >= 466 && super.saveClickY < 503 && tabInterfaceIDs[12] != -1) {
  5888. needDrawTabArea = true;
  5889. tabID = 12;
  5890. tabAreaAltered = true;
  5891. } else if(super.saveClickX >= 702 && super.saveClickX <= 731 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[13] != -1) {
  5892. needDrawTabArea = true;
  5893. tabID = 13;
  5894. tabAreaAltered = true;
  5895. } else if(super.saveClickX >= 732 && super.saveClickX <= 761 && super.saveClickY >= 466 && super.saveClickY < 502 && tabInterfaceIDs[15] != -1) {
  5896. needDrawTabArea = true;
  5897. tabID = 15;
  5898. tabAreaAltered = true;
  5899. }
  5900. }
  5901.  
  5902. }
  5903. if(is474 || is480 || is508 || is525) {
  5904. if(super.mouseX >= 560 && super.mouseX <= 592 && super.mouseY >= 466 && super.mouseY < 503) {
  5905. menuActionName[1] = "Friend List";
  5906. menuActionID[1] = 1009;
  5907. menuActionRow = 2;
  5908. } else if(super.mouseX >= 593 && super.mouseX <= 625 && super.mouseY >= 466 && super.mouseY < 503) {
  5909. menuActionName[1] = "Ignore List";
  5910. menuActionID[1] = 1010;
  5911. menuActionRow = 2;
  5912. } else if(super.mouseX >= 659 && super.mouseX <= 691 && super.mouseY >= 466 && super.mouseY < 503) {
  5913. menuActionName[1] = "Options";
  5914. menuActionID[1] = 1012;
  5915. menuActionRow = 2;
  5916. } else if(super.mouseX >= 692 && super.mouseX <= 724 && super.mouseY >= 466 && super.mouseY < 503) {
  5917. menuActionName[1] = "Emotes";
  5918. menuActionID[1] = 1013;
  5919. menuActionRow = 2;
  5920. } else if(super.mouseX >= 725 && super.mouseX <= 762 && super.mouseY >= 466 && super.mouseY < 503) {
  5921. menuActionName[1] = "Music Player";
  5922. menuActionID[1] = 1014;
  5923. menuActionRow = 2;
  5924. }
  5925. }
  5926. }
  5927.  
  5928. private void processMinimapActions() {
  5929. if(!coinToggle){
  5930. if (super.mouseX >= 512 && super.mouseX <= 546 && super.mouseY >= 87 && super.mouseY <= 118) {
  5931. menuActionName[4] = coinToggle ? "Toggle money pouch" : "Toggle money pouch";
  5932. menuActionID[4] = 712;
  5933. menuActionName[3] = "Withdraw money pouch";
  5934. menuActionID[3] = 713;
  5935. menuActionName[2] = "Examine money pouch";
  5936. menuActionID[2] = 714;
  5937. menuActionName[1] = "Price checker";
  5938. menuActionID[1] = 715;
  5939. menuActionRow = 5;
  5940. }
  5941. } else if(coinToggle){
  5942. if (super.mouseX >= 436 && super.mouseX <= 546 && super.mouseY >= 87 && super.mouseY <= 118) {
  5943. menuActionName[4] = coinToggle ? "Toggle money pouch" : "Toggle money pouch";
  5944. menuActionID[4] = 712;
  5945. menuActionName[3] = "Withdraw money pouch";
  5946. menuActionID[3] = 713;
  5947. menuActionName[2] = "Examine money pouch";
  5948. menuActionID[2] = 714;
  5949. menuActionName[1] = "Price checker";
  5950. menuActionID[1] = 715;
  5951. menuActionRow = 5;
  5952. }
  5953. }
  5954. if(super.mouseX >= 746 && super.mouseX <= 762 && super.mouseY >= 134 && super.mouseY < 147) {
  5955. menuActionName[1] = "Zoom In";
  5956. menuActionID[1] = 1850;
  5957. menuActionRow = 2;
  5958. }
  5959. else if(super.mouseX >= 746 && super.mouseX <= 762 && super.mouseY >= 151 && super.mouseY < 164) {
  5960. menuActionName[1] = "Zoom Out";
  5961. menuActionID[1] = 1800;
  5962. menuActionRow = 2;
  5963. }
  5964. if (super.mouseX >= 695 && super.mouseX <= 751
  5965. && super.mouseY >= 134 && super.mouseY < 165) {
  5966. menuActionName[1] = "Familar Information";
  5967. menuActionID[1] = 1505;
  5968. menuActionRow = 2;
  5969. }
  5970. if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 52 && super.mouseY < 87){
  5971. menuActionID[2] = 1500;
  5972. menuActionRow = 2;
  5973. menuActionName[1] = "Select Quick-Prayers";
  5974. menuActionID[1] = 1506;
  5975. menuActionRow = 3;
  5976. if(!prayClicked){
  5977. menuActionName[2] = "Toggle Quick-Prayers on";
  5978. } else if(prayClicked){
  5979. menuActionName[2] = "Toggle Quick-Prayers off";
  5980. }
  5981.  
  5982. }
  5983. if (super.mouseY >= 233 && super.mouseY <= 242) {
  5984. if(super.mouseX >= 550 && super.mouseX <= 563){
  5985. if(!praySelected) {
  5986. menuActionName[2] = "Select";
  5987. } else if(praySelected){
  5988. menuActionName[2] = "Unselect";
  5989. }
  5990. menuActionID[2] = 18026;
  5991. menuActionRow = 2;
  5992. }
  5993. if(super.mouseX >= 590 && super.mouseX <= 600){
  5994. if(!praySelected) {
  5995. menuActionName[2] = "Select";
  5996. } else if(praySelected){
  5997. menuActionName[2] = "Unselect";
  5998. }
  5999. menuActionID[2] = 18027;
  6000. menuActionRow = 2;
  6001. }
  6002. if(super.mouseX >= 630 && super.mouseX <= 637){
  6003. if(!praySelected) {
  6004. menuActionName[2] = "Select";
  6005. } else if(praySelected){
  6006. menuActionName[2] = "Unselect";
  6007. }
  6008. menuActionID[2] = 18028;
  6009. menuActionRow = 2;
  6010. }
  6011. }
  6012.  
  6013.  
  6014.  
  6015.  
  6016. if(is508 == true || is525 == true || is562 == true) {
  6017. if(super.mouseX >= 527 && super.mouseX <= 560 && super.mouseY >= 126 && super.mouseY <= 159) {
  6018. menuActionName[1] = "Forums";
  6019. menuActionID[1] = 1005;
  6020. menuActionRow = 2;
  6021. }
  6022. if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 95 && super.mouseY < 128){
  6023. if(!runClicked){
  6024. menuActionName[2] = "Toggle Run-Mode On";
  6025. } else if(runClicked){
  6026. menuActionName[2] = "Toggle Run-Mode Off";
  6027. }
  6028. menuActionID[2] = 1050;
  6029. menuActionRow = 2;
  6030. menuActionName[1] = "Rest";
  6031. menuActionID[1] = 1501;
  6032. menuActionRow = 3;
  6033. }
  6034. if(super.mouseX >= 516 && super.mouseX <= 550 && super.mouseY >= 46 && super.mouseY < 80){
  6035. menuActionName[2] = "Toggle XP Total";
  6036. menuActionID[2] = 1503;
  6037. menuActionRow = 2;
  6038. menuActionName[1] = "Reset XP Total";
  6039. menuActionID[1] = 1504;
  6040. menuActionRow = 3;
  6041. }
  6042. if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 52 && super.mouseY < 87){
  6043. if(!prayClicked){
  6044. menuActionName[1] = "Toggle Quick-Prayers On";
  6045. } else if(prayClicked){
  6046. menuActionName[1] = "Toggle Quick-Prayers Off";
  6047. }
  6048. menuActionID[2] = 1500;
  6049. menuActionRow = 2;
  6050. menuActionName[1] = "Select Quick-Prayers";
  6051. menuActionID[1] = 1506;
  6052. menuActionRow = 3;
  6053.  
  6054. }
  6055. if(super.mouseX >= 706 && super.mouseX <= 762 && super.mouseY >= 52 && super.mouseY < 87){
  6056. if(!prayClicked){
  6057. menuActionName[1] = "Toggle Quick-Prayers On";
  6058. } else if(prayClicked){
  6059. menuActionName[1] = "Toggle Quick-Prayers Off";
  6060. }
  6061. menuActionID[2] = 1500;
  6062. menuActionRow = 2;
  6063. menuActionName[1] = "Select Quick-Prayers";
  6064. menuActionID[1] = 1506;
  6065. menuActionRow = 3;
  6066. }
  6067. }
  6068. }
  6069.  
  6070. public int getOrbTextColor(int statusInt){
  6071. if(statusInt >= 75 && statusInt <= 100){
  6072. return 0x00FF00;
  6073. } else if(statusInt >= 50 && statusInt <= 74){
  6074. return 0xFFFF00;
  6075. } else if(statusInt >= 25 && statusInt <= 49){
  6076. return 0xFF981F;
  6077. } else {
  6078. return 0xFF0000;
  6079. }
  6080. }
  6081.  
  6082. public int getOrbFill(int statusInt){
  6083. if(statusInt <= 100 && statusInt >= 97) {
  6084. return 0;
  6085. } else if(statusInt <= 96 && statusInt >= 93) {
  6086. return 1;
  6087. } else if(statusInt <= 92 && statusInt >= 89) {
  6088. return 2;
  6089. } else if(statusInt <= 88 && statusInt >= 85) {
  6090. return 3;
  6091. } else if(statusInt <= 84 && statusInt >= 81) {
  6092. return 4;
  6093. } else if(statusInt <= 80 && statusInt >= 77) {
  6094. return 5;
  6095. } else if(statusInt <= 76 && statusInt >= 73) {
  6096. return 6;
  6097. } else if(statusInt <= 72 && statusInt >= 69) {
  6098. return 7;
  6099. } else if(statusInt <= 68 && statusInt >= 65) {
  6100. return 8;
  6101. } else if(statusInt <= 64 && statusInt >= 61) {
  6102. return 9;
  6103. } else if(statusInt <= 60 && statusInt >= 57) {
  6104. return 10;
  6105. } else if(statusInt <= 56 && statusInt >= 53) {
  6106. return 11;
  6107. } else if(statusInt <= 52 && statusInt >= 49) {
  6108. return 12;
  6109. } else if(statusInt <= 48 && statusInt >= 45) {
  6110. return 13;
  6111. } else if(statusInt <= 44 && statusInt >= 41) {
  6112. return 14;
  6113. } else if(statusInt <= 40 && statusInt >= 37) {
  6114. return 15;
  6115. } else if(statusInt <= 36 && statusInt >= 33) {
  6116. return 16;
  6117. } else if(statusInt <= 32 && statusInt >= 29) {
  6118. return 17;
  6119. } else if(statusInt <= 28 && statusInt >= 25) {
  6120. return 18;
  6121. } else if(statusInt <= 24 && statusInt >= 21) {
  6122. return 19;
  6123. } else if(statusInt <= 20 && statusInt >= 17) {
  6124. return 20;
  6125. } else if(statusInt <= 16 && statusInt >= 13) {
  6126. return 21;
  6127. } else if(statusInt <= 12 && statusInt >= 9) {
  6128. return 22;
  6129. } else if(statusInt <= 8 && statusInt >= 7) {
  6130. return 23;
  6131. } else if(statusInt <= 6 && statusInt >= 5) {
  6132. return 24;
  6133. } else if(statusInt <= 4 && statusInt >= 3) {
  6134. return 25;
  6135. } else if(statusInt <= 2 && statusInt >= 1) {
  6136. return 26;
  6137. } else if(statusInt <= 0) {
  6138. return 27;
  6139. }
  6140. return 0;
  6141. }
  6142. public void drawSumm() {
  6143. int summ;
  6144. String OD = signlink.findcachedir() + "Sprites/";
  6145. String cPR = RSInterface.interfaceCache[31194].disabledMessage;
  6146. int currentPR = Integer.parseInt(cPR);
  6147. String mPR = RSInterface.interfaceCache[31195].disabledMessage;
  6148. int maxPR2 = Integer.parseInt(mPR);
  6149. summ = (int) (((double) currentPR / (double) maxPR2) * 100D);
  6150. SUM[0] = new Sprite(OD + "SUM 0.PNG", 27, getOrbFill(summ));
  6151. if (summHover) {
  6152. SUM[7].drawSprite(174, 130);
  6153. } else if (!summHover) {
  6154. SUM[1].drawSprite(174, 130);
  6155. }
  6156. SUM[16].drawSprite(174, 130);
  6157. SUM[0].drawSprite(177, 136);
  6158. if (summ <= 25) {
  6159. if (loopCycle % 20 < 10) {
  6160. SUM[17].drawSprite(177, 135);
  6161. }
  6162. } else {
  6163. SUM[16].drawSprite(174, 130);
  6164. }
  6165. smallText.method382(getOrbTextColor(summ), 218, RSInterface.interfaceCache[31194].disabledMessage, 157, true);
  6166.  
  6167. }
  6168.  
  6169. public void drawHP() {
  6170. int health;
  6171. String OrbDirectory = signlink.findcachedir()+"/Sprites/Gameframe/Orbs/";
  6172. String cHP = RSInterface.interfaceCache[31159].disabledMessage; cHP = cHP.replaceAll("%","");
  6173. int currentHP = Integer.parseInt(cHP);
  6174. String mHP = RSInterface.interfaceCache[31160].disabledMessage; mHP = mHP.replaceAll("%","");
  6175. int maxHP2 = Integer.parseInt(mHP);
  6176. health = (int)(((double)currentHP / (double)maxHP2) * 100D);
  6177. ORBS[0] = new Sprite(OrbDirectory+"ORBS 0.PNG", 27, getOrbFill(health));
  6178. if(is480){
  6179. ORBS[14].drawSprite(174, 14);
  6180. } else {
  6181. ORBS[1].drawSprite(174, 14);
  6182. }
  6183. ORBS[2].drawSprite(177, 17);
  6184. ORBS[0].drawSprite(177, 17);
  6185. if(health <= 20){
  6186. if(loopCycle % 20 < 10){
  6187. ORBS[3].drawSprite(183, 25);
  6188. }
  6189. } else {
  6190. ORBS[3].drawSprite(183, 25);
  6191. }
  6192. int Y = 40;
  6193. int hpx10 = Integer.parseInt(RSInterface.interfaceCache[31159].disabledMessage);
  6194. if(is480){
  6195. Y = 43;
  6196. }
  6197. smallText.method382(getOrbTextColor(health), 218,""+hpx10*10, Y, true);// wait i already did this before :P
  6198. }
  6199.  
  6200. public void drawPrayer() {
  6201. int prayer;
  6202. String OD = signlink.findcachedir()+"/Sprites/Gameframe/Orbs/";
  6203. String cPR = RSInterface.interfaceCache[31134].disabledMessage;
  6204. int currentPR = Integer.parseInt(cPR);
  6205. String mPR = RSInterface.interfaceCache[31135].disabledMessage;
  6206. int maxPR2 = Integer.parseInt(mPR);
  6207. prayer = (int)(((double)currentPR / (double)maxPR2) * 100D);
  6208. ORBS[0] = new Sprite(OD+"ORBS 0.PNG", 27, getOrbFill(prayer));
  6209. if(!prayClicked){
  6210. if(!is480){
  6211. if(prayHover){
  6212. ORBS[7].drawSprite(190, 53);
  6213. }else if(!prayHover){
  6214. ORBS[1].drawSprite(190, 53);
  6215. }
  6216. } else {
  6217. if(prayHover){
  6218. ORBS[15].drawSprite(190, 53);
  6219. } else {
  6220. ORBS[14].drawSprite(190, 53);
  6221. }
  6222. }
  6223. ORBS[4].drawSprite(193, 56);
  6224. } else if(prayClicked){
  6225. if(!is480){
  6226. if(prayHover){
  6227. ORBS[7].drawSprite(190, 53);
  6228. } else if(!prayHover){
  6229. ORBS[1].drawSprite(190, 53);
  6230. }
  6231. } else {
  6232. if(prayHover){
  6233. ORBS[15].drawSprite(190, 53);
  6234. } else {
  6235. ORBS[14].drawSprite(190, 53);
  6236. }
  6237. }
  6238. ORBS[5].drawSprite(193, 56);
  6239. }
  6240. ORBS[0].drawSprite(194, 56);
  6241. if(prayer <= 25) {
  6242. if(loopCycle % 20 < 10) {
  6243. ORBS[6].drawSprite(197, 60);
  6244. }
  6245. } else {
  6246. ORBS[6].drawSprite(197, 60);
  6247. }
  6248. int Y = 79;
  6249. if(is480){
  6250. Y = 82;
  6251. }
  6252. smallText.method382(getOrbTextColor(prayer), 234, RSInterface.interfaceCache[31134].disabledMessage, Y, true);
  6253. }
  6254.  
  6255. public void drawRunOrb(){
  6256. String OD = signlink.findcachedir()+"/Sprites/Gameframe/Orbs/";
  6257. String cEn = RSInterface.interfaceCache[149].disabledMessage; cEn = cEn.replaceAll("%","");
  6258. int currentEner = Integer.parseInt(cEn);
  6259. energy = (int)(((double)currentEner / 100) * 100D);
  6260. ORBS[0] = new Sprite(OD+"ORBS 0.PNG", 27, getOrbFill(energy));
  6261. if(!runClicked){
  6262. if(!is480){
  6263. if(runHover){
  6264. ORBS[7].drawSprite(190, 92);
  6265. } else{
  6266. ORBS[1].drawSprite(190, 92);
  6267. }
  6268. } else {
  6269. ORBS[14].drawSprite(190, 92);
  6270. }
  6271. ORBS[10].drawSprite(193, 95);
  6272. if(energy != 100){
  6273. ORBS[0].drawSprite(193, 95);
  6274. }
  6275. ORBS[8].drawSprite(199, 100);
  6276. } else {
  6277. if(!is480){
  6278. if(runHover){
  6279. ORBS[7].drawSprite(190, 92);
  6280. } else {
  6281. ORBS[1].drawSprite(190, 92);
  6282. }
  6283. } else {
  6284. ORBS[14].drawSprite(190, 92);
  6285. }
  6286. ORBS[11].drawSprite(193, 95);
  6287. if(energy != 100){
  6288. ORBS[0].drawSprite(193, 95);
  6289. }
  6290. ORBS[9].drawSprite(199, 100);
  6291. }
  6292. int Y = 117;
  6293. if(is480){
  6294. Y = 120;
  6295. }
  6296. smallText.method382(getOrbTextColor(energy), 234, ""+energy, Y, true);
  6297. }
  6298.  
  6299. private void method142(int i, int j, int k, int l, int i1, int j1, int k1
  6300. )
  6301. {
  6302. if(i1 >= 1 && i >= 1 && i1 <= 102 && i <= 102)
  6303. {
  6304. if(lowMem && j != plane)
  6305. return;
  6306. int i2 = 0;
  6307. if(j1 == 0)
  6308. i2 = worldController.method300(j, i1, i);
  6309. if(j1 == 1)
  6310. i2 = worldController.method301(j, i1, i);
  6311. if(j1 == 2)
  6312. i2 = worldController.method302(j, i1, i);
  6313. if(j1 == 3)
  6314. i2 = worldController.method303(j, i1, i);
  6315. if(i2 != 0)
  6316. {
  6317. int i3 = worldController.method304(j, i1, i, i2);
  6318. int j2 = i2 >> 14 & 0x7fff;
  6319. int k2 = i3 & 0x1f;
  6320. int l2 = i3 >> 6;
  6321. if(j1 == 0)
  6322. {
  6323. worldController.method291(i1, j, i, (byte)-119);
  6324. ObjectDef class46 = ObjectDef.forID(j2);
  6325. if(class46.aBoolean767)
  6326. aClass11Array1230[j].method215(l2, k2, class46.aBoolean757, i1, i);
  6327. }
  6328. if(j1 == 1)
  6329. worldController.method292(i, j, i1);
  6330. if(j1 == 2)
  6331. {
  6332. worldController.method293(j, i1, i);
  6333. ObjectDef class46_1 = ObjectDef.forID(j2);
  6334. if(i1 + class46_1.anInt744 > 103 || i + class46_1.anInt744 > 103 || i1 + class46_1.anInt761 > 103 || i + class46_1.anInt761 > 103)
  6335. return;
  6336. if(class46_1.aBoolean767)
  6337. aClass11Array1230[j].method216(l2, class46_1.anInt744, i1, i, class46_1.anInt761, class46_1.aBoolean757);
  6338. }
  6339. if(j1 == 3)
  6340. {
  6341. worldController.method294(j, i, i1);
  6342. ObjectDef class46_2 = ObjectDef.forID(j2);
  6343. if(class46_2.aBoolean767 && class46_2.hasActions)
  6344. aClass11Array1230[j].method218(i, i1);
  6345. }
  6346. }
  6347. if(k1 >= 0)
  6348. {
  6349. int j3 = j;
  6350. if(j3 < 3 && (byteGroundArray[1][i1][i] & 2) == 2)
  6351. j3++;
  6352. ObjectManager.method188(worldController, k, i, l, j3, aClass11Array1230[j], intGroundArray, i1, k1, j);
  6353. }
  6354. }
  6355. }
  6356.  
  6357. private void updatePlayers(int i, Stream stream)
  6358. {
  6359. anInt839 = 0;
  6360. anInt893 = 0;
  6361. method117(stream);
  6362. method134(stream);
  6363. method91(stream, i);
  6364. method49(stream);
  6365. for(int k = 0; k < anInt839; k++)
  6366. {
  6367. int l = anIntArray840[k];
  6368. if(playerArray[l].anInt1537 != loopCycle)
  6369. playerArray[l] = null;
  6370. }
  6371.  
  6372. if(stream.currentOffset != i)
  6373. {
  6374. signlink.reporterror("Error packet size mismatch in getplayer pos:" + stream.currentOffset + " psize:" + i);
  6375. throw new RuntimeException("eek");
  6376. }
  6377. for(int i1 = 0; i1 < playerCount; i1++)
  6378. if(playerArray[playerIndices[i1]] == null)
  6379. {
  6380. signlink.reporterror(myUsername + " null entry in pl list - pos:" + i1 + " size:" + playerCount);
  6381. throw new RuntimeException("eek");
  6382. }
  6383.  
  6384. }
  6385.  
  6386. private void setCameraPos(int j, int k, int l, int i1, int j1, int k1)
  6387. {
  6388. int l1 = 2048 - k & 0x7ff;
  6389. int i2 = 2048 - j1 & 0x7ff;
  6390. int j2 = 0;
  6391. int k2 = 0;
  6392. int l2 = j;
  6393. if(l1 != 0)
  6394. {
  6395. int i3 = Model.modelIntArray1[l1];
  6396. int k3 = Model.modelIntArray2[l1];
  6397. int i4 = k2 * k3 - l2 * i3 >> 16;
  6398. l2 = k2 * i3 + l2 * k3 >> 16;
  6399. k2 = i4;
  6400. }
  6401. if(i2 != 0)
  6402. {
  6403. /* xxx if(cameratoggle){
  6404. if(zoom == 0)
  6405. zoom = k2;
  6406. if(lftrit == 0)
  6407. lftrit = j2;
  6408. if(fwdbwd == 0)
  6409. fwdbwd = l2;
  6410. k2 = zoom;
  6411. j2 = lftrit;
  6412. l2 = fwdbwd;
  6413. }
  6414. */
  6415. int j3 = Model.modelIntArray1[i2];
  6416. int l3 = Model.modelIntArray2[i2];
  6417. int j4 = l2 * j3 + j2 * l3 >> 16;
  6418. l2 = l2 * l3 - j2 * j3 >> 16;
  6419. j2 = j4;
  6420. }
  6421. xCameraPos = l - j2;
  6422. zCameraPos = i1 - k2;
  6423. yCameraPos = k1 - l2;
  6424. yCameraCurve = k;
  6425. xCameraCurve = j1;
  6426. }
  6427.  
  6428. public void updateStrings(String str, int i) {
  6429. switch(i) {
  6430. case 1675: sendFrame126(str, 17508); break;//Stab
  6431. case 1676: sendFrame126(str, 17509); break;//Slash
  6432. case 1677: sendFrame126(str, 17510); break;//Cursh
  6433. case 1678: sendFrame126(str, 17511); break;//Magic
  6434. case 1679: sendFrame126(str, 17512); break;//Range
  6435. case 1680: sendFrame126(str, 17513); break;//Stab
  6436. case 1681: sendFrame126(str, 17514); break;//Slash
  6437. case 1682: sendFrame126(str, 17515); break;//Crush
  6438. case 1683: sendFrame126(str, 17516); break;//Magic
  6439. case 1684: sendFrame126(str, 17517); break;//Range
  6440. case 1686: sendFrame126(str, 17518); break;//Strength
  6441. case 1687: sendFrame126(str, 17519); break;//Prayer
  6442. }
  6443. }
  6444.  
  6445. public void sendFrame126(String str,int i) {
  6446. RSInterface.interfaceCache[i].disabledMessage = str;
  6447. if(RSInterface.interfaceCache[i].parentID == tabInterfaceIDs[tabID])
  6448. needDrawTabArea = true;
  6449. }
  6450.  
  6451. public void sendPacket185(int button,int toggle,int interfaceType) {
  6452. switch(interfaceType) {
  6453. case 135:
  6454. RSInterface class9 = RSInterface.interfaceCache[button];
  6455. boolean flag8 = true;
  6456. if(class9.contentType > 0)
  6457. flag8 = promptUserForInput(class9);
  6458. if(flag8) {
  6459. stream.createFrame(185);
  6460. stream.writeWord(button);
  6461. }
  6462. break;
  6463. case 646:
  6464. stream.createFrame(185);
  6465. stream.writeWord(button);
  6466. RSInterface class9_2 = RSInterface.interfaceCache[button];
  6467. if(class9_2.valueIndexArray != null && class9_2.valueIndexArray[0][0] == 5) {
  6468. if(variousSettings[toggle] != class9_2.requiredValues[0]) {
  6469. variousSettings[toggle] = class9_2.requiredValues[0];
  6470. method33(toggle);
  6471. needDrawTabArea = true;
  6472. }
  6473. }
  6474. break;
  6475. case 169:
  6476. stream.createFrame(185);
  6477. stream.writeWord(button);
  6478. RSInterface class9_3 = RSInterface.interfaceCache[button];
  6479. if(class9_3.valueIndexArray != null && class9_3.valueIndexArray[0][0] == 5) {
  6480. variousSettings[toggle] = 1 - variousSettings[toggle];
  6481. method33(toggle);
  6482. needDrawTabArea = true;
  6483. }
  6484. switch(button) {
  6485. case 19136:
  6486. System.out.println("toggle = "+toggle);
  6487. if(toggle == 0)
  6488. sendFrame36(173,toggle);
  6489. if(toggle == 1)
  6490. sendPacket185(153,173,646);
  6491. break;
  6492. }
  6493. break;
  6494. }
  6495. }
  6496.  
  6497. public void sendFrame36(int id,int state) {
  6498. anIntArray1045[id] = state;
  6499. if(variousSettings[id] != state) {
  6500. variousSettings[id] = state;
  6501. method33(id);
  6502. needDrawTabArea = true;
  6503. if(dialogID != -1)
  6504. inputTaken = true;
  6505. }
  6506. }
  6507.  
  6508. public void sendFrame219() {
  6509.  
  6510.  
  6511. if(invOverlayInterfaceID != -1) {
  6512. invOverlayInterfaceID = -1;
  6513. needDrawTabArea = true;
  6514. tabAreaAltered = true;
  6515. }
  6516. if(backDialogID != -1) {
  6517. backDialogID = -1;
  6518. inputTaken = true;
  6519. }
  6520. if(inputDialogState != 0) {
  6521. inputDialogState = 0;
  6522. inputTaken = true;
  6523. }
  6524. openInterfaceID = -1;
  6525. aBoolean1149 = false;
  6526. }
  6527.  
  6528. public void sendFrame248(int interfaceID,int sideInterfaceID) {
  6529. if(backDialogID != -1) {
  6530. backDialogID = -1;
  6531. inputTaken = true;
  6532. }
  6533. if(inputDialogState != 0) {
  6534. inputDialogState = 0;
  6535. inputTaken = true;
  6536. }
  6537. openInterfaceID = interfaceID;
  6538. invOverlayInterfaceID = sideInterfaceID;
  6539. needDrawTabArea = true;
  6540. tabAreaAltered = true;
  6541. aBoolean1149 = false;
  6542. }
  6543.  
  6544. private boolean parsePacket() {
  6545.  
  6546.  
  6547. if(socketStream == null)
  6548. return false;
  6549. try {
  6550. int i = socketStream.available();
  6551. if(i == 0)
  6552. return false;
  6553. if(pktType == -1) {
  6554. socketStream.flushInputStream(inStream.buffer, 1);
  6555. pktType = inStream.buffer[0] & 0xff;
  6556. if(encryption != null)
  6557. pktType = pktType - encryption.getNextKey() & 0xff;
  6558. pktSize = SizeConstants.packetSizes[pktType];
  6559. i--;
  6560. }
  6561. if(pktSize == -1)
  6562. if(i > 0) {
  6563. socketStream.flushInputStream(inStream.buffer, 1);
  6564. pktSize = inStream.buffer[0] & 0xff;
  6565. i--;
  6566. } else {
  6567. return false;
  6568. }
  6569. if(pktSize == -2)
  6570. if(i > 1) {
  6571. socketStream.flushInputStream(inStream.buffer, 2);
  6572. inStream.currentOffset = 0;
  6573. pktSize = inStream.readUnsignedWord();
  6574. i -= 2;
  6575. } else {
  6576. return false;
  6577. }
  6578. if(i < pktSize)
  6579. return false;
  6580. inStream.currentOffset = 0;
  6581. socketStream.flushInputStream(inStream.buffer, pktSize);
  6582. anInt1009 = 0;
  6583. anInt843 = anInt842;
  6584. anInt842 = anInt841;
  6585. anInt841 = pktType;
  6586. switch(pktType) {
  6587. case 81:
  6588. updatePlayers(pktSize, inStream);
  6589. aBoolean1080 = false;
  6590. pktType = -1;
  6591. return true;
  6592.  
  6593. case 176:
  6594. daysSinceRecovChange = inStream.method427();
  6595. unreadMessages = inStream.method435();
  6596. membersInt = inStream.readUnsignedByte();
  6597. anInt1193 = inStream.method440();
  6598. daysSinceLastLogin = inStream.readUnsignedWord();
  6599. if(anInt1193 != 0 && openInterfaceID == -1) {
  6600. signlink.dnslookup(TextClass.method586(anInt1193));
  6601. clearTopInterfaces();
  6602. char c = '\u028A';
  6603. if(daysSinceRecovChange != 201 || membersInt == 1)
  6604. c = '\u028F';
  6605. reportAbuseInput = "";
  6606. canMute = false;
  6607. for(int k9 = 0; k9 < RSInterface.interfaceCache.length; k9++) {
  6608. if(RSInterface.interfaceCache[k9] == null || RSInterface.interfaceCache[k9].contentType != c)
  6609. continue;
  6610. openInterfaceID = RSInterface.interfaceCache[k9].parentID;
  6611.  
  6612. }
  6613. }
  6614. pktType = -1;
  6615. return true;
  6616.  
  6617. case 64:
  6618. anInt1268 = inStream.method427();
  6619. anInt1269 = inStream.method428();
  6620. for(int j = anInt1268; j < anInt1268 + 8; j++) {
  6621. for(int l9 = anInt1269; l9 < anInt1269 + 8; l9++)
  6622. if(groundArray[plane][j][l9] != null) {
  6623. groundArray[plane][j][l9] = null;
  6624. spawnGroundItem(j, l9);
  6625. }
  6626. }
  6627. for(Class30_Sub1 class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetFirst(); class30_sub1 != null; class30_sub1 = (Class30_Sub1)aClass19_1179.reverseGetNext())
  6628. if(class30_sub1.anInt1297 >= anInt1268 && class30_sub1.anInt1297 < anInt1268 + 8 && class30_sub1.anInt1298 >= anInt1269 && class30_sub1.anInt1298 < anInt1269 + 8 && class30_sub1.anInt1295 == plane)
  6629. class30_sub1.anInt1294 = 0;
  6630. pktType = -1;
  6631. return true;
  6632.  
  6633. case 185:
  6634. int k = inStream.method436();
  6635. RSInterface.interfaceCache[k].disabledMediaType = 3;
  6636. if(myPlayer.desc == null)
  6637. 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];
  6638. else
  6639. RSInterface.interfaceCache[k].disabledMediaID = (int)(0x12345678L + myPlayer.desc.interfaceType);
  6640. pktType = -1;
  6641. return true;
  6642.  
  6643. /* Clan chat packet */
  6644. case 217:
  6645. try {
  6646. name = inStream.readString();
  6647. disabledMessage = inStream.readString();
  6648. clanname = inStream.readString();
  6649. rights = inStream.readUnsignedWord();
  6650. //disabledMessage = TextInput.processText(disabledMessage);
  6651. //disabledMessage = Censor.doCensor(disabledMessage);
  6652. System.out.println(clanname);
  6653. pushMessage(disabledMessage, 16, name);
  6654. } catch(Exception e) {
  6655. e.printStackTrace();
  6656. }
  6657. pktType = -1;
  6658. return true;
  6659.  
  6660. case 107:
  6661. aBoolean1160 = false;
  6662. for(int l = 0; l < 5; l++)
  6663. aBooleanArray876[l] = false;
  6664. pktType = -1;
  6665. return true;
  6666.  
  6667. case 72:
  6668. int i1 = inStream.method434();
  6669. RSInterface class9 = RSInterface.interfaceCache[i1];
  6670. for(int k15 = 0; k15 < class9.inventory.length; k15++) {
  6671. class9.inventory[k15] = -1;
  6672. class9.inventory[k15] = 0;
  6673. }
  6674. pktType = -1;
  6675. return true;
  6676.  
  6677. case 214:
  6678. ignoreCount = pktSize / 8;
  6679. for(int j1 = 0; j1 < ignoreCount; j1++)
  6680. ignoreListAsLongs[j1] = inStream.readQWord();
  6681. pktType = -1;
  6682. return true;
  6683.  
  6684. case 166:
  6685. aBoolean1160 = true;
  6686. anInt1098 = inStream.readUnsignedByte();
  6687. anInt1099 = inStream.readUnsignedByte();
  6688. anInt1100 = inStream.readUnsignedWord();
  6689. anInt1101 = inStream.readUnsignedByte();
  6690. anInt1102 = inStream.readUnsignedByte();
  6691. if(anInt1102 >= 100) {
  6692. xCameraPos = anInt1098 * 128 + 64;
  6693. yCameraPos = anInt1099 * 128 + 64;
  6694. zCameraPos = method42(plane, yCameraPos, xCameraPos) - anInt1100;
  6695. }
  6696. pktType = -1;
  6697. return true;
  6698.  
  6699. case 134:
  6700. needDrawTabArea = true;
  6701. int k1 = inStream.readUnsignedByte();
  6702. int i10 = inStream.method439();
  6703. int l15 = inStream.readUnsignedByte();
  6704. int oldXp = currentExp[k1];
  6705. if(drawXpBar) {
  6706. drawFlag = true;
  6707. }
  6708. currentExp[k1] = i10;
  6709. currentStats[k1] = l15;
  6710. maxStats[k1] = 1;
  6711. testXp += i10-oldXp;
  6712. xpToDraw += i10-oldXp;
  6713. if(testXp == currentExp[k1]) {
  6714. testXp = 0;
  6715. xpToDraw = 0;
  6716. }
  6717. for(int k20 = 0; k20 < 98; k20++)
  6718. if(i10 >= anIntArray1019[k20])
  6719. maxStats[k1] = k20 + 2;
  6720. pktType = -1;
  6721. return true;
  6722.  
  6723. case 71:
  6724. int l1 = inStream.readUnsignedWord();
  6725. int j10 = inStream.method426();
  6726. if(l1 == 65535)
  6727. l1 = -1;
  6728. tabInterfaceIDs[j10] = l1;
  6729. needDrawTabArea = true;
  6730. tabAreaAltered = true;
  6731. pktType = -1;
  6732. return true;
  6733.  
  6734. case 74:
  6735. int i2 = inStream.method434();
  6736. if(i2 == 65535)
  6737. i2 = -1;
  6738. if(i2 != currentSong && musicEnabled && !lowMem && prevSong == 0) {
  6739. nextSong = i2;
  6740. songChanging = true;
  6741. onDemandFetcher.method558(2, nextSong);
  6742. }
  6743. currentSong = i2;
  6744. pktType = -1;
  6745. return true;
  6746.  
  6747. case 121:
  6748. int j2 = inStream.method436();
  6749. int k10 = inStream.method435();
  6750. if(musicEnabled && !lowMem) {
  6751. nextSong = j2;
  6752. songChanging = false;
  6753. onDemandFetcher.method558(2, nextSong);
  6754. prevSong = k10;
  6755. }
  6756. pktType = -1;
  6757. return true;
  6758.  
  6759. case 109:
  6760. resetLogout();
  6761. pktType = -1;
  6762. return false;
  6763.  
  6764. case 70:
  6765. int k2 = inStream.readSignedWord();
  6766. int l10 = inStream.method437();
  6767. int i16 = inStream.method434();
  6768. RSInterface class9_5 = RSInterface.interfaceCache[i16];
  6769. class9_5.xOffset = k2;
  6770. class9_5.yOffset = l10;
  6771. pktType = -1;
  6772. return true;
  6773.  
  6774. case 73:
  6775. case 241:
  6776. int l2 = anInt1069;
  6777. int i11 = anInt1070;
  6778. if(pktType == 73) {
  6779. l2 = inStream.method435();
  6780. i11 = inStream.readUnsignedWord();
  6781. aBoolean1159 = false;
  6782. }
  6783. if(pktType == 241) {
  6784. i11 = inStream.method435();
  6785. inStream.initBitAccess();
  6786. for(int j16 = 0; j16 < 4; j16++) {
  6787. for(int l20 = 0; l20 < 13; l20++) {
  6788. for(int j23 = 0; j23 < 13; j23++) {
  6789. int i26 = inStream.readBits(1);
  6790. if(i26 == 1)
  6791. anIntArrayArrayArray1129[j16][l20][j23] = inStream.readBits(26);
  6792. else
  6793. anIntArrayArrayArray1129[j16][l20][j23] = -1;
  6794. }
  6795. }
  6796. }
  6797. inStream.finishBitAccess();
  6798. l2 = inStream.readUnsignedWord();
  6799. aBoolean1159 = true;
  6800. }
  6801. if(anInt1069 == l2 && anInt1070 == i11 && loadingStage == 2)
  6802. {
  6803. pktType = -1;
  6804. return true;
  6805. }
  6806. anInt1069 = l2;
  6807. anInt1070 = i11;
  6808. baseX = (anInt1069 - 6) * 8;
  6809. baseY = (anInt1070 - 6) * 8;
  6810. aBoolean1141 = (anInt1069 / 8 == 48 || anInt1069 / 8 == 49) && anInt1070 / 8 == 48;
  6811. if(anInt1069 / 8 == 48 && anInt1070 / 8 == 148)
  6812. aBoolean1141 = true;
  6813. loadingStage = 1;
  6814. aLong824 = System.currentTimeMillis();
  6815. inGameScreen.initDrawingArea();
  6816. loadingPleaseWait.drawSprite(8,9);;
  6817. inGameScreen.drawGraphics(4, super.graphics, 4);
  6818. if(pktType == 73) {
  6819. int k16 = 0;
  6820. for(int i21 = (anInt1069 - 6) / 8; i21 <= (anInt1069 + 6) / 8; i21++) {
  6821. for(int k23 = (anInt1070 - 6) / 8; k23 <= (anInt1070 + 6) / 8; k23++)
  6822. k16++;
  6823. }
  6824. aByteArrayArray1183 = new byte[k16][];
  6825. aByteArrayArray1247 = new byte[k16][];
  6826. anIntArray1234 = new int[k16];
  6827. anIntArray1235 = new int[k16];
  6828. anIntArray1236 = new int[k16];
  6829. k16 = 0;
  6830. for(int l23 = (anInt1069 - 6) / 8; l23 <= (anInt1069 + 6) / 8; l23++) {
  6831. for(int j26 = (anInt1070 - 6) / 8; j26 <= (anInt1070 + 6) / 8; j26++) {
  6832. anIntArray1234[k16] = (l23 << 8) + j26;
  6833. if(aBoolean1141 && (j26 == 49 || j26 == 149 || j26 == 147 || l23 == 50 || l23 == 49 && j26 == 47)) {
  6834. anIntArray1235[k16] = -1;
  6835. anIntArray1236[k16] = -1;
  6836. k16++;
  6837. } else {
  6838. int k28 = anIntArray1235[k16] = onDemandFetcher.method562(0, j26, l23);
  6839. if(k28 != -1)
  6840. onDemandFetcher.method558(3, k28);
  6841. int j30 = anIntArray1236[k16] = onDemandFetcher.method562(1, j26, l23);
  6842. if(j30 != -1)
  6843. onDemandFetcher.method558(3, j30);
  6844. k16++;
  6845. }
  6846. }
  6847. }
  6848. }
  6849. if(pktType == 241) {
  6850. int l16 = 0;
  6851. int ai[] = new int[676];
  6852. for(int i24 = 0; i24 < 4; i24++) {
  6853. for(int k26 = 0; k26 < 13; k26++) {
  6854. for(int l28 = 0; l28 < 13; l28++) {
  6855. int k30 = anIntArrayArrayArray1129[i24][k26][l28];
  6856. if(k30 != -1) {
  6857. int k31 = k30 >> 14 & 0x3ff;
  6858. int i32 = k30 >> 3 & 0x7ff;
  6859. int k32 = (k31 / 8 << 8) + i32 / 8;
  6860. for(int j33 = 0; j33 < l16; j33++) {
  6861. if(ai[j33] != k32)
  6862. continue;
  6863. k32 = -1;
  6864.  
  6865. }
  6866. if(k32 != -1)
  6867. ai[l16++] = k32;
  6868. }
  6869. }
  6870. }
  6871. }
  6872. aByteArrayArray1183 = new byte[l16][];
  6873. aByteArrayArray1247 = new byte[l16][];
  6874. anIntArray1234 = new int[l16];
  6875. anIntArray1235 = new int[l16];
  6876. anIntArray1236 = new int[l16];
  6877. for(int l26 = 0; l26 < l16; l26++) {
  6878. int i29 = anIntArray1234[l26] = ai[l26];
  6879. int l30 = i29 >> 8 & 0xff;
  6880. int l31 = i29 & 0xff;
  6881. int j32 = anIntArray1235[l26] = onDemandFetcher.method562(0, l31, l30);
  6882. if(j32 != -1)
  6883. onDemandFetcher.method558(3, j32);
  6884. int i33 = anIntArray1236[l26] = onDemandFetcher.method562(1, l31, l30);
  6885. if(i33 != -1)
  6886. onDemandFetcher.method558(3, i33);
  6887. }
  6888. }
  6889. int i17 = baseX - anInt1036;
  6890. int j21 = baseY - anInt1037;
  6891. anInt1036 = baseX;
  6892. anInt1037 = baseY;
  6893. for(int j24 = 0; j24 < 16384; j24++) {
  6894. NPC npc = npcArray[j24];
  6895. if(npc != null) {
  6896. for(int j29 = 0; j29 < 10; j29++) {
  6897. npc.smallX[j29] -= i17;
  6898. npc.smallY[j29] -= j21;
  6899. }
  6900. npc.x -= i17 * 128;
  6901. npc.y -= j21 * 128;
  6902. }
  6903. }
  6904. for(int i27 = 0; i27 < maxPlayers; i27++) {
  6905. Player player = playerArray[i27];
  6906. if(player != null) {
  6907. for(int i31 = 0; i31 < 10; i31++) {
  6908. player.smallX[i31] -= i17;
  6909. player.smallY[i31] -= j21;
  6910. }
  6911. player.x -= i17 * 128;
  6912. player.y -= j21 * 128;
  6913. }
  6914. }
  6915. aBoolean1080 = true;
  6916. byte byte1 = 0;
  6917. byte byte2 = 104;
  6918. byte byte3 = 1;
  6919. if(i17 < 0) {
  6920. byte1 = 103;
  6921. byte2 = -1;
  6922. byte3 = -1;
  6923. }
  6924. byte byte4 = 0;
  6925. byte byte5 = 104;
  6926. byte byte6 = 1;
  6927. if(j21 < 0) {
  6928. byte4 = 103;
  6929. byte5 = -1;
  6930. byte6 = -1;
  6931. }
  6932. for(int k33 = byte1; k33 != byte2; k33 += byte3) {
  6933. for(int l33 = byte4; l33 != byte5; l33 += byte6) {
  6934. int i34 = k33 + i17;
  6935. int j34 = l33 + j21;
  6936. for(int k34 = 0; k34 < 4; k34++)
  6937. if(i34 >= 0 && j34 >= 0 && i34 < 104 && j34 < 104)
  6938. groundArray[k34][k33][l33] = groundArray[k34][i34][j34];
  6939. else
  6940. groundArray[k34][k33][l33] = null;
  6941. }
  6942. }
  6943. for(Class30_Sub1 class30_sub1_1 = (Class30_Sub1)aClass19_1179.reverseGetFirst(); class30_sub1_1 != null; class30_sub1_1 = (Class30_Sub1)aClass19_1179.reverseGetNext()) {
  6944. class30_sub1_1.anInt1297 -= i17;
  6945. class30_sub1_1.anInt1298 -= j21;
  6946. if(class30_sub1_1.anInt1297 < 0 || class30_sub1_1.anInt1298 < 0 || class30_sub1_1.anInt1297 >= 104 || class30_sub1_1.anInt1298 >= 104)
  6947. class30_sub1_1.unlink();
  6948. }
  6949. if(destX != 0) {
  6950. destX -= i17;
  6951. destY -= j21;
  6952. }
  6953. aBoolean1160 = false;
  6954. pktType = -1;
  6955. return true;
  6956.  
  6957. case 208:
  6958. int i3 = inStream.method437();
  6959. if(i3 >= 0)
  6960. method60(i3);
  6961. anInt1018 = i3;
  6962. pktType = -1;
  6963. return true;
  6964.  
  6965. case 99:
  6966. /*
  6967. * Black map, mape state 2, causes blackness
  6968. */
  6969. anInt1021 = inStream.readUnsignedByte();
  6970. pktType = -1;
  6971. return true;
  6972.  
  6973. case 75:
  6974. int j3 = inStream.method436();
  6975. int j11 = inStream.method436();
  6976. RSInterface.interfaceCache[j11].disabledMediaType = 2;
  6977. RSInterface.interfaceCache[j11].disabledMediaID = j3;
  6978. pktType = -1;
  6979. return true;
  6980.  
  6981. case 114:
  6982. anInt1104 = inStream.method434() * 30;
  6983. pktType = -1;
  6984. return true;
  6985.  
  6986. case 60:
  6987. anInt1269 = inStream.readUnsignedByte();
  6988. anInt1268 = inStream.method427();
  6989. while(inStream.currentOffset < pktSize) {
  6990. int k3 = inStream.readUnsignedByte();
  6991. method137(inStream, k3);
  6992. }
  6993. pktType = -1;
  6994. return true;
  6995.  
  6996. case 35:
  6997. int l3 = inStream.readUnsignedByte();
  6998. int k11 = inStream.readUnsignedByte();
  6999. int j17 = inStream.readUnsignedByte();
  7000. int k21 = inStream.readUnsignedByte();
  7001. aBooleanArray876[l3] = true;
  7002. anIntArray873[l3] = k11;
  7003. anIntArray1203[l3] = j17;
  7004. anIntArray928[l3] = k21;
  7005. anIntArray1030[l3] = 0;
  7006. pktType = -1;
  7007. return true;
  7008.  
  7009. case 174:
  7010.  
  7011. /*Empty Following Packet*/
  7012. followPlayer = 0;
  7013. followNPC = 0;
  7014. int l11z = inStream.readUnsignedWord();
  7015. int iq = inStream.readUnsignedByte();
  7016. followDistance = inStream.readUnsignedWord();
  7017. if (iq == 0)
  7018. {
  7019. followNPC = l11z;
  7020. }
  7021. else if (iq == 1)
  7022. {
  7023. followPlayer = l11z;
  7024. }
  7025. pktType = -1;
  7026. return true;
  7027.  
  7028. case 104:
  7029. int j4 = inStream.method427();
  7030. int i12 = inStream.method426();
  7031. String s6 = inStream.readString();
  7032. if(j4 >= 1 && j4 <= 5) {
  7033. if(s6.equalsIgnoreCase("null"))
  7034. s6 = null;
  7035. atPlayerActions[j4 - 1] = s6;
  7036. atPlayerArray[j4 - 1] = i12 == 0;
  7037. }
  7038. pktType = -1;
  7039. return true;
  7040.  
  7041. case 78:
  7042. destX = 0;
  7043. pktType = -1;
  7044. return true;
  7045.  
  7046. case 253:
  7047. String s = inStream.readString();
  7048. if(s.startsWith("Alert##")) {
  7049. String[] args = s.split("##");
  7050. if (args.length == 3) {
  7051. alertHandler.alert = new Alert("[Server]", args[1], args[2]);
  7052. } else if (args.length == 4) {
  7053. alertHandler.alert = new Alert(args[1], args[2], args[3]);
  7054. }
  7055. pktType = -1;
  7056. return true;
  7057. }
  7058. if(s.endsWith(":tradereq:")) {
  7059. String s3 = s.substring(0, s.indexOf(":"));
  7060. long l17 = TextClass.longForName(s3);
  7061. boolean flag2 = false;
  7062. for(int j27 = 0; j27 < ignoreCount; j27++) {
  7063. if(ignoreListAsLongs[j27] != l17)
  7064. continue;
  7065. flag2 = true;
  7066. }
  7067. if(!flag2 && anInt1251 == 0)
  7068. pushMessage("wishes to trade with you.", 4, s3);
  7069. } else if (s.endsWith(":clan:")) {
  7070. String s4 = s.substring(0, s.indexOf(":"));
  7071. long l18 = TextClass.longForName(s4);
  7072. pushMessage("Clan: ", 8, s4);
  7073. } else if(s.endsWith("#url#")) {
  7074. String text = s.substring(0, s.indexOf("-"));
  7075. s = s.substring(text.length()+1).trim();
  7076. String link = s.substring(0, s.indexOf("#"));
  7077. pushMessage(text, 9, link);
  7078. } else if(s.endsWith(":resetautocast:")) {
  7079. Autocast = false;
  7080. autocastId = 0;
  7081. magicAuto.drawSprite(1000, 1000);
  7082. } else if(s.endsWith(":duelreq:")) {
  7083. String s4 = s.substring(0, s.indexOf(":"));
  7084. long l18 = TextClass.longForName(s4);
  7085. boolean flag3 = false;
  7086. for(int k27 = 0; k27 < ignoreCount; k27++) {
  7087. if(ignoreListAsLongs[k27] != l18)
  7088. continue;
  7089. flag3 = true;
  7090.  
  7091. }
  7092. if(!flag3 && anInt1251 == 0)
  7093. pushMessage("wishes to duel with you.", 8, s4);
  7094. } else if(s.endsWith(":chalreq:")) {
  7095. String s5 = s.substring(0, s.indexOf(":"));
  7096. long l19 = TextClass.longForName(s5);
  7097. boolean flag4 = false;
  7098. for(int l27 = 0; l27 < ignoreCount; l27++) {
  7099. if(ignoreListAsLongs[l27] != l19)
  7100. continue;
  7101. flag4 = true;
  7102.  
  7103. }
  7104. if(!flag4 && anInt1251 == 0) {
  7105. String s8 = s.substring(s.indexOf(":") + 1, s.length() - 9);
  7106. pushMessage(s8, 8, s5);
  7107. }
  7108. } else {
  7109. pushMessage(s, 0, "");
  7110. }
  7111. pktType = -1;
  7112. return true;
  7113.  
  7114. case 1:
  7115. for(int k4 = 0; k4 < playerArray.length; k4++)
  7116. if(playerArray[k4] != null)
  7117. playerArray[k4].anim = -1;
  7118. for(int j12 = 0; j12 < npcArray.length; j12++)
  7119. if(npcArray[j12] != null)
  7120. npcArray[j12].anim = -1;
  7121. pktType = -1;
  7122. return true;
  7123.  
  7124. case 50:
  7125. long l4 = inStream.readQWord();
  7126. int i18 = inStream.readUnsignedByte();
  7127. String s7 = TextClass.fixName(TextClass.nameForLong(l4));
  7128. for(int k24 = 0; k24 < friendsCount; k24++) {
  7129. if(l4 != friendsListAsLongs[k24])
  7130. continue;
  7131. if(friendsNodeIDs[k24] != i18) {
  7132. friendsNodeIDs[k24] = i18;
  7133. needDrawTabArea = true;
  7134. if(i18 >= 2) {
  7135. pushMessage(s7 + " has logged in.", 5, "");
  7136. }
  7137. if(i18 <= 1) {
  7138. pushMessage(s7 + " has logged out.", 5, "");
  7139. }
  7140. }
  7141. s7 = null;
  7142.  
  7143. }
  7144. if(s7 != null && friendsCount < 200) {
  7145. friendsListAsLongs[friendsCount] = l4;
  7146. friendsList[friendsCount] = s7;
  7147. friendsNodeIDs[friendsCount] = i18;
  7148. friendsCount++;
  7149. needDrawTabArea = true;
  7150. }
  7151. for(boolean flag6 = false; !flag6;) {
  7152. flag6 = true;
  7153. for(int index = 0; index < friendsCount - 1; index++)
  7154. if(friendsNodeIDs[index] != nodeID && friendsNodeIDs[index + 1] == nodeID || friendsNodeIDs[index] == 0 && friendsNodeIDs[index + 1] != 0) {
  7155. int j31 = friendsNodeIDs[index];
  7156. friendsNodeIDs[index] = friendsNodeIDs[index + 1];
  7157. friendsNodeIDs[index + 1] = j31;
  7158. String s10 = friendsList[index];
  7159. friendsList[index] = friendsList[index + 1];
  7160. friendsList[index + 1] = s10;
  7161. long l32 = friendsListAsLongs[index];
  7162. friendsListAsLongs[index] = friendsListAsLongs[index + 1];
  7163. friendsListAsLongs[index + 1] = l32;
  7164. needDrawTabArea = true;
  7165. flag6 = false;
  7166. }
  7167. }//friends list sorting
  7168. pktType = -1;
  7169. return true;
  7170.  
  7171. case 110:
  7172. if(tabID == 12)
  7173. needDrawTabArea = true;
  7174. energy = inStream.readUnsignedByte();
  7175. pktType = -1;
  7176. return true;
  7177.  
  7178. case 254:
  7179. anInt855 = inStream.readUnsignedByte();
  7180. if(anInt855 == 1)
  7181. anInt1222 = inStream.readUnsignedWord();
  7182. if(anInt855 >= 2 && anInt855 <= 6) {
  7183. if(anInt855 == 2) {
  7184. anInt937 = 64;
  7185. anInt938 = 64;
  7186. }
  7187. if(anInt855 == 3) {
  7188. anInt937 = 0;
  7189. anInt938 = 64;
  7190. }
  7191. if(anInt855 == 4) {
  7192. anInt937 = 128;
  7193. anInt938 = 64;
  7194. }
  7195. if(anInt855 == 5) {
  7196. anInt937 = 64;
  7197. anInt938 = 0;
  7198. }
  7199. if(anInt855 == 6) {
  7200. anInt937 = 64;
  7201. anInt938 = 128;
  7202. }
  7203. anInt855 = 2;
  7204. anInt934 = inStream.readUnsignedWord();
  7205. anInt935 = inStream.readUnsignedWord();
  7206. anInt936 = inStream.readUnsignedByte();
  7207. }
  7208. if(anInt855 == 10)
  7209. anInt933 = inStream.readUnsignedWord();
  7210. pktType = -1;
  7211. return true;
  7212.  
  7213. case 248:
  7214. int i5 = inStream.method435();
  7215. int k12 = inStream.readUnsignedWord();
  7216. if(backDialogID != -1) {
  7217. backDialogID = -1;
  7218. inputTaken = true;
  7219. }
  7220. if(inputDialogState != 0) {
  7221. inputDialogState = 0;
  7222. inputTaken = true;
  7223. }
  7224. openInterfaceID = i5;
  7225. invOverlayInterfaceID = k12;
  7226. needDrawTabArea = true;
  7227. tabAreaAltered = true;
  7228. aBoolean1149 = false;
  7229. pktType = -1;
  7230. return true;
  7231.  
  7232. case 79:
  7233. int j5 = inStream.method434();
  7234. int l12 = inStream.method435();
  7235. RSInterface class9_3 = RSInterface.interfaceCache[j5];
  7236. if(class9_3 != null && class9_3.interfaceType == 0) {
  7237. if(l12 < 0)
  7238. l12 = 0;
  7239. if(l12 > class9_3.scrollMax - class9_3.height)
  7240. l12 = class9_3.scrollMax - class9_3.height;
  7241. class9_3.scrollPosition = l12;
  7242. }
  7243. pktType = -1;
  7244. return true;
  7245.  
  7246. case 68:
  7247. for(int k5 = 0; k5 < variousSettings.length; k5++)
  7248. if(variousSettings[k5] != anIntArray1045[k5]) {
  7249. variousSettings[k5] = anIntArray1045[k5];
  7250. method33(k5);
  7251. needDrawTabArea = true;
  7252. }
  7253. pktType = -1;
  7254. return true;
  7255.  
  7256. case 196:
  7257. long l5 = inStream.readQWord();
  7258. int j18 = inStream.readDWord();
  7259. int l21 = inStream.readUnsignedByte();
  7260. boolean flag5 = false;
  7261. for(int i28 = 0; i28 < 100; i28++) {
  7262. if(anIntArray1240[i28] != j18)
  7263. continue;
  7264. flag5 = true;
  7265.  
  7266. }
  7267. if(l21 <= 1) {
  7268. for(int l29 = 0; l29 < ignoreCount; l29++) {
  7269. if(ignoreListAsLongs[l29] != l5)
  7270. continue;
  7271. flag5 = true;
  7272.  
  7273. }
  7274. }
  7275. if(!flag5 && anInt1251 == 0)
  7276. try {
  7277. anIntArray1240[anInt1169] = j18;
  7278. anInt1169 = (anInt1169 + 1) % 100;
  7279. String s9 = TextInput.method525(pktSize - 13, inStream);
  7280. //if(l21 != 3)
  7281. //s9 = Censor.doCensor(s9);
  7282. switch (l21) {
  7283. case 1:
  7284. pushMessage(s9, 7, "@cr1@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7285. break;
  7286. case 2:
  7287. pushMessage(s9, 7, "@cr2@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7288. break;
  7289. case 3:
  7290. pushMessage(s9, 7, "@cr3@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7291. break;
  7292. case 4:
  7293. pushMessage(s9, 7, "@cr4@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7294. break;
  7295. case 5:
  7296. pushMessage(s9, 7, "@cr5@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7297. break;
  7298. case 6:
  7299. pushMessage(s9, 7, "@cr6@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7300. break;
  7301. case 7:
  7302. pushMessage(s9, 7, "@cr7@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7303. break;
  7304. case 8:
  7305. pushMessage(s9, 7, "@cr8@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7306. break;
  7307. case 9:
  7308. pushMessage(s9, 7, "@cr9@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7309. break;
  7310. case 10:
  7311. pushMessage(s9, 7, "@cr10@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7312. break;
  7313. case 11:
  7314. pushMessage(s9, 7, "@cr11@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7315. break;
  7316. case 12:
  7317. pushMessage(s9, 7, "@cr12@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7318. break;
  7319. case 13:
  7320. pushMessage(s9, 7, "@cr13@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7321. break;
  7322. default:
  7323. pushMessage(s9, 3, TextClass.fixName(TextClass.nameForLong(l5)));
  7324. break;
  7325. }
  7326. /**if(l21 == 4) {
  7327. pushMessage(s9, 7, "@cr3@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7328. } else if(l21 == 3) {
  7329. pushMessage(s9, 7, "@cr2@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7330. } else if(l21 == 5) {
  7331. pushMessage(s9, 7, "@cr5@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7332. } else if(l21 == 6) {
  7333. pushMessage(s9, 7, "@cr6@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7334. } else if(l21 == 2) {
  7335. pushMessage(s9, 7, "@cr1@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7336. } else if(l21 == 1) {
  7337. pushMessage(s9, 7, "@cr4@" + TextClass.fixName(TextClass.nameForLong(l5)));
  7338. } else {
  7339. pushMessage(s9, 3, TextClass.fixName(TextClass.nameForLong(l5)));
  7340. }**/
  7341. } catch(Exception exception1) {
  7342. signlink.reporterror("cde1");
  7343. }
  7344. pktType = -1;
  7345. return true;
  7346.  
  7347. case 85:
  7348. anInt1269 = inStream.method427();
  7349. anInt1268 = inStream.method427();
  7350. pktType = -1;
  7351. return true;
  7352.  
  7353. case 24:
  7354. anInt1054 = inStream.method428();
  7355. if(anInt1054 == tabID) {
  7356. if(anInt1054 == 3)
  7357. tabID = 1;
  7358. else
  7359. tabID = 3;
  7360. needDrawTabArea = true;
  7361. }
  7362. pktType = -1;
  7363. return true;
  7364.  
  7365. case 246:
  7366. int i6 = inStream.method434();
  7367. int i13 = inStream.readUnsignedWord();
  7368. int k18 = inStream.readUnsignedWord();
  7369. if(k18 == 65535) {
  7370. RSInterface.interfaceCache[i6].disabledMediaType = 0;
  7371. pktType = -1;
  7372. return true;
  7373. } else {
  7374. ItemDef itemDef = ItemDef.forID(k18);
  7375. RSInterface.interfaceCache[i6].disabledMediaType = 4;
  7376. RSInterface.interfaceCache[i6].disabledMediaID = k18;
  7377. RSInterface.interfaceCache[i6].modelRotationY = itemDef.modelRotationY;
  7378. RSInterface.interfaceCache[i6].modelRotationX = itemDef.modelRotationX;
  7379. RSInterface.interfaceCache[i6].modelZoom = (itemDef.modelZoom * 100) / i13;
  7380. pktType = -1;
  7381. return true;
  7382. }
  7383.  
  7384. case 171:
  7385. boolean flag1 = inStream.readUnsignedByte() == 1;
  7386. int j13 = inStream.readUnsignedWord();
  7387. RSInterface.interfaceCache[j13].interfaceShown = flag1;
  7388. pktType = -1;
  7389. return true;
  7390.  
  7391. case 142:
  7392. int j6 = inStream.method434();
  7393. method60(j6);
  7394. if(backDialogID != -1) {
  7395. backDialogID = -1;
  7396. inputTaken = true;
  7397. }
  7398. if(inputDialogState != 0) {
  7399. inputDialogState = 0;
  7400. inputTaken = true;
  7401. }
  7402. invOverlayInterfaceID = j6;
  7403. needDrawTabArea = true;
  7404. tabAreaAltered = true;
  7405. openInterfaceID = -1;
  7406. aBoolean1149 = false;
  7407. pktType = -1;
  7408. return true;
  7409.  
  7410. case 126:
  7411. String text = inStream.readString();
  7412. int frame = inStream.method435();
  7413. if (text.startsWith("www.")) {
  7414. launchURL(text);
  7415. pktType = -1;
  7416. return true;
  7417. }
  7418. updateStrings(text, frame);
  7419. sendFrame126(text, frame);
  7420. if (frame >= 18144 && frame <= 18244) {
  7421. clanList[frame - 18144] = text;
  7422. }
  7423. pktType = -1;
  7424. return true;
  7425.  
  7426. case 206:
  7427. publicChatMode = inStream.readUnsignedByte();
  7428. privateChatMode = inStream.readUnsignedByte();
  7429. tradeMode = inStream.readUnsignedByte();
  7430. aBoolean1233 = true;
  7431. inputTaken = true;
  7432. pktType = -1;
  7433. return true;
  7434.  
  7435. case 240:
  7436. if(tabID == 12)
  7437. needDrawTabArea = true;
  7438. weight = inStream.readSignedWord();
  7439. pktType = -1;
  7440. return true;
  7441.  
  7442. case 8:
  7443. int k6 = inStream.method436();
  7444. int l13 = inStream.readUnsignedWord();
  7445. RSInterface.interfaceCache[k6].disabledMediaType = 1;
  7446. RSInterface.interfaceCache[k6].disabledMediaID = l13;
  7447. pktType = -1;
  7448. return true;
  7449.  
  7450. case 122:
  7451. int l6 = inStream.method436();
  7452. int i14 = inStream.method436();
  7453. int i19 = i14 >> 10 & 0x1f;
  7454. int i22 = i14 >> 5 & 0x1f;
  7455. int l24 = i14 & 0x1f;
  7456. RSInterface.interfaceCache[l6].disabledColor = (i19 << 19) + (i22 << 11) + (l24 << 3);
  7457. pktType = -1;
  7458. return true;
  7459.  
  7460. case 53:
  7461. needDrawTabArea = true;
  7462. int i7 = inStream.readUnsignedWord();
  7463. RSInterface class9_1 = RSInterface.interfaceCache[i7];
  7464. int j19 = inStream.readUnsignedWord();
  7465. for(int j22 = 0; j22 < j19; j22++) {
  7466. int i25 = inStream.readUnsignedByte();
  7467. if(i25 == 255)
  7468. i25 = inStream.method440();
  7469. class9_1.inventory[j22] = inStream.method436();
  7470. class9_1.inventoryValue[j22] = i25;
  7471. }
  7472. for(int j25 = j19; j25 < class9_1.inventory.length; j25++) {
  7473. class9_1.inventory[j25] = 0;
  7474. class9_1.inventoryValue[j25] = 0;
  7475. }
  7476. pktType = -1;
  7477. return true;
  7478.  
  7479. case 230:
  7480. int j7 = inStream.method435();
  7481. int j14 = inStream.readUnsignedWord();
  7482. int k19 = inStream.readUnsignedWord();
  7483. int k22 = inStream.method436();
  7484. RSInterface.interfaceCache[j14].modelRotationY = k19;
  7485. RSInterface.interfaceCache[j14].modelRotationX = k22;
  7486. RSInterface.interfaceCache[j14].modelZoom = j7;
  7487. pktType = -1;
  7488. return true;
  7489.  
  7490. case 221:
  7491. anInt900 = inStream.readUnsignedByte();
  7492. needDrawTabArea = true;
  7493. pktType = -1;
  7494. return true;
  7495.  
  7496. case 177:
  7497. aBoolean1160 = true;
  7498. anInt995 = inStream.readUnsignedByte();
  7499. anInt996 = inStream.readUnsignedByte();
  7500. anInt997 = inStream.readUnsignedWord();
  7501. anInt998 = inStream.readUnsignedByte();
  7502. anInt999 = inStream.readUnsignedByte();
  7503. if(anInt999 >= 100) {
  7504. int k7 = anInt995 * 128 + 64;
  7505. int k14 = anInt996 * 128 + 64;
  7506. int i20 = method42(plane, k14, k7) - anInt997;
  7507. int l22 = k7 - xCameraPos;
  7508. int k25 = i20 - zCameraPos;
  7509. int j28 = k14 - yCameraPos;
  7510. int i30 = (int)Math.sqrt(l22 * l22 + j28 * j28);
  7511. yCameraCurve = (int)(Math.atan2(k25, i30) * 325.94900000000001D) & 0x7ff;
  7512. xCameraCurve = (int)(Math.atan2(l22, j28) * -325.94900000000001D) & 0x7ff;
  7513. if(yCameraCurve < 128)
  7514. yCameraCurve = 128;
  7515. if(yCameraCurve > 383)
  7516. yCameraCurve = 383;
  7517. }
  7518. pktType = -1;
  7519. return true;
  7520.  
  7521. case 249:
  7522. anInt1046 = inStream.method426();
  7523. unknownInt10 = inStream.method436();
  7524. pktType = -1;
  7525. return true;
  7526.  
  7527. case 65:
  7528. updateNPCs(inStream, pktSize);
  7529. pktType = -1;
  7530. return true;
  7531.  
  7532. case 27:
  7533. messagePromptRaised = false;
  7534. inputDialogState = 1;
  7535. amountOrNameInput = "";
  7536. inputTaken = true;
  7537. pktType = -1;
  7538. return true;
  7539.  
  7540. case 187:
  7541. messagePromptRaised = false;
  7542. inputDialogState = 2;
  7543. amountOrNameInput = "";
  7544. inputTaken = true;
  7545. pktType = -1;
  7546. return true;
  7547. case 97:
  7548. int l7 = inStream.readUnsignedWord();
  7549. method60(l7);
  7550. if (invOverlayInterfaceID != -1) {
  7551. invOverlayInterfaceID = -1;
  7552. needDrawTabArea = true;
  7553. tabAreaAltered = true;
  7554. }
  7555. if (backDialogID != -1) {
  7556. backDialogID = -1;
  7557. inputTaken = true;
  7558. }
  7559. if (inputDialogState != 0) {
  7560. inputDialogState = 0;
  7561. inputTaken = true;
  7562. }
  7563. //17511 = Question Type
  7564. //15819 = Christmas Type
  7565. //15812 = Security Type
  7566. //15801 = Item Scam Type
  7567. //15791 = Password Safety ?
  7568. //15774 = Good/Bad Password
  7569. //15767 = Drama Type ????
  7570. if (l7 == 15244) {
  7571. openInterfaceID = 15774;
  7572. fullscreenInterfaceID = 15244;
  7573. } else {
  7574. openInterfaceID = l7;
  7575. }
  7576. aBoolean1149 = false;
  7577. pktType = -1;
  7578. return true;
  7579. case 218:
  7580. int i8 = inStream.method438();
  7581. dialogID = i8;
  7582. inputTaken = true;
  7583. pktType = -1;
  7584. return true;
  7585.  
  7586. case 87:
  7587. int j8 = inStream.method434();
  7588. int l14 = inStream.method439();
  7589. anIntArray1045[j8] = l14;
  7590. if(variousSettings[j8] != l14) {
  7591. variousSettings[j8] = l14;
  7592. method33(j8);
  7593. needDrawTabArea = true;
  7594. if(dialogID != -1)
  7595. inputTaken = true;
  7596. }
  7597. pktType = -1;
  7598. return true;
  7599.  
  7600. case 36:
  7601. int k8 = inStream.method434();
  7602. byte byte0 = inStream.readSignedByte();
  7603. anIntArray1045[k8] = byte0;
  7604. if(variousSettings[k8] != byte0) {
  7605. variousSettings[k8] = byte0;
  7606. method33(k8);
  7607. needDrawTabArea = true;
  7608. if(dialogID != -1)
  7609. inputTaken = true;
  7610. }
  7611. pktType = -1;
  7612. return true;
  7613.  
  7614. case 61:
  7615. anInt1055 = inStream.readUnsignedByte();
  7616. pktType = -1;
  7617. return true;
  7618.  
  7619. case 200:
  7620. int l8 = inStream.readUnsignedWord();
  7621. int i15 = inStream.readSignedWord();
  7622. RSInterface class9_4 = RSInterface.interfaceCache[l8];
  7623. class9_4.disabledAnimation = i15;
  7624. if(i15 == 591 || i15 == 588)
  7625. {
  7626. class9_4.modelZoom = 1600;
  7627. }
  7628. if(i15 == -1) {
  7629. class9_4.animationLength = 0;
  7630. class9_4.animationDelay = 0;
  7631. }
  7632. pktType = -1;
  7633. return true;
  7634.  
  7635. case 219:
  7636. if(invOverlayInterfaceID != -1) {
  7637. invOverlayInterfaceID = -1;
  7638. needDrawTabArea = true;
  7639. tabAreaAltered = true;
  7640. }
  7641. if(backDialogID != -1) {
  7642. backDialogID = -1;
  7643. inputTaken = true;
  7644. }
  7645. if(inputDialogState != 0) {
  7646. inputDialogState = 0;
  7647. inputTaken = true;
  7648. }
  7649. openInterfaceID = -1;
  7650. aBoolean1149 = false;
  7651. pktType = -1;
  7652. return true;
  7653.  
  7654. case 34:
  7655. needDrawTabArea = true;
  7656. int i9 = inStream.readUnsignedWord();
  7657. RSInterface class9_2 = RSInterface.interfaceCache[i9];
  7658. while(inStream.currentOffset < pktSize) {
  7659. int j20 = inStream.method422();
  7660. int i23 = inStream.readUnsignedWord();
  7661. int l25 = inStream.readUnsignedByte();
  7662. if(l25 == 255)
  7663. l25 = inStream.readDWord();
  7664. if(j20 >= 0 && j20 < class9_2.inventory.length) {
  7665. class9_2.inventory[j20] = i23;
  7666. class9_2.inventoryValue[j20] = l25;
  7667. }
  7668. }
  7669. pktType = -1;
  7670. return true;
  7671.  
  7672. case 4:
  7673. case 44:
  7674. case 84:
  7675. case 101:
  7676. case 105:
  7677. case 117:
  7678. case 147:
  7679. case 151:
  7680. case 156:
  7681. case 160:
  7682. case 215:
  7683. method137(inStream, pktType);
  7684. pktType = -1;
  7685. return true;
  7686.  
  7687. case 106:
  7688. tabID = inStream.method427();
  7689. needDrawTabArea = true;
  7690. tabAreaAltered = true;
  7691. pktType = -1;
  7692. return true;
  7693.  
  7694. case 164:
  7695. int j9 = inStream.method434();
  7696. method60(j9);
  7697. if(invOverlayInterfaceID != -1) {
  7698. invOverlayInterfaceID = -1;
  7699. needDrawTabArea = true;
  7700. tabAreaAltered = true;
  7701. }
  7702. backDialogID = j9;
  7703. inputTaken = true;
  7704. openInterfaceID = -1;
  7705. aBoolean1149 = false;
  7706. pktType = -1;
  7707. return true;
  7708.  
  7709. }
  7710. signlink.reporterror("T1 - " + pktType + "," + pktSize + " - " + anInt842 + "," + anInt843);
  7711. //resetLogout();
  7712. } catch(IOException _ex) {
  7713. dropClient();
  7714. } catch(Exception exception) {
  7715. String s2 = "T2 - " + pktType + "," + anInt842 + "," + anInt843 + " - " + pktSize + "," + (baseX + myPlayer.smallX[0]) + "," + (baseY + myPlayer.smallY[0]) + " - ";
  7716. for(int j15 = 0; j15 < pktSize && j15 < 50; j15++)
  7717. s2 = s2 + inStream.buffer[j15] + ",";
  7718. signlink.reporterror(s2);
  7719. //resetLogout();
  7720. }
  7721. pktType = -1;
  7722. return true;
  7723. }
  7724. public int getMoneyOrbColor(int cashAmount){
  7725. if(cashAmount >= 100000 && cashAmount <= 999999){
  7726. return 0xffffff;
  7727. } else {
  7728. return 65280;
  7729. }
  7730. }
  7731. private void method146() {
  7732.  
  7733.  
  7734. anInt1265++;
  7735. method47(true);
  7736. method26(true);
  7737. method47(false);
  7738. method26(false);
  7739. method55();
  7740. method104();
  7741. if(!aBoolean1160) {
  7742. int i = anInt1184;
  7743. if(anInt984 / 256 > i)
  7744. i = anInt984 / 256;
  7745. if(aBooleanArray876[4] && anIntArray1203[4] + 128 > i)
  7746. i = anIntArray1203[4] + 128;
  7747. int k = minimapInt1 + anInt896 & 0x7ff;
  7748. setCameraPos(CameraPos2 + i * CameraPos1, i, anInt1014, method42(plane, myPlayer.y, myPlayer.x) - 50, k, anInt1015);
  7749.  
  7750.  
  7751.  
  7752. }
  7753. int j;
  7754. if(!aBoolean1160)
  7755. j = method120();
  7756. else
  7757. j = method121();
  7758. int l = xCameraPos;
  7759. int i1 = zCameraPos;
  7760. int j1 = yCameraPos;
  7761. int k1 = yCameraCurve;
  7762. int l1 = xCameraCurve;
  7763. for(int i2 = 0; i2 < 5; i2++)
  7764. if(aBooleanArray876[i2]) {
  7765. int j2 = (int)((Math.random() * (double)(anIntArray873[i2] * 2 + 1) - (double)anIntArray873[i2]) + Math.sin((double)anIntArray1030[i2] * ((double)anIntArray928[i2] / 100D)) * (double)anIntArray1203[i2]);
  7766. if(i2 == 0)
  7767. xCameraPos += j2;
  7768. if(i2 == 1)
  7769. zCameraPos += j2;
  7770. if(i2 == 2)
  7771. yCameraPos += j2;
  7772. if(i2 == 3)
  7773. xCameraCurve = xCameraCurve + j2 & 0x7ff;
  7774. if(i2 == 4) {
  7775. yCameraCurve += j2;
  7776. if(yCameraCurve < 128)
  7777. yCameraCurve = 128;
  7778. if(yCameraCurve > 383)
  7779. yCameraCurve = 383;
  7780. }
  7781. }
  7782. int k2 = Texture.anInt1481;
  7783. Model.aBoolean1684 = true;
  7784. Model.anInt1687 = 0;
  7785. Model.anInt1685 = super.mouseX - 4;
  7786. Model.anInt1686 = super.mouseY - 4;
  7787. DrawingArea.setAllPixelsToZero();
  7788. worldController.method313(xCameraPos, yCameraPos, xCameraCurve, zCameraPos, j, yCameraCurve);
  7789. worldController.clearObj5Cache();
  7790. updateEntities();
  7791. drawHeadIcon();
  7792. method37(k2);
  7793. draw3dScreen();
  7794. drawCoinParts();
  7795. if(coinToggle){
  7796. int cash;
  7797. String Cash = RSInterface.interfaceCache[8135].disabledMessage;
  7798. cash = Integer.parseInt(Cash);
  7799. coinPart.drawSprite(400+11+32, 87);
  7800. smallText.method382(getMoneyOrbColor(cash), 485, RSInterface.interfaceCache[8134].disabledMessage+"", 102, true);
  7801. }
  7802. if(drawFlag) {
  7803. if(xpToDraw != 0) {
  7804. if(flagPos < 125) {
  7805. if(flagPos < 100) {
  7806. flagPos += 2;
  7807. } else {
  7808. flagPos += 1;
  7809. }
  7810. xpFlag.drawSprite(423, flagPos);
  7811. newSmallFont.drawBasicString(""+xpToDraw+"xp", 470, flagPos+20, 0xCC6600, 1);
  7812. } else { }
  7813. if(flagPos >= 125) {
  7814. drawFlag = false;
  7815. flagPos = 72;
  7816. xpToDraw = 0;
  7817. }
  7818. }
  7819. }
  7820. if(drawXpBar) {
  7821. String text = ""+testXp;
  7822. int txtWidth = newRegularFont.getTextWidth(text);
  7823. int drawX = 505-txtWidth;
  7824. sprite1.drawSprite(419, 51);
  7825. newRegularFont.drawBasicString("XP:", 421, 64, 0xFFFFFD, 0);
  7826. newRegularFont.drawBasicString(text, drawX, 64, 0xFFFFFD, 0);
  7827. }
  7828. inGameScreen.drawGraphics(4, super.graphics, 4);
  7829. xCameraPos = l;
  7830. zCameraPos = i1;
  7831. yCameraPos = j1;
  7832. yCameraCurve = k1;
  7833. xCameraCurve = l1;
  7834. }
  7835.  
  7836. /* Packets that opens interfaces */
  7837. public void sendFrame97(int interfaceID) {
  7838. method60(interfaceID);
  7839. if (invOverlayInterfaceID != -1) {
  7840. invOverlayInterfaceID = -1;
  7841. needDrawTabArea = true;
  7842. tabAreaAltered = true;
  7843. }
  7844. if (backDialogID != -1) {
  7845. backDialogID = -1;
  7846. inputTaken = true;
  7847. }
  7848. if (inputDialogState != 0) {
  7849. inputDialogState = 0;
  7850. inputTaken = true;
  7851. }
  7852. openInterfaceID = interfaceID;
  7853. aBoolean1149 = false;
  7854. }
  7855. public void clearTopInterfaces() {
  7856.  
  7857. stream.createFrame(130);
  7858. if (invOverlayInterfaceID != -1) {
  7859. invOverlayInterfaceID = -1;
  7860. needDrawTabArea = true;
  7861. aBoolean1149 = false;
  7862. tabAreaAltered = true;
  7863. }
  7864. if (backDialogID != -1) {
  7865. backDialogID = -1;
  7866. inputTaken = true;
  7867. aBoolean1149 = false;
  7868. }
  7869. openInterfaceID = -1;
  7870. fullscreenInterfaceID = -1;
  7871. }
  7872.  
  7873. public client() {
  7874. tabHPos = -1;
  7875. alertHandler = new AlertHandler(this);
  7876. fullscreenInterfaceID = -1;
  7877. chatRights = new int[500];
  7878. chatTypeView = 0;
  7879. clanChatMode = 0;
  7880. cButtonHPos = -1;
  7881. cButtonHCPos = -1;
  7882. cButtonCPos = 0;
  7883. server = "primalproject2.no-ip.org";
  7884. anIntArrayArray825 = new int[104][104];
  7885. friendsNodeIDs = new int[200];
  7886. groundArray = new NodeList[4][104][104];
  7887. aBoolean831 = false;
  7888. aStream_834 = new Stream(new byte[17000]);
  7889. npcArray = new NPC[16384];
  7890. npcIndices = new int[16384];
  7891. anIntArray840 = new int[1000];
  7892. aStream_847 = Stream.create();
  7893. aBoolean848 = true;
  7894. openInterfaceID = -1;
  7895. currentExp = new int[Skills.skillsCount];
  7896. aBoolean872 = false;
  7897. anIntArray873 = new int[5];
  7898. anInt874 = -1;
  7899. aBooleanArray876 = new boolean[5];
  7900. drawFlames = false;
  7901. reportAbuseInput = "";
  7902. unknownInt10 = -1;
  7903. menuOpen = false;
  7904. inputString = "";
  7905. maxPlayers = 2048;
  7906. myPlayerIndex = 2047;
  7907. playerArray = new Player[maxPlayers];
  7908. playerIndices = new int[maxPlayers];
  7909. anIntArray894 = new int[maxPlayers];
  7910. aStreamArray895s = new Stream[maxPlayers];
  7911. anInt897 = 1;
  7912. anIntArrayArray901 = new int[104][104];
  7913. anInt902 = 0x766654;
  7914. aByteArray912 = new byte[16384];
  7915. currentStats = new int[Skills.skillsCount];
  7916. ignoreListAsLongs = new long[100];
  7917. loadingError = false;
  7918. anInt927 = 0x332d25;
  7919. anIntArray928 = new int[5];
  7920. anIntArrayArray929 = new int[104][104];
  7921. chatTypes = new int[500];
  7922. chatNames = new String[500];
  7923. chatMessages = new String[500];
  7924. chatButtons = new Sprite[4];
  7925. sideIcons = new Sprite[14];
  7926. sIcons483 = new Sprite[14];
  7927. newSideIcons = new Sprite[16];
  7928. sIcons459 = new Sprite[13];
  7929.  
  7930. redStones = new Sprite[16];
  7931. aBoolean954 = true;
  7932. friendsListAsLongs = new long[200];
  7933. currentSong = -1;
  7934. drawingFlames = false;
  7935. spriteDrawX = -1;
  7936. spriteDrawY = -1;
  7937. anIntArray968 = new int[33];
  7938. anIntArray969 = new int[256];
  7939. decompressors = new Decompressor[5];
  7940. variousSettings = new int[2000];
  7941. aBoolean972 = false;
  7942. anInt975 = 50;
  7943. anIntArray976 = new int[anInt975];
  7944. anIntArray977 = new int[anInt975];
  7945. anIntArray978 = new int[anInt975];
  7946. anIntArray979 = new int[anInt975];
  7947. anIntArray980 = new int[anInt975];
  7948. anIntArray981 = new int[anInt975];
  7949. anIntArray982 = new int[anInt975];
  7950. aStringArray983 = new String[anInt975];
  7951. anInt985 = -1;
  7952. hitMarks = new Sprite[24];
  7953. hitMark = new Sprite[4];
  7954. anIntArray990 = new int[5];
  7955. aBoolean994 = false;
  7956. anInt1002 = 0x23201b;
  7957. amountOrNameInput = "";
  7958. aClass19_1013 = new NodeList();
  7959. aBoolean1017 = false;
  7960. anInt1018 = -1;
  7961. anIntArray1030 = new int[5];
  7962. aBoolean1031 = false;
  7963. mapFunctions = new Sprite[100];
  7964. dialogID = -1;
  7965. applyTrans = 0;
  7966. maxStats = new int[Skills.skillsCount];
  7967. anIntArray1045 = new int[2000];
  7968. aBoolean1047 = true;
  7969. anIntArray1052 = new int[152];//map
  7970. anInt1054 = -1;
  7971. aClass19_1056 = new NodeList();
  7972. anIntArray1057 = new int[33];
  7973. aClass9_1059 = new RSInterface();
  7974. mapScenes = new Background[100];
  7975. barFillColor = 0x4d4233;
  7976. anIntArray1065 = new int[7];
  7977. anIntArray1072 = new int[1000];
  7978. anIntArray1073 = new int[1000];
  7979. aBoolean1080 = false;
  7980. friendsList = new String[200];
  7981. inStream = Stream.create();
  7982. expectedCRCs = new int[9];
  7983. menuActionCmd2 = new int[500];
  7984. menuActionCmd3 = new int[500];
  7985. menuActionID = new int[500];
  7986. menuActionCmd1 = new int[500];
  7987. headIcons = new Sprite[29];
  7988. skullIcons = new Sprite[20];
  7989. headIconsHint = new Sprite[20];
  7990. tabAreaAltered = false;
  7991. aString1121 = "";
  7992. atPlayerActions = new String[5];
  7993. atPlayerArray = new boolean[5];
  7994. anIntArrayArrayArray1129 = new int[4][13][13];
  7995. anInt1132 = 2;
  7996. aSpriteArray1140 = new Sprite[1000];
  7997. aBoolean1141 = false;
  7998. aBoolean1149 = false;
  7999. crosses = new Sprite[8];
  8000. musicEnabled = true;
  8001. needDrawTabArea = false;
  8002. loggedIn = false;
  8003. canMute = false;
  8004. aBoolean1159 = false;
  8005. aBoolean1160 = false;
  8006. anInt1171 = 1;
  8007. myUsername = "";
  8008. myPassword = "";
  8009. genericLoadingError = false;
  8010. reportAbuseInterfaceID = -1;
  8011. aClass19_1179 = new NodeList();
  8012. anInt1184 = 128;
  8013. invOverlayInterfaceID = -1;
  8014. stream = Stream.create();
  8015. menuActionName = new String[500];
  8016. anIntArray1203 = new int[5];
  8017. anIntArray1207 = new int[50];
  8018. anInt1210 = 2;
  8019. anInt1211 = 78;
  8020. promptInput = "";
  8021. //modIcons = new Background[2];
  8022. modIcons = new Sprite[13];
  8023. chatImages = new Sprite[13];
  8024. tabID = 3;
  8025. inputTaken = false;
  8026. songChanging = true;
  8027. anIntArray1229 = new int[152];//map
  8028. aClass11Array1230 = new Class11[4];
  8029. aBoolean1233 = false;
  8030. anIntArray1240 = new int[100];
  8031. anIntArray1241 = new int[50];
  8032. aBoolean1242 = false;
  8033. anIntArray1250 = new int[50];
  8034. rsAlreadyLoaded = false;
  8035. welcomeScreenRaised = true;
  8036. messagePromptRaised = false;
  8037. loginMessage1 = "";
  8038. loginMessage2 = "";
  8039. backDialogID = -1;
  8040. anInt1279 = 2;
  8041. bigX = new int[4000];
  8042. bigY = new int[4000];
  8043. anInt1289 = -1;
  8044. }
  8045.  
  8046. public int rights;
  8047.  
  8048. public Sprite Increase;
  8049. public Sprite Decrease;
  8050. public String name;
  8051. public String disabledMessage;
  8052. public String clanname;
  8053. private final int[] chatRights;
  8054. public int chatTypeView;
  8055. public int clanChatMode;
  8056. public int duelMode;
  8057. /* Declare custom sprites */
  8058. //private Sprite chatArea;
  8059. private Sprite loadingPleaseWait;
  8060. private Sprite reestablish;
  8061. private Sprite loadingBarFull;
  8062. private Sprite loadingBarEmpty;
  8063. private Sprite[] chatButtons;
  8064. //private Sprite tabArea;
  8065. private Sprite mapArea;
  8066. private Sprite tabHover;
  8067. private Sprite tabClicked;
  8068. private Sprite[] newSideIcons;
  8069. //private Sprite CustomMapback;
  8070. public Sprite[] CustomMapback = new Sprite[5];
  8071. public Sprite[] chatArea = new Sprite[5];
  8072. public Sprite[] tabArea = new Sprite[5];
  8073. //public Sprite[] mapArea = new Sprite[3];
  8074. /**/
  8075. private RSImageProducer leftFrame;
  8076. private RSImageProducer topFrame;
  8077. private RSImageProducer rightFrame;
  8078. private int ignoreCount;
  8079. private long aLong824;
  8080. private int[][] anIntArrayArray825;
  8081. private int[] friendsNodeIDs;
  8082. private NodeList[][][] groundArray;
  8083. private int[] anIntArray828;
  8084. private int[] anIntArray829;
  8085. private volatile boolean aBoolean831;
  8086. private Socket aSocket832;
  8087. private int loginScreenState;
  8088. private Stream aStream_834;
  8089. private NPC[] npcArray;
  8090. private int npcCount;
  8091. private int[] npcIndices;
  8092. private int anInt839;
  8093. private int[] anIntArray840;
  8094. private int anInt841;
  8095. private int anInt842;
  8096. private int anInt843;
  8097. private String aString844;
  8098. private int privateChatMode;
  8099. private Stream aStream_847;
  8100. private boolean aBoolean848;
  8101. private static int anInt849;
  8102. private int[] anIntArray850;
  8103. private int[] anIntArray851;
  8104. private int[] anIntArray852;
  8105. private int[] anIntArray853;
  8106. private static int anInt854;
  8107. private int anInt855;
  8108. private int openInterfaceID;
  8109. private int xCameraPos;
  8110. private int zCameraPos;
  8111. private int yCameraPos;
  8112. private int yCameraCurve;
  8113. private int xCameraCurve;
  8114. public int myPrivilege;
  8115. private final int[] currentExp;
  8116. private Sprite[] redStones;
  8117. private Sprite mapFlag;
  8118. private Sprite mapMarker;
  8119. private boolean aBoolean872;
  8120. private final int[] anIntArray873;
  8121. private int anInt874;
  8122. private final boolean[] aBooleanArray876;
  8123. private int weight;
  8124. private MouseDetection mouseDetection;
  8125. private volatile boolean drawFlames;
  8126. private String reportAbuseInput;
  8127. private int unknownInt10;
  8128. private boolean menuOpen;
  8129. private int anInt886;
  8130. private String inputString;
  8131. private final int maxPlayers;
  8132. private final int myPlayerIndex;
  8133. private Player[] playerArray;
  8134. private int playerCount;
  8135. private int[] playerIndices;
  8136. private int anInt893;
  8137. private int[] anIntArray894;
  8138. private Stream[] aStreamArray895s;
  8139. private int anInt896;
  8140. private int anInt897;
  8141. private int friendsCount;
  8142. private int anInt900;
  8143. private int[][] anIntArrayArray901;
  8144. private final int anInt902;
  8145. private byte[] aByteArray912;
  8146. private int anInt913;
  8147. private int crossX;
  8148. private int crossY;
  8149. private int crossIndex;
  8150. private int crossType;
  8151. private int plane;
  8152. private final int[] currentStats;
  8153. private static int anInt924;
  8154. private final long[] ignoreListAsLongs;
  8155. private boolean loadingError;
  8156. private final int anInt927;
  8157. private final int[] anIntArray928;
  8158. private int[][] anIntArrayArray929;
  8159. private Sprite aSprite_931;
  8160. private Sprite aSprite_932;
  8161. private int anInt933;
  8162. private int anInt934;
  8163. private int anInt935;
  8164. private int anInt936;
  8165. private int anInt937;
  8166. private int anInt938;
  8167. private static int anInt940;
  8168. private final int[] chatTypes;
  8169. private final String[] chatNames;
  8170. private final String[] chatMessages;
  8171. private int anInt945;
  8172. private WorldController worldController;
  8173. private Sprite[] sideIcons;
  8174. private Sprite[] sIcons483;
  8175. private Sprite[] sIcons459;
  8176. private int menuScreenArea;
  8177. private int menuOffsetX;
  8178. private int menuOffsetY;
  8179. private int menuWidth;
  8180. private int menuHeight;
  8181. private long aLong953;
  8182. private boolean aBoolean954;
  8183. private long[] friendsListAsLongs;
  8184. private String[] clanList = new String[100];
  8185. private int currentSong;
  8186. private static int nodeID = 10;
  8187. static int portOff;
  8188. static boolean clientData;
  8189. private static boolean isMembers = true;
  8190. private static boolean lowMem;
  8191. private volatile boolean drawingFlames;
  8192. private int spriteDrawX;
  8193. private int spriteDrawY;
  8194. private final int[] anIntArray965 = {
  8195. 0xffff00, 0xff0000, 65280, 65535, 0xff00ff, 0xffffff
  8196. };
  8197. private Sprite titleBox;
  8198. public Sprite titleBox1;
  8199. private Sprite titleButton;
  8200. private final int[] anIntArray968;
  8201. private final int[] anIntArray969;
  8202. final Decompressor[] decompressors;
  8203. public int variousSettings[];
  8204. private boolean aBoolean972;
  8205. private final int anInt975;
  8206. private final int[] anIntArray976;
  8207. private final int[] anIntArray977;
  8208. private final int[] anIntArray978;
  8209. private final int[] anIntArray979;
  8210. private final int[] anIntArray980;
  8211. private final int[] anIntArray981;
  8212. private final int[] anIntArray982;
  8213. private final String[] aStringArray983;
  8214. private int anInt984;
  8215. private int anInt985;
  8216. private static int anInt986;
  8217. private Sprite[] hitMarks;
  8218. private Sprite[] hitMark;
  8219. private int anInt988;
  8220. private int anInt989;
  8221. private final int[] anIntArray990;
  8222. private static boolean aBoolean993;
  8223. private final boolean aBoolean994;
  8224. private int anInt995;
  8225. private int anInt996;
  8226. private int anInt997;
  8227. private int anInt998;
  8228. private int anInt999;
  8229. private ISAACRandomGen encryption;
  8230. private Sprite mapEdge;
  8231. private Sprite multiOverlay;
  8232. private final int anInt1002;
  8233. static final int[][] anIntArrayArray1003 = {
  8234. {
  8235. 6798, 107, 10283, 16, 4797, 7744, 5799, 4634, 33697, 22433,
  8236. 2983, 54193
  8237. }, {
  8238. 8741, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094, 10153,
  8239. 56621, 4783, 1341, 16578, 35003, 25239
  8240. }, {
  8241. 25238, 8742, 12, 64030, 43162, 7735, 8404, 1701, 38430, 24094,
  8242. 10153, 56621, 4783, 1341, 16578, 35003
  8243. }, {
  8244. 4626, 11146, 6439, 12, 4758, 10270
  8245. }, {
  8246. 4550, 4537, 5681, 5673, 5790, 6806, 8076, 4574
  8247. }
  8248. };
  8249. private String amountOrNameInput;
  8250. private static int anInt1005;
  8251. private int daysSinceLastLogin;
  8252. private int pktSize;
  8253. private int pktType;
  8254. private int anInt1009;
  8255. private int anInt1010;
  8256. private int anInt1011;
  8257. private NodeList aClass19_1013;
  8258. private int anInt1014;
  8259. private int anInt1015;
  8260. private int anInt1016;
  8261. private boolean aBoolean1017;
  8262. private int anInt1018;
  8263. private static final int[] anIntArray1019;
  8264. private int anInt1021;
  8265. private int anInt1022;
  8266. private int loadingStage;
  8267. private Sprite scrollBar1;
  8268. private Sprite scrollBar2;
  8269. private Sprite scrollBar3;
  8270. private Sprite scrollBar4;
  8271. private int anInt1026;
  8272. private Background backBase1;
  8273. private Background backBase2;
  8274. private Background backHmid1;
  8275. private final int[] anIntArray1030;
  8276. private boolean aBoolean1031;
  8277. private Sprite[] mapFunctions;
  8278. private int baseX;
  8279. private int baseY;
  8280. private int anInt1036;
  8281. private int anInt1037;
  8282. private int loginFailures;
  8283. private int anInt1039;
  8284. private int anInt1040;
  8285. private int anInt1041;
  8286. private int dialogID;
  8287. private final int[] maxStats;
  8288. private final int[] anIntArray1045;
  8289. private int anInt1046;
  8290. private boolean aBoolean1047;
  8291. private int anInt1048;
  8292. private String aString1049;
  8293. private static int anInt1051;
  8294. private final int[] anIntArray1052;
  8295. private NamedArchive titleStreamLoader;
  8296. private int anInt1054;
  8297. private int anInt1055;
  8298. private NodeList aClass19_1056;
  8299. private final int[] anIntArray1057;
  8300. public final RSInterface aClass9_1059;
  8301. private Background[] mapScenes;
  8302. private static int anInt1061;
  8303. private int anInt1062;
  8304. private final int barFillColor;
  8305. private int friendsListAction;
  8306. private final int[] anIntArray1065;
  8307. private int mouseInvInterfaceIndex;
  8308. private int lastActiveInvInterface;
  8309. public OnDemandFetcher onDemandFetcher;
  8310. private int anInt1069;
  8311. private int anInt1070;
  8312. private int anInt1071;
  8313. private int[] anIntArray1072;
  8314. private int[] anIntArray1073;
  8315. private Sprite mapDotItem;
  8316. private Sprite mapDotNPC;
  8317. private Sprite mapDotPlayer;
  8318. private Sprite mapDotFriend;
  8319. private Sprite mapDotTeam;
  8320. private Sprite mapDotClan;
  8321. private int anInt1079;
  8322. private boolean aBoolean1080;
  8323. private String[] friendsList;
  8324. private Stream inStream;
  8325. private int anInt1084;
  8326. private int anInt1085;
  8327. private int activeInterfaceType;
  8328. private int anInt1087;
  8329. private int anInt1088;
  8330. public static int anInt1089;
  8331. private final int[] expectedCRCs;
  8332. public int[] menuActionCmd2;
  8333. public int[] menuActionCmd3;
  8334. public int[] menuActionID;
  8335. public int[] menuActionCmd1;
  8336. private Sprite[] headIcons;
  8337. private Sprite[] skullIcons;
  8338. private Sprite[] headIconsHint;
  8339. private static int anInt1097;
  8340. private int anInt1098;
  8341. private int anInt1099;
  8342. private int anInt1100;
  8343. private int anInt1101;
  8344. private int anInt1102;
  8345. private static boolean tabAreaAltered;
  8346. private int anInt1104;
  8347. private RSImageProducer aRSImageProducer_1107;
  8348. private RSImageProducer aRSImageProducer_1108;
  8349. private RSImageProducer loginScreenArea;
  8350. private RSImageProducer leftSideFlame;
  8351. private RSImageProducer rightSideFlame;
  8352. private RSImageProducer gameLogo;
  8353. private RSImageProducer aRSImageProducer_1113;
  8354. private RSImageProducer aRSImageProducer_1114;
  8355. private RSImageProducer aRSImageProducer_1115;
  8356. private static int anInt1117;
  8357. private int membersInt;
  8358. private String aString1121;
  8359. private Sprite compass;
  8360. private RSImageProducer aRSImageProducer_1123;
  8361. private RSImageProducer aRSImageProducer_1124;
  8362. private RSImageProducer aRSImageProducer_1125;
  8363. public static Player myPlayer;
  8364. private final String[] atPlayerActions;
  8365. private final boolean[] atPlayerArray;
  8366. private final int[][][] anIntArrayArrayArray1129;
  8367. private final int[] tabInterfaceIDs = {
  8368. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  8369. -1, -1, -1, -1, -1, -1, -1
  8370. };
  8371. private int anInt1131;
  8372. private int anInt1132;
  8373. public int menuActionRow;
  8374. private static int anInt1134;
  8375. private int spellSelected;
  8376. private int anInt1137;
  8377. private int spellUsableOn;
  8378. private String spellTooltip;
  8379. private Sprite[] aSpriteArray1140;
  8380. private boolean aBoolean1141;
  8381. private static int anInt1142;
  8382. public int energy;
  8383. private boolean aBoolean1149;
  8384. private Sprite[] crosses;
  8385. private boolean musicEnabled;
  8386. private Background[] aBackgroundArray1152s;
  8387. private static boolean needDrawTabArea;
  8388. private int unreadMessages;
  8389. private static int anInt1155;
  8390. private static boolean fpsOn;
  8391. public boolean loggedIn;
  8392. private boolean canMute;
  8393. private boolean aBoolean1159;
  8394. private boolean aBoolean1160;
  8395. static int loopCycle;
  8396. private static final String validUserPassChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"\243$%^&*()-_=+[{]};:'@#~,<.>/?\\| ";
  8397. private RSImageProducer inventoryBackImage;
  8398. private RSImageProducer mapEdgeIP;
  8399. private RSImageProducer mapBackImage;
  8400. private RSImageProducer inGameScreen;
  8401. private RSImageProducer chatBackImage;
  8402. private int daysSinceRecovChange;
  8403. private RSSocket socketStream;
  8404. private int anInt1169;
  8405. public int applyTrans;
  8406. private int minimapInt3;
  8407. private int anInt1171;
  8408. private long aLong1172;
  8409. private String myUsername;
  8410. private String myPassword;
  8411. private static int anInt1175;
  8412. private boolean genericLoadingError;
  8413. private final int[] anIntArray1177 = {
  8414. 0, 0, 0, 0, 1, 1, 1, 1, 1, 2,
  8415. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  8416. 2, 2, 3
  8417. };
  8418. private int reportAbuseInterfaceID;
  8419. private NodeList aClass19_1179;
  8420. private int[] anIntArray1180;
  8421. private int[] anIntArray1181;
  8422. private int[] anIntArray1182;
  8423. private byte[][] aByteArrayArray1183;
  8424. private int anInt1184;
  8425. private int minimapInt1;
  8426. private int anInt1186;
  8427. private int anInt1187;
  8428. private static int anInt1188;
  8429. private int invOverlayInterfaceID;
  8430. private int[] anIntArray1190;
  8431. private int[] anIntArray1191;
  8432. public Stream stream;
  8433. private int anInt1193;
  8434. private int splitPrivateChat;
  8435. private Background mapBack;
  8436. public String[] menuActionName;
  8437. private Sprite aSprite_1201;
  8438. private Sprite aSprite_1202;
  8439. private final int[] anIntArray1203;
  8440. static final int[] anIntArray1204 = {
  8441. 9104, 10275, 7595, 3610, 7975, 8526, 918, 38802, 24466, 10145,
  8442. 58654, 5027, 1457, 16565, 34991, 25486
  8443. };
  8444. private static boolean flagged;
  8445. private final int[] anIntArray1207;
  8446. private int anInt1208;
  8447. private int minimapInt2;
  8448. private int anInt1210;
  8449. private int anInt1211;
  8450. private String promptInput;
  8451. private int anInt1213;
  8452. private int[][][] intGroundArray;
  8453. private long aLong1215;
  8454. private int loginScreenCursorPos;
  8455. //private final Background[] modIcons;
  8456. public final Sprite[] modIcons;
  8457. private long aLong1220;
  8458. private static int tabID;
  8459. private int anInt1222;
  8460. public static boolean inputTaken;
  8461. public int inputDialogState;
  8462. private static int anInt1226;
  8463. private int nextSong;
  8464. private boolean songChanging;
  8465. private final int[] anIntArray1229;
  8466. private Class11[] aClass11Array1230;
  8467. public static int anIntArray1232[];
  8468. private boolean aBoolean1233;
  8469. private int[] anIntArray1234;
  8470. private int[] anIntArray1235;
  8471. private int[] anIntArray1236;
  8472. private int anInt1237;
  8473. private int anInt1238;
  8474. public final int anInt1239 = 100;
  8475. private final int[] anIntArray1240;
  8476. private final int[] anIntArray1241;
  8477. private boolean aBoolean1242;
  8478. private int atInventoryLoopCycle;
  8479. private int atInventoryInterface;
  8480. private int atInventoryIndex;
  8481. private int atInventoryInterfaceType;
  8482. private byte[][] aByteArrayArray1247;
  8483. private int tradeMode;
  8484. private int anInt1249;
  8485. private final int[] anIntArray1250;
  8486. private int anInt1251;
  8487. private final boolean rsAlreadyLoaded;
  8488. private int anInt1253;
  8489. private int anInt1254;
  8490. private boolean welcomeScreenRaised;
  8491. private boolean messagePromptRaised;
  8492. private int anInt1257;
  8493. private byte[][][] byteGroundArray;
  8494. private int prevSong;
  8495. private int destX;
  8496. private int destY;
  8497. private Sprite aSprite_1263;
  8498. private int anInt1264;
  8499. private int anInt1265;
  8500. private String loginMessage1;
  8501. private String loginMessage2;
  8502. private int anInt1268;
  8503. private int anInt1269;
  8504. public RSFont smallText;
  8505. public RSFont aTextDrawingArea_1271;
  8506. private RSFont chatTextDrawingArea;
  8507. private int anInt1275;
  8508. private int backDialogID;
  8509. private int anInt1278;
  8510. private int anInt1279;
  8511. private int[] bigX;
  8512. private int[] bigY;
  8513. private int itemSelected;
  8514. private int anInt1283;
  8515. private int anInt1284;
  8516. private int anInt1285;
  8517. private String selectedItemName;
  8518. private int publicChatMode;
  8519. private static int anInt1288;
  8520. private int anInt1289;
  8521. public static int anInt1290;
  8522. public static String server = "primalproject2.no-ip.org";
  8523.  
  8524. public int drawCount;
  8525. public int fullscreenInterfaceID;
  8526. public int anInt1044;//377
  8527. public int anInt1129;//377
  8528. public int anInt1315;//377
  8529. public int anInt1500;//377
  8530. public int anInt1501;//377
  8531. public int[] fullScreenTextureArray;
  8532. public void resetAllImageProducers() {
  8533. if (super.fullGameScreen != null) {
  8534. return;
  8535. }
  8536. chatBackImage = null;
  8537. mapBackImage = null;
  8538. inventoryBackImage = null;
  8539. inGameScreen = null;
  8540. aRSImageProducer_1124 = null;
  8541. aRSImageProducer_1125 = null;
  8542. aRSImageProducer_1107 = null;
  8543. aRSImageProducer_1108 = null;
  8544. loginScreenArea = null;
  8545. leftSideFlame = null;
  8546. rightSideFlame = null;
  8547. gameLogo = null;
  8548. aRSImageProducer_1113 = null;
  8549. aRSImageProducer_1114 = null;
  8550. aRSImageProducer_1115 = null;
  8551. super.fullGameScreen = new RSImageProducer(765, 503, getGameComponent());
  8552. welcomeScreenRaised = true;
  8553. }
  8554. public boolean spriteChanged = false;
  8555. public int getSpriteID(){
  8556. spriteChanged = true;
  8557. if(is562)
  8558. return 4;
  8559. if(is459)
  8560. return 3;
  8561. if(is480)
  8562. return 2;
  8563. if(is508 || is525)
  8564. return 1;
  8565. if(is474)
  8566. return 0;
  8567. else
  8568. return 0;
  8569. }
  8570. public void launchURL(String url) {
  8571. String osName = System.getProperty("os.name");
  8572. try {
  8573. if (osName.startsWith("Mac OS")) {
  8574. Class fileMgr = Class.forName("com.apple.eio.FileManager");
  8575. Method openURL = fileMgr.getDeclaredMethod("openURL", new Class[] {String.class});
  8576. openURL.invoke(null, new Object[] {url});
  8577. } else if (osName.startsWith("Windows"))
  8578. Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
  8579. else { //assume Unix or Linux
  8580. String[] browsers = { "firefox", "opera", "konqueror", "epiphany", "mozilla", "netscape", "safari" };
  8581. String browser = null;
  8582. for (int count = 0; count < browsers.length && browser == null; count++)
  8583. if (Runtime.getRuntime().exec(new String[] {"which", browsers[count]}).waitFor() == 0)
  8584. browser = browsers[count];
  8585. if (browser == null) {
  8586. throw new Exception("Could not find web browser");
  8587. } else
  8588. Runtime.getRuntime().exec(new String[] {browser, url});
  8589. }
  8590. } catch (Exception e) {
  8591. pushMessage("Failed to open URL.", 0, "");
  8592. }
  8593. }
  8594.  
  8595. static {
  8596. anIntArray1019 = new int[99];
  8597. int i = 0;
  8598. for(int j = 0; j < 99; j++) {
  8599. int l = j + 1;
  8600. int i1 = (int)((double)l + 300D * Math.pow(2D, (double)l / 7D));
  8601. i += i1;
  8602. anIntArray1019[j] = i / 4;
  8603. }
  8604. anIntArray1232 = new int[32];
  8605. i = 2;
  8606. for(int k = 0; k < 32; k++) {
  8607. anIntArray1232[k] = i - 1;
  8608. i += i;
  8609. }
  8610. }
  8611. }
Advertisement
Add Comment
Please, Sign In to add comment