summaryrefslogtreecommitdiff
path: root/npc/008-1/old-woman.txt
blob: 89789b708471fd97dfcfd0412ba6664ac0588d6a (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/// Evol scripts.
// Author:
//    gumi
// Quest states:
//    [1] 0  - cannot do the quest
//    [1] 1  - can do the quest
//    [1] 2  - talked to inspector (1) <= start
//    [1] 3  - talked to old woman (1)
//    [1] 4  - talked to old woman (2)
//    [1] 5  - talked to inspector (2)
//    [1] 6  - talked to troupe leader (1)
//    [1] 7  - talked to inspector (3)
//    [1] 8  - talked to old man
//    [1] 9  - talked to old woman (3)
//    [1] 10 - talked to inspector (4)
//    [1] 11 - talked to old woman (4)
//    [1] 12 - talked to malek
//    [1] 13 - searched the bookcase
//    [1] 14 - talked to inspector (5)
//    [1] 15 - talked to troupe leader (2) <= reward
//    [1] 16 - talked to inspector (6) <= reward, end
//    [2] unused
//    [3] unused
//    [t] unused
// Description:
//    Old Lady in the flower field, Robberies in Hurnscald.

008-1,231,114,0	script	Old Woman	NPC_OLD_LADY,{

    function is_inspector {
        return (getequipcardid(EQI_HEAD_MID, 0) == NavyBlueCottonDye &&
                getequipcardid(EQI_HEAD_LOW, 0) == NavyBlueCottonDye);
    }

    function oldwoman_ask {
        speech(4,
            l("Hello deary."));

        selectd(
            l("Have you seen anything strange lately?"),
            l("Do you know anything about the recent robberies?"));

        .@q = getq(.quest_inspector);

        if (!is_inspector())
        {
            speech(l("Yes, but I'm only talking to the inspector himself!"));

            close2;
            if (.@q < 3)
                setq(.quest_inspector, 3);
            end;
        }

        if (.@q == 2 || .@q == 3)
        {
            speech(
                l("I saw someone sneaking around town wearing a theater mask."),
                l("It looked like one of the masks used by the troupe that was in town recently."));

            close2;
            setq(.quest_inspector, 4);
        }

        else if (.@q == 10)
        {
            speech(
                l("I've remembered something else."),
                l("The night the troupe left, I saw someone with a theater mask take a large satchel out of town."),
                l("He was heading north."));

            close2;
            setq(.quest_inspector, 11);
        }

        end;
    }

    function oldwoman_alibi {
        speech(4,
            l("Hello deary."));

        selectd(
            l("Was your husband with you at home all night the last night that the troupe was in town?"));

        speech(
            l("Yes, we were both at home all night."));

        close2;
        setq(.quest_inspector, 9);
        end;
    }

    function oldwoman_filler {
        npctalk3(l("I hope you catch that naughty person!"));
        end;
    }

    // OnTalk:
    switch (getq(.quest_inspector))
    {
    case 2:
    case 3: oldwoman_ask; break;
    case 4:
    case 5:
    case 6:
    case 7: oldwoman_filler; break;
    case 8:
    case 9: oldwoman_alibi; break;
    case 10: oldwoman_ask; break;
    }

    // initial intro
    if (BaseLevel < 40)
        npctalk3(l("Watch out for these flowers. They don't like to be messed with."));
    else
        npctalk3(l("Hello deary."));
    end;

OnInit:
    .quest_inspector = HurnscaldQuests_Inspector;
    .quest_debug = .quest_inspector;
    .distance = 1; // this npc has bad hearing
    .speed = 2000; // this npc is very old
    // TODO: move graph (after the Hurnscald map is finalized)

////////// UNFINISHED //////////
////////////////////////////////
// REMOVE THIS CODE WHEN THIS //
// NPC IS NO LONGER A WIP //////
////////////////////////////////
//if (!debug) disablenpc(.name$);
///////// UNFINISHED ///////////

    end;
}