// Evol scripts. // Moubootaur Legends scripts. // Author: // Reid // Jesusalva // Description: // Narrator explain to the player that he is dreaming. // Variable: // Q General_Narrator // Values: // 0 PC is in the game introduction. // 1 PC arrived Artis. // 2 PC arrived in Argaes. 000-0-1,25,28,0 script Narrator#000-0-1 NPC_NARRATOR,{ function referralSystem; function travelToArtis; function travelToArgaes; switch (getq(General_Narrator)) { case 0: travelToArtis(); break; case 1: travelToArgaes(); break; default: mesc l("ERROR - Corrupted quest state %d", getq(General_Narrator)), 1; mesc l("Please contact the staff for technical support."), 1; mes ""; mesc l("Error message: Narrator#000-0-1 Invalid Quest State"); break; } closeclientdialog; close; OnInit: .sex = G_OTHER; end; /////////////////////////////////////////////////////////////////////// // Quest state: 0 function travelToArtis { narrator S_LAST_NEXT, l("Look, we finally meet."), l("I think that you already understood, you are asleep."), l("The ship, La Johanne, has left Drasil Island, finally."), l("Nard and his crew are taking us to the city of Artis."); // Legacy accounts are excluded // Only one referral per vault account //getvaultid(); if (!islegacyaccount() && !getvaultvar(REFERRAL_PROG)) referralSystem(); narrator S_LAST_NEXT, l("There are a lot of things you must be wondering about."), l("So, search for answers."), l("..."), l("Ah, seagulls. We are arriving."), l("..."), l("Wake-up!"); if (countitem(JohanneKey) == 1) delitem JohanneKey, 1; setq General_Narrator, 1; setq ShipQuests_Nard, 6; savepoint "001-2-22", 50, 38; warp "001-2-22", 50, 38; return; } /////////////////////////////////////////////////////////////////////// // Quest state: 1 function travelToArgaes { narrator S_LAST_NEXT, l("Oh, hello again!"), l("I hope you still remember me."), l("Now, this ship is not the most comfortable, don't you agree?"), l("Well, hopefully it won't be too long until you reach your destination."), l("Argaes, in the ancient continent of Ancea..."), l("What could be waiting for you there?"); // Special dialog for Legacy accounts // To relate to Doomsday event if (islegacyaccount()) { narrator S_LAST_NEXT, l("Maybe you already have been on that continent before."), l("Also, don't you think this ship vaguely... familiar?"), l("Well, not like you would be able to remember. Even if you wanted."), l("Ah, sorry. I make too many rhetorical questions, don't I?"), l("I probably should let you rest, it must have been tiring!"), l("But before that, one last question..."); } narrator S_LAST_NEXT, l("Actually... Wouldn't now be a good time to wake up?"); setq General_Narrator, 2; savepoint "008-1-1", 33, 63; warp "008-1-1", 33, 63; dispbottom l("After a tiring, yet fast, travel by Koga, you arrive at @@.", l("Woodlands")); return; } /////////////////////////////////////////////////////////////////////// // Script Utils // referralSystem() is a Moubootaur Legends function function referralSystem { mesc l("But before we get there, I've been itching to know..."); next; mesc l("Do we know someone on this world?"); next; mesc l("Do we know someone on this world?"), 1; // Opt-out if (askyesno() == ASK_NO) { mesc l("Yes. We truly don't remember anyone."); next; return; } // Opt-in mesc l("Yes... We remember a fellow adventurer... How was their name again?"); next; .@ref$=""; do { mesc l("(Which player invited you to this world?)"), 1; input .@ref$; mes ""; if (.@ref$ != "") { .@ref="playerCache"::name2account(strip(.@ref$)); if (.@ref > 0) { // Case 1: Yourself if (.@ref == getcharid(3)) { mesc l("Hahah, silly, that's ourselves!"); mesc l("Try again!"); next; .@ref$=""; // Anti-spam Forced cooldowns sleep2(200); // Case 2: Valid Invite } else { setvaultvar(REFERRAL_PROG, .@ref); //getitembound FriendGift, 1, 1; mesc l("Ah yes, our trusty friend, %s.", .@ref$); mesc l("They probably miss me. I mean, I probably have been away for a long time..."); next; mesc l("Maybe they sent me a letter, or a gift? I'll see once I get in Artis."); next; } } else { // Case 3: Invalid Invite mesc l("Oops, there is nobody known as %s on this word.", .@ref$); mesc l("Maybe I don't remember their name, after all."); next; .@ref$=""; // Anti-spam Forced cooldowns sleep2(400); } } else { // Case 4: Player gave up .@ref$="None"; mesc l("Actually, nevermind. My memory is still too foggy to remember this."); next; } } while (.@ref$ == ""); // Return to script return; } }