| 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 = { "Devious", "Focused", "Polite", "Vengeful" }, |
| 21 |
MARKERS = { NPCID1 = "Koan" }, |
| 22 |
PURPOSE = "$$NAME$$ sells grenades to Tux. $$NAME$$ also hints at the future of the Red Guard.", |
| 23 |
BACKSTORY = "$$NAME$$ is the bomb maker for the Red Guard. $$NAME$$ hints that he threw a grenade that caused great |
| 24 |
destruction and resulted in the loss of many of \'his people\'.", |
| 25 |
RELATIONSHIP = { |
| 26 |
{ |
| 27 |
actor = "$$NPCID1$$", |
| 28 |
text = "$$NAME$$ is the opposite of $$NPCID1$$. $$NAME$$ destroys life while $$NPCID1$$ creates life." |
| 29 |
}, |
| 30 |
} |
| 31 |
WIKI]]-- |
| 32 |
|
| 33 |
local Npc = FDrpg.get_npc() |
| 34 |
local Tux = FDrpg.get_tux() |
| 35 |
|
| 36 |
return { |
| 37 |
EveryTime = function() |
| 38 |
if (Tux:has_met("Koan")) then |
| 39 |
hide("node56") |
| 40 |
end |
| 41 |
|
| 42 |
if (not Tux:has_met("Duncan")) then |
| 43 |
show("node0", "node90", "node99") |
| 44 |
elseif (not guard_follow_tux) and |
| 45 |
(not Duncan_Koan_quest) then |
| 46 |
next("node50") |
| 47 |
end |
| 48 |
|
| 49 |
if (not Duncan_Koan_quest_really_done) then |
| 50 |
if (Tux:has_item_backpack("Pandora's Cube")) or |
| 51 |
(Koan:is_dead()) or |
| 52 |
(Koan_spared_via_dialog) then |
| 53 |
--Koan died, and you brought the cube back or |
| 54 |
--Koan died, but you didn't bring the cube back or |
| 55 |
--Koan is alive! |
| 56 |
if (not Duncan_Koan_quest_done) then --if you just came back from Koan |
| 57 |
next("node60") |
| 58 |
elseif (not Duncan_not_given_cube) and |
| 59 |
(Koan:is_dead()) then |
| 60 |
--if, after talking to Duncan, Koan became dead |
| 61 |
next("node60") |
| 62 |
end |
| 63 |
end |
| 64 |
end |
| 65 |
|
| 66 |
if (tux_has_joined_guard) then |
| 67 |
hide("node3", "node4") |
| 68 |
end |
| 69 |
|
| 70 |
if (Duncen_node_62_hide) then |
| 71 |
hide("node62") |
| 72 |
end |
| 73 |
end, |
| 74 |
|
| 75 |
{ |
| 76 |
id = "node0", |
| 77 |
text = _"Hi... Erm... Who are you?", |
| 78 |
code = function() |
| 79 |
Npc:says(_"Duncan McNamara, The Red Guard's resident bomb maker, at your service.") |
| 80 |
Npc:set_name("Duncan - Bombmaker") |
| 81 |
hide("node0", "node90") show("node1") |
| 82 |
end, |
| 83 |
}, |
| 84 |
{ |
| 85 |
id = "node1", |
| 86 |
text = _"I would like to buy a bomb.", |
| 87 |
code = function() |
| 88 |
Npc:says_random(_"Yes. I am sure we can arrange something. Take a look.", |
| 89 |
_"Sure. These are my offers today.") |
| 90 |
trade_with("Duncan") |
| 91 |
if (not guard_follow_tux) then |
| 92 |
hide("node1") show("node2", "node7") |
| 93 |
end |
| 94 |
end, |
| 95 |
}, |
| 96 |
{ |
| 97 |
id = "node2", |
| 98 |
text = _"I see only grenades. Do you have something bigger?", |
| 99 |
code = function() |
| 100 |
Npc:says(_"My deepest apologies, I do not.") |
| 101 |
Npc:says(_"The Red Guard prohibits the sales of extremely destructive munitions.") |
| 102 |
Npc:says(_"It is not yet the time for the fall of their rule, so I remain loyal.") |
| 103 |
hide("node2") show("node3", "node4", "node5", "node6") |
| 104 |
end, |
| 105 |
}, |
| 106 |
{ |
| 107 |
id = "node3", |
| 108 |
text = _"The fall of the Red Guard? I am going to report that you are inciting a revolution!", |
| 109 |
code = function() |
| 110 |
Npc:says(_"My word against yours. If you wish to try it, please, be my guest.") |
| 111 |
Npc:says(_"I am not inciting anything. I am just stating what I see as inevitable in the future.") |
| 112 |
Npc:says(_"I have taken part in many conflicts and I have seen how governments collapse.") |
| 113 |
Npc:says(_"As soon as the war is over, the Red Guard will disband.") |
| 114 |
if (not HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then |
| 115 |
Npc:says(_"Of course, I am making the assumption of victory, which is highly unlikely with the current state of affairs.") |
| 116 |
else |
| 117 |
Tux:says(_"The war is already over. The bots are all dead.") |
| 118 |
Npc:says(_"It's still too early to sing victory. You need some time to realize if you truly won or if you're just playing along someone's else plan.") |
| 119 |
Tux:says(_"Someone else? Like whom?") |
| 120 |
Npc:says(_"How can you be sure everyone behind the Great Assault is dead, Linarian? Or that it wasn't done on purpose? Only time will tell.") |
| 121 |
end |
| 122 |
hide("node3", "node4") |
| 123 |
end, |
| 124 |
}, |
| 125 |
{ |
| 126 |
id = "node4", |
| 127 |
text = _"The fall of the Red Guard? Tell me more about it.", |
| 128 |
code = function() |
| 129 |
Npc:says(_"It is not the time to speak of such things yet. Come another day, and we shall talk about it in more detail.") |
| 130 |
Npc:says(_"The Red Guard can have their great laser beams and plasma cannons... But nothing can save them.") |
| 131 |
hide("node3", "node4") |
| 132 |
end, |
| 133 |
}, |
| 134 |
{ |
| 135 |
id = "node5", |
| 136 |
text = _"I want to buy some grenades.", |
| 137 |
code = function() |
| 138 |
Npc:says_random(_"Certainly.", |
| 139 |
_"Sure.", |
| 140 |
_"With pleasure.") |
| 141 |
trade_with("Duncan") |
| 142 |
end, |
| 143 |
}, |
| 144 |
{ |
| 145 |
id = "node6", |
| 146 |
text = _"What kind of grenade is the best?", |
| 147 |
code = function() |
| 148 |
Npc:says(_"You get what you pay for.") |
| 149 |
hide("node6") |
| 150 |
end, |
| 151 |
}, |
| 152 |
{ |
| 153 |
id = "node7", |
| 154 |
text = _"How did you get into making explosives?", |
| 155 |
code = function() |
| 156 |
Npc:says(_"Twenty years ago there was a conflict.") |
| 157 |
Npc:says(_"A grenade I threw destroyed a being which killed many of... my people.") |
| 158 |
Npc:says(_"Now I make more to smash the destroyers.") |
| 159 |
hide("node7") |
| 160 |
end, |
| 161 |
}, |
| 162 |
{ |
| 163 |
id = "node50", |
| 164 |
code = function() |
| 165 |
Npc:says(_"Ah. Welcome again Linarian.") |
| 166 |
Npc:says(_"I have a little request for you.") |
| 167 |
Npc:says(_"I know someone who needs to be taught a lesson.") |
| 168 |
Npc:says(_"Interested?") |
| 169 |
Duncan_Koan_quest = true |
| 170 |
show("node51", "node59") |
| 171 |
end, |
| 172 |
}, |
| 173 |
{ |
| 174 |
id = "node51", |
| 175 |
text = _"Tell me more.", |
| 176 |
code = function() |
| 177 |
Npc:says(_"Ah, excellent.") |
| 178 |
Npc:says(_"A... friend of mine, Koan, stole something of great value to me.") |
| 179 |
Npc:says(_"He is hiding somewhere in the desert, I don't know exactly where.") |
| 180 |
hide("node51") show("node52") |
| 181 |
end, |
| 182 |
}, |
| 183 |
{ |
| 184 |
id = "node52", |
| 185 |
text = _"I will get your property back.", |
| 186 |
code = function() |
| 187 |
Npc:says(_"Excellent. I am pleased to hear this.") |
| 188 |
Npc:says(_"There is something you must know.") |
| 189 |
Npc:says(_"There are not too many bots in the desert, but they are invincible. It is best to avoid them.") |
| 190 |
Npc:says(_"I will be waiting here for your return.") |
| 191 |
Tux:says(_"That is all I need to know. I will find Koan.") |
| 192 |
Npc:says(_"Only time will tell.") |
| 193 |
if (cmp_obstacle_state("DesertGate", "closed")) and |
| 194 |
(not Tux:has_met("Tania")) then |
| 195 |
Npc:says(_"Here are a couple of circuits to grease open the western gate, if you know what I mean.") |
| 196 |
Tux:add_gold(25) |
| 197 |
end |
| 198 |
Npc:says(_"Good luck!") |
| 199 |
Tux:add_quest("Doing Duncan a favor", _"I have to find Koan in the desert west of town and get Duncan something very precious.") |
| 200 |
hide("node52", "node59") show("node55", "node56") |
| 201 |
end, |
| 202 |
}, |
| 203 |
{ |
| 204 |
id = "node55", |
| 205 |
text = _"What are those bots?", |
| 206 |
code = function() |
| 207 |
Npc:says(_"We call them 'Harvesters'.") |
| 208 |
Npc:says(_"They were designed to chop down trees in the mountains.") |
| 209 |
Npc:says(_"Now they chop down people.") |
| 210 |
Npc:says(_"Their only weak point is their security system. But no one has managed to stay alive long enough to hack them.") |
| 211 |
hide("node55") |
| 212 |
end, |
| 213 |
}, |
| 214 |
{ |
| 215 |
id = "node56", |
| 216 |
text = _"What is it that he took from you?", |
| 217 |
code = function() |
| 218 |
Npc:says(_"A cube. Trust me, you can't miss it.") |
| 219 |
hide("node56") |
| 220 |
end, |
| 221 |
}, |
| 222 |
{ |
| 223 |
id = "node59", |
| 224 |
text = _"No, I don't find bloodshed a pleasurable activity.", |
| 225 |
code = function() |
| 226 |
Npc:says(_"That is fine. I will find someone else.") |
| 227 |
end_dialog() |
| 228 |
end, |
| 229 |
}, |
| 230 |
{ |
| 231 |
id = "node60", |
| 232 |
code = function() |
| 233 |
if (Tux:has_item_backpack("Pandora's Cube")) then |
| 234 |
if (Duncan_Koan_quest_done) then |
| 235 |
if (Koan:is_dead()) then -- we killed koan manually or using the dialog and got |
| 236 |
--the cube when we return first time to Duncan after seeing Koan |
| 237 |
Tux:says(_"Hey, I think I finally found your cube.") |
| 238 |
Npc:says(_"Oh, great!") |
| 239 |
else -- does this ever show up though? |
| 240 |
Tux:says(_"Hey!") |
| 241 |
Npc:says(_"Hmm...?") |
| 242 |
Tux:says(_"I think I found Koan after all ... finally.") |
| 243 |
Npc:says(_"Oh, nice!") |
| 244 |
Npc:says(_"Did you also get the cube?") |
| 245 |
Duncan_Koan_quest_really_done = true |
| 246 |
end |
| 247 |
else -- koan is dead |
| 248 |
Npc:says(_"So... Any news on the Koan matter?") |
| 249 |
end |
| 250 |
Duncan_Koan_quest_done = true |
| 251 |
show("node62", "node63") |
| 252 |
if (Duncen_node_62_hide) then |
| 253 |
hide("node62") |
| 254 |
end |
| 255 |
Duncen_node_62_hide = true |
| 256 |
elseif (Koan:is_dead()) then -- we don't have the cube but Koan is dead |
| 257 |
if (Duncan_talked_Koan_dead) then -- let Duncan ask for the cube differently if |
| 258 |
-- tux already returned without the cube while Koan was dead |
| 259 |
Npc:says(_"Did you finally find the cube?") |
| 260 |
Tux:says(_"Uhmmm...") |
| 261 |
Npc:says(_"You better go getting it!") |
| 262 |
else -- we killed koan somehow but don't have the cube |
| 263 |
Npc:says(_"You don't look too well, what happened?") |
| 264 |
Tux:says(_"He ... he is dead...") |
| 265 |
Npc:says(_"Koan?") |
| 266 |
if (Koan_spared_via_dialog) then -- we told Koan we won't kill him, and lied to Duncan |
| 267 |
--about not finding him. Afterwards we went back to Koan and killed him manually |
| 268 |
Npc:says(_"I thought you hadn't found him?") |
| 269 |
Tux:says(_"Yes, I didn't find him at first, now I did.") |
| 270 |
else -- we lost the cube and killed Koan via dialog |
| 271 |
Tux:says(_"Yes.") |
| 272 |
end |
| 273 |
Npc:says(_"And the cube that he was carrying? Where is it?") |
| 274 |
Tux:says(_"I must have left it somewhere...") |
| 275 |
Npc:says(_"Fetch it and bring it to me.") |
| 276 |
Duncan_talked_Koan_dead = true |
| 277 |
Tux:update_quest("Doing Duncan a favor", _"Unfortunately, I forgot to bring the cube. Duncan was not amused.") |
| 278 |
end |
| 279 |
end_dialog() |
| 280 |
elseif (Koan_spared_via_dialog) then -- we didn't kill via the dialog |
| 281 |
Tux:says(_"I could not find him anywhere in the desert. I don't think he is there anymore.") |
| 282 |
Npc:says(_"I see.") |
| 283 |
Tux:end_quest("Doing Duncan a favor", _"I lied to Duncan about not finding Koan.") |
| 284 |
Duncan_Koan_quest_done = true |
| 285 |
end_dialog() |
| 286 |
end |
| 287 |
show("node64") |
| 288 |
end, |
| 289 |
}, |
| 290 |
{ |
| 291 |
id = "node62", |
| 292 |
text = _"I think this is your cube.", |
| 293 |
code = function() |
| 294 |
Npc:says(_"Yes. I appreciate your help.") |
| 295 |
hide("node62", "node63") next("node69") |
| 296 |
end, |
| 297 |
}, |
| 298 |
{ |
| 299 |
id = "node63", |
| 300 |
text = _"Now, what is this big cube that you had me carry all the way here?", |
| 301 |
code = function() |
| 302 |
Npc:says(_"Just a memento from a friend.") |
| 303 |
Npc:says(_"A little more than a portable end of the world, which I am looking forward to disassembling and learning its secrets.") |
| 304 |
Npc:says(_"Nothing that important.") |
| 305 |
Duncen_node_62_hide = true |
| 306 |
hide("node62", "node63") show("node67", "node68") |
| 307 |
end, |
| 308 |
}, |
| 309 |
{ |
| 310 |
id = "node64", |
| 311 |
text = _"A 'few' bots? The place was crawling with Harvesters! I nearly got killed!", |
| 312 |
code = function() |
| 313 |
Npc:says(_"There were only one hundred and twenty bots in the entire desert region. This hardly qualifies as many, considering the size of the area.") |
| 314 |
Tux:says(_"What? You know exactly how many bots were in the desert? Without being there? I don't like this.") |
| 315 |
Npc:says(_"I just know a lot of things. You do not need to worry about it.") |
| 316 |
Tux:says(_"I don't like this at all. I'm getting out of here.") |
| 317 |
Npc:says(_"As you wish.") |
| 318 |
end_dialog() |
| 319 |
hide("node64") |
| 320 |
end, |
| 321 |
}, |
| 322 |
{ |
| 323 |
id = "node67", |
| 324 |
text = _"Hey, that is really neat. Here is your cube. Enjoy disassembling it and have fun with it.", |
| 325 |
code = function() |
| 326 |
Npc:says(_"I will.") |
| 327 |
hide("node67", "node68") next("node69") |
| 328 |
end, |
| 329 |
}, |
| 330 |
{ |
| 331 |
id = "node68", |
| 332 |
text = _"WHAT? No way I am giving you a doomsday device! Forget about it.", |
| 333 |
code = function() |
| 334 |
Npc:says(_"I understand. So be it.") |
| 335 |
Tux:end_quest("Doing Duncan a favor", _"No way am I giving Duncan that cube thingie, who knows what he would do with it.") |
| 336 |
Duncan_not_given_cube = true |
| 337 |
end_dialog() |
| 338 |
hide("node67", "node68") |
| 339 |
end, |
| 340 |
}, |
| 341 |
{ |
| 342 |
id = "node69", |
| 343 |
code = function() |
| 344 |
Tux:add_xp(3000) |
| 345 |
Tux:del_item_backpack("Pandora's Cube", 1) |
| 346 |
sell_item("Plasma Shockwave Emitter") |
| 347 |
Tux:end_quest("Doing Duncan a favor", _"I gave Duncan the cube thingie. It feels nice to help people.") |
| 348 |
Duncan_Koan_quest_really_done = true |
| 349 |
end_dialog() |
| 350 |
end, |
| 351 |
}, |
| 352 |
{ |
| 353 |
id = "node90", |
| 354 |
text = _"I feel you are... Different.", |
| 355 |
code = function() |
| 356 |
Npc:says(_"What a great way to start a conversation.") |
| 357 |
Npc:says(_"Yes, that is true. I am not who I seem to be.") |
| 358 |
Npc:says(_"But then again, neither are you, so my thoughts are, we are even.") |
| 359 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 360 |
Tux:says(_"What do you mean? I am %s and not anyone else.", Tux:get_player_name()) |
| 361 |
Npc:says(_"And I am Duncan McNamara, the maker of grenades and nothing else.") |
| 362 |
Npc:set_name("Duncan - Bombmaker") |
| 363 |
Npc:says(_"I believe the topic is thoroughly exhausted now.") |
| 364 |
hide("node0", "node1", "node2", "node90") show("node5", "node92") |
| 365 |
end, |
| 366 |
}, |
| 367 |
{ |
| 368 |
id = "node92", |
| 369 |
text = _"Tell me who you are. I need to know.", |
| 370 |
code = function() |
| 371 |
Npc:says(_"Twenty years ago, people were kinder to each other.") |
| 372 |
Npc:says(_"I suggest you be kind to me as well, and I will be kind to you.") |
| 373 |
Npc:says(_"That way I get to keep my secret, and you get to keep yours.") |
| 374 |
hide("node92") show("node93") |
| 375 |
end, |
| 376 |
}, |
| 377 |
{ |
| 378 |
id = "node93", |
| 379 |
text = _"I don't have any secrets.", |
| 380 |
code = function() |
| 381 |
Npc:says(_"And neither do I.") |
| 382 |
hide("node93") |
| 383 |
end, |
| 384 |
}, |
| 385 |
{ |
| 386 |
id = "node97", |
| 387 |
code = function() |
| 388 |
Npc:says(_"I wish you cold winds.") |
| 389 |
Tux:says(_"Huh? How do you know the Linarian farewell? No one around here knows it.") |
| 390 |
Npc:says(_"I read many books on Linarians. That is all.") |
| 391 |
Npc:says(_"Nothing more and nothing less.") |
| 392 |
show("node98") next("node98") |
| 393 |
end, |
| 394 |
}, |
| 395 |
{ |
| 396 |
id = "node98", |
| 397 |
text = _"I wish you cold winds.", |
| 398 |
code = function() |
| 399 |
Npc:says(_"May the ice bring you wisdom.") |
| 400 |
end_dialog() |
| 401 |
end, |
| 402 |
}, |
| 403 |
{ |
| 404 |
id = "node99", |
| 405 |
text = _"See you later.", |
| 406 |
code = function() |
| 407 |
if (not Duncan_coldwinds) then |
| 408 |
Duncan_coldwinds = true |
| 409 |
next("node97") |
| 410 |
else |
| 411 |
Npc:says(_"See you later.") |
| 412 |
end_dialog() |
| 413 |
end |
| 414 |
end, |
| 415 |
}, |
| 416 |
} |