Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Spawn.doSpawn()


        try
        {
          Location pos = GeoEngine.findPointToStay(actor.getX(), actor.getY(), actor.getZ(), 100, 120, actor.getReflection().getGeoIndex());
          L2Spawn sp = new L2Spawn(NpcTable.getTemplate(MOBS));
          sp.setLoc(pos);
          L2NpcInstance npc = sp.doSpawn(true);
          if(caster.isPet() || caster.isSummon())
          {
            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


      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

          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

    {
      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

          {
            sp.startRespawn();
          }
          for(int i = 0; i < sp.getAmount(); i++)
          {
            sp.doSpawn(true);
          }
        }
        Quest.addSpawnToInstance(getManagerId(), riftRoom.getTeleportCoords(), 0, _id);
      }
    };
View Full Code Here

    {
      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

        npcSpawn.setLoc(currSpawn.loc);
        npcSpawn.setHeading(Rnd.get(65536));
        npcSpawn.setAmount(1);
        npcSpawn.setRespawnDelay(respawnDelay);
        npcSpawn.startRespawn();
        L2FestivalMonsterInstance festivalMob = (L2FestivalMonsterInstance) npcSpawn.doSpawn(true);
        // Set the offering bonus to 2x or 5x the amount per kill, if this spawn is part of an increased challenge or is a festival chest.
        if(spawnType == 1)
        {
          festivalMob.setOfferingBonus(2);
        }
View Full Code Here

      L2Spawn spawn = null;
      try
      {
        spawn = new L2Spawn(NpcTable.getTemplate(_npcId));
        spawn.setLoc(actor.getLoc());
        L2NpcInstance npc = spawn.doSpawn(true);
        npc.setAI(new SquashAI(npc));
        ((SquashInstance) npc).setSpawner(actor.getSpawner());
      }
      catch(Exception e)
      {
View Full Code Here

        sp.setLocy(element[1]);
        sp.setLocz(element[2]);
        sp.setHeading(element[3]);
        sp.setRespawnDelay(0);
        sp.setAmount(1);
        sp.doSpawn(true);
        sp.getLastSpawn().setAI(new Tournament_ai(sp.getLastSpawn()));
        _spawns.add(sp);
      }
      catch(ClassNotFoundException e)
      {
View Full Code Here

    {
      L2Spawn sp = new L2Spawn(template);
      sp.setLoc(spawnPoint);
      sp.setAmount(1);
      sp.setRespawnDelay(0);
      _snowman = sp.doSpawn(true);
    }
    catch(ClassNotFoundException e)
    {
      e.printStackTrace();
    }
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.