Guest User

Untitled

a guest
Apr 23rd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. public enum Emote {
  2.  
  3. YES(2, 855, -1, 3),
  4. NO(3, 856, -1, 2),
  5. BOW(4, 858, -1, 2),
  6. ANGRY(5, 859, -1, 3),
  7. THINK(6, 857, -1, 3),
  8. WAVE(7, 863, -1, 3),
  9. SHRUG(8, 2113, -1, 2),
  10. CHEER(9, 862, -1, 3),
  11. BECKON(10, 864, -1, 3),
  12. LAUGH(12, 861, -1, 3),
  13. JUMPFORJOY(11, 2109, -1, 1),
  14. YAWN(13, 2111, -1, 4),
  15. DANCE(14, 866, -1, 7),
  16. JIG(15, 2106, -1, 6),
  17. TWIRL(16, 2107, -1, 1),
  18. HEADBANG(17, 2108, -1, 5),
  19. CRY(18, 860, -1, 3),
  20. BLOWKISS(19, 1374, 1702, 3),
  21. PANIC(20, 2105, -1, 2),
  22. RASPBERRY(21, 2110, -1, 3),
  23. CLAP(22, 865, -1, 3),
  24. SALUTE(23, 2112, -1, 1),
  25. GOBLIN_BOW(24, 0X84F, -1, 2),
  26. GOLBIN_SALUTE(25, 0X850, -1, 3),
  27. GLASS_BOX(26, 1131, -1, 3),
  28. ROPE(27, 1130, -1, 5),
  29. LEAN(28, 1129, -1, 5),
  30. GLASS_WALL(29, 1128, -1, 6),
  31. IDEA(33, 4276, 712, 3),
  32. STOMP(31, 4278, 713, 1),
  33. FLAP(32, 4280, -1, 2),
  34. SLAP_HEAD(30, 4275, -1, 1),
  35. ZOMBIE_WALK(34, 3544, -1, 8),
  36. ZOMBIE_DANCE(35, 3543, -1, 6),
  37. ZOMBIE_HAND(36, 7272, 1244, 3),
  38. SCARED(37, 2836, -1, 4),
  39. RABBIT_HOP(38, 6111, -1, 5),
  40. SNOWMAN_DANCE(40, 7531, -1, 4),
  41. AIR_GUITAR(41, 2414, 1537, 6),
  42. SAFETY_FIRST(42, 8770, 1553, 4),
  43. EXPLORE(43, 9990, 1734, 7),
  44. TRICK(44, 10530, 1864, 5),
  45. FREEZE(45, 11044, 1973, 6),
  46. AROUND_THE_WORLD(47, 11542, 2037, 6),
  47. DRAMATIC_POINT(48, 0x3172, 780, 4),
  48. FAINT(49, 14165, -1, 7),
  49. PUPPET_MASTER(50, 0x3A15, 2837, 6),
  50. TASK_MASTER(51, 0x3ABA, 2930, 15);
  51.  
  52. private final int buttonId;
  53. private final int animation;
  54. private final int gfx;
  55. private final int tick;
  56.  
  57. public int getTick() {
  58. return tick;
  59. }
  60. private Emote(int buttonId, int animation, int gfx, int tick) {
  61. this.buttonId = buttonId;
  62. this.animation = animation;
  63. this.gfx = gfx;
  64. this.tick = tick;
  65. }
  66.  
  67. public static Emote forButton(int buttonId) {
  68. for (Emote emote : values()) {
  69. if (emote.buttonId == buttonId)
  70. return emote;
  71. }
  72. return null;
  73. }
  74.  
  75. public static void playEmote(final Player player, int buttonId) {
  76. final Emote emote = forButton(buttonId);
  77. if (emote != null) {
  78. player.doAnimation(emote.animation);
  79. player.doGraphics(emote.gfx);
  80. doingEmote = true;
  81. player.registerTick(new Tick(null, emote.getTick()) {
  82. @Override
  83. public boolean execute() {
  84. doingEmote = false;
  85. return false;
  86. }
  87. });
  88. }
  89. }
  90. }
  91.  
  92. public static int[][] skillcape = {
  93. {9747, 4959, 823, 5}, {10639, 4959, 823, 5}, {9748, 4959, 823, 5},//Attack
  94. {9753, 4961, 824, 16}, {10641, 4961, 824, 16}, {9754, 4961, 824, 16},//Defense
  95. {9750, 4981, 828, 6}, {10640, 4981, 828, 6}, {9751, 4981, 828, 6},//Strength
  96. {9768, 14242, 2745, 7}, {10647, 14242, 2745, 7}, {9769, 14242, 2745, 7},//Constitution
  97. {9756, 4973, 832, 8}, {10642, 4973, 832, 8}, {9757, 4973, 832, 8},//Ranged
  98. {9762, 4939, 813, 5}, {10644, 4939, 813, 5}, {9763, 4939, 813, 5},//Magic
  99. {9759, 4979, 829, 10}, {10643, 4979, 829, 10}, {9760, 4979, 829, 10},//Prayer
  100. {9801, 4955, 821, 23}, {10658, 4955, 821, 23}, {9802, 4955, 821, 23},//Cooking
  101. {9807, 4957, 822, 19}, {10660, 4957, 822, 19}, {9808, 4957, 822, 19},//Woodcutting
  102. {9783, 4937, 812, 12}, {10652, 4937, 812, 12}, {9784, 4937, 812, 12},//Fletching
  103. {9798, 4951, 819, 11}, {10657, 4951, 819, 11}, {9799, 4951, 819, 11},//Fishing
  104. {9804, 4975, 831, 8}, {10659, 4975, 831, 8}, {9805, 4975, 831, 8},//Firemaking
  105. {9780, 4949, 818, 13}, {10651, 4949, 818, 13}, {9781, 4949, 818, 13},//Crafting
  106. {9795, 4943, 815, 17}, {10656, 4943, 815, 17}, {9796, 4943, 815, 17},//Smithing
  107. {9792, 4941, 814, 6}, {10655, 4941, 814, 6}, {9793, 4941, 814, 6},//Mining
  108. {9774, 4969, 835, 14}, {10649, 4969, 835, 14}, {9775, 4969, 835, 14},//Herblore
  109. {9771, 4977, 830, 7}, {10648, 4977, 830, 7}, {9772, 4977, 830, 7},//Agility
  110. {9777, 4965, 826, 13}, {10650, 4965, 826, 13}, {9778, 4965, 826, 13},//Thieving
  111. {9786, 4967, 1656, 5}, {10653, 4967, 1656, 5}, {9787, 4967, 1656, 5},//Slayer
  112. {9810, 4963, 825, 11}, {10661, 4963, 825, 11}, {9811, 4963, 825, 11},//Farming
  113. {9765, 4947, 817, 10}, {10645, 4947, 817, 10}, {9766, 4947, 817, 10},//Runecrafting
  114. {9789, 4953, 820, 11}, {10654, 4953, 820, 11}, {9790, 4953, 820, 11},//Construction
  115. {12524, 8525, 1515, 8}, {12169, 8525, 1515, 8}, {12170, 8525, 1515, 8},//Summoning
  116. {9948, 5158, 907, 10}, {10646, 5158, 907, 10}, {9949, 5158, 907, 10},//Hunter
  117. {9813, 4945, 816, 13}, {10662, 4945, 816, 13}
  118. };
  119.  
  120. private static void doskillcapeEmote(Player p) {
  121. for (int i = 0; i < skillcape.length; i++) {
  122. if(p.getEquipment().get(EquipmentDefinition.SLOT_CAPE).getId() == skillcape[i][0]) {
  123. p.doAnimation(skillcape[i][1]);
  124. p.doGraphics(skillcape[i][2]);
  125. doingEmote = true;
  126. p.registerTick(new Tick(null, skillcape[i][3]) {
  127. @Override
  128. public boolean execute() {
  129. doingEmote = false;
  130. return false;
  131. }
  132. });
  133. }
  134. }
  135. }
Add Comment
Please, Sign In to add comment