summaryrefslogtreecommitdiff
path: root/npc/002-1/alige.txt
blob: e23bfae1354b799951686a285a9f84dbe0325e42 (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
// TMW2 Scripts.
//
// TMW-BR Original Authors:
//      Programmer:   Adson Renato
//      Texts:        Arkanjo
//      Review:		  Jesusalva
//
// Authors:
//    Jesusalva
// Description:
//    Stowaway hidden in a ship's hole. Contrabandist. Trade potions, dyes,
//    food, water, and money for an item.
//    In BR originals requested a four leaf clover to do luck magic, in order to not be caught.
//    That would imply teaching a new skill, and I'm not felling like it, so I removed.

002-1,45,26,0	script	Alige	NPC_ALIGE,{
    if (BaseLevel < 42) goto L_Weak;
    .@q=getq(ShipQuests_Alige);
    if (.@q == 1) goto L_Return;
    if (.@q == 2) goto L_End;
    mesn;
    mesq lg("Hey, dude! The guards are after me. I need your help, and I can reward you.");
    next;
    mesn strcharinfo(0);
    menu
        l("Guaaaards! Sailors! Help! We have a stowaway!"), L_Revolt,
        l("Not right now, I'm busy."),                      L_Close,
        l("Did you said reward?!"),                         L_GoGo;

L_Weak:
    mesc l("You thought there was someone here. It must have been your imagination.");
    if (@seenalige)
        goto L_Noob;
    @seenalige=true;
    close;

L_Noob:
    mes "";
    mesc l("Protip: You need level %d or higher to do this quest.", 42), 1;
    close;

L_Revolt:
    mes "";
    message strcharinfo(0), l("Guaaaards! Sailors! Help! We have a stowaway!");
    mesn;
    mesq l("No, please don't! I have 3 kids to feed. They are looking for me for contraband. Please, let me go!");
    close;

L_GoGo:
    mes "";
    mesn;
    mesq l("Yes, I need to get out of here the earliest possible.");
    next;
    mesn strcharinfo(0);
    mesq l("So tell me already what you need, and what is the reward!");
    next;
//    Stowaway hidden in a ship's hole. Contrabandist. Trade potions, dyes,
//    food, water, and money for a hat.
    mesn;
    mesc l("Alige hands you an old paper patch.");
    next;
    mesn l("Old Paper Patch");
    mes l("* @@/30 @@", countitem(CactusPotion), getitemlink(CactusPotion));
    mes l("* @@/12 @@", countitem(Bread), getitemlink(Bread));
    mes l("* @@/12 @@", countitem(Cheese), getitemlink(Cheese));
    mes l("* @@/12 @@", countitem(CherryCake), getitemlink(CherryCake));
    mes l("* @@/8 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater));
    mes l("* @@/6 @@", countitem(HastePotion), getitemlink(HastePotion));
    mes l("* @@/6 @@", countitem(StrengthPotion), getitemlink(StrengthPotion));
    mes l("* @@/2 @@", countitem(YellowDye), getitemlink(YellowDye));
    mes l("* @@/2 @@", countitem(BlueDye), getitemlink(BlueDye));
    mes l("* @@/7.500 GP", Zeny);
    next;
    // Temporary item. This four leaf amulet can be evolved: Bromenal < Iron < Golden < Crozenite
    mesn;
    mesq l("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet));
    menu
        l("Of course I'll help you!"), L_Accept,
        l("Have you got mad? That's too much, it's like you are trying to be perfect! No way I'll help you!"), L_Close;

L_Accept:
    mes "";
    mesn;
    mesq l("\"Many thanks! I'll be waiting for you, hiding on the ship's hold!\"");
    next;
    mesn strcharinfo(0);
    mesq l("Could you first explain me why so many items?");
    next;
    mesn;
    mesq l("Very well, listen to my plan!");
    next;
    mesn;
    mesq l("The dyes are to disguise myself, I don't want to get caught. The potions are for safety, who knows what I'll face?");
    next;
    mesn;
    mesq l("Water, Bread, Cheese and Cherry Cake are to eat, and money is always useful, you know.");
    next;
    mesn strcharinfo(0);
    mesq l("You planned neatly. I'll be back.");
    setq ShipQuests_Alige, 1;
    close;

L_Return:
    mesn;
    mesq l("Hey, psst! Have you brought me what I asked for?");
    next;
    mesn strcharinfo(0);
    menu
        l("What I had to bring, again?"), L_Remember,
        l("Yes, you can count it."), L_Check,
        l("No... Not yet, sorry."), L_Close;

L_Remember:
    mes "";
    mesc l("Alige hands you an old paper patch.");
    next;
    mesn l("Old Paper Patch");
    mes l("* @@/30 @@", countitem(CactusPotion), getitemlink(CactusPotion));
    mes l("* @@/12 @@", countitem(Bread), getitemlink(Bread));
    mes l("* @@/12 @@", countitem(Cheese), getitemlink(Cheese));
    mes l("* @@/12 @@", countitem(CherryCake), getitemlink(CherryCake));
    mes l("* @@/8 @@", countitem(BottleOfTonoriWater), getitemlink(BottleOfTonoriWater));
    mes l("* @@/6 @@", countitem(HastePotion), getitemlink(HastePotion));
    mes l("* @@/6 @@", countitem(StrengthPotion), getitemlink(StrengthPotion));
    mes l("* @@/2 @@", countitem(YellowDye), getitemlink(YellowDye));
    mes l("* @@/2 @@", countitem(BlueDye), getitemlink(BlueDye));
    mes l("* @@/7.500 GP", Zeny);
    next;
    // Temporary item. This four leaf amulet can be evolved: Bromenal < Iron < Golden < Crozenite
    mesn;
    mesq l("In exchange for your help, I'll give you a @@!", getitemlink(CrozeniteFourLeafAmulet));
    close;

L_Check:
    if (countitem(CactusPotion) < 30 ||
        countitem(Bread) < 12 ||
        countitem(Cheese) < 12 ||
        countitem(CherryCake) < 12 ||
        countitem(BottleOfTonoriWater) < 8 ||
        countitem(HastePotion) < 6 ||
        countitem(StrengthPotion) < 6 ||
        countitem(YellowDye) < 2 ||
        countitem(BlueDye) < 2)
            goto L_Missing;
    if (Zeny < 7500) goto L_Missing;

    inventoryplace CrozeniteFourLeafAmulet, 1;
    delitem CactusPotion, 30;
    delitem Bread, 12;
    delitem Cheese, 12;
    delitem CherryCake, 12;
    delitem BottleOfTonoriWater, 8;
    delitem HastePotion, 6;
    delitem StrengthPotion, 6;
    delitem YellowDye, 2;
    delitem BlueDye, 2;
    Zeny = Zeny - 7500;
    getitem CrozeniteFourLeafAmulet, 1;
    getexp 32625, 50;
    setq ShipQuests_Alige, 2;
    mes "";
    mesn;
    mesq l("Good job... Here is your reward...");
    next;
    mesn;
    mesq l("I have to get going now. Thanks for the help!");
    close;

L_Missing:
    mes "";
    mesn;
    mes l("There's not everything I've asked for...");
    next;
    goto L_Remember;

L_End:
    mesn;
    mes l("I am still here, but I already did amends for my acts and don't need to flee anymore...");
    next;
    mesn strcharinfo(0);
    mes l("Why am I having a hard time to believe on you...");
    close;

L_Close:
    close;

OnInit:
    .sex = G_MALE;
    .distance = 2;

    /*
    // Preventive check against faulty update. Must be removed afterwards.
    // UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2;
	.@nb = query_sql("select `char_id` from `quest` WHERE (`count1`>=1 and `quest_id`=2) LIMIT 2", .@name$);
    if (getarraysize(.@name$) > 0) {
        debugmes "FATAL ERROR: Quest log not updated.";
        debugmes "disabling Alige to prevent weirder bugs.";
        debugmes "UPDATE `quest` SET `count1` = '0' WHERE `quest`.`quest_id` = 2";
        disablenpc .name$;
    }
    */

    end;
}