summaryrefslogtreecommitdiff
path: root/npc/015-3/pot.txt
blob: 4516c13f25700b14ed4d35cd2678ba85696fc686 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
015-3,37,29,0	script	Pot	NPC400,{
    @cat = ((Katze & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);

    if (@cat > 0)
        mes "It's that old pot again.";
    if (@cat == 0)
        mes "It's a pot.";
    next;

    if (@cat == 1 && @catNeedsAlone == 0)
        goto L_NeedsFood;
    if (@cat == 1)
        goto L_HasMilk;
    if (@cat == 2 && @catNeedsAlone == 0)
        goto L_NeedsFur;
    if (@cat == 2)
        goto L_HasFood;
    if (@cat == 3)
        goto L_NeedsWood;
    if (@cat == 4 && @catNeedsAlone == 1)
        goto L_HasWood;
    if (@cat >= 4)
        goto L_close;
    goto L_NeedsMilk;

L_NeedsMilk:
    if (countitem("Milk") > 0)
        menu
            "Pour in some milk.", L_GiveMilk,
            "Leave it alone.", L_close;
    goto L_close;

L_GiveMilk:
    delitem "Milk", 1;
    @cat = 1;
    callsub S_Update_Katze;
    @catNeedsAlone = 1;
    goto L_close;

L_HasMilk:
    mes "There is milk in it.";
    goto L_close;

L_NeedsFood:
    mes "The milk is gone!";
    next;

    if (countitem("ChickenLeg") > 0 && countitem("Steak") > 0)
        menu
            "Put in a chicken leg.", L_GiveChicken,
            "Put in a steak.", L_GiveSteak,
            "Leave it alone.", L_close;
    if (countitem("ChickenLeg") > 0 && countitem("Steak") == 0)
        menu
            "Put in a chicken leg.", L_GiveChicken,
            "Leave it alone.", L_close;
    if (countitem("ChickenLeg") == 0 && countitem("Steak") > 0)
        menu
            "Put in a steak.", L_GiveSteak,
            "Leave it alone.", L_close;
    goto L_close;

L_GiveChicken:
    delitem "ChickenLeg", 1;
    @cat = 2;
    callsub S_Update_Katze;
    @catNeedsAlone = 1;
    goto L_close;

L_GiveSteak:
    delitem "Steak", 1;
    @cat = 2;
    callsub S_Update_Katze;
    @catNeedsAlone = 1;
    goto L_close;

L_HasFood:
    mes "There is some food in it.";
    goto L_close;

L_NeedsFur:
    mes "And it's empty!";
    next;

    if (countitem("WhiteFur") > 0)
        menu
            "Put a white fur next to the pot.", L_GiveFur,
            "Leave it alone.", L_close;
    goto L_close;

L_GiveFur:
    mes "You put down the fur, but the cat doesn't seem to take any notice. Maybe there's something else you could do. You pick the fur up again.";
    goto L_close;

L_NeedsWood:
    if (countitem("RawLog") > 0)
        menu
            "Put a wooden log next to the pot.", L_GiveWood,
            "Leave it alone.", L_close;
    goto L_close;

L_GiveWood:
    delitem "RawLog", 1;
    @cat = 4;
    callsub S_Update_Katze;
    @catNeedsAlone = 1;
    mes "You put the wooden log next to the pot. The cat eyes it suspiciously, but remains on her spot.";
    goto L_close;

L_HasWood:
    mes "A wooden log is patiently lying next to it.";
    goto L_close;

L_close:
    @cat = 0;
    close;

S_Update_Katze:
    Katze = (Katze & ~(NIBBLE_0_MASK)) | (@cat << NIBBLE_0_SHIFT);
    return;
}