From d890751e6fad356e92c01839aa638378e0c48967 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 20 May 2019 15:17:33 -0300 Subject: Rework Blue Sage logic --- npc/020-7-1/janitors.txt | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'npc/020-7-1/janitors.txt') 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; -- cgit v1.2.3-60-g2f50