summaryrefslogtreecommitdiff
path: root/npc/006-2-1/lune.txt
blob: 486ac01dc50261a49c4a41a7b845d19cd04239ad (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
// TMW2 Script
// Author:
//    Saulc
//    Vasily_Makarov (original from Evol)
//    Jesusalva
//    seeds
// Description:
//    Status Reset and Agility Potions

006-2-1,34,66,0	script	Lune	NPC_PIOU_ALCHEMIST,{

    speech S_LAST_NEXT,
        l("I am %s, a piou alchemist specializing in reset and agility potions.", .name$);

L_Menu:
    .@plush_count = BaseLevel*210-(9*210);
    // Lv 10: 210 GP
    // Lv 90: 1.890 GP
    if (BaseLevel > 10)
        .@plush_count = .@plush_count/(BaseLevel/10);

    select
        l("Can you reset my stats please?"),
        l("Can you mix me an agility potion?"),
        lg("I'm allergic to piou potions, goodbye.");
    mes "";

    switch (@menu)
    {
        case 1:
            goto L_ResetStats;
        case 2:
            goto L_PotionList;
        default:
            goto L_Quit;
            break;
    }
    close;

L_ResetStats:
    mesn;
    mesq l("Status point reset can't be undone. Do you really want this?");

L_ConfirmReset:
    ConfirmStatusReset();
    goto L_Quit;

L_PotionList:
    mes "";
    mesn;
    mesq l("I can make three types of Agility Potions, which would you like?");
    next;
    select
        rif(BaseLevel > 20, l("I want an Agi Potion.")),
        rif(BaseLevel > 30, l("I want an Agi+ Potion.")),
        rif(BaseLevel > 40, l("I want an Agi++ Potion.")),
        l("I changed my mind, goodbye.");
	mes "";
    switch (@menu) {
        case 1:
            goto L_AgiPotionA;
            break;
        case 2:
            goto L_AgiPotionB;
            break;
        case 3:
            goto L_AgiPotionC;
            break;
        default:
            goto L_Quit;
            break;
    }
    close;

L_AgiPotionA:
	.@price=POL_AdjustPrice(1000);
    mes "";
    mesn;
    mesq l("To make an %s I need a %s, an %s, and %s GP for commission.", getitemlink(AgiPotionA), getitemlink(TopazPowder), getitemlink(HerbalTea), fnum(.@price));
    next;
    select
        l("I have the ingredients here."),
        l("I'll come back later."),
        l("I don't need anything after all, goodbye!");
    if (@menu == 2)
        goto L_Menu;

    if (@menu == 3)
        goto L_Quit;

    if (
        countitem(TopazPowder) &&
        countitem(HerbalTea) &&
        Zeny >= .@price) {

        inventoryplace AgiPotionA, 3;
        delitem TopazPowder, 1;
        delitem HerbalTea, 1;
		POL_PlayerMoney(.@price);
        getitem AgiPotionA, any(2,3);
        getexp rand2(6,18), rand2(6,18);

        mesn;
        mesq l("Here you go. Perhaps you need another one?");
        next;
        goto L_PotionList;
    } else {
        mesn;
        mesq l("Sorry, but I need the ingredients and %d GP.", .@price);
        next;
    }
    goto L_Menu;

L_AgiPotionB:
	.@price=POL_AdjustPrice(1250);
    mes "";
    mesn;
	mesq l("To make an %s I need a %s, two %s, and %s GP for commission.", getitemlink(AgiPotionB), getitemlink(Topaz), getitemlink(HerbalTea), fnum(.@price));
    next;
    select
        l("I have the ingredients here."),
        l("I'll come back later."),
        l("I don't need anything after all, goodbye!");
    if (@menu == 2)
        goto L_Menu;

    if (@menu == 3)
        goto L_Quit;

    if (
        countitem(Topaz) &&
        countitem(HerbalTea) >= 2 &&
        Zeny >= .@price) {

        inventoryplace AgiPotionB, 3;
        delitem Topaz, 1;
        delitem HerbalTea, 2;
		POL_PlayerMoney(.@price);
        getitem AgiPotionB, any(2,3);
        getexp rand2(6,18), rand2(6,18);

        mesn;
        mesq l("Here you go. Perhaps you need another one?");
        next;
        goto L_PotionList;
    } else {
        mesn;
        mesq l("Sorry, but I need the ingredients and %d GP.", .@price);
        next;
    }
    goto L_Menu;

L_AgiPotionC:
	.@price=POL_AdjustPrice(1500);
    mes "";
    mesn;
	mesq l("To make an %s I need a %s, three %s, and %s GP for commission.", getitemlink(AgiPotionC), getitemlink(PolishedTopaz), getitemlink(HerbalTea), fnum(.@price));
    next;
    select
        l("I have the ingredients here."),
        l("I'll come back later."),
        l("I don't need anything after all, goodbye!");
    if (@menu == 2)
        goto L_Menu;

    if (@menu == 3)
        goto L_Quit;

    if (
        countitem(PolishedTopaz) &&
        countitem(HerbalTea) >= 3 &&
        Zeny >= .@price) {

        inventoryplace AgiPotionC, 3;
        delitem PolishedTopaz, 1;
        delitem HerbalTea, 3;
		POL_PlayerMoney(.@price);
        getitem AgiPotionC, any(2,3);
        getexp rand2(6,18), rand2(6,18);

        mesn;
        mesq l("Here you go. Perhaps you need another one?");
        next;
        goto L_PotionList;
    } else {
        mesn;
        mesq l("Sorry, but I need the ingredients and %d GP.", .@price);
        next;
    }
    goto L_Menu;

L_Quit:
    closeclientdialog;
    goodbye;
    close;

OnInit:
    .sex = G_OTHER;
    .distance = 4;
    end;
}