summaryrefslogtreecommitdiff
path: root/npc/034-4/storage.txt
blob: 3e99e54efa797910705c7686167e77f6433006e9 (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Gemini Sisters Quest - Part B: Storage Room

034-4,45,78,0	script	#GeminiPartC	NPC_HIDDEN,0,0,{
    end;
OnTouch:
    if (instance_id() < 0 || getcharid(1) < 1) end;
    GeminiCheck(11);
    .@p=getcharid(1);
    if ($@VALIA_STATUS[.@p] < 13) {
        dispbottom l("Uh? I can't pass. I wonder why, maybe I need to wait?");
        end;
    }
    if (mobcount(getmap(), "all") > 0) {
        dispbottom l("I should defeat all mobs before passing.");
        end;
    }
    if (mobcount(getmap(), "all") <= 0 && $@VALIA_STATUS[.@p] == 11) {
        $@VALIA_STATUS[.@p]=12;
    }
    if ($@VALIA_STATUS[.@p] >= 12) {
        slide 83, 58;
    }
    end;
}

034-4,33,77,0	script	#GeminiStorei	NPC_HIDDEN,2,2,{
function storageutil;
    end;
OnTouch:
    if (instance_id() < 0 || getcharid(1) < 1) end;
    GeminiCheck(11);
    .@p=getcharid(1);
    if (strcharinfo(0) != getpartyleader(.@p)) end;

    if (!.state) {
        .mp$ = getmap();
        .pn$ = getpartyname(getcharid(1));
        .pid = getcharid(1);
        .state = true;
        /* We now must calculate amount of waves */
        /* It is a hack for now, though */
        .mto = 5 + (BaseLevel / 30) + getmapusers(.mp$);
        initnpctimer;
        killmonsterall(.mp$); // Cancel everything done thus far, incl. showdown
    }
    end;

OnTimer1000:
    .luvia = monster(.mp$, 37, 76, "Luvia Gemini", Luvia, 1);
    immortal(.luvia);
    setunitdata(.luvia, UDT_MODE, MD_BOSS|MD_PLANT|MD_NOKNOCKBACK);
    end;

OnTimer2500:
    unittalk(.luvia, "So you aren't made of sugar!");
    end;

OnTimer6000:
    unittalk(.luvia, "I was worried you would all have melted on the lobby!");
    end;

OnTimer9500:
    unittalk(.luvia, "Hahaha, but this is just the beginning of your journey...");
    end;


OnTimer13000:
    unittalk(.luvia, "I am Luvia Gemini, and this is my trial for you!");
    end;


OnTimer16500:
    unittalk(.luvia, "Show me of what you are made of, %s!", .pn$);
    .@pi = getmapusers(.mp$) + 2;
    monster(.mp$, 44, 78, strmobinfo(1, Scar), Scar, .@pi);
    end;

OnTimer19000:
    unittalk(.luvia, "HAHAHahahaha!");
    end;

OnTimer20000:
    unitwarp(.luvia, "034-4", 45, 45);
    end;

OnTimer21000:
    unitkill(.luvia);
    end;

OnTimer30000:
    storageutil();
    .sto += 1;
    end;

OnTimer45000:
    if (.sto < .mto)
        setnpctimer 25000;
    monster(.mp$, 44, 78, strmobinfo(1, BlackMamba), BlackMamba, 1);
    end;

OnTimer600000:
    .@pi = getmapusers(.mp$) + 1;
    monster(.mp$, 44, 78, strmobinfo(1, GoboBear), GoboBear, .@pi);
    $@VALIA_STATUS[.pid] = 12;
    stopnpctimer;
    end;


function storageutil {
    // Decide if we'll spawn or add items. Previous failures are NOT considerated.
    .@r=rand2(10000)+(.sto * 100);

    // Super rare drop?! (~1.5%)
    if (.@r < 120 || .@r > 10000) {
        makeitem(any(DeathPotion, PoisonAmmoBox, AncientBlueprint, ThornAmmoBox, MercBoxD, ScholarshipBadge, DarkDesertMushroom), 1, .mp$, rand2(30, 71), rand2(44, 86));
    }

    // Super strong monster?! (4%)
    if ((.@r > 6000 && .@r < 6400) || .sto == 15 || .sto == 17 || .sto >= 20) {
        .@mob=any(WanderingShadow, SeaSlimeMother, NightDragon, GiantMutatedBat, Reaper, Mandragora);
        monster(.mp$, 44, 78, strmobinfo(1, .@mob), .@mob, 1);
        // Warn players?
    }

    // Compulsory monster spawn
    switch (.sto) {
    case 0:
        .@mob = ArmoredSkeleton; break;
    case 1:
        .@mob = DustRifle; break;
    case 2:
        .@mob = HoodedNinja; break;
    case 3:
        .@mob = WickedMushroom; break;
    case 4:
        .@mob = any(Archant, Scar); break;
    case 5:
        .@mob = Scar; break;
    case 6:
        .@mob = AzulSkullSlime; break;
    case 7:
        .@mob = Forain; break;
    case 8:
        .@mob = GreenDragon; break;
    case 9:
        .@mob = Michel; break;
    case 10:
        .@mob = EliteDuck; break;
    case 11:
        .@mob = Terranite; break;
    case 12:
        .@mob = JackO; break;
    case 13:
        .@mob = BloodyMouboo; break;
    default:
        .@mob = GoboBear;
    }
    monster(.mp$, 44, 78, strmobinfo(1, .@mob), .@mob, 1+getmapusers(.mp$));

    // Compulsory item drop
    freeloop(true);
    for (.@i=0; .@i <= getmapusers(.mp$); .@i++) {
        makeitem(any(Wurtzite, ShadowHerb, AlizarinHerb, DiamondPowder, RubyPowder, EmeraldPowder, SapphirePowder, TopazPowder, AmethystPowder, CopperOre, IronOre, Coal, LeadOre, Lifestone, ScorpionClaw, WhiteFur, SquirrelPelt, TinOre, PileOfAsh, EmptyBottle, FluoPowder, TerraniteOre, SulfurPowder, LeatherPatch, LazuriteShard, Root, ReedBundle, GambogeHerb, MauveHerb, CobaltHerb, MaggotSlime, BugLeg, RawLog, BanditHood, BatWing, IronPowder, ArtichokeHerb, LeftCraftyWing, RightCraftyWing, Coral, BlueCoral, Pearl, Moss, RattoTail, RattoTeeth, Knife, SharpKnife, StrangeCoin, PurificationPotion, IcedBottle, Grenade, SmokeGrenade, TreasureMap, AgiPotionA, VitPotionA, IntPotionA, DexPotionA, LukPotionA, EmptyBox, HastePotion, StrengthPotion, Croconut, ChocolateBar, ChocolateBiscuit, PinkieLeg, Potatoz, Coffee, SnakeEgg, Plushroom, Chagashroom, Honey, MoubooSteak, Milk, Orange, CherryCake, Piberries, Aquada, Cheese, Bread, Acorn, Manana), 1, .mp$, rand2(30, 71), rand2(44, 86));
    }
    return;
}

OnInit:
OnInstanceInit:
    .state = false;
    .mp$ = "";
    .pn$ = "";
    .pid = 0;
    .luvia = 0;
    .sto = 0;
    .mto = 0;
    end;
}