Advertisement
Guest User

Untitled

a guest
Nov 27th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. package game.player;
  2.  
  3. import game.net.packets.npc.FirstClickNpc;
  4. import game.net.packets.npc.SecondClickNpc;
  5. import game.net.packets.npc.ThirdClickNpc;
  6. import game.net.packets.object.FirstClickObject;
  7. import game.net.packets.object.SecondClickObject;
  8. import game.net.packets.object.ThirdClickObject;
  9.  
  10. public class ActionHandler {
  11.  
  12. private final Player c;
  13.  
  14. public ActionHandler(final Player Client) {
  15. c = Client;
  16. }
  17.  
  18. public void firstClickNpc(final int i) {
  19. FirstClickNpc.handleClick(c, i);
  20. case 549:
  21. if(c.kingQuest == 5) {
  22. c.getDH().sendDialogues(68, i);
  23. return;
  24. } else if(c.kingQuest == 6) {
  25. c.sendMessage("Go talk to sedridor again");
  26. return;
  27. } else if(c.kingQuest == 8) {
  28. c.sendMessage("@gr2@You already completed the quest");
  29. }
  30. break;
  31. case 300:
  32. if(c.kingQuest <= 0) {
  33. c.sendMessage("You must talk to Razgar to talk to him");
  34. return;
  35. } else if(c.kingQuest == 1) {
  36. c.sendMessage("Go talk to king Vargas in varrock first");
  37. return;
  38. } else if(c.kingQuest == 2) {
  39. c.getDH().sendDialogues(61, i);
  40. return;
  41. } else if(c.kingQuest == 3 && c.getItems().playerHasItem(556, 2)&& c.getItems().playerHasItem(554, 1)) {
  42. c.getDH().sendDialogues(65, i);
  43. c.getItems().deleteItem2(556, 2);
  44. c.getItems().deleteItem2(554, 1);
  45. } else if(c.kingQuest == 3) {
  46. c.sendMessage("You have dont have 2 air runes or a fire rune");
  47. return;
  48. } else if(c.kingQuest == 4) {
  49. c.sendMessage("You already gave him the required items");
  50. return;
  51. } else if(c.kingQuest == 5) {
  52. c.sendMessage("Go talk to horvik");
  53. return;
  54. } else if(c.kingQuest == 7) {
  55. c.getDH().sendDialogues(75, i);
  56. return;
  57. } else if(c.kingQuest == 8) {
  58. c.sendMessage("@gr2@You already completed the quest");
  59. } else if(c.kingQuest == 6) {
  60. c.getDH().sendDialogues(71, i);
  61. return;
  62. }
  63. break;
  64. case 1373:
  65. if(c.kingQuest == 1) {
  66. c.getDH().sendDialogues(55, i);
  67. return;
  68. } else if(c.kingQuest == 2) {
  69. c.sendMessage("Go talk to the wizard in lumbrdige");
  70. return;
  71. } else if(c.kingQuest <= 0) {
  72. c.sendMessage("You must talk to Razgar to talk to him");
  73. return;
  74. } else if(c.kingQuest == 8) {
  75. c.sendMessage("@gr2@You already completed the quest");
  76. }
  77. break;
  78. case 2086:
  79. if(c.kingQuest <= 0) {
  80. c.getDH().sendDialogues(50, i);
  81. return;
  82. } else if(c.kingQuest == 1) {
  83. c.sendMessage("Go talk to king Vargas in varrock first");
  84. return;
  85. } else if(c.kingQuest == 8) {
  86. c.sendMessage("@gr2@You already completed the quest");
  87. }
  88. break;
  89. }
  90.  
  91. public void firstClickObject(final int objectType, final int obX,
  92. final int obY) {
  93. FirstClickObject.handleClick(c, objectType, obX, obY);
  94. }
  95.  
  96. public void secondClickNpc(final int npcId) {
  97. SecondClickNpc.handleClick(c, npcId);
  98. }
  99.  
  100. public void secondClickObject(final int objectType, final int obX,
  101. final int obY) {
  102. SecondClickObject.handleClick(c, objectType, obX, obY);
  103. }
  104.  
  105. public void thirdClickNpc(final int npcId) {
  106. ThirdClickNpc.handleClick(c, npcId);
  107. }
  108.  
  109. public void thirdClickObject(final int objectType, final int obX,
  110. final int obY) {
  111. ThirdClickObject.handleClick(c, objectType, obX, obY);
  112. }
  113.  
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement