road04.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. module.exports = class PhandalinRoad4 {
  2. constructor() {
  3. this.id = this.constructor.name;
  4. this.name = "Phandalin Road";
  5. this.description = "A well worn dirt road.";
  6. this.filename = "phandalin/road04.js";
  7. this.type = "room";
  8. this.items = [];
  9. this.mobiles = [];
  10. this.roomExits = [];
  11. this.roomExpires = 0;
  12. this.resetDelay = 12000000;
  13. this.roomExits = ["northeast", "northwest", "enter", "southeast", "southwest"];
  14. }
  15. mud_reset(time) {
  16. libs.Output.toRoom(this.id, "One of the townsfolk smiles as she passes by.");
  17. this.roomExpires = time + this.resetDelay;
  18. }
  19. mud_tick(time) {
  20. if(time >= this.roomExpires) {
  21. this.mud_reset(time);
  22. }
  23. }
  24. mud_getName() {
  25. return this.name;
  26. }
  27. mud_getDescription() {
  28. return this.description;
  29. }
  30. northwest(room, mobile, input) {
  31. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad3", "leaves northwest");
  32. return true;
  33. }
  34. northeast(room, mobile, input) {
  35. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad5", "leaves northeast");
  36. return true;
  37. }
  38. enter(room, mobile, input) {
  39. world.mud_moveMobile(mobile.id, this.id, "PhandalinWoodworkerHouse", "enters the house", "enters");
  40. return true;
  41. }
  42. east(room, mobile, input) {
  43. return this.enter(room, mobile, input);
  44. }
  45. southeast(room, mobile, input) {
  46. world.mud_moveMobile(mobile.id, this.id, "PhandalinWoodworkerYard", "leaves southeast");
  47. return true;
  48. }
  49. //southwest(room, mobile, input) {
  50. // world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad37");
  51. // return true;
  52. //}
  53. };