summaryrefslogtreecommitdiff
path: root/npc/009-1/guards.txt
blob: d652cc37bd170cee8c701450aa7321efc2137d9e (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
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Protect Halinarzo

009-1,71,24,0	script	Lieutenant Jacob	NPC_PLAYER,{
    // The Monster King guild have a special menu
    if (strcharinfo(2) == "Monster King") goto L_MKControl;
    mesn;
    mesq l("Halt! Beyond this gate, is the Great River and the Eternal Swamps.");
    next;
    mesn;
    mesq l("Was not it only flooded constantly, the graveyard is not too far. If you stray away from the path, you'll get lost.");
    next;
    .@fd=!(getmapmask("011-3")&1024); // .@fd - is flooded?
    if (!.@fd) {
        mesn;
        // There's a limit on how much info I can send with @@
        mesq l("Various people already went missing, including GMs. This is why if you plan to cross, ") + b(l("You won't be allowed to walk sideways, except to avoid a monster or two."));
        mesc l("If you try to walk west or east too much, you'll hit an \"invisible wall\" to prevent you from getting lost.");
        next;
        select
            l("I'm fine, thanks."),
            l("My equipment is good, let me through!");
        mes "";
        if (@menu == 2) {
            if (BaseLevel < 20) {
                mesn;
                .@palgal$=lg("gal", "pal");
                mesq l("It might be, but your level isn't. Sorry @@. No going to Hurnscald before level 20.", .@palgal$);
                close;
            }
            warp "011-3", 37, 219;
            closedialog;
            close;
        }
    } else {
        mesn;
        mesq l("In fact, it is flooded at the moment. Come back later.");
        next;
    }

    if (GHQUEST)
        GHQ_Assign(Snake, "Halinarzo");
    close;

L_MKControl:
    mesn;
    mes l("Oh noes! You've found the Halinarzo control panel!");
    menu
        l("Initiate small siege (lv. 20)"), L_MKSmall,
        l("Initiate medium siege (lv. 30)"), L_MKMedium,
        l("Initiate huge siege (lv. 40)"), L_MKHuge,
        l("Abort"), -;
    close;

L_MKSmall:
    addmapmask "009-1", MASK_MATTACK;
    changemusic "009-1", "mythica.ogg";
    disablenpc("Mana Stone");
    $@SIEGE_HALI=0; // factor zero
    pvpon("009-1");
    pvpon("010-2");
    announce(l("##1WARNING! WARNING! Siege starting at Halinarzo!!"), bc_all);
    areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 15, "Lieutenant Jacob::OnBlackScorpionDeath");
    initnpctimer;
    close;

L_MKMedium:
    addmapmask "009-1", MASK_MATTACK;
    changemusic "009-1", "eric matyas - ghoulish fun.ogg";
    disablenpc("Mana Stone");
    $@SIEGE_HALI=1; // factor one
    pvpon("009-1");
    pvpon("010-2");
    announce(l("##1WARNING! WARNING! Siege starting at Halinarzo!!"), bc_all);
    areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 25, "Lieutenant Jacob::OnBlackScorpionDeath");
    initnpctimer;
    close;

L_MKHuge:
    addmapmask "009-1", MASK_MATTACK;
    changemusic "009-1", "misuse.ogg";
    disablenpc("Mana Stone");
    $@SIEGE_HALI=5; // factor five
    pvpon("009-1");
    pvpon("010-2");
    announce(l("##1WARNING! WARNING! Siege starting at Halinarzo!!"), bc_all);
    areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 40, "Lieutenant Jacob::OnBlackScorpionDeath");
    initnpctimer;
    close;

OnBlackScorpionDeath:
    areamonster("010-2", 0, 0, 79, 81, l("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpionDeath");
    if (rand(10000) <= 90+($@SIEGE_HALI*10))
        getitem StrangeCoin, 1;
    end;

OnBlackScorpion2Death:
    areamonster("009-1", 0, 0, 120, 155, l("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
    if (rand(10000) <= 850+($@SIEGE_HALI*100))
        getitem StrangeCoin, 1;
    end;

OnGreenSlimeDeath:
    areamonster("009-1", 0, 0, 120, 155, l("Green Slime"), 1085, 1, "Lieutenant Jacob::OnGreenSlimeDeath");
    if (rand(10000) <= 200+($@SIEGE_HALI*100))
        getitem StrangeCoin, 1;
    end;

OnCandiedSlimeDeath:
    areamonster("009-1", 0, 0, 120, 155, l("Candied Slime"), 1089, 1, "Lieutenant Jacob::OnCandiedSlimeDeath");
    if (rand(10000) <= 150+($@SIEGE_HALI*100))
        getitem StrangeCoin, 1;
    end;

OnManaGhostDeath:
    areamonster("009-1", 0, 0, 120, 155, l("Mana Ghost"), 1068, 1, "Lieutenant Jacob::OnManaGhostDeath");
    if (rand(10000) <= 900+($@SIEGE_HALI*100))
        getitem StrangeCoin, 1;
    end;

OnLieutenantDeath:
    getitem StrangeCoin, 1;
    Karma=Karma+1;
    mapannounce("009-1", l("##2The Monster Lieutenant was defeated by @@!", strcharinfo(0)), bc_map);
    end;

OnColonelDeath:
    getitem StrangeCoin, 1;
    Karma=Karma+1;
    $MOST_HEROIC$=strcharinfo(0);
    mapannounce("009-1", l("##2The Monster Colonel was defeated by @@!", strcharinfo(0)), bc_map);
    end;

OnTimer5000:
    areamonster("010-2", 0, 0, 79, 81, "Black Scorpion", 1074, 5+$@SIEGE_HALI, "Lieutenant Jacob::OnBlackScorpionDeath");
    areamonster("009-1", 0, 0, 120, 155, "Black Scorpion", 1074, 5+$@SIEGE_HALI, "Lieutenant Jacob::OnBlackScorpion2Death");
    mapannounce("009-1", "##2Message to all Halinarzo NPCs: Take shelter!", bc_map);
    disablenpc "Lynn The Traveler";
    end;

OnTimer15000:
    areamonster("010-2", 0, 0, 79, 81, ("Black Scorpion"), 1074, 5, "Lieutenant Jacob::OnBlackScorpionDeath");
    areamonster("009-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 10, "Lieutenant Jacob::OnBlackScorpion2Death");
    end;

OnTimer60000:
    if ($@SIEGE_HALI == 1) {
        mapannounce("009-1", "##1The Monster Lieutenant arrived!", bc_map);
        areamonster("009-1", 0, 0, 120, 155, ("Monster Lieutenant"), 1077, 1, "Lieutenant Jacob::OnLieutenantDeath");
    }
    areamonster("009-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 3, "Lieutenant Jacob::OnBlackScorpion2Death");
    areamonster("009-1", 0, 0, 120, 155, ("Green Slime"), 1085, 10+$@SIEGE_HALI, "Lieutenant Jacob::OnGreenSlimeDeath");
    areamonster("009-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 1+$@SIEGE_HALI, "Lieutenant Jacob::OnCandiedSlimeDeath");
    end;

OnTimer120000:
    if ($@SIEGE_HALI == 5) {
        mapannounce("009-1", "##1The Monster Colonel arrived!", bc_map);
        areamonster("009-1", 0, 0, 120, 155, ("Monster Colonel"), 1036, 1, "Lieutenant Jacob::OnColonelDeath");
    }
    areamonster("009-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 15);
    areamonster("009-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
    areamonster("009-1", 0, 0, 120, 155, ("Green Slime"), 1085, 10, "Lieutenant Jacob::OnGreenSlimeDeath");
    areamonster("009-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Jacob::OnManaGhostDeath");
    end;

OnTimer180000:
    areamonster("009-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 25);
    areamonster("009-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
    areamonster("009-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 10, "Lieutenant Jacob::OnCandiedSlimeDeath");
    areamonster("009-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Jacob::OnManaGhostDeath");
    end;

OnTimer240000:
    areamonster("009-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 25);
    areamonster("009-1", 0, 0, 120, 155, ("Black Scorpion"), 1074, 1, "Lieutenant Jacob::OnBlackScorpion2Death");
    areamonster("009-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 2, "Lieutenant Jacob::OnManaGhostDeath");
    end;

OnTimer300000:
    areamonster("009-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 5);
    areamonster("009-1", 0, 0, 120, 155, ("Candied Slime"), 1089, 1, "Lieutenant Jacob::OnCandiedSlimeDeath");
    areamonster("009-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 1, "Lieutenant Jacob::OnManaGhostDeath");
    end;

OnTimer360000:
OnTimer420000:
OnTimer480000:
    areamonster("009-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 5+$@SIEGE_HALI);
    areamonster("009-1", 0, 0, 120, 155, ("Red Slime"), 1092, 1+$@SIEGE_HALI);
    end;

OnTimer540000:
    mapannounce("009-1", "##1The Monster Army is getting tired of resistance!", bc_map);
    areamonster("009-1", 0, 0, 120, 155, ("Slime Blast"), 1090, 5+$@SIEGE_HALI);
    areamonster("009-1", 0, 0, 120, 155, ("Mana Ghost"), 1068, 1, "Lieutenant Jacob::OnManaGhostDeath");
    end;

OnTimer600000:
    mapannounce("009-1", "##1The Monster King army is preparing to withdraw!", bc_map);
    end;

OnTimer630000:
    removemapmask "009-1", MASK_MATTACK;
    changemusic "009-1", "dragon_and_toast.ogg"; // Restore to default
    enablenpc("Mana Stone");
    $@SIEGE_HALI$=0;
    killmonsterall("009-1", 0);
    killmonsterall("010-2", 0);
    pvpoff("009-1");
    announce(("Halinarzo siege is over!"), bc_all);
    enablenpc "Lynn The Traveler";
    stopnpctimer;
    end;

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

    // Check items.xml for info about this.
    // NOTE: Why Dausen item list is on Philip...?
    .@npcId = getnpcid("Lieutenant Jacob");
    setunitdata(.@npcId, UDT_HEADTOP, Bull);
    setunitdata(.@npcId, UDT_HEADMIDDLE, LieutenantArmor);
    setunitdata(.@npcId, UDT_HEADBOTTOM, RaidTrousers);
    setunitdata(.@npcId, UDT_SHIELD, LousyMoccasins);    // TODO FIXME: Display Boots
    setunitdata(.@npcId, UDT_WEAPON, Backsword);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 12);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 15);

    end;
}

// Handle Guard's logic
function	script	HaliGuardHandler	{
    legiontalk;

    return;
}

009-1,100,30,0	script	Guard Corina	NPC_GUARD2,{
    HaliGuardHandler();
    end;

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


009-1,111,48,0	script	Guard Jhon	NPC_GUARD1,{
    HaliGuardHandler();
    end;

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

009-1,41,56,0	script	Guard Laurie	NPC_GUARD2,{
    HaliGuardHandler();
    end;

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


009-1,62,74,0	script	Guard Amy	NPC_GUARD2,{
    HaliGuardHandler();
    end;

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