Beispiel #1
0
  @Override
  protected boolean thinkActive() {

    NpcInstance actor = getActor();

    int[][] coords;
    coords = SMP_COORDS;

    actor.setRunning();

    if (actor.getTarget() == null || currentState >= coords.length || currentState == 0) {
      if (currentState < coords.length) {
        actor.moveToLocation(
            coords[currentState][0],
            coords[currentState][1],
            coords[currentState][2],
            Rnd.get(0, 50),
            true);
        if (actor.getDestination() == null) {
          ++currentState;
        }
      } else {
        actor.doDie(actor);
      }
    }
    if (lastSayTimer + SAY_RAFF < System.currentTimeMillis()) {
      lastSayTimer = System.currentTimeMillis();
      Functions.npcSay(actor, NpcString.ITS_HERE, ChatType.NPC_ALL, 800);
    }

    return true;
  }