| 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 = {"Robotic"}, |
| 21 |
PURPOSE = "$$NAME$$ guards and limits access to the Mega Systems Factory entrance" |
| 22 |
WIKI]]-- |
| 23 |
|
| 24 |
local Npc = FDrpg.get_npc() |
| 25 |
local Tux = FDrpg.get_tux() |
| 26 |
|
| 27 |
return { |
| 28 |
EveryTime = function() |
| 29 |
Npc:says(_"Welcome to the MegaSys Factory complex.") |
| 30 |
if (HF_FirmwareUpdateServer_uploaded_faulty_firmware_update) then |
| 31 |
Tux:says(_"Still alive? Don't you know that you should update your firmware often?") |
| 32 |
end |
| 33 |
Npc:says(_"Access is restricted to authorized personnel.") |
| 34 |
Npc:says(_"Proof of authorization is required.") |
| 35 |
if (not HF_EntranceBot_MSStockCertificateOpensGate) then |
| 36 |
if (Tux:has_met("WillGapes")) then |
| 37 |
Tux:update_quest("Open Sesame", "I managed to find the main gates, but an annoying droid locked the innermost gate. I need to proof that I am authorized to visit the Factory. Maybe Will Gapes can help?") |
| 38 |
else |
| 39 |
Tux:update_quest("Open Sesame", "I managed to find the main gates, but an annoying droid locked the innermost gate. I need to proof that I am authorized to visit the Factory. Maybe I missed something?") |
| 40 |
end |
| 41 |
HF_EntranceBot_MSStockCertificateOpensGate = true |
| 42 |
end |
| 43 |
|
| 44 |
if (Tux:done_quest("Open Sesame")) then |
| 45 |
Tux:says(_"How many times do I have to show you my certificate, tin can?") |
| 46 |
if (Tux:has_item("MS Stock Certificate")) then |
| 47 |
Npc:says(_"[b]Validating certificate...[/b]") |
| 48 |
Npc:says(_"[b]Validation complete.[/b]", "NO_WAIT") |
| 49 |
Npc:says(_"[b]Certificate valid.[/b]", "NO_WAIT") |
| 50 |
Npc:says(_"You may enter.") |
| 51 |
change_obstacle_state("HF-EntranceInnerGate", "opened") |
| 52 |
hide("node1", "node2", "node3") |
| 53 |
else |
| 54 |
Tux:says(_"Oh, I... uh... must have left it in my other armor.") |
| 55 |
Tux:says(_"I'll go get it for you. Yes. Because I TOTALLY know where it is. I hope.") |
| 56 |
end |
| 57 |
else |
| 58 |
show("node1", "node2", "node3") |
| 59 |
end |
| 60 |
show("node99") |
| 61 |
end, |
| 62 |
|
| 63 |
{ |
| 64 |
id = "node1", |
| 65 |
text = _"I am THE ONE.", |
| 66 |
code = function() |
| 67 |
Npc:says(_"You are THE ONE without permission.") |
| 68 |
Npc:says(_"Please consider leaving.") |
| 69 |
hide("node1") |
| 70 |
end_dialog() |
| 71 |
end, |
| 72 |
}, |
| 73 |
{ |
| 74 |
id = "node2", |
| 75 |
text = _"I am working here.", |
| 76 |
code = function() |
| 77 |
Npc:says(_"Me too.") |
| 78 |
Npc:says(_"Please prove your statement.") |
| 79 |
Tux:says(_"Do I look like a typical MegaSys slave, err, worker to you, stupid bot?") |
| 80 |
Npc:says(_"No insults, please. But, no") |
| 81 |
if (Tux:has_item("MS Stock Certificate")) then |
| 82 |
Tux:says(_"But I have this certificate") |
| 83 |
Npc:says(_"[b]Validating certificate...[/b]") |
| 84 |
Npc:says(_"[b]Validation complete.[/b]", "NO_WAIT") |
| 85 |
Npc:says(_"[b]Certificate valid.[/b]", "NO_WAIT") |
| 86 |
Npc:says(_"You may enter.") |
| 87 |
if ((Tux:has_quest("Open Sesame")) and |
| 88 |
(not Tux:done_quest("Open Sesame"))) then |
| 89 |
Tux:end_quest("Open Sesame", _"The gates are open. The firmware server should lay beyond them.") |
| 90 |
end |
| 91 |
change_obstacle_state("HF-EntranceInnerGate", "opened") |
| 92 |
else |
| 93 |
end_dialog() |
| 94 |
end |
| 95 |
hide("node2") |
| 96 |
end, |
| 97 |
}, |
| 98 |
{ |
| 99 |
id = "node3", |
| 100 |
text = _"I have come to save the world, I don't need any proof.", |
| 101 |
code = function() |
| 102 |
Npc:says(_"Feel uncertain about the future?") |
| 103 |
Npc:says(_"Purchase the MegaSys Security Bundle to help safeguard your home.") |
| 104 |
Npc:says(_"It contains:") |
| 105 |
Npc:says(_"The latest version of the [b]MegaSys[/b] operating system for [b]ONE DROID[/b]") |
| 106 |
Npc:says(_"Ten mini surveillance robots.") |
| 107 |
Npc:says(_"The book 'Subatomic and Nuclear Science for Dummies, Volume IV'.") |
| 108 |
Npc:says(_"And a MegaSys Vision Enhancement Device 3000 - what you cannot see, can't see you either!") |
| 109 |
Npc:says(_"If you order [b]RIGHT NOW[/b], we will [b]SHIP FOR FREE!!![/b]") |
| 110 |
Tux:says(_"No, thanks.") |
| 111 |
hide("node3") |
| 112 |
end, |
| 113 |
}, |
| 114 |
{ |
| 115 |
id = "node99", |
| 116 |
text = _"Bye", |
| 117 |
code = function() |
| 118 |
Npc:says(_"Remember, MegaSys products are the best!") |
| 119 |
end_dialog() |
| 120 |
end, |
| 121 |
}, |
| 122 |
} |