Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Spawn


  }

  protected L2NpcInstance spawn(int id, Location loc)
  {
    L2NpcTemplate template = NpcTable.getTemplate(id);
    L2Spawn spawn;
    try
    {
      spawn = new L2Spawn(template);
    }
    catch(Exception e)
    {
      e.printStackTrace();
      return null;
    }
    spawn.setLoc(loc);
    L2NpcInstance npc = spawn.doSpawn(true);
    spawn.stopRespawn();
    return npc;
  }
View Full Code Here


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

    if(actor != null)
    {
      try
      {
        Location pos = GeoEngine.findPointToStay(actor.getX(), actor.getY(), actor.getZ(), 100, 120, actor.getReflection().getGeoIndex());
        L2Spawn sp = new L2Spawn(NpcTable.getTemplate(FAFURION));
        sp.setLoc(pos);
        sp.doSpawn(true);
      }
      catch(Exception e)
      {
        e.printStackTrace();
      }
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(22631));
            sp.setLoc(pos);
            L2NpcInstance npc = sp.doSpawn(true);
            npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, killer, Rnd.get(1, 100));
          }
          catch(Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    }
    if(actor.getNpcId() == 22631)
    {
      if(Rnd.chance(80))
      {
        for(int i = 0; i < 3; i++)
        {
          try
          {
            Location pos = GeoEngine.findPointToStay(actor.getX(), actor.getY(), actor.getZ(), 100, 120, actor.getReflection().getGeoIndex());
            L2Spawn sp = new L2Spawn(NpcTable.getTemplate(22619));
            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

    }
    try
    {
      if(!(((L2MonsterInstance) actor).getChampion() > 0) && actor.getCurrentHpPercents() > 50 && Rnd.chance(5))
      {
        L2Spawn spawn = new L2Spawn(NpcTable.getTemplate(21528));
        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

            } else if (i % 4 == 0) {
                monsterId = TowerOfNaiaManager.SPORE_WATER_ID;
            } else {
                monsterId = TowerOfNaiaManager.SPORE_WIND_ID;
            }
            L2Spawn spawn;
            try {
                spawn = new L2Spawn(monsterId);
                spawn.setLoc(loc);
                spawn.setLocation(0);
                spawn.setAmount(1);
                spawn.setRespawnDelay(30);
                spawn.init();
            } catch (ClassNotFoundException e) {
            }
        }
    }
View Full Code Here

        for(int i = 0; i < MOBS_COUNT; i++)
        {
          try
          {
            Location pos = GeoEngine.findPointToStay(actor.getX(), actor.getY(), actor.getZ(), 100, 120, actor.getReflection().getGeoIndex());
            L2Spawn sp = new L2Spawn(NpcTable.getTemplate(MOBS[Rnd.get(MOBS.length)]));
            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

            L2NpcTemplate template = NpcTable.getTemplate(monster);
            if(template == null)
            {
              continue;
            }
            L2Spawn spawn = new L2Spawn(template);
            spawn.setLocation(zone.getLoc().getId());
            spawn.setHeading(-1);
            spawn.setAmount(1);
            spawn.setReflection(r.getId());
            spawn.stopRespawn();
            L2NpcInstance mob = spawn.doSpawn(true);
            if(mob != null)
            {
              ThreadPoolManager.getInstance().scheduleAi(new UnSpawnTask(mob), MONSTER_TRAP_DESPAWN_TIME, false);
              if(mob.isAggressive() && mob.getAI().canSeeInSilentMove(player))
              {
View Full Code Here

    L2NpcInstance actor = getActor();
    if(actor != null)
    {
      try
      {
        L2Spawn sp = new L2Spawn(NpcTable.getTemplate(id));
        sp.setLoc(loc);
        sp.setReflection(actor.getReflection().getId());
        spawns.add(sp.doSpawn(true));
      }
      catch(Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

  {
    this._firstTimeAttacked = false;
 
    try
    {
      L2Spawn spawn1 = new L2Spawn(NpcTable.getTemplate(22196));
      spawn1.setLoc(actor.getLoc());
      spawn1.doSpawn(true);
      spawn1.stopRespawn();

      L2Spawn spawn2 = new L2Spawn(NpcTable.getTemplate(22199));
      spawn2.setLoc(actor.getLoc());
      spawn2.doSpawn(true);
      spawn2.stopRespawn();
     
      L2Spawn spawn3 = new L2Spawn(NpcTable.getTemplate(22200));
      spawn3.setLoc(actor.getLoc());
      spawn3.doSpawn(true);
      spawn3.stopRespawn();

      L2Spawn spawn4 = new L2Spawn(NpcTable.getTemplate(22203));
      spawn4.setLoc(actor.getLoc());
      spawn4.doSpawn(true);
      spawn4.stopRespawn();

    }
    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.