summaryrefslogtreecommitdiff
path: root/npc/008-2-1/inspector.txt
blob: 6d7915d5fc8f8cd3327bbed46542087061d16606 (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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
// 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:
//    robberies in hurnscald

008-2-1,30,34,0	script	Inspector	NPC_INSPECTOR,{

    if (BaseLevel < .min_level)
    {
        npctalk3(l("I'm sorry, but I'm busy looking into this string of robberies."));
        end;
    }

    // OnTalk:
    switch (getq(.quest))
    {
    case 0:
    case 1:
        speech(4,
            l("Hmm... what to do."));
        narrator(4,
            l("He looks up and into your face."));
        speech(4,
            l("You look capable, will you help me solve these robberies?"),
            l("I would go myself, but for some reason I'm a non-walking NPC."));

        if (selectd("Yes", "No") == 2) {
            closeclientdialog();
            close;
        }

        speech(
            l("Ok then."),
            l("I'd like you to ask the villagers about the recent string of robberies."));

        close2;
        setq(.quest, 2);
        end;

    case 2:
        npctalk3(l("Please continue talking to the villagers."));
        end;

    case 3:
        speech(
            l("Hm..."),
            l("I don't know if I trust her eyesight or memory."),
            l("See if someone else knows anything."));
        close;

    case 4:
        speech(
            l("Someone in a theater mask, eh?"),
            l("There was a traveling theater troupe in town recently, but they've moved on to Tulimshar."),
            l("Please go talk to their leader about this."));

        close2;
        setq(.quest, 5);
        end;

    case 5:
        npctalk3(l("Please go talk to the leader of the traveling troupe about the theater mask."));
        end;

    case 6:
        speech(
            l("Hm... an old man?"),
            l("Could you interrogate him for me?"));

        close2;
        setq(.quest, 7);
        end;

    case 7:
        npctalk3(l("Have you talked with the old man yet?"));
        end;

    case 8:
        npctalk3(l("Can you verify that with his wife?"));
        end;

    case 9:
        speech(
            l("Hm... then it couldn't be him."),
            l("I'm not sure where to go from here, maybe you can find something else."),
            l("Try talking to everyone again."));

        close2;
        setq(.quest, 10);
        end;

    case 10:
        npctalk3(l("Made any progress yet?"));
        end;

    case 11:
        npctalk3(l("Then go north and investigate!"));
        end;

    case 12:
        npctalk3(l("Did you look over the basement?"));
        end;

    case 13:
        speech(
            l("What a strange note."),
            l("I'll keep track of this, while you return the mask to the troupe."),
            l("I would go myself, but the developers were too lazy to make me walk."),
            "...",
            l("By the way, stay sharp! I may call upon you again."));

        close2;
        setq(.quest, 14);
        end;

    case 14:
        npctalk3(l("Please return the mask to the traveling troupe."));
        end;

    case 15:
        speech(
            l("My men have found all of the stolen items."),
            l("They were all in the mining camp."),
            l("We still don't know who did it.")); // XXX: feel free to extend this quest beyond this point

        close2;
        setq(.quest, 16);
        quest_xp(.maxLevel, .reward_exp);
        end;

    case 16:
        npctalk3(l("Remember to stay sharp. I might need your help on another case."));
        end;
    }

    closeclientdialog();
    close;

OnPCLoginEvent:
OnPCBaseLvUpEvent:
    if (BaseLevel >= .min_level && getq(.quest) < 1)
    {
        setq(.quest, 1); // allow the player to do the quest
        dispbottom(l("New quest available: %s (level %d+)",
            getquestlink(.quest), .min_level)); // XXX: requires new manaplus versions, maybe show a different message for old versions?
    }
    end;

OnInit:
    .min_level = 30; // min level to do the quest
    .maxLevel = 60;

    .reward_exp = 2500;

    .quest = HurnscaldQuests_Inspector;
    .quest_debug = .quest;
    .distance = 3;

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

    end;
}