Advertisement
Guest User

Untitled

a guest
Aug 4th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. /*
  2. NPC Name: Spinel
  3. Description: World Tour Guide
  4. */
  5.  
  6. var status = -1;
  7. var cost, sel, map, go;
  8. var togo1, togo2, togo3;
  9. var back = true;
  10.  
  11. function start() {
  12. switch (cm.getMapId()) {
  13. case 800000000: // Zipangu - Mushroom Shrine
  14. case 500000000: // Thailand - Floating Market
  15. case 701000000: {// China - Shanghai Wai-Tan
  16. map = cm.getSavedLocation("WORLDTOUR");
  17. cm.sendSimple("How's the traveling? Are you enjoying it? \n\r #b#L0# Can I go somewhere else?#l \n\r #L1# I'm done with traveling. Can I go back to #m"+map+"#?#l");
  18. break;
  19. }
  20. default: {
  21. back = false;
  22. if (cm.getJob() == 0) {
  23. cm.sendNext("If you're tired of the monotonous daily life, how about getting out for a change? There's nothing quite like soaking up a new culture, learning something new by the minute! It's time for you to get out and travel. We recommend a\r\n#bWorld Tour#k! Are you worried about the travel expense? No need to worry! The #bMaple Travel Agency#k offers first class travel accommodation for the low price of #b300 mesos#k.");
  24. cost = 300;
  25. } else {
  26. cm.sendNext("If you're tired of the monotonous daily life, how about getting out for a change? There's nothing quite like soaking up a new culture, learning something new by the minute! It's time for you to get out and travel. We, at the Maple Travel Agency recommend you going on a #bWorld Tour#k! Are you worried about the travel expense? You shouldn't be! We, the #bMaple Travel Agency#k, have carefully come up with a plan to let you travel for ONLY #b3,000 mesos!#k");
  27. cost = 3000;
  28. }
  29. break;
  30. }
  31. }
  32. }
  33.  
  34. function action(mode, type, selection) {
  35. if (mode == -1) {
  36. cm.dispose();
  37. } else {
  38. if (status == 4 && mode == 1) {
  39. cm.dispose();
  40. return;
  41. } else if (status == 1 && mode == 0) {
  42. cm.sendOk("If you ever change your mind, please let me know.");
  43. cm.dispose()
  44. return;
  45. }
  46. if (mode == 1)
  47. status++;
  48. else
  49. status--;
  50. if (!back) {
  51. if (status == 0) {
  52. cm.sendSimple("We offer these places for your traveling pleasure:\r\n#bShanghai of China, Mushroom Shrine of Japan and Floating Market of Thailand#k. Wherever you decide to travel, I'll be there serving you as the travel guide. Now, where would you like to head to?\r\n#b#L0# Shanghai (China)#l\r\n#L1# Mushroom Shrine (Japan)#l\r\n#L2# Floating Market(Thailand)#k#l");
  53. } else if (status == 1) {
  54. if (selection == 0) {
  55. cm.sendNext("Would you like to travel to #bShanghai of China#k? China is a country that is undergoing a rapid change towards modernism, and no city clearly represents that as well as #bShanghai#k. First-time visitors of China may be taken back by a slew modern buildings and squeaky-clean streets.");
  56. go = 0;
  57. } else if (selection == 1) {
  58. cm.sendNext("Would you like to travel to the #bMushroom Shrine of Japan#k?\r\nIf you desire to feel the essence of Japan, there's nothing like visiting the Shrine, a Japanese cultural melting pot. Mushroom Shrine is a mythical place that serves the incomparable Mushroom God from ancient times.");
  59. go = 1;
  60. } else if (selection == 2) {
  61. cm.sendNext("Would you like to travel to #bFloating Market of Thailand#k? Just like the name, Floating Market is a town located on top of the river. This is a town that stimultaneously feautures palm trees and historical features of Thailand.");
  62. go = 2;
  63. }
  64. } else if (status == 2) {
  65. if (go == 0) {
  66. cm.sendNextPrev("Outside the city, however, lies the prototypical countryside, where nature rules modernism. More than anything, this represents the past and the present of China. Now, let's head over to #bShanghai#k, a city that embodies the past, present, and the future!");
  67. } else if (go == 1) {
  68. cm.sendNextPrev("Check out the female shaman serving the Mushroom God, and I strongly recommend trying Takoyaki, Yakisoba, and other delicious food sold in the streets of Japan. Now, let's head over to #bMushroom Shrine#k, a mythical place if there ever was one.");
  69. } else if (go == 2) {
  70. cm.sendNextPrev("This is the only town where you'll see people floating around in boats right in the middle of the town! Alright, now let's head over to #bFloating Market#k, where the beauty of nature coexist with rich tradition!");
  71. }
  72. } else if (status == 3) {
  73. if (cm.getMeso() < cost) {
  74. cm.sendPrev("Please check and see if you have enough mesos to go.");
  75. } else {
  76. cm.gainMeso(-cost);
  77. cm.saveLocation("WORLDTOUR");
  78. if (go == 0) {
  79. cm.warp(701000000, 0); // China - Shanghai Wai-Tan
  80. } else if (go == 1) {
  81. cm.warp(800000000, 0); // Zipangu - Mushroom Shrine
  82. } else if (go == 2) {
  83. cm.warp(500000000, 0); // Thailand - Floating Market
  84. }
  85. cm.dispose();
  86. }
  87. } else {
  88. cm.dispose();
  89. }
  90. } else {
  91. var cost2 = cm.getJob() < 100 ? 300 : 3000;
  92. if (status == 0) {
  93. if (selection == 0) {
  94. switch (cm.getMapId()) {
  95. case 500000000:
  96. togo1 = 800000000;
  97. togo2 = 701000000;
  98. break;
  99. case 800000000:
  100. togo1 = 701000000;
  101. togo2 = 500000000;
  102. break;
  103. case 701000000:
  104. togo1 = 500000000;
  105. togo2 = 800000000;
  106. break;
  107. }
  108. cm.sendSimple("Where would you like to travel? \n\r #b#L0##m" + togo1 + "# (" + cost2 + " mesos)#l \n\r #L1##m" + togo2 + "# (" + cost2 + " mesos)#l");
  109. } else if (selection == 1) {
  110. cm.warp(map == -1 ? 100000000 : map);
  111. cm.clearSavedLocation("WORLDTOUR");
  112. cm.dispose();
  113. }
  114. } else if (status == 1) {
  115. sel = selection;
  116. if (sel == 0) {
  117. cm.sendYesNo("Would you like to travel to #b#m" + togo1 + "##k? To head over, it'll cost you only #b" + cost2 + " mesos#k. Would you like to go right now?");
  118. } else if (sel == 1) {
  119. cm.sendYesNo("Would you like to travel to #b#m" + togo2 + "##k? To head over, it'll cost you only #b" + cost2 + " mesos#k. Would you like to go right now?");
  120. } else if (sel == 2) {
  121. cm.sendYesNo("Would you like to travel to #b#m" + togo3 + "##k? To head over, it'll cost you only #b" + cost2 + " mesos#k. Would you like to go right now?");
  122. }
  123. } else if (status == 2) {
  124. if (cm.getMeso() >= cost2) {
  125. if (sel == 0) {
  126. cm.warp(togo1);
  127. } else if (sel == 1) {
  128. cm.warp(togo2);
  129. } else if (sel == 2) {
  130. cm.warp(togo3);
  131. }
  132. } else {
  133. cm.sendPrev("Please check and see if you have enough mesos to go.");
  134. }
  135. cm.dispose();
  136. } else {
  137. cm.dispose();
  138. }
  139. }
  140. }
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement