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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
|
//#################################################################################
//# This script contains files for Halloween 2009. #
//# Courtesy of: Ceros [scripting], Salmondine [drops], skipy & lien [Candyman], #
//# Freeyorp [the real scripting + PvP quest [[I wish I could have his babies]], #
//# Beelzebub for the Skull mask, Jaxad [for ... and implementation help] #
//# Remoitnane, for putting up with Freeyorp's mistakes during playtesting #
//# Needed: 50 Candy, 50 Chocolate Bars, 50 Caramel Apples, ~60 of any Lollipop #
//# Reward: Skull Mask #
//#################################################################################
// This script is buggy, don't even think of enabling it
// -o11c
// The Candy Man
009-1.gat,90,27,0 script The Candy Man 183, {
set @STATE_KNOWS_CANDYMAN, 1;
set @STATE_FETCH_QUEST, 2;
set @STATE_FETCH_DONE, 3;
set @STATE_PVP_QUEST, 4;
set @LAST_KILL_STATE, 10;
set @STATE_FINISHED, 11;
if ((strcharinfo(0) == "xxMOIKANOXX")) goto L_DIE_IN_A_FIRE;
if (rand(7) > 4) goto L_Malus_PC;
if (Candyman == 0 && BaseLevel <= 30) goto L_Candy_Too_Young;
if (Candyman == @STATE_KNOWS_CANDYMAN) goto L_Candy_Mean_Bastard;
if (Candyman == @STATE_FETCH_QUEST) goto L_Candy_Check;
if (Candyman == @STATE_FETCH_DONE) goto L_Candy_Done;
if (Candyman >= @STATE_PVP_QUEST && Candyman < @LAST_KILL_STATE) goto L_Kill_Someone;
if (Candyman == @LAST_KILL_STATE) goto L_PvP_Done;
if (Candyman == @STATE_FINISHED) goto L_Finished;
if (Candyman == 0) goto L_Candy_Start;
close;
L_Candy_Start:
if (Sex)
set @honorific$, "boy";
if (!Sex)
set @honorific$, "girl";
mes "[The Candy Man]";
mes "\"Hello little " + @honorific$ + "... want some candy?\"";
next;
menu
"... uh... sure?", L_Candy_Is_A_Girls_Best_Friend,
"No way, creepo! My mom told me about people like you!", -;
close;
L_Candy_Is_A_Girls_Best_Friend:
mes "[The Candy Man]";
mes "\"Well too bad! I want it all!\"";
set Candyman, @STATE_KNOWS_CANDYMAN;
close;
L_Candy_Mean_Bastard:
mes "[The Candy Man]";
mes "\"What do you wan-- wait. I'm sorry, maybe you could give me a hand, perhaps? There'd be something in it for you, I promise.\"";
next;
menu
"With what - and what would be in it for me?", L_Candy_More_Info,
"Sorry, no time for the likes of you.", close,
"[Clap loudly]", L_Candy_Insult;
close;
L_Candy_Insult:
callsub S_Taunt_PC;
itemheal -Hp, 0;
misceffect sfx_magic_war;
misceffect sfx_magic_war, strcharinfo(0);
close;
L_Candy_More_Info:
mes "[The Candy Man]";
mes "\"You see.. I need some candy for a.. party that I am going to tonight. But, alas, I didn't bring enough candy for everyone. If you bring me the candy I need, I'll give you something to remind you of me and scare others. How's that sound?\"";
next;
menu
"Sorry, I don't like the sound of this..", -,
"Hmm.. OK..", L_Candy_Accept;
close;
L_Candy_Accept:
set Candyman, @STATE_FETCH_QUEST;
close;
L_Candy_Check:
mes "[The Candy Man]";
mes "\"So what have you brought me, fleshy one?\"";
next;
if (countitem("ChocolateBar") < 50 || countitem("Candy") < 50 || countitem("LollipopColor1") + countitem("LollipopColor2") + countitem("LollipopColor3") < 60 || countitem("CaramelApple") < 50 ) goto L_Check_Not_Enough;
//L_Sugar_Daddy: OK, so it isn't needed but it is still funny
mes "[The Candy Man]";
mes "\"Hmm.. yes, yes.. it seems you do have enough candy. And I guess a promise is a promise and all that happy... stuff. Very well, here is this mask. It's a striking resemblance, isn't it?\"";
set @LollipopTotal, countItem("LollipopColor1") + countItem("LollipopColor2") + countItem("LollipopColor3");
delitem "LollipopColor1", 60 * countItem("LollipopColor1") / @LollipopTotal; // FIXME: Rounding errors?
delitem "LollipopColor2", 60 * countItem("LollipopColor2") / @LollipopTotal;
delitem "LollipopColor3", 60 * countItem("LollipopColor3") / @LollipopTotal;
delitem "ChocolateBar", 50;
delitem "Candy", 50;
delitem "CaramelApple", 50;
set Candyman, @STATE_FETCH_DONE;
mes "[The Candy Man gives you a Skull Mask.]";
getitem "SkullMask", 1;
mes "[12,000 experience points]";
getexp 12000, 0;
set $CandyOpsComplete, $CandyOpsComplete + 1;
next;
mes "[The Candy Man]";
mes "\"Oh screw it, this is just no fun.\"";
callsub S_Taunt_PC;
misceffect sfx_magic_war;
misceffect sfx_magic_war, strcharinfo(0);
itemheal -Hp, 0;
close;
L_Check_Not_Enough:
mes "[The Candy Man]";
mes "\"No, not enough candy, I need more!\"";
mes "\"Yes...\"";
if (countItem("ChocolateBar") < 50) mes "\"Chocolate is always delicious, I need some more from you before I will consider your offerings complete...\"";
if (countItem("Candy") < 50) mes "\"There is the candy, wrapped up and full of energy so good.\"";
if (countItem("CaramelApple") < 50) mes "\"I have seen many caramel apples go by. I will not rest until I have them!\"";
if (countitem("LollipopColor1") + countitem("LollipopColor2") + countitem("LollipopColor3") < 60) mes "\"Lollipops. Any combination, I care not about which types you bring.\"";
mes "\"Come back when you have enough!\"";
close;
L_Candyman_Trick:
mes "[The Candy Man]";
mapannounce "009-1", "Mwahahahaha!", 0;
mapannounce "009-2", "Mwahahahaha!", 0;
misceffect sfx_magic_astral;
misceffect sfx_magic_war, strcharinfo(0);
areamonster "this", 88, 25, 92, 29, "", 1022, 1 + rand($CandyOpsComplete) / (5 + rand(rand($CandyOpsComplete)));
close;
L_Candy_Done:
mes "[The Candy Man]";
mes "\"Sorry chum, you already got your mask and I already got my candy.\"";
next;
menu
"Oookay...", -,
"You're sure?", L_Asking_For_It;
close;
L_Asking_For_It:
mes "[The Candy Man]";
mes "\"Oooh, we have an eager one here, it seems. Weeeell, I might have something more for you, if you can do something amusing...\"";
next;
menu
"What did you have in mind?", L_PvP_Intro,
"[Carefully back away...]", -;
close;
L_PvP_Intro:
mes "[The Candy Man]";
mes "\"Mhm, mhmhmm. Well, there is nothing quite as utterly delightful as watching you little people run around and kill each other. If, say, you manage to kill enough worthy opponents in an amusing manner, I may well have something... special... for you.\"";
next;
set Candyman, @STATE_PVP_QUEST;
menu
"Sure. Mhm. Mhm.", L_PvP_Accept,
"Oooer. That doesn't sound nice at all!", -;
mes "[The Candy Man]";
mes "\"How unfortunate. Because I wasn't asking!\"";
goto L_PvP_Warp;
L_PvP_Accept:
mes "[The Candy Man]";
mes "\"Good. Because I wasn't asking! Mhm. Mhm. Ahaha, bwuhahahahah!\"";
goto L_PvP_Warp;
L_PvP_Warp:
misceffect sfx_magic_astral;
misceffect 20, strcharinfo(0); // Teleportation cloud;
warp "001-3", 0, 0;
close;
L_Kill_Someone:
mes "[The Candy Man]";
mes "\"Mm? What are you doing back here, get into it!\"";
goto L_PvP_Warp;
OnPCKilledEvent:
if (Candyman >= 4 && Candyman < 10) goto L_kill_target_recruit;
message strcharinfo(0), "As everything fades, you hear distant laughter...";
attachrid(@killerrid);
if (Candyman >= 10) close;
if (Candyman >= 4) goto L_killer_check;
close;
L_kill_target_recruit:
message strcharinfo(0), "Tut tut. Seems you were too hasty.";
if (Candyman > 5 && Candyman < 11) set Candyman, Candyman - 1;
attachrid(@killerrid);
if (Candyman >= 10) close;
if (Candyman >= 4) goto L_killer_check;
setarray @messages$, "Ouch, I felt that you silly person! That 'weakling' you killed gave me some nice candy... now you will suffer...", "Oooh, a good kill... do you want to work for meee for that? Come and see me...", "Exquisite, a perfect kill... can you do it again? Come see me, I'll make it worth your while...", "Awwwww, that was no fun, you couldn't even see the fool's face. Nevermind, he has failed me, he will pay...", "Hmph, you just _know_ you can do better than that...";
set @pos, rand(getarraysize(@messages$));
message strcharinfo(0), @messages$[@pos];
if (@pos == 0) itemheal -Hp / 2 - 40, -Sp / 2 - 40;
close;
L_killer_check:
if (BaseLevel > @victimlvl)
goto L_kill_boring;
goto L_kill_worthy;
L_kill_boring:
setarray @messages$, "Bah, not strong enough! Try someone more interesting, and crush them!", "That was no fun. Killing weaklings is only fun when _I_ do it.", "Too fast, that was over just too fast. Kill someone stronger!", "Boooorring. Crush a worthy foe already!";
message strcharinfo(0), @messages$[rand(getarraysize(@messages$))];
close;
L_kill_worthy:
set Candyman, Candyman + 1;
if (Candyman == 10) goto L_final_kill;
setarray @messages$, "Yes! Yes! More! You must kill more of them!", "Get another one. Destroy them! Make it as good as this one!", "Utterly delightful, go smite another one!", "Mhm, mhm. Yes... simply sublime.";
message strcharinfo(0), @messages$[rand(getarraysize(@messages$))];
getexp 1000 + rand(@victimlvl, @victimlvl * @victimlvl), 0;
close;
L_final_kill:
message strcharinfo(0), "Yes! YES! _YES!_ Perfect, just perfect. Well, I think it may well be time for a reward, don't you think? Mhm, mhm. Come to see me, and claim your prize...";
getexp 15000, 0;
close;
L_PvP_Done:
mes "[The Candy Man]";
mes "\"Aha, that was good, yes, very good, mhm.\"";
mes "\"And now, your reward...\"";
mes "\"You have your treat...\"";
mes "";
mes "[20 000 experience points!]";
mes "[20 000 gp!]";
getexp 20000, 0;
set zeny, zeny + 20000;
set Candyman, @STATE_FINISHED;
mes "";
mes "\"Now, your trick! Mhm, mhmmhmhmhehhm!\"";
goto L_Candyman_Trick;
L_Finished:
mes "[The Candy Man]";
mes "\"Just you wait to see what happens when someone else gives me all that I need, mhm, mhm.\"";
close;
L_Candy_Too_Young:
mes "[The Candy Man]";
mes "\"I don't think you have enough experience to get what I want..\"";
close;
L_DIE_IN_A_FIRE:
mes "[The Candy Man]";
mes "Hi "+strcharinfo(0)+", I heard you were buying up all the candy before I got here...";
next;
menu
"Whut?",-,
"Uh...",-;
mes "Very, very bad to steal info out of #tmw-content. No candy for you!";
callsub S_Taunt_PC;
misceffect sfx_magic_war;
misceffect sfx_magic_war, strcharinfo(0);
itemheal -Hp, 0;
close;
S_Taunt_PC:
setarray @taunts$, "Die, " + strcharinfo(0) + "!", "Ahah. Aheh. Ahehmwahehehah!", strcharinfo(0) + ", you bore me...", "Rocks fall, everybody dies!", "Why so glum, chum? Everybody has to DIE SOMETIME!", "Why so SERIOUS?", "Do you know how I got this smile, " + strcharinfo(0) + "?", "What, you said you wanted an ivory complexion like mine?", "Tick, tock, tick, tock, BOOM", "BOOM HEADSHOT", "Jigga whut?";
npctalk @taunts$[rand(getarraysize(@taunts$))];
return;
L_Malus_PC:
set @effect, rand(6);
if (@effect == 0) mes "\"Time for you to visit some of my friends...\"";
if (@effect == 0) misceffect sfx_magic_astral;
if (@effect == 0) misceffect 20, strcharinfo(0);
if (@effect == 0) warp "027-1", 0, 0;
if (@effect == 1) mes "\"Misplaced something?\"";
if (@effect == 1) unequipbyid rand(11);
if (@effect == 1) unequipbyid rand(11);
if (@effect == 2) mes "\"Time to cool off, mhm, mhmm.\"";
if (@effect == 2) misceffect sfx_magic_astral;
if (@effect == 2) misceffect 20, strcharinfo(0);
if (@effect == 2) warp "020-1", 0, 0;
if (@effect == 3) mes "\"Ahahehah. Is it me, or is it breezy in here? Mhm.\"";
if (@effect == 3) nude;
if (@effect == 4) mes "\"How delightedly fancy, but I think I can do better for you... aha, aha.\"";
if (@effect == 4) misceffect sfx_magic_astral;
if (@effect == 4) setlook 1, 1+rand(6);
if (@effect == 4) setlook 6, 1+rand(9);
if (@effect == 5) mes "\"...are you still here? Well, not for long...\"";
if (@effect == 5) misceffect sfx_magic_astral;
if (@effect == 5) misceffect 20, strcharinfo(0);
if (@effect == 5) warp "005-3", 0, 0;
close;
}
|