Package l2p.gameserver.templates

Examples of l2p.gameserver.templates.L2NpcTemplate


        sp2.setRespawnDelay(5);
        sp2.init();
        sp2.getAllSpawned().iterator().next().setReflection(-2);
        _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(47984);
View Full Code Here


  public void setSocial(int npcId, String faction, int range)
  {
    try
    {
      L2NpcTemplate t = NpcTable.getTemplate(npcId);
      java.lang.reflect.Field factionId = t.getClass().getDeclaredField("factionId");
      factionId.setAccessible(true);
      factionId.set(t, faction);
      java.lang.reflect.Field factionRange = t.getClass().getDeclaredField("factionRange");
      factionRange.setAccessible(true);
      factionRange.set(t, (short) range);
    }
    catch(Exception e)
    {
View Full Code Here

    {
      target = activeChar;
    }
    Pattern pattern = Pattern.compile("[0-9]*");
    Matcher regexp = pattern.matcher(monsterId);
    L2NpcTemplate template;
    if(regexp.matches())
    {
      // First parameter was an ID number
      int monsterTemplate = Integer.parseInt(monsterId);
      template = NpcTable.getTemplate(monsterTemplate);
View Full Code Here

      e.printStackTrace();
    }
    // Teleport Cube
    try
    {
      L2NpcTemplate Cube = NpcTable.getTemplate(TELEPORT_CUBE);
      L2Spawn _teleportCubeSpawn = new L2Spawn(Cube);
      _teleportCubeSpawn.setAmount(1);
      _teleportCubeSpawn.setLoc(CUBE_LOCATION);
      _teleportCubeSpawn.setRespawnDelay(60);
      _teleportCubeSpawn.setLocation(0);
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
    // Archangels
    try
    {
      L2NpcTemplate angel = NpcTable.getTemplate(ARCHANGEL);
      L2Spawn spawnDat;
      _angelSpawns.clear();
      // 5 random numbers of 10, no duplicates
      GArray<Integer> random = new GArray<Integer>();
      for(int i = 0; i < 5; i++)
View Full Code Here

        boxId = 31030;
        break;
    }
    if(boxId != 0)
    {
      L2NpcTemplate boxTemplate = NpcTable.getTemplate(boxId);
      if(boxTemplate != null)
      {
        final L2NpcInstance box = new L2NpcInstance(IdFactory.getInstance().getNextId(), boxTemplate);
        box.onSpawn();
        box.spawnMe(getLoc());
View Full Code Here

    {
      target = activeChar;
    }
    Pattern pattern = Pattern.compile("[0-9]*");
    Matcher regexp = pattern.matcher(monsterId);
    L2NpcTemplate template;
    if(regexp.matches())
    {
      // First parameter was an ID number
      int monsterTemplate = Integer.parseInt(monsterId);
      template = NpcTable.getTemplate(monsterTemplate);
View Full Code Here

    if(obj != null && obj.isNpc())
    {
      L2NpcInstance target = (L2NpcInstance) obj;
      L2Spawn spawn = target.getSpawn();
      int monsterTemplate = target.getTemplate().npcId;
      L2NpcTemplate template1 = NpcTable.getTemplate(monsterTemplate);
      if(template1 == null)
      {
        activeChar.sendMessage("Incorrect monster template.");
        return;
      }
View Full Code Here

    private GArray<String> agressors_party = null;
    private int tiks = 0;

    public GuardiansSpawner(L2NpcInstance npc, QuestState st, int _count)
    {
      L2NpcTemplate template = NpcTable.getTemplate(Soul_of_Tree_Guardian);
      if(template == null)
      {
        return;
      }
      try
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("SELECT * FROM lastimperialtomb_spawnlist");
      rset = statement.executeQuery();
      int npcTemplateId;
      L2Spawn spawnDat;
      L2NpcTemplate npcTemplate;
      while(rset.next())
      {
        npcTemplateId = rset.getInt("npc_templateid");
        npcTemplate = NpcTable.getTemplate(npcTemplateId);
        if(npcTemplate != null)
View Full Code Here

public class BaylorManager extends Functions implements ScriptFile
{
  public static L2NpcInstance spawn(Location loc, int npcId)
  {
    L2NpcTemplate template = NpcTable.getTemplate(loc.id);
    L2NpcInstance npc = template.getNewInstance();
    npc.setSpawnedLoc(loc);
    npc.onSpawn();
    npc.setHeading(loc.h);
    npc.setXYZInvisible(loc);
    npc.setReflection(currentReflection);
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.