Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Temple Keeper
- * ID: 2140000
- *
- * Time Lane | Three Doors
- * Quests 12000, 12001, 12002
- */
- /* jshint ignore: start */
- /* Array.prototype.findIndex() polyfill */
- Array.prototype.findIndex=Array.prototype.findIndex||function(evaluator,thisArg){"use strict";if(!this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof evaluator){if("string"!=typeof evaluator)throw new TypeError;if(!(evaluator=eval(evaluator)))throw new TypeError}var i;if(void 0===thisArg){for(i in this)if(evaluator(this[i],i,this))return i;return-1}for(i in this)if(evaluator.call(thisArg,this[i],i,this))return i;return-1};
- /* jshint ignore: end */
- var status;
- var questIds = [12000, 12001, 12002];
- var questNums = [6, 7, 8];
- var selection1, selection2;
- function start() {
- status = -1;
- action(1, 0, 0);
- }
- function action(mode, type, selection) {
- var p = cm.getPlayer();
- if (p.getLevel() < 90 || (p.getQuestId() !== 0 && questIds.indexOf(p.getQuestId()) === -1)) {
- cm.sendOk("#econtinues reading silently as the ancient scroll in his hand slowly, but actively, falls to dust#n");
- cm.dispose();
- return;
- }
- if (mode < 0 || (mode === 0 && (type === 4 || status < 1))) {
- cm.dispose();
- return;
- }
- status += mode === 1 ? 1 : -1;
- var questIndex = questNums.findIndex(function(qn) {
- return !p.getQuestCompletion(qn);
- });
- switch (questIndex) {
- case -1:
- cm.sendOk("#econtinues reading silently as the ancient scroll in his hand slowly, but actively, falls to dust#n");
- cm.dispose();
- return;
- case 0:
- if (!cm.onQuest()) {
- switch (status) {
- case 0:
- cm.sendSimple(cm.selectQuest(questIds[questIndex], "#econtinues reading silently as the ancient scroll in his hand slowly, but actively, falls to dust#n"));
- break;
- case 1:
- cm.sendSimple(p.getCQuest().getInfo() + "\r\n\r\n#L0#Vaguely?#l\r\n#L1#(walk a bit closer to the old man)#l\r\n#L2#Hah, nope. Not a human. Not even a little. (quickly walk away)#l");
- break;
- case 2:
- selection1 = selection;
- switch (selection) {
- case 0:
- cm.sendSimple("Well, you don't have a nose.\r\n\r\n#L0#Excuse me? I am noseless and proud.#l\r\n#L1#Well, neither do you.#l\r\n#L2#What are you talking abou -- oh. OH SHIT AAAAAAAAAAA I HAVE NO NOSE WHAT THE FUCK AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA#l");
- break;
- case 1:
- cm.sendSimple("#ethe old man doesn't appear to budge or to make any sound#n\r\n\r\n#L0#(walk a bit closer yet)#l\r\n#L1#(retrace your few steps back)#l\r\n#L2#(decide better of this old man and swiftly walk away)#l");
- break;
- default:
- cm.dispose();
- return;
- }
- break;
- case 3:
- selection2 = selection;
- switch (selection1) {
- case 0:
- switch (selection) {
- case 0:
- // Excuse me? I am noseless and proud.
- cm.sendSimple("#ethe old man adjusts his spectacles once again#n\r\n\r\nAre you sure? Haven't you ever wanted to smell the air? To taste foodstuffs?\r\n\r\n#L0#Well... I guess so, yeah.#l\r\n#L1#No, not really.#l");
- break;
- case 1:
- // Well, neither do you.
- cm.sendSimple("#ethe old man's brows furrow#n\r\n\r\nIs that an insult?\r\n\r\n#L0#Well, I mean, no. Like, I don't hate. I don't have one either.#l\r\n#L1#Uhhh... MAYBE.#l");
- break;
- default:
- // What are you talking abou -- oh. OH SHIT AAAAAAAAAAA I HAVE NO NOSE WHAT THE FUCK AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- cm.sendOk("#ethe old man nearly fumbles his spectacles and quickly decides to go back to reading#n");
- cm.dispose();
- return;
- }
- break;
- case 1:
- switch (selection) {
- case 0:
- // (walk a bit closer yet)
- cm.sendSimple("#ethe old man's gaze intensifies#n\r\n\r\n#L0#(get away from the gaze)#l\r\n#L1#(stare back at the old man's tiny, beady eyes)#l");
- break;
- case 1:
- // (retrace your few steps back)
- cm.sendSimple("#ethe old man's brows furrow#n\r\n\r\n#L0#(keep walking back)#l\r\n#L1#W--What do you want?#l");
- break;
- default:
- // (decide better of this old man and swiftly walk away)
- cm.dispose();
- return;
- }
- break;
- default:
- cm.dispose();
- return;
- }
- break;
- case 4:
- switch (selection1) {
- case 0:
- switch (selection2) {
- case 0:
- switch (selection) {
- case 0:
- // Well... I guess so, yeah.
- cm.sendSimple("Have you ever... wanted to walk down #e#bMemory Lane#k#n?\r\n\r\n#L0#Look, is this some kind of a scam?#l\r\n#L1#What's that?#l");
- break;
- case 1:
- // No, not really.
- cm.sendOk("#ethe old man's tiny beady eyes roll#n");
- cm.dispose();
- return;
- }
- break;
- case 1:
- switch (selection) {
- case 0:
- // Well, I mean, no. Like, I don't hate. I don't have one either.
- cm.sendSimple("In any case...\r\n\r\n#ethe old man quickly wipes his mouth-nose area with a gloved hand#n\r\n\r\nHave you, noseless human, considered a walk down #e#bMemory Lane#k#n?\r\n\r\n#L0#Is that some kind of a scam?#l\r\n#L1#What's that?#l");
- break;
- case 1:
- // Uhhh... MAYBE.
- cm.sendOk("#ethe old man's tiny beady eyes roll#n");
- cm.dispose();
- return;
- }
- break;
- default:
- cm.dispose();
- return;
- }
- break;
- case 1:
- switch (selection2) {
- case 0:
- switch (selection) {
- case 0:
- // (get away from the gaze)
- cm.dispose();
- return;
- case 1:
- // (stare back at the old man's tiny, beady eyes)
- cm.sendSimple("#ethe old man pauses#n\r\n\r\nYes... I can see it in your oversized eyes. You thirst for a walk along #e#bMemory Lane#k#n.\r\n\r\n#L0#Uhm... actually, not really.#l\r\n#L1#Maybe. What is that?#l");
- break;
- }
- break;
- case 1:
- switch (selection) {
- case 0:
- // (keep walking back)
- cm.dispose();
- return;
- case 1:
- // W--What do you want?
- cm.sendSimple("Oh, nothing.\r\n\r\n#ethe old man's eyes wander slightly#n\r\n\r\nI just thought you might want a walk along #e#bMemory Lane#k#n.\r\n\r\n#L0#Uhm... actually, not really.#l\r\n#L1#Maybe. What is that?#l");
- break;
- }
- break;
- default:
- cm.dispose();
- return;
- }
- break;
- default:
- cm.dispose();
- return;
- }
- break;
- case 5:
- switch (selection) {
- case 1:
- cm.sendSimple("#e#bMemory Lane#k#n -- the road of past experiences. Of those who enter the Lane, only a handful make it back out; at least, make it back out #ralive#k.\r\n\r\nBut you look dumb--I mean, #estrong#n enough of mind and body to explore this Lane yourself.\r\n\r\nThere is only one thing you must do -- take a walk along your own private lane of memory.\r\n\r\n#L0#How do you mean?#l\r\n#L1#Hmm... doesn't sound fun.#l");
- break;
- default:
- cm.sendOk("Ah.\r\n\r\n#egoes back to reading#n");
- cm.dispose();
- return;
- }
- break;
- case 6:
- switch (selection) {
- case 0:
- cm.sendSimple("#ethe old man stands up a bit straighter#n\r\n\r\nTo go back to where you started, to relive your memories anew, for good and for poor.\r\n\r\nI can take you there, but only if you allow me to.\r\n\r\n#ethe old man closes his eyes for 2 or 3 seconds#n\r\n\r\n#e#rTo Maple Island, yes, I can take you.#k#n That is where you started, yes?\r\n\r\n#L0#Oh, I mean... all the way back there? I don't know about that.#l\r\n#L1#I... I suppose so. Can you take me there now?#l");
- break;
- default:
- cm.sendOk("Suit yourself.\r\n\r\n#ethe old man goes back to reading#n");
- cm.dispose();
- return;
- }
- break;
- case 7:
- switch (selection) {
- case 1:
- cm.warp(40000);
- cm.startCQuest(questIds[questIndex]);
- cm.dispose();
- return;
- default:
- cm.sendOk("Suit yourself.\r\n\r\n#ethe old man goes back to reading#n");
- cm.dispose();
- return;
- }
- break;
- }
- } else if (cm.onQuest(questIds[questIndex]) && cm.canComplete()) {
- switch (status) {
- case 0:
- cm.sendOk("#ethe old man almost seems to nod#n");
- break;
- case 1:
- p.setQuestCompletion(questNums[questIndex], true);
- cm.rewardPlayer(0, 0);
- cm.gainFame(12);
- p.sendHint(cm.randomText(6));
- cm.dispose();
- return;
- }
- } else {
- cm.sendOk("#econtinues reading silently as the ancient scroll in his hand slowly, but actively, falls to dust#n");
- cm.dispose();
- return;
- }
- break;
- case 1:
- break;
- case 2:
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement