Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.SimpleSpawner.doSpawn()


      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


          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

    {
      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)
      {
View Full Code Here

          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

          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

      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

    {
      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

      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

    {
      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

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