summaryrefslogtreecommitdiff
path: root/npc/009-1/guards.txt
blob: f34e5f4068a53e612cb3e40ab3054be379fd7054 (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
// 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 && $GAME_STORYLINE >= 1) {
        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!");
    next;
    select
        l("Abort"),
        l("Initiate a siege");
    mes "";
    if (@menu == 2) {
        doevent "Lieutenant Jacob::OnStartSiege";
        closedialog;
    }
    close;

OnMKSiege:
    $@SIEGE_HALIN=rand(1,10);
OnStartSiege:
    siege_setup("010-2");
    kamibroadcast(col("WARNING! WARNING! Monster Army marching towards Halinarzo!!",1));
    siege_cast("010-2", .name$, 0, TP_TULIM);
    disablenpc "Sawis";
    initnpctimer;
    end;


// Timers
OnTimer35000:
    siege_setup("009-1");
    siege_cast("010-2", .name$, $@SIEGE_HALIN, TP_TULIM);
    mapannounce("009-1", "##2Message to all Halinarzo NPCs: Take shelter!", bc_map);
    disablenpc "Fisherman";
    disablenpc "Charles, Trader King";
    disablenpc "Lynn The Traveler";
    disablenpc "Enliven Reva Foxhound";
    disablenpc "Ryan";
    disablenpc "Bella, the Scholar";
    disablenpc "Book Keeper";
    disablenpc "Yumi";
    disablenpc "Halinarzo's Nurse";
    disablenpc "Joaquim";
    disablenpc "Alvasus";
    disablenpc "Luanna";
    end;

OnTimer65000:
    siege_cast("009-1", .name$, 0, TP_TULIM);
    siege_cast("010-2", .name$, $@SIEGE_HALIN, TP_TULIM);
    disablenpc "Dang Rostra";
    disablenpc "Kevin";
    disablenpc "Barzil";
    end;

OnTimer96000:
    siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
    end;

OnTimer180000:
    siege_boss("009-1", $@SIEGE_HALIN);
    siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
    end;

// At certain moments, the difficulty rises
OnTimer210000:
OnTimer420000:
OnTimer540000:
    $@SIEGE_HALIN+=1;
// Spawn each 45s after timer 120, difficulty raisers exempt (same for boss)
OnTimer120000:
OnTimer165000:
//Timer 180000: BOSS WAVE
//OnTimer210000: difficulty raiser
OnTimer255000:
OnTimer300000:
OnTimer345000:
OnTimer390000:
//Timer 420000: difficulty raiser
OnTimer435000:
OnTimer480000:
OnTimer525000:
//OnTimer540000: difficulty raiser
OnTimer570000:
    siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
    end;

OnTimer600000:
    mapannounce("009-1", "##1The Monster Army is getting tired of resistance!", bc_map);
    siege_cast("009-1", .name$, $@SIEGE_HALIN, TP_TULIM);
    end;

OnTimer660000:
    $@MK_SCENE=MK_NONE;
    $@MK_AGGRO=$@MK_AGGRO/20;
    mapannounce("009-1", "##1The Monster King army is preparing to withdraw!", bc_map);
    end;

OnTimer690000:
    siege_revert("009-1");
    siege_revert("010-2");
    enablenpc("Mana Stone");
    $@SIEGE_HALIN=0;
    announce(("Halinarzo siege is over!"), bc_all);
    enablenpc "Sawis";
    enablenpc "Fisherman";
    enablenpc "Charles, Trader King";
    enablenpc "Lynn The Traveler";
    enablenpc "Enliven Reva Foxhound";
    enablenpc "Ryan";
    enablenpc "Bella, the Scholar";
    enablenpc "Book Keeper";
    enablenpc "Yumi";
    enablenpc "Halinarzo's Nurse";
    enablenpc "Joaquim";
    enablenpc "Alvasus";
    enablenpc "Luanna";
    enablenpc "Dang Rostra";
    enablenpc "Kevin";
    enablenpc "Barzil";
    stopnpctimer;
    end;


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

    // Check items.xml for info about this.
    .@npcId = getnpcid();
    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;
}