Package l2p.gameserver.templates

Examples of l2p.gameserver.templates.L2NpcTemplate


        sp2.setRespawnDelay(5);
        sp2.init();
        sp2.getAllSpawned().iterator().next().setReflection(-1);
        _spawns.add(sp2);
        // spawn gk
        L2NpcTemplate t = NpcTable.getTemplate(36394);
        t.displayId = 36394;
        t.title = "Gatekeeper";
        t.ai_type = "npc";
        L2Spawn sp3 = new L2Spawn(t);
        sp3.setLocx(149368);
View Full Code Here


   */
  public L2NpcTemplate addEventId(int npcId, QuestEventType eventType)
  {
    try
    {
      L2NpcTemplate t = NpcTable.getTemplate(npcId);
      if(t != null)
      {
        t.addQuestEvent(eventType, this);
      }
      return t;
    }
    catch(Exception e)
    {
View Full Code Here

   */
  public static L2NpcInstance addSpawnToInstance(int npcId, Location loc, int randomOffset, long refId)
  {
    try
    {
      L2NpcTemplate template = NpcTable.getTemplate(npcId);
      if(template != null)
      {
        L2NpcInstance npc = NpcTable.getTemplate(npcId).getNewInstance();
        npc.setReflection(refId);
        npc.setSpawnedLoc(randomOffset > 50 ? loc.rnd(50, randomOffset, false) : loc);
View Full Code Here

      L2TamedBeastInstance oldTrained = player.getTrainedBeast();
      if(oldTrained != null)
      {
        oldTrained.doDespawn();
      }
      L2NpcTemplate template = NpcTable.getTemplate(nextNpcId);
      L2TamedBeastInstance nextNpc = new L2TamedBeastInstance(IdFactory.getInstance().getNextId(), template, player, food == 0 ? SKILL_GOLDEN_SPICE : SKILL_CRYSTAL_SPICE, getLoc());
      QuestState st = player.getQuestState("_020_BringUpWithLove");
      if(st != null && Rnd.chance(5) && st.getQuestItemsCount(7185) == 0)
      {
        st.giveItems(7185, 1);
View Full Code Here

    _buffers = new GArray<L2Spawn>();
    for(int[] loc : zone.getSpawns())
    {
      try
      {
        L2NpcTemplate template = NpcTable.getTemplate(36402); // Olympiad Host
        //TODO исправить координаты и heading
        L2Spawn buffer = new L2Spawn(template);
        buffer.setLocx(loc[0]);
        buffer.setLocy(loc[1]);
        buffer.setLocz(loc[2]);
View Full Code Here

    if(fisher == null)
    {
      return;
    }
    int npcid = 18319 + Math.min(fisher.getLevel() / 11, 7); // 18319-18326
    L2NpcTemplate temp = NpcTable.getTemplate(npcid);
    if(temp != null)
    {
      fisher.sendPacket(Msg.YOU_HAVE_CAUGHT_A_MONSTER);
      try
      {
View Full Code Here

      p.setVar("backCoords", p.getLoc().toXYZString());
      p.getEffectList().stopAllEffects();
      p.teleToLocation(Rnd.coordsRandomize(_startLocation.loc, 20, 100), this.getId());
    }
    scheduleNext();
    L2NpcTemplate witchTemplate = NpcTable.getTemplate(_witchSpawn.npcId);
    // Spawn the festival witch for this arena
    try
    {
      L2Spawn npcSpawn = new L2Spawn(witchTemplate);
      npcSpawn.setLoc(_witchSpawn.loc);
View Full Code Here

        return;
    }
    for(int[] element : _npcSpawns)
    {
      FestivalSpawn currSpawn = new FestivalSpawn(element);
      L2NpcTemplate npcTemplate = NpcTable.getTemplate(currSpawn.npcId);
      try
      {
        L2Spawn npcSpawn = new L2Spawn(npcTemplate);
        npcSpawn.setReflection(_id);
        npcSpawn.setLoc(currSpawn.loc);
View Full Code Here

          random = Rnd.get(24);
        }
      }
      try
      {
        L2NpcTemplate template = NpcTable.getTemplate((short) (id + random));
        _constructor = template.getInstanceConstructor();
        int objectId = IdFactory.getInstance().getNextId();
        monsters[i] = (L2NpcInstance) _constructor.newInstance(objectId, template);
      }
      catch(Exception e)
      {
View Full Code Here

      _fuel = owner.getAirshipFuel();
      StatsSet npcDat = L2NpcTemplate.getEmptyStatsSet();
      npcDat.set("npcId", 0);
      npcDat.set("name", "Helm");
      npcDat.set("type", "L2StaticObject");
      L2NpcTemplate template = new L2NpcTemplate(npcDat);
      L2StaticObjectInstance controlKey = new L2StaticObjectInstance(_owner.getClanId(), template);
      controlKey.setType(3);
      controlKey.setLoc(getLoc());
      _controlKey = controlKey;
    }
View Full Code Here

TOP

Related Classes of l2p.gameserver.templates.L2NpcTemplate

Copyright © 2018 www.massapicom. 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.