summaryrefslogtreecommitdiff
path: root/npc/009-1/guards.txt
blob: 43bbcbd59720ed18d08eb55510534415ab3ec242 (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
// 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 && $HURNS_LIBDATE) {
            .@palgal$=lg("gal", "pal");
            if (BaseLevel < 20) {
                mesn;
                mesq l("It might be, but your level isn't. Sorry @@. No going to Hurnscald before level 20.", .@palgal$);
                close;
            }
            if (reputation("Halin") < 1) {
                mesn;
                mesq l("It might be, but I never heard of you before. Sorry @@, I can't let just anyone go through. It would be a disservice to see you get stuck and die.", .@palgal$);
                close;
            }
            warp "011-3", 37, 219;
            closedialog;
            close;
        } else if (!$HURNS_LIBDATE) {
            mesn;
            mesq l("No. Hurnscald is besieged and it would be too dangerous to let you go alone. You should talk to %s, instead.", b("Saulc GM"));
        }
    } 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_ABORTED = false;
OnStartSiege:
    kamibroadcast(col("WARNING! WARNING! Monster Army is moving towards Halinarzo!!",1));
    do_siege("009-1", "010-2", "HALIN", TP_TULIM, .name$, .siegetime);
    initnpctimer;
    end;

// Timers
OnTimer5000:
    .siegetime+=5;
    do_siege("009-1", "010-2", "HALIN", TP_TULIM, .name$, .siegetime);
    switch (.siegetime) {
    case 0:
        disablenpc "Sawis";
        break;
    // Monster Army arrives in town
    case 60:
        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";
        break;
    // Monster Army deployed in town
    case 90:
        disablenpc "Dang Rostra";
        disablenpc "Kevin";
        disablenpc "Barzil";
        break;
    // Monster army have withdrawn completly
    case MK_SIEGE_DURATION:
        .siegetime=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;
        break;
    }

    // Loop again
    initnpctimer;
    end;

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

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