summaryrefslogtreecommitdiff
path: root/world/map/npc/013-3/barrier.txt
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2013-02-03 17:31:07 +0100
committerJessica Tölke <jtoelke@mail.upb.de>2013-02-12 23:05:14 +0100
commit3a50328148c111d329322f5930c5332eb0c5dc48 (patch)
tree228f8a6b47f5b7bf13bf4ca1f08a58f1d8c7a724 /world/map/npc/013-3/barrier.txt
parent19058b8fc8a2e85562be1564d6fdcd03f1545fe8 (diff)
downloadserverdata-3a50328148c111d329322f5930c5332eb0c5dc48.tar.gz
serverdata-3a50328148c111d329322f5930c5332eb0c5dc48.tar.bz2
serverdata-3a50328148c111d329322f5930c5332eb0c5dc48.tar.xz
serverdata-3a50328148c111d329322f5930c5332eb0c5dc48.zip
Variable restructuring: move Quest_demon_mines into Nibble 2 of QUEST_Hurnscald.
Diffstat (limited to 'world/map/npc/013-3/barrier.txt')
-rw-r--r--world/map/npc/013-3/barrier.txt21
1 files changed, 17 insertions, 4 deletions
diff --git a/world/map/npc/013-3/barrier.txt b/world/map/npc/013-3/barrier.txt
index 6de45440..410bc882 100644
--- a/world/map/npc/013-3/barrier.txt
+++ b/world/map/npc/013-3/barrier.txt
@@ -1,17 +1,30 @@
//
013-3.gat,71,21,0|script|#DemonMineBarrier1#_M|45,1,1,{
- if (QUEST_demon_mines >= 2) close;
- if (QUEST_demon_mines == 1 && countitem("JackOSoul") >= 1) goto L_Has_Jack_O_Soul;
+ callfunc "ClearVariables";
+
+ set @state, ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);
+
+ if (@state >= 2) goto L_Close;
+ if (@state == 1 && countitem("JackOSoul") >= 1) goto L_Has_Jack_O_Soul;
mes "A barrier around the opening pushes you back as you approach.";
warp "013-3.gat", 71, 25;
- close;
+ goto L_Close;
L_Has_Jack_O_Soul:
mes "The barrier around the opening allows you passage.";
- set QUEST_demon_mines, 2;
+ set @state, 2;
+ callsub S_Update_Mask;
delitem "JackOSoul", 1;
+ goto L_Close;
+
+L_Close:
+ set @state, 0;
close;
+
+S_Update_Mask:
+ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT);
+ return;
}