Package net.sf.l2j.gameserver.model.AutoSpawnHandler

Examples of net.sf.l2j.gameserver.model.AutoSpawnHandler.AutoSpawnInstance


      if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM()))
        return false;

    int npcId = 0;
    int teleportIndex = -1;
    AutoSpawnInstance blackSpawnInst = AutoSpawnHandler.getInstance().getAutoSpawnInstance(
        SevenSigns.MAMMON_BLACKSMITH_ID,
        false);
    AutoSpawnInstance merchSpawnInst = AutoSpawnHandler.getInstance().getAutoSpawnInstance(
        SevenSigns.MAMMON_MERCHANT_ID,
        false);

    if (command.startsWith("admin_mammon_find"))
    {
      try
      {
        if (command.length() > 17) teleportIndex = Integer.parseInt(command.substring(18));
      }
      catch (Exception NumberFormatException)
      {
        activeChar.sendMessage("Usage: //mammon_find [teleportIndex] (where 1 = Blacksmith, 2 = Merchant)");
      }

      if (!_isSealValidation)
      {
        activeChar.sendMessage("The competition period is currently in effect.");
        return true;
      }
      if (blackSpawnInst!=null)
      {
        L2NpcInstance[] blackInst = blackSpawnInst.getNPCInstanceList();
        if (blackInst.length > 0)
        {
          int x1=blackInst[0].getX(),y1=blackInst[0].getY(),z1=blackInst[0].getZ();
          activeChar.sendMessage("Blacksmith of Mammon: "+x1+" "+y1+" "+z1);
          if (teleportIndex == 1)
            activeChar.teleToLocation(x1, y1, z1, true);
        }
      }
      else
        activeChar.sendMessage("Blacksmith of Mammon isn't registered for spawn.");
      if (merchSpawnInst!=null)
      {
        L2NpcInstance[] merchInst = merchSpawnInst.getNPCInstanceList();
        if (merchInst.length > 0)
        {
          int x2=merchInst[0].getX(),y2=merchInst[0].getY(),z2=merchInst[0].getZ();
          activeChar.sendMessage("Merchant of Mammon: "+x2+" "+y2+" "+z2);
          if (teleportIndex == 2)
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.AutoSpawnHandler.AutoSpawnInstance

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.