Advertisement
Guest User

SkillGuides.java

a guest
Apr 30th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.33 KB | None | 0 0
  1. package server.model.players.content;
  2.  
  3. import server.model.players.*;
  4.  
  5. /**
  6. * Skill Guides class. Handles the ingame skill menus.
  7. * @author Fire cape
  8. */
  9. public class SkillGuides {
  10.  
  11. public static void sendSkillInterface(Client client, int id[]) {
  12. client.getOutStream().createFrameVarSizeWord(53);
  13. client.getOutStream().writeWord(8847);
  14. client.getOutStream().writeWord(id.length);
  15. for (int i = 0; i < id.length; i++) {
  16. client.getOutStream().writeByte(1);
  17. if(id[i] > 0) {
  18. client.getOutStream().writeWordBigEndianA(id[i]+1);
  19. } else {
  20. client.getOutStream().writeWordBigEndianA(0);
  21. }
  22. }
  23. client.getOutStream().endFrameVarSizeWord();
  24. client.flushOutStream();
  25. }
  26.  
  27. private static int item[] = new int[31];
  28.  
  29. public static void skillsInterface(Client client, String skill,
  30. int item1ItemId, int item1lvl, String item1lvldef,
  31. int item2ItemId, int item2lvl, String item2lvldef,
  32. int item3ItemId, int item3lvl, String item3lvldef,
  33. int item4ItemId, int item4lvl, String item4lvldef,
  34. int item5ItemId, int item5lvl, String item5lvldef,
  35. int item6ItemId, int item6lvl, String item6lvldef,
  36. int item7ItemId, int item7lvl, String item7lvldef,
  37. int item8ItemId, int item8lvl, String item8lvldef) {
  38.  
  39. client.getPA().sendFrame126("@dre@"+skill, 8716);
  40. for(int i = 0;i<31;i++) {
  41. item[i] = 0;
  42. }
  43. item[0] = item1ItemId;
  44. item[1] = item2ItemId;
  45. item[2] = item3ItemId;
  46. item[3] = item4ItemId;
  47. item[4] = item5ItemId;
  48. item[5] = item6ItemId;
  49. item[6] = item7ItemId;
  50. item[7] = item8ItemId;
  51. if(item1lvl > 0)
  52. client.getPA().sendFrame126(""+item1lvl,8720);
  53. client.getPA().sendFrame126(""+item1lvldef,8760);
  54. if(item2lvl > 0)
  55. client.getPA().sendFrame126(""+item2lvl,8721);
  56. client.getPA().sendFrame126(""+item2lvldef, 8761);
  57. if(item3lvl > 0)
  58. client.getPA().sendFrame126(""+item3lvl,8722);
  59. client.getPA().sendFrame126(""+item3lvldef,8762);
  60. if(item4lvl > 0)
  61. client.getPA().sendFrame126(""+item4lvl,8723);
  62. client.getPA().sendFrame126(""+item4lvldef, 8763);
  63. if(item5lvl > 0)
  64. client.getPA().sendFrame126(""+item5lvl,8724);
  65. client.getPA().sendFrame126(""+item5lvldef, 8764);
  66. if(item6lvl > 0)
  67. client.getPA().sendFrame126(""+item6lvl,8725);
  68. client.getPA().sendFrame126(""+item6lvldef,8765);
  69. if(item7lvl > 0)
  70. client.getPA().sendFrame126(""+item7lvl,8726);
  71. client.getPA().sendFrame126(""+item7lvldef, 8766);
  72. if(item8lvl > 0)
  73. client.getPA().sendFrame126(""+item8lvl,8727);
  74. client.getPA().sendFrame126(""+item8lvldef, 8767);
  75. client.getPA().sendFrame126("",8849);
  76. client.getPA().sendFrame126("Attack",8846);
  77. client.getPA().sendFrame126("Strength",8823);
  78. client.getPA().sendFrame126("Defence",8824);
  79. client.getPA().sendFrame126("Hitpoints",8827);
  80. client.getPA().sendFrame126("Ranged",8837);
  81. client.getPA().sendFrame126("Magic",8840);
  82. client.getPA().sendFrame126("Prayer",8843);
  83. client.getPA().sendFrame126("RuneCraf",8859);
  84. client.getPA().sendFrame126("Agility",8862);
  85. client.getPA().sendFrame126("Herblore",8865);
  86. client.getPA().sendFrame126("Thieving",15303);
  87. client.getPA().sendFrame126("Crafting",15306);
  88. client.getPA().sendFrame126("Slayer",15309);
  89.  
  90. sendSkillInterface(client, item);
  91. client.getPA().showInterface(8714);
  92. }
  93. public static void atkInterface(Client client) {
  94. skillsInterface(client, "Attack",
  95. 1291, 1, "Bronze",
  96. 1293, 1, "Iron",
  97. 1295, 5, "Steel",
  98. 1297, 10, "Black",
  99. 1299, 20, "Mithril",
  100. 1301, 30, "Adamant",
  101. 1303, 40, "Rune",
  102. 1305, 60, "Dragon");
  103. }
  104. public static void strInterface(Client client) {
  105. skillsInterface(client, "Strength",
  106. 3196, 5, "Black halberd",
  107. 3198, 10, "Mithril halberd",
  108. 3200, 15, "Adamant halberd",
  109. 3202, 20, "Rune halberd",
  110. 3204, 30, "Dragon halberd",
  111. 4153, 50, "Granite maul",
  112. 6528, 60, "Tzhaar-Ket-Om",
  113. 4718, 70, "Dharok's greataxe");
  114. }
  115. public static void defInterface(Client client) {
  116. skillsInterface(client, "Defence",
  117. 1139, 1, "Bronze",
  118. 1137, 1, "Iron",
  119. 1141, 5, "Steel",
  120. 1151, 10, "Black",
  121. 1143, 20, "Mithril",
  122. 1145, 30, "Adamant",
  123. 1147, 40, "Rune",
  124. 1149, 60, "Dragon");
  125. }
  126. public static void rangeInterface(Client client) {
  127. skillsInterface(client, "Ranged",
  128. 1129, 1, "Plain Leather",
  129. 1131, 1, "Hard leather",
  130. 1133, 20, "Studded leather",
  131. 1135, 40, "Green d'hide leather",
  132. 2499, 50, "Blue d'hide leather",
  133. 2501, 60, "Red d'hide leather",
  134. 2503, 70, "Black d'hide leather",
  135. 4736, 70, "Karils");
  136. }
  137. public static void prayInterface(Client client) {
  138. skillsInterface(client, "Prayer",
  139. 526, 1, "Bones",
  140. 532, 1, "Big bones",
  141. 534, 1, "Baby dragon bones",
  142. 536, 1, "Dragon bones",
  143. 6729, 1, "Dagannoth bones",
  144. 4812, 1, "Zogre bones",
  145. 4830, 1, "Fayrg bones",
  146. 4832, 1, "Raurg bones");
  147. }
  148. public static void hpInterface(Client client) {
  149. skillsInterface(client, "Hitpoints",
  150. 0, 0, "",
  151. 0, 0, "",
  152. 0, 0, "",
  153. 0, 0, "",
  154. 0, 0, "",
  155. 0, 0, "",
  156. 0, 0, "",
  157. 0, 0, "");
  158. }
  159. public static void mageInterface(Client client) {
  160. skillsInterface(client, "Magic",
  161. 579, 1, "Wizard",
  162. 4089, 40, "Mystic",
  163. 7400, 40, "Enchant",
  164. 3385, 40, "Splitbark",
  165. 6918, 50, "Infinity",
  166. 2412, 60, "God capes and staffs",
  167. 6914, 70, "Mage's book and Master Wand",
  168. 4708, 70, "Ahrims");
  169. }
  170. public static void rcInterface(Client client) {
  171. skillsInterface(client, "Runecrafting",
  172. 6422, 1, "Air runes",
  173. 6436, 2, "Mind runes",
  174. 6438, 20, "Body runes",
  175. 6430, 35, "Chaos runes",
  176. 561, 44, "Nature runes",
  177. 6434, 54, "Law runes",
  178. 6432, 65, "Death runes",
  179. 565, 77, "Blood runes");
  180. }
  181. public static void agilityInterface(Client client) {
  182. skillsInterface(client, "Agility",
  183. 2150, 1, "Gnome stronghold agility course",
  184. 2996, 1, "Low-level agility arena",
  185. 2996, 20, "Medium-level agility arena",
  186. 2996, 40, "High-level agility arena",
  187. 1365, 35, "Barberian outpost agility course",
  188. 4024, 48, "Ape attol agility course",
  189. 964, 52, "Wilderness agility course",
  190. 4170, 60, "Werewolf agility course");
  191. }
  192. public static void herbloreInterface(Client client) {
  193. skillsInterface(client, "Agility",
  194. 221, 3, "Attack Potion",
  195. 235, 5, "Anti-poison Potion",
  196. 225, 12, "Strength Potion",
  197. 223, 22, "Restore Potion",
  198. 1975, 22, "Energy Potion",
  199. 239, 30, "Defence Potion",
  200. 1526, 38, "Prayer Potion",
  201. 221, 45, "Super Attack Potion");
  202. }
  203. public static void thievingInterface(Client client) {
  204. skillsInterface(client, "Thieving",
  205. 3241, 1, "Man",
  206. 3243, 10, "Farmer",
  207. 3245, 25, "Warrior",
  208. 3249, 40, "Guard",
  209. 3251, 53, "Knights of ardogne",
  210. 3255, 70, "Paladin",
  211. 3257, 75, "Gnome",
  212. 3259, 80, "Hero");
  213. }
  214. public static void craftingInterface(Client client) {
  215. skillsInterface(client, "Crafting",
  216. 1059, 1, "Leather",
  217. 1777, 10, "Flax into bow string",
  218. 1097, 20, "Hard leather",
  219. 1065, 57, "Green dragonhide leather",
  220. 2487, 66, "Blue dragonhide leather",
  221. 2489, 73, "Red dragonhide leather",
  222. 2491, 79, "Black dragonhide leather",
  223. 6585, 90, "Onyx amulet");
  224. }
  225. public static void slayerInterface(Client client) {
  226. skillsInterface(client, "Slayer",
  227. 4133, 1, "Crawling hand",
  228. 4134, 10, "Cave crawler",
  229. 4140, 45, "Infernal Mage",
  230. 4144, 60, "Aberrant Spectre",
  231. 4145, 65, "Dust devil",
  232. 4147, 75, "Gargoyle",
  233. 4148, 80, "Nechryael",
  234. 4149, 85, "Abyssal demon");
  235. }
  236. public static void fletchingInterface(Client client) {
  237. skillsInterface(client, "Fletching",
  238. 50, 5, "Normal bows",
  239. 54, 20, "Oak bows",
  240. 60, 35, "Willow bows",
  241. 64, 50, "Maple bows",
  242. 68, 65, "Yew bows",
  243. 892, 75, "Rune arrow",
  244. 72, 80, "Magic shortbow",
  245. 70, 85, "Magic longbow");
  246.  
  247. }
  248. public static void miningInterface(Client client) {
  249. skillsInterface(client, "Mining",
  250. 436, 1, "Tin & Cooper",
  251. 440, 15, "Iron",
  252. 442, 30, "Silver",
  253. 453, 30, "Coal",
  254. 444, 40, "Gold",
  255. 447, 55, "Mithril",
  256. 449, 70, "Adamant",
  257. 451, 85, "Rune");
  258. }
  259. public static void smithingInterface(Client client) {
  260. skillsInterface(client, "Smithing",
  261. 2349, 1, "Bronze",
  262. 2351, 15, "Iron",
  263. 2355, 20, "Silver",
  264. 2353, 30, "Steel",
  265. 2357, 40, "Gold",
  266. 2359, 50, "Mithril",
  267. 2361, 70, "Adamant",
  268. 2363, 85, "Rune");
  269. }
  270. public static void fishingInterface(Client client) {
  271. skillsInterface(client, "Fishing",
  272. 317, 1, "Shrimps",
  273. 335, 20, "Trouts",
  274. 359, 35, "Tunas",
  275. 377, 40, "Lobsters",
  276. 371, 50, "Swordfishes",
  277. 383, 76, "Sharks",
  278. 395, 79, "Sea Turtles",
  279. 389, 81, "Manta rays");
  280. }
  281. public static void cookingInterface(Client client) {
  282. skillsInterface(client, "Cooking",
  283. 315, 1, "Shrimps",
  284. 333, 20, "Trouts",
  285. 361, 30, "Tunas",
  286. 379, 40, "Lobsters",
  287. 373, 50, "Swordfishes",
  288. 385, 76, "Sharks",
  289. 397, 79, "Sea Turtles",
  290. 391, 81, "Manta rays");
  291. }
  292. public static void woodcuttingInterface(Client client) {
  293. skillsInterface(client, "Woodcutting",
  294. 1511, 1, "Normal tree",
  295. 1521, 15, "Oak tree",
  296. 1519, 30, "Willow tree",
  297. 6333, 35, "Teak tree",
  298. 1517, 45, "Maple tree",
  299. 6332, 50, "Mahogany tree",
  300. 1515, 60, "Yews tree",
  301. 6739, 61, "Dragon axe");
  302. }
  303. public static void firemakingInterface(Client client) {
  304. skillsInterface(client, "Firemaking",
  305. 1511, 1, "Tree logs",
  306. 1521, 15, "Oak logs",
  307. 1519, 30, "Willow logs",
  308. 6333, 35, "Teak logs",
  309. 1517, 45, "Maple logs",
  310. 4544, 49, "Bullseye lantern",
  311. 6332, 50, "Mahogany logs",
  312. 1515, 60, "Yew logs");
  313. }
  314. public static void farmingInterface(Client client) {
  315. skillsInterface(client, "Farming",
  316. 5291, 1, "Guam seed",
  317. 5292, 15, "Marrentill seed",
  318. 5293, 20, "Tarromin seed",
  319. 5295, 30, "Ranarr seed",
  320. 5298, 40, "Avanote seed",
  321. 5300, 60, "Snapdragon seed",
  322. 5302, 72, "Lantadyme seed",
  323. 5304, 90, "Torsol seed");
  324. }
  325. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement