Guest User

Untitled

a guest
Jan 12th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 100.25 KB | None | 0 0
  1. // Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
  2. // Jad home page: http://www.kpdus.com/jad.html
  3. // Decompiler options: packimports(3)
  4.  
  5. public final class RSInterface {
  6.  
  7. public void swapInventoryItems(int i, int j) {
  8. int k = inv[i];
  9. inv[i] = inv[j];
  10. inv[j] = k;
  11. k = invStackSizes[i];
  12. invStackSizes[i] = invStackSizes[j];
  13. invStackSizes[j] = k;
  14. }
  15.  
  16. public static void bank(TextDrawingArea[] TDA) {
  17. RSInterface Tab = addInterface(23000);
  18. addText(23003, "", TDA, 0, 0xFFB000, false);
  19. addHoverButton(23004, "Bank/BANK", 1, 16, 16, "Close", 0, 23005, 3);
  20. addHoveredButton(23005, "Bank/BANK", 2, 16, 16, 23006);
  21. addHoverButton(23007, "Bank/BANK", 17, 35, 25, "Deposit carried items", 0, 23008, 4);
  22. addHoveredButton(23008, "Bank/BANK", 18, 35, 25, 23009);
  23. Tab.children = new int[7];
  24. Tab.childX = new int[7];
  25. Tab.childY = new int[7];
  26. Tab.children[0] = 5292;
  27. Tab.childX[0] = 0;
  28. Tab.childY[0] = 0;
  29. Tab.children[1] = 23003;
  30. Tab.childX[1] = 410;
  31. Tab.childY[1] = 30;
  32. Tab.children[2] = 23004;
  33. Tab.childX[2] = 472;
  34. Tab.childY[2] = 29;
  35. Tab.children[3] = 23005;
  36. Tab.childX[3] = 472;
  37. Tab.childY[3] = 29;
  38. Tab.children[4] = 23007;
  39. Tab.childX[4] = 450;
  40. Tab.childY[4] = 288;
  41. Tab.children[5] = 23008;
  42. Tab.childX[5] = 450;
  43. Tab.childY[5] = 288;
  44. Tab.children[6] = 23008;
  45. Tab.childX[6] = 3000;
  46. Tab.childY[6] = 5000;
  47. RSInterface rsi = interfaceCache[5292];
  48. addText(5384, "", TDA, 0, 0xFFB000, false);//cheap hax
  49. rsi.childX[90] = 410;
  50. rsi.childY[90] = 288;
  51. }
  52.  
  53. public static void unpack(StreamLoader streamLoader, TextDrawingArea textDrawingAreas[], StreamLoader streamLoader_1) {
  54. aMRUNodes_238 = new MRUNodes(50000);
  55. Stream stream = new Stream(streamLoader.getDataForName("data"));
  56. int i = -1;
  57. int j = stream.readUnsignedWord();
  58. interfaceCache = new RSInterface[31000];
  59. while(stream.currentOffset < stream.buffer.length) {
  60. int k = stream.readUnsignedWord();
  61. if(k == 65535) {
  62. i = stream.readUnsignedWord();
  63. k = stream.readUnsignedWord();
  64. }
  65. RSInterface rsInterface = interfaceCache[k] = new RSInterface();
  66. rsInterface.id = k;
  67. rsInterface.parentID = i;
  68. rsInterface.type = stream.readUnsignedByte();
  69. rsInterface.atActionType = stream.readUnsignedByte();
  70. rsInterface.contentType = stream.readUnsignedWord();
  71. rsInterface.width = stream.readUnsignedWord();
  72. rsInterface.height = stream.readUnsignedWord();
  73. rsInterface.aByte254 = (byte) stream.readUnsignedByte();
  74. rsInterface.mOverInterToTrigger = stream.readUnsignedByte();
  75. if(rsInterface.mOverInterToTrigger != 0)
  76. rsInterface.mOverInterToTrigger = (rsInterface.mOverInterToTrigger - 1 << 8) + stream.readUnsignedByte();
  77. else
  78. rsInterface.mOverInterToTrigger = -1;
  79. int i1 = stream.readUnsignedByte();
  80. if(i1 > 0) {
  81. rsInterface.anIntArray245 = new int[i1];
  82. rsInterface.anIntArray212 = new int[i1];
  83. for(int j1 = 0; j1 < i1; j1++) {
  84. rsInterface.anIntArray245[j1] = stream.readUnsignedByte();
  85. rsInterface.anIntArray212[j1] = stream.readUnsignedWord();
  86. }
  87.  
  88. }
  89. int k1 = stream.readUnsignedByte();
  90. if(k1 > 0) {
  91. rsInterface.valueIndexArray = new int[k1][];
  92. for(int l1 = 0; l1 < k1; l1++) {
  93. int i3 = stream.readUnsignedWord();
  94. rsInterface.valueIndexArray[l1] = new int[i3];
  95. for(int l4 = 0; l4 < i3; l4++)
  96. rsInterface.valueIndexArray[l1][l4] = stream.readUnsignedWord();
  97.  
  98. }
  99.  
  100. }
  101. if(rsInterface.type == 0) {
  102. rsInterface.drawsTransparent = false;
  103. rsInterface.scrollMax = stream.readUnsignedWord();
  104. rsInterface.isMouseoverTriggered = stream.readUnsignedByte() == 1;
  105. int i2 = stream.readUnsignedWord();
  106. rsInterface.children = new int[i2];
  107. rsInterface.childX = new int[i2];
  108. rsInterface.childY = new int[i2];
  109. for(int j3 = 0; j3 < i2; j3++) {
  110. rsInterface.children[j3] = stream.readUnsignedWord();
  111. rsInterface.childX[j3] = stream.readSignedWord();
  112. rsInterface.childY[j3] = stream.readSignedWord();
  113. }
  114. }
  115. if(rsInterface.type == 1) {
  116. stream.readUnsignedWord();
  117. stream.readUnsignedByte();
  118. }
  119. if(rsInterface.type == 2) {
  120. rsInterface.inv = new int[rsInterface.width * rsInterface.height];
  121. rsInterface.invStackSizes = new int[rsInterface.width * rsInterface.height];
  122. rsInterface.aBoolean259 = stream.readUnsignedByte() == 1;
  123. rsInterface.isInventoryInterface = stream.readUnsignedByte() == 1;
  124. rsInterface.usableItemInterface = stream.readUnsignedByte() == 1;
  125. rsInterface.aBoolean235 = stream.readUnsignedByte() == 1;
  126. rsInterface.invSpritePadX = stream.readUnsignedByte();
  127. rsInterface.invSpritePadY = stream.readUnsignedByte();
  128. rsInterface.spritesX = new int[20];
  129. rsInterface.spritesY = new int[20];
  130. rsInterface.sprites = new Sprite[20];
  131. for(int j2 = 0; j2 < 20; j2++) {
  132. int k3 = stream.readUnsignedByte();
  133. if(k3 == 1) {
  134. rsInterface.spritesX[j2] = stream.readSignedWord();
  135. rsInterface.spritesY[j2] = stream.readSignedWord();
  136. String s1 = stream.readString();
  137. if(streamLoader_1 != null && s1.length() > 0) {
  138. int i5 = s1.lastIndexOf(",");
  139. rsInterface.sprites[j2] = method207(Integer.parseInt(s1.substring(i5 + 1)), streamLoader_1, s1.substring(0, i5));
  140. }
  141. }
  142. }
  143. rsInterface.actions = new String[5];
  144. for(int l3 = 0; l3 < 5; l3++) {
  145. rsInterface.actions[l3] = stream.readString();
  146. if(rsInterface.actions[l3].length() == 0)
  147. rsInterface.actions[l3] = null;
  148. if(rsInterface.parentID == 1644)
  149. rsInterface.actions[2] = "Operate";
  150. if(rsInterface.parentID == 3824)
  151. rsInterface.actions[4] = "Buy 100";
  152. }
  153. }
  154. if(rsInterface.type == 3)
  155. rsInterface.aBoolean227 = stream.readUnsignedByte() == 1;
  156. if(rsInterface.type == 4 || rsInterface.type == 1) {
  157. rsInterface.centerText = stream.readUnsignedByte() == 1;
  158. int k2 = stream.readUnsignedByte();
  159. if(textDrawingAreas != null)
  160. rsInterface.textDrawingAreas = textDrawingAreas[k2];
  161. rsInterface.textShadow = stream.readUnsignedByte() == 1;
  162. }
  163. if(rsInterface.type == 4) {
  164. rsInterface.message = stream.readString();
  165. rsInterface.aString228 = stream.readString();
  166. }
  167. if(rsInterface.type == 1 || rsInterface.type == 3 || rsInterface.type == 4)
  168. rsInterface.textColor = stream.readDWord();
  169. if(rsInterface.type == 3 || rsInterface.type == 4) {
  170. rsInterface.anInt219 = stream.readDWord();
  171. rsInterface.anInt216 = stream.readDWord();
  172. rsInterface.anInt239 = stream.readDWord();
  173. }
  174. if(rsInterface.type == 5) {
  175. rsInterface.drawsTransparent = false;
  176. String s = stream.readString();
  177. if(streamLoader_1 != null && s.length() > 0) {
  178. int i4 = s.lastIndexOf(",");
  179. rsInterface.sprite1 = method207(Integer.parseInt(s.substring(i4 + 1)), streamLoader_1, s.substring(0, i4));
  180. }
  181. s = stream.readString();
  182. if(streamLoader_1 != null && s.length() > 0) {
  183. int j4 = s.lastIndexOf(",");
  184. rsInterface.sprite2 = method207(Integer.parseInt(s.substring(j4 + 1)), streamLoader_1, s.substring(0, j4));
  185. }
  186. }
  187. if(rsInterface.type == 6) {
  188. int l = stream.readUnsignedByte();
  189. if(l != 0) {
  190. rsInterface.anInt233 = 1;
  191. rsInterface.mediaID = (l - 1 << 8) + stream.readUnsignedByte();
  192. }
  193. l = stream.readUnsignedByte();
  194. if(l != 0) {
  195. rsInterface.anInt255 = 1;
  196. rsInterface.anInt256 = (l - 1 << 8) + stream.readUnsignedByte();
  197. }
  198. l = stream.readUnsignedByte();
  199. if(l != 0)
  200. rsInterface.anInt257 = (l - 1 << 8) + stream.readUnsignedByte();
  201. else
  202. rsInterface.anInt257 = -1;
  203. l = stream.readUnsignedByte();
  204. if(l != 0)
  205. rsInterface.anInt258 = (l - 1 << 8) + stream.readUnsignedByte();
  206. else
  207. rsInterface.anInt258 = -1;
  208. rsInterface.modelZoom = stream.readUnsignedWord();
  209. rsInterface.modelRotation1 = stream.readUnsignedWord();
  210. rsInterface.modelRotation2 = stream.readUnsignedWord();
  211. }
  212. if(rsInterface.type == 7) {
  213. rsInterface.inv = new int[rsInterface.width * rsInterface.height];
  214. rsInterface.invStackSizes = new int[rsInterface.width * rsInterface.height];
  215. rsInterface.centerText = stream.readUnsignedByte() == 1;
  216. int l2 = stream.readUnsignedByte();
  217. if(textDrawingAreas != null)
  218. rsInterface.textDrawingAreas = textDrawingAreas[l2];
  219. rsInterface.textShadow = stream.readUnsignedByte() == 1;
  220. rsInterface.textColor = stream.readDWord();
  221. rsInterface.invSpritePadX = stream.readSignedWord();
  222. rsInterface.invSpritePadY = stream.readSignedWord();
  223. rsInterface.isInventoryInterface = stream.readUnsignedByte() == 1;
  224. rsInterface.actions = new String[5];
  225. for(int k4 = 0; k4 < 5; k4++) {
  226. rsInterface.actions[k4] = stream.readString();
  227. if(rsInterface.actions[k4].length() == 0)
  228. rsInterface.actions[k4] = null;
  229. }
  230.  
  231. }
  232. if(rsInterface.atActionType == 2 || rsInterface.type == 2) {
  233. rsInterface.selectedActionName = stream.readString();
  234. rsInterface.spellName = stream.readString();
  235. rsInterface.spellUsableOn = stream.readUnsignedWord();
  236. }
  237.  
  238. if(rsInterface.type == 8)
  239. rsInterface.message = stream.readString();
  240.  
  241. if(rsInterface.atActionType == 1 || rsInterface.atActionType == 4 || rsInterface.atActionType == 5 || rsInterface.atActionType == 6) {
  242. rsInterface.tooltip = stream.readString();
  243. if(rsInterface.tooltip.length() == 0) {
  244. if(rsInterface.atActionType == 1)
  245. rsInterface.tooltip = "Ok";
  246. if(rsInterface.atActionType == 4)
  247. rsInterface.tooltip = "Select";
  248. if(rsInterface.atActionType == 5)
  249. rsInterface.tooltip = "Select";
  250. if(rsInterface.atActionType == 6)
  251. rsInterface.tooltip = "Continue";
  252. }
  253. }
  254. }
  255. aClass44 = streamLoader;
  256. bank(textDrawingAreas);
  257. prayerTab(textDrawingAreas);
  258. emoteTab();
  259. optionTab(textDrawingAreas);
  260. clanChatTab(textDrawingAreas);
  261. Sidebar0(textDrawingAreas);
  262. friendsTab(textDrawingAreas);
  263. ignoreTab(textDrawingAreas);
  264. Pestpanel(textDrawingAreas);
  265. Pestpanel2(textDrawingAreas);
  266. equipmentScreen(textDrawingAreas);
  267. magicTab(textDrawingAreas);
  268. ancientMagicTab(textDrawingAreas);
  269. configureLunar(textDrawingAreas);
  270. Curses(textDrawingAreas);
  271. constructLunar();
  272. aMRUNodes_238 = null;
  273. }
  274. public static void addPrayer(int i, int configId, int configFrame, int requiredValues, int prayerSpriteID, String PrayerName, int Hover) {
  275. RSInterface Interface = addTabInterface(i);
  276. Interface.id = i;
  277. Interface.parentID = 22500;
  278. Interface.type = 5;
  279. Interface.atActionType = 4;
  280. Interface.contentType = 0;
  281. Interface.aByte254 = 0;
  282. Interface.mOverInterToTrigger = Hover;
  283. Interface.sprite1 = imageLoader(0, "Curses/GLOW");
  284. Interface.sprite2 = imageLoader(1, "Curses/GLOW");
  285. Interface.width = 34;
  286. Interface.height = 34;
  287. Interface.anIntArray245 = new int[1];
  288. Interface.anIntArray212 = new int[1];
  289. Interface.anIntArray245[0] = 1;
  290. Interface.anIntArray212[0] = configId;
  291. Interface.valueIndexArray = new int[1][3];
  292. Interface.valueIndexArray[0][0] = 5;
  293. Interface.valueIndexArray[0][1] = configFrame;
  294. Interface.valueIndexArray[0][2] = 0;
  295. Interface.tooltip = "Activate@or1@ " + PrayerName;
  296. Interface = addTabInterface(i + 1);
  297. Interface.id = i + 1;
  298. Interface.parentID = 22500;
  299. Interface.type = 5;
  300. Interface.atActionType = 0;
  301. Interface.contentType = 0;
  302. Interface.aByte254 = 0;
  303. Interface.sprite1 = imageLoader(prayerSpriteID, "Curses/PRAYON");
  304. Interface.sprite2 = imageLoader(prayerSpriteID, "Curses/PRAYOFF");
  305. Interface.width = 34;
  306. Interface.height = 34;
  307. Interface.anIntArray245 = new int[1];
  308. Interface.anIntArray212 = new int[1];
  309. Interface.anIntArray245[0] = 2;
  310. Interface.anIntArray212[0] = requiredValues + 1;
  311. Interface.valueIndexArray = new int[1][3];
  312. Interface.valueIndexArray[0][0] = 2;
  313. Interface.valueIndexArray[0][1] = 5;
  314. Interface.valueIndexArray[0][2] = 0;
  315. }
  316.  
  317. public static void addTooltip(int id, String text, int H, int W) {
  318. RSInterface rsi = addTabInterface(id);
  319. rsi.id = id;
  320. rsi.type = 0;
  321. rsi.isMouseoverTriggered = true;
  322. rsi.mOverInterToTrigger = -1;
  323. addTooltipBox(id + 1, text);
  324. rsi.totalChildren(1);
  325. rsi.child(0, id + 1, 0, 0);
  326. rsi.height = H;
  327. rsi.width = W;
  328. }
  329. public static void magicTab(TextDrawingArea[] tda) {
  330. RSInterface tab = addTabInterface(1151);
  331. RSInterface homeHover = addTabInterface(1196);
  332. RSInterface spellButtons = interfaceCache[12424];
  333. spellButtons.scrollMax = 0; spellButtons.height = 260; spellButtons.width = 190;
  334. int[] spellButton = {
  335. 1196, 1199, 1206, 1215, 1224, 1231, 1240, 1249, 1258, 1267, 1274, 1283, 1573,
  336. 1290, 1299, 1308, 1315, 1324, 1333, 1340, 1349, 1358, 1367, 1374, 1381, 1388,
  337. 1397, 1404, 1583, 12038, 1414, 1421, 1430, 1437, 1446, 1453, 1460, 1469, 15878,
  338. 1602, 1613, 1624, 7456, 1478, 1485, 1494, 1503, 1512, 1521, 1530, 1544, 1553,
  339. 1563, 1593, 1635, 12426, 12436, 12446, 12456, 6004, 18471
  340. };
  341. tab.totalChildren(63);
  342. tab.child(0, 12424, 13, 24);
  343. for(int i1 = 0; i1 < spellButton.length; i1++) {
  344. int yPos = i1 > 34 ? 8 : 183;
  345. tab.child(1, 1195, 13, 24);
  346. tab.child(i1 + 2, spellButton[i1], 5, yPos);
  347. addButton(1195, 1, "Magic/Home", "Cast @gre@Home Teleport");
  348. RSInterface homeButton = interfaceCache[1195];
  349. homeButton.mOverInterToTrigger = 1196;
  350. }
  351. for(int i2 = 0; i2 < spellButton.length; i2++) {
  352. if(i2 < 60)
  353. spellButtons.childX[i2] = spellButtons.childX[i2] + 24;
  354. if(i2 == 6 || i2 == 12 || i2 == 19 || i2 == 35 || i2 == 41 || i2 == 44 || i2 == 49 || i2 == 51)
  355. spellButtons.childX[i2] = 0;
  356. spellButtons.childY[6] = 24; spellButtons.childY[12] = 48;
  357. spellButtons.childY[19] = 72; spellButtons.childY[49] = 96;
  358. spellButtons.childY[44] = 120; spellButtons.childY[51] = 144;
  359. spellButtons.childY[35] = 170; spellButtons.childY[41] = 192;
  360. }
  361. homeHover.isMouseoverTriggered = true;
  362. addText(1197, "Level 0: Home Teleport", tda, 1, 0xFE981F, true, true);
  363. RSInterface homeLevel = interfaceCache[1197]; homeLevel.width = 174; homeLevel.height = 68;
  364. addText(1198, "A teleport which requires no", tda, 0, 0xAF6A1A, true, true);
  365. addText(18998, "runes and no required level that", tda, 0, 0xAF6A1A, true, true);
  366. addText(18999, "teleports you to the main land.", tda, 0, 0xAF6A1A, true, true);
  367. homeHover.totalChildren(4);
  368. homeHover.child(0, 1197, 3, 4);
  369. homeHover.child(1, 1198, 91, 23);
  370. homeHover.child(2, 18998, 91, 34);
  371. homeHover.child(3, 18999, 91, 45);
  372. }
  373.  
  374. public static void ancientMagicTab(TextDrawingArea[] tda) {
  375. RSInterface tab = addInterface(12855);
  376. addButton(12856, 1, "Magic/Home", "Cast @gre@Home Teleport");
  377. RSInterface homeButton = interfaceCache[12856];
  378. homeButton.mOverInterToTrigger = 1196;
  379. int[] itfChildren = {
  380. 12856, 12939, 12987, 13035, 12901, 12861, 13045, 12963, 13011, 13053, 12919, 12881, 13061,
  381. 12951, 12999, 13069, 12911, 12871, 13079, 12975, 13023, 13087, 12929, 12891, 13095, 1196,
  382. 12940, 12988, 13036, 12902, 12862, 13046, 12964, 13012, 13054, 12920, 12882, 13062, 12952,
  383. 13000, 13070, 12912, 12872, 13080, 12976, 13024, 13088, 12930, 12892, 13096
  384. };
  385. tab.totalChildren(itfChildren.length);
  386. for(int i1 = 0, xPos = 18, yPos = 8; i1 < itfChildren.length; i1++, xPos += 45) {
  387. if(xPos > 175) {
  388. xPos = 18; yPos += 28;
  389. }
  390. if(i1 < 25)
  391. tab.child(i1, itfChildren[i1], xPos, yPos);
  392. if(i1 > 24) {
  393. yPos = i1 < 41 ? 181 : 1;
  394. tab.child(i1, itfChildren[i1], 4, yPos);
  395. }
  396. }
  397. }
  398.  
  399. public static void drawBlackBox(int xPos, int yPos) {
  400. ///Light Coloured Borders\\\
  401. DrawingArea.drawPixels(71, yPos - 1, xPos - 2, 0x726451, 1); // Left line
  402. DrawingArea.drawPixels(69, yPos, xPos + 174, 0x726451, 1); // Right line
  403. DrawingArea.drawPixels(1, yPos - 2, xPos - 2, 0x726451, 178); // Top Line
  404. DrawingArea.drawPixels(1, yPos + 68, xPos, 0x726451, 174); // Bottom Line
  405.  
  406. ///Dark Coloured Borders\\\
  407. DrawingArea.drawPixels(71, yPos - 1, xPos - 1, 0x2E2B23, 1); // Left line
  408. DrawingArea.drawPixels(71, yPos - 1, xPos + 175, 0x2E2B23, 1); // Right line
  409. DrawingArea.drawPixels(1, yPos - 1, xPos, 0x2E2B23, 175); // Top line
  410. DrawingArea.drawPixels(1, yPos + 69, xPos, 0x2E2B23, 175); // Top line
  411.  
  412. ///Black Box\\\
  413. DrawingArea.method335(0x000000, yPos, 174, 68, 220, xPos); //Yes method335 is galkons opacity method
  414. }
  415.  
  416. public static void addButton(int id, int sid, String spriteName, String tooltip) {
  417. RSInterface tab = interfaceCache[id] = new RSInterface();
  418. tab.id = id;
  419. tab.parentID = id;
  420. tab.type = 5;
  421. tab.atActionType = 1;
  422. tab.contentType = 0;
  423. tab.aByte254 = (byte)0;
  424. tab.mOverInterToTrigger = 52;
  425. tab.sprite1 = imageLoader(sid, spriteName);
  426. tab.sprite2 = imageLoader(sid, spriteName);
  427. tab.width = tab.sprite1.myWidth;
  428. tab.height = tab.sprite2.myHeight;
  429. tab.tooltip = tooltip;
  430. }
  431.  
  432. public static void Curses(TextDrawingArea[] TDA) {
  433. RSInterface Interface = addTabInterface(22500);
  434. int index = 0;
  435. setChildren(62, Interface);
  436. addText(22501, "99/99", 0xFF981F, false, false, -1, TDA, 1);
  437. /*Top Row*/
  438. addPrayer(22503, 0, 83, 49, 7, "Protect Item", 22542);
  439. setBounds(22503, 2, 5, index, Interface);index++;//Glow
  440. setBounds(22504, 8, 8, index, Interface);index++;//Icon
  441. addPrayer(22505, 0, 84, 49, 4, "Sap Warrior", 22544);
  442. setBounds(22505, 40, 5, index, Interface);index++;//Glow
  443. setBounds(22506, 47, 12, index, Interface);index++;//Icon
  444. addPrayer(22507, 0, 85, 51, 5, "Sap Ranger", 22546);
  445. setBounds(22507, 76, 5, index, Interface);index++;//Glow
  446. setBounds(22508, 82, 11, index, Interface);index++;//Icon
  447. addPrayer(22509, 0, 101, 53, 3, "Sap Mage", 22548);
  448. setBounds(22509, 113, 5, index, Interface);index++;//Glow
  449. setBounds(22510, 116, 8, index, Interface);index++;//Icon
  450. addPrayer(22511, 0, 102, 55, 2, "Sap Spirit", 22550);
  451. setBounds(22511, 150, 5, index, Interface);index++;//Glow
  452. setBounds(22512, 155, 10, index, Interface);index++;//Icon
  453. /*2nd Row*/
  454. addPrayer(22513, 0, 86, 58, 18, "Berserker", 22552);
  455. setBounds(22513, 2, 45, index, Interface);index++;//Glow
  456. setBounds(22514, 9, 48, index, Interface);index++;//Icon
  457. addPrayer(22515, 0, 87, 61, 15, "Deflect Summoning", 22554);
  458. setBounds(22515, 39, 45, index, Interface);index++;//Glow
  459. setBounds(22516, 42, 47, index, Interface);index++;//Icon
  460. addPrayer(22517, 0, 88, 64, 17, "Deflect Magic", 22556);
  461. setBounds(22517, 76, 45, index, Interface);index++;//Glow
  462. setBounds(22518, 79, 48, index, Interface);index++;//Icon
  463. addPrayer(22519, 0, 89, 67, 16, "Deflect Missiles", 22558);
  464. setBounds(22519, 113, 45, index, Interface);index++;//Glow
  465. setBounds(22520, 116, 48, index, Interface);index++;//Icon
  466. addPrayer(22521, 0, 90, 70, 6, "Deflect Melee", 22560);
  467. setBounds(22521, 151, 45, index, Interface);index++;//Glow
  468. setBounds(22522, 154, 48, index, Interface);index++;//Icon
  469. /*3rd Row*/
  470. addPrayer(22523, 0, 91, 73, 9, "Leech Attack", 22562);
  471. setBounds(22523, 2, 82, index, Interface);index++;//Glow
  472. setBounds(22524, 6, 86, index, Interface);index++;//Icon
  473. addPrayer(22525, 0, 103, 75, 10, "Leech Ranged", 22564);
  474. setBounds(22525, 40, 82, index, Interface);index++;//Glow
  475. setBounds(22526, 42, 86, index, Interface);index++;//Icon
  476. addPrayer(22527, 0, 104, 77, 11, "Leech Magic", 22566);
  477. setBounds(22527, 77, 82, index, Interface);index++;//Glow
  478. setBounds(22528, 79, 86, index, Interface);index++;//Icon
  479. addPrayer(22529, 0, 92, 79, 12, "Leech Defence", 22568);
  480. setBounds(22529, 114, 83, index, Interface);index++;//Glow
  481. setBounds(22530, 119, 87, index, Interface);index++;//Icon
  482. addPrayer(22531, 0, 93, 81, 13, "Leech Strength", 22570);
  483. setBounds(22531, 153, 83, index, Interface);index++;//Glow
  484. setBounds(22532, 156, 86, index, Interface);index++;//Icon
  485. /*Bottom Row*/
  486. addPrayer(22533, 0, 94, 83, 14, "Leech Energy", 22572);
  487. setBounds(22533, 2, 120, index, Interface);index++;//Glow
  488. setBounds(22534, 7, 125, index, Interface);index++;//Icon
  489. addPrayer(22535, 0, 95, 85, 19, "Leech Special Attack", 22574);
  490. setBounds(22535, 40, 120, index, Interface);index++;//Glow
  491. setBounds(22536, 45, 124, index, Interface);index++;//Icon
  492. addPrayer(22537, 0, 96, 88, 1, "Wrath", 22576);
  493. setBounds(22537, 78, 120, index, Interface);index++;//Glow
  494. setBounds(22538, 86, 124, index, Interface);index++;//Icon
  495. addPrayer(22539, 0, 97, 91, 8, "Soul Split", 22578);
  496. setBounds(22539, 114, 120, index, Interface);index++;//Glow
  497. setBounds(22540, 120, 125, index, Interface);index++;//Icon
  498. addPrayer(23000, 0, 105, 94, 0, "Turmoil", 22580);
  499. setBounds(23000, 151, 120, index, Interface);index++;//Glow
  500. setBounds(23001, 153, 127, index, Interface);index++;//Icon
  501. /*Prayer Icon/Text*/
  502. addSprite(22502, 0, "Curses/ICON");
  503. setBounds(22501, 85, 241, index, Interface);index++;//Text
  504. setBounds(22502, 65, 241, index, Interface);index++;//Icon
  505. /*Tooltips/Hover Boxes*/
  506. addTooltip(22542, "Level 50\nProtect Item\nKeep 1 extra item if you die", 100, 150);
  507. addTooltip(22544, "Level 50\nSap Warrior\nDrains 10% of enemy Attack,\nStrength and Defence,\nincreasing to 20% over time", 100, 150);
  508. addTooltip(22546, "Level 52\nSap Ranger\nDrains 10% of enemy Ranged\nand Defence, increasing to 20%\nover time", 100, 175);
  509. addTooltip(22548, "Level 54\nSap Mage\nDrains 10% of enemy Magic\nand Defence, increasing to 20%\nover time", 100, 175);
  510. addTooltip(22550, "Level 56\nSap Spirit\nDrains enenmy special attack\nenergy", 100, 175);
  511. addTooltip(22552, "Level 59\nBerserker\nBoosted stats last 15% longer", 100, 175);
  512. addTooltip(22554, "Level 62\nDeflect Summoning\nReduces damage dealt from\nSummoning scrolls, prevents the\nuse of a familiar's special\nattack, and can deflect some of\ndamage back to the attacker", 125, 175);
  513. addTooltip(22556, "Level 65\nDeflect Magic\nProtects against magical attacks\nand can deflect some of the\ndamage back to the attacker", 100, 175);
  514. addTooltip(22558, "Level 68\nDeflect Missiles\nProtects against ranged attacks\nand can deflect some of the\ndamage back to the attacker", 100, 175);
  515. addTooltip(22560, "Level 71\nDeflect Melee\nProtects against melee attacks\nand can deflect some of the\ndamage back to the attacker", 100, 175);
  516. addTooltip(22562, "Level 74\nLeech Attack\nBoosts Attack by 5%, increasing\nto 10% over time, while draining\nenemy Attack by 10%,\nincreasing to 25% over time", 100, 175);
  517. addTooltip(22564, "Level 76\nLeech Ranged\nBoosts Ranged by 5%, increasing\nto 10% over time,\nwhile draining enemy Ranged by\n10%, increasing to 25% over\ntime", 113, 175);
  518. addTooltip(22566, "Level 78\nLeech Magic\nBoosts Magic by 5%, increasing\nto 10% over time, while draining\nenemy Magic by 10%, increasing\nto 25% over time", 100, 175);
  519. addTooltip(22568, "Level 80\nLeech Defence\nBoosts Defence by 5%, increasing\nto 10% over time,\nwhile draining enemy Defence by\n10%, increasing to 25% over\ntime", 113, 180);
  520. addTooltip(22570, "Level 82\nLeech Strength\nBoosts Strength by 5%, increasing\nto 10% over time,\nwhile draining enemy Strength by\n10%, increasing to 25% over\ntime", 113, 180);
  521. addTooltip(22572, "Level 84\nLeech Energy\nDrains enemy run energy, while\nincreasing your own", 113, 180);
  522. addTooltip(22574, "Level 86\nLeech Special Attack\nDrains enemy special attack\nenergy, while increasing your\nown", 113, 180);
  523. addTooltip(22576, "Level 89\nWrath\nInflicts damage to nearby\ntargets if you die", 113, 180);
  524. addTooltip(22578, "Level 92\nSoul Split\n1/4 of damage dealt is\nalso removed from\nopponent's Prayer and added to\nyour Hitpoints", 113, 180);
  525. addTooltip(22580, "Level 95\nTurmoil\nIncreases Attack and Defence\nby 15%, plus 15% of enemy's\nlevel, and Strength by 23% plus\n10% of enemy's level", 113, 180);
  526. setBounds(22542, 10, 40, index, Interface);index++;
  527. setBounds(22544, 20, 40, index, Interface);index++;
  528. setBounds(22546, 20, 40, index, Interface);index++;
  529. setBounds(22548, 20, 40, index, Interface);index++;
  530. setBounds(22550, 20, 40, index, Interface);index++;
  531. setBounds(22552, 10, 80, index, Interface);index++;
  532. setBounds(22554, 10, 80, index, Interface);index++;
  533. setBounds(22556, 10, 80, index, Interface);index++;
  534. setBounds(22558, 10, 80, index, Interface);index++;
  535. setBounds(22560, 10, 80, index, Interface);index++;
  536. setBounds(22562, 10, 120, index, Interface);index++;
  537. setBounds(22564, 10, 120, index, Interface);index++;
  538. setBounds(22566, 10, 120, index, Interface);index++;
  539. setBounds(22568, 5, 120, index, Interface);index++;
  540. setBounds(22570, 5, 120, index, Interface);index++;
  541. setBounds(22572, 10, 160, index, Interface);index++;
  542. setBounds(22574, 10, 160, index, Interface);index++;
  543. setBounds(22576, 10, 160, index, Interface);index++;
  544. setBounds(22578, 10, 160, index, Interface);index++;
  545. setBounds(22580, 10, 160, index, Interface);index++;
  546. }
  547.  
  548. public static void prayerTab(TextDrawingArea[] tda) {
  549. RSInterface tab = addTabInterface(5608);
  550. RSInterface currentPray = interfaceCache[687];
  551. currentPray.textColor = 0xFF981F;
  552. currentPray.textShadow = true;
  553. currentPray.message = "%1/%2";
  554. addSprite(5651, 0, "PRAYER");
  555. addPrayer(18000, 0, 601, 7, 0, "Sharp Eye");
  556. addPrayer(18002, 0, 602, 8, 1, "Mystic Will");
  557. addPrayer(18004, 0, 603, 25, 2, "Hawk Eye");
  558. addPrayer(18006, 0, 604, 26, 3, "Mystic Lore");
  559. addPrayer(18008, 0, 605, 43, 4, "Eagle Eye");
  560. addPrayer(18010, 0, 606, 44, 5, "Mystic Might");
  561. addPrayer(18012, 0, 607, 59, 6, "Chivalry");
  562. addPrayer(18014, 0, 608, 69, 7, "Turmoil");
  563. tab.totalChildren(54);
  564. /* Buttons/glows */
  565. tab.child(0, 5609, 6, 4);
  566. tab.child(1, 5610, 42, 4);
  567. tab.child(2, 5611, 78, 4);
  568. tab.child(3, 5612, 6, 40);
  569. tab.child(4, 5613, 42, 40);
  570. tab.child(5, 5614, 78, 40);
  571. tab.child(6, 5615, 114, 40);
  572. tab.child(7, 5616, 150, 40);
  573. tab.child(8, 5617, 6, 76);
  574. tab.child(9, 5618, 114, 76);
  575. tab.child(10, 5619, 150, 76);
  576. tab.child(11, 5620, 6, 112);
  577. tab.child(12, 5621, 42, 112);
  578. tab.child(13, 5622, 78, 112);
  579. tab.child(14, 5623, 114, 112);
  580. tab.child(15, 683, 42, 148);
  581. tab.child(16, 684, 78, 148);
  582. tab.child(17, 685, 114, 148);
  583. /* Sprites */
  584. tab.child(18, 5632, 8, 6);
  585. tab.child(19, 5633, 44, 6);
  586. tab.child(20, 5634, 80, 6);
  587. tab.child(21, 5635, 8, 42);
  588. tab.child(22, 5636, 44, 42);
  589. tab.child(23, 5637, 80, 42);
  590. tab.child(24, 5638, 116, 42);
  591. tab.child(25, 5639, 152, 42);
  592. tab.child(26, 5640, 8, 79);
  593. tab.child(27, 5641, 116, 78);
  594. tab.child(28, 5642, 152, 78);
  595. tab.child(29, 5643, 8, 114);
  596. tab.child(30, 5644, 44, 114);
  597. tab.child(31, 686, 80, 114);
  598. tab.child(32, 5645, 116, 114);
  599. tab.child(33, 5649, 44, 150);
  600. tab.child(34, 5647, 80, 150);
  601. tab.child(35, 5648, 116, 150);
  602. /* New prayers */
  603. tab.child(36, 18000, 114, 4);
  604. tab.child(37, 18001, 117, 8);
  605. tab.child(38, 18002, 150, 4);
  606. tab.child(39, 18003, 153, 7);
  607. tab.child(40, 18004, 42, 76);
  608. tab.child(41, 18005, 45, 80);
  609. tab.child(42, 18006, 78, 76);
  610. tab.child(43, 18007, 81, 79);
  611. tab.child(44, 18008, 150, 112);
  612. tab.child(45, 18009, 153, 116);
  613. tab.child(46, 18010, 6, 148);
  614. tab.child(47, 18011, 9, 151);
  615. tab.child(48, 18012, 150, 148);
  616. tab.child(49, 18013, 157, 151);
  617. tab.child(50, 18014, 6, 184);
  618. tab.child(51, 18015, 8, 194);
  619. /* Prayer icons & text */
  620. tab.child(52, 5651, 65, 242);
  621. tab.child(53, 687, 14, 244);
  622. String[] tools = {"Thick Skin", "Burst of Strength", "Clarity of Thought", "Rock Skin", "Superhuman Strength", "Improved Reflexes", "Rapid Restore", "Rapid Heal", "Protect Item", "Steel Skin", "Ultimate Strength", "Incredible Reflexes",
  623. "Protect from Magic", "Protect from Range", "Protect from Melee", "Retribution", "Redemption", "Smite"};
  624. int count = 0;
  625. for (int j = 5609; j <= 5623; j++) {
  626. RSInterface tab2 = interfaceCache[j];
  627. tab2.tooltip = "Activate @or2@" + tools[count++];
  628. }
  629. for (int j = 683; j <= 685; j++) {
  630. RSInterface tab2 = interfaceCache[j];
  631. tab2.tooltip = "Activate @or2@" + tools[count++];
  632. }
  633. }
  634.  
  635. public String popupString;
  636. public static void addTooltipBox(int id, String text) {
  637. RSInterface rsi = addInterface(id);
  638. rsi.id = id;
  639. rsi.parentID = id;
  640. rsi.type = 8;
  641. rsi.popupString = text;
  642. }
  643. public static void addTooltip(int id, String text) {
  644. RSInterface rsi = addInterface(id);
  645. rsi.id = id;
  646. rsi.type = 0;
  647. rsi.isMouseoverTriggered = true;
  648. rsi.mOverInterToTrigger = -1;
  649. addTooltipBox(id + 1, text);
  650. rsi.totalChildren(1);
  651. rsi.child(0, id + 1, 0, 0);
  652. }
  653.  
  654. public static void addPrayer(int i, int configId, int configFrame, int anIntArray212, int spriteID, String prayerName) {
  655. RSInterface tab = addTabInterface(i);
  656. tab.id = i;
  657. tab.parentID = 5608;
  658. tab.type = 5;
  659. tab.atActionType = 4;
  660. tab.contentType = 0;
  661. tab.aByte254 = 0;
  662. tab.mOverInterToTrigger = -1;
  663. tab.sprite1 = imageLoader(0, "PRAYERGLOW");
  664. tab.sprite2 = imageLoader(1, "PRAYERGLOW");
  665. tab.width = 34;
  666. tab.height = 34;
  667. tab.anIntArray245 = new int[1];
  668. tab.anIntArray212 = new int[1];
  669. tab.anIntArray245[0] = 1;
  670. tab.anIntArray212[0] = configId;
  671. tab.valueIndexArray = new int[1][3];
  672. tab.valueIndexArray[0][0] = 5;
  673. tab.valueIndexArray[0][1] = configFrame;
  674. tab.valueIndexArray[0][2] = 0;
  675. tab.tooltip = "Activate@or2@ " + prayerName;
  676. //tab.tooltip = "Select";
  677. RSInterface tab2 = addTabInterface(i + 1);
  678. tab2.id = i + 1;
  679. tab2.parentID = 5608;
  680. tab2.type = 5;
  681. tab2.atActionType = 0;
  682. tab2.contentType = 0;
  683. tab2.aByte254 = 0;
  684. tab2.mOverInterToTrigger = -1;
  685. tab2.sprite1 = imageLoader(spriteID, "/PRAYER/PRAYON");
  686. tab2.sprite2 = imageLoader(spriteID, "/PRAYER/PRAYOFF");
  687. tab2.width = 34;
  688. tab2.height = 34;
  689. tab2.anIntArray245 = new int[1];
  690. tab2.anIntArray212 = new int[1];
  691. tab2.anIntArray245[0] = 2;
  692. tab2.anIntArray212[0] = anIntArray212 + 1;
  693. tab2.valueIndexArray = new int[1][3];
  694. tab2.valueIndexArray[0][0] = 2;
  695. tab2.valueIndexArray[0][1] = 5;
  696. tab2.valueIndexArray[0][2] = 0;
  697. //RSInterface tab3 = addTabInterface(i + 50);
  698. }
  699. public static void friendsTab(TextDrawingArea[] tda) {
  700. RSInterface tab = addTabInterface(5065);
  701. RSInterface list = interfaceCache[5066];
  702. addText(5067, "Friends List", tda, 1, 0xff9933, true, true);
  703. addText(5070, "Add Friend", tda, 0, 0xff9933, false, true);
  704. addText(5071, "Delete Friend", tda, 0, 0xff9933, false, true);
  705. addSprite(16126, 4, "/Friends/SPRITE");
  706. addSprite(16127, 8, "/Friends/SPRITE");
  707. addHoverButton(5068, "/Friends/SPRITE", 6, 72, 32, "Add Friend", 201, 5072, 1);
  708. addHoveredButton(5072, "/Friends/SPRITE", 7, 72, 32, 5073);
  709. addHoverButton(5069, "/Friends/SPRITE", 6, 72, 32, "Delete Friend", 202, 5074, 1);
  710. addHoveredButton(5074, "/Friends/SPRITE", 7, 72, 32, 5075);
  711. tab.totalChildren(11);
  712. tab.child(0, 5067, 95, 4);
  713. tab.child(1, 16127, 0, 25);
  714. tab.child(2, 16126, 0, 221);
  715. tab.child(3, 5066, 0, 24);
  716. tab.child(4, 16126, 0, 22);
  717. tab.child(5, 5068, 15, 226);
  718. tab.child(6, 5072, 15, 226);
  719. tab.child(7, 5069, 103, 226);
  720. tab.child(8, 5074, 103, 226);
  721. tab.child(9, 5070, 25, 237);
  722. tab.child(10, 5071, 106, 237);
  723. list.height = 196; list.width = 174;
  724. for(int id = 5092, i = 0; id <= 5191 && i <= 99; id++, i++) {
  725. list.children[i] = id; list.childX[i] = 3; list.childY[i] = list.childY[i] - 7;
  726. } for(int id = 5192, i = 100; id <= 5291 && i <= 199; id++, i++) {
  727. list.children[i] = id; list.childX[i] = 131; list.childY[i] = list.childY[i] - 7;
  728. }
  729. }
  730.  
  731. public static void ignoreTab(TextDrawingArea[] tda) {
  732. RSInterface tab = addTabInterface(5715);
  733. RSInterface list = interfaceCache[5716];
  734. addText(5717, "Ignore List", tda, 1, 0xff9933, true, true);
  735. addText(5720, "Add Name", tda, 0, 0xff9933, false, true);
  736. addText(5721, "Delete Name", tda, 0, 0xff9933, false, true);
  737. addHoverButton(5718, "/Friends/SPRITE", 6, 72, 32, "Add Name", 501, 5722, 1);
  738. addHoveredButton(5722, "/Friends/SPRITE", 7, 72, 32, 5723);
  739. addHoverButton(5719, "/Friends/SPRITE", 6, 72, 32, "Delete Name", 502, 5724, 1);
  740. addHoveredButton(5724, "/Friends/SPRITE", 7, 72, 32, 5725);
  741. tab.totalChildren(11);
  742. tab.child(0, 5717, 95, 4);
  743. tab.child(1, 16127, 0, 25);
  744. tab.child(2, 16126, 0, 221);
  745. tab.child(3, 5716, 0, 24);
  746. tab.child(4, 16126, 0, 22);
  747. tab.child(5, 5718, 15, 226);
  748. tab.child(6, 5722, 15, 226);
  749. tab.child(7, 5719, 103, 226);
  750. tab.child(8, 5724, 103, 226);
  751. tab.child(9, 5720, 27, 237);
  752. tab.child(10, 5721, 108, 237);
  753. list.height = 196;
  754. list.width = 174;
  755. for(int id = 5742, i = 0; id <= 5841 && i <= 99; id++, i++) {
  756. list.children[i] = id; list.childX[i] = 3; list.childY[i] = list.childY[i] - 7;
  757. }
  758. }
  759.  
  760. private static Sprite CustomSpriteLoader(int id, String s)
  761. {
  762. long l = (TextClass.method585(s) << 8) + (long)id;
  763. Sprite sprite = (Sprite)aMRUNodes_238.insertFromCache(l);
  764. if(sprite != null) { return sprite; }
  765. try {
  766. sprite = new Sprite("/Attack/"+id + s);
  767. aMRUNodes_238.removeFromCache(sprite, l);
  768. } catch(Exception exception) {
  769. return null; }
  770. return sprite;
  771. }
  772.  
  773. public static RSInterface addInterface(int id)
  774. {
  775. RSInterface rsi = interfaceCache[id] = new RSInterface();
  776. rsi.id = id;
  777. rsi.parentID = id;
  778. rsi.width = 512;
  779. rsi.height = 334;
  780. return rsi;
  781. }
  782.  
  783. public static void addText(int id, String text, TextDrawingArea tda[], int idx, int color, boolean centered) {
  784. RSInterface rsi = interfaceCache[id] = new RSInterface();
  785. if(centered)
  786. rsi.centerText = true;
  787. rsi.textShadow = true;
  788. rsi.textDrawingAreas = tda[idx];
  789. rsi.message = text;
  790. rsi.textColor = color;
  791. rsi.id = id;
  792. rsi.type = 4;
  793. }
  794.  
  795. public static void textColor(int id, int color)
  796. { RSInterface rsi = interfaceCache[id]; rsi.textColor = color; }
  797.  
  798. public static void textSize(int id, TextDrawingArea tda[], int idx)
  799. { RSInterface rsi = interfaceCache[id]; rsi.textDrawingAreas = tda[idx]; }
  800.  
  801. public static void addCacheSprite(int id, int sprite1, int sprite2, String sprites)
  802. {
  803. RSInterface rsi = interfaceCache[id] = new RSInterface();
  804. rsi.sprite1 = method207(sprite1, aClass44, sprites);
  805. rsi.sprite2 = method207(sprite2, aClass44, sprites);
  806. rsi.parentID = id;
  807. rsi.id = id;
  808. rsi.type = 5;
  809. }
  810.  
  811. public static void sprite1(int id, int sprite)
  812. { RSInterface class9 = interfaceCache[id];
  813. class9.sprite1 = CustomSpriteLoader(sprite, "");
  814. }
  815.  
  816. public static void addActionButton(int id, int sprite, int sprite2, int width, int height, String s)
  817. {
  818. RSInterface rsi = interfaceCache[id] = new RSInterface();
  819. rsi.sprite1 = CustomSpriteLoader(sprite, "");
  820. if (sprite2 == sprite)
  821. rsi.sprite2 = CustomSpriteLoader(sprite, "a");
  822. else
  823. rsi.sprite2 = CustomSpriteLoader(sprite2, "");
  824. rsi.tooltip = s;
  825. rsi.contentType = 0;
  826. rsi.atActionType = 1;
  827. rsi.width = width;
  828. rsi.mOverInterToTrigger = 52;
  829. rsi.parentID = id;
  830. rsi.id = id;
  831. rsi.type = 5;
  832. rsi.height = height;
  833. }
  834.  
  835. public static void addToggleButton(int id, int sprite, int setconfig, int width, int height, String s)
  836. {
  837. RSInterface rsi = addInterface(id);
  838. rsi.sprite1 = CustomSpriteLoader(sprite, "");
  839. rsi.sprite2 = CustomSpriteLoader(sprite, "a");
  840. rsi.anIntArray212 = new int[1];
  841. rsi.anIntArray212[0] = 1;
  842. rsi.anIntArray245 = new int[1];
  843. rsi.anIntArray245[0] = 1;
  844. rsi.valueIndexArray = new int[1][3];
  845. rsi.valueIndexArray[0][0] = 5;
  846. rsi.valueIndexArray[0][1] = setconfig;
  847. rsi.valueIndexArray[0][2] = 0;
  848. rsi.atActionType = 4;
  849. rsi.width = width;
  850. rsi.mOverInterToTrigger = -1;
  851. rsi.parentID = id;
  852. rsi.id = id;
  853. rsi.type = 5;
  854. rsi.height = height;
  855. rsi.tooltip = s;
  856. }
  857.  
  858. public void totalChildren(int id, int x, int y)
  859. { children = new int[id]; childX = new int[x]; childY = new int[y]; }
  860.  
  861. public static void removeSomething(int id)
  862. { RSInterface rsi = interfaceCache[id] = new RSInterface(); }
  863.  
  864. public void specialBar(int id) //7599
  865. {
  866. /*addActionButton(ID, SpriteOFF, SpriteON, Width, Height, "SpriteText");*/
  867. addActionButton(id-12, 7587, -1, 150, 26, "Use @gre@Special Attack");
  868. /*removeSomething(ID);*/
  869. for (int i = id-11; i < id; i++)
  870. removeSomething(i);
  871.  
  872. RSInterface rsi = interfaceCache[id-12];
  873. rsi.width = 150;
  874. rsi.height = 26;
  875.  
  876. rsi = interfaceCache[id];
  877. rsi.width = 150;
  878. rsi.height = 26;
  879.  
  880. rsi.child(0, id-12, 0, 0);
  881.  
  882. rsi.child(12, id+1, 3, 7);
  883.  
  884. rsi.child(23, id+12, 16, 8);
  885.  
  886. for (int i = 13; i < 23; i++) {
  887. rsi.childY[i] -= 1;
  888. }
  889.  
  890. rsi = interfaceCache[id+1];
  891. rsi.type = 5;
  892. rsi.sprite1 = CustomSpriteLoader(7600, "");
  893.  
  894. for (int i = id+2; i < id+12; i++) {
  895. rsi = interfaceCache[i];
  896. rsi.type = 5;
  897. }
  898.  
  899. sprite1(id+2, 7601);sprite1(id+3, 7602);
  900. sprite1(id+4, 7603);sprite1(id+5, 7604);
  901. sprite1(id+6, 7605);sprite1(id+7, 7606);
  902. sprite1(id+8, 7607);sprite1(id+9, 7608);
  903. sprite1(id+10, 7609);sprite1(id+11, 7610);
  904. }
  905.  
  906. public static void Sidebar0(TextDrawingArea[] tda)
  907. {
  908. /*Sidebar0a(id, id2, id3, "text1", "text2", "text3", "text4", str1x, str1y, str2x, str2y, str3x, str3y, str4x, str4y, img1x, img1y, img2x, img2y, img3x, img3y, img4x, img4y, tda);*/
  909. Sidebar0a(1698, 1701, 7499, "Chop", "Hack", "Smash", "Block", 42, 75, 127, 75, 39, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  910. Sidebar0a(2276, 2279, 7574, "Stab", "Lunge", "Slash", "Block", 43, 75, 124, 75, 41, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  911. Sidebar0a(2423, 2426, 7599, "Chop", "Slash", "Lunge", "Block", 42, 75, 125, 75, 40, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  912. Sidebar0a(3796, 3799, 7624, "Pound", "Pummel", "Spike", "Block", 39, 75, 121, 75, 41, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  913. Sidebar0a(4679, 4682, 7674, "Lunge", "Swipe", "Pound", "Block", 40, 75, 124, 75, 39, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  914. Sidebar0a(4705, 4708, 7699, "Chop", "Slash", "Smash", "Block", 42, 75, 125, 75, 39, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  915. Sidebar0a(5570, 5573, 7724, "Spike", "Impale", "Smash", "Block", 41, 75, 123, 75, 39, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  916. Sidebar0a(7762, 7765, 7800, "Chop", "Slash", "Lunge", "Block", 42, 75, 125, 75, 40, 128, 125, 128, 122, 103, 40, 50, 122, 50, 40, 103, tda);
  917. /*Sidebar0b(id, id2, "text1", "text2", "text3", "text4", str1x, str1y, str2x, str2y, str3x, str3y, str4x, str4y, img1x, img1y, img2x, img2y, img3x, img3y, img4x, img4y, tda);*/
  918. Sidebar0b(776, 779, "Reap", "Chop", "Jab", "Block", 42, 75, 126, 75, 46, 128, 125, 128, 122, 103, 122, 50, 40, 103, 40, 50, tda);
  919. /*Sidebar0c(id, id2, id3, "text1", "text2", "text3", str1x, str1y, str2x, str2y, str3x, str3y, img1x, img1y, img2x, img2y, img3x, img3y, tda);*/
  920. Sidebar0c(425, 428, 7474, "Pound", "Pummel", "Block", 39, 75, 121, 75, 42, 128, 40, 103, 40, 50, 122, 50, tda);
  921. Sidebar0c(1749, 1752, 7524, "Accurate", "Rapid", "Longrange", 33, 75, 125, 75, 29, 128, 40, 103, 40, 50, 122, 50, tda);
  922. Sidebar0c(1764, 1767, 7549, "Accurate", "Rapid", "Longrange", 33, 75, 125, 75, 29, 128, 40, 103, 40, 50, 122, 50, tda);
  923. Sidebar0c(4446, 4449, 7649, "Accurate", "Rapid", "Longrange", 33, 75, 125, 75, 29, 128, 40, 103, 40, 50, 122, 50, tda);
  924. Sidebar0c(5855, 5857, 7749, "Punch", "Kick", "Block", 40, 75, 129, 75, 42, 128, 40, 50, 122, 50, 40, 103, tda);
  925. Sidebar0c(6103, 6132, 6117, "Bash", "Pound", "Block", 43, 75, 124, 75, 42, 128, 40, 103, 40, 50, 122, 50, tda);
  926. Sidebar0c(8460, 8463, 8493, "Jab", "Swipe", "Fend", 46, 75, 124, 75, 43, 128, 40, 103, 40, 50, 122, 50, tda);
  927. Sidebar0c(12290, 12293, 12323, "Flick", "Lash", "Deflect", 44, 75, 127, 75, 36, 128, 40, 50, 40, 103, 122, 50, tda);
  928. /*Sidebar0d(id, id2, "text1", "text2", "text3", str1x, str1y, str2x, str2y, str3x, str3y, img1x, img1y, img2x, img2y, img3x, img3y, tda);*/
  929. Sidebar0d(328, 331, "Bash", "Pound", "Focus", 42, 66, 39, 101, 41, 136, 40, 120, 40, 50, 40, 85, tda);
  930.  
  931. RSInterface rsi = addInterface(19300);
  932. /*textSize(ID, wid, Size);*/
  933. textSize(3983, tda, 0);
  934. /*addToggleButton(id, sprite, config, width, height, wid);*/
  935. addToggleButton(150, 150, 172, 150, 44, "Auto Retaliate");
  936.  
  937. rsi.totalChildren(2, 2, 2);
  938. rsi.child(0, 3983, 52, 25); //combat level
  939. rsi.child(1, 150, 21, 153); //auto retaliate
  940.  
  941. rsi = interfaceCache[3983];
  942. rsi.centerText = true;
  943. rsi.textColor = 0xff981f;
  944. }
  945.  
  946. public static void Sidebar0a(int id, int id2, int id3, String text1, String text2, String text3, String text4,
  947. int str1x, int str1y, int str2x, int str2y, int str3x, int str3y, int str4x, int str4y,
  948. int img1x, int img1y, int img2x, int img2y, int img3x, int img3y, int img4x, int img4y, TextDrawingArea[] tda) //4button spec
  949. {
  950. RSInterface rsi = addInterface(id); //2423
  951. /*addText(ID, "Text", tda, Size, Colour, Centered);*/
  952. addText(id2, "-2", tda, 3, 0xff981f, true); //2426
  953. addText(id2+11, text1, tda, 0, 0xff981f, false);
  954. addText(id2+12, text2, tda, 0, 0xff981f, false);
  955. addText(id2+13, text3, tda, 0, 0xff981f, false);
  956. addText(id2+14, text4, tda, 0, 0xff981f, false);
  957. /*specialBar(ID);*/
  958. rsi.specialBar(id3); //7599
  959.  
  960. rsi.width = 190;
  961. rsi.height = 261;
  962.  
  963. int last = 15; int frame = 0;
  964. rsi.totalChildren(last, last, last);
  965.  
  966. rsi.child(frame, id2+3, 21, 46); frame++; //2429
  967. rsi.child(frame, id2+4, 104, 99); frame++; //2430
  968. rsi.child(frame, id2+5, 21, 99); frame++; //2431
  969. rsi.child(frame, id2+6, 105, 46); frame++; //2432
  970.  
  971. rsi.child(frame, id2+7, img1x, img1y); frame++; //bottomright 2433
  972. rsi.child(frame, id2+8, img2x, img2y); frame++; //topleft 2434
  973. rsi.child(frame, id2+9, img3x, img3y); frame++; //bottomleft 2435
  974. rsi.child(frame, id2+10, img4x, img4y); frame++; //topright 2436
  975.  
  976. rsi.child(frame, id2+11, str1x, str1y); frame++; //chop 2437
  977. rsi.child(frame, id2+12, str2x, str2y); frame++; //slash 2438
  978. rsi.child(frame, id2+13, str3x, str3y); frame++; //lunge 2439
  979. rsi.child(frame, id2+14, str4x, str4y); frame++; //block 2440
  980.  
  981. rsi.child(frame, 19300, 0, 0); frame++; //stuffs
  982. rsi.child(frame, id2, 94, 4); frame++; //weapon 2426
  983. rsi.child(frame, id3, 21, 205); frame++; //special attack 7599
  984.  
  985. for (int i = id2+3; i < id2+7; i++) { //2429 - 2433
  986. rsi = interfaceCache[i];
  987. rsi.sprite1 = CustomSpriteLoader(19301, ""); rsi.sprite2 = CustomSpriteLoader(19301, "a");
  988. rsi.width = 68; rsi.height = 44;
  989. }
  990. }
  991.  
  992. public static void Sidebar0b(int id, int id2, String text1, String text2, String text3, String text4,
  993. int str1x, int str1y, int str2x, int str2y, int str3x, int str3y, int str4x, int str4y,
  994. int img1x, int img1y, int img2x, int img2y, int img3x, int img3y, int img4x, int img4y, TextDrawingArea[] tda) //4button nospec
  995. {
  996. RSInterface rsi = addInterface(id); //2423
  997. /*addText(ID, "Text", tda, Size, Colour, Centered);*/
  998. addText(id2, "-2", tda, 3, 0xff981f, true); //2426
  999. addText(id2+11, text1, tda, 0, 0xff981f, false);
  1000. addText(id2+12, text2, tda, 0, 0xff981f, false);
  1001. addText(id2+13, text3, tda, 0, 0xff981f, false);
  1002. addText(id2+14, text4, tda, 0, 0xff981f, false);
  1003.  
  1004. rsi.width = 190;
  1005. rsi.height = 261;
  1006.  
  1007. int last = 14; int frame = 0;
  1008. rsi.totalChildren(last, last, last);
  1009.  
  1010. rsi.child(frame, id2+3, 21, 46); frame++; //2429
  1011. rsi.child(frame, id2+4, 104, 99); frame++; //2430
  1012. rsi.child(frame, id2+5, 21, 99); frame++; //2431
  1013. rsi.child(frame, id2+6, 105, 46); frame++; //2432
  1014.  
  1015. rsi.child(frame, id2+7, img1x, img1y); frame++; //bottomright 2433
  1016. rsi.child(frame, id2+8, img2x, img2y); frame++; //topleft 2434
  1017. rsi.child(frame, id2+9, img3x, img3y); frame++; //bottomleft 2435
  1018. rsi.child(frame, id2+10, img4x, img4y); frame++; //topright 2436
  1019.  
  1020. rsi.child(frame, id2+11, str1x, str1y); frame++; //chop 2437
  1021. rsi.child(frame, id2+12, str2x, str2y); frame++; //slash 2438
  1022. rsi.child(frame, id2+13, str3x, str3y); frame++; //lunge 2439
  1023. rsi.child(frame, id2+14, str4x, str4y); frame++; //block 2440
  1024.  
  1025. rsi.child(frame, 19300, 0, 0); frame++; //stuffs
  1026. rsi.child(frame, id2, 94, 4); frame++; //weapon 2426
  1027.  
  1028. for (int i = id2+3; i < id2+7; i++) { //2429 - 2433
  1029. rsi = interfaceCache[i];
  1030. rsi.sprite1 = CustomSpriteLoader(19301, ""); rsi.sprite2 = CustomSpriteLoader(19301, "a");
  1031. rsi.width = 68; rsi.height = 44;
  1032. }
  1033. }
  1034.  
  1035. public static void Sidebar0c(int id, int id2, int id3, String text1, String text2, String text3,
  1036. int str1x, int str1y, int str2x, int str2y, int str3x, int str3y,
  1037. int img1x, int img1y, int img2x, int img2y, int img3x, int img3y, TextDrawingArea[] tda) //3button spec
  1038. {
  1039. RSInterface rsi = addInterface(id); //2423
  1040. /*addText(ID, "Text", tda, Size, Colour, Centered);*/
  1041. addText(id2, "-2", tda, 3, 0xff981f, true); //2426
  1042. addText(id2+9, text1, tda, 0, 0xff981f, false);
  1043. addText(id2+10, text2, tda, 0, 0xff981f, false);
  1044. addText(id2+11, text3, tda, 0, 0xff981f, false);
  1045. /*specialBar(ID);*/
  1046. rsi.specialBar(id3); //7599
  1047.  
  1048. rsi.width = 190;
  1049. rsi.height = 261;
  1050.  
  1051. int last = 12; int frame = 0;
  1052. rsi.totalChildren(last, last, last);
  1053.  
  1054. rsi.child(frame, id2+3, 21, 99); frame++;
  1055. rsi.child(frame, id2+4, 105, 46); frame++;
  1056. rsi.child(frame, id2+5, 21, 46); frame++;
  1057.  
  1058. rsi.child(frame, id2+6, img1x, img1y); frame++; //topleft
  1059. rsi.child(frame, id2+7, img2x, img2y); frame++; //bottomleft
  1060. rsi.child(frame, id2+8, img3x, img3y); frame++; //topright
  1061.  
  1062. rsi.child(frame, id2+9, str1x, str1y); frame++; //chop
  1063. rsi.child(frame, id2+10, str2x, str2y); frame++; //slash
  1064. rsi.child(frame, id2+11, str3x, str3y); frame++; //lunge
  1065.  
  1066. rsi.child(frame, 19300, 0, 0); frame++; //stuffs
  1067. rsi.child(frame, id2, 94, 4); frame++; //weapon
  1068. rsi.child(frame, id3, 21, 205); frame++; //special attack 7599
  1069.  
  1070. for (int i = id2+3; i < id2+6; i++) {
  1071. rsi = interfaceCache[i];
  1072. rsi.sprite1 = CustomSpriteLoader(19301, ""); rsi.sprite2 = CustomSpriteLoader(19301, "a");
  1073. rsi.width = 68; rsi.height = 44;
  1074. }
  1075. }
  1076.  
  1077. public static void Sidebar0d(int id, int id2, String text1, String text2, String text3,
  1078. int str1x, int str1y, int str2x, int str2y, int str3x, int str3y,
  1079. int img1x, int img1y, int img2x, int img2y, int img3x, int img3y, TextDrawingArea[] tda) //3button nospec (magic intf)
  1080. {
  1081. RSInterface rsi = addInterface(id); //2423
  1082. /*addText(ID, "Text", tda, Size, Colour, Centered);*/
  1083. addText(id2, "-2", tda, 3, 0xff981f, true); //2426
  1084. addText(id2+9, text1, tda, 0, 0xff981f, false);
  1085. addText(id2+10, text2, tda, 0, 0xff981f, false);
  1086. addText(id2+11, text3, tda, 0, 0xff981f, false);
  1087.  
  1088. //addText(353, "Spell", tda, 0, 0xff981f, false);
  1089. removeSomething(353);
  1090. addText(354, "Spell", tda, 0, 0xff981f, false);
  1091.  
  1092. addCacheSprite(337, 19, 0, "combaticons");
  1093. addCacheSprite(338, 13, 0, "combaticons2");
  1094. addCacheSprite(339, 14, 0, "combaticons2");
  1095.  
  1096. /*addToggleButton(id, sprite, config, width, height, tooltip);*/
  1097. //addToggleButton(349, 349, 108, 68, 44, "Select");
  1098. removeSomething(349);
  1099. addToggleButton(350, 350, 108, 68, 44, "Select");
  1100.  
  1101. rsi.width = 190;
  1102. rsi.height = 261;
  1103.  
  1104. int last = 15; int frame = 0;
  1105. rsi.totalChildren(last, last, last);
  1106.  
  1107. rsi.child(frame, id2+3, 20, 115); frame++;
  1108. rsi.child(frame, id2+4, 20, 80); frame++;
  1109. rsi.child(frame, id2+5, 20, 45); frame++;
  1110.  
  1111. rsi.child(frame, id2+6, img1x, img1y); frame++; //topleft
  1112. rsi.child(frame, id2+7, img2x, img2y); frame++; //bottomleft
  1113. rsi.child(frame, id2+8, img3x, img3y); frame++; //topright
  1114.  
  1115. rsi.child(frame, id2+9, str1x, str1y); frame++; //bash
  1116. rsi.child(frame, id2+10, str2x, str2y); frame++; //pound
  1117. rsi.child(frame, id2+11, str3x, str3y); frame++; //focus
  1118.  
  1119. rsi.child(frame, 349, 105, 46); frame++; //spell1
  1120. rsi.child(frame, 350, 104, 106); frame++; //spell2
  1121.  
  1122. rsi.child(frame, 353, 125, 74); frame++; //spell
  1123. rsi.child(frame, 354, 125, 134); frame++; //spell
  1124.  
  1125. rsi.child(frame, 19300, 0, 0); frame++; //stuffs
  1126. rsi.child(frame, id2, 94, 4); frame++; //weapon
  1127. }
  1128.  
  1129.  
  1130. public static void emoteTab() {
  1131. RSInterface tab = addTabInterface(147);
  1132. RSInterface scroll = addTabInterface(148);
  1133. tab.totalChildren(1);
  1134. tab.child(0, 148, 0, 1);
  1135. addButton(168, 0, "/Emotes/EMOTE", "Yes",41,47);
  1136. addButton(169, 1, "/Emotes/EMOTE", "No",41,47);
  1137. addButton(164, 2, "/Emotes/EMOTE", "Bow",41,47);
  1138. addButton(165, 3, "/Emotes/EMOTE", "Angry",41,47);
  1139. addButton(162, 4, "/Emotes/EMOTE", "Think",41,47);
  1140. addButton(163, 5, "/Emotes/EMOTE", "Wave",41,47);
  1141. addButton(13370, 6, "/Emotes/EMOTE", "Shrug",41,47);
  1142. addButton(171, 7, "/Emotes/EMOTE", "Cheer",41,47);
  1143. addButton(167, 8, "/Emotes/EMOTE", "Beckon",41,47);
  1144. addButton(170, 9, "/Emotes/EMOTE", "Laugh",41,47);
  1145. addButton(13366, 10, "/Emotes/EMOTE", "Jump for Joy",41,47);
  1146. addButton(13368, 11, "/Emotes/EMOTE", "Yawn",41,47);
  1147. addButton(166, 12, "/Emotes/EMOTE", "Dance",41,47);
  1148. addButton(13363, 13, "/Emotes/EMOTE", "Jig",41,47);
  1149. addButton(13364, 14, "/Emotes/EMOTE", "Spin",41,47);
  1150. addButton(13365, 15, "/Emotes/EMOTE", "Headbang",41,47);
  1151. addButton(161, 16, "/Emotes/EMOTE", "Cry",41,47);
  1152. addButton(11100, 17, "/Emotes/EMOTE", "Blow kiss",41,47);
  1153. addButton(13362, 18, "/Emotes/EMOTE", "Panic",41,47);
  1154. addButton(13367, 19, "/Emotes/EMOTE", "Raspberry",41,47);
  1155. addButton(172, 20, "/Emotes/EMOTE", "Clap",41,47);
  1156. addButton(13369, 21, "/Emotes/EMOTE", "Salute",41,47);
  1157. addButton(13383, 22, "/Emotes/EMOTE", "Goblin Bow",41,47);
  1158. addButton(13384, 23, "/Emotes/EMOTE", "Goblin Salute",41,47);
  1159. addButton(667, 24, "/Emotes/EMOTE", "Glass Box",41,47);
  1160. addButton(6503, 25, "/Emotes/EMOTE", "Climb Rope",41,47);
  1161. addButton(6506, 26, "/Emotes/EMOTE", "Lean On Air",41,47);
  1162. addButton(666, 27, "/Emotes/EMOTE", "Glass Wall",41,47);
  1163. addButton(18464, 28, "/Emotes/EMOTE", "Zombie Walk",41,47);
  1164. addButton(18465, 29, "/Emotes/EMOTE", "Zombie Dance",41,47);
  1165. addButton(15166, 30, "/Emotes/EMOTE", "Scared",41,47);
  1166. addButton(18686, 31, "/Emotes/EMOTE", "Rabbit Hop",41,47);
  1167. addConfigButton(154, 147, 32, 33,"/Emotes/EMOTE", 41, 47, "Skillcape Emote", 0, 1, 700);
  1168. scroll.totalChildren(33);
  1169. scroll.child(0, 168, 10, 7);
  1170. scroll.child(1, 169, 54, 7);
  1171. scroll.child(2, 164, 98, 14);
  1172. scroll.child(3, 165, 137, 7);
  1173. scroll.child(4, 162, 9, 56);
  1174. scroll.child(5, 163, 48, 56);
  1175. scroll.child(6, 13370, 95, 56);
  1176. scroll.child(7, 171, 137, 56);
  1177. scroll.child(8, 167, 7, 105);
  1178. scroll.child(9, 170, 51, 105);
  1179. scroll.child(10, 13366, 95, 104);
  1180. scroll.child(11, 13368, 139, 105);
  1181. scroll.child(12, 166, 6, 154);
  1182. scroll.child(13, 13363, 50, 154);
  1183. scroll.child(14, 13364, 90, 154);
  1184. scroll.child(15, 13365, 135, 154);
  1185. scroll.child(16, 161, 8, 204);
  1186. scroll.child(17, 11100, 51, 203);
  1187. scroll.child(18, 13362, 99, 204);
  1188. scroll.child(19, 13367, 137, 203);
  1189. scroll.child(20, 172, 10, 253);
  1190. scroll.child(21, 13369, 53, 253);
  1191. scroll.child(22, 13383, 88, 258);
  1192. scroll.child(23, 13384, 138, 252);
  1193. scroll.child(24, 667, 2, 303);
  1194. scroll.child(25, 6503, 49, 302);
  1195. scroll.child(26, 6506, 93, 302);
  1196. scroll.child(27, 666, 137, 302);
  1197. scroll.child(28, 18464, 9, 352);
  1198. scroll.child(29, 18465, 50, 352);
  1199. scroll.child(30, 15166, 94, 356);
  1200. scroll.child(31, 18686, 141, 353);
  1201. scroll.child(32, 157, 6, 412);
  1202. scroll.width = 173; scroll.height = 258; scroll.scrollMax = 403;
  1203. }
  1204.  
  1205. public static void optionTab(TextDrawingArea[] tda) {
  1206. RSInterface tab = addTabInterface(904);
  1207. RSInterface energy = interfaceCache[149];
  1208. energy.textColor = 0xff9933;
  1209. addSprite(905, 9, "/Options/SPRITE");
  1210. addSprite(907, 18, "/Options/SPRITE");
  1211. addSprite(909, 29, "/Options/SPRITE");
  1212. addSprite(951, 32, "/Options/SPRITE");
  1213. addSprite(953, 33, "/Options/SPRITE");
  1214. addSprite(955, 34, "/Options/SPRITE");
  1215. addSprite(947, 36, "/Options/SPRITE");
  1216. addSprite(949, 35, "/Options/SPRITE");
  1217. //run button here
  1218. addConfigButton(152, 904, 30, 31, "/Options/SPRITE", 40, 40, "Toggle-run", 1, 5, 173);
  1219. addConfigButton(906, 904, 10, 14, "/Options/SPRITE", 32, 16, "Dark", 1, 5, 166);
  1220. addConfigButton(908, 904, 11, 15, "/Options/SPRITE", 32, 16, "Normal", 2, 5, 166);
  1221. addConfigButton(910, 904, 12, 16, "/Options/SPRITE", 32, 16, "Bright", 3, 5, 166);
  1222. addConfigButton(912, 904, 13, 17, "/Options/SPRITE", 32, 16, "Very Bright", 4, 5, 166);
  1223. addConfigButton(930, 904, 19, 24, "/Options/SPRITE", 26, 16, "Music Off", 4, 5, 168);
  1224. addConfigButton(931, 904, 20, 25, "/Options/SPRITE", 26, 16, "Music Level-1", 3, 5, 168);
  1225. addConfigButton(932, 904, 21, 26, "/Options/SPRITE", 26, 16, "Music Level-2", 2, 5, 168);
  1226. addConfigButton(933, 904, 22, 27, "/Options/SPRITE", 26, 16, "Music Level-3", 1, 5, 168);
  1227. addConfigButton(934, 904, 23, 28, "/Options/SPRITE", 24, 16, "Music Level-4", 0, 5, 168);
  1228. addConfigButton(941, 904, 19, 24, "/Options/SPRITE", 26, 16, "Sound Effects Off", 4, 5, 169);
  1229. addConfigButton(942, 904, 20, 25, "/Options/SPRITE", 26, 16, "Sound Effects Level-1", 3, 5, 169);
  1230. addConfigButton(943, 904, 21, 26, "/Options/SPRITE", 26, 16, "Sound Effects Level-2", 2, 5, 169);
  1231. addConfigButton(944, 904, 22, 27, "/Options/SPRITE", 26, 16, "Sound Effects Level-3", 1, 5, 169);
  1232. addConfigButton(945, 904, 23, 28, "/Options/SPRITE", 24, 16, "Sound Effects Level-4", 0, 5, 169);
  1233. addConfigButton(913, 904, 30, 31, "/Options/SPRITE", 40, 40, "Toggle-Mouse Buttons", 0, 5, 170);
  1234. addConfigButton(915, 904, 30, 31, "/Options/SPRITE", 40, 40, "Toggle-Chat Effects", 0, 5, 171);
  1235. addConfigButton(957, 904, 30, 31, "/Options/SPRITE", 40, 40, "Toggle-Split Private Chat", 1, 5, 287);
  1236. addConfigButton(12464, 904, 30, 31, "/Options/SPRITE", 40, 40, "Toggle-Accept Aid", 0, 5, 427);
  1237. tab.totalChildren(28);
  1238. int x = 0;
  1239. int y = 2;
  1240. tab.child(0, 905, 13 + x, 10 + y);
  1241. tab.child(1, 906, 48 + x, 18 + y);
  1242. tab.child(2, 908, 80 + x, 18 + y);
  1243. tab.child(3, 910, 112 + x, 18 + y);
  1244. tab.child(4, 912, 144 + x, 18 + y);
  1245. tab.child(5, 907, 14 + x, 55 + y);
  1246. tab.child(6, 930, 49 + x, 61 + y);
  1247. tab.child(7, 931, 75 + x, 61 + y);
  1248. tab.child(8, 932, 101 + x, 61 + y);
  1249. tab.child(9, 933, 127 + x, 61 + y);
  1250. tab.child(10, 934, 151 + x, 61 + y);
  1251. tab.child(11, 909, 13 + x, 99 + y);
  1252. tab.child(12, 941, 49 + x, 104 + y);
  1253. tab.child(13, 942, 75 + x, 104 + y);
  1254. tab.child(14, 943, 101 + x, 104 + y);
  1255. tab.child(15, 944, 127 + x, 104 + y);
  1256. tab.child(16, 945, 151 + x, 104 + y);
  1257. tab.child(17, 913, 15, 153);
  1258. tab.child(18, 955, 19, 159);
  1259. tab.child(19, 915, 75, 153);
  1260. tab.child(20, 953, 79, 160);
  1261. tab.child(21, 957, 135, 153);
  1262. tab.child(22, 951, 139, 159);
  1263. tab.child(23, 12464, 15, 208);
  1264. tab.child(24, 949, 20, 213);
  1265. tab.child(25, 152, 75, 208);
  1266. tab.child(26, 947, 87, 212);
  1267. tab.child(27, 149, 80, 231);
  1268. }
  1269.  
  1270. public static void clanChatTab(TextDrawingArea[] tda) {
  1271. RSInterface tab = addTabInterface(18128);
  1272. addHoverButton(18129, "/Clan Chat/SPRITE", 6, 72, 32, "Join Chat", 550, 18130, 1);
  1273. addHoveredButton(18130, "/Clan Chat/SPRITE", 7, 72, 32, 18131);
  1274. addHoverButton(18132, "/Clan Chat/SPRITE", 6, 72, 32, "Leave Chat", -1, 18133, 5);
  1275. addHoveredButton(18133, "/Clan Chat/SPRITE", 7, 72, 32, 18134);
  1276. addButton(18250, 0, "/Clan Chat/Lootshare", "Toggle lootshare");
  1277. addText(18135, "Join Chat", tda, 0, 0xff9b00, true, true);
  1278. addText(18136, "Leave Chat", tda, 0, 0xff9b00, true, true);
  1279. addSprite(18137, 37, "/Clan Chat/SPRITE");
  1280. addText(18138, "Clan Chat", tda, 1, 0xff9b00, true, true);
  1281. addText(18139, "Talking in: Not in chat", tda, 0, 0xff9b00, false, true);
  1282. addText(18140, "Owner: None", tda, 0, 0xff9b00, false, true);
  1283. tab.totalChildren(14);
  1284. tab.child(0, 16126, 0, 221);
  1285. tab.child(1, 16126, 0, 59);
  1286. tab.child(2, 18137, 0, 62);
  1287. tab.child(3, 18143, 0, 62);
  1288. tab.child(4, 18129, 15, 226);
  1289. tab.child(5, 18130, 15, 226);
  1290. tab.child(6, 18132, 103, 226);
  1291. tab.child(7, 18133, 103, 226);
  1292. tab.child(8, 18135, 51, 237);
  1293. tab.child(9, 18136, 139, 237);
  1294. tab.child(10, 18138, 95, 1);
  1295. tab.child(11, 18139, 10, 23);
  1296. tab.child(12, 18140, 25, 38);
  1297. tab.child(13, 18250, 145,15);
  1298. /* Text area */
  1299. RSInterface list = addTabInterface(18143);
  1300. list.totalChildren(100);
  1301. for(int i = 18144; i <= 18244; i++) {
  1302. addText(i, "", tda, 0, 0xffffff, false, true);
  1303. }
  1304. for(int id = 18144, i = 0; id <= 18243 && i <= 99; id++, i++) {
  1305. list.children[i] = id; list.childX[i] = 5;
  1306. for(int id2 = 18144, i2 = 1; id2 <= 18243 && i2<= 99; id2++, i2++) {
  1307. list.childY[0] = 2;
  1308. list.childY[i2] = list.childY[i2 - 1] + 14;
  1309. }
  1310. }
  1311. list.height = 158; list.width = 174;
  1312. list.scrollMax = 1405;
  1313. }
  1314.  
  1315. public static void addText(int i, String s,int k, boolean l, boolean m, int a,TextDrawingArea[] TDA, int j) {
  1316. RSInterface RSInterface = addInterface(i);
  1317. RSInterface.parentID = i;
  1318. RSInterface.id = i;
  1319. RSInterface.type = 4;
  1320. RSInterface.atActionType = 0;
  1321. RSInterface.width = 0;
  1322. RSInterface.height = 0;
  1323. RSInterface.contentType = 0;
  1324. RSInterface.aByte254 = 0;
  1325. RSInterface.mOverInterToTrigger = a;
  1326. RSInterface.centerText = l;
  1327. RSInterface.textShadow = m;
  1328. RSInterface.textDrawingAreas = TDA[j];
  1329. RSInterface.message = s;
  1330. RSInterface.aString228 = "";
  1331. RSInterface.textColor = k;
  1332. }
  1333.  
  1334. public static void Pestpanel(TextDrawingArea[] tda) {
  1335. RSInterface RSinterface = addInterface(21119);
  1336. addText(21120, "What", 0x999999, false, true, 52, tda, 1);
  1337. addText(21121, "What", 0x33cc00, false, true, 52, tda, 1);
  1338. addText(21122, "(Need 5 to 25 players)", 0xFFcc33, false, true, 52, tda, 1);
  1339. addText(21123, "Points", 0x33ccff, false, true, 52, tda, 1);
  1340. int last = 4;
  1341. RSinterface.children = new int[last];
  1342. RSinterface.childX = new int[last];
  1343. RSinterface.childY = new int[last];
  1344. setBounds(21120, 15, 12, 0,RSinterface);
  1345. setBounds(21121, 15, 30, 1,RSinterface);
  1346. setBounds(21122, 15, 48, 2,RSinterface);
  1347. setBounds(21123, 15, 66, 3,RSinterface);
  1348. }
  1349.  
  1350. public static void Pestpanel2(TextDrawingArea[] tda) {
  1351. RSInterface RSinterface = addInterface(21100);
  1352. addSprite(21101, 0, "Pest Control/PEST1");
  1353. addSprite(21102, 1, "Pest Control/PEST1");
  1354. addSprite(21103, 2, "Pest Control/PEST1");
  1355. addSprite(21104, 3, "Pest Control/PEST1");
  1356. addSprite(21105, 4, "Pest Control/PEST1");
  1357. addSprite(21106, 5, "Pest Control/PEST1");
  1358. addText(21107, "", 0xCC00CC, false, true, 52, tda, 1);
  1359. addText(21108, "", 0x0000FF, false, true, 52, tda, 1);
  1360. addText(21109, "", 0xFFFF44, false, true, 52, tda, 1);
  1361. addText(21110, "", 0xCC0000, false, true, 52, tda, 1);
  1362. addText(21111, "250", 0x99FF33, false, true, 52, tda, 1);//w purp
  1363. addText(21112, "250", 0x99FF33, false, true, 52, tda, 1);//e blue
  1364. addText(21113, "250", 0x99FF33, false, true, 52, tda, 1);//se yel
  1365. addText(21114, "250", 0x99FF33, false, true, 52, tda, 1);//sw red
  1366. addText(21115, "200", 0x99FF33, false, true, 52, tda, 1);//attacks
  1367. addText(21116, "0", 0x99FF33, false, true, 52, tda, 1);//knights hp
  1368. addText(21117, "Time Remaining:", 0xFFFFFF, false, true, 52, tda, 0);
  1369. addText(21118, "", 0xFFFFFF, false, true, 52, tda, 0);
  1370. int last = 18;
  1371. RSinterface.children = new int[last];
  1372. RSinterface.childX = new int[last];
  1373. RSinterface.childY = new int[last];
  1374. setBounds(21101, 361, 26, 0,RSinterface);
  1375. setBounds(21102, 396, 26, 1,RSinterface);
  1376. setBounds(21103, 436, 26, 2,RSinterface);
  1377. setBounds(21104, 474, 26, 3,RSinterface);
  1378. setBounds(21105, 3, 21, 4,RSinterface);
  1379. setBounds(21106, 3, 50, 5,RSinterface);
  1380. setBounds(21107, 371, 60, 6,RSinterface);
  1381. setBounds(21108, 409, 60, 7,RSinterface);
  1382. setBounds(21109, 443, 60, 8,RSinterface);
  1383. setBounds(21110, 479, 60, 9,RSinterface);
  1384. setBounds(21111, 362, 10, 10,RSinterface);
  1385. setBounds(21112, 398, 10, 11,RSinterface);
  1386. setBounds(21113, 436, 10, 12,RSinterface);
  1387. setBounds(21114, 475, 10, 13,RSinterface);
  1388. setBounds(21115, 32, 32, 14,RSinterface);
  1389. setBounds(21116, 32, 62, 15,RSinterface);
  1390. setBounds(21117, 8, 88, 16,RSinterface);
  1391. setBounds(21118, 87, 88, 17,RSinterface);
  1392. }
  1393.  
  1394. public String hoverText;
  1395. public static void addHoverBox(int id, String text) {
  1396. RSInterface rsi = interfaceCache[id];//addTabInterface(id);
  1397. rsi.id = id;
  1398. rsi.parentID = id;
  1399. rsi.isMouseoverTriggered = true;
  1400. rsi.type = 8;
  1401. rsi.hoverText = text;
  1402. }
  1403.  
  1404. public static void addText(int id, String text, TextDrawingArea tda[], int idx, int color, boolean center, boolean shadow) {
  1405. RSInterface tab = addTabInterface(id);
  1406. tab.parentID = id;
  1407. tab.id = id;
  1408. tab.type = 4;
  1409. tab.atActionType = 0;
  1410. tab.width = 0;
  1411. tab.height = 11;
  1412. tab.contentType = 0;
  1413. tab.aByte254 = 0;
  1414. tab.mOverInterToTrigger = -1;
  1415. tab.centerText = center;
  1416. tab.textShadow = shadow;
  1417. tab.textDrawingAreas = tda[idx];
  1418. tab.message = text;
  1419. tab.aString228 = "";
  1420. tab.textColor = color;
  1421. tab.anInt219 = 0;
  1422. tab.anInt216 = 0;
  1423. tab.anInt239 = 0;
  1424. }
  1425.  
  1426. public static void addButton(int id, int sid, String spriteName, String tooltip, int w, int h) {
  1427. RSInterface tab = interfaceCache[id] = new RSInterface();
  1428. tab.id = id;
  1429. tab.parentID = id;
  1430. tab.type = 5;
  1431. tab.atActionType = 1;
  1432. tab.contentType = 0;
  1433. tab.aByte254 = (byte)0;
  1434. tab.mOverInterToTrigger = 52;
  1435. tab.sprite1 = imageLoader(sid, spriteName);
  1436. tab.sprite2 = imageLoader(sid, spriteName);
  1437. tab.width = w;
  1438. tab.height = h;
  1439. tab.tooltip = tooltip;
  1440. }
  1441.  
  1442. public static void addConfigButton(int ID, int pID, int bID, int bID2, String bName, int width, int height, String tT, int configID, int aT, int configFrame) {
  1443. RSInterface Tab = addTabInterface(ID);
  1444. Tab.parentID = pID;
  1445. Tab.id = ID;
  1446. Tab.type = 5;
  1447. Tab.atActionType = aT;
  1448. Tab.contentType = 0;
  1449. Tab.width = width;
  1450. Tab.height = height;
  1451. Tab.aByte254 = 0;
  1452. Tab.mOverInterToTrigger = -1;
  1453. Tab.anIntArray245 = new int[1];
  1454. Tab.anIntArray212 = new int[1];
  1455. Tab.anIntArray245[0] = 1;
  1456. Tab.anIntArray212[0] = configID;
  1457. Tab.valueIndexArray = new int[1][3];
  1458. Tab.valueIndexArray[0][0] = 5;
  1459. Tab.valueIndexArray[0][1] = configFrame;
  1460. Tab.valueIndexArray[0][2] = 0;
  1461. Tab.sprite1 = imageLoader(bID, bName);
  1462. Tab.sprite2 = imageLoader(bID2, bName);
  1463. Tab.tooltip = tT;
  1464. }
  1465.  
  1466. public static void addSprite(int id, int spriteId, String spriteName) {
  1467. RSInterface tab = interfaceCache[id] = new RSInterface();
  1468. tab.id = id;
  1469. tab.parentID = id;
  1470. tab.type = 5;
  1471. tab.atActionType = 0;
  1472. tab.contentType = 0;
  1473. tab.aByte254 = (byte)0;
  1474. tab.mOverInterToTrigger = 52;
  1475. tab.sprite1 = imageLoader(spriteId, spriteName);
  1476. tab.sprite2 = imageLoader(spriteId, spriteName);
  1477. tab.width = 512;
  1478. tab.height = 334;
  1479. }
  1480.  
  1481. public static void addHoverButton(int i, String imageName, int j, int width, int height, String text, int contentType, int hoverOver, int aT) {//hoverable button
  1482. RSInterface tab = addTabInterface(i);
  1483. tab.id = i;
  1484. tab.parentID = i;
  1485. tab.type = 5;
  1486. tab.atActionType = aT;
  1487. tab.contentType = contentType;
  1488. tab.aByte254 = 0;
  1489. tab.mOverInterToTrigger = hoverOver;
  1490. tab.sprite1 = imageLoader(j, imageName);
  1491. tab.sprite2 = imageLoader(j, imageName);
  1492. tab.width = width;
  1493. tab.height = height;
  1494. tab.tooltip = text;
  1495. }
  1496.  
  1497. public static void addHoveredButton(int i, String imageName, int j, int w, int h, int IMAGEID) {//hoverable button
  1498. RSInterface tab = addTabInterface(i);
  1499. tab.parentID = i;
  1500. tab.id = i;
  1501. tab.type = 0;
  1502. tab.atActionType = 0;
  1503. tab.width = w;
  1504. tab.height = h;
  1505. tab.isMouseoverTriggered = true;
  1506. tab.aByte254 = 0;
  1507. tab.mOverInterToTrigger = -1;
  1508. tab.scrollMax = 0;
  1509. addHoverImage(IMAGEID, j, j, imageName);
  1510. tab.totalChildren(1);
  1511. tab.child(0, IMAGEID, 0, 0);
  1512. }
  1513.  
  1514. public static void addHoverImage(int i, int j, int k, String name) {
  1515. RSInterface tab = addTabInterface(i);
  1516. tab.id = i;
  1517. tab.parentID = i;
  1518. tab.type = 5;
  1519. tab.atActionType = 0;
  1520. tab.contentType = 0;
  1521. tab.width = 512;
  1522. tab.height = 334;
  1523. tab.aByte254 = 0;
  1524. tab.mOverInterToTrigger = 52;
  1525. tab.sprite1 = imageLoader(j, name);
  1526. tab.sprite2 = imageLoader(k, name);
  1527. }
  1528.  
  1529. public static void addTransparentSprite(int id, int spriteId, String spriteName) {
  1530. RSInterface tab = interfaceCache[id] = new RSInterface();
  1531. tab.id = id;
  1532. tab.parentID = id;
  1533. tab.type = 5;
  1534. tab.atActionType = 0;
  1535. tab.contentType = 0;
  1536. tab.aByte254 = (byte)0;
  1537. tab.mOverInterToTrigger = 52;
  1538. tab.sprite1 = imageLoader(spriteId, spriteName);
  1539. tab.sprite2 = imageLoader(spriteId, spriteName);
  1540. tab.width = 512;
  1541. tab.height = 334;
  1542. tab.drawsTransparent = true;
  1543. }
  1544.  
  1545. public static RSInterface addScreenInterface(int id) {
  1546. RSInterface tab = interfaceCache[id] = new RSInterface();
  1547. tab.id = id;
  1548. tab.parentID = id;
  1549. tab.type = 0;
  1550. tab.atActionType = 0;
  1551. tab.contentType = 0;
  1552. tab.width = 512;
  1553. tab.height = 334;
  1554. tab.aByte254 = (byte)0;
  1555. tab.mOverInterToTrigger = 0;
  1556. return tab;
  1557. }
  1558.  
  1559. public static RSInterface addTabInterface(int id) {
  1560. RSInterface tab = interfaceCache[id] = new RSInterface();
  1561. tab.id = id;//250
  1562. tab.parentID = id;//236
  1563. tab.type = 0;//262
  1564. tab.atActionType = 0;//217
  1565. tab.contentType = 0;
  1566. tab.width = 512;//220
  1567. tab.height = 700;//267
  1568. tab.aByte254 = (byte)0;
  1569. tab.mOverInterToTrigger = -1;//Int 230
  1570. return tab;
  1571. }
  1572.  
  1573. private static Sprite imageLoader(int i, String s) {
  1574. long l = (TextClass.method585(s) << 8) + (long)i;
  1575. Sprite sprite = (Sprite) aMRUNodes_238.insertFromCache(l);
  1576. if(sprite != null)
  1577. return sprite;
  1578. try {
  1579. sprite = new Sprite(s+" "+i);
  1580. aMRUNodes_238.removeFromCache(sprite, l);
  1581. } catch(Exception exception) {
  1582. return null;
  1583. }
  1584. return sprite;
  1585. }
  1586.  
  1587. public void child(int id, int interID, int x, int y) {
  1588. children[id] = interID;
  1589. childX[id] = x;
  1590. childY[id] = y;
  1591. }
  1592.  
  1593. public void totalChildren(int t) {
  1594. children = new int[t];
  1595. childX = new int[t];
  1596. childY = new int[t];
  1597. }
  1598.  
  1599. private Model method206(int i, int j)
  1600. {
  1601. Model model = (Model) aMRUNodes_264.insertFromCache((i << 16) + j);
  1602. if(model != null)
  1603. return model;
  1604. if(i == 1)
  1605. model = Model.method462(j);
  1606. if(i == 2)
  1607. model = EntityDef.forID(j).method160();
  1608. if(i == 3)
  1609. model = client.myPlayer.method453();
  1610. if(i == 4)
  1611. model = ItemDef.forID(j).method202(50);
  1612. if(i == 5)
  1613. model = null;
  1614. if(model != null)
  1615. aMRUNodes_264.removeFromCache(model, (i << 16) + j);
  1616. return model;
  1617. }
  1618.  
  1619. private static Sprite method207(int i, StreamLoader streamLoader, String s) {
  1620. long l = (TextClass.method585(s) << 8) + (long)i;
  1621. Sprite sprite = (Sprite) aMRUNodes_238.insertFromCache(l);
  1622. if(sprite != null)
  1623. return sprite;
  1624. try {
  1625. sprite = new Sprite(streamLoader, s, i);
  1626. aMRUNodes_238.removeFromCache(sprite, l);
  1627. } catch(Exception _ex) {
  1628. return null;
  1629. }
  1630. return sprite;
  1631. }
  1632.  
  1633. public static void method208(boolean flag, Model model) {
  1634. int i = 0;//was parameter
  1635. int j = 5;//was parameter
  1636. if(flag)
  1637. return;
  1638. aMRUNodes_264.unlinkAll();
  1639. if(model != null && j != 4)
  1640. aMRUNodes_264.removeFromCache(model, (j << 16) + i);
  1641. }
  1642.  
  1643. public Model method209(int j, int k, boolean flag) {
  1644. Model model;
  1645. if(flag)
  1646. model = method206(anInt255, anInt256);
  1647. else
  1648. model = method206(anInt233, mediaID);
  1649. if(model == null)
  1650. return null;
  1651. if(k == -1 && j == -1 && model.anIntArray1640 == null)
  1652. return model;
  1653. Model model_1 = new Model(true, Class36.method532(k) & Class36.method532(j), false, model);
  1654. if(k != -1 || j != -1)
  1655. model_1.method469();
  1656. if(k != -1)
  1657. model_1.method470(k);
  1658. if(j != -1)
  1659. model_1.method470(j);
  1660. model_1.method479(64, 768, -50, -10, -50, true);
  1661. return model_1;
  1662. }
  1663.  
  1664. public RSInterface() {}
  1665.  
  1666. public static StreamLoader aClass44;
  1667. public boolean drawsTransparent;
  1668. public Sprite sprite1;
  1669. public int anInt208;
  1670. public Sprite sprites[];
  1671. public static RSInterface interfaceCache[];
  1672. public int anIntArray212[];
  1673. public int contentType;//anInt214
  1674. public int spritesX[];
  1675. public int anInt216;
  1676. public int atActionType;
  1677. public String spellName;
  1678. public int anInt219;
  1679. public int width;
  1680. public String tooltip;
  1681. public String selectedActionName;
  1682. public boolean centerText;
  1683. public int scrollPosition;
  1684. public String actions[];
  1685. public int valueIndexArray[][];
  1686. public boolean aBoolean227;
  1687. public String aString228;
  1688. public int mOverInterToTrigger;
  1689. public int invSpritePadX;
  1690. public int textColor;
  1691. public int anInt233;
  1692. public int mediaID;
  1693. public boolean aBoolean235;
  1694. public int parentID;
  1695. public int spellUsableOn;
  1696. private static MRUNodes aMRUNodes_238;
  1697. public int anInt239;
  1698. public int children[];
  1699. public int childX[];
  1700. public boolean usableItemInterface;
  1701. public TextDrawingArea textDrawingAreas;
  1702. public int invSpritePadY;
  1703. public int anIntArray245[];
  1704. public int anInt246;
  1705. public int spritesY[];
  1706. public String message;
  1707. public boolean isInventoryInterface;
  1708. public int id;
  1709. public int invStackSizes[];
  1710. public int inv[];
  1711. public byte aByte254;
  1712. private int anInt255;
  1713. private int anInt256;
  1714. public int anInt257;
  1715. public int anInt258;
  1716. public boolean aBoolean259;
  1717. public Sprite sprite2;
  1718. public int scrollMax;
  1719. public int type;
  1720. public int anInt263;
  1721. private static final MRUNodes aMRUNodes_264 = new MRUNodes(30);
  1722. public int anInt265;
  1723. public boolean isMouseoverTriggered;
  1724. public int height;
  1725. public boolean textShadow;
  1726. public int modelZoom;
  1727. public int modelRotation1;
  1728. public int modelRotation2;
  1729. public int childY[];
  1730.  
  1731.  
  1732. public static void equipmentScreen(TextDrawingArea[] wid) {
  1733. RSInterface Interface = RSInterface.interfaceCache[1644];
  1734. addButton(19144, 6, "Equipment/CUSTOM", 150, 40, "Show Equipment Stats", 1);
  1735. removeSomething(19145);
  1736. removeSomething(19146);
  1737. removeSomething(19147);
  1738. setBounds(19144, 21, 210, 23, Interface);
  1739. setBounds(19145, 40, 210, 24, Interface);
  1740. setBounds(19146, 40, 210, 25, Interface);
  1741. setBounds(19147, 40, 210, 26, Interface);
  1742.  
  1743. RSInterface tab = addTabInterface(15106);
  1744. addSprite(15107, 7, "Equipment/CUSTOM");
  1745. addHoverButton(15210, "Equipment/CUSTOM", 8, 21, 21, "Close", 250, 15211, 3);
  1746. addHoveredButton(15211, "Equipment/CUSTOM", 9, 21, 21, 15212);
  1747. addText(15111, "Equip Your Character...", wid, 2, 0xe4a146, false, true);
  1748. addText(15112, "Attack bonus", wid, 2, 0xe4a146, false, true);
  1749. addText(15113, "Defence bonus", wid, 2, 0xe4a146, false, true);
  1750. addText(15114, "Other bonuses", wid, 2, 0xe4a146, false, true);
  1751. for(int i = 1675; i <= 1684; i++) { textSize(i, wid, 1); }
  1752. textSize(1686, wid, 1); textSize(1687, wid, 1);
  1753. addChar(15125);
  1754. tab.totalChildren(44);
  1755. tab.child(0, 15107, 4, 20);
  1756. tab.child(1, 15210, 476, 29);
  1757. tab.child(2, 15211, 476, 29);
  1758. tab.child(3, 15111, 14, 30);
  1759. int Child = 4; int Y = 69;
  1760. for(int i = 1675; i <= 1679; i++){
  1761. tab.child(Child, i, 20, Y);
  1762. Child++; Y += 14; }
  1763. tab.child(9, 1680, 20, 161);
  1764. tab.child(10, 1681, 20, 177);
  1765. tab.child(11, 1682, 20, 192);
  1766. tab.child(12, 1683, 20, 207);
  1767. tab.child(13, 1684, 20, 221);
  1768. tab.child(14, 1686, 20, 262);
  1769. tab.child(15, 15125, 170, 200);
  1770. tab.child(16, 15112, 16, 55);
  1771. tab.child(17, 1687, 20, 276);
  1772. tab.child(18, 15113, 16, 147);
  1773. tab.child(19, 15114, 16, 248);
  1774. tab.child(20, 1645, 104+295, 149-52);
  1775. tab.child(21, 1646, 399, 163);
  1776. tab.child(22, 1647, 399, 163);
  1777. tab.child(23, 1648, 399, 58+146);
  1778. tab.child(24, 1649, 26+22+297-2, 110-44+118-13+5);
  1779. tab.child(25, 1650, 321+22, 58+154);
  1780. tab.child(26, 1651, 321+134, 58+118);
  1781. tab.child(27, 1652, 321+134, 58+154);
  1782. tab.child(28, 1653, 321+48, 58+81);
  1783. tab.child(29, 1654, 321+107, 58+81);
  1784. tab.child(30, 1655, 321+58, 58+42);
  1785. tab.child(31, 1656, 321+112, 58+41);
  1786. tab.child(32, 1657, 321+78, 58+4);
  1787. tab.child(33, 1658, 321+37, 58+43);
  1788. tab.child(34, 1659, 321+78, 58+43);
  1789. tab.child(35, 1660, 321+119, 58+43);
  1790. tab.child(36, 1661, 321+22, 58+82);
  1791. tab.child(37, 1662, 321+78, 58+82);
  1792. tab.child(38, 1663, 321+134, 58+82);
  1793. tab.child(39, 1664, 321+78, 58+122);
  1794. tab.child(40, 1665, 321+78, 58+162);
  1795. tab.child(41, 1666, 321+22, 58+162);
  1796. tab.child(42, 1667, 321+134, 58+162);
  1797. tab.child(43, 1688, 50+297-2, 110-13+5);
  1798. for(int i = 1675; i <= 1684; i++){
  1799. RSInterface rsi = interfaceCache[i];
  1800. rsi.textColor = 0xe4a146;
  1801. rsi.centerText = false; }
  1802. for(int i = 1686; i <= 1687; i++) {
  1803. RSInterface rsi = interfaceCache[i];
  1804. rsi.textColor = 0xe4a146;
  1805. rsi.centerText = false; }
  1806. }
  1807.  
  1808. public static void addChar(int ID) {
  1809. RSInterface t = interfaceCache[ID] = new RSInterface();
  1810. t.id = ID;
  1811. t.parentID = ID;
  1812. t.type = 6;
  1813. t.atActionType = 0;
  1814. t.contentType = 328;
  1815. t.width = 136;
  1816. t.height = 168;
  1817. t.aByte254 = 0;
  1818. t.mOverInterToTrigger = 0;
  1819. t.modelZoom = 560;
  1820. t.modelRotation1 = 150;
  1821. t.modelRotation2 = 0;
  1822. t.anInt257 = -1;
  1823. t.anInt258 = -1;
  1824. }
  1825.  
  1826. private static Sprite LoadLunarSprite(int i, String s) {
  1827. Sprite sprite = imageLoader(i,"/Lunar/" + s);
  1828. return sprite;
  1829. }
  1830. private static Sprite LoadSprite(int i, String s) {
  1831. long l = (TextClass.method585(s) << 8) + (long) i;
  1832. Sprite sprite = (Sprite) aMRUNodes_238.insertFromCache(l);
  1833. if (sprite != null) {
  1834. return sprite;
  1835. }
  1836. try {
  1837. sprite = new Sprite("./Sprites/"+s+" "+i+".PNG");
  1838. aMRUNodes_238.removeFromCache(sprite, l);
  1839. } catch (Exception exception) {
  1840. System.out.println(exception);
  1841. return null;
  1842. }
  1843. return sprite;
  1844. }
  1845.  
  1846. public static void addLunarSprite(int i, int j, String name) {
  1847. RSInterface RSInterface = addInterface(i);
  1848. RSInterface.id = i;
  1849. RSInterface.parentID = i;
  1850. RSInterface.type = 5;
  1851. RSInterface.atActionType = 0;
  1852. RSInterface.drawsTransparent = true;
  1853. //RSInterface.transAmount = 230;
  1854. RSInterface.contentType = 0;
  1855. RSInterface.aByte254 = 0;
  1856. RSInterface.mOverInterToTrigger = 52;
  1857. RSInterface.sprite1 = imageLoader(j, name);
  1858. RSInterface.width = 500;
  1859. RSInterface.height = 500;
  1860. RSInterface.tooltip = "";
  1861. }
  1862.  
  1863. public static void drawRune(int i,int id, String runeName) {
  1864. RSInterface RSInterface = addInterface(i);
  1865. RSInterface.type = 5;
  1866. RSInterface.atActionType = 0;
  1867. RSInterface.contentType = 0;
  1868. RSInterface.aByte254 = 0;
  1869. RSInterface.mOverInterToTrigger = 52;
  1870. RSInterface.sprite1 = imageLoader(id, "Lunar/RUNE");
  1871. RSInterface.width = 500;
  1872. RSInterface.height = 500;
  1873. }
  1874.  
  1875. public static void addRuneText(int ID, int runeAmount, int RuneID, TextDrawingArea[] font){
  1876. RSInterface rsInterface = addInterface(ID);
  1877. rsInterface.id = ID;
  1878. rsInterface.parentID = 1151;
  1879. rsInterface.type = 4;
  1880. rsInterface.atActionType = 0;
  1881. rsInterface.contentType = 0;
  1882. rsInterface.width = 0;
  1883. rsInterface.height = 14;
  1884. rsInterface.aByte254 = 0;
  1885. rsInterface.mOverInterToTrigger= -1;
  1886. rsInterface.anIntArray245 = new int[1];
  1887. rsInterface.anIntArray212 = new int[1];
  1888. rsInterface.anIntArray245[0] = 3;
  1889. rsInterface.anIntArray212[0] = runeAmount;
  1890. rsInterface.valueIndexArray = new int[1][4];
  1891. rsInterface.valueIndexArray[0][0] = 4;
  1892. rsInterface.valueIndexArray[0][1] = 3214;
  1893. rsInterface.valueIndexArray[0][2] = RuneID;
  1894. rsInterface.valueIndexArray[0][3] = 0;
  1895. rsInterface.centerText = true;
  1896. rsInterface.textDrawingAreas = font[0];
  1897. rsInterface.textShadow = true;
  1898. rsInterface.message = "%1/"+runeAmount+"";
  1899. rsInterface.aString228 = "";
  1900. rsInterface.textColor = 12582912;
  1901. rsInterface.anInt219 = 49152;
  1902. }
  1903.  
  1904. public static void homeTeleport(){
  1905. RSInterface RSInterface = addInterface(30000);
  1906. RSInterface.tooltip = "Cast @gre@Lunar Home Teleport";
  1907. RSInterface.id = 30000;
  1908. RSInterface.parentID = 30000;
  1909. RSInterface.type = 5;
  1910. RSInterface.atActionType = 5;
  1911. RSInterface.contentType = 0;
  1912. RSInterface.aByte254 = 0;
  1913. RSInterface.mOverInterToTrigger = 30001;
  1914. RSInterface.sprite1 = imageLoader(1, "Lunar/SPRITE");
  1915. RSInterface.width = 20;
  1916. RSInterface.height = 20;
  1917. RSInterface Int = addInterface(30001);
  1918. Int.isMouseoverTriggered = true;
  1919. Int.mOverInterToTrigger = -1;
  1920. setChildren(1, Int);
  1921. addLunarSprite(30002, 0, "SPRITE");
  1922. setBounds(30002, 0, 0,0, Int);
  1923. }
  1924. public static void addLunar2RunesSmallBox(int ID, int r1, int r2, int ra1, int ra2,int rune1, int lvl,String name, String descr,TextDrawingArea[] TDA,int sid,int suo,int type){
  1925. RSInterface rsInterface = addInterface(ID);
  1926. rsInterface.id = ID;
  1927. rsInterface.parentID = 1151;
  1928. rsInterface.type = 5;
  1929. rsInterface.atActionType = type;
  1930. rsInterface.contentType = 0;
  1931. rsInterface.mOverInterToTrigger = ID+1;
  1932. rsInterface.spellUsableOn = suo;
  1933. rsInterface.selectedActionName = "Cast On";
  1934. rsInterface.width = 20;
  1935. rsInterface.height = 20;
  1936. rsInterface.tooltip = "Cast @gre@"+name;
  1937. rsInterface.spellName = name;
  1938. rsInterface.anIntArray245 = new int[3];
  1939. rsInterface.anIntArray212 = new int[3];
  1940. rsInterface.anIntArray245[0] = 3;
  1941. rsInterface.anIntArray212[0] = ra1;
  1942. rsInterface.anIntArray245[1] = 3;
  1943. rsInterface.anIntArray212[1] = ra2;
  1944. rsInterface.anIntArray245[2] = 3;
  1945. rsInterface.anIntArray212[2] = lvl;
  1946. rsInterface.valueIndexArray = new int[3][];
  1947. rsInterface.valueIndexArray[0] = new int[4];
  1948. rsInterface.valueIndexArray[0][0] = 4;
  1949. rsInterface.valueIndexArray[0][1] = 3214;
  1950. rsInterface.valueIndexArray[0][2] = r1;
  1951. rsInterface.valueIndexArray[0][3] = 0;
  1952. rsInterface.valueIndexArray[1] = new int[4];
  1953. rsInterface.valueIndexArray[1][0] = 4;
  1954. rsInterface.valueIndexArray[1][1] = 3214;
  1955. rsInterface.valueIndexArray[1][2] = r2;
  1956. rsInterface.valueIndexArray[1][3] = 0;
  1957. rsInterface.valueIndexArray[2] = new int[3];
  1958. rsInterface.valueIndexArray[2][0] = 1;
  1959. rsInterface.valueIndexArray[2][1] = 6;
  1960. rsInterface.valueIndexArray[2][2] = 0;
  1961. rsInterface.sprite2 = imageLoader(sid, "Lunar/LUNARON");
  1962. rsInterface.sprite1 = imageLoader(sid, "Lunar/LUNAROFF");
  1963. RSInterface INT = addInterface(ID+1);
  1964. INT.isMouseoverTriggered = true;
  1965. INT.mOverInterToTrigger = -1;
  1966. setChildren(7, INT);
  1967. addLunarSprite(ID+2, 0, "Lunar/BOX");
  1968. setBounds(ID+2, 0, 0, 0, INT);
  1969. addText(ID+3, "Level "+(lvl+1)+": "+name, 0xFF981F, true, true, 52, TDA, 1);
  1970. setBounds(ID+3, 90, 4, 1, INT);
  1971. addText(ID+4, descr, 0xAF6A1A, true, true, 52, TDA, 0);
  1972. setBounds(ID+4, 90, 19, 2, INT);
  1973. setBounds(30016, 37, 35, 3, INT);//Rune
  1974. setBounds(rune1, 112, 35, 4, INT);//Rune
  1975. addRuneText(ID+5, ra1+1, r1, TDA);
  1976. setBounds(ID+5, 50, 66, 5, INT);
  1977. addRuneText(ID+6, ra2+1, r2, TDA);
  1978. setBounds(ID+6, 123, 66, 6, INT);
  1979.  
  1980. }
  1981.  
  1982. public static void addLunar3RunesSmallBox(int ID, int r1, int r2, int r3, int ra1, int ra2, int ra3,int rune1, int rune2, int lvl,String name, String descr,TextDrawingArea[] TDA, int sid,int suo,int type){
  1983. RSInterface rsInterface = addInterface(ID);
  1984. rsInterface.id = ID;
  1985. rsInterface.parentID = 1151;
  1986. rsInterface.type = 5;
  1987. rsInterface.atActionType = type;
  1988. rsInterface.contentType = 0;
  1989. rsInterface.mOverInterToTrigger = ID+1;
  1990. rsInterface.spellUsableOn = suo;
  1991. rsInterface.selectedActionName = "Cast on";
  1992. rsInterface.width = 20;
  1993. rsInterface.height = 20;
  1994. rsInterface.tooltip = "Cast @gre@"+name;
  1995. rsInterface.spellName = name;
  1996. rsInterface.anIntArray245 = new int[4];
  1997. rsInterface.anIntArray212 = new int[4];
  1998. rsInterface.anIntArray245[0] = 3;
  1999. rsInterface.anIntArray212[0] = ra1;
  2000. rsInterface.anIntArray245[1] = 3;
  2001. rsInterface.anIntArray212[1] = ra2;
  2002. rsInterface.anIntArray245[2] = 3;
  2003. rsInterface.anIntArray212[2] = ra3;
  2004. rsInterface.anIntArray245[3] = 3;
  2005. rsInterface.anIntArray212[3] = lvl;
  2006. rsInterface.valueIndexArray = new int[4][];
  2007. rsInterface.valueIndexArray[0] = new int[4];
  2008. rsInterface.valueIndexArray[0][0] = 4;
  2009. rsInterface.valueIndexArray[0][1] = 3214;
  2010. rsInterface.valueIndexArray[0][2] = r1;
  2011. rsInterface.valueIndexArray[0][3] = 0;
  2012. rsInterface.valueIndexArray[1] = new int[4];
  2013. rsInterface.valueIndexArray[1][0] = 4;
  2014. rsInterface.valueIndexArray[1][1] = 3214;
  2015. rsInterface.valueIndexArray[1][2] = r2;
  2016. rsInterface.valueIndexArray[1][3] = 0;
  2017. rsInterface.valueIndexArray[2] = new int[4];
  2018. rsInterface.valueIndexArray[2][0] = 4;
  2019. rsInterface.valueIndexArray[2][1] = 3214;
  2020. rsInterface.valueIndexArray[2][2] = r3;
  2021. rsInterface.valueIndexArray[2][3] = 0;
  2022. rsInterface.valueIndexArray[3] = new int[3];
  2023. rsInterface.valueIndexArray[3][0] = 1;
  2024. rsInterface.valueIndexArray[3][1] = 6;
  2025. rsInterface.valueIndexArray[3][2] = 0;
  2026. rsInterface.sprite2 = imageLoader(sid, "Lunar/LUNARON");
  2027. rsInterface.sprite1 = imageLoader(sid, "Lunar/LUNAROFF");
  2028. RSInterface INT = addInterface(ID+1);
  2029. INT.isMouseoverTriggered = true;
  2030. INT.mOverInterToTrigger = -1;
  2031. setChildren(9, INT);
  2032. addLunarSprite(ID+2, 0, "Lunar/BOX");
  2033. setBounds(ID+2, 0, 0, 0, INT);
  2034. addText(ID+3, "Level "+(lvl+1)+": "+name, 0xFF981F, true, true, 52, TDA, 1);setBounds(ID+3, 90, 4, 1, INT);
  2035. addText(ID+4, descr, 0xAF6A1A, true, true, 52, TDA, 0); setBounds(ID+4, 90, 19, 2, INT);
  2036. setBounds(30016, 14, 35, 3, INT);
  2037. setBounds(rune1, 74, 35, 4, INT);
  2038. setBounds(rune2, 130, 35, 5, INT);
  2039. addRuneText(ID+5, ra1+1, r1, TDA);
  2040. setBounds(ID+5, 26, 66, 6, INT);
  2041. addRuneText(ID+6, ra2+1, r2, TDA);
  2042. setBounds(ID+6, 87, 66, 7, INT);
  2043. addRuneText(ID+7, ra3+1, r3, TDA);
  2044. setBounds(ID+7, 142, 66, 8, INT);
  2045. }
  2046.  
  2047. public static void addLunar3RunesBigBox(int ID, int r1, int r2, int r3, int ra1, int ra2, int ra3,int rune1, int rune2, int lvl,String name, String descr,TextDrawingArea[] TDA, int sid,int suo,int type){
  2048. RSInterface rsInterface = addInterface(ID);
  2049. rsInterface.id = ID;
  2050. rsInterface.parentID = 1151;
  2051. rsInterface.type = 5;
  2052. rsInterface.atActionType = type;
  2053. rsInterface.contentType = 0;
  2054. rsInterface.mOverInterToTrigger = ID+1;
  2055. rsInterface.spellUsableOn = suo;
  2056. rsInterface.selectedActionName = "Cast on";
  2057. rsInterface.width = 20;
  2058. rsInterface.height = 20;
  2059. rsInterface.tooltip = "Cast @gre@"+name;
  2060. rsInterface.spellName = name;
  2061. rsInterface.anIntArray245 = new int[4];
  2062. rsInterface.anIntArray212 = new int[4];
  2063. rsInterface.anIntArray245[0] = 3;
  2064. rsInterface.anIntArray212[0] = ra1;
  2065. rsInterface.anIntArray245[1] = 3;
  2066. rsInterface.anIntArray212[1] = ra2;
  2067. rsInterface.anIntArray245[2] = 3;
  2068. rsInterface.anIntArray212[2] = ra3;
  2069. rsInterface.anIntArray245[3] = 3;
  2070. rsInterface.anIntArray212[3] = lvl;
  2071. rsInterface.valueIndexArray = new int[4][];
  2072. rsInterface.valueIndexArray[0] = new int[4];
  2073. rsInterface.valueIndexArray[0][0] = 4;
  2074. rsInterface.valueIndexArray[0][1] = 3214;
  2075. rsInterface.valueIndexArray[0][2] = r1;
  2076. rsInterface.valueIndexArray[0][3] = 0;
  2077. rsInterface.valueIndexArray[1] = new int[4];
  2078. rsInterface.valueIndexArray[1][0] = 4;
  2079. rsInterface.valueIndexArray[1][1] = 3214;
  2080. rsInterface.valueIndexArray[1][2] = r2;
  2081. rsInterface.valueIndexArray[1][3] = 0;
  2082. rsInterface.valueIndexArray[2] = new int[4];
  2083. rsInterface.valueIndexArray[2][0] = 4;
  2084. rsInterface.valueIndexArray[2][1] = 3214;
  2085. rsInterface.valueIndexArray[2][2] = r3;
  2086. rsInterface.valueIndexArray[2][3] = 0;
  2087. rsInterface.valueIndexArray[3] = new int[3];
  2088. rsInterface.valueIndexArray[3][0] = 1;
  2089. rsInterface.valueIndexArray[3][1] = 6;
  2090. rsInterface.valueIndexArray[3][2] = 0;
  2091. rsInterface.sprite2 = imageLoader(sid, "Lunar/LUNARON");
  2092. rsInterface.sprite1 = imageLoader(sid, "Lunar/LUNAROFF");
  2093. RSInterface INT = addInterface(ID+1);
  2094. INT.isMouseoverTriggered = true;
  2095. INT.mOverInterToTrigger = -1;
  2096. setChildren(9, INT);
  2097. addLunarSprite(ID+2, 1, "Lunar/BOX");
  2098. setBounds(ID+2, 0, 0, 0, INT);
  2099. addText(ID+3, "Level "+(lvl+1)+": "+name, 0xFF981F, true, true, 52, TDA, 1);setBounds(ID+3, 90, 4, 1, INT);
  2100. addText(ID+4, descr, 0xAF6A1A, true, true, 52, TDA, 0); setBounds(ID+4, 90, 21, 2, INT);
  2101. setBounds(30016, 14, 48, 3, INT);
  2102. setBounds(rune1, 74, 48, 4, INT);
  2103. setBounds(rune2, 130, 48, 5, INT);
  2104. addRuneText(ID+5, ra1+1, r1, TDA);
  2105. setBounds(ID+5, 26, 79, 6, INT);
  2106. addRuneText(ID+6, ra2+1, r2, TDA);
  2107. setBounds(ID+6, 87, 79, 7, INT);
  2108. addRuneText(ID+7, ra3+1, r3, TDA);
  2109. setBounds(ID+7, 142, 79, 8, INT);
  2110. }
  2111.  
  2112. public static void addLunar3RunesLargeBox(int ID, int r1, int r2, int r3, int ra1, int ra2, int ra3,int rune1, int rune2, int lvl,String name, String descr,TextDrawingArea[] TDA, int sid,int suo,int type){
  2113. RSInterface rsInterface = addInterface(ID);
  2114. rsInterface.id = ID;
  2115. rsInterface.parentID = 1151;
  2116. rsInterface.type = 5;
  2117. rsInterface.atActionType = type;
  2118. rsInterface.contentType = 0;
  2119. rsInterface.mOverInterToTrigger = ID+1;
  2120. rsInterface.spellUsableOn = suo;
  2121. rsInterface.selectedActionName = "Cast on";
  2122. rsInterface.width = 20;
  2123. rsInterface.height = 20;
  2124. rsInterface.tooltip = "Cast @gre@"+name;
  2125. rsInterface.spellName = name;
  2126. rsInterface.anIntArray245 = new int[4];
  2127. rsInterface.anIntArray212 = new int[4];
  2128. rsInterface.anIntArray245[0] = 3;
  2129. rsInterface.anIntArray212[0] = ra1;
  2130. rsInterface.anIntArray245[1] = 3;
  2131. rsInterface.anIntArray212[1] = ra2;
  2132. rsInterface.anIntArray245[2] = 3;
  2133. rsInterface.anIntArray212[2] = ra3;
  2134. rsInterface.anIntArray245[3] = 3;
  2135. rsInterface.anIntArray212[3] = lvl;
  2136. rsInterface.valueIndexArray = new int[4][];
  2137. rsInterface.valueIndexArray[0] = new int[4];
  2138. rsInterface.valueIndexArray[0][0] = 4;
  2139. rsInterface.valueIndexArray[0][1] = 3214;
  2140. rsInterface.valueIndexArray[0][2] = r1;
  2141. rsInterface.valueIndexArray[0][3] = 0;
  2142. rsInterface.valueIndexArray[1] = new int[4];
  2143. rsInterface.valueIndexArray[1][0] = 4;
  2144. rsInterface.valueIndexArray[1][1] = 3214;
  2145. rsInterface.valueIndexArray[1][2] = r2;
  2146. rsInterface.valueIndexArray[1][3] = 0;
  2147. rsInterface.valueIndexArray[2] = new int[4];
  2148. rsInterface.valueIndexArray[2][0] = 4;
  2149. rsInterface.valueIndexArray[2][1] = 3214;
  2150. rsInterface.valueIndexArray[2][2] = r3;
  2151. rsInterface.valueIndexArray[2][3] = 0;
  2152. rsInterface.valueIndexArray[3] = new int[3];
  2153. rsInterface.valueIndexArray[3][0] = 1;
  2154. rsInterface.valueIndexArray[3][1] = 6;
  2155. rsInterface.valueIndexArray[3][2] = 0;
  2156. rsInterface.sprite2 = imageLoader(sid, "Lunar/LUNARON");
  2157. rsInterface.sprite1 = imageLoader(sid, "Lunar/LUNAROFF");
  2158. RSInterface INT = addInterface(ID+1);
  2159. INT.isMouseoverTriggered = true;
  2160. INT.mOverInterToTrigger = -1;
  2161. setChildren(9, INT);
  2162. addLunarSprite(ID+2, 2, "Lunar/BOX");
  2163. setBounds(ID+2, 0, 0, 0, INT);
  2164. addText(ID+3, "Level "+(lvl+1)+": "+name, 0xFF981F, true, true, 52, TDA, 1);
  2165. setBounds(ID+3, 90, 4, 1, INT);
  2166. addText(ID+4, descr, 0xAF6A1A, true, true, 52, TDA, 0);
  2167. setBounds(ID+4, 90, 34, 2, INT);
  2168. setBounds(30016, 14, 61, 3, INT);
  2169. setBounds(rune1, 74, 61, 4, INT);
  2170. setBounds(rune2, 130, 61, 5, INT);
  2171. addRuneText(ID+5, ra1+1, r1, TDA);
  2172. setBounds(ID+5, 26, 92, 6, INT);
  2173. addRuneText(ID+6, ra2+1, r2, TDA);
  2174. setBounds(ID+6, 87, 92, 7, INT);
  2175. addRuneText(ID+7, ra3+1, r3, TDA);
  2176. setBounds(ID+7, 142, 92, 8, INT);
  2177. }
  2178. public static void setChildren(int total,RSInterface i){
  2179. i.children = new int[total];
  2180. i.childX = new int[total];
  2181. i.childY = new int[total];
  2182. }
  2183. public static void configureLunar(TextDrawingArea[] TDA){
  2184. homeTeleport();
  2185. drawRune(30003,1, "Fire");
  2186. drawRune(30004,2, "Water");
  2187. drawRune(30005,3, "Air");
  2188. drawRune(30006,4, "Earth");
  2189. drawRune(30007,5, "Mind");
  2190. drawRune(30008,6, "Body");
  2191. drawRune(30009,7, "Death");
  2192. drawRune(30010,8, "Nature");
  2193. drawRune(30011,9, "Chaos");
  2194. drawRune(30012,10, "Law");
  2195. drawRune(30013,11, "Cosmic");
  2196. drawRune(30014,12, "Blood");
  2197. drawRune(30015,13, "Soul");
  2198. drawRune(30016,14, "Astral");
  2199. addLunar3RunesSmallBox(30017, 553, 554, 555, 0, 4, 3, 30003, 30004, 64, "Bake Pie","Bake pies without a stove",TDA,0, 16,2);
  2200. addLunar2RunesSmallBox(30025, 553, 557, 0, 7, 30006, 65,"Cure Plant", "Cure disease on farming patch",TDA,1, 4,2);
  2201. addLunar3RunesBigBox(30032, 553, 564, 558, 0,0, 0, 30013, 30007, 65,"Monster Examine", "Detect the combat statistics of a\\nmonster",TDA, 2,2,2);
  2202. addLunar3RunesSmallBox(30040, 553, 564, 556, 0, 0, 1, 30013, 30005, 66, "NPC Contact","Speak with varied NPCs",TDA,3,0,2);
  2203. addLunar3RunesSmallBox(30048, 553, 563, 557, 0, 0, 9, 30012, 30006, 67, "Cure Other","Cure poisoned players",TDA,4,8,2);
  2204. addLunar3RunesSmallBox(30056, 553, 555, 554, 0, 2, 0, 30004, 30003, 67, "Humidify","fills certain vessels with water",TDA,5,0,5);
  2205. addLunar3RunesSmallBox(30064, 0, 0, 0, 0, 0, 0, 30012, 30006, 68, "null","null",TDA,6,0,5);
  2206. addLunar3RunesBigBox(30075, 0, 0, 0, 0, 0, 0, 30012, 30006, 69,"null", "null",TDA, 7,0,5);
  2207. addLunar3RunesSmallBox(30083, 553, 563, 557, 0, 0, 0, 30012, 30006, 70, "null","null",TDA,8,0,5);
  2208. addLunar3RunesSmallBox(30091, 553, 564, 563, 1, 0, 0, 30013, 30012, 70, "Cure Me","Cures Poison",TDA,9,0,5);
  2209. addLunar2RunesSmallBox(30099, 553, 557, 1, 1, 30006, 70,"Hunter Kit", "Get a kit of hunting gear",TDA,10,0,5);
  2210. addLunar3RunesSmallBox(30106, 553, 563, 555, 0, 0,0, 30012, 30004, 71,"null", "null",TDA,11,0,5);
  2211. addLunar3RunesBigBox(30114, 553, 563, 555, 0, 0, 0, 30012, 30004, 72,"null", "null",TDA, 12,0,5);
  2212. addLunar3RunesSmallBox(30122, 553, 564, 563, 1, 1, 1, 30013, 30012, 73, "Cure Group","Cures Poison on players",TDA,13,0,5);
  2213. addLunar3RunesBigBox(30130, 553, 564, 559, 1, 1, 4, 30013, 30008, 74,"Stat Spy", "Cast on another player to see their\\nskill levels",TDA, 14,8,2);
  2214. addLunar3RunesBigBox(30138, 553, 563, 554, 1, 1, 2, 30012, 30003, 74,"blank", "Nothing currently.",TDA, 15,0,5);
  2215. addLunar3RunesBigBox(30146, 553, 563, 554, 1, 1, 5, 30012, 30003, 75,"blank", "nothing currently",TDA, 16,0,5);
  2216. addLunar3RunesSmallBox(30154, 553, 554, 556, 1, 5, 9, 30003, 30005, 76, "Superglass Make","Make glass without a furnace",TDA,17, 16,2);
  2217. addLunar3RunesSmallBox(30162, 553, 563, 555, 1, 1, 3, 30012, 30004, 77, "Blank","nothing currently",TDA,18,0,5);
  2218. addLunar3RunesSmallBox(30170, 553, 563, 555, 1, 1, 7, 30012, 30004, 78, "Blank","nothing currently",TDA,19,0,5);
  2219. addLunar3RunesBigBox(30178, 553, 564, 559, 1, 0, 4, 30013, 30008, 78,"Dream", "Take a rest and restore hitpoints 3\\n times faster",TDA, 20,0,5);
  2220. addLunar3RunesSmallBox(30186, 553, 557, 555, 1, 9, 4, 30006, 30004, 79, "String Jewellery","String amulets without wool",TDA,21,0,5);
  2221. addLunar3RunesLargeBox(30194, 553, 557, 555, 1, 9, 9, 30006, 30004, 80,"Stat Restore Pot\\nShare", "Share a potion with up to 4 nearby\\nplayers",TDA, 22,0,5);
  2222. addLunar3RunesSmallBox(30202, 553, 554, 555, 1, 6, 6, 30003, 30004, 81, "Magic Imbue","Combine runes without a talisman",TDA,23,0,5);
  2223. addLunar3RunesBigBox(30210, 553, 561, 557, 2, 1, 14, 30010, 30006, 82,"Fertile Soil", "Fertilise a farming patch with super\\ncompost",TDA, 24, 4,2);
  2224. addLunar3RunesBigBox(30218, 553, 557, 555, 2, 11, 9, 30006, 30004, 83,"Boost Potion Share", "Shares a potion with up to 4 nearby\\nplayers",TDA, 25, 0,5);
  2225. addLunar3RunesSmallBox(30226, 553, 563, 555, 2, 2, 9, 30012, 30004, 84, "blank","nothing currently",TDA,26,0,5);
  2226. addLunar3RunesLargeBox(30234, 553, 563, 555, 1, 2, 13, 30012, 30004, 85, "blank", "nothing currently",TDA, 27,0,5);
  2227. addLunar3RunesSmallBox(30242, 553, 557, 561, 2, 14, 0, 30006, 30010, 85, "Plank Make","Turn Logs into planks",TDA,28,16,5);
  2228. addLunar3RunesSmallBox(30250, 553, 563, 555, 2, 2, 9, 30012, 30004, 86, "blank","nothing currently",TDA,29,0,5);//END
  2229. addLunar3RunesSmallBox(30258, 553, 563, 555, 2, 2, 14, 30012, 30004, 87, "blank","nothing currently",TDA,30,0,5);
  2230. addLunar3RunesSmallBox(30266, 553, 563, 555, 2, 2, 7, 30012, 30004, 88, "blank","nothing currently",TDA,31,0,5);
  2231. addLunar3RunesBigBox(30274, 553, 563, 555, 2, 2, 15, 30012, 30004, 89, "blank","nothing currently",TDA,32,0,5);
  2232. addLunar3RunesBigBox(30282, 553, 563, 561, 2, 1, 0, 30012, 30010, 90, "Energy Transfer","Spend hitpoints and SA Energy to\\n give another player hitpoints and run energy",TDA,33,8,2);
  2233. addLunar3RunesBigBox(30290, 553, 563, 565, 2, 2, 0, 30012, 30014, 91, "Heal Other","Transfer up to 75% of hitpoints\\n to another player",TDA,34,8,2);
  2234. addLunar3RunesBigBox(30298, 553, 560, 557, 2, 1, 9, 30009, 30006, 92, "Vengeance Other","Allows another player to rebound\\ndamage to an opponent",TDA,35,8,2);
  2235. addLunar3RunesSmallBox(30306, 9075, 560, 557, 3, 1, 9,30009, 30006, 93, "Vengeance","Rebound damage to an opponent",TDA,36,0,5);
  2236. addLunar3RunesBigBox(30314, 553, 565, 563, 3, 2, 5, 30014, 30012, 94, "Heal Group","Transfer up to 75% of hitpoints to a group",TDA,37,0,5);
  2237. addLunar3RunesBigBox(30322, 553, 564, 563, 2, 1, 0, 30013, 30012, 95, "Spellbook Swap","Change to another spellbook for 1\\nspell cast",TDA,38,0,5);
  2238. }
  2239.  
  2240. public static void constructLunar(){
  2241. RSInterface Interface = addInterface(29999);
  2242. setChildren(71, Interface);
  2243. setBounds(30000, 11, 10, 0, Interface);
  2244. setBounds(30017, 40, 9, 1, Interface);
  2245. setBounds(30025, 71, 12, 2, Interface);
  2246. setBounds(30032, 103, 10, 3, Interface);
  2247. setBounds(30040, 135, 12, 4, Interface);
  2248. setBounds(30048, 165, 10, 5, Interface);
  2249. setBounds(30056, 8, 38, 6, Interface);
  2250. setBounds(30064, 39, 39, 7, Interface);
  2251. setBounds(30075, 71, 39, 8, Interface);
  2252. setBounds(30083, 103, 39, 9, Interface);
  2253. setBounds(30091, 135, 39, 10, Interface);
  2254. setBounds(30099, 165, 37, 11, Interface);
  2255. setBounds(30106, 12, 68, 12, Interface);
  2256. setBounds(30114, 42, 68, 13, Interface);
  2257. setBounds(30122, 71, 68, 14, Interface);
  2258. setBounds(30130, 103, 68, 15, Interface);
  2259. setBounds(30138, 135, 68, 16, Interface);
  2260. setBounds(30146, 165, 68, 17, Interface);
  2261. setBounds(30154, 14, 97, 18, Interface);
  2262. setBounds(30162, 42, 97, 19, Interface);
  2263. setBounds(30170, 71, 97, 20, Interface);
  2264. setBounds(30178, 101, 97, 21, Interface);
  2265. setBounds(30186, 135, 98, 22, Interface);
  2266. setBounds(30194, 168, 98, 23, Interface);
  2267. setBounds(30202, 11, 125, 24, Interface);
  2268. setBounds(30210, 42, 124, 25, Interface);
  2269. setBounds(30218, 74, 125, 26, Interface);
  2270. setBounds(30226, 103, 125, 27, Interface);
  2271. setBounds(30234, 135, 125, 28, Interface);
  2272. setBounds(30242, 164, 126, 29, Interface);
  2273. setBounds(30250, 10, 155, 30, Interface);
  2274. setBounds(30258, 42, 155, 31, Interface);
  2275. setBounds(30266, 71, 155, 32, Interface);
  2276. setBounds(30274, 103, 155, 33, Interface);
  2277. setBounds(30282, 136, 155, 34, Interface);
  2278. setBounds(30290, 165, 155, 35, Interface);
  2279. setBounds(30298, 13, 185, 36, Interface);
  2280. setBounds(30306, 42, 185, 37, Interface);
  2281. setBounds(30314, 71, 184, 38, Interface);
  2282. setBounds(30322, 104, 184, 39, Interface);
  2283. setBounds(30001, 6, 184, 40, Interface);//hover
  2284. setBounds(30018, 5, 176, 41, Interface);//hover
  2285. setBounds(30026, 5, 176, 42, Interface);//hover
  2286. setBounds(30033, 5, 163, 43, Interface);//hover
  2287. setBounds(30041, 5, 176, 44, Interface);//hover
  2288. setBounds(30049, 5, 176, 45, Interface);//hover
  2289. setBounds(30057, 5, 176, 46, Interface);//hover
  2290. setBounds(30065, 5, 176, 47, Interface);//hover
  2291. setBounds(30076, 5, 163, 48, Interface);//hover
  2292. setBounds(30084, 5, 176, 49, Interface);//hover
  2293. setBounds(30092, 5, 176, 50, Interface);//hover
  2294. setBounds(30100, 5, 176, 51, Interface);//hover
  2295. setBounds(30107, 5, 176, 52, Interface);//hover
  2296. setBounds(30115, 5, 163, 53, Interface);//hover
  2297. setBounds(30123, 5, 176, 54, Interface);//hover
  2298. setBounds(30131, 5, 163, 55, Interface);//hover
  2299. setBounds(30139, 5, 163, 56, Interface);//hover
  2300. setBounds(30147, 5, 163, 57, Interface);//hover
  2301. setBounds(30155, 5, 176, 58, Interface);//hover
  2302. setBounds(30163, 5, 176, 59, Interface);//hover
  2303. setBounds(30171, 5, 176, 60, Interface);//hover
  2304. setBounds(30179, 5, 163, 61, Interface);//hover
  2305. setBounds(30187, 5, 176, 62, Interface);//hover
  2306. setBounds(30195, 5, 149, 63, Interface);//hover
  2307. setBounds(30203, 5, 176, 64, Interface);//hover
  2308. setBounds(30211, 5, 163, 65, Interface);//hover
  2309. setBounds(30219, 5, 163, 66, Interface);//hover
  2310. setBounds(30227, 5, 176, 67, Interface);//hover
  2311. setBounds(30235, 5, 149, 68, Interface);//hover
  2312. setBounds(30243, 5, 176, 69, Interface);//hover
  2313. setBounds(30251, 5, 176, 70, Interface);//hover
  2314. }
  2315.  
  2316.  
  2317.  
  2318.  
  2319. public static void setBounds(int ID, int X, int Y, int frame, RSInterface RSinterface){
  2320. RSinterface.children[frame] = ID;
  2321. RSinterface.childX[frame] = X;
  2322. RSinterface.childY[frame] = Y;
  2323. }
  2324.  
  2325. public static void addButton(int i, int j, String name, int W, int H, String S, int AT) {
  2326. RSInterface RSInterface = addInterface(i);
  2327. RSInterface.id = i;
  2328. RSInterface.parentID = i;
  2329. RSInterface.type = 5;
  2330. RSInterface.atActionType = AT;
  2331. RSInterface.contentType = 0;
  2332. RSInterface.aByte254 = 0;
  2333. RSInterface.mOverInterToTrigger = 52;
  2334. RSInterface.sprite1 = imageLoader(j,name);
  2335. RSInterface.sprite2 = imageLoader(j,name);
  2336. RSInterface.width = W;
  2337. RSInterface.height = H;
  2338. RSInterface.tooltip = S;
  2339. }
  2340.  
  2341.  
  2342.  
  2343.  
  2344. }
Advertisement
Add Comment
Please, Sign In to add comment