| 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 = { "Pushy", "Isolated" }, |
| 21 |
MARKERS = { |
| 22 |
ITEMID1 = "Map Maker", |
| 23 |
ITEMID2 = "Teleporter homing beacon", |
| 24 |
NPCID1 = "Town-TeleporterGuard" |
| 25 |
}, |
| 26 |
PURPOSE = "$$NAME$$ is a technology trader. He also sells a $$ITEMID1$$ pill that enables Tux's mapping abilities during the |
| 27 |
game. $$NAME$$ is also the only other way Tux can obtain a $$ITEMID2$$ after using the one received from $$NPCID1$$.", |
| 28 |
WIKI]]-- |
| 29 |
|
| 30 |
local Npc = FDrpg.get_npc() |
| 31 |
local Tux = FDrpg.get_tux() |
| 32 |
|
| 33 |
return { |
| 34 |
FirstTime = function() |
| 35 |
show("node0", "node99") |
| 36 |
end, |
| 37 |
|
| 38 |
EveryTime = function() |
| 39 |
if (Skippy_angry) then |
| 40 |
-- We probably at some point want to be able to make Skippy happy again, maybe by Tux finishing a quest or something that helps Skippy or a friend of his or similar. |
| 41 |
Npc:says(_"What? You again? I don't want you here, get out.") |
| 42 |
Tux:says(_"See you later.") |
| 43 |
Npc:says(_"Don't come back. I hate you.") |
| 44 |
end_dialog() |
| 45 |
end |
| 46 |
end, |
| 47 |
|
| 48 |
{ |
| 49 |
id = "node0", |
| 50 |
text = _"Hi! I'm new here.", |
| 51 |
code = function() |
| 52 |
Npc:says(_"Great! A newcomer! Welcome! Welcome! I'm Skippy, and I'm your new best friend!") |
| 53 |
Npc:says(_"I already saw you coming. Due to my mapping device! It's great stuff!") |
| 54 |
Npc:says(_"And as a special favour, I'll sell you a mapping device for half price!") |
| 55 |
Npc:says(_"What a GREAT offer! You're so lucky!") |
| 56 |
Npc:set_name("Skippy - Map-Maker Maker") |
| 57 |
hide("node0") show("node1", "node2", "node3", "node10", "node20") |
| 58 |
end, |
| 59 |
}, |
| 60 |
{ |
| 61 |
id = "node1", |
| 62 |
text = _"Ok, if I want to buy me one of those mapping pills. How much are they?", |
| 63 |
code = function() |
| 64 |
Npc:says_random(_"They only cost 50 circuits. Special price only for you!", |
| 65 |
_"You're so lucky! I just decided to cut the price in half! One of those devices only costs 50 circuits now!") |
| 66 |
hide("node1") show("node11", "node12") |
| 67 |
end, |
| 68 |
}, |
| 69 |
{ |
| 70 |
id = "node2", |
| 71 |
text = _"How do I activate a mapping device?", |
| 72 |
code = function() |
| 73 |
Npc:says(_"Oh, that's so simple. No need to activate anything at all.") |
| 74 |
Npc:says(_"Just swallow the pill and the nanotechnological bots will enter your body.") |
| 75 |
Npc:says(_"They'll merge with your eyes and transmit data to your brain using the optical nerves. Nice, eh?") |
| 76 |
Npc:says(_"Everything within 50 meters of you will be displayed on your retinas.") |
| 77 |
hide("node2") show("node4") |
| 78 |
end, |
| 79 |
}, |
| 80 |
{ |
| 81 |
id = "node3", |
| 82 |
text = _"You said you make these things yourself? How do you do that?", |
| 83 |
code = function() |
| 84 |
Npc:says(_"Oh, I've always been a geek. And I got blueprints from before the Great Assault.") |
| 85 |
Npc:says(_"You can't order anything from a catalogue any more.") |
| 86 |
Npc:says(_"The only source of these gizmos is here. It's me!") |
| 87 |
hide("node3") |
| 88 |
end, |
| 89 |
}, |
| 90 |
{ |
| 91 |
id = "node4", |
| 92 |
text = _"Nanotechnology? Isn't that dangerous?", |
| 93 |
code = function() |
| 94 |
Npc:says(_"No way, man, I guarantee it. Don't believe anything you might have heard.") |
| 95 |
Npc:says(_"This is a perfectly safe and tried technology. No risk at all! Really!") |
| 96 |
Npc:says(_"There is no risk of your head being eaten by a nanotechnological nightmare, or anything funny like that.") |
| 97 |
Npc:says(_"I've used one myself for many years now: no side effects! It works just as great as on the first day!") |
| 98 |
Npc:says(_"Trust me! I'm your best friend and I wouldn't lie to you! Never!") |
| 99 |
hide("node4") show("node5") |
| 100 |
end, |
| 101 |
}, |
| 102 |
{ |
| 103 |
id = "node5", |
| 104 |
text = _"I don't trust you.", |
| 105 |
code = function() |
| 106 |
Npc:says(_"WHAT? But I'm your best friend! You must trust me!") |
| 107 |
hide("node5") show("node6") |
| 108 |
end, |
| 109 |
}, |
| 110 |
{ |
| 111 |
id = "node6", |
| 112 |
text = _"I still do not trust you. You are selling junk to people.", |
| 113 |
code = function() |
| 114 |
Npc:says(_"WHAT? Fine, you can forget about my great deals now! I don't want to trade with you anymore!") |
| 115 |
Npc:says(_"I'm no longer your best friend. Go away, you dirty hoser!") |
| 116 |
Skippy_angry = true |
| 117 |
hide("node1", "node3", "node6", "node10", "node11", "node12", "node20", "node21", "node99") |
| 118 |
end_dialog() |
| 119 |
end, |
| 120 |
}, |
| 121 |
{ |
| 122 |
id = "node10", |
| 123 |
text = _"Do you sell anything else?", |
| 124 |
code = function() |
| 125 |
Npc:says(_"Sure! I also build some electronics devices, depending on what parts I can get my hands on.", "NO_WAIT") |
| 126 |
-- We can potentially add more electronics things he can do in the future, or perhaps "add magic" to an item of Tux for a price |
| 127 |
Npc:says(_"Resources are a bit scarce nowadays though.") |
| 128 |
trade_with("Skippy") |
| 129 |
end, |
| 130 |
}, |
| 131 |
{ |
| 132 |
id = "node11", |
| 133 |
text = _"Ok, I'll take one. (costs 50 circuits)", |
| 134 |
code = function() |
| 135 |
if (Tux:del_gold(50)) then |
| 136 |
Npc:says(_"Here is your pill.", "NO_WAIT") |
| 137 |
Npc:says(_"Just swallow it, and it should work.") |
| 138 |
Npc:says(_"I give a 30 day warranty and adjustments, in case it doesn't work as expected.") |
| 139 |
Tux:add_item("Map Maker",1) |
| 140 |
display_big_message(_"Swallow pill and press tab to see automap.") |
| 141 |
else |
| 142 |
Npc:says(_"Hey, I'm not a bank!", "NO_WAIT") |
| 143 |
Npc:says(_"Come back when you can afford it.") |
| 144 |
show("node1") |
| 145 |
end |
| 146 |
hide("node11", "node12") |
| 147 |
end, |
| 148 |
}, |
| 149 |
{ |
| 150 |
id = "node12", |
| 151 |
text = _"Nah, don't think so. ", |
| 152 |
code = function() |
| 153 |
Npc:says(_"Your loss.", "NO_WAIT") |
| 154 |
Npc:says(_"Hope you won't get lost and killed out there.", "NO_WAIT") |
| 155 |
Npc:says(_"But don't count on it.") |
| 156 |
hide("node11", "node12") show("node1") |
| 157 |
end, |
| 158 |
}, |
| 159 |
{ |
| 160 |
id = "node20", |
| 161 |
text = _"Why are you so friendly?", |
| 162 |
code = function() |
| 163 |
Npc:says(_"Because you are my best friend!") |
| 164 |
Npc:says(_"I always take good care of my special buddies!") |
| 165 |
hide("node20") show("node21") |
| 166 |
end, |
| 167 |
}, |
| 168 |
{ |
| 169 |
id = "node21", |
| 170 |
text = _"You are friendly only to sell me your stuff, aren't you?", |
| 171 |
code = function() |
| 172 |
Npc:says(_"No, never! I would never be so shallow!") |
| 173 |
Npc:says(_"I am friendly because I like you.") |
| 174 |
hide("node21") |
| 175 |
end, |
| 176 |
}, |
| 177 |
{ |
| 178 |
id = "node99", |
| 179 |
text = _"See you later.", |
| 180 |
code = function() |
| 181 |
Npc:says(_"Yes, we'll meet again, my friend, and I'll have other great deals for you.") |
| 182 |
end_dialog() |
| 183 |
end, |
| 184 |
}, |
| 185 |
} |