Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Spawn


        int bossId = Integer.parseInt(command.substring(12).trim());
        switch(RaidBossSpawnManager.getInstance().getRaidBossStatusId(bossId))
        {
          case ALIVE:
          case DEAD:
            L2Spawn spawn = RaidBossSpawnManager.getInstance().getSpawnTable().get(bossId);
            // Убираем и ставим флажок на карте и стрелку на компасе
            player.sendPacket(new RadarControl(2, 2, spawn.getLoc()), new RadarControl(0, 1, spawn.getLoc()));
            break;
          case UNDEFINED:
            player.sendMessage(new CustomMessage("l2p.gameserver.model.instances.L2AdventurerInstance.BossNotInGame", player).addNumber(bossId));
            break;
        }
View Full Code Here


      try
      {
        for (int i = 0; i < SPAWN_POINTS.length; i++)
        {
          Location oldPos = SPAWN_POINTS[i];
          L2Spawn s = new L2Spawn(NpcTable.getTemplate(LEMATANS_FOLLOWER));
          Location newPos = GeoEngine.findPointToStay(oldPos.x, oldPos.y, oldPos.z, 0, 0, actor.getReflection().getGeoIndex());
          s.setReflection(actor.getReflection().getId());
          s.setLoc(newPos);
          s.doSpawn(true);
        }
      }
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here

      Functions.npcSay(actor, "Система выключается...");
      Functions.npcSay(actor, "......");
    }
    try
    {
      L2Spawn spawn1 = new L2Spawn(NpcTable.getTemplate(TELEPORTATION_CUBIC_ID));
      spawn1.setLoc(CUBIC_1_POSITION);
      spawn1.doSpawn(true);
      spawn1.stopRespawn();
      L2Spawn spawn2 = new L2Spawn(NpcTable.getTemplate(TELEPORTATION_CUBIC_ID));
      spawn2.setLoc(CUBIC_2_POSITION);
      spawn2.doSpawn(true);
      spawn2.stopRespawn();
      ThreadPoolManager.getInstance().scheduleAi(new DeSpawnScheduleTimerTask(spawn1, spawn2), CUBIC_DESPAWN_TIME, false);
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

    _zone = ZoneManager.getInstance().getZoneById(ZoneType.epic, 702003, false);
    // Setting spawn data of monsters.
    try
    {
      L2NpcTemplate template1;
      L2Spawn tempSpawn;
      // Valakas.
      template1 = NpcTable.getTemplate(Valakas);
      tempSpawn = new L2Spawn(template1);
      tempSpawn.setLocx(212852);
      tempSpawn.setLocy(-114842);
      tempSpawn.setLocz(-1632);
      //tempSpawn.setHeading(22106);
      tempSpawn.setHeading(833);
      tempSpawn.setAmount(1);
      tempSpawn.stopRespawn();
      _monsterSpawn.put(Valakas, tempSpawn);
      // Dummy Valakas.
      template1 = NpcTable.getTemplate(ValakasDummy);
      tempSpawn = new L2Spawn(template1);
      tempSpawn.setLocx(212852);
      tempSpawn.setLocy(-114842);
      tempSpawn.setLocz(-1632);
      //tempSpawn.setHeading(22106);
      tempSpawn.setHeading(833);
      tempSpawn.setAmount(1);
      tempSpawn.stopRespawn();
      _monsterSpawn.put(ValakasDummy, tempSpawn);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
    // Setting spawn data of teleport cube.
    try
    {
      L2NpcTemplate Cube = NpcTable.getTemplate(_teleportCubeId);
      L2Spawn spawnDat;
      for(int[] element : _teleportCubeLocation)
      {
        spawnDat = new L2Spawn(Cube);
        spawnDat.setAmount(1);
        spawnDat.setLocx(element[0]);
        spawnDat.setLocy(element[1]);
        spawnDat.setLocz(element[2]);
        spawnDat.setHeading(element[3]);
        spawnDat.setRespawnDelay(60);
        spawnDat.setLocation(0);
        _teleportCubeSpawn.add(spawnDat);
      }
    }
    catch(Exception e)
    {
View Full Code Here

      switch(_taskId)
      {
        case 1:
          Dying = false;
          // Do spawn.
          L2Spawn valakasSpawn = _monsterSpawn.get(Valakas);
          _valakas = (L2BossInstance) valakasSpawn.doSpawn(true);
          _monsters.add(_valakas);
          _valakas.setImobilised(true);
          _state.setRespawnDate(Rnd.get(FWV_FIXINTERVALOFVALAKAS, FWV_FIXINTERVALOFVALAKAS + FWV_RANDOMINTERVALOFVALAKAS));
          _state.setState(EpicBossState.State.ALIVE);
          _state.update();
View Full Code Here

      {
        for(int i = 0; i < 1; i++)
        {
          try
          {
            L2Spawn spawn = new L2Spawn(NpcTable.getTemplate(MOBS[Rnd.get(MOBS.length)]));
            spawn.setLoc(actor.getLoc());
            L2NpcInstance npc = spawn.doSpawn(true);
            npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, Rnd.get(1, 100));
          }
          catch(Exception e)
          {
            e.printStackTrace();
View Full Code Here

    player.sendPacket(new PlaySound(1, "HB01", 0, 0, new Location()));
    try
    {
      Location loc = GeoEngine.findPointToStay(npc.getX(), npc.getY(), npc.getZ(), 40, 60, npc.getReflection().getGeoIndex());
      loc.setH(Util.getHeadingTo(loc, player.getLoc()));
      L2Spawn spawn = new L2Spawn(NpcTable.getTemplate(NPC_ALEGRIA));
      spawn.setLoc(loc);
      spawn.doSpawn(true);
      ThreadPoolManager.getInstance().scheduleAi(new DeSpawnScheduleTimerTask(spawn), 180000, false);
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

      try
      {
        // init reflection
        ReflectionTable.getInstance().get(-2, true).setCoreLoc(new Location(47416, 186568, -3480));
        // spawn wh keeper
        L2Spawn sp1 = new L2Spawn(NpcTable.getTemplate(30086));
        sp1.setLocx(48059);
        sp1.setLocy(186791);
        sp1.setLocz(-3512);
        sp1.setAmount(1);
        sp1.setHeading(42000);
        sp1.setRespawnDelay(5);
        sp1.init();
        sp1.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp1);
        // spawn grocery trader
        L2Spawn sp2 = new L2Spawn(NpcTable.getTemplate(32169));
        sp2.setLocx(48146);
        sp2.setLocy(186753);
        sp2.setLocz(-3512);
        sp2.setAmount(1);
        sp2.setHeading(42000);
        sp2.setRespawnDelay(5);
        sp2.init();
        sp2.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp2);
        // spawn gk
        L2NpcTemplate t = NpcTable.getTemplate(36394);
        t.displayId = 36394;
        t.title = "Gatekeeper";
        t.ai_type = "npc";
        L2Spawn sp3 = new L2Spawn(t);
        sp3.setLocx(47984);
        sp3.setLocy(186832);
        sp3.setLocz(-3445);
        sp3.setAmount(1);
        sp3.setHeading(42000);
        sp3.setRespawnDelay(5);
        sp3.init();
        sp3.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp3);
        // spawn Orion the Cat
        L2Spawn sp5 = new L2Spawn(NpcTable.getTemplate(31860));
        sp5.setLocx(48129);
        sp5.setLocy(186828);
        sp5.setLocz(-3512);
        sp5.setAmount(1);
        sp5.setHeading(45452);
        sp5.setRespawnDelay(5);
        sp5.init();
        sp5.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp5);
        // spawn blacksmith (Pushkin)
        L2Spawn sp6 = new L2Spawn(NpcTable.getTemplate(30300));
        sp6.setLocx(48102);
        sp6.setLocy(186772);
        sp6.setLocz(-3512);
        sp6.setAmount(1);
        sp6.setHeading(42000);
        sp6.setRespawnDelay(5);
        sp6.init();
        sp6.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp6);
        // spawn Item Broker
        L2Spawn sp7 = new L2Spawn(NpcTable.getTemplate(32320));
        sp7.setLocx(47772);
        sp7.setLocy(186905);
        sp7.setLocz(-3480);
        sp7.setAmount(1);
        sp7.setHeading(42000);
        sp7.setRespawnDelay(5);
        sp7.init();
        sp7.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp7);
        // spawn Item Broker
        L2Spawn sp8 = new L2Spawn(NpcTable.getTemplate(32320));
        sp8.setLocx(46360);
        sp8.setLocy(187672);
        sp8.setLocz(-3480);
        sp8.setAmount(1);
        sp8.setHeading(42000);
        sp8.setRespawnDelay(5);
        sp8.init();
        sp8.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp8);
        // spawn Item Broker
        L2Spawn sp9 = new L2Spawn(NpcTable.getTemplate(32320));
        sp9.setLocx(49016);
        sp9.setLocy(185960);
        sp9.setLocz(-3480);
        sp9.setAmount(1);
        sp9.setHeading(42000);
        sp9.setRespawnDelay(5);
        sp9.init();
        sp9.getAllSpawned().iterator().next().setReflection(-2);
        _spawns.add(sp9);
      }
      catch(SecurityException e)
      {
        e.printStackTrace();
View Full Code Here

      removeItem(player, 14832, 1);
      object.deleteMe();
      try
      {
        Location pos = GeoEngine.findPointToStay(player.getX(), player.getY(), player.getZ(), 100, 120, player.getReflection().getGeoIndex());
        L2Spawn sp = new L2Spawn(NpcTable.getTemplate(25667));
        sp.setLoc(pos);
        L2NpcInstance npc = sp.doSpawn(true);
        npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, player, Rnd.get(1, 100));
      }
      catch(ClassNotFoundException e)
      {
        e.printStackTrace();
View Full Code Here

      activeChar.sendMessage("Incorrect monster template.");
      return;
    }
    try
    {
      L2Spawn spawn = new L2Spawn(template);
      spawn.setLoc(target.getLoc());
      spawn.setLocation(0);
      spawn.setAmount(mobCount);
      spawn.setHeading(activeChar.getHeading());
      spawn.setRespawnDelay(respawnTime);
      spawn.setReflection(activeChar.getReflection().getId());
      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 l2p.gameserver.model.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.