Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2MonsterInstance.onSpawn()


        for(int mobId : MOBS)
        {
          L2MonsterInstance npc = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(mobId));
          npc.setSpawnedLoc(Rnd.coordsRandomize(OBELISK_LOC.clone().setZ(-12224), 500, 900));
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
        }
      }
      // Таск открытия двери
      // Возможно на оффе дверь открывается по какому-то другому тригеру
View Full Code Here


    }

    public void run()
    {
      L2MonsterInstance behemoth = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(29069));
      behemoth.onSpawn();
      behemoth.setSpawnedLoc(new Location(Rnd.get(175000, 179900), Rnd.get(112400, 116000), -7709));
      behemoth.spawnMe(behemoth.getSpawnedLoc());
      _monsters.add(behemoth);
      if(_behemothSpawnTask != null)
      {
View Full Code Here

    public void run()
    {
      int npcId = Rnd.get(29070, 29076);
      L2MonsterInstance bomber = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(npcId));
      bomber.onSpawn();
      bomber.setSpawnedLoc(new Location(Rnd.get(175000, 179900), Rnd.get(112400, 116000), -7709));
      bomber.spawnMe(bomber.getSpawnedLoc());
      _monsters.add(bomber);
      // set self destruction.
      _selfDestructionTask = ThreadPoolManager.getInstance().scheduleGeneral(new SelfDestructionOfBomber(bomber), 3000);
View Full Code Here

    // Спауним охрану
    for(Location loc : _mysticSpawnPoints)
    {
      L2MonsterInstance mob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(FOUNDRY_MYSTIC_ID));
      mob.setSpawnedLoc(loc);
      mob.onSpawn();
      mob.spawnMe(loc);
    }
    for(Location loc : _spiritGuardSpawnPoints)
    {
      L2MonsterInstance mob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(FOUNDRY_SPIRIT_GUARD_ID));
View Full Code Here

    }
    for(Location loc : _spiritGuardSpawnPoints)
    {
      L2MonsterInstance mob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(FOUNDRY_SPIRIT_GUARD_ID));
      mob.setSpawnedLoc(loc);
      mob.onSpawn();
      mob.spawnMe(loc);
    }
  }

  @Override
View Full Code Here

      }
      Reflection r = actor.getReflection();
      L2MonsterInstance mob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(_mobId));
      mob.setSpawnedLoc(actor.getLoc());
      mob.setReflection(r);
      mob.onSpawn();
      mob.spawnMe(mob.getSpawnedLoc());
      mob.setRunning();
      mob.getAI().setMaxPursueRange(20000);
      mob.getAI().setGlobalAggro(0);
      // После спауна мобы бегут к тиату или в фортресс, если тиата еще нету
View Full Code Here

        for(int mobId : MOBS)
        {
          L2MonsterInstance npc = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(mobId));
          npc.setSpawnedLoc(Rnd.coordsRandomize(actor.getLoc(), 400, 1000));
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          r.addSpawn(npc.getSpawn());
          L2Character randomHated = actor.getRandomHated();
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, randomHated != null ? randomHated : attacker, Rnd.get(1, 100));
        }
View Full Code Here

        for(int i = 0; i < 2; i++)
        {
          L2MonsterInstance npc = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(PENALTY_MOBS[Rnd.get(PENALTY_MOBS.length)]));
          npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
          npc.setReflection(actor.getReflection());
          npc.onSpawn();
          npc.spawnMe(npc.getSpawnedLoc());
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 100));
        }
      }
    }
View Full Code Here

      if(count <= 10)
      {
        int i = Rnd.get(locs.length);
        L2MonsterInstance mob = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(18493));
        mob.setSpawnedLoc(new Location(locs[i]));
        mob.onSpawn();
        mob.spawnMe(new Location(locs[i]));
        count++;
      }
    }
  }
View Full Code Here

          continue;
        }
        L2MonsterInstance trap = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(TRAP_NPC_ID));
        trap.setSpawnedLoc(TRAP_LOCS[index]);
        trap.setReflection(r);
        trap.onSpawn();
        trap.spawnMe(trap.getSpawnedLoc());
        r.addSpawn(trap.getSpawn());
        if(index < _traps.size())
        {
          _traps.remove(index);
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.