Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- NPC Name: Spinel
- Description: World Tour Guide
- */
- var status = -1;
- var cost, sel, map, go;
- var togo1, togo2, togo3;
- var back = true;
- function start() {
- switch (cm.getMapId()) {
- case 800000000: // Zipangu - Mushroom Shrine
- case 500000000: // Thailand - Floating Market
- case 701000000: {// China - Shanghai Wai-Tan
- map = cm.getSavedLocation("WORLDTOUR");
- 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");
- break;
- }
- default: {
- back = false;
- if (cm.getJob() == 0) {
- 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.");
- cost = 300;
- } else {
- 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");
- cost = 3000;
- }
- break;
- }
- }
- }
- function action(mode, type, selection) {
- if (mode == -1) {
- cm.dispose();
- } else {
- if (status == 4 && mode == 1) {
- cm.dispose();
- return;
- } else if (status == 1 && mode == 0) {
- cm.sendOk("If you ever change your mind, please let me know.");
- cm.dispose()
- return;
- }
- if (mode == 1)
- status++;
- else
- status--;
- if (!back) {
- if (status == 0) {
- 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");
- } else if (status == 1) {
- if (selection == 0) {
- 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.");
- go = 0;
- } else if (selection == 1) {
- 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.");
- go = 1;
- } else if (selection == 2) {
- 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.");
- go = 2;
- }
- } else if (status == 2) {
- if (go == 0) {
- 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!");
- } else if (go == 1) {
- 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.");
- } else if (go == 2) {
- 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!");
- }
- } else if (status == 3) {
- if (cm.getMeso() < cost) {
- cm.sendPrev("Please check and see if you have enough mesos to go.");
- } else {
- cm.gainMeso(-cost);
- cm.saveLocation("WORLDTOUR");
- if (go == 0) {
- cm.warp(701000000, 0); // China - Shanghai Wai-Tan
- } else if (go == 1) {
- cm.warp(800000000, 0); // Zipangu - Mushroom Shrine
- } else if (go == 2) {
- cm.warp(500000000, 0); // Thailand - Floating Market
- }
- cm.dispose();
- }
- } else {
- cm.dispose();
- }
- } else {
- var cost2 = cm.getJob() < 100 ? 300 : 3000;
- if (status == 0) {
- if (selection == 0) {
- switch (cm.getMapId()) {
- case 500000000:
- togo1 = 800000000;
- togo2 = 701000000;
- break;
- case 800000000:
- togo1 = 701000000;
- togo2 = 500000000;
- break;
- case 701000000:
- togo1 = 500000000;
- togo2 = 800000000;
- break;
- }
- 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");
- } else if (selection == 1) {
- cm.warp(map == -1 ? 100000000 : map);
- cm.clearSavedLocation("WORLDTOUR");
- cm.dispose();
- }
- } else if (status == 1) {
- sel = selection;
- if (sel == 0) {
- 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?");
- } else if (sel == 1) {
- 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?");
- } else if (sel == 2) {
- 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?");
- }
- } else if (status == 2) {
- if (cm.getMeso() >= cost2) {
- if (sel == 0) {
- cm.warp(togo1);
- } else if (sel == 1) {
- cm.warp(togo2);
- } else if (sel == 2) {
- cm.warp(togo3);
- }
- } else {
- cm.sendPrev("Please check and see if you have enough mesos to go.");
- }
- cm.dispose();
- } else {
- cm.dispose();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement