| 1 |
--------------------------------------------------------------------- |
| 2 |
-- This file is part of Freedroid |
| 3 |
-- |
| 4 |
-- Freedroid is free software; you can redistribute it and/or modify |
| 5 |
-- it under the terms of the GNU General Public License as published by |
| 6 |
-- the Free Software Foundation; either version 2 of the License, or |
| 7 |
-- (at your option) any later version. |
| 8 |
-- |
| 9 |
-- Freedroid is distributed in the hope that it will be useful, |
| 10 |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
-- GNU General Public License for more details. |
| 13 |
-- |
| 14 |
-- You should have received a copy of the GNU General Public License |
| 15 |
-- along with Freedroid; see the file COPYING. If not, write to the |
| 16 |
-- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 17 |
-- MA 02111-1307 USA |
| 18 |
---------------------------------------------------------------------- |
| 19 |
--[[WIKI |
| 20 |
PERSONALITY = { "Militaristic", "Vigilant", "Condescending" }, |
| 21 |
MARKERS = { NPCID1 = "Kevin", QUESTID1 = "A strange guy stealing from town" }, |
| 22 |
PURPOSE = "$$NAME$$ is the first town resident and Red Guard member Tux encounters.", |
| 23 |
BACKSTORY = "$$NAME$$ aggressively guards the main entrance to town. $$NAME$$ lost his sister in The Great Assault.", |
| 24 |
RELATIONSHIP = { |
| 25 |
{ |
| 26 |
actor = "$$NPCID1$$", |
| 27 |
text = "$$NAME$$ is angry at the theft undertaken by $$NPCID1$$. $$NAME$$ does not know who $$NPCID1$$ is but |
| 28 |
wants him found. This initiates $$QUESTID1$$." |
| 29 |
}, |
| 30 |
} |
| 31 |
WIKI]]-- |
| 32 |
|
| 33 |
local Npc = FDrpg.get_npc() |
| 34 |
local Tux = FDrpg.get_tux() |
| 35 |
|
| 36 |
return { |
| 37 |
EveryTime = function() |
| 38 |
Town_NorthGateGuard_doors1 = {"Main Gate Outer W", "Main Gate Outer E", "Main Gate Guardhouse"} |
| 39 |
Town_NorthGateGuard_doors = {Town_NorthGateGuard_doors1[1], Town_NorthGateGuard_doors1[2], Town_NorthGateGuard_doors1[3], "Main Gate Inner W", "Main Gate Inner E"} |
| 40 |
if (not Tux:has_met("Town-NorthGateGuard")) then |
| 41 |
Npc:says(_"Hey you! Linarian! What do you want here?") |
| 42 |
show("node1", "node2", "node3") |
| 43 |
Npc:set_rush_tux(false) |
| 44 |
guard_follow_tux = true |
| 45 |
elseif (Npc:get_rush_tux()) then |
| 46 |
Npc:set_rush_tux(false) |
| 47 |
if (Town_NorthGateGuard_tux_nickname_loon) then |
| 48 |
Npc:says_random(_"Oh, the loon has returned.", |
| 49 |
_"Oh, it's just the loon. No need to worry.") |
| 50 |
else |
| 51 |
Npc:says_random(_"Oh, it's you.", |
| 52 |
_"I see you have returned.", |
| 53 |
_"You just can't get enough, can you?") |
| 54 |
end |
| 55 |
end_dialog() |
| 56 |
else |
| 57 |
if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then |
| 58 |
Npc:says(_"I'm ever vigilant! Bots are all dead? And what? I have a gate to guard! It's my duty, and I won't fail!") |
| 59 |
Npc:says(_"[b]*in whisper* ... Not like I did with you, dear...[/b]") |
| 60 |
Npc:says(_"Pretend you've heard nothing and mind your own business, Linarian.") |
| 61 |
end_dialog() |
| 62 |
else |
| 63 |
Tux:says(_"Can I ask you something?") |
| 64 |
if (Town_NorthGateGuard_tux_nickname_loon) then |
| 65 |
Npc:says(_"Yes, Loon.", "NO_WAIT") |
| 66 |
end |
| 67 |
Npc:says(_"You can ask, but don't expect a reply.", "NO_WAIT") |
| 68 |
Npc:says(_"I'm guarding this gate, and if I get distracted the bots might overrun this town and kill everybody in it.") |
| 69 |
end |
| 70 |
end |
| 71 |
show_if(knows_spencer_office, "node41") |
| 72 |
if (KevinMurder) and |
| 73 |
(not Tux:done_quest("A strange guy stealing from town")) and |
| 74 |
(Tux:has_quest("A strange guy stealing from town")) then |
| 75 |
show("node50") |
| 76 |
end |
| 77 |
end, |
| 78 |
|
| 79 |
{ |
| 80 |
id = "node1", |
| 81 |
text = _"Just taking a look around.", |
| 82 |
code = function() |
| 83 |
Npc:says(_"Oh, great. Another curious one.") |
| 84 |
Npc:says(_"About a week ago I let in a stranger who also said he was just taking a look around. I never saw him again. And I'm making sure he won't be getting back in either.") |
| 85 |
hide("node1", "node2", "node3") show("node5") |
| 86 |
end, |
| 87 |
}, |
| 88 |
{ |
| 89 |
id = "node2", |
| 90 |
text = _"I'd like to get into town.", |
| 91 |
code = function() |
| 92 |
Npc:says(_"Funny, exactly the same could be said about all of the crazy bots out there.") |
| 93 |
Npc:says(_"Not to mention that weird guy that came by last week. The only place in town he is going next time is straight into a holding cell.") |
| 94 |
hide("node1", "node2", "node3") show("node5") |
| 95 |
end, |
| 96 |
}, |
| 97 |
{ |
| 98 |
id = "node3", |
| 99 |
text = _"I'm here to assassinate your leader and you won't stop me!", |
| 100 |
code = function() |
| 101 |
Npc:says(_"Ok, Linarian! You asked for it!") |
| 102 |
Npc:says(_"Open fire!") |
| 103 |
for var in ipairs(Town_NorthGateGuard_doors1) do |
| 104 |
change_obstacle_state(Town_NorthGateGuard_doors1[var], "closed") |
| 105 |
end |
| 106 |
set_faction_state("redguard", "hostile") |
| 107 |
Tux:kill() |
| 108 |
end_dialog() |
| 109 |
hide("node1", "node2", "node3") show("node99") |
| 110 |
end, |
| 111 |
}, |
| 112 |
{ |
| 113 |
id = "node5", |
| 114 |
text = _"Oh? Who was he? And why?", |
| 115 |
code = function() |
| 116 |
Npc:says(_"Heh, you sure are a curious little bird, in more than one way I might say.") |
| 117 |
Npc:says(_"On the day he visited all our computers went insane, 20 bags of food rations vanished from our storage and one of our bots was stolen.") |
| 118 |
Npc:says(_"I think that freak lives somewhere to the east. I would love to get my hands on him and beat the life out of him. Slowly.") |
| 119 |
if (not Tux:has_met("Kevin")) then |
| 120 |
Tux:add_quest("A strange guy stealing from town", _"The guard in charge at the entrance of the town mentioned that somebody sneaked into town recently, and stole food and hardware. Apparently he lives somewhere to the east.") |
| 121 |
elseif (Kevin:is_dead()) then |
| 122 |
Tux:add_quest("A strange guy stealing from town", _"The guard told me about a guy who stole some food and hardware from the town. He lives somewhere in the east.") |
| 123 |
Tux:end_quest("A strange guy stealing from town", _"Apparently it was this Kevin person I recently hit a bit too hard... Oops... Well, at least he won't steal again...") |
| 124 |
Tux:add_xp(70) |
| 125 |
else |
| 126 |
Tux:add_quest("A strange guy stealing from town", _"Ooops, the guard must be talking about Kevin. I'd better not mention I know him and where he lives, or I might find myself in a holding cell or being forced to show the guards straight to his home. But I guess that explains where Kevin got that 614 bot from.") |
| 127 |
Tux:add_xp(100) |
| 128 |
-- We should perhaps not end quest here but later when talking again to Kevin and asking about the comps |
| 129 |
Tux:end_quest("A strange guy stealing from town", _"Though, I probably should ask Kevin some day what he was doing with the town computers.") |
| 130 |
end |
| 131 |
if (not Tux:has_met("Kevin")) and |
| 132 |
(not Kevin:is_dead()) then |
| 133 |
show("node10") -- We should add other nodes in the other cases. |
| 134 |
end |
| 135 |
hide("node5") show("node11") |
| 136 |
end, |
| 137 |
}, |
| 138 |
{ |
| 139 |
id = "node10", |
| 140 |
text = _"Somewhere to the east? I should look for him.", |
| 141 |
code = function() |
| 142 |
Npc:says(_"Oh, definitely, and I'm sure all the bots out there will be glad to give you directions, too.") |
| 143 |
Npc:says(_"But if you're insanely lucky and you do find him, you come back straight to me, understand?") |
| 144 |
Npc:says(_"I'd like to wring his head off... Though, it's not my call. But who knows, if the Boss feels generous we might both get rewarded.") |
| 145 |
Npc:says(_"Be careful anyway, this creep is a sneaky one if he got past us.") |
| 146 |
Tux:update_quest("A strange guy stealing from town", _"I offered to find out who the strange guy is. The guard I talked to was pretty sceptical, though; I should get some experience and better equipment before travelling far outside of town.") |
| 147 |
next("node15") |
| 148 |
end, |
| 149 |
}, |
| 150 |
{ |
| 151 |
id = "node11", |
| 152 |
text = _"Surely he'll never come back here.", |
| 153 |
code = function() |
| 154 |
Npc:says(_"I'm not counting on that. The criminal always comes back to the scene of the crime.") |
| 155 |
Npc:says(_"And that's the last stupid thing they do. You can't steal from the Red Guard twice.") |
| 156 |
next("node15") |
| 157 |
end, |
| 158 |
}, |
| 159 |
{ |
| 160 |
id = "node15", |
| 161 |
code = function() |
| 162 |
Npc:says(_"In any case...") |
| 163 |
Npc:says(_"We've changed our security policy. Our leader, Spencer, wants to interrogate any strangers we let in.") |
| 164 |
Npc:says(_"You have to talk to him before you head out into the town to do stupid things.") |
| 165 |
Npc:says_random(_"And up until you do, a guard will be following you. We'll be watching you.", |
| 166 |
_"And until you do, one of us will be following you. I'll let the others know you've arrived.") |
| 167 |
Npc:says_random(_"I'll let you in now, but be warned: one false move and we all have flightless waterfowl for dinner. Am I making myself clear?", |
| 168 |
_"Linarian, I will let you in. Do something stupid, and you aren't coming out. Got it?") |
| 169 |
hide("node10", "node11") show("node16", "node17") |
| 170 |
end, |
| 171 |
}, |
| 172 |
{ |
| 173 |
id = "node16", |
| 174 |
text = _"Yes. I understand.", |
| 175 |
code = function() |
| 176 |
Npc:says(_"State your name Linarian.") |
| 177 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 178 |
Tux:says(_"My name is %s.", Tux:get_player_name()) |
| 179 |
Npc:says(_"You don't look too stupid. Try not to mess up.") |
| 180 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 181 |
Npc:says(_"You may now enter %s.", Tux:get_player_name()) |
| 182 |
hide("node16", "node17") next("node40") |
| 183 |
end, |
| 184 |
}, |
| 185 |
{ |
| 186 |
id = "node17", |
| 187 |
text = _"No. Not at all. Your mother dresses you funny.", |
| 188 |
code = function() |
| 189 |
Npc:says(_"What did you say, you oversized duck?") |
| 190 |
for var in ipairs(Town_NorthGateGuard_doors1) do |
| 191 |
change_obstacle_state(Town_NorthGateGuard_doors1[var], "closed") |
| 192 |
end |
| 193 |
hide("node16", "node17") show("node20", "node21", "node22", "node23", "node30") |
| 194 |
end, |
| 195 |
}, |
| 196 |
{ |
| 197 |
id = "node20", |
| 198 |
text = _"Let me get back to you on that one.", |
| 199 |
code = function() |
| 200 |
Npc:says(_"Well, you aren't going anywhere. I'm watching you.") |
| 201 |
end_dialog() |
| 202 |
end, |
| 203 |
}, |
| 204 |
{ |
| 205 |
id = "node21", |
| 206 |
text = _"... I was only wondering who you were, and why you were wearing such a bright scarlet outfit.", |
| 207 |
code = function() |
| 208 |
Npc:says(_"My apologies, Linarian. You are new here, and do not know.") |
| 209 |
Npc:says(_"The red outfit indicates that I am of the Red Guard. We are the defenders of the town and impose the law.") |
| 210 |
Npc:says(_"With the continued bot attacks, and the grumbling townsfolk, all of us are a little on edge.") |
| 211 |
Npc:says(_"Tell me your name, and then you may pass.") |
| 212 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 213 |
Tux:says(_"My name is %s.", Tux:get_player_name()) |
| 214 |
Npc:says(_"You may enter.") |
| 215 |
next("node40") |
| 216 |
end, |
| 217 |
}, |
| 218 |
{ |
| 219 |
id = "node22", |
| 220 |
text = _"I said: YOUR MOTHER DRESSES YOU FUNNY.", |
| 221 |
code = function() |
| 222 |
Npc:says(_"Nobody says things about my mother. Forget you, Linarian!") |
| 223 |
Npc:says(_"Open fire!") |
| 224 |
set_faction_state("redguard", "hostile") |
| 225 |
Tux:kill() |
| 226 |
hide("node20", "node21", "node22", "node23", "node30") |
| 227 |
end_dialog() |
| 228 |
end, |
| 229 |
}, |
| 230 |
{ |
| 231 |
id = "node23", |
| 232 |
text = _"I said: THIS PLACE LOOKS CLASSY.", |
| 233 |
code = function() |
| 234 |
Npc:says(_"Sure you said that.") |
| 235 |
hide("node21", "node22", "node23", "node30") show("node30", "node31", "node32") |
| 236 |
end, |
| 237 |
}, |
| 238 |
{ |
| 239 |
id = "node30", |
| 240 |
text = _"Please don't hurt me.", |
| 241 |
code = function() |
| 242 |
Npc:says(_"How about I punch you until you spit out your name and get out of here, and we call it even?") |
| 243 |
Tux:says(_"OW") |
| 244 |
Npc:says(_"Your name?") |
| 245 |
Tux:says("%s.", Tux:get_player_name()) |
| 246 |
Tux:says(_"OW. That HURT!") |
| 247 |
--; TRANSLATORS Doc = Doctor |
| 248 |
Npc:says(_"Get out of here. The Doc is the third door on the right along the main path.") |
| 249 |
if (not Tux:del_health(40)) then |
| 250 |
Tux:del_health(1) |
| 251 |
end |
| 252 |
next("node40") |
| 253 |
end, |
| 254 |
}, |
| 255 |
{ |
| 256 |
id = "node31", |
| 257 |
text = _"I want to talk to your manager, moron.", |
| 258 |
code = function() |
| 259 |
Npc:says(_"I'll be happy to send you his way, I already told you, you have to talk to him anyway. But I need your name before I let you in.") |
| 260 |
Tux:says("%s.", Tux:get_player_name()) |
| 261 |
Npc:says(_"Talk to Spencer. His office is in the citadel, straight ahead, the first one on your left. You can't miss it.") |
| 262 |
Npc:says(_"Now stop bothering me! You crazy loon.") |
| 263 |
Town_NorthGateGuard_tux_nickname_loon = true |
| 264 |
knows_spencer_office = true |
| 265 |
if (Tux:has_quest("Deliverance")) then |
| 266 |
Tux:update_quest("Deliverance", _"I've managed to get into town, and the guard at the gate told me where I can find Spencer: his office is the first one on the left inside the Citadel, directly south of the gate. The guard also calls me a loon.") |
| 267 |
end |
| 268 |
next("node40") |
| 269 |
end, |
| 270 |
}, |
| 271 |
{ |
| 272 |
id = "node32", |
| 273 |
text = _"That is exactly what I said.", |
| 274 |
code = function() |
| 275 |
Npc:says(_"You are as out of your mind as that Sorenson lady.") |
| 276 |
Npc:says(_"But I guess she's already here, so it doesn't matter if we have another loon.") |
| 277 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 278 |
Tux:says(_"I'm a Linarian, not a loon. %s the Linarian.", Tux:get_player_name()) |
| 279 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 280 |
Npc:says(_"Get out of here %s, the loon, and stop bothering me.", Tux:get_player_name()) |
| 281 |
Town_NorthGateGuard_tux_nickname_loon = true |
| 282 |
next("node40") |
| 283 |
end, |
| 284 |
}, |
| 285 |
{ |
| 286 |
id = "node40", |
| 287 |
code = function() |
| 288 |
for var in ipairs(Town_NorthGateGuard_doors) do |
| 289 |
change_obstacle_state(Town_NorthGateGuard_doors[var], "opened") |
| 290 |
end |
| 291 |
if not knows_spencer_office then |
| 292 |
show("node41") |
| 293 |
end |
| 294 |
hide("node20", "node21", "node22", "node23", "node30", "node31", "node32") show("node99") |
| 295 |
end, |
| 296 |
}, |
| 297 |
{ |
| 298 |
id = "node41", |
| 299 |
text = _"Can you tell me where I can find Spencer?", |
| 300 |
code = function() |
| 301 |
if (not knows_spencer_office) then -- player wasn't told where to find spencer |
| 302 |
Npc:says(_"Spencer's office is in the citadel, straight ahead. First one on your left.") |
| 303 |
knows_spencer_office = true |
| 304 |
if (Tux:has_quest("Deliverance")) and |
| 305 |
(not Tux:done_quest("Deliverance")) then |
| 306 |
Tux:update_quest("Deliverance", _"I've managed to get into the town, and the guard at the gate told me where I can find Spencer: his office is the first one on the left inside the Citadel, directly south of the gate.") |
| 307 |
end |
| 308 |
else -- player was told where spencer's office is, or has met spencer |
| 309 |
if (not Tux:has_met("Spencer")) then |
| 310 |
Npc:says_random(_"No, you were already told that.", |
| 311 |
_"I don't believe anyone's memory is that short, even yours.") |
| 312 |
Npc:says(_"Stop wasting my time!") |
| 313 |
else |
| 314 |
Npc:says_random(_"Are you joking? You already talked to him.", |
| 315 |
_"Go ask him yourself. I know you already talked to him.") |
| 316 |
Npc:says(_"Stop wasting my time!") |
| 317 |
end |
| 318 |
end |
| 319 |
hide("node41") |
| 320 |
end, |
| 321 |
}, |
| 322 |
{ |
| 323 |
id = "node50", |
| 324 |
text = _"I have found the thief you talked about and took care of him.", |
| 325 |
code = function() |
| 326 |
Npc:says(_"Really? Wow... I must say, you are efficient. Well, at least we won't lose anything else to that freak.") |
| 327 |
if (Town_NorthGateGuard_tux_nickname_loon) then |
| 328 |
Npc:says(_"I will never again call you a loon. You are a most deadly penguin.") |
| 329 |
Town_NorthGateGuard_tux_nickname_loon = false |
| 330 |
end |
| 331 |
Npc:says(_"Here's a little reward we scraped together in case anyone solved our thief problem. I'll let Spencer know what you did.") |
| 332 |
Tux:add_gold(250) |
| 333 |
KevinMurder = false |
| 334 |
KevinMurderCongratulation = true |
| 335 |
Tux:end_quest("A strange guy stealing from town", _"I killed the thief who stole from town. The Red Guard rewarded me for it, but did I do the right thing? Hmm...") |
| 336 |
hide("node50") |
| 337 |
end_dialog() |
| 338 |
end, |
| 339 |
}, |
| 340 |
{ |
| 341 |
id = "node99", |
| 342 |
text = _"I'll be going then.", |
| 343 |
code = function() |
| 344 |
Npc:says_random(_"Mhmmm.", |
| 345 |
_"Finally...", |
| 346 |
_"It was about time...") |
| 347 |
if (Town_NorthGateGuard_tux_nickname_loon) then |
| 348 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 349 |
Npc:says(_"%s... the Loon", Tux:get_player_name()) |
| 350 |
end |
| 351 |
end_dialog() |
| 352 |
end, |
| 353 |
}, |
| 354 |
} |