summaryrefslogtreecommitdiff
path: root/npc/001-1/qpid.txt
blob: 33359378902e6a7993a5bcb5edaba51b8999a100 (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
// Evol scripts.
// Author:
//    Reid
// Description:
//    Potion seller, she is part of the Enora's noob quests.

001-1,65,116,0	script	Q'Pid#001-1	NPC_QPID,{

    function riddle_enigma {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Ok fine, you have up to 3 tries, here is the riddle:"),
            l("What is growing and shrinking at the same time?");
        narrator S_LAST_NEXT,
            l("You need to type the answer of this riddle in the NPC window."),
            l("The answer is a single word, without conjugation."),
            l("You can also answer in your native language or in English.");

        do
        {
            input .@answer$;
            .@i++;

            if (riddlevalidation(.@answer$, "life", l("life")))
            {
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                    l("Oh..."),
                    l("You seem more cultivated than you look.");

                if (getq(ArtisQuests_Enora) == 7)
                {
                    setq(ArtisQuests_Enora, 9);
                    speech S_LAST_NEXT | S_NO_NPC_NAME,
                        l("Fine, take these potions, I will replenish them in the next couple hours anyway.");
                }

                break;
            }
            else if (.@i < 3)
            {
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                    l("Too bad, try again.");
            }
            else
            {
                if (getq(ArtisQuests_Enora) == 7)
                {
                    setq(ArtisQuests_Enora, 8);
                    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                        l("You failed!"),
                        l("Ivan is the one you should look for now."),
                        l("He is in a small house between the dock's warehouse and the dojo."),
                        l("Follow the canal to the north-east and you will find it."),
                        l("And get out of here, I'm not a map!");
                }
                else
                {
                    speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                        l("You failed!");
                }

                break;
            }
        } while (true);

        return;
    }

    function enora_quest {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("She wants? What if I don't want?"),
            l("I'm not a pawn of the Legion, I don't have to obey you!"),
            l("Oh and guess what! I'm almost out of potions anyway.");

        switch (select(l("And where can I find these potions?"),
                        l("You bored me, see you later.")))
        {
            case 1:
                break;
            case 2:
                return;
        }

        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("You don't seem to be from the Legion, let's do a game."),
            l("If you find the correct answer, I will give you these potions..."),
            l("But if you fail, you will have to get them from the alchemist."),
            l("Deal?");

        if (askyesno() == ASK_YES)
        {
            riddle_enigma;
        }
        return;
    }

    function alchemist_information {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Do? I don't do them."),
            l("I'm sure that you already knew the answer, didn't you?"),
            l("You tried to embarrass me, am I right?!"),
            lg("It's Ivan... I'm sure that he sent you to annoy me..."),
            l("I'm just a merchant, I trade and make deals, yes \"excuse\" me if I'm not as skilled as that stupid alchemist."),
            l("But rare are those that receive grants from the Legion itself. For anybody else only a hard work can pay your bills!");
        emotion E_UPSET;

        switch (select(l("Sorry I didn't mean to bother you."),
                        l("You are just sitting on the shadow of your store.")))
        {
            case 1:
                mes "";
                mesn;
                break;
            case 2:
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You are honest, I like it.");
                break;
        }
        mesq l("Is that all you had to say?");
        next;

        return;
    }

    speech S_LAST_NEXT,
        l("What?");

    do
    {
        .@enora = getq(ArtisQuests_Enora);

        select
            rif(.@enora == 7, l("Enora wants her potions.")),
            menuaction(l("Trade")),
            rif(.@enora > 7, l("What was your riddle?")),
            l("How do you do your potions?"),
            l("What are you reading?"),
            menuaction(l("Quit"));

        switch (@menu)
        {
            case 1:
                enora_quest;
                break;
            case 2:
                closeclientdialog;
                shop "Store#Potion001-1";
                close;
            case 3:
                riddle_enigma;
                break;
            case 4:
                alchemist_information;
                break;
            case 5:
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                    l("It's a poem, about poems... Why are you asking that?"),
                    l("Because I am a Kralog I can't read such things? That's rubbish."),
                    l("I borrowed it from the library, you should try to cultivate yourself more instead of insinuate things about people you don't know!");
                break;
        }
    } while (@menu != 6);

    closeclientdialog;
    goodbye;
    close;

OnInit:
    .bodytype = BODYTYPE_2;
    .distance = 3;
    end;
}