Package com.l2jfrozen.gameserver.model.spawn

Examples of com.l2jfrozen.gameserver.model.spawn.L2Spawn


      con = L2DatabaseFactory.getInstance().getConnection(false);
      PreparedStatement statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay FROM vanhalter_spawnlist Where npc_templateid = ? ORDER BY id");
      statement.setInt(1, 32051);
      ResultSet rset = statement.executeQuery();

      L2Spawn spawnDat;
      L2NpcTemplate template1;

      while(rset.next())
      {
        template1 = NpcTable.getInstance().getTemplate(rset.getInt("npc_templateid"));
        if(template1 != null)
        {
          spawnDat = new L2Spawn(template1);
          spawnDat.setAmount(rset.getInt("count"));
          spawnDat.setLocx(rset.getInt("locx"));
          spawnDat.setLocy(rset.getInt("locy"));
          spawnDat.setLocz(rset.getInt("locz"));
          spawnDat.setHeading(rset.getInt("heading"));
          spawnDat.setRespawnDelay(rset.getInt("respawn_delay"));
          SpawnTable.getInstance().addNewSpawn(spawnDat, false);
          _guardOfAltarSpawn.add(spawnDat);
        }
        else
        {
View Full Code Here


      con = L2DatabaseFactory.getInstance().getConnection(false);
      PreparedStatement statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay FROM vanhalter_spawnlist Where npc_templateid = ? ORDER BY id");
      statement.setInt(1, 29062);
      ResultSet rset = statement.executeQuery();

      L2Spawn spawnDat;
      L2NpcTemplate template1;

      while(rset.next())
      {
        template1 = NpcTable.getInstance().getTemplate(rset.getInt("npc_templateid"));
        if(template1 != null)
        {
          spawnDat = new L2Spawn(template1);
          spawnDat.setAmount(rset.getInt("count"));
          spawnDat.setLocx(rset.getInt("locx"));
          spawnDat.setLocy(rset.getInt("locy"));
          spawnDat.setLocz(rset.getInt("locz"));
          spawnDat.setHeading(rset.getInt("heading"));
          spawnDat.setRespawnDelay(rset.getInt("respawn_delay"));
          SpawnTable.getInstance().addNewSpawn(spawnDat, false);
          _vanHalterSpawn = spawnDat;
        }
        else
        {
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection(false);
      PreparedStatement statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay FROM vanhalter_spawnlist Where npc_templateid = ? ORDER BY id");
      statement.setInt(1, 32038);
      ResultSet rset = statement.executeQuery();

      L2Spawn spawnDat;
      L2NpcTemplate template1;

      while(rset.next())
      {
        template1 = NpcTable.getInstance().getTemplate(rset.getInt("npc_templateid"));
        if(template1 != null)
        {
          spawnDat = new L2Spawn(template1);
          spawnDat.setAmount(rset.getInt("count"));
          spawnDat.setLocx(rset.getInt("locx"));
          spawnDat.setLocy(rset.getInt("locy"));
          spawnDat.setLocz(rset.getInt("locz"));
          spawnDat.setHeading(rset.getInt("heading"));
          spawnDat.setRespawnDelay(rset.getInt("respawn_delay"));
          SpawnTable.getInstance().addNewSpawn(spawnDat, false);
          _ritualOfferingSpawn = spawnDat;
        }
        else
        {
View Full Code Here

      L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(_flagIds.get(index));
      L2NpcTemplate throne = NpcTable.getInstance().getTemplate(32027);
      try
      {
        // Spawn throne
        _throneSpawns.set(index, new L2Spawn(throne));
        _throneSpawns.get(index).setLocx(_flagsX.get(index));
        _throneSpawns.get(index).setLocy(_flagsY.get(index));
        _throneSpawns.get(index).setLocz(_flagsZ.get(index)-10);
        _throneSpawns.get(index).setAmount(1);
        _throneSpawns.get(index).setHeading(0);
        _throneSpawns.get(index).setRespawnDelay(1);
        SpawnTable.getInstance().addNewSpawn(_throneSpawns.get(index), false);
        _throneSpawns.get(index).init();
        _throneSpawns.get(index).getLastSpawn().getStatus().setCurrentHp(999999999);
        _throneSpawns.get(index).getLastSpawn().decayMe();
        _throneSpawns.get(index).getLastSpawn().spawnMe(_throneSpawns.get(index).getLastSpawn().getX(), _throneSpawns.get(index).getLastSpawn().getY(), _throneSpawns.get(index).getLastSpawn().getZ());
        _throneSpawns.get(index).getLastSpawn().setTitle(team+" Throne");
        _throneSpawns.get(index).getLastSpawn().broadcastPacket(new MagicSkillUser(_throneSpawns.get(index).getLastSpawn(), _throneSpawns.get(index).getLastSpawn(), 1036, 1, 5500, 1));
        _throneSpawns.get(index).getLastSpawn()._isCTF_throneSpawn=true;
        // Spawn flag
        _flagSpawns.set(index, new L2Spawn(tmpl));
        _flagSpawns.get(index).setLocx(_flagsX.get(index));
        _flagSpawns.get(index).setLocy(_flagsY.get(index));
        _flagSpawns.get(index).setLocz(_flagsZ.get(index));
        _flagSpawns.get(index).setAmount(1);
        _flagSpawns.get(index).setHeading(0);
View Full Code Here

    int index = _teams.indexOf(teamName);
    L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(_flagIds.get(index));

    try
    {
      _flagSpawns.set(index, new L2Spawn(tmpl));

      _flagSpawns.get(index).setLocx(_flagsX.get(index));
      _flagSpawns.get(index).setLocy(_flagsY.get(index));
      _flagSpawns.get(index).setLocz(_flagsZ.get(index));
      _flagSpawns.get(index).setAmount(1);
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection(false);

      PreparedStatement statement = con.prepareStatement("SELECT * from raidboss_spawnlist ORDER BY boss_id");
      ResultSet rset = statement.executeQuery();

      L2Spawn spawnDat;
      L2NpcTemplate template;
      long respawnTime;
      while(rset.next())
      {
        template = getValidTemplate(rset.getInt("boss_id"));
        if(template != null)
        {
          spawnDat = new L2Spawn(template);
          spawnDat.setLocx(rset.getInt("loc_x"));
          spawnDat.setLocy(rset.getInt("loc_y"));
          spawnDat.setLocz(rset.getInt("loc_z"));
          spawnDat.setAmount(rset.getInt("amount"));
          spawnDat.setHeading(rset.getInt("heading"));
          spawnDat.setRespawnMinDelay(rset.getInt("respawn_min_delay"));
          spawnDat.setRespawnMaxDelay(rset.getInt("respawn_max_delay"));
          respawnTime = rset.getLong("respawn_time");

          StatsSet info = new StatsSet();
          info.set("respawnTime", respawnTime);
          _storedInfo.put(rset.getInt("boss_id"), info);
View Full Code Here

    switch (sitem.getType())
    {
      case 0: // static summons (like christmas tree)
        try
        {
          L2Spawn spawn = new L2Spawn(npcTemplate);
         
          // if(spawn == null)
          // return;
         
          spawn.setId(IdFactory.getInstance().getNextId());
          spawn.setLocx(activeChar.getX());
          spawn.setLocy(activeChar.getY());
          spawn.setLocz(activeChar.getZ());
          L2World.getInstance().storeObject(spawn.spawnOne());
          activeChar.destroyItem("Summon", item.getObjectId(), 1, null, false);
          activeChar.sendMessage("Created " + npcTemplate.name + " at x: " + spawn.getLocx() + " y: " + spawn.getLocy() + " z: " + spawn.getLocz());
          spawn = null;
        }
        catch (Exception e)
        {
          if (Config.ENABLE_ALL_EXCEPTIONS)
View Full Code Here

    if(temp != null)
    {
      try
      {
        L2Spawn spawn = new L2Spawn(temp);
        spawn.setLocx(_fisher.GetFishx());
        spawn.setLocy(_fisher.GetFishy());
        spawn.setLocz(_fisher.GetFishz());
        spawn.setAmount(1);
        spawn.setHeading(_fisher.getHeading());
        spawn.stopRespawn();
        ((L2PenaltyMonsterInstance) spawn.doSpawn()).setPlayerToKill(_fisher);
        spawn = null;
      }
      catch(Exception e)
      {
        // Nothing
View Full Code Here

  {
    L2NpcTemplate tmpl = NpcTable.getInstance().getTemplate(_npcId);

    try
    {
      _npcSpawn = new L2Spawn(tmpl);
      _npcSpawn.setLocx(_npcX);
      _npcSpawn.setLocy(_npcY);
      _npcSpawn.setLocz(_npcZ);
      _npcSpawn.setHeading(_npcHeading);
      _npcSpawn.setAmount(1);
View Full Code Here

      L2NpcTemplate tmpl1 = NpcTable.getInstance().getTemplate(_npc1Id);


      try
      {
        _npc1Spawn = new L2Spawn(tmpl1);
        _npc1Spawn.setLocx(_npc1X);
        _npc1Spawn.setLocy(_npc1Y);
        _npc1Spawn.setLocz(_npc1Z);
        _npc1Spawn.setHeading(_npc1Heading);
        _npc1Spawn.setAmount(1);
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.spawn.L2Spawn

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.