xrune

Wyson (Stage 1)

Mar 17th, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. NpcTalk("Hey i have heard you are looking for woad leaves");
  2. int choice = showMenu(new String[] {"Well yes I am. Can you get some?", "Who told you that?"});
  3. if(choice == 0) {
  4. yaiam();
  5. } else if(choice == 1) {
  6. whotold();
  7. }
  8. }
  9. private void yaiam() {
  10. NpcTalk("Yes I have some somewhere");
  11. PlayerTalk("Can I buy one please?");
  12. NpcTalk("How much are you willing to pay?");
  13. int choice = showMenu(new String[] {"How about 5 coins?", "How about 10 coins?", "How about 15 coins?", "How about 20 coins?"});
  14. if(choice == 0) {
  15. five();
  16. } else if(choice == 1) {
  17. ten();
  18. } else if(choice == 1) {
  19. fifteen();
  20. } else if(choice == 1) {
  21. twenty();
  22. }
  23. }
  24. private void five() {
  25. NpcTalk("No no that's far too little. Woad leaves are hard to get you know");
  26. NpcTalk("I used to have plenty but someone kept stealing them off me");
  27. } else {
  28. PlayerTalk("I don't have enough coins to buy the leaves. I'll come back later");
  29. }
  30. }
  31. private void ten() {
  32. NpcTalk("No no that's far too little. Woad leaves are hard to get you know");
  33. NpcTalk("I used to have plenty but someone kept stealing them off me");
  34. } else {
  35. PlayerTalk("I don't have enough coins to buy the leaves. I'll come back later");
  36. }
  37. }
  38. private void fifteen() {
  39. NpcTalk("Mmmm ok that sounds fair.");
  40. SendMessage("You give wyson 15 coins");
  41. RemoveItem(10, 15);
  42. SendMessage("Wyson the gardener gives you some woad leaves");
  43. AddItem(281, 1); // 1 woad leaf
  44. } else {
  45. PlayerTalk("I don't have enough coins to buy the leaves. I'll come back later");
  46. }
  47. }
  48. private void twenty() {
  49. NpcTalk("Ok that's more than fair.");
  50. SendMessage("You give wyson 20 coins");
  51. RemoveItem(10, 20);
  52. SendMessage("Wyson the gardener gives you some woad leaves");
  53. AddItem(281, 1);
  54. NpcTalk("Here have some more you're a generous person");
  55. SendMessage("Wyson the gardener gives you some woad leaves");
  56. AddItem(281, 1);
  57. } else {
  58. PlayerTalk("I don't have enough coins to buy the leaves. I'll come back later");
  59. }
  60. }
  61. private void whotold() {
  62. NpcTalk("I can't remember now. Someone who visits this park");
  63. NpcTalk("I happen to have some woad leaves lying around");
  64. NpcTalk("Would you like to buy some?");
  65. int choice = showMenu(new String[] {"Oh yes please", "No thanks not right now"});
  66. if(choice == 0) {
  67. yesplz();
  68. } else if(choice == 1) {
  69. notnow();
  70. }
  71. }
  72. private void yesplz() {
  73. NpcTalk("How much are you willing to pay?");
  74. int choice = showMenu(new String[] {"How about 5 coins?", "How about 10 coins?", "How about 15 coins?", "How about 20 coins?"});
  75. if(choice == 0) {
  76. five();
  77. } else if(choice == 1) {
  78. ten();
  79. } else if(choice == 1) {
  80. fifteen();
  81. } else if(choice == 1) {
  82. twenty();
  83. }
  84. }
  85. private void notnow() {
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment