diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-07-26 01:19:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-08-05 03:25:44 -0300 |
commit | c5085985acb5c8cc20a392b370a0a7b65142b73e (patch) | |
tree | 91d842ec3a84eb559c429212bbb8e1e99f0b1035 | |
parent | 5c5c2d7098b1de88cd39fc215aad80e5887a9060 (diff) | |
download | serverdata-c5085985acb5c8cc20a392b370a0a7b65142b73e.tar.gz serverdata-c5085985acb5c8cc20a392b370a0a7b65142b73e.tar.bz2 serverdata-c5085985acb5c8cc20a392b370a0a7b65142b73e.tar.xz serverdata-c5085985acb5c8cc20a392b370a0a7b65142b73e.zip |
Refactor 000-0-1/narrator.txt for reuse
-rw-r--r-- | npc/000-0-1/narrator.txt | 108 |
1 files changed, 1 insertions, 107 deletions
diff --git a/npc/000-0-1/narrator.txt b/npc/000-0-1/narrator.txt index a63c46a0..831b521a 100644 --- a/npc/000-0-1/narrator.txt +++ b/npc/000-0-1/narrator.txt @@ -14,15 +14,13 @@ 000-0-1,25,28,0 script Narrator#000-0-1 NPC_NARRATOR,{ function referralSystem; + function travelToArtis; 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; @@ -33,12 +31,6 @@ closeclientdialog; close; -OnInit: - .sex = G_OTHER; - end; - -/////////////////////////////////////////////////////////////////////// -// Quest state: 0 function travelToArtis { narrator S_LAST_NEXT, l("Look, we finally meet."), @@ -67,104 +59,6 @@ function travelToArtis { 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=gf_accid(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; -} - OnInit: .sex = G_OTHER; end; |