Package com.l2jfrozen.gameserver.model.spawn

Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn


    L2NpcInstance result = null;
    try
    {
      L2NpcTemplate template = NpcTable.getInstance().getTemplate(MESSENGER_ID);

      L2Spawn spawn = new L2Spawn(template);
      spawn.setLocx(179040);
      spawn.setLocy(-13717);
      spawn.setLocz(-2263);
      spawn.stopRespawn();
      result = spawn.spawnOne();
      template = null;
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here


  public void Siege()
  {
    L2NpcInstance result = null;
    L2NpcTemplate template = null;
    L2Spawn spawn = null;

    ClanHall CH = ClanHallManager.getInstance().getClanHallById(34);
    CH.banishForeigners();
    CH.spawnDoor();

    setIsInProgress(true);

    try
    {
      fillMonsters();

      template = NpcTable.getInstance().getTemplate(BOSS_ID);
      spawn = new L2Spawn(template);
      spawn.setLocx(178298);
      spawn.setLocy(-17624);
      spawn.setLocz(-2194);
      spawn.stopRespawn();
      result = spawn.spawnOne();
      _gustav = ThreadPoolManager.getInstance().scheduleGeneral(new DeSpawnTimer(result), 3600000); //60 * 60 * 1000

      template = NpcTable.getInstance().getTemplate(BOSS1_ID);
      spawn = new L2Spawn(template);
      spawn.setLocx(178306);
      spawn.setLocy(-17535);
      spawn.setLocz(-2195);
      spawn.stopRespawn();
      _minion1 = spawn.spawnOne();
      _dietrich = ThreadPoolManager.getInstance().scheduleGeneral(new DeSpawnTimer(_minion1), 3600000); //60 * 60 * 1000

      template = NpcTable.getInstance().getTemplate(BOSS2_ID);
      spawn = new L2Spawn(template);
      spawn.setLocx(178304);
      spawn.setLocy(-17712);
      spawn.setLocz(-2194);
      spawn.stopRespawn();
      _minion2 = spawn.spawnOne();
      _mikhail = ThreadPoolManager.getInstance().scheduleGeneral(new DeSpawnTimer(_minion2), 3600000); //60 * 60 * 1000

      spawnMonsters();
    }
    catch(Exception e)
View Full Code Here

    for(MonsterLocation ml : _monsters)
    {
      try
      {
        L2NpcTemplate template = NpcTable.getInstance().getTemplate(ml.getId());
        L2Spawn sp = new L2Spawn(template);
        sp.setAmount(1);
        sp.setLocx(ml.getX());
        sp.setLocy(ml.getY());
        sp.setLocz(ml.getZ());
        sp.setHeading(ml.getHeading());
        sp.setRespawnDelay(300); //3 * 60
        sp.setLocation(0);
        sp.init();
        _spawns.add(sp);
      }
      catch(Exception e)
      {
        e.printStackTrace();
View Full Code Here

        activeChar.sendMessage("Incorrect monster template.");
        _log.warning("ERROR: NPC " + target.getObjectId() + " has a 'null' template.");
        return;
      }

      L2Spawn spawn = target.getSpawn();

      if(spawn == null)
      {
        activeChar.sendMessage("Incorrect monster spawn.");
        _log.warning("ERROR: NPC " + target.getObjectId() + " has a 'null' spawn.");
        return;
      }

      int respawnTime = spawn.getRespawnDelay()/1000;
      boolean custom_boss_spawn = spawn.is_customBossInstance();
       
      target.deleteMe();
      spawn.stopRespawn();
     
      //check to avoid that recalling a custom raid it will be saved into database
      SpawnTable.getInstance().deleteSpawn(spawn, !custom_boss_spawn);

      try
      {
        //L2MonsterInstance mob = new L2MonsterInstance(monsterTemplate, template1);

        spawn = new L2Spawn(template1);
        spawn.setLocx(activeChar.getX());
        spawn.setLocy(activeChar.getY());
        spawn.setLocz(activeChar.getZ());
        spawn.setAmount(1);
        spawn.setHeading(activeChar.getHeading());
        spawn.setRespawnDelay(respawnTime);
        SpawnTable.getInstance().addNewSpawn(spawn, !custom_boss_spawn);
        spawn.init();

        SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
        sm.addString("Created " + template1.name + " on " + target.getObjectId() + ".");
        activeChar.sendPacket(sm);
        sm = null;

        if(Config.DEBUG)
        {
          _log.fine("Spawn at X=" + spawn.getLocx() + " Y=" + spawn.getLocy() + " Z=" + spawn.getLocz());
          _log.warning("GM: " + activeChar.getName() + "(" + activeChar.getObjectId() + ") moved NPC " + target.getObjectId());
        }

        spawn = null;
        template1 = null;
View Full Code Here

    L2NpcTemplate npctmp = NpcTable.getInstance().getTemplate(npcId);
    _endNPC = npcId;

    try
    {
      _endSpawn = new L2Spawn(npctmp);
      _endSpawn.setLocx(_endX);
      _endSpawn.setLocy(_endY);
      _endSpawn.setLocz(_endZ);
      _endSpawn.setAmount(1);
      _endSpawn.setHeading(activeChar.getHeading());
View Full Code Here

    L2NpcTemplate npctmp = NpcTable.getInstance().getTemplate(npcId);
    _joinNPC = npcId;

    try
    {
      _joinSpawn = new L2Spawn(npctmp);
      _joinSpawn.setLocx(_joinX);
      _joinSpawn.setLocy(_joinY);
      _joinSpawn.setLocz(_joinZ);
      _joinSpawn.setAmount(1);
      _joinSpawn.setHeading(activeChar.getHeading());
View Full Code Here

    L2NpcInstance result = null;
    try
    {
      L2NpcTemplate template = NpcTable.getInstance().getTemplate(MESSENGER_ID);

      L2Spawn spawn = new L2Spawn(template);
      spawn.setLocx(50335);
      spawn.setLocy(111275);
      spawn.setLocz(-1970);
      spawn.stopRespawn();
      result = spawn.spawnOne();
      template = null;
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

    L2NpcInstance result = null;
    try
    {
      L2NpcTemplate template = NpcTable.getInstance().getTemplate(BOSS_ID);

      L2Spawn spawn = new L2Spawn(template);
      spawn.setLocx(44525);
      spawn.setLocy(108867);
      spawn.setLocz(-2020);
      spawn.stopRespawn();
      result = spawn.spawnOne();
      template = null;
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.spawn.L2Spawn

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.