summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--world/map/npc/001-2/casino.txt2
-rw-r--r--world/map/npc/021-1/banu.txt8
-rw-r--r--world/map/npc/021-1/hideandseek.txt74
-rw-r--r--world/map/npc/021-1/imec.txt15
-rw-r--r--world/map/npc/021-1/weellos.txt2
-rw-r--r--world/map/npc/021-2/kylian.txt17
-rw-r--r--world/map/npc/021-2/yanis.txt6
-rw-r--r--world/map/npc/022-1/adrian.txt4
-rw-r--r--world/map/npc/022-1/anwar.txt15
-rw-r--r--world/map/npc/024-1/eomie.txt4
-rw-r--r--world/map/npc/024-1/tinris.txt4
-rw-r--r--world/map/npc/068-2/latoy.txt2
12 files changed, 79 insertions, 74 deletions
diff --git a/world/map/npc/001-2/casino.txt b/world/map/npc/001-2/casino.txt
index ea29e9bd..7648190b 100644
--- a/world/map/npc/001-2/casino.txt
+++ b/world/map/npc/001-2/casino.txt
@@ -4,7 +4,7 @@
001-2.gat,32,72,0|script|#CasinoEntrance|32767,1,1,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowCasinoNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
if (@kylian != 6)
goto L_End;
message strcharinfo(0), "You wonder if Kylian would like to visit the casino in the evening.";
diff --git a/world/map/npc/021-1/banu.txt b/world/map/npc/021-1/banu.txt
index fac61bc1..e614fcae 100644
--- a/world/map/npc/021-1/banu.txt
+++ b/world/map/npc/021-1/banu.txt
@@ -5,9 +5,7 @@
021-1.gat,102,54,0|script|Banu|154,
{
- set @BanuNT_MASK, 0xC00;
- set @BanuNT_SHIFT, 10;
- set @state, ((QUEST_NorthTulimshar & @BanuNT_MASK) >> @BanuNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & TWOBIT_5_MASK) >> TWOBIT_5_SHIFT);
set @EXP, 30;
set @money_water, 200;
set @money_knife, 60;
@@ -106,11 +104,9 @@ L_Close:
set @EXP, 0;
set @state, 0;
set @rand, 0;
- set @BanuNT_MASK, 0;
- set @BanuNT_SHIFT, 0;
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(@BanuNT_MASK)) | (@state << @BanuNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(TWOBIT_5_MASK)) | (@state << TWOBIT_5_SHIFT);
return;
}
diff --git a/world/map/npc/021-1/hideandseek.txt b/world/map/npc/021-1/hideandseek.txt
index 58095234..4768eef1 100644
--- a/world/map/npc/021-1/hideandseek.txt
+++ b/world/map/npc/021-1/hideandseek.txt
@@ -1,9 +1,10 @@
// Children playing Hide and Seek
-// Quest uses Nibble 0 and 1 of QUEST_NorthTulimshar
+// QUEST_NorthTulimshar
+// BYTE 0
// Bit 0: started quest at Ayasha
// Bit 1 - 5: found one of the kids each
-// bit 6: talked to Ayasha after finding all kids
-// bit 7: unused
+// Bit 6: talked to Ayasha after finding all kids
+// Bit 7: unused
// Author: Jenalya
-|script|#hideandseekNTconfig|-1,
@@ -11,25 +12,60 @@
end;
OnInit:
- set $@hideandseekNT_MASK, BYTE_0_MASK;
- set $@hideandseekNT_SHIFT, BYTE_0_SHIFT;
-
- set $@hideandseekNT_started, 0x00000001;
- set $@hideandseekNT_found1, 0x00000002;
- set $@hideandseekNT_found2, 0x00000004;
- set $@hideandseekNT_found3, 0x00000008;
- set $@hideandseekNT_found4, 0x00000010;
- set $@hideandseekNT_found5, 0x00000020;
- set $@hideandseekNT_ended, 0x00000040;
+ set $@hideandseekNT_started, (1 << 0);
+ set $@hideandseekNT_found1, (1 << 1);
+ set $@hideandseekNT_found2, (1 << 2);
+ set $@hideandseekNT_found3, (1 << 3);
+ set $@hideandseekNT_found4, (1 << 4);
+ set $@hideandseekNT_found5, (1 << 5);
+ set $@hideandseekNT_ended, (1 << 6);
end;
}
+021-1.gat,89,66,0|script|AyashaDebug|258,
+{
+ mes "[Ayasha Debug]";
+ menu
+ "Show", L_Show,
+ "Reset", L_Reset,
+ "Close.", L_Close;
+
+L_Show:
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
+ mes "State: " + @state;
+ if (QUEST_NorthTulimshar & $@hideandseekNT_started)
+ mes "Start set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found1)
+ mes "Found 1 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found2)
+ mes "Found 2 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found3)
+ mes "Found 3 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found4)
+ mes "Found 4 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_found5)
+ mes "Found 5 set";
+ if (QUEST_NorthTulimshar & $@hideandseekNT_ended)
+ mes "Complete set";
+ goto L_Close;
+L_Reset:
+ set QUEST_NorthTulimshar, 0;
+ goto L_Close;
+
+L_Close:
+ close;
+
+OnInit:
+ if (!debug)
+ disablenpc "AyashaDebug";
+ end;
+}
021-1.gat,87,66,0|script|Ayasha|258,
{
set @child_number, 0;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 75;
@@ -97,7 +133,7 @@ L_Close:
{
set @child_number, 1;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
@@ -159,7 +195,7 @@ L_Close:
{
set @child_number, 2;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
@@ -213,7 +249,7 @@ L_Close:
{
set @child_number, 3;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 25;
@@ -265,7 +301,7 @@ L_Close:
{
set @child_number, 4;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
@@ -306,7 +342,7 @@ L_Close:
{
set @child_number, 5;
callfunc "XmasList";
- set @state, ((QUEST_NorthTulimshar & $@hideandseekNT_MASK) >> $@hideandseekNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & BYTE_0_MASK) >> BYTE_0_SHIFT);
set @EXP, 15;
diff --git a/world/map/npc/021-1/imec.txt b/world/map/npc/021-1/imec.txt
index 61e1fca7..07965951 100644
--- a/world/map/npc/021-1/imec.txt
+++ b/world/map/npc/021-1/imec.txt
@@ -2,20 +2,9 @@
// after finishing this, daily quest with scorpion stingers
// Using bit 8 and 9 of QUEST_NorthTulimshar (first half of nibble 2)
// author: Jenalya
-
--|script|#ImecShopConfig|-1,
-{
- end;
-
-OnInit:
- set $@ImecShopNT_MASK, 0x300;
- set $@ImecShopNT_SHIFT, 8;
- end;
-}
-
021-1.gat,120,31,0|script|Imec|162,
{
- set @state, ((QUEST_NorthTulimshar & $@ImecShopNT_MASK) >> $@ImecShopNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & TWOBIT_4_MASK) >> TWOBIT_4_SHIFT);
set @money, 500;
if (@state >= 3) goto L_Stingers;
@@ -117,6 +106,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@ImecShopNT_MASK)) | (@state << $@ImecShopNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(TWOBIT_4_MASK)) | (@state << TWOBIT_4_SHIFT);
return;
}
diff --git a/world/map/npc/021-1/weellos.txt b/world/map/npc/021-1/weellos.txt
index cb75bde1..3e6236ea 100644
--- a/world/map/npc/021-1/weellos.txt
+++ b/world/map/npc/021-1/weellos.txt
@@ -4,7 +4,7 @@
021-1.gat,130,125,0|script|Weellos|103,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowWeellosNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
if isin("021-1.gat", 130, 120, 140, 125) goto L_In;
diff --git a/world/map/npc/021-2/kylian.txt b/world/map/npc/021-2/kylian.txt
index 71dcb896..fc8242c5 100644
--- a/world/map/npc/021-2/kylian.txt
+++ b/world/map/npc/021-2/kylian.txt
@@ -38,16 +38,12 @@
OnInit:
// Nibble 4
- set $@knowYanisNT, 0x10000;
- set $@knowLatoyNT, 0x20000;
- set $@knowWeellosNT, 0x40000;
- set $@knowCasinoNT, 0x80000;
-
- set $@businessmanNT_MASK, NIBBLE_5_MASK;
- set $@businessmanNT_SHIFT, NIBBLE_5_SHIFT;
+ set $@knowYanisNT, (1 << 16);
+ set $@knowLatoyNT, (1 << 17);
+ set $@knowWeellosNT, (1 << 18);
+ set $@knowCasinoNT, (1 << 19);
end;
}
-
021-2.gat,25,67,0|script|#KylianOut|32767,1,1,
{
set @KylianNTLicense, 0;
@@ -55,10 +51,9 @@ OnInit:
set @KylianNTCasino, 0;
end;
}
-
021-2.gat,89,55,0|script|Kylian|193,
{
- set @state, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
set @acorn_amount, 12;
set @suitcase_money, 100;
@@ -307,6 +302,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@businessmanNT_MASK)) | (@state << $@businessmanNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_5_MASK)) | (@state << NIBBLE_5_SHIFT);
return;
}
diff --git a/world/map/npc/021-2/yanis.txt b/world/map/npc/021-2/yanis.txt
index bde24ec3..86c40fad 100644
--- a/world/map/npc/021-2/yanis.txt
+++ b/world/map/npc/021-2/yanis.txt
@@ -4,8 +4,8 @@
021-2.gat,33,17,0|script|Yanis|107,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowYanisNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
- set @imec, ((QUEST_NorthTulimshar & $@ImecShopNT_MASK) >> $@ImecShopNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
+ set @imec, ((QUEST_NorthTulimshar & TWOBIT_4_MASK) >> TWOBIT_4_SHIFT);
mes "[Yanis]";
mes "\"Welcome. I'm handling issues with trading licenses for the shop owners in Tulimshar. Can I help you?\"";
@@ -24,7 +24,7 @@ L_Next:
mes "[Yanis]";
mes "\"Here you have a letter of acknowledgement. You can bring that back to Imec. We will have a look at his case.\"";
set @imec, 2;
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@ImecShopNT_MASK)) | (@imec << $@ImecShopNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(TWOBIT_4_MASK)) | (@imec << TWOBIT_4_SHIFT);
goto L_BeforeClose;
L_BeforeClose:
diff --git a/world/map/npc/022-1/adrian.txt b/world/map/npc/022-1/adrian.txt
index e4e1e2c6..978c537e 100644
--- a/world/map/npc/022-1/adrian.txt
+++ b/world/map/npc/022-1/adrian.txt
@@ -7,7 +7,7 @@
022-1.gat,58,54,0|script|Adrian|213,
{
- set @state, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
mes "[Adrian]";
mes "\"Hello. Are you here to get the luggage for some of our passengers?\"";
@@ -36,7 +36,7 @@ L_Get:
mes "Adrain hands you a very heavy suitcase.";
getitem "LeatherSuitcase", 1;
set @state, 2;
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@businessmanNT_MASK)) | (@state << $@businessmanNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_5_MASK)) | (@state << NIBBLE_5_SHIFT);
goto L_Close;
L_Inventory:
diff --git a/world/map/npc/022-1/anwar.txt b/world/map/npc/022-1/anwar.txt
index f01089aa..7c031d9c 100644
--- a/world/map/npc/022-1/anwar.txt
+++ b/world/map/npc/022-1/anwar.txt
@@ -16,20 +16,9 @@
// state 13: Anwar asked to bring present to Eomie
// state 14: gave present to Eomie
// state 15: reported back to Anwar and done
-
--|script|#magicfieldNTconfig|-1,
-{
- end;
-
-OnInit:
- set $@magicfieldNT_MASK, NIBBLE_3_MASK;
- set $@magicfieldNT_SHIFT, NIBBLE_3_SHIFT;
- end;
-}
-
022-1.gat,41,46,0|script|Anwar|156,
{
- set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @cloth_amount, 3;
set @silk_amount, 30;
@@ -209,6 +198,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
return;
}
diff --git a/world/map/npc/024-1/eomie.txt b/world/map/npc/024-1/eomie.txt
index 680e77a6..e14a323c 100644
--- a/world/map/npc/024-1/eomie.txt
+++ b/world/map/npc/024-1/eomie.txt
@@ -20,7 +20,7 @@
024-1.gat,72,94,0|script|Eomie|164,
{
- set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @grass_amount, 5;
set @water_amount, 2;
@@ -140,6 +140,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
return;
}
diff --git a/world/map/npc/024-1/tinris.txt b/world/map/npc/024-1/tinris.txt
index 34352a74..c1d969fd 100644
--- a/world/map/npc/024-1/tinris.txt
+++ b/world/map/npc/024-1/tinris.txt
@@ -19,7 +19,7 @@
024-1.gat,82,64,0|script|Tinris|160,
{
- set @state, ((QUEST_NorthTulimshar & $@magicfieldNT_MASK) >> $@magicfieldNT_SHIFT);
+ set @state, ((QUEST_NorthTulimshar & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT);
set @cake_exp, 50;
set @sweater_exp, 400;
@@ -214,6 +214,6 @@ L_Close:
close;
S_Update_Mask:
- set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~($@magicfieldNT_MASK)) | (@state << $@magicfieldNT_SHIFT);
+ set QUEST_NorthTulimshar, (QUEST_NorthTulimshar & ~(NIBBLE_3_MASK)) | (@state << NIBBLE_3_SHIFT);
return;
}
diff --git a/world/map/npc/068-2/latoy.txt b/world/map/npc/068-2/latoy.txt
index b1dca208..9031979f 100644
--- a/world/map/npc/068-2/latoy.txt
+++ b/world/map/npc/068-2/latoy.txt
@@ -7,7 +7,7 @@
068-2.gat,92,83,0|script|Latoy|106,
{
set QUEST_NorthTulimshar, QUEST_NorthTulimshar | $@knowLatoyNT;
- set @kylian, ((QUEST_NorthTulimshar & $@businessmanNT_MASK) >> $@businessmanNT_SHIFT);
+ set @kylian, ((QUEST_NorthTulimshar & NIBBLE_5_MASK) >> NIBBLE_5_SHIFT);
mes "[Latoy]";
mes "\"Is there something I can help you with?\"";