Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Spawn


    Functions.npcSay(actor, chat[Rnd.get(chat.length)]);
    for(int[] run : guard_run)
    {
      try
      {
        L2Spawn sp = new L2Spawn(NpcTable.getTemplate(run[0]));
        sp.setLoc(guard_spawn_loc);
        sp.setReflection(actor.getReflection().getId());
        L2NpcInstance guard = sp.doSpawn(true);
        Location runLoc = new Location(run[1], run[2], run[3]);
        guard.setRunning();
        guard.getAI().addTaskMove(runLoc, true);
        guard.getAI().setGlobalAggro(0);
        // Выбираем случайную цель
View Full Code Here


        for(int i = 0; i < 2; i++)
        {
          try
          {
            Location pos = GeoEngine.findPointToStay(actor.getX(), actor.getY(), actor.getZ(), 100, 120, actor.getReflection().getGeoIndex());
            L2Spawn sp = new L2Spawn(NpcTable.getTemplate(22620));
            sp.setLoc(pos);
            L2NpcInstance npc = sp.doSpawn(true);
            npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, Rnd.get(1, 100));
          }
          catch(Exception e)
          {
            e.printStackTrace();
View Full Code Here

      {
        return;
      }
      try
      {
        _spawn = new L2Spawn(template);
      }
      catch(Exception E)
      {
        return;
      }
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT * FROM lastimperialtomb_spawnlist");
      rset = statement.executeQuery();
      int npcTemplateId;
      L2Spawn spawnDat;
      L2NpcTemplate npcTemplate;
      while(rset.next())
      {
        npcTemplateId = rset.getInt("npc_templateid");
        npcTemplate = NpcTable.getTemplate(npcTemplateId);
        if(npcTemplate != null)
        {
          spawnDat = new L2Spawn(npcTemplate);
          spawnDat.setAmount(rset.getInt("count"));
          spawnDat.setLocx(rset.getInt("locx"));
          spawnDat.setLocy(rset.getInt("locy"));
          spawnDat.setLocz(rset.getInt("locz"));
          spawnDat.setHeading(rset.getInt("heading"));
          spawnDat.setRespawnDelay(rset.getInt("respawn_delay"));
          switch(npcTemplateId)
          {
            case 18328:
            case 18330:
            case 18332:
View Full Code Here

    }
    try
    {
      if(!(((L2MonsterInstance) actor).getChampion() > 0) && actor.getCurrentHpPercents() > 50 && Rnd.chance(5))
      {
        L2Spawn spawn = new L2Spawn(NpcTable.getTemplate(21538));
        spawn.setLoc(actor.getLoc());
        L2NpcInstance npc = spawn.doSpawn(true);
        npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, 100);
        actor.decayMe();
        actor.doDie(actor);
        return;
      }
View Full Code Here

      try
      {
        // init reflection
        ReflectionTable.getInstance().get(-1, true).setCoreLoc(new Location(149384, 171896, -952));
        // spawn wh keeper
        L2Spawn sp1 = new L2Spawn(NpcTable.getTemplate(30086));
        sp1.setLocx(149960);
        sp1.setLocy(174136);
        sp1.setLocz(-920);
        sp1.setAmount(1);
        sp1.setHeading(32768);
        sp1.setRespawnDelay(5);
        sp1.init();
        sp1.getAllSpawned().iterator().next().setReflection(-1);
        _spawns.add(sp1);
        // spawn grocery trader (Helvetia)
        L2Spawn sp2 = new L2Spawn(NpcTable.getTemplate(30839));
        sp2.setLocx(149368);
        sp2.setLocy(174264);
        sp2.setLocz(-896);
        sp2.setAmount(1);
        sp2.setHeading(49152);
        sp2.setRespawnDelay(5);
        sp2.init();
        sp2.getAllSpawned().iterator().next().setReflection(-1);
        _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(149368);
        sp3.setLocy(172568);
        sp3.setLocz(-952);
        sp3.setAmount(1);
        sp3.setHeading(49152);
        sp3.setRespawnDelay(5);
        sp3.init();
        sp3.getAllSpawned().iterator().next().setReflection(-1);
        _spawns.add(sp3);
        // spawn Orion the Cat
        L2Spawn sp5 = new L2Spawn(NpcTable.getTemplate(31860));
        sp5.setLocx(148904);
        sp5.setLocy(173656);
        sp5.setLocz(-952);
        sp5.setAmount(1);
        sp5.setHeading(49152);
        sp5.setRespawnDelay(5);
        sp5.init();
        sp5.getAllSpawned().iterator().next().setReflection(-1);
        _spawns.add(sp5);
        // spawn blacksmith (Pushkin)
        L2Spawn sp6 = new L2Spawn(NpcTable.getTemplate(30300));
        sp6.setLocx(148760);
        sp6.setLocy(174136);
        sp6.setLocz(-920);
        sp6.setAmount(1);
        sp6.setHeading(0);
        sp6.setRespawnDelay(5);
        sp6.init();
        sp6.getAllSpawned().iterator().next().setReflection(-1);
        _spawns.add(sp6);
        // spawn Item Broker
        L2Spawn sp7 = new L2Spawn(NpcTable.getTemplate(32320));
        sp7.setLocx(149368);
        sp7.setLocy(173064);
        sp7.setLocz(-952);
        sp7.setAmount(1);
        sp7.setHeading(16384);
        sp7.setRespawnDelay(5);
        sp7.init();
        sp7.getAllSpawned().iterator().next().setReflection(-1);
        _spawns.add(sp7);
      }
      catch(SecurityException e)
      {
        e.printStackTrace();
View Full Code Here

    int z = GeoEngine.getHeight(x, y, sloc.z, actor.getReflection().getGeoIndex());
    if(Math.abs(sloc.z - z) > 64)
    {
      return false;
    }
    L2Spawn spawn = actor.getSpawn();
    if(spawn != null && spawn.getLocation() != 0 && !TerritoryTable.getInstance().getLocation(spawn.getLocation()).isInside(x, y))
    {
      return false;
    }
    actor.setWalking();
    // Телепортируемся домой, только если далеко от дома
View Full Code Here

    {
      try
      {
        L2NpcTemplate template = NpcTable.getTemplate(36402); // Olympiad Host
        //TODO исправить координаты и heading
        L2Spawn buffer = new L2Spawn(template);
        buffer.setLocx(loc[0]);
        buffer.setLocy(loc[1]);
        buffer.setLocz(loc[2]);
        buffer.setRespawnDelay(10);
        buffer.spawnOne();
        _buffers.add(buffer);
      }
      catch(Exception e)
      {
        e.printStackTrace();
View Full Code Here

      @Override
      public void run()
      {
        for(L2Spawn s : riftRoom.getSpawns())
        {
          L2Spawn sp = s.clone();
          sp.setReflection(_id);
          addSpawn(sp);
          if(!isBossRoom)
          {
            sp.startRespawn();
          }
          for(int i = 0; i < sp.getAmount(); i++)
          {
            sp.doSpawn(true);
          }
        }
        Quest.addSpawnToInstance(getManagerId(), riftRoom.getTeleportCoords(), 0, _id);
      }
    };
View Full Code Here

    scheduleNext();
    L2NpcTemplate witchTemplate = NpcTable.getTemplate(_witchSpawn.npcId);
    // Spawn the festival witch for this arena
    try
    {
      L2Spawn npcSpawn = new L2Spawn(witchTemplate);
      npcSpawn.setLoc(_witchSpawn.loc);
      npcSpawn.setReflection(_id);
      addSpawn(npcSpawn);
      npcSpawn.doSpawn(true);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
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.