summaryrefslogtreecommitdiff
path: root/npc/013-2/wizard.txt
blob: 927ddfc41a7ed52dbb88de178f161b55953870f2 (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
013-2.gat,66,39,0	script	Old Wizard#_W	116,{
	set @has_magic, getskilllv(SKILL_MAGIC);
        set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_KNOWS_OLD_WIZARD;

        mes "[Old Wizard]";
        mes "\"Welcome, dear wanderer! Come into my humble home. Take a rest, eat and drink.\"";
        next;

        menu
        	"Thanks, that's very kind of you!",thanks,
                "Can you teach me magic?", L_teach_rude,
        	"Oh, shut up!",shutup;
        close;

L_teach_rude:
        mes "[Old Wizard]";
        mes "\"I certainly could, but I already have an apprentice.\"";
        close;

shutup:
        mes "[Old Wizard]";
        mes "\"That attitude isn't going to get you very far, my dear.\"";
        close;
thanks:
        mes "[Old Wizard]";
        mes "\"Behind this door, my apprentice will serve you.\"";
        next;
        if (@has_magic)
            menu
	        "Alright.",ok,
                "I am studying magic, can you help?", L_new_student,
	        "Your apprentice? ... No thanks.",nothx;
        if (!@has_magic)
            menu
	        "Alright.",ok,
	        "Your apprentice? ... No thanks.",nothx;
nothx:
        mes "[Old Wizard]";
        mes "\"Goodbye, then!\"";
        close;

L_new_student:
        mes "[Old Wizard]";
        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)))
            menu
                "That would be very kind of you!", L_teachspell,
                "No, but thank you!", nothx;

        if (getskilllv(SKILL_POOL))
            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!", nothx;

L_teachspell:
        mes "[Old Wizard]";
        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;

        mes "[Old Wizard]";
        mes "\"Put a piece of cotton cloth on your head, and speak out '" + getspellinvocation("hide") + "', loudly and clearly. The protection lasts quite long, but you may have to renew it on occasion.\"";
        next;

        mes "[Old Wizard]";
        mes "\"You can also cast it on others, of course. Just speak their name after you prononuce the invocation.\"";
        next;

        mes "[Old Wizard]";
        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)
		close;

        mes "[Old Wizard]";
        mes "\"I'm not sure if you are experienced enough to cast it yet, though.  You may need to first learn astral magic.\"";
        close;

L_astralsoul:
        mes "[Old Wizard]";
        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.", -,
             "Ok be right back. I'll get them", nothx;

        if (countitem("Pearl") < 1 || countitem("Acorn") < 100) goto L_NotEnough;
        delitem "Pearl", 1;
        delitem "Acorn", 100;

        mes "[Old Wizard]";
        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;
        set @SUP_lvl, 1;
        set @SUP_id, SKILL_ASTRAL_SOUL;
        set @SUP_name$, "Astral Soul";
        set @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.\"";
        close;

L_NotEnough:
        mes "[Old Wizard]";
        mes "\"Please learn to count.\"";
        next;
        mes "\"When you are done with that, come back again.\"";
        close;
ok:
        mes "[Old Wizard]";
        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.\"";
        close;
}