adventurerguild.js 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. module.exports = class ZebedeeAdventurerGuild {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "The Adventurer's Guild";
  5. this.description = "Well-worn stone floors and dark wooden rafters enclose a musky, exciting smell of adventure. There is a roaring fire in a large {hint}fireplace{/hint} to the west, surrounded by various cosy armchairs and couches. A battered wooden {hint}counter{/hint} stands against the eastern wall, with various guildmarms attending the adventurers. You can see a wide wooden staircase to the south, leading to the upper levels of the guild.";
  6. this.filename = "zebedee/adventurerguild.js";
  7. this.type = "room";
  8. this.items = [];
  9. this.mobiles = [];
  10. this.roomExpires = 0;
  11. this.resetDelay = 3000000;
  12. this.roomExits = ["north", "west", "east", "up"];
  13. }
  14. mud_reset(time) {
  15. switch(parseInt(Math.random() * 2)) {
  16. case 0:
  17. libs.Output.toRoom(this.id, "A group of jovial adventurers laugh and head towards the cozy lounge.");
  18. break;
  19. case 1:
  20. default:
  21. libs.Output.toRoom(this.id, "A few adventurers jostle past as they approach the guild counter.");
  22. break;
  23. }
  24. world.mud_replaceRoomItem(this.id, "WoodenSword");
  25. this.roomExpires = time + this.resetDelay;
  26. }
  27. mud_tick(time) {
  28. if(time >= this.roomExpires) {
  29. this.mud_reset(time);
  30. }
  31. }
  32. mud_getName() {
  33. return this.name;
  34. }
  35. mud_getDescription() {
  36. return this.description;
  37. }
  38. look(room, mobile, input) {
  39. switch(input[0]) {
  40. case "fireplace":
  41. libs.Output.toMobile(mobile.id, "A modest fire looks out of place in the massive stone fireplace against the far wall. Many adventurers are standing or reclined near the fireplace, animatedly discussing their spoils or quests.");
  42. return true;
  43. case "armchairs":
  44. case "armchair":
  45. libs.Output.toMobile(mobile.id, "The crushed velvet elegantly draped over the dark stained wood of the armchairs have seen better days, many patches left bald from an idle hand or heavy bottom. They do, however, look incredibly welcoming and exceedingly comfy.");
  46. return true;
  47. case "counter":
  48. libs.Output.toMobile(mobile.id, "You can't see the counter too well from here due to the throngs of inquisitive adventurers crowding up to it. It appears to be a little worse for the wear but incredibly durable, withstanding the demands of so many rough and tumble explorers.");
  49. return true;
  50. }
  51. }
  52. вид(room, mobile, input) {
  53. switch(input[0]) {
  54. case "прилавок":
  55. libs.Output.toMobile(mobile.id, "Отсюда вы не можете видеть прилавок слишком хорошо из-за толп любопытных искателей приключений, приближающихся к нему. Кажется, что это немного хуже для износа, но невероятно долговечно, выдерживая требования очень многих исследователей, работающих в тяжелых условиях.");
  56. return true;
  57. }
  58. }
  59. 看(room, mobile, input) {
  60. switch(input[0]) {
  61. case "计数器":
  62. libs.Output.toMobile(mobile.id, "由于好奇的冒险家挤在一起,你无法从这里看到柜台。 这件衣服看起来有点差,但非常耐用,可以满足这么多粗糙和翻滚的探险家的需求。");
  63. return true;
  64. }
  65. }
  66. west(room, mobile, input) {
  67. world.mud_moveMobile(mobile.id, this.id, "ZebedeeAdventurerLounge", "leaves west");
  68. return true;
  69. }
  70. east(room, mobile, input) {
  71. world.mud_moveMobile(mobile.id, this.id, "ZebedeeAdventurerHelp", "leaves east");
  72. return true;
  73. }
  74. north(room, mobile, input) {
  75. world.mud_moveMobile(mobile.id, this.id, "ZebedeeCormallenRoad4", "leaves the guild");
  76. return true;
  77. }
  78. up(room, mobile, input) {
  79. world.mud_moveMobile(mobile.id, this.id, "ZebedeeAdventurerTraining", "heads south up the stairs");
  80. return true;
  81. }
  82. };