summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/009-1/milly.txt6
-rw-r--r--world/map/npc/020-1/well.txt32
-rw-r--r--world/map/npc/020-2/baktar.txt90
-rw-r--r--world/map/npc/031-1/angelaOutside.txt65
-rw-r--r--world/map/npc/031-1/house.txt15
-rw-r--r--world/map/npc/031-2/angelaHouse.txt22
-rw-r--r--world/map/npc/031-2/cindyHouse.txt10
-rw-r--r--world/map/npc/031-4/cindyCave.txt38
-rw-r--r--world/map/npc/048-2/bluesageConfig.txt9
-rw-r--r--world/map/npc/048-2/helperAccused.txt25
-rw-r--r--world/map/npc/048-2/helperBookpages1.txt13
-rw-r--r--world/map/npc/048-2/helperBookpages2.txt8
-rw-r--r--world/map/npc/048-2/helperBookpages3.txt13
-rw-r--r--world/map/npc/048-2/helperChief.txt19
-rw-r--r--world/map/npc/048-2/helperCleaning1.txt13
-rw-r--r--world/map/npc/048-2/helperCleaning2.txt13
-rw-r--r--world/map/npc/048-2/helperCleaning3.txt13
-rw-r--r--world/map/npc/048-2/helperCleaning4.txt13
-rw-r--r--world/map/npc/048-2/helperCleaning5.txt13
-rw-r--r--world/map/npc/048-2/helperJanitor.txt38
-rw-r--r--world/map/npc/048-2/helperMInk.txt13
-rw-r--r--world/map/npc/048-2/helperMReed.txt18
-rw-r--r--world/map/npc/048-2/helperMSilk.txt13
-rw-r--r--world/map/npc/048-2/helperMYetiClaw.txt13
-rw-r--r--world/map/npc/048-2/helperResting1.txt13
-rw-r--r--world/map/npc/048-2/helperResting2.txt13
-rw-r--r--world/map/npc/048-2/sageNikolai.txt28
27 files changed, 211 insertions, 368 deletions
diff --git a/world/map/npc/009-1/milly.txt b/world/map/npc/009-1/milly.txt
index f1408619..a32f7617 100644
--- a/world/map/npc/009-1/milly.txt
+++ b/world/map/npc/009-1/milly.txt
@@ -13,7 +13,7 @@
set @got_boneknife, ((QUEST_Forestbow_state & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT) >= 4;
set @got_setzer, ((QUEST_Forestbow_state & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT) >= 8;
set @saved_rossy, (FLAGS & FLAG_ROSSI_COMPLETED);
- set @saved_cindy, ((QUEST_Nivalis_state & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT) >= 4;
+ set @saved_cindy, QL_CINDY == 4;
if (FLAGS & FLAG_GOT_BEANIEHAT) goto L_FinishedGood;
if (FLAGS & FLAG_DECLINED_BEANIEHAT) goto L_FinishedBad;
@@ -416,7 +416,7 @@ L_DRossy:
close;
L_DCindy:
- set QUEST_Nivalis_state, (QUEST_Nivalis_state & ~(NIBBLE_5_MASK)) | (4 << NIBBLE_5_SHIFT);
+ set QL_CINDY, 4;
mes "Cindy quest set to completed.";
close;
@@ -442,7 +442,7 @@ L_NRossy:
close;
L_NCindy:
- set QUEST_Nivalis_state, (QUEST_Nivalis_state & ~(NIBBLE_5_MASK)) | (0 << NIBBLE_5_SHIFT);
+ set QL_CINDY, 0;
mes "Cindy quest set to not completed.";
close;
diff --git a/world/map/npc/020-1/well.txt b/world/map/npc/020-1/well.txt
index a4513536..5c9c9d75 100644
--- a/world/map/npc/020-1/well.txt
+++ b/world/map/npc/020-1/well.txt
@@ -16,11 +16,7 @@
020-1,99,83,0|script|#Well|400
{
- set @Q_MASK, NIBBLE_4_MASK;
- set @Q_SHIFT, NIBBLE_4_SHIFT;
- set @Q_status, ((QUEST_Nivalis_state) & @Q_MASK) >> @Q_SHIFT;
-
- if(@Q_status == 2) goto L_Finished;
+ if(QL_WELL == 2) goto L_Finished;
set @item_ID, 0;
setarray @quote_item$, "Yuck! Who has thrown that on me?","Ouch! Who hurts me?","White powder!? What's going on up there?","Ahw! It's raining ","","","";
@@ -76,8 +72,7 @@ L_MenuItems1:
set @quote$, "";
mes "[Mysterious voice inside the well]";
mes "\" "+ @quote$ +". So if you can call help for me... please do so!\"";
- set @Q_status, 1;
- callsub S_Update_Var;
+ set QL_WELL, 1;
close;
L_NO_ITEM:
@@ -90,24 +85,14 @@ L_Finished:
L_Close:
close;
-
-S_Update_Var:
- set QUEST_Nivalis_state,
- (QUEST_Nivalis_state & ~(@Q_MASK)
- | (@Q_status << @Q_SHIFT));
- return;
}
020-2,100,28,0|script|Miler|100
{
- set @Q_MASK, NIBBLE_4_MASK;
- set @Q_SHIFT, NIBBLE_4_SHIFT;
- set @Q_status, ((QUEST_Nivalis_state) & @Q_MASK) >> @Q_SHIFT;
-
mes "[Miler]";
mes "\"Hello!\"";
- if(@Q_status == 2) close;
- if(@Q_status == 1)
+ if(QL_WELL == 2) close;
+ if(QL_WELL == 1)
menu
"Hello.", L_Close,
"Hello, Can you help me?", L_HELP;
@@ -122,16 +107,9 @@ L_Next:
mes "[Miler]";
mes "\"Ho! I'll help him!\"";
getexp (BaseLevel * 111), 0;
- set @Q_status, 2;
- callsub S_Update_Var;
+ set QL_WELL, 2;
close;
L_Close:
close;
-
-S_Update_Var:
- set QUEST_Nivalis_state,
- (QUEST_Nivalis_state & ~(@Q_MASK)
- | (@Q_status << @Q_SHIFT));
- return;
}
diff --git a/world/map/npc/020-2/baktar.txt b/world/map/npc/020-2/baktar.txt
index 660ea92d..9f0a878c 100644
--- a/world/map/npc/020-2/baktar.txt
+++ b/world/map/npc/020-2/baktar.txt
@@ -2,15 +2,11 @@
//#== NPC Baktar
//# Authors: Lien, PjotrOrial
//# Review: BigCrunch, Mistakes, Jenalya
-//# This NPC has two stages:
+//# This NPC has one stage:
//#
-//# In the first stage you need to bring 7 different items, but only one of each kind.
+//# you need to bring 7 different items, but only one of each kind.
//#
-//# In the second stage he tells you what hard life he is living. He will be very aggressive telling you some stuff.
-//# He will send you to kill Scroticular. That npc will be located in the labyrinth caves.
-//# (its a mob actually, to be spawned only, if the players knows his name and his location)
-//#
-//# variables used:
+//# variable used:
//# @QUEST_Nivalis_state: NIBBLE0, NIBBLE1, NIBBLE2, NIBBLE3:
//# BYTE0 ( == NIBBLE0 | NIBBLE1) stores in each bit information if that item was already brought.
//# bits:
@@ -22,31 +18,11 @@
//# bit 5 eggs_Item
//# bit 6 skin_Item
//# bit 7 bugleg
-//# NIBBLE2 store the progress after the item collecting stage:
-//# =0 he will thank you for bringing all stuff.
-//# =1 talking about his youth
-//# =2 talking, you get the mission to hunt down Scroticular
-//# =3 you get information where Scroticular can be found.
-//# NIBBLE3 a bitmasking nibble for stage 2 again
-//# bit 0 knows the name/location of the opponent
-//# bit 1 killed the ugly opponent
//#=========================
020-2,70,61,0|script|Baktar|191
{
set @npcname$, "[Baktar]";
- set @Q_MASK, BYTE_0_MASK;
- set @Q_SHIFT, BYTE_0_SHIFT;
- set @Q_status, ((QUEST_Nivalis_state) & @Q_MASK) >> @Q_SHIFT;
-
- set @Q_MASK2, NIBBLE_2_MASK;
- set @Q_SHIFT2, NIBBLE_2_SHIFT;
- set @Q_status2, ((QUEST_Nivalis_state) & @Q_MASK2) >> @Q_SHIFT2;
-
- set @Q_MASK2_BITS, NIBBLE_3_MASK;
- set @Q_SHIFT2_BITS, NIBBLE_3_SHIFT;
- set @Q_status2_bits, ((QUEST_Nivalis_state) & @Q_MASK2_BITS) >> @Q_SHIFT2_BITS;
-
set @BIT_KNOWHIM, 0;
set @BIT_DESERTHAT,1;
@@ -100,7 +76,7 @@ L_Start:
if(!Sex)
set @type$, "woman";
- if(@Q_status & (1<<@BIT_KNOWHIM)) goto L_KnowAlready;
+ if(QL_BAKTAR & (1<<@BIT_KNOWHIM)) goto L_KnowAlready;
mes @npcname$;
mes "\"Hello, " + @type$ + ", did you come from Tulimshar? Because you have a nice tan. \"";
menu
@@ -124,51 +100,50 @@ L_exotic:
L_startitem:
setarray @exotic_item$, "", "", "", "", "", "", "";
set @c, 0;
- set @Q_status, @Q_status | (1<<@BIT_KNOWHIM);
- callsub S_Update_Var;
- if (countitem("DesertHat") < 1 || @Q_status & (1<<@BIT_DESERTHAT) ) goto L_DesertShirt;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_KNOWHIM);
+ if (countitem("DesertHat") < 1 || QL_BAKTAR & (1<<@BIT_DESERTHAT) ) goto L_DesertShirt;
set @exotic_item$[@c], "a Desert Hat ?";
set @menuid[@c], 0;
set @c, @c + 1;
goto L_DesertShirt;
L_DesertShirt:
- if (countitem("DesertShirt") < 1 || @Q_status & (1<<@BIT_DESERTSHIRT) ) goto L_SerfHat;
+ if (countitem("DesertShirt") < 1 || QL_BAKTAR & (1<<@BIT_DESERTSHIRT) ) goto L_SerfHat;
set @exotic_item$[@c], "a Desert Shirt ?";
set @menuid[@c], 1;
set @c, @c + 1;
goto L_SerfHat;
L_SerfHat:
- if (countitem("SerfHat") < 1 || @Q_status & (1<<@BIT_SERFHAT) ) goto L_tongue;
+ if (countitem("SerfHat") < 1 || QL_BAKTAR & (1<<@BIT_SERFHAT) ) goto L_tongue;
set @exotic_item$[@c], "a Serf Hat ?";
set @menuid[@c], 2;
set @c, @c + 1;
goto L_tongue;
L_tongue:
- if (countitem("MountainSnakeTongue") < 1 || @Q_status & (1<<@BIT_MS_TONGUE)) goto L_egg;
+ if (countitem("MountainSnakeTongue") < 1 || QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_egg;
set @exotic_item$[@c], "a Mountain Snake Tongue ?";
set @menuid[@c], 3;
set @c, @c + 1;
goto L_egg;
L_egg:
- if (countitem("MountainSnakeEgg") < 1 || @Q_status & (1<<@BIT_MS_EGG)) goto L_Skin;
+ if (countitem("MountainSnakeEgg") < 1 || QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_Skin;
set @exotic_item$[@c], "a Mountain Snake Egg?";
set @menuid[@c], 4;
set @c, @c + 1;
goto L_Skin;
L_Skin:
- if (countitem("SnakeSkin") < 1 || @Q_status & (1<<@BIT_SNAKESKIN)) goto L_bugleg;
+ if (countitem("SnakeSkin") < 1 || QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_bugleg;
set @exotic_item$[@c], "a Snake Skin?";
set @menuid[@c], 5;
set @c, @c + 1;
goto L_bugleg;
L_bugleg:
- if (countitem("BugLeg") < 1 || @Q_status & (1<<@BIT_BUGLEG)) goto L_NeverMind;
+ if (countitem("BugLeg") < 1 || QL_BAKTAR & (1<<@BIT_BUGLEG)) goto L_NeverMind;
set @exotic_item$[@c], "a Bug Leg?";
set @menuid[@c], 6;
set @c, @c + 1;
@@ -203,73 +178,66 @@ L_MenuItems:
close;
L_DesertHat_Item:
- if(@Q_status & (1<<@BIT_DESERTHAT)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_DESERTHAT)) goto L_havealready;
if (countitem("DesertHat") < 1) goto L_Noitem;
delitem "DesertHat", 1;
set Zeny, Zeny + @MONEY_DESERTHAT;
getexp @XP_DESERTHAT,0;
- set @Q_status, @Q_status | (1<<@BIT_DESERTHAT);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_DESERTHAT);
close;
L_DesertShirt_Item:
- if(@Q_status & (1<<@BIT_DESERTSHIRT)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_DESERTSHIRT)) goto L_havealready;
if (countitem("DesertShirt") < 1) goto L_Noitem;
delitem "DesertShirt", 1;
set Zeny, Zeny + @MONEY_DESERTSHIRT;
getexp @XP_DESERTSHIRT,0;
- set @Q_status, @Q_status | (1<<@BIT_DESERTSHIRT);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_DESERTSHIRT);
close;
L_SerfHat_Item:
- if(@Q_status & (1<<@BIT_SERFHAT)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_SERFHAT)) goto L_havealready;
if (countitem("SerfHat") < 1) goto L_Noitem;
delitem "SerfHat", 1;
set Zeny, Zeny + @MONEY_SERFHAT;
getexp @XP_SERFHAT,0;
- set @Q_status, @Q_status | (1<<@BIT_SERFHAT);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_SERFHAT);
close;
L_tongue_Item:
- if(@Q_status & (1<<@BIT_MS_TONGUE)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_havealready;
if (countitem("MountainSnakeTongue") < 1) goto L_Noitem;
delitem "MountainSnakeTongue", 1;
set Zeny, Zeny + @MONEY_MS_TONGUE;
getexp @XP_MS_TONGUE,0;
- set @Q_status, @Q_status | (1<<@BIT_MS_TONGUE);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_MS_TONGUE);
close;
L_egg_Item:
- if(@Q_status & (1<<@BIT_MS_EGG)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_havealready;
if (countitem("MountainSnakeEgg") < 1) goto L_Noitem;
delitem "MountainSnakeEgg", 1;
set Zeny, Zeny + @MONEY_MS_EGG;
getexp @XP_MS_EGG,0;
- set @Q_status, @Q_status | (1<<@BIT_MS_EGG);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_MS_EGG);
close;
L_skin_Item:
- if(@Q_status & (1<<@BIT_SNAKESKIN)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_havealready;
if (countitem("SnakeSkin") < 1) goto L_Noitem;
delitem "SnakeSkin", 1;
set Zeny, Zeny + @MONEY_SNAKESKIN;
getexp @XP_SNAKESKIN,0;
- set @Q_status, @Q_status | (1<<@BIT_SNAKESKIN);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_SNAKESKIN);
close;
L_BugLegItem:
- if(@Q_status & (1<<@BIT_BUGLEG)) goto L_havealready;
+ if(QL_BAKTAR & (1<<@BIT_BUGLEG)) goto L_havealready;
if (countitem("BugLeg") < 1) goto L_Noitem;
delitem "BugLeg", 1;
set Zeny, Zeny + @MONEY_BUGLEG;
getexp @XP_BUGLEG,0;
- set @Q_status, @Q_status | (1<<@BIT_BUGLEG);
- callsub S_Update_Var;
+ set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_BUGLEG);
close;
L_Noitem:
@@ -284,10 +252,4 @@ L_havealready:
L_Close:
close;
-
-S_Update_Var:
- set QUEST_Nivalis_state,
- (QUEST_Nivalis_state & ~(@Q_MASK)
- | (@Q_status << @Q_SHIFT));
- return;
}
diff --git a/world/map/npc/031-1/angelaOutside.txt b/world/map/npc/031-1/angelaOutside.txt
index 17bfff00..322cbfb0 100644
--- a/world/map/npc/031-1/angelaOutside.txt
+++ b/world/map/npc/031-1/angelaOutside.txt
@@ -4,31 +4,61 @@
// state2 and state3: Cindy is saved Angela invites you to visit them for giving a reward
// state greater than 3: Angela invites and asks you to bring present boxes
-031-1,79,24,0|script|Angela|195
+031-1,81,24,0|script|Debug#Angela|195
{
- set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
- set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
+ mes "Current state: " + QL_CINDY;
+ mes "---";
+ mes "Available states:";
+ mes "0 - can not do the quest.";
+ mes "5 - does not have the quest.";
+ mes "6 - got the quest.";
+ mes "1 - can go rescue cindy.";
+ mes "2 - rescued cindy.";
+ mes "3 - got reward from cindy.";
+ mes "4 - got reward from angela.";
+ menu
+ "set state", L_Set,
+ "close", L_Close;
+
+L_Set:
+ input @state;
+ if(@state < 0 || @state > 6) set @state, 0;
+ set QL_CINDY, @state;
+ goto L_Close;
- set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
+L_Close:
+ close;
+
+OnInit:
+ if (!debug) disablenpc strnpcinfo(0);
+ end;
+}
+031-1,79,24,0|script|Angela|195,15,15
+{
set @minlevel, 70;
- if (@rescue_Cindy > 3) goto L_Please_Visit_Again;
- if (@rescue_Cindy > 1) goto L_Please_Visit;
- if (@rescue_Cindy == 1) goto L_Please_Help;
+ if (QL_CINDY == 3) goto L_Please_Visit_Again;
+ if (QL_CINDY > 1 && QL_CINDY < 5) goto L_Please_Visit;
+ if (QL_CINDY == 1) goto L_Please_Help;
mes "[Angela]";
mes "\"Please, I need help! My little daughter!\"";
next;
mes "\"It's terrible, oh my dear child!\"";
next;
- if (countitem("ConcentrationPotion") > 0 && BaseLevel >= @minlevel)
+ if (countitem("ConcentrationPotion") > 0 && BaseLevel >= @minlevel && QL_CINDY == 6)
goto L_Menu_Potion;
menu
"\"Please calm down and tell me what happened.\"", L_Whining,
"Leave", L_Close;
+OnTouch:
+ if(BaseLevel >= @minlevel && !QL_CINDY)
+ set QL_CINDY, 5;
+ end;
+
L_Whining:
mes "[Angela]";
mes "\"My poor little daughter, please! Oh no, oh no...\"";
@@ -50,6 +80,13 @@ L_Whining:
mes "She is crying and sobbing.";
next;
mes "It seems she is too upset to tell you anything helpful. If she would just calm down and concentrate a bit...";
+ if(BaseLevel >= @minlevel) goto L_GetQuest;
+ goto L_Close;
+
+L_GetQuest:
+ next;
+ set QL_CINDY, 6;
+ mes "Perhaps you could give her something to help concentrate ?";
goto L_Close;
L_Menu_Potion:
@@ -75,8 +112,7 @@ L_Calm_Down:
mes "\"Oh my poor little girl. I'm so worried - what might they do with her? Oh no!\"";
next;
mes "\"You look like an adventurer! Please, can you go in that cave and rescue my little Cindy? I beg you for help!\"";
- set @rescue_Cindy, 1;
- callsub S_Update_Mask;
+ set QL_CINDY, 1;
goto L_Close;
L_No_Potion:
@@ -103,15 +139,6 @@ L_Please_Visit_Again:
goto L_Close;
L_Close:
- set @Q_Nivalis_state_MASK, 0;
- set @Q_Nivalis_state_SHIFT, 0;
- set @rescue_Cindy, 0;
set @minlevel, 0;
close;
-
-S_Update_Mask:
- set QUEST_Nivalis_state,
- (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK))
- | (@rescue_Cindy << @Q_Nivalis_state_SHIFT);
- return;
}
diff --git a/world/map/npc/031-1/house.txt b/world/map/npc/031-1/house.txt
index c64009ba..f7ffb549 100644
--- a/world/map/npc/031-1/house.txt
+++ b/world/map/npc/031-1/house.txt
@@ -4,19 +4,10 @@
031-1,95,80,0|script|#Door|45,0,0
{
- set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
- set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
-
- set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
-
- if (@rescue_Cindy > 2)
+ if (QL_CINDY == 3 || QL_CINDY == 4)
goto L_Warp;
- message strcharinfo(0), "The door is locked.";
-
- set @Q_Nivalis_state_MASK, 0;
- set @Q_Nivalis_state_SHIFT, 0;
- set @rescue_Cindy, 0;
- close;
+ message strcharinfo(0), "##3Door : ##BThe door is locked.";
+ end;
L_Warp:
warp "031-2", 23, 28;
diff --git a/world/map/npc/031-2/angelaHouse.txt b/world/map/npc/031-2/angelaHouse.txt
index 3fe6f023..11eeaff6 100644
--- a/world/map/npc/031-2/angelaHouse.txt
+++ b/world/map/npc/031-2/angelaHouse.txt
@@ -5,13 +5,8 @@
031-2,29,28,0|script|Angela#house|196
{
- set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
- set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
-
- set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
-
- if (@rescue_Cindy == 4) goto L_Hello_Again;
- if (@rescue_Cindy == 3) goto L_Reward;
+ if (QL_CINDY == 4) goto L_Hello_Again;
+ if (QL_CINDY == 3) goto L_Reward;
mes "...";
goto L_Close;
@@ -30,8 +25,7 @@ L_Reward:
if (@inventorylist_count == 100)
goto L_Full_Inv;
getitem "RockKnife", 1;
- set @rescue_Cindy, 4;
- callsub S_Update_Mask;
+ set QL_CINDY, 4;
next;
mes "\"I hope this will be useful for you.\"";
@@ -87,10 +81,6 @@ L_White:
goto L_Close;
L_Close:
- set @Q_Nivalis_state_MASK, 0;
- set @Q_Nivalis_state_SHIFT, 0;
- set @rescue_Cindy, 0;
-
set @dq_level, 0;
set @dq_cost, 0;
set @dq_count, 0;
@@ -100,10 +90,4 @@ L_Close:
set @dq_exp, 0;
set @dq_return, 0;
close;
-
-S_Update_Mask:
- set QUEST_Nivalis_state,
- (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK))
- | (@rescue_Cindy << @Q_Nivalis_state_SHIFT);
- return;
}
diff --git a/world/map/npc/031-2/cindyHouse.txt b/world/map/npc/031-2/cindyHouse.txt
index bd4c17fb..c1f0c1e3 100644
--- a/world/map/npc/031-2/cindyHouse.txt
+++ b/world/map/npc/031-2/cindyHouse.txt
@@ -4,12 +4,7 @@
031-2,27,26,0|script|Cindy#house|197
{
- set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
- set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
-
- set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
-
- if (@rescue_Cindy > 2) goto L_Happy_Random;
+ if (QL_CINDY == 3 || QL_CINDY == 4) goto L_Happy_Random;
mes "...";
goto L_Close;
@@ -44,9 +39,6 @@ L_Candy:
goto L_Close;
L_Close:
- set @Q_Nivalis_state_MASK, 0;
- set @Q_Nivalis_state_SHIFT, 0;
- set @rescue_Cindy, 0;
set @candy, 0;
set @inventorylist_count, 0;
set @random, 0;
diff --git a/world/map/npc/031-4/cindyCave.txt b/world/map/npc/031-4/cindyCave.txt
index 218e4c08..68bb3f05 100644
--- a/world/map/npc/031-4/cindyCave.txt
+++ b/world/map/npc/031-4/cindyCave.txt
@@ -11,17 +11,12 @@
set @KEYS_AMOUNT, 10;
set @minlevel, 70;
- set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
- set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
-
- set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
-
if (Sex == 0) set @title$, "Misses";
if (Sex == 1) set @title$, "Mister";
- if (@rescue_Cindy >= 3) goto L_Please_Visit;
- if (@rescue_Cindy == 2) goto L_Reward;
- if (@rescue_Cindy == 1) goto L_Please_Help;
+ if (QL_CINDY == 4) goto L_Please_Visit;
+ if (QL_CINDY == 2) goto L_Reward;
+ if (QL_CINDY == 1) goto L_Please_Help;
mes "There is a little girl in a cage. As you come near, she starts to shiver and back off from you as far as she can in that small cage.";
next;
@@ -89,16 +84,14 @@ L_Reward:
if (@reward < 10)
goto L_Wizard_Hat;
getitem "WoodenStaff", 1;
- set @rescue_Cindy, 3;
- callsub S_Update_Mask;
+ set QL_CINDY, 3;
goto L_Visit;
L_Wizard_Hat:
// get a wizard hat in one of the ten colors - no white
setarray @wizardhats, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209;
getitem @wizardhats[@reward], 1;
- set @rescue_Cindy, 3;
- callsub S_Update_Mask;
+ set QL_CINDY, 3;
goto L_Visit;
L_Visit:
@@ -126,9 +119,6 @@ L_Full_Inv:
L_Close:
set @KEYS_AMOUNT, 0;
- set @Q_Nivalis_state_MASK, 0;
- set @Q_Nivalis_state_SHIFT, 0;
- set @rescue_Cindy, 0;
set @title$, "";
set @minlevel, 0;
set @inventorylist_count, 0;
@@ -216,13 +206,9 @@ OnReward:
set @bonus, (BaseLevel/2);
set DailyQuestBonus, DailyQuestBonus + @bonus;
message strcharinfo(0), "You feel a temporary rush of power and zest for action. " + @bonus + " daily bonus gained." ;
- set @Q_Nivalis_state_MASK, NIBBLE_5_MASK;
- set @Q_Nivalis_state_SHIFT, NIBBLE_5_SHIFT;
- set @rescue_Cindy, ((QUEST_Nivalis_state & @Q_Nivalis_state_MASK) >> @Q_Nivalis_state_SHIFT);
- if (@rescue_Cindy != 1 )
+ if (QL_CINDY != 1 )
goto L_End;
- set @rescue_Cindy, 2;
- callsub S_Update_Mask;
+ set QL_CINDY, 2;
message strcharinfo(0), "Cindy looks relieved and as if she wants to talk with you.";
set BOSS_POINTS, BOSS_POINTS + 70;
message strcharinfo(0), "You gain 70 Boss Points giving you a total of " + BOSS_POINTS + ".";
@@ -230,9 +216,6 @@ OnReward:
L_End:
set @bonus, 0;
- set @Q_Nivalis_state_MASK, 0;
- set @Q_Nivalis_state_SHIFT, 0;
- set @rescue_Cindy, 0;
end;
OnInit:
@@ -250,11 +233,4 @@ OnInit:
"Cindy : Watch your back! There are so many of them!",
"Cindy : This seems to be their final attack! I believe in you!";
end;
-
-/////////
-S_Update_Mask:
- set QUEST_Nivalis_state,
- (QUEST_Nivalis_state & ~(@Q_Nivalis_state_MASK))
- | (@rescue_Cindy << @Q_Nivalis_state_SHIFT);
- return;
}
diff --git a/world/map/npc/048-2/bluesageConfig.txt b/world/map/npc/048-2/bluesageConfig.txt
index bab552f8..9ab3e711 100644
--- a/world/map/npc/048-2/bluesageConfig.txt
+++ b/world/map/npc/048-2/bluesageConfig.txt
@@ -72,9 +72,6 @@ OnInit:
set $@Q_BlueSageMaterialClaw, 0x400;
set $@Q_BlueSageMaterialInk, 0x800;
- set $@Q_BlueSageInvestigate_MASK, NIBBLE_3_MASK;
- set $@Q_BlueSageInvestigate_SHIFT, NIBBLE_3_SHIFT;
-
set $@Q_BlueSageSlimes_MASK, BYTE_2_MASK;
set $@Q_BlueSageSlimes_SHIFT, BYTE_2_SHIFT;
set $@Q_BlueSageSlimesStart, 0x010000;
@@ -103,12 +100,6 @@ function|script|updateBlueSageBookPages
return;
}
-function|script|updateBlueSageInvestigate
-{
- set QUEST_BlueSage, (QUEST_BlueSage & ~($@Q_BlueSageInvestigate_MASK) | (@investigate << $@Q_BlueSageInvestigate_SHIFT));
- return;
-}
-
function|script|blueSageNumberOfClearedNests
{
set @slimenests, 0;
diff --git a/world/map/npc/048-2/helperAccused.txt b/world/map/npc/048-2/helperAccused.txt
index 92043705..96bc6827 100644
--- a/world/map/npc/048-2/helperAccused.txt
+++ b/world/map/npc/048-2/helperAccused.txt
@@ -4,17 +4,15 @@
// Peetu is the person who caused the accident
// involved investigation subquest
-048-2,25,135,0|script|Peetu|366
+048-2,25,135,0|script|Peetu|130
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
-
- if (@investigate >= 12) goto L_Thank;
- if (@investigate > 4) goto L_Investigate;
- if (@investigate > 1) goto L_Query;
- if (@investigate == 1) goto L_Help;
+ if (QL_BSAGE_INVESTIGATE >= 12 && QL_BSAGE_INVESTIGATE < 13) goto L_Thank;
+ if (QL_BSAGE_INVESTIGATE > 4 && QL_BSAGE_INVESTIGATE < 13) goto L_Investigate;
+ if (QL_BSAGE_INVESTIGATE > 1 && QL_BSAGE_INVESTIGATE < 13) goto L_Query;
+ if (QL_BSAGE_INVESTIGATE == 1) goto L_Help;
mes "You see a rather stressed helper, mumbling to himself.";
- if (BaseLevel < $@Q_BlueSageMinimumLevel)
+ if (BaseLevel < $@Q_BlueSageMinimumLevel || !QL_BSAGE_INVESTIGATE)
goto L_Close;
mes "[Peetu]";
mes "\"How could this have happened? I don't understand it... I'm sure I did the sealing correctly. Maybe the ingredients... but that doesn't make sense. They're checked regularly and...\"";
@@ -54,8 +52,7 @@ L_Less:
mes "[Peetu]";
mes "\"Well... but... I mean... I don't know... ";
mes "I have an idea! Would you... ahm, would you talk to Chief Oskari for me? And ask him what he plans to do about me? I... I just don't feel capable of doing that myself right now. I'll try to pull myself together in the meanwhile.\"";
- set @investigate, 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, 1;
goto L_Close;
L_Help:
@@ -106,14 +103,13 @@ L_TextWall:
next;
mes "\"I never tried it, because it makes no sense to do that, but theoretically adding some Silk Cocoons could have such an effect. That's pretty basic nature magic.";
mes "But... how would that have gotten into the ingredients?\"";
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Investigate:
mes "[Peetu]";
mes "\"Hello. Did you find out anything else yet?\"";
- if (@investigate != 11)
+ if (QL_BSAGE_INVESTIGATE != 11)
menu
"I'm still collecting information.",L_Close;
if (@inventorylist_count == 100)
@@ -130,8 +126,6 @@ L_ReallyMore:
next;
mes "\"It isn't much, but please take these Silk Gloves. We use those when we have to protect our hands, but still need to perform magic.\"";
getitem "SilkGloves", 1;
- set @investigate, 12;
- callfunc "updateBlueSageInvestigate";
goto L_Close;
L_Thank:
@@ -145,7 +139,6 @@ L_TooMany:
goto L_Close;
L_Close:
- set @investigate, 0;
set @inventorylist_count, 0;
close;
}
diff --git a/world/map/npc/048-2/helperBookpages1.txt b/world/map/npc/048-2/helperBookpages1.txt
index 519c6279..11dd1054 100644
--- a/world/map/npc/048-2/helperBookpages1.txt
+++ b/world/map/npc/048-2/helperBookpages1.txt
@@ -6,7 +6,6 @@
048-2,104,86,0|script|Ensio|365
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT);
set @old_bookpage_exp, 1000;
@@ -98,9 +97,9 @@ L_NoItem:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -125,10 +124,9 @@ L_Visitor:
next;
mes "\"He was looking around in the library a while, and then came to ask about our research. He seemed to be particularly interested in our experiments with the slimes.";
mes "Heh, I wonder what he would've said if he'd have visited us a little bit later. Mh, now that I think about it, the accident with the slimes happened just the night after he was here.\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -137,7 +135,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @bookpages, 0;
set @old_bookpage_exp, 0;
set @new_bookpage_exp, 0;
diff --git a/world/map/npc/048-2/helperBookpages2.txt b/world/map/npc/048-2/helperBookpages2.txt
index 0b37e060..17de49d5 100644
--- a/world/map/npc/048-2/helperBookpages2.txt
+++ b/world/map/npc/048-2/helperBookpages2.txt
@@ -6,7 +6,6 @@
048-2,94,86,0|script|Henriikka|363
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT);
if (@bookpages == 31) goto L_Thank;
@@ -51,9 +50,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -85,7 +84,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @bookpages, 0;
close;
}
diff --git a/world/map/npc/048-2/helperBookpages3.txt b/world/map/npc/048-2/helperBookpages3.txt
index 20d173e6..c519b139 100644
--- a/world/map/npc/048-2/helperBookpages3.txt
+++ b/world/map/npc/048-2/helperBookpages3.txt
@@ -6,7 +6,6 @@
048-2,99,87,0|script|Teuvo|366
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT);
if (@bookpages == 31) goto L_Thank;
@@ -28,9 +27,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -58,14 +57,12 @@ L_Helper:
mes "[Teuvo]";
mes "\"Peetu? He's one of those magic wielders who think they can do anything. Heh, you see the result here.";
mes "But to be fair, from what I've seen Peetu was always very attentive and dutiful.\"";
- if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @bookpages, 0;
close;
}
diff --git a/world/map/npc/048-2/helperChief.txt b/world/map/npc/048-2/helperChief.txt
index 7eae6f63..5f095aa5 100644
--- a/world/map/npc/048-2/helperChief.txt
+++ b/world/map/npc/048-2/helperChief.txt
@@ -4,17 +4,15 @@
// Chief of the Blue Sage helpers
// involved in investigation subquest
-048-2,146,26,0|script|Oskari|365
+048-2,146,26,0|script|Oskari|134
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
-
- if (@investigate >= 11) goto L_Goodjob;
- if (@investigate > 1) goto L_Investigate;
+ if (QL_BSAGE_INVESTIGATE >= 11 && QL_BSAGE_INVESTIGATE < 13) goto L_Goodjob;
+ if (QL_BSAGE_INVESTIGATE > 1 && QL_BSAGE_INVESTIGATE < 13) goto L_Investigate;
mes "[Oskari]";
mes "\"Hello. Welcome to the residence of the Great Nikolai.";
mes "You have to excuse me, as you might have heard we're having some trouble at the moment and I, as Chief of Nikolai's helpers, have a lot to do.\"";
- if (@investigate == 0)
+ if (QL_BSAGE_INVESTIGATE == 0)
goto L_Close;
menu
"Peetu asked me to talk to you about his mishap.",L_Next,
@@ -37,14 +35,13 @@ L_Next:
mes "Oh, and please tell him that I'm not considering firing him in the current situation. You might need that to calm him down and get meaningful information.\"";
next;
mes "\"You should find out if someone observed anything unusual during the time before the accident happened.\"";
- set @investigate, 2;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, 2;
goto L_Close;
L_Investigate:
mes "[Oskari]";
mes "\"Ah, hello. Did you get an overview over the happenings yet?\"";
- if (@investigate != 10)
+ if (QL_BSAGE_INVESTIGATE != 10)
menu
"I'm still collecting information.",L_Close;
next;
@@ -78,8 +75,7 @@ L_Continue:
mes "\"You were a great help! I'll inform Nikolai about your involvement in clarifying this matter.\"";
next;
mes "\"And you should also talk with Peetu, I'm sure he'll be relieved to hear about the clarification of this matter too.\"";
- set @investigate, 11;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, 11;
goto L_Close;
L_Goodjob:
@@ -123,6 +119,5 @@ L_Conflict:
goto L_Close;
L_Close:
- set @investigate, 0;
close;
}
diff --git a/world/map/npc/048-2/helperCleaning1.txt b/world/map/npc/048-2/helperCleaning1.txt
index d60aa16f..3b5af0dc 100644
--- a/world/map/npc/048-2/helperCleaning1.txt
+++ b/world/map/npc/048-2/helperCleaning1.txt
@@ -7,7 +7,6 @@
048-2,117,106,0|script|Pyry|365
{
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
if (@slimes == 255) goto L_Thank;
if (@slimes > 0) goto L_Progress;
@@ -63,9 +62,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -94,14 +93,12 @@ L_Helper:
mes "\"Peetu? I have always been glad to have him on the team. He's really brought forward our work here.\"";
next;
mes "\"I was very surprised when I heard that he's responsible for the failed sealing spell. I'd never have expected that from him.\"";
- if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @slimes, 0;
close;
}
diff --git a/world/map/npc/048-2/helperCleaning2.txt b/world/map/npc/048-2/helperCleaning2.txt
index 40339364..cdd04c00 100644
--- a/world/map/npc/048-2/helperCleaning2.txt
+++ b/world/map/npc/048-2/helperCleaning2.txt
@@ -7,7 +7,6 @@
048-2,123,87,0|script|Nea|363
{
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
if (@slimes == 255) goto L_Thank;
if (@slimes > 0) goto L_Progress;
@@ -32,9 +31,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -63,14 +62,12 @@ L_Helper:
mes "\"Peetu? Yeah, he's the kind of person who always wants to do things perfectly. That makes it a bit difficult to work with him, since his expectations for others are as high as for himself.\"";
next;
mes "\"I really wonder how that accident with the sealing spell could've happened. I'd have never expected him to mess something up like that.\"";
- if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @slimes, 0;
close;
}
diff --git a/world/map/npc/048-2/helperCleaning3.txt b/world/map/npc/048-2/helperCleaning3.txt
index d1ed35a5..110189cc 100644
--- a/world/map/npc/048-2/helperCleaning3.txt
+++ b/world/map/npc/048-2/helperCleaning3.txt
@@ -7,7 +7,6 @@
048-2,139,99,0|script|Arvo|366
{
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
if (@slimes == 255) goto L_Thank;
if (@slimes > 0) goto L_Progress;
@@ -34,9 +33,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -62,10 +61,9 @@ L_Visitor:
mes "\"But when I left him to look at the books on his own, he sneaked over to the workshop area. Visitors are allowed to have a look there, but only if they don't interfere with any research and experiments. But it seems he was being rather disturbing, since they sent them back to the library part.\"";
next;
mes "\"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.\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -74,7 +72,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @slimes, 0;
close;
}
diff --git a/world/map/npc/048-2/helperCleaning4.txt b/world/map/npc/048-2/helperCleaning4.txt
index 6b795b84..45108932 100644
--- a/world/map/npc/048-2/helperCleaning4.txt
+++ b/world/map/npc/048-2/helperCleaning4.txt
@@ -7,7 +7,6 @@
048-2,131,119,0|script|Kristian|366
{
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
if (@slimes == 255) goto L_Thank;
if (@slimes > 0) goto L_Progress;
@@ -27,9 +26,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -53,10 +52,9 @@ L_Visitor:
mes "\"Oh, there was such a visitor, yes. Strange guy, and didn't really know how to behave. He sneaked into the workshop area all the time, I think he was rather curious about the things going on there.\"";
next;
mes "\"But still, he can't just walk in there, fiddle with the experiments and disturb the helpers doing their work.\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -65,7 +63,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @slimes, 0;
close;
}
diff --git a/world/map/npc/048-2/helperCleaning5.txt b/world/map/npc/048-2/helperCleaning5.txt
index 9af27425..9517fde3 100644
--- a/world/map/npc/048-2/helperCleaning5.txt
+++ b/world/map/npc/048-2/helperCleaning5.txt
@@ -6,7 +6,6 @@
048-2,100,125,0|script|Mirjami|363
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
if (@slimes == 255) goto L_Thank;
@@ -29,9 +28,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -55,10 +54,9 @@ L_Visitor:
mes "\"Ohh, I think I know who you mean. That was a strange guy. He always came over here in the workshop, said he's very interested in the research. I suppose that's ok, but he didn't keep his hands to himself, and touched some experiments and I caught him near some storage racks.\"";
next;
mes "\"Visitors should keep away from those!\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -67,7 +65,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @slimes, 0;
close;
}
diff --git a/world/map/npc/048-2/helperJanitor.txt b/world/map/npc/048-2/helperJanitor.txt
index 0d0d884b..a2722e94 100644
--- a/world/map/npc/048-2/helperJanitor.txt
+++ b/world/map/npc/048-2/helperJanitor.txt
@@ -4,14 +4,27 @@
// Elias is the janitor of the mansion
// part of investigation subquest, gives initial hint on the visitor with the mask
-048-2,40,41,0|script|Elias|365
+048-2,36,44,0|script|Debug#BlueSage|110
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
+ mes "QUEST_BlueSage: "+ QUEST_BlueSage;
+ mes "QL_BSAGE_INVESTIGATE: "+ QL_BSAGE_INVESTIGATE;
+ next;
+ menu
+ "set QL_BSAGE_INVESTIGATE", L_Investigate;
- if (@investigate == 11) goto L_Thank;
- if ((@investigate == 4) || (@investigate == 7) || (@investigate == 10)) goto L_Confirmed;
- if ((@investigate == 3) || (@investigate == 6) || (@investigate == 9)) goto L_Worry;
- if (QUEST_BlueSage > 0) goto L_ShortHello;
+L_Investigate:
+ input @state;
+ if(@state < 0 || @state > 14) set @state, 0;
+ set QL_BSAGE_INVESTIGATE, @state;
+ close;
+}
+
+048-2,40,41,0|script|Elias|110,7,6
+{
+ if (QL_BSAGE_INVESTIGATE == 11) goto L_Thank;
+ if ((QL_BSAGE_INVESTIGATE == 4) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Confirmed;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 9)) goto L_Worry;
+ if (QUEST_BlueSage > 0 && QL_BSAGE_INVESTIGATE < 13) goto L_ShortHello;
mes "[Elias]";
mes "\"Welcome to the residence of Nikolai, member of the Sages of Kaizei.\"";
@@ -25,15 +38,22 @@
mes "[Elias]";
mes "\"So, if you came because of the library, I'll have to disappoint you, because there isn't much left.";
mes "Though you look like a skilled adventurer. If you'd like to offer your help that'd be greatly appreciated.\"";
+ if(QL_BSAGE_INVESTIGATE == 13)
+ set QL_BSAGE_INVESTIGATE, 14;
next;
mes "\"The library is on the third floor.\"";
goto L_Close;
+OnTouch:
+ if (BaseLevel >= $@Q_BlueSageMinimumLevel && !QL_BSAGE_INVESTIGATE)
+ set QL_BSAGE_INVESTIGATE, 13;
+ end;
+
L_ShortHello:
mes "[Elias]";
mes "\"Welcome back. I heard you're helping with the cleanup efforts in the library.";
mes "Thank you very much.\"";
- if ((@investigate != 2) && (@investigate != 5) && (@investigate != 8))
+ if ((QL_BSAGE_INVESTIGATE != 2) && (QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 8))
goto L_Close;
menu
"Can you tell me if there were any unusual visitors before the accident?",L_Next;
@@ -48,8 +68,7 @@ L_Next:
mes "[Elias]";
mes "\"Do you think he may have had something to do with the accident? We're a very hospitable house, so I didn't see a reason to deny him the entrance. I mean, his mask might have been a bit unusual, but hey, there could've been many reasons why someone would wear a mask, don't you think?\"";
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
menu
"Sure, but it's interesting that he was here shortly before the accident.",L_Close,
@@ -76,6 +95,5 @@ L_Thank:
goto L_Close;
L_Close:
- set @investigate, 0;
close;
}
diff --git a/world/map/npc/048-2/helperMInk.txt b/world/map/npc/048-2/helperMInk.txt
index 220ef484..72978b03 100644
--- a/world/map/npc/048-2/helperMInk.txt
+++ b/world/map/npc/048-2/helperMInk.txt
@@ -6,7 +6,6 @@
048-2,95,103,0|script|Eevert|365
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @water_amount, 5;
set @spectre_amount, 3;
set @poltergeist_amount, 3;
@@ -60,9 +59,9 @@ L_NoItem:
goto L_Close;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -91,14 +90,12 @@ L_Helper:
mes "\"Ah, Peetu. I really appreciate his sense for high quality work. The requirements to become a helper of a sage are already high, but Peetu is outstanding. He has a talent for magic and combined with his diligence, it's quite remarkable.\"";
next;
mes "\"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 ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @water_amount, 0;
set @spectre_amount, 0;
set @poltergeist_amount, 0;
diff --git a/world/map/npc/048-2/helperMReed.txt b/world/map/npc/048-2/helperMReed.txt
index 50ac45c0..4cb2eaac 100644
--- a/world/map/npc/048-2/helperMReed.txt
+++ b/world/map/npc/048-2/helperMReed.txt
@@ -6,7 +6,6 @@
048-2,104,78,0|script|Kullervo|366
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @reed_amount, 20;
set @reed_exp, 10000;
@@ -47,9 +46,9 @@ L_NoItem:
goto L_Close;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -73,10 +72,9 @@ L_Visitor:
mes "\"Oh, yes. There was such a guy, shortly before the accident I think. He sneaked into the workshop several times, sticking his nose into stuff that shouldn't be his business. We had to send him back to the library area at least three times.\"";
next;
mes "\"Maybe he was confused, not sure. He talked very strangely.\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -85,14 +83,12 @@ L_Helper:
mes "And in all these years, I've never seen him messing up anything important. He's a perfectionist. He isn't satisfied with anything less than the best possible result when doing his work.\"";
next;
mes "\"I don't understand what went wrong with that spell, but it just has to have another cause than Peetu. I'm worried about him. He must feel very miserable. But I can't leave my duty here.\"";
- if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @reed_amount, 0;
set @reed_exp, 0;
close;
diff --git a/world/map/npc/048-2/helperMSilk.txt b/world/map/npc/048-2/helperMSilk.txt
index d2db14a5..7ed3bf47 100644
--- a/world/map/npc/048-2/helperMSilk.txt
+++ b/world/map/npc/048-2/helperMSilk.txt
@@ -6,7 +6,6 @@
048-2,104,103,0|script|Janika|363
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @silk_amount, 80;
set @silk_exp, 10000;
@@ -47,9 +46,9 @@ L_NoItem:
goto L_Close;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -74,10 +73,9 @@ L_Visitor:
next;
mes "She shakes her head.";
mes "\"Sometimes I think it'd be better not to allow visitors here. But the sages set a high value on keeping contact with the population. Politics.\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -86,7 +84,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @silk_amount, 0;
set @silk_exp, 0;
close;
diff --git a/world/map/npc/048-2/helperMYetiClaw.txt b/world/map/npc/048-2/helperMYetiClaw.txt
index c32b0b1e..f23b7177 100644
--- a/world/map/npc/048-2/helperMYetiClaw.txt
+++ b/world/map/npc/048-2/helperMYetiClaw.txt
@@ -6,7 +6,6 @@
048-2,97,78,0|script|Santeri|366
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @claw_amount, 8;
set @claw_exp, 10000;
@@ -55,9 +54,9 @@ L_NoItem:
goto L_Close;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -86,14 +85,12 @@ L_Helper:
mes "\"Oh, that's an interesting question. I was really surprised when I heard that he was responsible for the sealing spell. I've worked together with him before, and I have to say, it really was a pleasure. He's very accurate and diligent, but also polite and helpful.\"";
next;
mes "\"I really wonder what went wrong with that sealing spell. I can't imagine Peetu messing up something so important.\"";
- if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @claw_amount, 0;
set @claw_exp, 0;
close;
diff --git a/world/map/npc/048-2/helperResting1.txt b/world/map/npc/048-2/helperResting1.txt
index 87983bc8..76e62fe2 100644
--- a/world/map/npc/048-2/helperResting1.txt
+++ b/world/map/npc/048-2/helperResting1.txt
@@ -6,7 +6,6 @@
048-2,36,26,0|script|Lenita|363
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT);
if (@bookpages == 254) goto L_Thank;
@@ -30,9 +29,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -54,10 +53,9 @@ L_Ask_Both:
L_Visitor:
mes "[Lenita]";
mes "\"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.\"";
- if ((@investigate != 3) && (@investigate != 6) && (@investigate != 9))
+ if ((QL_BSAGE_INVESTIGATE != 3) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 9))
goto L_Close;
- set @investigate, @investigate + 1;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 1;
goto L_Close;
L_Helper:
@@ -66,7 +64,6 @@ L_Helper:
goto L_Close;
L_Close:
- set @investigate, 0;
set @bookpages, 0;
close;
}
diff --git a/world/map/npc/048-2/helperResting2.txt b/world/map/npc/048-2/helperResting2.txt
index eb68e554..c65bc536 100644
--- a/world/map/npc/048-2/helperResting2.txt
+++ b/world/map/npc/048-2/helperResting2.txt
@@ -6,7 +6,6 @@
048-2,35,27,0|script|Miro|366
{
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
if (@slimes == 255) goto L_Thank;
@@ -29,9 +28,9 @@ L_Thank:
goto L_Investigate;
L_Investigate:
- if ((@investigate == 3) || (@investigate == 4)) goto L_Ask_Visitor;
- if ((@investigate == 5) || (@investigate == 8)) goto L_Ask_Helper;
- if ((@investigate == 6) || (@investigate == 7) || (@investigate == 9) || (@investigate == 10)) goto L_Ask_Both;
+ if ((QL_BSAGE_INVESTIGATE == 3) || (QL_BSAGE_INVESTIGATE == 4)) goto L_Ask_Visitor;
+ if ((QL_BSAGE_INVESTIGATE == 5) || (QL_BSAGE_INVESTIGATE == 8)) goto L_Ask_Helper;
+ if ((QL_BSAGE_INVESTIGATE == 6) || (QL_BSAGE_INVESTIGATE == 7) || (QL_BSAGE_INVESTIGATE == 9) || (QL_BSAGE_INVESTIGATE == 10)) goto L_Ask_Both;
goto L_Close;
L_Ask_Visitor:
@@ -60,14 +59,12 @@ L_Helper:
mes "\"Peetu? It was his job to seal away the slimes before the night, right? I have to say I'm really surprised about what happened, because he's a very cautious person. I'd have never guessed that he'd mess up something as important as this.\"";
next;
mes "\"If Nikolai's helpers weren't so carefully chosen, I'd think this was some kind of a bad joke from someone.\"";
- if ((@investigate != 5) && (@investigate != 6) && (@investigate != 7))
+ if ((QL_BSAGE_INVESTIGATE != 5) && (QL_BSAGE_INVESTIGATE != 6) && (QL_BSAGE_INVESTIGATE != 7))
goto L_Close;
- set @investigate, @investigate + 3;
- callfunc "updateBlueSageInvestigate";
+ set QL_BSAGE_INVESTIGATE, QL_BSAGE_INVESTIGATE + 3;
goto L_Close;
L_Close:
- set @investigate, 0;
set @slimes, 0;
close;
}
diff --git a/world/map/npc/048-2/sageNikolai.txt b/world/map/npc/048-2/sageNikolai.txt
index dced46d6..fdc6e76d 100644
--- a/world/map/npc/048-2/sageNikolai.txt
+++ b/world/map/npc/048-2/sageNikolai.txt
@@ -8,7 +8,6 @@
set @halloween_npc_id, $@halloween_npc_nikolai;
callfunc "TrickOrTreat";
- set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT);
set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
set @material, ((QUEST_BlueSage & $@Q_BlueSageMaterial_MASK) >> $@Q_BlueSageMaterial_SHIFT);
@@ -112,7 +111,7 @@ L_NoStartSlimes:
goto L_NoSlimes;
L_NoSlimes:
- if (@investigate > 0)
+ if (QL_BSAGE_INVESTIGATE > 0 && QL_BSAGE_INVESTIGATE < 13)
goto L_NoStartInvestigate;
set @choice_idx[@choices_nr], @C_startInvestigate;
set @choice$[@choices_nr], "How did this all happen?";
@@ -120,7 +119,7 @@ L_NoSlimes:
goto L_NoStartInvestigate;
L_NoStartInvestigate:
- if ((@investigate < 2) || (@investigate > 11))
+ if ((QL_BSAGE_INVESTIGATE < 2) || (QL_BSAGE_INVESTIGATE > 11 && QL_BSAGE_INVESTIGATE < 13))
goto L_NoInvestigate;
set @choice_idx[@choices_nr], @C_investigate;
set @choice$[@choices_nr], "I'm trying to find out how that accident could've happened.";
@@ -128,7 +127,7 @@ L_NoStartInvestigate:
goto L_NoInvestigate;
L_NoInvestigate:
- if (@investigate != 11)
+ if (QL_BSAGE_INVESTIGATE != 11)
goto L_NoInvestigate2;
set @choice_idx[@choices_nr], @C_investigate2;
set @choice$[@choices_nr], "I told Chief Oskari what I found out about the accident.";
@@ -281,28 +280,7 @@ L_Done:
L_Close:
set @inventorylist_count, 0;
- set @investigate, 0;
set @bookpages, 0;
set @slimes, 0;
close;
}
-
-//048-2,100,106,0|script|Debug|160
-//{
-// set @investigate, ((QUEST_BlueSage & $@Q_BlueSageInvestigate_MASK) >> $@Q_BlueSageInvestigate_SHIFT);
-// set @bookpages, ((QUEST_BlueSage & $@Q_BlueSageBookPages_MASK) >> $@Q_BlueSageBookPages_SHIFT);
-// set @slimes, ((QUEST_BlueSage & $@Q_BlueSageSlimes_MASK) >> $@Q_BlueSageSlimes_SHIFT);
-// set @material, ((QUEST_BlueSage & $@Q_BlueSageMaterial_MASK) >> $@Q_BlueSageMaterial_SHIFT);
-//
-// mes "QUEST_BlueSage: " + QUEST_BlueSage;
-// mes "investigate: " + @investigate;
-// mes "slimes: " + @slimes;
-// mes "bookpages: " + @bookpages;
-// mes "material: " + @material;
-// menu
-// "reset quest",-,
-// "close",L_Close;
-// set QUEST_BlueSage, 0;
-//L_Close:
-// close;
-//}