예제 #1
0
  @Override
  public boolean execute(MOB mob, List<String> commands, int metaFlags) throws java.io.IOException {
    final Properties helpFile = CMLib.help().getHelpFile();
    if (helpFile.size() == 0) {
      if (mob != null) mob.tell(L("No help is available."));
      return false;
    }

    doTopics(mob, helpFile, "HELP", "PLAYER TOPICS");
    return false;
  }
예제 #2
0
 @Override
 public boolean execute(MOB mob, Vector<String> commands, int metaFlags) {
   String helpStr = CMParms.combine(commands, 1);
   if (CMLib.help().getArcHelpFile().size() == 0) {
     mob.tell("No archon help is available.");
     return false;
   }
   String thisTag = null;
   if (helpStr.length() == 0) {
     StringBuffer thisBuf = Resources.getFileResource("help/arc_help.txt", true);
     if (thisBuf != null) thisTag = thisBuf.toString();
   } else thisTag = CMLib.help().getHelpText(helpStr, CMLib.help().getArcHelpFile(), mob);
   if (thisTag == null) {
     mob.tell(
         "No archon help is available on "
             + helpStr
             + " .\r\nEnter 'COMMANDS' for a command list, or 'TOPICS' for a complete list.");
     Log.errOut("Help: " + mob.name() + " wanted archon help on " + helpStr);
   } else if (!mob.isMonster()) mob.session().wraplessPrintln(thisTag);
   return false;
 }