Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. package com.rs2hd.content.skills.herblore;
  2.  
  3. import com.rs2hd.model.Player;
  4. /*
  5. * Author Dragonkk np not finished
  6. */
  7. public class Herblore {
  8. public static void hb(Player p, int usedWith, int itemUsed) {
  9. int[] vial = { 227 };
  10. int[] herbs = { 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269 };
  11. int[] UnfPot = { 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111 };
  12. int UnfXP[] = { 321, 5042, 285, 427, 529, 545, 232, 587, 569 };
  13. // Herblore Unfpots
  14. for (int i = 0; i < herbs.length; i++) {
  15. if (itemUsed == vial[0] && usedWith == herbs[i] || usedWith == vial[0] && itemUsed == herbs[i]) {
  16. p.getSkills().addXp(15, UnfXP[i]);
  17. p.animate(363);
  18. p.getInventory().deleteItem(vial[0], 1);
  19. p.getInventory().deleteItem( herbs[i], 1);
  20. p.getInventory().addItem(UnfPot[i], 1);
  21. }
  22. }
  23. // End Herblore Unfpots
  24. // Herblore Pots
  25. int[] item2 = { 221, 235, 225, 223, 231, 221, 231, 241, 245, 247 };
  26. int[] FinPot = { 121, 3042, 115, 127, 139, 145, 112, 187, 169 };
  27. int[] FinLVL = { 3, 75, 12, 22, 38, 45, 1, 60, 72};
  28. int FinXP[] = { 321, 5042, 285, 427, 529, 545, 232, 587, 569 };
  29. for (int i = 0; i < item2.length; i++) {
  30. if (itemUsed == UnfPot[i] && usedWith == item2[i] || usedWith == UnfPot[i] && itemUsed == item2[i]) {
  31. if (p.getSkills().getLevel(15) >= FinLVL[i]) {
  32. p.getSkills().addXp(15, FinXP[i]);
  33. p.animate(363);
  34. p.getInventory().deleteItem( item2[i], 1);
  35. p.getInventory().deleteItem( UnfPot[i], 1);
  36. p.getInventory().addItem( FinPot[i], 1);
  37. }else{
  38. p.sm("You dont have herblore level for make this potion.");
  39. }
  40.  
  41. }
  42. }
  43. // End Herblore Pots
  44. }
  45.  
  46. public static void CH(Player p, int itemId) {
  47.  
  48. int[] grimy = {199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219};
  49. int[] clean = {249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269};
  50. int cleanXP[] = { 321, 5042, 285, 427, 529, 545, 232, 587, 569 };
  51. for(int i = 0; i < grimy.length; i++) {
  52. if (itemId == grimy[i]) {
  53. p.getInventory().deleteItem(grimy[i], 1);
  54. p.getSkills().addXp(15, cleanXP[i]);
  55. p.getInventory().addItem(clean[i], 1);
  56. p.sm("You cleaned the herb!");
  57. }
  58. }
  59.  
  60. }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement