Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.SimpleSpawner


    final NpcInstance actor = getActor();
    for (int i = 0; i < MOBS_COUNT; i++)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(MOB));
        sp.setLoc(Location.findPointToStay(actor, 100, 120));
        sp.setReflection(actor.getReflection());
        NpcInstance npc = sp.doSpawn(true);
        npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, 100);
      }
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here


  {
    if (checkAllDestroyed())
    {
      try
      {
        final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(TeleportCube));
        sp.setLoc(new Location(-12527, 279714, -11622, 16384));
        sp.doSpawn(true);
        sp.stopRespawn();
        ThreadPoolManager.getInstance().schedule(new Unspawn(), 600 * 1000L);
      }
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here

  {
    for (Location element : locSD)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(32371));
        sp.setLoc(element);
        sp.doSpawn(true);
        if (!s)
        {
          Functions.npcShout(sp.getLastSpawn(), "Self Destruction mechanism launched: 10 minutes to explosion");
          s = true;
        }
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
    }
    for (Location element : locFTT)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(22392));
        sp.setLoc(element);
        sp.doSpawn(true);
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
    }
    try
    {
      final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(32370));
      sp.setLoc(new Location(-11984, 272928, -9040, 23644));
      sp.doSpawn(true);
      removable_ghost = sp.getLastSpawn();
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

    _state = new EpicBossState(BAIUM);
    _zone = ReflectionUtils.getZone("[baium_epic]");
    CharListenerList.addGlobal(this);
    try
    {
      final SimpleSpawner tempSpawn;
      _statueSpawn = new SimpleSpawner(NpcHolder.getInstance().getTemplate(BAIUM_NPC));
      _statueSpawn.setAmount(1);
      _statueSpawn.setLoc(STATUE_LOCATION);
      _statueSpawn.stopRespawn();
      tempSpawn = new SimpleSpawner(NpcHolder.getInstance().getTemplate(BAIUM));
      tempSpawn.setAmount(1);
      _monsterSpawn.put(BAIUM, tempSpawn);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
    try
    {
      final NpcTemplate Cube = NpcHolder.getInstance().getTemplate(TELEPORT_CUBE);
      _teleportCubeSpawn = new SimpleSpawner(Cube);
      _teleportCubeSpawn.setAmount(1);
      _teleportCubeSpawn.setLoc(CUBE_LOCATION);
      _teleportCubeSpawn.setRespawnDelay(60);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
    try
    {
      final NpcTemplate angel = NpcHolder.getInstance().getTemplate(ARCHANGEL);
      SimpleSpawner spawnDat;
      _angelSpawns.clear();
      final List<Integer> random = new ArrayList<>();
      for (int i = 0; i < 5; i++)
      {
        int r = -1;
        while ((r == -1) || random.contains(r))
        {
          r = Rnd.get(10);
        }
        random.add(r);
      }
      for (int i : random)
      {
        spawnDat = new SimpleSpawner(angel);
        spawnDat.setAmount(1);
        spawnDat.setLoc(ANGEL_LOCATION[i]);
        spawnDat.setRespawnDelay(300000);
        _angelSpawns.add(spawnDat);
      }
    }
    catch (Exception e)
    {
View Full Code Here

   */
  public static void spawnBaium(NpcInstance NpcBaium, Player awake_by)
  {
    Dying = false;
    _npcBaium = NpcBaium;
    final SimpleSpawner baiumSpawn = _monsterSpawn.get(BAIUM);
    baiumSpawn.setLoc(_npcBaium.getLoc());
    _npcBaium.getSpawn().stopRespawn();
    _npcBaium.deleteMe();
    final BossInstance baium = (BossInstance) baiumSpawn.doSpawn(true);
    _monsters.add(baium);
    _state.setRespawnDate(getRespawnInterval());
    _state.setState(EpicBossState.State.ALIVE);
    _state.update();
    Log.add("Spawned Baium, awake by: " + awake_by, "bosses");
View Full Code Here

     */
    @Override
    public void runImpl()
    {
      final NpcInstance actor = getActor();
      final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(_id));
      sp.setLoc(Location.findPointToStay(actor, 100, 120));
      sp.setRespawnDelay(30, 40);
      sp.doSpawn(true);
      spawns.add(sp);
    }
View Full Code Here

    final NpcInstance actor = getActor();
    for (int i = 0; i < MOBS_COUNT; i++)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(MOBS[Rnd.get(MOBS.length)]));
        sp.setLoc(Location.findPointToStay(actor, 100, 120));
        NpcInstance npc = sp.doSpawn(true);
        npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 100));
      }
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here

  {
    _mobsSpawned = 0;
    final NpcInstance actor = getActor();
    try
    {
      final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(FAFURION));
      sp.setLoc(Location.findPointToStay(actor, 100, 120));
      sp.doSpawn(true);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

      activeChar.sendMessage("Incorrect monster template.");
      return;
    }
    try
    {
      SimpleSpawner spawn = new SimpleSpawner(template);
      spawn.setLoc(target.getLoc());
      spawn.setAmount(mobCount);
      spawn.setHeading(activeChar.getHeading());
      spawn.setRespawnDelay(respawnTime);
      spawn.setReflection(activeChar.getReflection());
      spawn.init();
      if (respawnTime == 0)
      {
        spawn.stopRespawn();
      }
      activeChar.sendMessage("Created " + template.name + " on " + target.getObjectId() + ".");
    }
    catch (Exception e)
    {
View Full Code Here

      activeChar.sendMessage("Incorrect monster template.");
      return;
    }
    try
    {
      SimpleSpawner spawn = new SimpleSpawner(template);
      spawn.setLoc(target.getLoc());
      spawn.setAmount(mobCount);
      spawn.setHeading(activeChar.getHeading());
      spawn.setRespawnDelay(respawnTime);
      spawn.setReflection(activeChar.getReflection());
      if (RaidBossSpawnManager.getInstance().isDefined(template.getNpcId()))
      {
        activeChar.sendMessage("Raid Boss " + template.name + " already spawned.");
      }
      else
      {
        if (Config.SAVE_GM_SPAWN_CUSTOM)
        {
          CustomSpawnTable.getInstance().addNewSpawn(spawn);
        }
        spawn.init();
        if (respawnTime == 0)
        {
          spawn.stopRespawn();
        }
        activeChar.sendMessage("Created " + template.name + " on " + target.getObjectId() + ".");
      }
    }
    catch (Exception e)
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.SimpleSpawner

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.