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.
 
 
 

239 lines
5.1 KiB

  1. module.exports = {
  2. 'thaumaturge yala': {
  3. 1: {
  4. msg: [{
  5. msg: 'Yes?',
  6. options: [1.1, 1.2, 1.3, 1.4, 1.5, 1.6]
  7. }],
  8. options: {
  9. 1.1: {
  10. msg: 'Who are you?',
  11. goto: '2'
  12. },
  13. 1.2: {
  14. msg: 'Where did you come from?',
  15. goto: '5'
  16. },
  17. 1.3: {
  18. msg: 'Do you have any items for sale?',
  19. goto: 'tradeBuy'
  20. },
  21. 1.4: {
  22. msg: 'I have some items to sell.',
  23. goto: 'tradeSell'
  24. },
  25. 1.5: {
  26. msg: 'I want to buy something back.',
  27. goto: 'tradeBuyback'
  28. },
  29. 1.6: {
  30. msg: 'I have some crystals for you.',
  31. prereq: function (obj) {
  32. let crystals = obj.inventory.items.find(i => (i.name === 'Digested Crystal'));
  33. return !!crystals;
  34. },
  35. goto: 'giveCrystals'
  36. }
  37. }
  38. },
  39. 2: {
  40. msg: [{
  41. msg: 'I am Thaumaturge Yala, thirty-fourth in line to the throne of the Akarei.',
  42. options: [2.1]
  43. }],
  44. options: {
  45. 2.1: {
  46. msg: 'Who are the Akarei?',
  47. goto: '3'
  48. }
  49. }
  50. },
  51. 3: {
  52. msg: [{
  53. msg: 'The Akarei are both the first, and the last wielders of true magic.',
  54. options: [3.1]
  55. }],
  56. options: {
  57. 3.1: {
  58. msg: 'True magic?',
  59. goto: '4'
  60. }
  61. }
  62. },
  63. 4: {
  64. msg: [{
  65. msg: 'Others toil away in an effort to bend magic to their wills; tainting it. We, the Akarei, perform only the purest of incantations.',
  66. options: [4.1]
  67. }],
  68. options: {
  69. 4.1: {
  70. msg: 'I would like to ask something else.',
  71. goto: '1'
  72. }
  73. }
  74. },
  75. 5: {
  76. msg: [{
  77. msg: 'We hail from the city Iskar; our home and haven.',
  78. options: [5.1, 5.2]
  79. }],
  80. options: {
  81. 5.1: {
  82. msg: 'How did you get here?',
  83. goto: '6'
  84. },
  85. 5.2: {
  86. msg: 'What are you doing here?',
  87. goto: '10'
  88. }
  89. }
  90. },
  91. 6: {
  92. msg: [{
  93. msg: 'Through a portal, for Iskar lies in another dimension. But now, we are trapped here. The portal has been closed from the other side and we lack the power to repopen it from here.',
  94. options: [6.1]
  95. }],
  96. options: {
  97. 6.1: {
  98. msg: 'Why would the portal have been closed?',
  99. goto: '7'
  100. }
  101. }
  102. },
  103. 7: {
  104. msg: [{
  105. msg: 'I can not say for certain, but the Akarei have never been wanting for enemies.',
  106. options: [7.1]
  107. }],
  108. options: {
  109. 7.1: {
  110. msg: 'A foe?',
  111. goto: '8'
  112. }
  113. }
  114. },
  115. 8: {
  116. msg: [{
  117. msg: 'A darkness. A nameless, faceless enemy that we can neither identify, nor combat. It has been chipping away at our defenses...almost consuming them. I fear if we do not return soon, it will be too late.',
  118. options: [8.1]
  119. }],
  120. options: {
  121. 8.1: {
  122. msg: 'How can I help?',
  123. goto: '9'
  124. }
  125. }
  126. },
  127. 9: {
  128. msg: [{
  129. msg: 'Slay the snails, gather crystals and bring them to me. The Akarei may reward those who assist them.',
  130. options: [9.1]
  131. }],
  132. options: {
  133. 9.1: {
  134. msg: 'I would like to ask something else.',
  135. goto: '1'
  136. }
  137. }
  138. },
  139. 10: {
  140. msg: [{
  141. msg: 'We were sent here by the Iskar Council, to seek a new form of energy.',
  142. options: [10.1, 10.2]
  143. }],
  144. options: {
  145. 10.1: {
  146. msg: 'How will the energy be used?',
  147. goto: '11'
  148. },
  149. 10.2: {
  150. msg: 'And, did you find it?',
  151. goto: '12'
  152. }
  153. }
  154. },
  155. 11: {
  156. msg: [{
  157. msg: 'Iskar is protected by a magic dome, created by the Founders; a bulwark of pure energy that has stood the test of all but our newest foe.',
  158. options: [7.1]
  159. }],
  160. options: {
  161. }
  162. },
  163. 12: {
  164. msg: [{
  165. msg: 'In a manner. The crystals in this cave are highly energized but in their natural form, they are too unstable for use.',
  166. options: [12.1]
  167. }],
  168. options: {
  169. 12.1: {
  170. msg: 'So, your mission failed?',
  171. goto: '13'
  172. }
  173. }
  174. },
  175. 13: {
  176. msg: [{
  177. msg: 'Not so. Curiously, the snails that inhabit this cave seem to have quite a taste for the crystals\' unstable energy and once passed through their digestive tracts, it is expelled in a stable, usable form.',
  178. options: [13.1]
  179. }],
  180. options: {
  181. 13.1: {
  182. msg: 'Well...that\'s disgusting.',
  183. goto: '14'
  184. }
  185. }
  186. },
  187. 14: {
  188. msg: [{
  189. msg: 'Perhaps. But it may prove to be our salvation. For now we have double need of the energy. Our portal was closed from the other side and we don\'t have sufficient power between us to repopen it from here.',
  190. options: [14.1, 6.1]
  191. }],
  192. options: {
  193. 14.1: {
  194. msg: 'How can I help?',
  195. goto: '9'
  196. }
  197. }
  198. },
  199. tradeBuy: {
  200. cpn: 'trade',
  201. method: 'startBuy',
  202. args: [{
  203. targetName: 'thaumaturge yala'
  204. }]
  205. },
  206. tradeSell: {
  207. cpn: 'trade',
  208. method: 'startSell',
  209. args: [{
  210. targetName: 'thaumaturge yala'
  211. }]
  212. },
  213. tradeBuyback: {
  214. cpn: 'trade',
  215. method: 'startBuyback',
  216. args: [{
  217. targetName: 'thaumaturge yala'
  218. }]
  219. },
  220. giveCrystals: {
  221. msg: [{
  222. msg: 'The Akarei thank you.',
  223. options: [1.1, 1.2, 1.3, 1.4, 1.5]
  224. }],
  225. method: function (obj) {
  226. let inventory = obj.inventory;
  227. let crystals = inventory.items.find(i => (i.name === 'Digested Crystal'));
  228. if (!crystals)
  229. return;
  230. obj.reputation.getReputation('akarei', (crystals.quantity || 1) * 15);
  231. inventory.destroyItem(crystals.id);
  232. }
  233. }
  234. }
  235. };