Guest User

Untitled

a guest
May 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. package server.model.players.skills;
  2.  
  3. import server.model.players.Client;
  4.  
  5. public class Smelting {
  6.  
  7. public Smelting(Client Client) {
  8. this.c = Client;
  9. }
  10.  
  11. public Client c;
  12.  
  13. /**
  14. * Variables
  15. */
  16. public static boolean
  17. hasIronOre,
  18. hasMithOre,
  19. hasAddyOre,
  20. hasRuneOre,
  21. hasGoldOre;
  22.  
  23. public static void checkOres(Client c) {
  24. if (c.getItems().playerHasItem(440, 1)) {
  25. hasIronOre = true;
  26. } else if (c.getItems().playerHasItem(447, 1)) {
  27. hasMithOre = true;
  28. } else if (c.getItems().playerHasItem(449, 1)) {
  29. hasAddyOre = true;
  30. } else if (c.getItems().playerHasItem(451, 1)) {
  31. hasRuneOre = true;
  32. } else if (c.getItems().playerHasItem(444, 1)) {
  33. hasGoldOre = true;
  34. } else {
  35. hasIronOre = false;
  36. hasMithOre = false;
  37. hasAddyOre = false;
  38. hasRuneOre = false;
  39. hasGoldOre = false;
  40. }
  41. }
  42.  
  43. public static void showInterface1(Client c) {
  44. String option1;
  45. String option2;
  46. String option3;
  47. String option4;
  48. String option5;
  49.  
  50. if (hasIronOre) {
  51. option1 = "Iron Ore (x)";
  52. } else {
  53. option1 = "Iron Ore ( )";
  54. }
  55. if (hasMithOre) {
  56. option2 = "Mithril Ore (x)";
  57. } else {
  58. option2 = "Mithril Ore ( )";
  59. }
  60. if (hasAddyOre) {
  61. option3 = "Adamant Ore (x)";
  62. } else {
  63. option3 = "Adamant Ore ( )";
  64. }
  65. if (hasRuneOre) {
  66. option4 = "Runite Ore (x)";
  67. } else {
  68. option4 = "Runite Ore ( )";
  69. }
  70. if (hasGoldOre) {
  71. option5 = "Gold Ore (x)";
  72. } else {
  73. option5 = "Gold Ore ( )";
  74. }
  75. c.getDH().sendOption5(option1, option2, option3, option4, option5);
  76. c.dialogueAction = 1234;
  77. //showInterface2();
  78. }
  79. }
Add Comment
Please, Sign In to add comment