Package lineage2.gameserver.model.instances

Examples of lineage2.gameserver.model.instances.NpcInstance


  private void runCoralGardenHall(World world)
  {
    world.status = 30;
    world.CoralGardenHall = new Room();
    world.CoralGardenHall.npclist = new HashMap<>();
    NpcInstance newNpc;
    newNpc = addSpawnToInstance(Garden_Poison_Moth, new Location(141740, 150330, -11817, 6633), 0, world.instanceId);
    world.CoralGardenHall.npclist.put(newNpc, false);
    newNpc = addSpawnToInstance(Garden_Poison_Moth, new Location(141233, 149960, -11817, 49187), 0, world.instanceId);
    world.CoralGardenHall.npclist.put(newNpc, false);
    newNpc = addSpawnToInstance(Garden_Poison_Moth, new Location(141866, 150723, -11817, 13147), 0, world.instanceId);
View Full Code Here


   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    final NpcInstance mob = actor.getReflection().addSpawnWithoutRespawn(Eidolon_ID, actor.getLoc(), 0);
    final NpcInstance boss = getBoss();
    if ((mob != null) && (boss != null))
    {
      final Creature cha = boss.getAggroList().getTopDamager();
      if (cha != null)
      {
        mob.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, cha, 100000);
      }
    }
View Full Code Here

      for(Player player : getPlayers())
        player.showQuestMovie(ExStartScenePlayer.SCENE_BOSS_OCTABIS_PHASECH_B);

      threeStageGuardSpawn = ThreadPoolManager.getInstance().scheduleAtFixedRate(new SpawnGuardForStage(2), 14000L, 120000L); // 14 secs for movie

      NpcInstance octavisThreeStage = addSpawnWithoutRespawn(Octavis3, new Location(207192, 120568, -10032, 49151), 0);
      octavisThreeStage.addListener(_deathListener);
    }
View Full Code Here

   * @return boolean
   */
  @Override
  protected boolean thinkActive()
  {
    final NpcInstance actor = getActor();
    if (actor.isDead())
    {
      return true;
    }
    if (_def_think)
    {
      doTask();
      return true;
    }
    if ((System.currentTimeMillis() > wait_timeout) && ((current_point > -1) || Rnd.chance(5)))
    {
      if (!wait)
      {
        switch (current_point)
        {
          case 4:
            wait_timeout = System.currentTimeMillis() + 10000;
            wait = true;
            return true;
          case 10:
            wait_timeout = System.currentTimeMillis() + 10000;
            wait = true;
            return true;
          case 14:
            wait_timeout = System.currentTimeMillis() + 10000;
            wait = true;
            return true;
          case 16:
            wait_timeout = System.currentTimeMillis() + 10000;
            wait = true;
            return true;
          case 21:
            wait_timeout = System.currentTimeMillis() + 10000;
            wait = true;
            return true;
          case 27:
            wait_timeout = System.currentTimeMillis() + 10000;
            wait = true;
            return true;
          case 30:
            wait_timeout = System.currentTimeMillis() + 10000;
            Functions.npcSay(actor, "В�?ем лежат�?, у мен�? бомба!");
            wait = true;
            return true;
          case 31:
            wait_timeout = System.currentTimeMillis() + 15000;
            Functions.npcSay(actor, "Я бол�?ной, за �?еб�? не руча�?�?�?!!!!");
            wait = true;
            return true;
          case 32:
            wait_timeout = System.currentTimeMillis() + 15000;
            Functions.npcSay(actor, "Вы в�?е еще тут? Я ва�? предупреждал!!!!!");
            wait = true;
            return true;
          case 33:
            actor.broadcastPacket(new MagicSkillUse(actor, actor, 2025, 1, 500, 0));
            wait_timeout = System.currentTimeMillis() + 1000;
            wait = true;
            return true;
          case 35:
            wait_timeout = System.currentTimeMillis() + 10000;
View Full Code Here

   * @return boolean
   */
  @Override
  protected boolean thinkActive()
  {
    final NpcInstance actor = getActor();
    if (_wait_timeout < System.currentTimeMillis())
    {
      _wait_timeout = System.currentTimeMillis() + BAIUM_EARTHQUAKE_TIMEOUT;
      final L2GameServerPacket eq = new Earthquake(actor.getLoc(), 40, 10);
      final List<Creature> chars = actor.getAroundCharacters(5000, 10000);
      for (Creature character : chars)
      {
        if (character.isPlayer())
        {
          character.sendPacket(eq);
View Full Code Here

   */
  @Override
  protected void onEvtSpawn()
  {
    super.onEvtSpawn();
    final NpcInstance actor = getActor();
    switch (actor.getNpcId())
    {
      case 22423:
      {
        for (int element : servants1)
        {
          try
          {
            actor.getLoc();
            SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(element));
            sp.setLoc(Location.findPointToStay(actor, 150, 350));
            sp.doSpawn(true);
            sp.stopRespawn();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
        break;
      }
      case 22431:
      {
        for (int element : servants2)
        {
          try
          {
            actor.getLoc();
            SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(element));
            sp.setLoc(Location.findPointToStay(actor, 150, 350));
            sp.doSpawn(true);
            sp.stopRespawn();
          }
View Full Code Here

      manageCastleController(1);
      manageDamageZone(2, false);
      for(Player player : getPlayers())
        player.sendPacket(new ExShowScreenMessage(NpcString.FREYA_HAS_STARTED_TO_MOVE, 4000, ScreenMessageAlign.MIDDLE_CENTER, true));
      //Spawning Freya Throne
      NpcInstance freyaTrhone = addSpawnWithoutRespawn(FreyaThrone, new Location(114720, -117085, -11088, 15956), 0);
      freyaTrhone.addListener(_deathListener);
      firstStageGuardSpawn = ThreadPoolManager.getInstance().scheduleAtFixedRate(new GuardSpawnTask(1), 2000L, 30000L);
    }
View Full Code Here

   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    if (Rnd.chance(15))
    {
      try
      {
        actor.getLoc();
        final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(DarionsFaithfulServants[Rnd.get(DarionsFaithfulServants.length - 1)]));
        sp.setLoc(Location.findPointToStay(actor, 150, 350));
        sp.doSpawn(true);
        sp.stopRespawn();
      }
View Full Code Here

        int npdId = getNpcId();
        switch (npdId)
        {
          case 32919:
          {
            NpcInstance ni = getReflection().addSpawnWithoutRespawn(little_simpleAttackMobs[Rnd.get(little_simpleAttackMobs.length)], getLoc(), 150);
            ni.getAI().Attack(player, true, false);
            this.decayMe();
            this.doDie(player);
            break;
          }
          case 32920:
          {
            for (int i = 0; i < 3; i++)
            {
              NpcInstance ni = getReflection().addSpawnWithoutRespawn(big_simpleAttackMobs[Rnd.get(big_simpleAttackMobs.length)], getLoc(), 150);
              ni.getAI().Attack(player, true, false);
            }
            this.decayMe();
            this.doDie(player);
            break;
          }
        }

      }
      else if (command.equalsIgnoreCase("2"))
      {
        int npdId = getNpcId();
        switch (npdId)
        {
          case 32919:
          {
            NpcInstance ni = getReflection().addSpawnWithoutRespawn(little_skillAttackMobs[Rnd.get(little_skillAttackMobs.length)], getLoc(), 150);
            ni.getAI().Attack(player, true, false);
            this.decayMe();
            this.doDie(player);
            break;
          }
          case 32920:
          {
            for (int i = 0; i < 3; i++)
            {
              NpcInstance ni = getReflection().addSpawnWithoutRespawn(big_skillAttackMobs[Rnd.get(big_skillAttackMobs.length)], getLoc(), 150);
              ni.getAI().Attack(player, true, false);
            }
            this.decayMe();
            this.doDie(player);
            break;
          }
        }
      }
    }
    else
    {
      int npdId = getNpcId();
      switch (npdId)
      {
        case 32919:
        {
          NpcInstance ni = getReflection().addSpawnWithoutRespawn(little_nightAttackMobs[Rnd.get(little_nightAttackMobs.length)], getLoc(), 150);
          ni.getAI().Attack(player, true, false);
          this.decayMe();
          this.doDie(player);
          break;
        }
        case 32920:
        {
          for (int i = 0; i < 3; i++)
          {
            NpcInstance ni = getReflection().addSpawnWithoutRespawn(big_nightAttackMobs[Rnd.get(big_nightAttackMobs.length)], getLoc(), 150);
            ni.getAI().Attack(player, true, false);
          }
          this.doDie(player);
          this.decayMe();
          break;
        }
View Full Code Here

   */
  @Override
  protected void onEvtSpawn()
  {
    super.onEvtSpawn();
    final NpcInstance actor = getActor();
    for (int i = 0; i < 7; i++)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(22422));
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.instances.NpcInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.