summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-20 15:17:33 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-20 15:17:33 -0300
commitd890751e6fad356e92c01839aa638378e0c48967 (patch)
tree16c2d567575280cbb266766451be104abc2b3b72 /npc
parent8e2e752da8739b4c8bda1209365924183ac176cf (diff)
downloadserverdata-d890751e6fad356e92c01839aa638378e0c48967.tar.gz
serverdata-d890751e6fad356e92c01839aa638378e0c48967.tar.bz2
serverdata-d890751e6fad356e92c01839aa638378e0c48967.tar.xz
serverdata-d890751e6fad356e92c01839aa638378e0c48967.zip
Rework Blue Sage logic
Diffstat (limited to 'npc')
-rw-r--r--npc/020-7-1/janitors.txt32
-rw-r--r--npc/020-7-1/pagefinders.txt10
-rw-r--r--npc/020-7-1/pagemakers.txt23
-rw-r--r--npc/020-7/elias.txt18
-rw-r--r--npc/020-7/workers.txt15
5 files changed, 63 insertions, 35 deletions
diff --git a/npc/020-7-1/janitors.txt b/npc/020-7-1/janitors.txt
index 8ee068754..b94147df9 100644
--- a/npc/020-7-1/janitors.txt
+++ b/npc/020-7-1/janitors.txt
@@ -17,6 +17,7 @@
end;
OnInit:
+ .bsId=BS_NPC06;
.sex=G_MALE;
.distance=5;
npcsit;
@@ -68,6 +69,8 @@ OnInit:
function askQuestion {
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
.@qt=getq2(NivalisQuest_BlueSageSlimes);
next;
@@ -103,8 +106,8 @@ function askQuestion {
next;
mesn;
mesq l("I really wonder how that accident could've happened. I'd have never expected him to mess something up like that.");
- if (is_between(4, 7, .@q))
- setq1 NivalisQuest_BlueSage, .@q + 3;
+ if (!(.@q3 & .bsId))
+ setq3 NivalisQuest_BlueSage, .@q3 | .bsId;
break;
}
} while (@menu != 4);
@@ -112,6 +115,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC05;
.sex=G_FEMALE;
.distance=5;
npcsit;
@@ -163,6 +167,8 @@ OnInit:
function askQuestion {
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
.@qt=getq2(NivalisQuest_BlueSageSlimes);
next;
@@ -198,9 +204,8 @@ function askQuestion {
next;
mesn;
mesq l("I tried to keep an eye on him after that, but when I got distracted by some newly arriving visitor he went over to the workshop again! Usually I enjoy my job, because I like talking to people, but this guy... was a pain, really.");
- // It's safe in this context, don't worry
- if (.@qs % 3 == 0)
- setq1 NivalisQuest_BlueSage, .@q + 1;
+ if (!(.@q2 & .bsId))
+ setq2 NivalisQuest_BlueSage, .@q2 | .bsId;
break;
case 3:
mesn;
@@ -212,6 +217,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC04;
.sex=G_MALE;
.distance=5;
end;
@@ -266,6 +272,8 @@ OnInit:
function askQuestion {
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
.@qt=getq2(NivalisQuest_BlueSageSlimes);
next;
@@ -293,9 +301,8 @@ function askQuestion {
next;
mesn;
mesq l("But still, he can't just walk in there, fiddle with the experiments and disturb the helpers doing their work.");
- // It's safe in this context, don't worry
- if (.@qs % 3 == 0)
- setq1 NivalisQuest_BlueSage, .@q + 1;
+ if (!(.@q2 & .bsId))
+ setq2 NivalisQuest_BlueSage, .@q2 | .bsId;
break;
case 3:
mesn;
@@ -307,6 +314,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC05;
.sex=G_MALE;
.distance=5;
end;
@@ -353,6 +361,8 @@ OnInit:
function askQuestion {
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
.@qt=getq2(NivalisQuest_BlueSageSlimes);
next;
@@ -385,9 +395,8 @@ function askQuestion {
next;
mesn;
mesq l("Visitors should keep away from those!");
- // It's safe in this context, don't worry
- if (.@qs % 3 == 0)
- setq1 NivalisQuest_BlueSage, .@q + 1;
+ if (!(.@q2 & .bsId))
+ setq2 NivalisQuest_BlueSage, .@q2 | .bsId;
break;
case 3:
mesn;
@@ -399,6 +408,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC06;
.sex=G_FEMALE;
.distance=5;
end;
diff --git a/npc/020-7-1/pagefinders.txt b/npc/020-7-1/pagefinders.txt
index 0a9defcee..719b7da6b 100644
--- a/npc/020-7-1/pagefinders.txt
+++ b/npc/020-7-1/pagefinders.txt
@@ -18,6 +18,7 @@
end;
OnInit:
+ .bsId=BS_NPC07;
.sex=G_MALE;
.distance=5;
npcsit;
@@ -56,6 +57,8 @@ OnInit:
function askQuestion {
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
.@qt=getq3(NivalisQuest_BlueSage);
next;
@@ -150,6 +153,8 @@ OnInit:
function askQuestion {
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
.@qt=getq3(NivalisQuest_BlueSage);
next;
@@ -178,8 +183,8 @@ function askQuestion {
next;
mesn;
mesq l("But to be fair, from what I've seen Peetu was always very attentive and dutiful.");
- if (is_between(4, 7, .@q))
- setq1 NivalisQuest_BlueSage, .@q + 3;
+ if (!(.@q3 & .bsId))
+ setq3 NivalisQuest_BlueSage, .@q3 | .bsId;
break;
}
} while (@menu != 4);
@@ -187,6 +192,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC07;
.sex=G_MALE;
.distance=5;
npcsit;
diff --git a/npc/020-7-1/pagemakers.txt b/npc/020-7-1/pagemakers.txt
index 1158b62d6..e54a7641b 100644
--- a/npc/020-7-1/pagemakers.txt
+++ b/npc/020-7-1/pagemakers.txt
@@ -96,6 +96,8 @@ function askQuestion {
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qt=getq2(NivalisQuest_BlueSagePagemaker);
next;
select
@@ -115,8 +117,8 @@ function askQuestion {
next;
mesn;
mesq l("That's why I'm really confused about this situation, since he was the one performing the sealing of the slimes. I wonder what went wrong.");
- if (is_between(4, 7, .@q))
- setq1 NivalisQuest_BlueSage, .@q + 3;
+ if (!(.@q3 & .bsId))
+ setq3 NivalisQuest_BlueSage, .@q3 | .bsId;
break;
case 4:
close;
@@ -126,6 +128,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC02;
.sex=G_MALE;
.distance=5;
npcsit;
@@ -198,6 +201,8 @@ function askQuestion {
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qt=getq2(NivalisQuest_BlueSagePagemaker);
next;
select
@@ -214,9 +219,8 @@ function askQuestion {
mesn;
mesc l("She shakes her head.");
mesq l("Sometimes I think it'd be better not to allow visitors here. But Nikolai set a high value on keeping contact with the population. Politics.");
- // It's safe in this context, don't worry
- if (.@q % 3 == 0)
- setq1 NivalisQuest_BlueSage, .@q + 1;
+ if (!(.@q2 & .bsId))
+ setq2 NivalisQuest_BlueSage, .@q2 | .bsId;
break;
case 3:
mesn;
@@ -229,6 +233,7 @@ function askQuestion {
return;
}
OnInit:
+ .bsId=BS_NPC02;
.sex=G_FEMALE;
.distance=5;
end;
@@ -263,6 +268,7 @@ OnInit:
end;
OnInit:
+ .bsId=BS_NPC03;
.sex=G_MALE;
.distance=5;
npcsit;
@@ -336,6 +342,8 @@ function askQuestion {
.@qs=BSQuestion(getq(NivalisQuest_BlueSage));
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
.@qt=getq2(NivalisQuest_BlueSagePagemaker);
next;
select
@@ -355,8 +363,8 @@ function askQuestion {
next;
mesn;
mesq l("I really wonder what went wrong. I can't imagine Peetu messing up something so important.");
- if (is_between(4, 7, .@q))
- setq1 NivalisQuest_BlueSage, .@q + 3;
+ if (!(.@q3 & .bsId))
+ setq3 NivalisQuest_BlueSage, .@q3 | .bsId;
break;
case 4:
mesn;
@@ -368,6 +376,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC04;
.sex=G_MALE;
.distance=5;
end;
diff --git a/npc/020-7/elias.txt b/npc/020-7/elias.txt
index 2c60ce465..14f171ef9 100644
--- a/npc/020-7/elias.txt
+++ b/npc/020-7/elias.txt
@@ -10,11 +10,10 @@
// NivalisQuest_BlueSage STRUCTURE
// FIELD 1:
// INVESTIGATION
-// 1 - ACCESS GRANTED
-// 2~11 - FOLLOW LOGIC
+// 1 - STBY OUTSIDE
+// 2 - ACCESS GRANTED
+// 3 - QUEST ASSIGNED BY PEETU
// 12 - COMPLETE
-// 13 - STDBY OUTSIDE
-// 14 - STDBY INSIDE
// FIELD 2:
// Bitwise (BS_QVISITOR)
// FIELD 3:
@@ -23,7 +22,7 @@
020-7,44,41,0 script #BlueSageEntry NPC_HIDDEN,1,1,{
OnTouch:
.@q=getq(NivalisQuest_BlueSage);
- if (!.@q || .@q == 13) {
+ if (.@q < 2) {
slide 42, 43;
doevent "Elias::OnAccessDenied";
}
@@ -38,9 +37,8 @@ OnTouch:
function eliasConfirmed;
mesn;
mesq l("Hello, and welcome to Blue Sage's Residence, Library, and Nivalis Townhall.");
- // TODO
.@q=getq(NivalisQuest_BlueSage);
- if (.@q && .@q != 13)
+ if (.@q >= 2)
goto L_Main;
next;
mesn;
@@ -50,7 +48,7 @@ OnTouch:
select
l("That's sad to hear."),
rif(.@qn == 10 && !.@q, l("I have a letter from Rakinorf.")),
- rif(.@q == 13, l("So? How was it?")),
+ rif(.@q == 1, l("So? How was it?")),
l("What happened?");
mes "";
switch (@menu) {
@@ -60,7 +58,7 @@ OnTouch:
next;
mesn;
mesq l("Please wait here a short while.");
- setq NivalisQuest_BlueSage, 13, 0, 0;
+ setq NivalisQuest_BlueSage, 1, 0, 0;
break;
case 3:
mesn;
@@ -71,7 +69,7 @@ OnTouch:
next;
mesn;
mesq l("You may pass. The Sage is on the library waiting for you.");
- setq NivalisQuest_BlueSage, 14, 0, 0;
+ setq NivalisQuest_BlueSage, 2, 0, 0;
break;
case 4:
mesn;
diff --git a/npc/020-7/workers.txt b/npc/020-7/workers.txt
index 5643c9389..b5d2f734e 100644
--- a/npc/020-7/workers.txt
+++ b/npc/020-7/workers.txt
@@ -26,6 +26,8 @@ function askQuestion {
.@qs=getarg(0);
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
next;
select
rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")),
@@ -43,8 +45,8 @@ function askQuestion {
next;
mesn;
mesq l("If Nikolai's helpers weren't so carefully chosen, I'd think this was some kind of a bad joke from someone.");
- if (is_between(4, 7, .@q))
- setq1 NivalisQuest_BlueSage, .@q + 3;
+ if (!(.@q3 & .bsId))
+ setq3 NivalisQuest_BlueSage, .@q3 | .bsId;
break;
}
} while (@menu != 3);
@@ -52,6 +54,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC01;
.sex=G_MALE;
.distance=5;
npcsit;
@@ -125,6 +128,8 @@ function askQuestion {
.@qs=getarg(0);
do {
.@q=getq(NivalisQuest_BlueSage);
+ .@q2=getq2(NivalisQuest_BlueSage);
+ .@q3=getq3(NivalisQuest_BlueSage);
next;
select
rif(.@qs & BS_QVISITOR, l("Do you know anything about the strange visitor?")),
@@ -135,9 +140,8 @@ function askQuestion {
case 1:
mesn;
mesq l("With a mask? Yeah, I remember. That was a strange guy. He came to visit the library, but he lurked around at the workshop area and they had to send him back to the books.");
- // It's safe in this context, don't worry
- if (.@q % 3 == 0)
- setq1 NivalisQuest_BlueSage, .@q + 1;
+ if (!(.@q2 & .bsId))
+ setq2 NivalisQuest_BlueSage, .@q2 | .bsId;
break;
case 2:
mesn;
@@ -149,6 +153,7 @@ function askQuestion {
}
OnInit:
+ .bsId=BS_NPC01;
.sex=G_FEMALE;
.distance=5;
npcsit;