feelings.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. module.exports = class Feelings {
  2. help(room, mobile, input) {
  3. var topic = input.join(" ").trim();
  4. switch(topic) {
  5. case "feelings":
  6. libs.Output.toMobile(mobile.id, "There are a wide variety of emotes.");
  7. libs.Output.toMobile(mobile.id, "TBD");
  8. return true;
  9. }
  10. }
  11. rainbow(room, mobile, input) {
  12. if(input[0] == "at") {
  13. input.shift();
  14. }
  15. var mobileKey = input.join(" ").trim();
  16. var roomMobile = libs.Utilities.getSpecific(mobileKey, room.mobiles, session.mobiles);
  17. if(roomMobile != null) {
  18. libs.Output.toMobile(mobile.id, "You beam a {red}r{yellow}a{green}i{blue}n{magenta}b{red}o{yellow}w{/yellow} at " + roomMobile.name + ".");
  19. libs.Output.toMobile(roomMobile.id, mobile.name + " beams a {red}r{yellow}a{green}i{blue}n{magenta}b{red}o{yellow}w{/yellow} at you.");
  20. libs.Output.toRoom(room.id, mobile.name + " beams a {red}r{yellow}a{green}i{blue}n{magenta}b{red}o{yellow}w{/yellow} at " + roomMobile.name + ".", [mobile, roomMobile]);
  21. return true;
  22. }
  23. libs.Output.toMobile(mobile.id, "You feel like a {red}r{yellow}a{green}i{blue}n{magenta}b{red}o{yellow}w{/yellow}!", mobile);
  24. libs.Output.toRoom(room.id, mobile.name + " feels like a {red}r{yellow}a{green}i{blue}n{magenta}b{red}o{yellow}w{/yellow}!", mobile);
  25. return true;
  26. }
  27. smile(room, mobile, input) {
  28. if(input[0] == "at") {
  29. input.shift();
  30. }
  31. var mobileKey = input.join(" ").trim();
  32. var roomMobile = libs.Utilities.getSpecific(mobileKey, room.mobiles, session.mobiles);
  33. if(roomMobile != null) {
  34. libs.Output.toMobile(mobile.id, "You smile brightly at " + roomMobile.name + ".");
  35. libs.Output.toMobile(roomMobile.id, mobile.name + " smiles brightly at you.");
  36. libs.Output.toRoom(room.id, mobile.name + " smiles brightly at " + roomMobile.name + ".", [mobile, roomMobile]);
  37. return true;
  38. }
  39. libs.Output.toMobile(mobile.id, "You smile brightly.", mobile);
  40. libs.Output.toRoom(room.id, mobile.name + " smiles brightly.", mobile);
  41. return true;
  42. }
  43. frown(room, mobile, input) {
  44. if(input[0] == "at") {
  45. input.shift();
  46. }
  47. var mobileKey = input.join(" ").trim();
  48. var roomMobile = libs.Utilities.getSpecific(mobileKey, room.mobiles, session.mobiles);
  49. if(roomMobile != null) {
  50. libs.Output.toMobile(mobile.id, "You frown darkly at " + roomMobile.name + ".");
  51. libs.Output.toMobile(roomMobile.id, mobile.name + " frowns darkly at you.");
  52. libs.Output.toRoom(room.id, mobile.name + " frowns darkly at " + roomMobile.name + ".", [mobile, roomMobile]);
  53. return true;
  54. }
  55. libs.Output.toMobile(mobile.id, "You frown darkly.", mobile);
  56. libs.Output.toRoom(room.id, mobile.name + " frowns darkly.", mobile);
  57. return true;
  58. }
  59. laugh(room, mobile, input) {
  60. if(input[0] == "at") {
  61. input.shift();
  62. }
  63. var mobileKey = input.join(" ").trim();
  64. var roomMobile = libs.Utilities.getSpecific(mobileKey, room.mobiles, session.mobiles);
  65. if(roomMobile != null) {
  66. libs.Output.toMobile(mobile.id, "You laugh heartily at " + roomMobile.name + ".");
  67. libs.Output.toMobile(roomMobile.id, mobile.name + " laughs heartily at you.");
  68. libs.Output.toRoom(room.id, mobile.name + " laughs heartily at " + roomMobile.name + ".", [mobile, roomMobile]);
  69. return true;
  70. }
  71. libs.Output.toMobile(mobile.id, "You laugh heartily.", mobile);
  72. libs.Output.toRoom(room.id, mobile.name + " laughs heartily.", mobile);
  73. return true;
  74. }
  75. nod(room, mobile, input) {
  76. if(input[0] == "at") {
  77. input.shift();
  78. }
  79. var mobileKey = input.join(" ").trim();
  80. var roomMobile = libs.Utilities.getSpecific(mobileKey, room.mobiles, session.mobiles);
  81. if(roomMobile != null) {
  82. libs.Output.toMobile(mobile.id, "You nod knowingly at " + roomMobile.name + ".");
  83. libs.Output.toMobile(roomMobile.id, mobile.name + " nods knowingly at you.");
  84. libs.Output.toRoom(room.id, mobile.name + " nods knowingly at " + roomMobile.name + ".", [mobile, roomMobile]);
  85. return true;
  86. }
  87. libs.Output.toMobile(mobile.id, "You nod knowingly.", mobile);
  88. libs.Output.toRoom(room.id, mobile.name + " nods knowingly.", mobile);
  89. return true;
  90. }
  91. wave(room, mobile, input) {
  92. if(input[0] == "at") {
  93. input.shift();
  94. }
  95. var mobileKey = input.join(" ").trim();
  96. var roomMobile = libs.Utilities.getSpecific(mobileKey, room.mobiles, session.mobiles);
  97. if(roomMobile != null) {
  98. libs.Output.toMobile(mobile.id, "You wave at " + roomMobile.name + ".");
  99. libs.Output.toMobile(roomMobile.id, mobile.name + " waves at you.");
  100. libs.Output.toRoom(room.id, mobile.name + " waves at " + roomMobile.name + ".", [mobile, roomMobile]);
  101. return true;
  102. }
  103. libs.Output.toMobile(mobile.id, "You wave.", mobile);
  104. libs.Output.toRoom(room.id, mobile.name + " waves.", mobile);
  105. return true;
  106. }
  107. mud_getErrorMessage() {
  108. return "Your emotions briefly {error}dim{/error}, leaving you feeling empty.";
  109. }
  110. }