road09.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module.exports = class PhandalinRoad9 {
  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/road09.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 = ["southwest", "northeast", "enter"];
  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. west(room, mobile, input) {
  25. return this.enter(room, mobile, input);
  26. }
  27. enter(room, mobile, input) {
  28. world.mud_moveMobile(mobile.id, this.id, "PhandalinSmithy");
  29. return true;
  30. }
  31. southwest(room, mobile, input) {
  32. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad8");
  33. return true;
  34. }
  35. northeast(room, mobile, input) {
  36. world.mud_moveMobile(mobile.id, this.id, "PhandalinRoad10");
  37. return true;
  38. }
  39. };