Examples of SimpleSpawner


Examples of lineage2.gameserver.model.SimpleSpawner

  private void spawnMob(Creature attacker)
  {
    final NpcInstance actor = getActor();
    try
    {
      final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(MOB));
      sp.setLoc(Location.findPointToStay(actor, 100, 120));
      sp.setReflection(actor.getReflection());
      final NpcInstance npc = sp.doSpawn(true);
      npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, 100);
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    if (!Config.SERVICES_GIRAN_HARBOR_ENABLED)
    {
      return;
    }
    ReflectionManager.GIRAN_HARBOR.setCoreLoc(new Location(47416, 186568, -3480));
    SimpleSpawner spawn = new SimpleSpawner(30086);
    spawn.setLocx(48059);
    spawn.setLocy(186791);
    spawn.setLocz(-3512);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(32169);
    spawn.setLocx(48146);
    spawn.setLocy(186753);
    spawn.setLocz(-3512);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(13129);
    spawn.setLocx(47984);
    spawn.setLocy(186832);
    spawn.setLocz(-3445);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(31860);
    spawn.setLocx(48129);
    spawn.setLocy(186828);
    spawn.setLocz(-3512);
    spawn.setAmount(1);
    spawn.setHeading(45452);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(30300);
    spawn.setLocx(48102);
    spawn.setLocy(186772);
    spawn.setLocz(-3512);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(32320);
    spawn.setLocx(47772);
    spawn.setLocy(186905);
    spawn.setLocz(-3480);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(32320);
    spawn.setLocx(46360);
    spawn.setLocy(187672);
    spawn.setLocz(-3480);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    spawn = new SimpleSpawner(32320);
    spawn.setLocx(49016);
    spawn.setLocy(185960);
    spawn.setLocz(-3480);
    spawn.setAmount(1);
    spawn.setHeading(42000);
    spawn.setRespawnDelay(5);
    spawn.setReflection(ReflectionManager.GIRAN_HARBOR);
    spawn.init();
    _spawns.add(spawn);
    _zoneListener = new ZoneListener();
    _zone.addListener(_zoneListener);
    _zone.setReflection(ReflectionManager.GIRAN_HARBOR);
    _zone.setActive(true);
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

          }
        }
      }
      try
      {
        final SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(DarkShamanVarangka));
        sp.setLoc(Location.findPointToStay(actor, 400, 420));
        final NpcInstance npc = sp.doSpawn(true);
        if (attacker.isPet() || attacker.isServitor())
        {
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(2, 100));
        }
        npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker.getPlayer(), Rnd.get(1, 100));
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
    }
    else if (Rnd.chance(5))
    {
      final List<NpcInstance> around = actor.getAroundNpc(1000, 300);
      if ((around != null) && !around.isEmpty())
      {
        for (NpcInstance npc : around)
        {
          if (npc.getNpcId() == 22702)
          {
            return;
          }
        }
      }
      for (int i = 0; i < 2; i++)
      {
        try
        {
          SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(22702));
          sp.setLoc(Location.findPointToStay(actor, 150, 160));
          NpcInstance npc = sp.doSpawn(true);
          if (attacker.isPet() || attacker.isServitor())
          {
            npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(2, 100));
          }
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker.getPlayer(), Rnd.get(1, 100));
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

      Thread.dumpStack();
      return null;
    }
    try
    {
      SimpleSpawner sp = new SimpleSpawner(template);
      sp.setLoc(loc);
      sp.setAmount(1);
      sp.setRespawnDelay(0);
      _spawns.add(sp);
      return sp.spawnOne();
    }
    catch (Exception e)
    {
      e.printStackTrace();
      return null;
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    for (int i = 0; i < 9; i++)
    {
      try
      {
        pos = Location.findPointToStay(144298, 154420, -11854, 300, 320, actor.getGeoIndex());
        SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(Tears_Copy));
        sp.setLoc(pos);
        sp.setReflection(actor.getReflection());
        NpcInstance copy = sp.doSpawn(true);
        spawns.add(copy);
        hated = actor.getAggroList().getRandomHated();
        if (hated != null)
        {
          copy.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, hated, Rnd.get(1, 100));
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

      final NpcInstance actor = getActor();
      for (int i = 0; i < SPAWN_COUNT; i++)
      {
        try
        {
          SimpleSpawner sp = new SimpleSpawner(TANTA_LIZARDMAN_SCOUT);
          // @SuppressWarnings("unused")
          // int radius = (((i % 2) == 0) ? -1 : 1) * 16000;
          sp.setLoc(actor.getLoc());
          NpcInstance npc = sp.doSpawn(true);
          npc.setHeading(PositionUtils.calculateHeadingFrom(npc, attacker));
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, 1000);
        }
        catch (Exception e)
        {
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

      default:
        break;
    }
    try
    {
      SimpleSpawner sp = new SimpleSpawner(epidostospawn);
      sp.setLoc(spawnLoc);
      sp.doSpawn(true);
      sp.stopRespawn();
      _bossSpawned = true;
    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

    {
      spore.deleteMe();
    }
    try
    {
      SimpleSpawner sp = new SimpleSpawner(teleCube);
      sp.setLoc(spawnLoc);
      sp.doSpawn(true);
      sp.stopRespawn();
      Functions.npcShout(sp.getLastSpawn(), "Teleportation to Beleth Throne Room is available for 2 minutes");
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

  {
    for (int i = 0; i < count; i++)
    {
      try
      {
        SimpleSpawner sp = new SimpleSpawner(mobId);
        sp.setLoc(Territory.getRandomLoc(territory).setH(Rnd.get(65535)));
        sp.setRespawnDelay(respawnDelay, 30);
        sp.setAmount(1);
        sp.doSpawn(true);
        sp.startRespawn();
      }
      catch (Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

Examples of lineage2.gameserver.model.SimpleSpawner

      _mobsNotSpawned = false;
      for (int i = 0; i < MOBS_COUNT; i++)
      {
        try
        {
          SimpleSpawner sp = new SimpleSpawner(NpcHolder.getInstance().getTemplate(MOBS));
          sp.setLoc(Location.findPointToStay(actor, 100, 120));
          NpcInstance npc = sp.doSpawn(true);
          if (caster.isPet() || caster.isServitor())
          {
            npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, caster, Rnd.get(2, 100));
          }
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, caster.getPlayer(), Rnd.get(1, 100));
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.