summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-08-06 21:18:59 -0400
committergumi <git@gumi.ca>2020-08-06 21:19:09 -0400
commit0a7b5d07c98fbbeb1a33b639001f578df704c130 (patch)
treecdaf06ac2d267c0cca9a241d5c2af2ec37fc5c80
parentca9c8241ecf878e836817d353c66ee776a95c161 (diff)
downloadserverdata-0a7b5d07c98fbbeb1a33b639001f578df704c130.tar.gz
serverdata-0a7b5d07c98fbbeb1a33b639001f578df704c130.tar.bz2
serverdata-0a7b5d07c98fbbeb1a33b639001f578df704c130.tar.xz
serverdata-0a7b5d07c98fbbeb1a33b639001f578df704c130.zip
partly rewrite the intro to add a referral system
Co-authored-by: gumi <git@gumi.ca>
-rw-r--r--npc/000-0-1/narrator.txt182
-rw-r--r--npc/000-0/sailors.txt15
-rw-r--r--npc/000-2-1/arpan.txt6
-rw-r--r--npc/001-1/koga.txt5
-rw-r--r--npc/012-2-2/sorfina.txt2
-rw-r--r--npc/functions/quest-debug/100-General_Narrator.txt3
6 files changed, 180 insertions, 33 deletions
diff --git a/npc/000-0-1/narrator.txt b/npc/000-0-1/narrator.txt
index ae85dadb..a8486ab1 100644
--- a/npc/000-0-1/narrator.txt
+++ b/npc/000-0-1/narrator.txt
@@ -1,37 +1,181 @@
// Evol scripts.
+// Moubootaur Legends scripts.
// Author:
// Reid
+// Jesusalva
// Description:
// Narrator explain to the player that he is dreaming.
// Variable:
-// 0 General_Narrator
+// 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;
- 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."),
- 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;
- closeclientdialog;
+ 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:
.bodytype = BODYTYPE_1;
+
+ if (debug > 0) {
+ // debug commands to skip the tutorial
+ bindatcmd("force-referral", sprintf("%s::referralSystem", .name$));
+ bindatcmd("force-artis", sprintf("%s::travelToArtis", .name$));
+ }
end;
+
+ ///////////////////////////////////////////////////////////////////////
+ // Quest state: 0
+ public 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
+ .@refVault = bitwise_get(getvaultvar(REFERRAL_PROG), 0x00FFFFFF, 0);
+
+ if (!islegacyaccount() && .@refVault < 1) {
+ referralSystem();
+ }
+
+ narrator(S_LAST_CLOSE,
+ 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 (.@cnt = countitem(JohanneKey)) {
+ delitem(JohanneKey, .@cnt);
+ }
+
+ setq(General_Narrator, 1);
+ setq(ShipQuests_Nard, 6);
+ savepoint("001-2-22", 50, 38);
+ warp("SavePoint", 0, 0);
+ 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_CLOSE,
+ l("Actually... Wouldn't now be a good time to wake up?"));
+
+ setq(General_Narrator, 2);
+ savepoint("008-1-1", 33, 63);
+ warp("SavePoint", 0, 0);
+ dispbottom(l("After a tiring, yet fast, travel by Koga, you arrive at %s.", l("Woodlands")));
+ close;
+ }
+
+ ///////////////////////////////////////////////////////////////////////
+ // Script Utils
+ // referralSystem() is a Moubootaur Legends function
+ public 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?"), 1); // FIXME: awkward wording: suddenly changes from singular first person (I) to plural second person (we)
+
+ // Opt-out
+ if (askyesno() == ASK_NO) {
+ mesc(l("Yes. We truly don't remember anyone.")); // FIXME: juxtaposition of Yes and No (probably should be "No, we truly don't...")
+ next();
+ return;
+ }
+
+ // Opt-in
+ mesc(l("Yes... We remember a fellow adventurer... What was their name again?"));
+ next();
+
+ do {
+ mesc(l("(Which player invited you to this world?)"), 1); // FIXME: suddenly changes to the third person (invited "you" vs invited "us" or invited "me")
+ input(.@refName$ = "");
+ mes("");
+
+ .@refName$ = strip(.@refName$); // clean it up
+
+ if (.@refName$ == "") {
+ mesc(l("Actually, nevermind. My memory is still too foggy to remember this.")); // FIXME: suddenly changes from plural second person to singular first person ("My" memory)
+ next();
+ break;
+ }
+
+ .@refVault = "playerCache"::name2vault(.@refName$);
+
+ if (.@refVault == 0) {
+ mesc(l("Oops, there is nobody known as %s on this word.", .@refName$)); // FIXME: this is too informal
+ mesc(l("Maybe I don't remember their name, after all."));
+ next();
+ sleep2(400); // Anti-spam Forced cooldowns
+ // FIXME: show a message to the player (use a variable to throttle instead of sleep2)
+ continue;
+ }
+
+
+ if (.@refVault == getvaultid()) {
+ mesc(l("Hahah, silly, that's ourselves!"));
+ mesc(l("Try again!"));
+ next();
+ sleep2(200); // Anti-spam Forced cooldowns
+ // FIXME: show a message to the player (use a variable to throttle instead of sleep2)
+ continue;
+ }
+
+ bitwise_set(getvaultvar(REFERRAL_PROG), 0x00FFFFFF, 0, .@refVault);
+ //getitembound(FriendGift, 1, 1);
+ mesc(l("Ah yes, our trusty friend, %s.", .@refName$));
+ 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();
+ break;
+ } while (true);
+
+ return;
+ }
}
diff --git a/npc/000-0/sailors.txt b/npc/000-0/sailors.txt
index 705b7eee..e95d59eb 100644
--- a/npc/000-0/sailors.txt
+++ b/npc/000-0/sailors.txt
@@ -53,17 +53,14 @@ OnTouch:
asklanguage(LANG_ON_SEA);
- // TODO: This is gumi's code, I have no idea if it works or not
- // Besides, is it lv 90, 95, 99, 100, or...?
- // I believe Micksha said level 90 was plenty, but.
- /*** FIXME ***
- if ((LEGACY[1] & 0x7FFFFF00) >> 8) > 90)
- REBIRTH=1;
- *** FIXME ***/
-
// Players coming from TMW Legacy didn't got a chance to do this yet.
// So allow them now.
- if (LEGACY) {
+ if (islegacyaccount()) {
+ // Rebirth system
+ if (getlegacylevel() > 90)
+ REBIRTH=1;
+
+ // Race selection
BarberChangeRace();
}
diff --git a/npc/000-2-1/arpan.txt b/npc/000-2-1/arpan.txt
index 423e42dc..51c42298 100644
--- a/npc/000-2-1/arpan.txt
+++ b/npc/000-2-1/arpan.txt
@@ -158,7 +158,7 @@ L_Menu:
l("Who are you?"), L_Who,
rif(getq(ShipQuests_ArpanMoney) == 1, lg("Do you know what happened to the gold I had when you guys saved me?")), L_WhereMoney,
rif(getq(ShipQuests_ArpanMoney) < 2, l("Where are my old clothes?")), L_WhereOldClothes,
- rif(getq(ShipQuests_ArpanMoney) == 2 && LEGACY, l("About my my old clothes...")), L_LegacyClothes,
+ rif(getq(ShipQuests_ArpanMoney) == 2 && islegacyaccount(), l("About my my old clothes...")), L_LegacyClothes,
rif(!.@equipped, lg("What should I do after taking these clothes?")), L_WhatCloth,
rif(!.@equipped, l("Thank you, I'll take them and put them on.")), -,
l("Nothing, sorry."), -;
@@ -211,13 +211,13 @@ L_WhereOldClothes:
Zeny += 10;
message strcharinfo(0), l("You receive @@ E!", 10);
- if (LEGACY)
+ if (islegacyaccount())
goto L_LegacyClothes;
goto L_BeforeMenu;
L_LegacyClothes:
- if (LEGACY) {
+ if (islegacyaccount()) {
mesn strcharinfo(0);
select
lg("But... I remember that my clothes were very dear to me..."),
diff --git a/npc/001-1/koga.txt b/npc/001-1/koga.txt
index 2478d78e..e0c7eece 100644
--- a/npc/001-1/koga.txt
+++ b/npc/001-1/koga.txt
@@ -6,6 +6,7 @@
// THIS IS A PLACEHOLDER!
001-1,225,59,0 script Koga#001-1 NPC_KOGA,{
+ .@q=getq(General_Narrator);
speech
l("Ah, whom did you bring here?"),
l("Isnt that the one Nard found on a float in the sea, with the sign of the Legion on his chest?");
@@ -18,6 +19,10 @@
next;
closeclientdialog;
setmount 0;
+ if (.@q == 1) {
+ warp "000-0-1", 26, 28;
+ close;
+ }
warp "008-1-1", 33, 63;
dispbottom l("After a tiring, yet fast, travel by Koga, you arrive at @@.", l("Woodlands"));
}
diff --git a/npc/012-2-2/sorfina.txt b/npc/012-2-2/sorfina.txt
index 4ba7bec3..be92fa32 100644
--- a/npc/012-2-2/sorfina.txt
+++ b/npc/012-2-2/sorfina.txt
@@ -10,7 +10,7 @@
lg("Welcome, adventurer."),
l("I will never know why people barge in others' houses and get away with it."),
l("Ah, no, I'm not telling you to go away. Visits are always welcome, it gets lonely over time. But I don't have anything to offer you otherwise.");
- if (LEGACY && countitem(ClothesPack)) goto L_Legacy;
+ if (islegacyaccount() && countitem(ClothesPack)) goto L_Legacy;
close;
L_Legacy:
diff --git a/npc/functions/quest-debug/100-General_Narrator.txt b/npc/functions/quest-debug/100-General_Narrator.txt
index 22737c90..37a674c5 100644
--- a/npc/functions/quest-debug/100-General_Narrator.txt
+++ b/npc/functions/quest-debug/100-General_Narrator.txt
@@ -14,7 +14,8 @@ function script QuestDebug100 {
GenericQuestDebug General_Narrator,
l("Game introduction"), 0,
- l("Visited Artis at least once"), 1;
+ l("Arrived in Artis"), 1,
+ l("Arrived in Argaes"), 2;
if (@menuret < 0)
{