Package lineage2.gameserver.skills

Examples of lineage2.gameserver.skills.AbnormalEffect


    {
      return;
    }
    if (!Config.ALT_ALLOW_SHADOW_WEAPONS)
    {
      show(new CustomMessage("common.Disabled", player), player);
      return;
    }
    if ((player.getLevel() > 39) || (player.getClassLevel() > 2))
    {
      show("Your level is too high!", player);
View Full Code Here


      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();
    if (Config.IS_TELNET_ENABLED)
    {
      statusServer = new TelnetServer();
    }
    else
    {
      _log.info("Telnet server is currently disabled.");
    }
View Full Code Here

    if (!activeChar.getPlayerAccess().GodMode)
    {
      return false;
    }
    int val;
    AbnormalEffect ae = AbnormalEffect.NULL;
    String Skill = new String();
    GameObject target = activeChar.getTarget();
    switch (command)
    {
      case admin_invis:
      case admin_vis:
        if (activeChar.isInvisible())
        {
          activeChar.setInvisibleType(InvisibleType.NONE);
          activeChar.broadcastCharInfo();
          for (Summon summon : activeChar.getSummonList())
          {
            summon.broadcastCharInfo();
          }
        }
        else
        {
          activeChar.setInvisibleType(InvisibleType.NORMAL);
          activeChar.sendUserInfo();
          World.removeObjectFromPlayers(activeChar);
        }
        break;
      case admin_gmspeed:
        if (wordList.length < 2)
        {
          val = 0;
        }
        else
        {
          try
          {
            val = Integer.parseInt(wordList[1]);
          }
          catch (Exception e)
          {
            activeChar.sendMessage("USAGE: //gmspeed value=[0..4]");
            return false;
          }
        }
        List<Effect> superhaste = activeChar.getEffectList().getEffectsBySkillId(7029);
        int sh_level = superhaste == null ? 0 : superhaste.isEmpty() ? 0 : superhaste.get(0).getSkill().getLevel();
        if (val == 0)
        {
          if (sh_level != 0)
          {
            activeChar.doCast(SkillTable.getInstance().getInfo(7029, sh_level), activeChar, true);
          }
          activeChar.unsetVar("gm_gmspeed");
        }
        else if ((val >= 1) && (val <= 4))
        {
          if (Config.SAVE_GM_EFFECTS)
          {
            activeChar.setVar("gm_gmspeed", String.valueOf(val), -1);
          }
          if (val != sh_level)
          {
            if (sh_level != 0)
            {
              activeChar.doCast(SkillTable.getInstance().getInfo(7029, sh_level), activeChar, true);
            }
            activeChar.doCast(SkillTable.getInstance().getInfo(7029, val), activeChar, true);
          }
        }
        else
        {
          activeChar.sendMessage("USAGE: //gmspeed value=[0..4]");
        }
        break;
      case admin_invul:
        handleInvul(activeChar, activeChar);
        if (activeChar.isInvul())
        {
          if (Config.SAVE_GM_EFFECTS)
          {
            activeChar.setVar("gm_invul", "true", -1);
          }
        }
        else
        {
          activeChar.unsetVar("gm_invul");
        }
        break;
      default:
        break;
    }
    if (!activeChar.isGM())
    {
      return false;
    }
    switch (command)
    {
      case admin_offline_vis:
        for (Player player : GameObjectsStorage.getAllPlayers())
        {
          if ((player != null) && player.isInOfflineMode())
          {
            player.setInvisibleType(InvisibleType.NONE);
            player.decayMe();
            player.spawnMe();
          }
        }
        break;
      case admin_offline_invis:
        for (Player player : GameObjectsStorage.getAllPlayers())
        {
          if ((player != null) && player.isInOfflineMode())
          {
            player.setInvisibleType(InvisibleType.NORMAL);
            player.decayMe();
          }
        }
        break;
      case admin_earthquake:
        try
        {
          int intensity = Integer.parseInt(wordList[1]);
          int duration = Integer.parseInt(wordList[2]);
          activeChar.broadcastPacket(new Earthquake(activeChar.getLoc(), intensity, duration));
        }
        catch (Exception e)
        {
          activeChar.sendMessage("USAGE: //earthquake intensity duration");
          return false;
        }
        break;
      case admin_block:
        if ((target == null) || !target.isCreature())
        {
          activeChar.sendPacket(Msg.INVALID_TARGET);
          return false;
        }
        if (((Creature) target).isBlocked())
        {
          return false;
        }
        ((Creature) target).abortAttack(true, false);
        ((Creature) target).abortCast(true, false);
        ((Creature) target).block();
        activeChar.sendMessage("Target blocked.");
        break;
      case admin_unblock:
        if ((target == null) || !target.isCreature())
        {
          activeChar.sendPacket(Msg.INVALID_TARGET);
          return false;
        }
        if (!((Creature) target).isBlocked())
        {
          return false;
        }
        ((Creature) target).unblock();
        activeChar.sendMessage("Target unblocked.");
        break;
      case admin_changename:
        if (wordList.length < 2)
        {
          activeChar.sendMessage("USAGE: //changename newName");
          return false;
        }
        if (target == null)
        {
          target = activeChar;
        }
        if (!target.isCreature())
        {
          activeChar.sendPacket(Msg.INVALID_TARGET);
          return false;
        }
        String oldName = ((Creature) target).getName();
        String newName = Util.joinStrings(" ", wordList, 1);
        ((Creature) target).setName(newName);
        ((Creature) target).broadcastCharInfo();
        activeChar.sendMessage("Changed name from " + oldName + " to " + newName + ".");
        break;
      case admin_setinvul:
        if ((target == null) || !target.isPlayer())
        {
          activeChar.sendPacket(Msg.INVALID_TARGET);
          return false;
        }
        handleInvul(activeChar, (Player) target);
        break;
      case admin_getinvul:
        if ((target != null) && target.isCreature())
        {
          activeChar.sendMessage("Target " + target.getName() + "(object ID: " + target.getObjectId() + ") is " + (!((Creature) target).isInvul() ? "NOT " : "") + "invul");
        }
        break;
      case admin_social:
        if (wordList.length < 2)
        {
          val = Rnd.get(1, 7);
        }
        else
        {
          try
          {
            val = Integer.parseInt(wordList[1]);
          }
          catch (NumberFormatException nfe)
          {
            activeChar.sendMessage("USAGE: //social value");
            return false;
          }
        }
        if ((target == null) || (target == activeChar))
        {
          activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), val));
        }
        else if (target.isCreature())
        {
          ((Creature) target).broadcastPacket(new SocialAction(target.getObjectId(), val));
        }
        break;
      case admin_abnormal:
        try
        {
          if (wordList.length > 1)
          {
            ae = AbnormalEffect.getByName(wordList[1]);
          }
        }
        catch (Exception e)
        {
          activeChar.sendMessage("USAGE: //abnormal name");
          activeChar.sendMessage("//abnormal - Clears all abnormal effects");
          return false;
        }
        Creature effectTarget = target == null ? activeChar : (Creature) target;
        if (ae == AbnormalEffect.NULL)
        {
          effectTarget.startAbnormalEffect(AbnormalEffect.NULL);
          effectTarget.sendMessage("Abnormal effects clearned by admin.");
          if (effectTarget != activeChar)
          {
            effectTarget.sendMessage("Abnormal effects clearned.");
          }
        }
        else
        {
          effectTarget.startAbnormalEffect(ae);
          effectTarget.sendMessage("Admin added abnormal effect: " + ae.getName());
          if (effectTarget != activeChar)
          {
            effectTarget.sendMessage("Added abnormal effect: " + ae.getName());
          }
        }
        break;
      case admin_effect:
        try
View Full Code Here

      _selectorThreads[i].start();
    }
    LoginServerCommunication.getInstance().start();
    if (Config.SERVICES_OFFLINE_TRADE_RESTORE_AFTER_RESTART)
    {
      ThreadPoolManager.getInstance().schedule(new RestoreOfflineTraders(), 30000L);
    }
    getListeners().onStart();
    if (Config.IS_TELNET_ENABLED)
    {
      statusServer = new TelnetServer();
View Full Code Here

   * @param template NpcTemplate
   */
  public Kama26BossInstance(int objectId, NpcTemplate template)
  {
    super(objectId, template);
    getMinionList().addMinion(new MinionData(18556, 1));
  }
View Full Code Here

    ThreadPoolManager.getInstance().schedule(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
        final NpcTemplate template = NpcHolder.getInstance().getTemplate(18602);
        if (template != null)
        {
          final NpcInstance a = template.getNewInstance();
          a.setCurrentHpMp(a.getMaxHp(), a.getMaxMp());
          a.spawnMe(actor.getLoc());
        }
      }
    }, 10000L);
View Full Code Here

      {
        player.sendPacket(Msg.YOU_CANNOT_TELEPORT_TO_A_VILLAGE_THAT_IS_IN_A_SIEGE);
        return;
      }
    }
    final Location pos = Location.findPointToStay(x, y, z, 50, 100, player.getGeoIndex());
    if (price > 0)
    {
      player.reduceAdena(price, true);
    }
    player.teleToLocation(pos);
View Full Code Here

      player.sendPacket(SystemMessage2.removeItems(item, count));
    }
    final int x = Integer.parseInt(param[0]);
    final int y = Integer.parseInt(param[1]);
    final int z = Integer.parseInt(param[2]);
    final Location pos = Location.findPointToStay(x, y, z, 20, 70, player.getGeoIndex());
    player.teleToLocation(pos);
  }
View Full Code Here

      return;
    }
    final String var = player.getVar("DCBackCoords");
    if ((var == null) || var.isEmpty())
    {
      player.teleToLocation(new Location(43768, -48232, -800), 0);
      return;
    }
    player.teleToLocation(Location.parseLoc(var), 0);
    player.unsetVar("DCBackCoords");
  }
View Full Code Here

    }
    for (Player player : World.getAroundPlayers(actor, 200, 200))
    {
      if (player != null)
      {
        player.teleToLocation(new Location(207559, 86429, -1000));
      }
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of lineage2.gameserver.skills.AbnormalEffect

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.