You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

303 lines
5.8 KiB

  1. module.exports = {
  2. hermit: {
  3. 1: {
  4. msg: [{
  5. msg: 'What? Oh...what are you doing here?',
  6. options: [1.1, 1.2, 1.3, 1.4, 1.5]
  7. }],
  8. options: {
  9. 1.1: {
  10. msg: 'Me? What are YOU doing in the middle of the wilderness?',
  11. goto: 2
  12. },
  13. 1.2: {
  14. msg: 'My ship got wrecked, just south of here. I\'m stranded on this island.',
  15. goto: 3
  16. },
  17. 1.3: {
  18. msg: 'Have you scavenged anything worth selling lately?',
  19. goto: 'tradeBuy'
  20. },
  21. 1.4: {
  22. msg: 'I have some items you might be interested in.',
  23. goto: 'tradeSell'
  24. },
  25. 1.5: {
  26. msg: 'I changed my mind, I want to buy something back.',
  27. goto: 'tradeBuyback'
  28. }
  29. }
  30. },
  31. 2: {
  32. msg: 'I ran into some trouble in the city a few years ago. Moving out here seemed preferable to taking up residence in prison.',
  33. options: {
  34. 2.1: {
  35. msg: 'Trouble? What kind of trouble?',
  36. goto: '2-1'
  37. },
  38. 2.2: {
  39. msg: 'Where is the city?',
  40. goto: '2-2'
  41. },
  42. 2.3: {
  43. msg: 'I\'d like to ask something else.',
  44. goto: 1
  45. }
  46. }
  47. },
  48. '2-1': {
  49. msg: 'Let\'s just say it was of a royal nature. There are those who would still like to see me in prison, or better yet; dead.',
  50. options: {
  51. '2-1.1': {
  52. msg: 'I\'d like to ask something else',
  53. goto: 2
  54. }
  55. }
  56. },
  57. '2-2': {
  58. msg: 'It\'s on the northern part of the island. Just don\'t let your tongue slip about my location.',
  59. options: {
  60. '2-2.1': {
  61. msg: 'I\'d like to ask something else',
  62. goto: 2
  63. }
  64. }
  65. },
  66. 3: {
  67. msg: 'You mean you don\'t know where you are? Where are you from?',
  68. options: {
  69. 3.1: {
  70. msg: 'I don\'t know. The developer hasn\'t written me a backstory yet.',
  71. goto: '3-1'
  72. },
  73. 3.2: {
  74. msg: 'I\'d like to ask something else',
  75. goto: 2
  76. }
  77. }
  78. },
  79. '3-1': {
  80. msg: 'Typical...',
  81. options: {
  82. '3-1.1': {
  83. msg: 'I\'d like to ask something else',
  84. goto: 1
  85. }
  86. }
  87. },
  88. tradeBuy: {
  89. cpn: 'trade',
  90. method: 'startBuy',
  91. args: [{
  92. targetName: 'hermit'
  93. }]
  94. },
  95. tradeSell: {
  96. cpn: 'trade',
  97. method: 'startSell',
  98. args: [{
  99. targetName: 'hermit'
  100. }]
  101. },
  102. tradeBuyback: {
  103. cpn: 'trade',
  104. method: 'startBuyback',
  105. args: [{
  106. targetName: 'hermit'
  107. }]
  108. }
  109. },
  110. /*estrid: {
  111. '1': {
  112. msg: [{
  113. msg: `Is there anything I can help you with today?`,
  114. options: [1.1, 1.2, 1.3, 1.4, 1.5]
  115. }],
  116. options: {
  117. '1.1': {
  118. msg: `How long have you been working here?`,
  119. goto: 2
  120. },
  121. '1.2': {
  122. msg: `Why do you sell equipment instead of potions?`,
  123. goto: 3
  124. },
  125. '1.3': {
  126. msg: `I'd like to browse your wares.`,
  127. goto: 'tradeBuy'
  128. },
  129. '1.4': {
  130. msg: `I have some items to sell`,
  131. goto: 'tradeSell'
  132. },
  133. '1.5': {
  134. msg: `I want to buy something back`,
  135. goto: 'tradeBuyback'
  136. }
  137. }
  138. },
  139. '2': {
  140. msg: `I haven't been working here long, but I was born and raised here by my mother. She ran the shop before me.`,
  141. options: {
  142. '2.1': {
  143. msg: `Where is your mother now?`,
  144. goto: '2-1'
  145. },
  146. '2.2': {
  147. msg: `I'd like to ask something else.`,
  148. goto: 1
  149. }
  150. }
  151. },
  152. '2-1': {
  153. msg: `A few months ago, she...took ill. She's been bedridden upstairs ever since.`,
  154. options: {
  155. '2-1.1': {
  156. msg: `I'd like to ask something else.`,
  157. goto: 1
  158. }
  159. }
  160. },
  161. '3': {
  162. msg: `The developer hasn't added alchemy or potions yet. Hopefully he'll do that soon.`,
  163. options: {
  164. '3.1': {
  165. msg: `I'd like to ask something else.`,
  166. goto: 1
  167. }
  168. }
  169. },
  170. tradeBuy: {
  171. cpn: 'trade',
  172. method: 'startBuy',
  173. args: [{
  174. targetName: 'estrid'
  175. }]
  176. },
  177. tradeSell: {
  178. cpn: 'trade',
  179. method: 'startSell',
  180. args: [{
  181. targetName: 'estrid'
  182. }]
  183. },
  184. tradeBuyback: {
  185. cpn: 'trade',
  186. method: 'startBuyback',
  187. args: [{
  188. targetName: 'estrid'
  189. }]
  190. }
  191. },*/
  192. vikar: {
  193. 1: {
  194. msg: [{
  195. msg: 'Is there anything I can help you with today?',
  196. options: [1.1, 1.2, 1.3]
  197. }],
  198. options: {
  199. 1.1: {
  200. msg: 'I want to hand in some cards.',
  201. prereq: function (obj) {
  202. let fullSet = obj.inventory.items.find(i => ((i.setSize) && (i.setSize <= i.quantity)));
  203. return !!fullSet;
  204. },
  205. goto: 'tradeCards'
  206. },
  207. 1.2: {
  208. msg: 'I would like to buy some runes',
  209. goto: 'tradeBuy'
  210. },
  211. 1.3: {
  212. msg: 'I have some items I would like to sell',
  213. goto: 'tradeSell'
  214. }
  215. }
  216. },
  217. tradeCards: {
  218. msg: [{
  219. msg: '',
  220. options: []
  221. }],
  222. method: function (obj) {
  223. let inventory = obj.inventory;
  224. let items = inventory.items;
  225. let sets = items.filter(function (i) {
  226. return (
  227. (i.type === 'Reward Card') &&
  228. (i.quantity >= i.setSize)
  229. );
  230. });
  231. if (sets.length === 0)
  232. return 'Sorry, you don\'t have any completed sets.';
  233. sets.forEach(function (s) {
  234. obj.instance.eventEmitter.emit('onGetCardSetReward', s.name, obj);
  235. inventory.destroyItem(s.id, s.setSize);
  236. });
  237. return 'Thank you.';
  238. }
  239. },
  240. tradeBuy: {
  241. cpn: 'trade',
  242. method: 'startBuy',
  243. args: [{
  244. targetName: 'vikar'
  245. }]
  246. },
  247. tradeSell: {
  248. cpn: 'trade',
  249. method: 'startSell',
  250. args: [{
  251. targetName: 'vikar'
  252. }]
  253. }
  254. },
  255. priest: {
  256. 1: {
  257. msg: [{
  258. msg: 'Is there anything I can help you with today?',
  259. options: [1.1, 1.2, 1.3]
  260. }],
  261. options: {
  262. 1.1: {
  263. msg: 'I\'d like to browse your wares.',
  264. goto: 'tradeBuy'
  265. },
  266. 1.2: {
  267. msg: 'I have some items to sell',
  268. goto: 'tradeSell'
  269. },
  270. 1.3: {
  271. msg: 'I want to buy something back',
  272. goto: 'tradeBuyback'
  273. }
  274. }
  275. },
  276. tradeBuy: {
  277. cpn: 'trade',
  278. method: 'startBuy',
  279. args: [{
  280. targetName: 'priest'
  281. }]
  282. },
  283. tradeSell: {
  284. cpn: 'trade',
  285. method: 'startSell',
  286. args: [{
  287. targetName: 'priest'
  288. }]
  289. },
  290. tradeBuyback: {
  291. cpn: 'trade',
  292. method: 'startBuyback',
  293. args: [{
  294. targetName: 'priest'
  295. }]
  296. }
  297. }
  298. };