Esempio n. 1
0
  @Override
  public void execute(Mob mob, String input) {

    Player player = mob.getPlayer();

    if (player == null) {
      LOGGER.warn("A none player called Who command");
      return;
    }

    player.getData().setTitle(input);
    player.out("Setting your title to " + input);
  }
Esempio n. 2
0
  public static Mob makeDefaultPlayerMob(String name) {
    Mob mob = new Mob();
    Player player = new Player();
    player.setMob(mob);
    mob.setNameAndId(name);
    mob.setAlias(name);
    mob.setPlayer(player);
    int[] defaultAttributes = {10, 10, 10, 10, 10};
    player.setAttributes(defaultAttributes);

    mob.setId(name);
    mob.setBrief(name);
    mob.setName(name);

    PlayerData data = player.getData();

    data.setLearns(100);
    data.setPracs(100);

    mob.setPlayer(player);

    player.setMob(mob);

    player.getData().setAlignment(new Attribute("Alignment", 1000));

    mob.setHeight(6);

    data.setTotalXp(0);
    data.setRemort(0);
    data.setPracs(0);

    mob.setLevel(1);

    data.setAge(16 + (int) (Math.random() * 5));

    mob.setHp("100");
    mob.setMv("100");
    mob.setMana(new MobMana(true));

    data.setThirst(500);
    data.setHunger(500);

    mob.setWimpy(10);

    return mob;
  }