module.exports = class UserExperience { help(room, mobile, input) { var topic = input.join(" ").trim(); switch(topic) { case "alias": libs.Output.toMobile(mobile.id, "Key commands are sometimes too long to type quickly, or you want to set up a series of instructions to be run in order. Aliases can allow you to do both!"); libs.Output.toMobile(mobile.id, "* alias [key] [instruction] - create or overwrite an alias with an instruction. A command like 'alias hi say hi' would result in your character saying 'hi' when you typed it in."); libs.Output.toMobile(mobile.id, "* alias [key] [instruction];[instruction] - you can chain instructions behind aliases. A command like 'alias gearup wear hat;wear shirt;wear pants;wear boots' would result in your character putting on their clothes when typing 'gearup'."); return true; } } alias(room, mobile, input) { var aliasKey = input.shift(); //TODO: prevent aliases overwriting dangerous functions var instructions = input.join(" "); //TODO: prevent instructions that would break the server (like setting aliases) mobile.mud_setAlias(aliasKey, instructions); } mud_getErrorMessage() { return "You {error}forget{/error} what you were doing."; } };