diff options
author | Jessica Tölke <jtoelke@mail.upb.de> | 2013-02-12 23:06:27 +0100 |
---|---|---|
committer | Jessica Tölke <jtoelke@mail.upb.de> | 2013-02-12 23:06:27 +0100 |
commit | 627a802f4eeb0872ab84d32ef952ca8884cea795 (patch) | |
tree | b62300599d9f82f986769d0b501d9b18c83123f6 /world/map/npc/013-3/barrier.txt | |
parent | 776515d46c6ffe47334537c32fc1b55f26fe47e4 (diff) | |
parent | e0e679a8a695641d1845c28bebe1c7e83c21a39f (diff) | |
download | serverdata-627a802f4eeb0872ab84d32ef952ca8884cea795.tar.gz serverdata-627a802f4eeb0872ab84d32ef952ca8884cea795.tar.bz2 serverdata-627a802f4eeb0872ab84d32ef952ca8884cea795.tar.xz serverdata-627a802f4eeb0872ab84d32ef952ca8884cea795.zip |
Merge branch 'variables'
Several older scripts were changed to use bitmasking for the player variables.
Variables that are or became unused were added to the clear_vars function.
Diffstat (limited to 'world/map/npc/013-3/barrier.txt')
-rw-r--r-- | world/map/npc/013-3/barrier.txt | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/world/map/npc/013-3/barrier.txt b/world/map/npc/013-3/barrier.txt index 6de45440..63c5eae9 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"; - mes "A barrier around the opening pushes you back as you approach."; + 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; + + message strcharinfo(0), "A barrier around the opening pushes you back as you approach."; warp "013-3.gat", 71, 25; - close; + goto L_End; L_Has_Jack_O_Soul: - mes "The barrier around the opening allows you passage."; - set QUEST_demon_mines, 2; + message strcharinfo(0), "The barrier around the opening allows you passage."; + set @state, 2; + callsub S_Update_Mask; delitem "JackOSoul", 1; - close; + goto L_End; + +L_End: + set @state, 0; + end; + +S_Update_Mask: + set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT); + return; } |