summaryrefslogtreecommitdiff
path: root/world/map/npc/027-1/monsters.txt
blob: b4dedad4a2069dbcb9ad50b6571584802d92aee3 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// 027-1 Graveyard zombies and fallens
// they need to be in an extra file because of the crying child quest

027-1.gat,71,41,31,22|monster|Zombie|1036,2,300000,120000,specialMob027-1::On1036
027-1.gat,37,41,33,22|monster|Zombie|1036,2,200000,10000,specialMob027-1::On1036
027-1.gat,37,65,33,22|monster|Zombie|1036,3,140000,30000,specialMob027-1::On1036
027-1.gat,37,65,33,22|monster|Fallen|1045,3,120000,30000,specialMob027-1::On1045

027-1.gat,0,0,0|script|specialMob027-1|-1,
{
    end;

On1036:
    set @mobID, 1036;
    callsub L_MOBCOUNT_ZOMBIES;
    callfunc "MobPoints";
    end;

On1045:
    set @mobID, 1045;
    callsub L_MOBCOUNT_FALLENS;
    callfunc "MobPoints";
    end;

L_MOBCOUNT_ZOMBIES:

    set @Graveyard_Inn_MASK, NIBBLE_2_MASK;
    set @Graveyard_Inn_SHIFT, NIBBLE_2_SHIFT;

    set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);

    if (@state != 1)
        goto L_Return;
    set @ring, @ring + 1;
    if (@ring < 10)
        goto L_Return;
    if (rand(8) != 0)
        goto L_Return;
    message strcharinfo(0), "You found a ring hidden in the zombie's rotten rags. Maybe this is what Aldred was looking for...";
    set @state, 2;
    callsub S_Update_Mask;
    return;

L_MOBCOUNT_FALLENS:

    set @Graveyard_Inn_MASK, NIBBLE_2_MASK;
    set @Graveyard_Inn_SHIFT, NIBBLE_2_SHIFT;

    set @state, ((QUEST_Graveyard_Inn & @Graveyard_Inn_MASK) >> @Graveyard_Inn_SHIFT);

    if (@state != 1)
        goto L_Return;
    set @ring, @ring + 1;
    if (@ring < 10)
        goto L_Return;
    if (rand(8) != 0)
        goto L_Return;
    message strcharinfo(0), "You found a ring inside the fallen's broken helmet. Maybe this is what Aldred was looking for...";
    set @state, 2;
    callsub S_Update_Mask;
    return;

L_Return:
    return;

S_Update_Mask:
    set QUEST_Graveyard_Inn,
        (QUEST_Graveyard_Inn & ~(@Graveyard_Inn_MASK))
            | (@state << @Graveyard_Inn_SHIFT);
    return;
}