summaryrefslogtreecommitdiff
path: root/npc/013-2/wizard.txt
blob: 5bef35a4d39f15c48536ecf902c2d32bc422844f (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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
013-2,66,39,0	script	Old Wizard#_W	NPC116,{
    @has_magic = getskilllv(SKILL_MAGIC);
    MAGIC_FLAGS = MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD;

    @run = ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT);
    if ((@run == 2) && (QL_KYLIAN == 13))
        goto L_Deliver;
    goto L_Start;

L_Deliver:
    menu
        "I have a delivery for you", L_Delivery;

L_Delivery:
    mesn;
    mes "\"Good now I can get to work on some stronger brew..\"";
    QL_KYLIAN = 14;
    goto L_close;

L_Start:
    mesn;
    mes "\"Welcome, dear wanderer! Come into my humble home. Take a rest, eat and drink.\"";
    next;
    menu
        "Thanks, that's very kind of you!", L_Thanks,
        "Can you teach me magic?", L_TeachRude,
        rif(get_nibble(##03_TMWQUEST, 0), l("Actually, have you ever heard of Yeti's kidnapping little girls?")), L_VaultQuest,
        "Oh, shut up!", L_ShutUp;

L_TeachRude:
    mesn;
    mes "\"I certainly could, but I already have an apprentice.\"";
    goto L_close;

L_ShutUp:
    mesn;
    mes "\"That attitude isn't going to get you very far, my dear.\"";
    goto L_close;

L_Thanks:
    mesn;
    mes "\"Behind this door, my apprentice will serve you.\"";
    next;
    if (@has_magic)
        menu
            "Alright.", L_Agree,
            "I am studying magic, can you help?", L_NewStudent,
            "Your apprentice? ... No thanks.", L_Decline;
    menu
        "Alright.", L_Agree,
        "Your apprentice? ... No thanks.", L_Decline;

L_Decline:
    mesn;
    mes "\"Goodbye, then!\"";
    goto L_close;

L_NewStudent:
    mesn;
    mes "\"Studying is always an excellent use of one's mind! I fear that I can't offer too much assistance to you, however. But if you are interested, I could perhaps teach you a simple spell?\"";
    next;

    // check if the player has the knowledge of any skill
    if (getskilllv(SKILL_POOL) && (getskilllv(SKILL_MAGIC_ASTRAL) < 1) || (getskilllv(SKILL_ASTRAL_SOUL) == 0))
        menu
            "That would be very kind of you!", L_TeachSpell,
            "Actually I am looking for someone teaching me some more magic skills.", L_AstralSoul,
            "No, but thank you!", L_Decline;
    menu
        "That would be very kind of you!", L_TeachSpell,
        "No, but thank you!", L_Decline;

L_TeachSpell:
    mesn;
    mes "\"This one may not seem too powerful, but it can be quite handy; it's the 'hide' spell. It will shield you from some forms of detection magic.\"";
    next;
    mesn;
    mes "\"Put a piece of cotton cloth on your head, and speak out '" + get(.invocation$, "spell-hide") + "', loudly and clearly. The protection lasts quite long, but you may have to renew it on occasion.\"";
    next;
    mesn;
    mes "\"You can also cast it on others, of course. Just speak their name after you pronounce the invocation.\"";
    next;
    mesn;
    mes "\"You may find it useful for getting a little peace and quiet at times, but it can also get in the way of friends trying to find you, so use it with care.\"";
    next;
    if (getskilllv(SKILL_MAGIC_ASTRAL) >= 2)
        goto L_close;
    mesn;
    mes "\"I'm not sure if you are experienced enough to cast it yet, though. You may need to first learn astral magic.\"";
    goto L_close;

L_AstralSoul:
    mesn;
    mes "\"Oh yes, there are lots of ways to improve your magic. Skills -some people say mental focus for that- are another way to improve your magic. Of course learning more and more spells is also a need for good mages.\"";
    next;
    mes "\"I can teach you the ability to focus on magical stuff.\"";
    next;
    mes "\"To do so, I am in need of a pearl and about 100 acorns.\"";
    menu
        "Here we go.", L_Next,
        "Ok be right back. I'll get them", L_Decline;

L_Next:
    if (countitem("Pearl") < 1 || countitem("Acorn") < 100) goto L_NotEnough;
    delitem "Pearl", 1;
    delitem "Acorn", 100;
    mesn;
    mes "\"Okay, listen:\"";
    next;
    mes "\"Some parts of your brain is still unused. These parts will now get the ability to get focused to magic.\"";
    next;
    mes "\"To do so, think of a magic spell!\"";
    next;
    mes "The old wizard mumbles some invocations";
    next;
    @SUP_lvl = 1;
    @SUP_id = SKILL_ASTRAL_SOUL;
    @SUP_name$ = "Astral Soul";
    @SUP_xp = 2500;
    callfunc "SkillUp";
    mes "\"Now go and try to find someone who can actually activate that focus.\"";
    next;
    mes "\"You have the powers to focus on magic, but you need to get magic focused now.\"";
    goto L_close;

L_NotEnough:
    mesn;
    mes "\"Please learn to count.\"";
    next;
    mes "\"When you are done with that, come back again.\"";
    goto L_close;

L_Agree:
    mesn;
    mes "\"Beware the flying notes though, some of them are really dangerous. I haven't been able to persuade them to get back into their book. And avoid the mirror, it's been acting strange lately.\"";
    next;
    mes "\"Oh, and please don't take my apprentice too seriously. He still has a lot to learn.\"";
    goto L_close;

L_VaultQuest:
    .@q = get_nibble(##03_TMWQUEST, 0);
    mes "";
    mesc l("%s raises an eyebrow at you.", strnpcinfo(1));
    if (.@q == 1) {
        mesn;
        mesq l("Are you being serious?");
        next;
        //if (askyesno() == ASK_NO) close;
        mesn;
        mesq l("Have you at least asked Celestia about it? She is very knowledgeable about Yetis.");
        next;
        select
            l("Who is Celestia?"),
            l("Yes I did."),
            l("No I didn't, I'll ask her.");
        mes "";
        switch (@menu) {
        case 1:
            mesn;
            mesq l("Ah, Celestia... She is a good woman who lives in Hurnscald. Go find her, come back to me after.");
            close;
        case 3:
            close;
        }
        mesn;
        mesq l("And what did she say?");
        next;
        mesc l("You explain to the wizard about the situation.");
        next;
        mesn;
        mesq l("If she said Yetis doesn't do it, then they doesn't do it... In this world, at least.");
        if (!getvaultid()) close; // Duplicate code, for double safety
        next;
        select
            l("\"this world\"?");
        mes "";
        mesn;
        mesq l("Oh yes, there are worlds like this one where you can find even Yetis involved in politics. Really impressing.");
        next;
        set_nibble(##03_TMWQUEST, 0, 2);
        .@q = 2;
    }
    if (.@q == 2) {
        mesn;
        mesq l("It was a long time since the last time I visited a different world... But you're young. Maybe you can do it. However, keep it a secret.");
        next;
        mesn;
        mesq l("So, lemme think. There was this world, \"Moubootaur Lake\" or something, don't recall how they call themselves."); // Typo on purpose
        next;
        mesn;
        mesq l("You could ask the %s of that world about it. Come back to me if she doesn't know anything, and I'll think on another world.", b("Celestia"));
        next;
        mesn;
        mesq l("Now, %s. The worlds are all different. The one you're going to may be similar but is far from a carbon copy of this one.", b(l("pay attention")));
        next;
        mesn;
        mesq l("That world's Celestia is %s but not necessarily on the same house, or with the exact same name, nor with the exact same clothes.", b(l("likely on the same town")));
        next;
        mesn;
        mesq l("Now, if my memory serves me right, after visiting that world, you'll appear near a lake. %s, and then %s.",
             b(l("Go south until you see a big road")),
             b(l("Head east until you see the town")));
        next;
        mesn;
        mesq l("If you know a native citizen of the world, all the better. Worlds tend to impose their own rules, after all.");
        next;
        mesn;
        mesq col(l("*cough cough*"), 9)+" "+l("Anyway, I don't teach this spell to everyone. Near my bed is a saying. Recite it backwards, think on the world you want to go, and let it be.");
        next;
    }
    mesn;
    mesq l("Good luck, and come back to me if you need help.");
    close;

L_close:
    @has_magic = 0;
    close;
}