summaryrefslogtreecommitdiff
path: root/npc/013-3/barrier.txt
blob: aa8a1918bb947922a2611f1ca491228a0446daf4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
013-3,71,21,0	script	#DemonMineBarrier1#_M	NPC32767,1,0,{
    @state = ((QUEST_Hurnscald & NIBBLE_2_MASK) >> NIBBLE_2_SHIFT);

    if (@state >= 2) goto L_End;
    if (@state == 1 && countitem("Soul") >= 1) goto L_Has_Soul;

    message strcharinfo(0), "Barrier : ##3A barrier around the opening pushes you back as you approach.";

    warp "013-3", 71, 25;
    goto L_End;

L_Has_Soul:
    message strcharinfo(0), "Barrier : ##3The barrier around the opening allows you passage.";
    @state = 2;
    callsub S_Update_Mask;
    delitem "Soul", 1;
    goto L_End;

L_End:
    @state = 0;
    end;

S_Update_Mask:
    QUEST_Hurnscald = (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (@state << NIBBLE_2_SHIFT);
    return;
}