summaryrefslogtreecommitdiff
path: root/npc/029-0/event.txt
blob: 0cedab04c8d4f735bb19a57a6bf9d2bed29c09f8 (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
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Exclusive for Fires of Steam 2021 - When our OVH server datacenter got fire.

029-0,111,37,0	script	Alliance Hero#FoS	NPC_HALBERDBARBARIAN,{
    function restoreshopitem2;

    // No one is supposed to be able to reach NPC if event did not happen
    if (!$FIRESOFSTEAM) {
        disablenpc .name$;
        die(); end;
    }
    mesn;
    mesq l("Sooo, the police station of Moubootaur Legends went ablaze. Constable Perry is too busy to monitor illegal operation on this continent.");
    next;
    mesn;
    mesq l("Therefore... Are you perhaps interested in some... illicit goods? %%p");
    next;
    select
        l("Show me what you got, noob."),
        rif($GAME_STORYLINE >= 4, l("Actually - Do you exchange goods even more illegal goods than this?")),
        rif($GAME_STORYLINE >= 4, l("Actually - Do you exchange illegal... research results?"));
    mes "";
    if (@menu == 1) {
        closeclientdialog;
        openshop .name$;
        close;
    }
    else if (@menu == 2) {
        if (.mobp < .points) {
            mesn;
            mesq l("Not at the moment but come back later.");
            close;
        }
        mesn;
        mesq l("Yes I do... I sell %s %s for the small amount of %s GP. Interested? %%%%p", fnum(.mobp), l("Monster Points"), fnum(.mobg));
        if (Zeny < .mobg) close;
        next;
        if (askyesno() == ASK_NO) close;
        if (Zeny < .mobg) { die(); close; }
        Zeny-=.mobg;
        Mobpt+=.mobp;
        .points -= .mobp;
        mes "";
        mesn;
        mesq l("Hehehe... A pleasure doing business with you!");
    } else if (@menu == 3) {
        if (.robp < .points) {
            mesn;
            mesq l("Not at the moment but come back later.");
            close;
        }
        mesn;
        mesq l("Yes I do... I sell %s %s for the small amount of %s GP. Interested? %%%%p", fnum(.robp), l("Research Points"), fnum(.robg));
        if (Zeny < .robg) close;
        next;
        if (askyesno() == ASK_NO) close;
        if (Zeny < .robg) { die(); close; }
        Zeny-=.robg;
        MAGIC_RP+=.robp;
        .points -= .robp;
        mes "";
        mesn;
        mesq l("Hehehe... A pleasure doing business with you!");
    }
    close;

OnRw:
    logmes(sprintf("%s - Reward Granted by System Admin", getcharid(3)));
    getitem StrangeCoin, 2000;
    getitembound FireScroll, 1, 1;
    getexp 1000000, 500000;
    Mobpt+=1000000;
    Zeny+=1000000;
    dispbottom l("Jesusalva : \\o/");
    end;

OnInit:
    bindatcmd "steambk", "Alliance Hero#FoS::OnRw", 100, 99, 1;
	tradertype(NST_MARKET);
    .mobp=rand2(1000, 2500);
    .mobg=.mobp*rand2(100, 150)/10;
    .robp=rand2(900, 1200);
    .robg=.robp*rand2(40, 60);//rand2(80, 110);
    .points = 5000;
    .distance=5;
    .sex=G_MALE;

    .@steam = $FIRESOFSTEAM;
    if ($EVENT$ != "Steam")
        .@steam /= 2;

    sleep(SHOPWAIT);
    sellitem Coal,          -1, 50+(.@steam*3-3);
    sellitem LeatherPatch,  800, 45+(.@steam*3-3);
    sellitem RawLog,        -1, 40+(.@steam*3-3);
    sellitem WoodenLog,     -1, 40+(.@steam*3-3);
    sellitem IronOre,       -1, 30+(.@steam*3-3);
    sellitem CopperOre,     1000, 20+(.@steam*2-2);
    sellitem SilverOre,     2000, 14+(.@steam*2-2);
    sellitem GoldOre,       3000, 14+(.@steam*2-2);
    sellitem TinOre,        3600, 15+(.@steam*2-2);
    sellitem LeadOre,       4000, 15+(.@steam*2-2);
    sellitem TitaniumOre,   6000, 9+(.@steam*2-2);
    if ($GAME_STORYLINE >= 4) {
        sellitem IridiumOre,    16000, 6+(.@steam*2-2);
        // Platinum Ore is only stocked if Platinum Mines are liberated
        if ($FORTRESS_STATE)
            sellitem PlatinumOre,   24000, 3+(.@steam*2-2);
    }
    sellitem EarthPowder,   -1, 3+.@steam-1;
    sellitem EverburnPowder, 15000, 2+.@steam-1;

    sellitem AncientBlueprint,  ($EVENT$ == "Steam" ? 12500 : 18000), 4+.@steam/2;
    sellitem RustyKnife,        -1, 5+.@steam-1;
    sellitem TrainingWand,      -1, 5+.@steam-1;
    sellitem TrainingBow,       -1, 5+.@steam-1;

    // Always stock blueprints at initialization time
    sellitem AlchemyBlueprintA, -1, 5+.@steam-1;
    sellitem AlchemyBlueprintB, -1, 4+.@steam-1;
    sellitem AlchemyBlueprintC, -1, 3+.@steam-1;
    if ($GAME_STORYLINE >= 4) {
        sellitem AlchemyBlueprintD, -1, 2+.@steam-1;
        sellitem AlchemyBlueprintE, -1, 1+.@steam/2;
    }

    sellitem EquipmentBlueprintA, -1, 5+.@steam-1;
    sellitem EquipmentBlueprintB, -1, 4+.@steam-1;
    sellitem EquipmentBlueprintC, -1, 3+.@steam-1;
    if ($GAME_STORYLINE >= 4) {
        sellitem EquipmentBlueprintD, -1, 2+.@steam-1;
        sellitem EquipmentBlueprintE, -1, 1+.@steam/2;
    }

    sellitem ArcmageBoxset,     10000, 4+.@steam-1;
    sellitem ScholarshipBadge,  -1, 3+.@steam-1;
    sellitem Bullet,            4, 90000+(.@steam*1000-1000);
    sellitem Lifestone,         -1, 500+.@steam-1;
    sellitem Bread,             -1, 450+.@steam-1;
    sellitem Cheese,            -1, 300+.@steam-1;
    sellitem Aquada,            -1, 200+.@steam-1;

    sellitem WhiteFur,          -1, 1+rand2(50)+.@steam;
    sellitem Piberries,         -1, 1+rand2(50)+.@steam;
    sellitem CherryCake,        -1, 1+rand2(50)+.@steam;
    sellitem LettuceLeaf,       -1, 1+rand2(50)+.@steam;
    sellitem BugLeg,            -1, 1+rand2(50)+.@steam;
    sellitem RoastedMaggot,     -1, 1+rand2(50)+.@steam;
    sellitem Moss,              -1, 1+rand2(50)+.@steam;
    sellitem AnimalBones,       -1, 1+rand2(40)+.@steam;
    sellitem Milk,              -1, 1+rand2(50)+.@steam;
    sellitem Mashmallow,        -1, 1+rand2(50)+.@steam;
    sellitem Dragonfruit,       1200, 1+rand2(50)+.@steam;
    sellitem Root,              -1, 40+.@steam;
    sellitem ManaPiouFeathers,  -1, 1+rand2(300)+.@steam;

    if (!$BETASERVER && !debug)
        disablenpc .name$;
    end;

OnClock0001:
OnClock0201:
OnClock0401:
OnClock0601:
OnClock0801:
OnClock1001:
OnClock1201:
OnClock1401:
OnClock1601:
OnClock1801:
OnClock2001:
    .points += 5000;
    if ($EVENT$ != "Steam")
        end;
OnClock2201:
    .mobp+=rand2(1000, 2500);
    .mobg=.mobp*rand2(100, 150)/10;
    .robp+=rand2(900, 1200);
    .robg=.robp*rand2(40, 60);//rand2(80, 110);

    .@steam = $FIRESOFSTEAM;
    if ($EVENT$ != "Steam")
        .@steam /= 2;

    restoreshopitem2 Coal,           50+(.@steam*3-3);
    restoreshopitem2 LeatherPatch, 800, 45+(.@steam*3-3);
    restoreshopitem2 RawLog,         40+(.@steam*3-3);
    restoreshopitem2 WoodenLog,      40+(.@steam*3-3);
    restoreshopitem2 IronOre,        30+(.@steam*3-3);
    restoreshopitem2 CopperOre,   1000, 20+(.@steam*2-2);
    restoreshopitem2 SilverOre,   2000, 14+(.@steam*2-2);
    restoreshopitem2 GoldOre,     3000, 14+(.@steam*2-2);
    restoreshopitem2 TinOre,      3600, 15+(.@steam*2-2);
    restoreshopitem2 LeadOre,     4000, 15+(.@steam*2-2);
    restoreshopitem2 TitaniumOre, 6000, 9+(.@steam*2-2);
    if ($GAME_STORYLINE >= 4) {
        restoreshopitem2 IridiumOre,  16000, 6+(.@steam*2-2);
        // Platinum Ore is only restocked if Platinum Mines are liberated
        if ($FORTRESS_STATE)
            restoreshopitem2 PlatinumOre, 24000, 3+(.@steam*2-2);
    }
    restoreshopitem2 EarthPowder, 3+.@steam-1;
    restoreshopitem2 EverburnPowder, 15000, 2+.@steam-1;

    restoreshopitem2 RustyKnife, 5+.@steam-1;
    restoreshopitem2 TrainingWand, 5+.@steam-1;
    restoreshopitem2 TrainingBow, 5+.@steam-1;

    // Only restock blueprints in odd days
    if ($EVENT$ == "Steam" || gettimeparam(GETTIME_DAYOFMONTH) % 2) {
        restoreshopitem2 AncientBlueprint, ($EVENT$ == "Steam" ? 12500 : 18000), 4+.@steam/2;
        restoreshopitem2 AlchemyBlueprintA, 5+.@steam-1;
        restoreshopitem2 AlchemyBlueprintB, 4+.@steam-1;
        restoreshopitem2 AlchemyBlueprintC, 3+.@steam-1;
        if ($GAME_STORYLINE >= 4) {
            restoreshopitem2 AlchemyBlueprintD, 2+.@steam-1;
            restoreshopitem2 AlchemyBlueprintE, 1+.@steam/2;
        }

        restoreshopitem2 EquipmentBlueprintA, 5+.@steam-1;
        restoreshopitem2 EquipmentBlueprintB, 4+.@steam-1;
        restoreshopitem2 EquipmentBlueprintC, 3+.@steam-1;
        if ($GAME_STORYLINE >= 4) {
            restoreshopitem2 EquipmentBlueprintD, 2+.@steam-1;
            restoreshopitem2 EquipmentBlueprintE, 1+.@steam/2;
        }
    }

    restoreshopitem2 ArcmageBoxset, 10000, 4+.@steam-1;
    restoreshopitem2 ScholarshipBadge, 3+.@steam-1;
    restoreshopitem2 Bullet, 4, 90000+(.@steam*1000-1000);
    restoreshopitem2 Lifestone, 500+.@steam-1;
    restoreshopitem2 Bread,  450+.@steam-1;
    restoreshopitem2 Cheese, 300+.@steam-1;
    restoreshopitem2 Aquada, 200+.@steam-1;

    restoreshopitem2 WhiteFur, 1+rand2(50)+.@steam;
    restoreshopitem2 Piberries, 1+rand2(50)+.@steam;
    restoreshopitem2 CherryCake, 1+rand2(50)+.@steam;
    restoreshopitem2 LettuceLeaf, 1+rand2(50)+.@steam;
    restoreshopitem2 BugLeg, 1+rand2(50)+.@steam;
    restoreshopitem2 RoastedMaggot, 1+rand2(50)+.@steam;
    restoreshopitem2 Moss, 1+rand2(50)+.@steam;
    restoreshopitem2 AnimalBones, 1+rand2(40)+.@steam;
    restoreshopitem2 Milk, 1+rand2(50)+.@steam;
    restoreshopitem2 Mashmallow, 1+rand2(50)+.@steam;
    restoreshopitem2 Dragonfruit, 1200, 1+rand2(50)+.@steam;
    restoreshopitem2 Root, 40+.@steam;
    restoreshopitem2 ManaPiouFeathers, 1+rand2(300)+.@steam;
    end;


// This version of restoreshopitem gets more expensive when sold out
function restoreshopitem2 {
    if (getarg(2, -1337) == -1337) {
        .@amount=getarg(1);
        .@price=-1;
    } else {
        .@amount=getarg(2);
        .@price=getarg(1);
    }

    if (!shopcount(getarg(0)))
        sellitem getarg(0), .@price*11/10, .@amount;
    else if (shopcount(getarg(0)) < .@amount)
        sellitem getarg(0), .@price, .@amount;
    return;
}

OnMinute02:
    if ($EVENT$ != "Steam") end;
    donpcevent "Neko::OnClock2359";
    end;
}


003-0-2,34,21,0	script	Alliance Officer	NPC_HALBERDBARBARIAN,{
    mesn;
    mesq l("Good %s, %s. The council is not in session right now.",
          (is_night() ? l("evening") : l("morning")),
          (strcharinfo(0) == $MOST_HEROIC$ ? lg("hero") : lg("peasant")));
    if (($BETASERVER || debug) && BaseLevel < 60 && !#BETA_REVIVE) goto L_PowerUp;
    close;

L_PowerUp:
    tutmes l("This is a debug NPC. If you don't know what you're doing, refuse.");
    next;
    mesn strcharinfo(0);
    mesq l("Could you awake my lost and forsaken potential?");
    if (TUTORIAL) mesc l("You whisper a date - 2021-03-11, the %sreal%s date of the %d AT Great Fire.", "[@@https://tmw2.org/news#outage|", "@@]", min(240, gettime(GETTIME_YEAR)-1800)); // Great Fire: 219~240 AT (238 max due to 2038 bug)
    next;
    mesn;
    mesq l("Yes. I can. But this is irreversible. Are you sure you want this?");
    next;
    mesc l("Awake lost potential? This will mess with your char data irreversibly, beware."), 1;
    mesc b(l("New players are strongly DISCOURAGED from using this resource, as it'll close about half of the available quests.")), 1;
    if (askyesno() == ASK_NO) close;
    inventoryplace Iten, 1, NPCEyes, 4;

    // Chose a stage (NO TTL)
    mesc l("Please select where you left off on Main Quest.");
    mesc l("The one with a star (*) is advised.");
    mesc l("It is NOT advised for new players to skip parts of the Main Quest."), 1;
    mesc l("Skipping will FORSAKE rewards for the quest and related; So choose wisely!");
    mes "";
    menuint
        "Nard Quest finished", 1,
        "Lua Quest finished", 3,
        "Airlia Quest finished", 6,
        "Librarian Quest finished", 10,
        "Blue Sage Quest finished", 12,
        "(*) King Gelid Quest complete", 17,
        "Lightbringer/Barbara finished", 19;
    mes "";
    // Save stage
    .@mq = @menuret;

    // IP Blacklist
    if (array_find($@IPBLIST$, getcharip()) < 0)
        array_push($@IPBLIST$, getcharip());

    // Level up
    freeloop(true);
    while (BaseLevel < 60)
        getexp NextBaseExp, 100;
    freeloop(false);

    // Skip a few quests
    setq ShipQuests_Arpan, 5;
    if (.@mq > 10)
        setq NivalisQuest_BlueSage, 12;
    if (.@mq >= 17) {
        sk_lvup(AM_REST);
        sk_lvup(AM_RESURRECTHOMUN);
        sk_lvup(AM_CALLHOMUN);
    }
    if (.@mq >= 18) {
        BARBARA_STATE=any(1, 2, 3);
    }

    // Update main quest
    if (getq(General_Narrator) < .@mq)
        setq General_Narrator, .@mq;

    // Monster points
    MPQUEST=true;
    if (!Mobpt)
        Mobpt+=80000;

    // Magic Power
    adddefaultskills();
    if (!MAGIC_LVL) {
        sk_lvup(AL_DP);
        MAGIC_LVL=1;
    }

    // Crafting
    if (!CRAFTQUEST) {
        sk_lvup(TMW2_CRAFT);
        getitembound RecipeBook, 1, 1;
        CRAFTQUEST=true;
    }

    // Free skills
    sk_lvup(TMW2_MANABOMB);
    sk_lvup(any(TMW2_FROSTDIVER, TMW2_NAPALMBEAT, TMW2_MAGICSTRIKE, TMW2_METEORSTRIKE, TMW2_FIREARROW, TMW2_BRAWLING, TMW2_FALKONSTRIKE, TMW2_CHARGEDARROW));

    // Pure awesomeness
    //getitembound any(StrengthFruit, AgilityFruit, VitalityFruit, IntelligenceFruit, DexterityFruit, LuckFruit), 1, 4;
    //getitembound any(StrengthFruit, AgilityFruit, VitalityFruit, IntelligenceFruit, DexterityFruit, LuckFruit), 1, 4;

    // Full power
    getitembound Wurtzite, 6, 4;
    getitembound Bread, 10, 4;

    // Regeneration and misc
    getitem StrangeCoin, 100;
    Zeny+=50000;
    percentheal 100,100;
    mesc l("You awake a long forgotten potential, and feel ready to take over the world.");
    #BETA_REVIVE=true;
    close;

OnInit:
    .distance=4;
    /*
    if (!$BETASERVER && !debug)
        disablenpc .name$;
    */
    end;
}