| 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 = { "Millitarist", "Devious" }, |
| 21 |
MARKERS = { |
| 22 |
NPCID1 = "Kevin", |
| 23 |
NPCID2 = "Richard", |
| 24 |
DROIDID1 = "614", |
| 25 |
QUESTID1 = "An Explosive Situation" |
| 26 |
}, |
| 27 |
PURPOSE = "$$NAME$$ guards the inner gate to the Red Guard citadel and will refuse entry to non-Red Guard members - even if bribed!. |
| 28 |
$$NAME$$ jokingly hints at $$QUESTID1$$. If Tux asks about the citadel, $$NAME$$ suggests he visit $$NPCID2$$ to learn more.", |
| 29 |
BACKSTORY = "$$NAME$$ is at his current post after the theft of a $$DROIDID1$$ by $$NPCID1$$. $$NAME$$ is unhappy with this situation." |
| 30 |
WIKI]]-- |
| 31 |
|
| 32 |
local Npc = FDrpg.get_npc() |
| 33 |
local Tux = FDrpg.get_tux() |
| 34 |
|
| 35 |
return { |
| 36 |
FirstTime = function() |
| 37 |
Tux:says(_"Hi! I'm new h...", "NO_WAIT") |
| 38 |
Npc:says(_"I don't care! Identify yourself, right now!") |
| 39 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 40 |
Tux:says(_"%s... I'm %s.", Tux:get_player_name(), Tux:get_player_name()) |
| 41 |
Npc:says(_"All right, I'm Tybalt. I'm guarding the town citadel gate. Only authorized personnel are permitted.") |
| 42 |
Npc:set_name("Tybalt - Citadel Gate Guard") |
| 43 |
show("node0", "node5", "node10") |
| 44 |
end, |
| 45 |
|
| 46 |
EveryTime = function() |
| 47 |
show_if((not Tux:has_met("Spencer")), "node0") |
| 48 |
|
| 49 |
if (cmp_obstacle_state("Town-CitadelGate", "closed")) then |
| 50 |
show("node10") |
| 51 |
end |
| 52 |
|
| 53 |
show_if((tybalt_bribe) and |
| 54 |
(not Tybalt_money_back), "node60") |
| 55 |
|
| 56 |
if (tux_has_joined_guard) then |
| 57 |
hide("node50", "node54", "node55", "node56") |
| 58 |
end |
| 59 |
|
| 60 |
hide("node11", "node12", "node13") show("node99") |
| 61 |
end, |
| 62 |
|
| 63 |
{ |
| 64 |
id = "node0", |
| 65 |
text = _"Where I can find Spencer?", |
| 66 |
code = function() |
| 67 |
Npc:says(_"You are going in the wrong direction. Turn around, and he will be on your right.") |
| 68 |
hide("node0") |
| 69 |
end, |
| 70 |
}, |
| 71 |
{ |
| 72 |
id = "node5", |
| 73 |
text = _"What is the citadel?", |
| 74 |
code = function() |
| 75 |
Npc:says(_"Our headquarters, the strengthened building behind me. It's the area reserved to the Red Guard.") |
| 76 |
Npc:says(_"We need to protect our equipment and documents: lives depend on it.") |
| 77 |
Npc:says(_"Our firearms are enough to kick off any droid, and to blow everything up.") |
| 78 |
Npc:says(_"Luckily, no overloading reactor is near it. Ha-ha.") |
| 79 |
hide("node5") show("node6") |
| 80 |
end, |
| 81 |
}, |
| 82 |
{ |
| 83 |
id = "node6", |
| 84 |
text = _"Is there anything secret in there?", |
| 85 |
code = function() |
| 86 |
if (not tux_has_joined_guard) then |
| 87 |
Npc:says(_"So, ... Hey, I don't have to answer questions!") |
| 88 |
else |
| 89 |
Npc:says(_"I have no time for a guided tour.") |
| 90 |
Npc:says(_"You can talk to Richard, the quartermaster. He knows the citadel better than I.") |
| 91 |
end |
| 92 |
hide("node6") |
| 93 |
end, |
| 94 |
}, |
| 95 |
{ |
| 96 |
id = "node10", |
| 97 |
text = _"I want to get into the citadel.", |
| 98 |
code = function() |
| 99 |
if (tux_has_joined_guard) then |
| 100 |
Npc:says(_"Of course. Guard members are always authorized to enter the town citadel. The gate is open. Enjoy your stay.") |
| 101 |
change_obstacle_state("Town-CitadelGate", "opened") |
| 102 |
else |
| 103 |
Npc:says(_"Sorry pal, but I don't think so. Only authorized personnel are permitted and that means members of the Red Guard.") |
| 104 |
Npc:says(_"Talk to Spencer if you have any business inside. I cannot let you pass.") |
| 105 |
-- do we propose a bribe? |
| 106 |
if (not tybalt_bribe) then show("node50") end |
| 107 |
show("node11", "node12") |
| 108 |
end |
| 109 |
hide("node10") |
| 110 |
end, |
| 111 |
}, |
| 112 |
{ |
| 113 |
id = "node11", |
| 114 |
text = _"Why is this gate locked most of the time?", |
| 115 |
code = function() |
| 116 |
Npc:says(_"It's locked so no one can sneak inside while I'm not looking. That's why.") |
| 117 |
if (not Tybalt_not_looking) then |
| 118 |
show("node13") |
| 119 |
end |
| 120 |
hide("node11", "node12") |
| 121 |
end, |
| 122 |
}, |
| 123 |
{ |
| 124 |
id = "node12", |
| 125 |
text = _"Is there another entrance to the Citadel?", |
| 126 |
code = function() |
| 127 |
Npc:says(_"Yes. All with a bunch of laser autoguns. Adjusted to shoot on sight.") |
| 128 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 129 |
Npc:says(_"%s, I discourage you to test our security system.", Tux:get_player_name()) |
| 130 |
hide("node11", "node12") |
| 131 |
end, |
| 132 |
}, |
| 133 |
{ |
| 134 |
id = "node13", |
| 135 |
text = _"So when are you not looking?", |
| 136 |
code = function() |
| 137 |
Npc:says(_"I am always looking. What? Are you planning to steal from us, like that last guy from out of town?") |
| 138 |
Npc:says(_"I'm stationed here to make certain that doesn't happen again. Apparently the last guy suborned the droid that was here and took it with him.") |
| 139 |
Tux:update_quest("A strange guy stealing from town", _"Apparently Tybalt was stationed to stop another break-in at the Red Guard citadel. What a boring job.") |
| 140 |
Tybalt_not_looking = true |
| 141 |
hide("node13") |
| 142 |
end, |
| 143 |
}, |
| 144 |
{ |
| 145 |
id = "node50", |
| 146 |
text = _"I have a lot of money for you.", |
| 147 |
code = function() |
| 148 |
--; TRANSLATORS: "a hundred" references to a money/circuits |
| 149 |
Npc:says(_"Fascinating. Can I have a hundred please?") |
| 150 |
hide("node50") show("node54", "node55") |
| 151 |
push_topic("bribe citadel guard") |
| 152 |
end, |
| 153 |
}, |
| 154 |
{ |
| 155 |
id = "node54", |
| 156 |
--; TRANSLATORS: references to a money/circuits |
| 157 |
text = _"Erm... I don't have that much.", |
| 158 |
topic = "bribe citadel guard", |
| 159 |
code = function() |
| 160 |
Npc:says(_"Well, too bad.") |
| 161 |
hide("node54", "node55") |
| 162 |
pop_topic() |
| 163 |
end, |
| 164 |
}, |
| 165 |
{ |
| 166 |
id = "node55", |
| 167 |
text = _"Here you go.", |
| 168 |
topic = "bribe citadel guard", |
| 169 |
code = function() |
| 170 |
if (Tux:del_gold(100)) then |
| 171 |
Npc:says(_"Thank you.") |
| 172 |
tybalt_bribe = true |
| 173 |
show("node56") |
| 174 |
else |
| 175 |
--; TRANSLATORS: references to a money/circuits |
| 176 |
Npc:says_random(_"That is not a hundred.", |
| 177 |
--; TRANSLATORS: references to a money/circuits |
| 178 |
_"Um, count that again.", |
| 179 |
--; TRANSLATORS: references to a money/circuits |
| 180 |
_"Talk to me when you have a bit more.") |
| 181 |
end |
| 182 |
hide("node54", "node55") |
| 183 |
pop_topic() |
| 184 |
end, |
| 185 |
}, |
| 186 |
{ |
| 187 |
id = "node56", |
| 188 |
text = _"Ok, now please open the door for me.", |
| 189 |
code = function() |
| 190 |
Npc:says(_"What door?") |
| 191 |
Tux:says(_"The door to the citadel!") |
| 192 |
Npc:says(_"But you are not a member of the Red Guard.") |
| 193 |
Npc:says(_"You cannot come in.") |
| 194 |
Tux:says(_"I paid you!") |
| 195 |
Npc:says(_"Really? I don't remember that.") |
| 196 |
hide("node56") show("node60") |
| 197 |
end, |
| 198 |
}, |
| 199 |
{ |
| 200 |
id = "node60", |
| 201 |
text = _"I want my money back.", |
| 202 |
code = function() |
| 203 |
if (not tux_has_joined_guard) then |
| 204 |
Npc:says(_"What money?") |
| 205 |
Npc:says(_"I'm not a charity. If this is a problem, talk to Spencer.") |
| 206 |
Npc:says(_"But he doesn't love robbers and foul play.") |
| 207 |
else |
| 208 |
--; TRANSLATORS: %s = Tux:get_player_name() |
| 209 |
Npc:says(_"Wait, %s, maybe we may make a deal.", Tux:get_player_name()) |
| 210 |
Npc:says(_"You don't talk to Spencer about it, and I don't tell him you tried to bribe me.") |
| 211 |
Npc:says(_"Just because I am such a nice guy, I'm even willing to give you half of your money back.") |
| 212 |
Npc:says(_"Of course, if you still want to complain, I'll get you kicked out of the Red Guard in no time.") |
| 213 |
Tux:add_gold(50) |
| 214 |
Tybalt_money_back = true |
| 215 |
end |
| 216 |
hide("node60") |
| 217 |
end, |
| 218 |
}, |
| 219 |
{ |
| 220 |
id = "node99", |
| 221 |
text = _"See you later.", |
| 222 |
code = function() |
| 223 |
Npc:says(_"Good riddance.") |
| 224 |
end_dialog() |
| 225 |
end, |
| 226 |
}, |
| 227 |
} |