Examples of SimpleSpawner


Examples of lineage2.gameserver.model.SimpleSpawner

     * Method runImpl.
     */
    @Override
    public void runImpl()
    {
      final SimpleSpawner sp = new SimpleSpawner(_nextId);
      sp.setLocx(_actor.getX());
      sp.setLocy(_actor.getY());
      sp.setLocz(_actor.getZ());
      sp.setReflection(_actor.getReflection());
      final NpcInstance npc = sp.doSpawn(true);
      npc.setHeading(PositionUtils.calculateHeadingFrom(npc, _player));
      npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, _player, 1000);
    }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

      int[] mobs = rnd.chance();
      for (int npcId : mobs)
      {
        try
        {
          SimpleSpawner spawn = new SimpleSpawner(npcId);
          spawn.setTerritory(zone.getTerritory());
          spawn.setAmount(1);
          spawn.setReflection(player.getReflection());
          spawn.stopRespawn();
          NpcInstance mob = spawn.doSpawn(true);
          if (mob != null)
          {
            ThreadPoolManager.getInstance().schedule(new UnSpawnTask(spawn), despawn * 1000L);
            if (mob.isAggressive() && attackOnSpawn)
            {
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

  {
    if (Rnd.chance(15))
    {
      try
      {
        final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(MysteriousAgent));
        sp.setLoc(new Location(-11984, 278880, -13599, -4472));
        sp.doSpawn(true);
        sp.stopRespawn();
        ThreadPoolManager.getInstance().schedule(new Unspawn(), 600 * 1000L);
      }
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

        for (int element : servants1)
        {
          try
          {
            actor.getLoc();
            SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(element));
            sp.setLoc(Location.findPointToStay(actor, 150, 350));
            sp.doSpawn(true);
            sp.stopRespawn();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
        break;
      }
      case 22431:
      {
        for (int element : servants2)
        {
          try
          {
            actor.getLoc();
            SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(element));
            sp.setLoc(Location.findPointToStay(actor, 150, 350));
            sp.doSpawn(true);
            sp.stopRespawn();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    if (Rnd.chance(15))
    {
      try
      {
        actor.getLoc();
        final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(DarionsFaithfulServants[Rnd.get(DarionsFaithfulServants.length - 1)]));
        sp.setLoc(Location.findPointToStay(actor, 150, 350));
        sp.doSpawn(true);
        sp.stopRespawn();
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    final NpcInstance actor = getActor();
    for (int i = 0; i < 7; i++)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(22422));
        sp.setLoc(Location.findPointToStay(actor, 150, 550));
        sp.doSpawn(true);
        sp.stopRespawn();
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    Functions.npcSay(actor, chat[Rnd.get(chat.length)]);
    for (int[] run : guard_run)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(run[0]));
        sp.setLoc(guard_spawn_loc);
        sp.setReflection(actor.getReflection());
        NpcInstance guard = sp.doSpawn(true);
        Location runLoc = new Location(run[1], run[2], run[3]);
        guard.setRunning();
        DefaultAI ai = (DefaultAI) guard.getAI();
        ai.addTaskMove(runLoc, true);
        ai.setGlobalAggro(0);
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    final NpcInstance actor = getActor();
    for (int i = 0; i < 5; i++)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(Rnd.get(25614, 25615)));
        sp.setLoc(Location.findPointToStay(actor, 400, 900));
        sp.doSpawn(true);
        sp.stopRespawn();
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

  /**
   * Method spawnHellbound.
   */
  void spawnHellbound()
  {
    SimpleSpawner spawnDat;
    NpcTemplate template;
    for (HellboundSpawn hbsi : _list)
    {
      if (ArrayUtils.contains(hbsi.getStages(), getHellboundLevel()))
      {
        try
        {
          template = NpcHolder.getInstance().getTemplate(hbsi.getNpcId());
          for (int i = 0; i < hbsi.getAmount(); i++)
          {
            spawnDat = new SimpleSpawner(template);
            spawnDat.setAmount(1);
            if (hbsi.getLoc() != null)
            {
              spawnDat.setLoc(hbsi.getLoc());
            }
            if (hbsi.getSpawnTerritory() != null)
            {
              spawnDat.setTerritory(hbsi.getSpawnTerritory());
            }
            spawnDat.setReflection(ReflectionManager.DEFAULT);
            spawnDat.setRespawnDelay(hbsi.getRespawn(), hbsi.getRespawnRnd());
            spawnDat.setRespawnTime(0);
            spawnDat.doSpawn(true);
            spawnDat.getLastSpawn().addListener(_deathListener);
            spawnDat.startRespawn();
            _spawnList.add(spawnDat);
          }
        }
        catch (Exception e)
        {
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

   * @param killer Creature
   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(teredorLarva));
    sp.setLoc(Location.findPointToStay(actor, 100, 120));
    sp.doSpawn(true);
    super.onEvtDead(killer);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.