Пример #1
0
  public boolean useAdminCommand(String command, L2PcInstance activeChar) {

    if (command.startsWith("admin_ride")) {
      if (activeChar.isMounted() || activeChar.getPet() != null) {
        activeChar.sendMessage("You already have a pet.");
        return false;
      }
      if (command.startsWith("admin_ride_wyvern")) {
        _petRideId = 12621;
      } else if (command.startsWith("admin_ride_strider")) {
        _petRideId = 12526;
      } else if (command.startsWith("admin_ride_wolf")) {
        _petRideId = 16041;
      } else if (command.startsWith("admin_ride_horse")) // handled using transformation
      {
        if (activeChar.isTransformed() || activeChar.isInStance())
          // FIXME: Wrong Message
          activeChar.sendMessage("You cannot mount a steed while transformed.");
        else
          TransformationManager.getInstance()
              .transformPlayer(PURPLE_MANED_HORSE_TRANSFORMATION_ID, activeChar);

        return true;
      } else if (command.startsWith("admin_ride_bike")) // handled using transformation
      {
        if (activeChar.isTransformed() || activeChar.isInStance())
          // FIXME: Wrong Message
          activeChar.sendMessage("You cannot mount a steed while transformed.");
        else
          TransformationManager.getInstance()
              .transformPlayer(JET_BIKE_TRANSFORMATION_ID, activeChar);

        return true;
      } else {
        activeChar.sendMessage("Command '" + command + "' not recognized");
        return false;
      }

      activeChar.mount(_petRideId, 0, false);

      return false;
    } else if (command.startsWith("admin_unride")) {
      if (activeChar.getTransformationId() == PURPLE_MANED_HORSE_TRANSFORMATION_ID)
        activeChar.untransform();

      if (activeChar.getTransformationId() == JET_BIKE_TRANSFORMATION_ID) activeChar.untransform();
      else activeChar.dismount();
    }
    return true;
  }
Пример #2
0
 public static void main(String[] args) {
   TransformationManager.getInstance().registerTransformation(new DollBlader());
 }
 public static void main(String[] args) {
   TransformationManager.getInstance().registerTransformation(new LilimKnightWeak());
 }
Пример #4
0
 public static void main(String[] args) {
   TransformationManager.getInstance().registerTransformation(new ArcherCaptain());
 }