summaryrefslogtreecommitdiff
path: root/world/map/npc/021-1
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/021-1')
-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
4 files changed, 60 insertions, 39 deletions
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;