Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Player


    int obj_id = Util.GetCharIDbyName(actor);
    if(obj_id == 0)
    {
      return false;
    }
    L2Player plyr = L2World.getPlayer(actor);
    ThreadConnection con = null;
    FiltredPreparedStatement statement = null;
    if(plyr != null)
    {
      plyr.sendMessage(new CustomMessage("l2p.Util.AutoBan.ChatBan", actor).addString(GM).addNumber(period));
      plyr.updateNoChannel(NoChannel);
    }
    else
    {
      try
      {
View Full Code Here


  }

  public static boolean ChatUnBan(String actor, String GM)
  {
    boolean res = true;
    L2Player plyr = L2World.getPlayer(actor);
    int obj_id = Util.GetCharIDbyName(actor);
    if(obj_id == 0)
    {
      return false;
    }
    ThreadConnection con = null;
    FiltredPreparedStatement statement = null;
    if(plyr != null)
    {
      plyr.sendMessage(new CustomMessage("l2p.Util.AutoBan.ChatUnBan", actor).addString(GM));
      plyr.updateNoChannel(0);
    }
    else
    {
      try
      {
View Full Code Here

  @SuppressWarnings("unchecked")
  public static String export(String name)
  {
    StringBuilder e = new StringBuilder();
    // игрок должен быть оффлайн
    L2Player p = L2World.getPlayer(name);
    if(p != null)
    {
      return "";
    }
    ConcurrentHashMap<String, Object> cset = (ConcurrentHashMap<String, Object>) mysql.get("select * from characters where char_name LIKE '" + name + "'");
View Full Code Here

    L2Character actor;
    if(attacker == null || (actor = getActor()) == null || !actor.isDoor())
    {
      return;
    }
    L2Player player = attacker.getPlayer();
    if(player == null)
    {
      return;
    }
    L2Clan clan = player.getClan();
    Siege siege = SiegeManager.getSiege(actor, true);
    if(siege == null)
    {
      return;
    }
View Full Code Here

  @Override
  protected void onEvtAggression(L2Character attacker, int aggro)
  {
    L2Character actor;
    L2Player player;
    if(attacker == null || (player = attacker.getPlayer()) == null || (actor = getActor()) == null)
    {
      return;
    }
    if(actor.isArtefact())
    {
      L2Clan clan = player.getClan();
      if(clan == null || !clan.isDefender() || getSiege() != clan.getSiege())
      {
        ThreadPoolManager.getInstance().scheduleAi(new notifyGuard(player), 1000, false);
      }
    }
View Full Code Here

    @Override
    public void run()
    {
      L2Character actor;
      L2Player attacker = L2ObjectsStorage.getAsPlayer(_attacker);
      if(attacker == null || (actor = getActor()) == null)
      {
        return;
      }
      for(L2NpcInstance npc : actor.getAroundNpc(1500, 200))
      {
        if(npc.isSiegeGuard() && Rnd.chance(20))
        {
          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, _attacker, 5000);
        }
      }
      if(attacker.getCastingSkill() != null && attacker.getCastingSkill().getTargetType() == SkillTargetType.TARGET_HOLY)
      {
        ThreadPoolManager.getInstance().scheduleAi(this, 10000, false);
      }
    }
View Full Code Here

        {
          player.sendPacket(packet);
        }
        _knownPlayers.remove(player.getStoredId());
      }
      L2Player player;
      for(Long playerStoreId : _knownPlayers)
      {
        if((player = L2ObjectsStorage.getAsPlayer(playerStoreId)) != null)
        {
          actor.removeKnownPlayer(player);
View Full Code Here

  }

  @Override
  public boolean isAutoAttackable(L2Character attacker)
  {
    L2Player player = attacker.getPlayer();
    if(player == null)
    {
      return false;
    }
    if(player.getTerritorySiege() == -1 || player.getTerritorySiege() == _currentTerritoryId)
    {
      return false;
    }
    if(player.getClan() == null || player.getClan().getHasCastle() == 0 || player.getClan().getHasCastle() == _currentTerritoryId)
    {
      return false;
    }
    return true;
  }
View Full Code Here

    }
    if(Rnd.chance(95))
    {
      return;
    }
    L2Player player = attacker.getPlayer();
    if(player == null || player.getClan() == null || player.getClan().getHasCastle() == 0)
    {
      return;
    }
    if(player.getTerritorySiege() == _currentTerritoryId || player.getClan().getHasCastle() == _currentTerritoryId)
    {
      return;
    }
    if(player.isMounted())
    {
      return;
    }
    if(player.isTerritoryFlagEquipped())
    {
      return;
    }
    decayMe();
    L2ItemInstance item = ItemTable.getInstance().createItem(_itemId);
    item.setCustomFlags(L2ItemInstance.FLAG_EQUIP_ON_PICKUP | L2ItemInstance.FLAG_NO_DESTROY | L2ItemInstance.FLAG_NO_TRADE | L2ItemInstance.FLAG_NO_UNEQUIP, false);
    player.getInventory().addItem(item);
    player.getInventory().equipItem(item, false);
    player.sendChanges();
    _item = item;
    player.sendPacket(Msg.YOU_VE_ACQUIRED_THE_WARD_MOVE_QUICKLY_TO_YOUR_FORCES__OUTPOST);
    String terrName = CastleManager.getInstance().getCastleByIndex(_baseTerritoryId).getName();
    TerritorySiege.announceToPlayer(new SystemMessage(SystemMessage.THE_S1_WARD_HAS_BEEN_DESTROYED_C2_NOW_HAS_THE_TERRITORY_WARD).addString(terrName).addName(player), true);
  }
View Full Code Here

  }

  @Override
  public void onIntentionInteract(L2Object object)
  {
    L2Player actor = getActor();
    if(actor == null)
    {
      return;
    }
    if(actor.getSittingTask())
    {
      setNextAction(nextAction.INTERACT, object, null, false, false);
      return;
    }
    else if(actor.isSitting())
    {
      actor.sendPacket(Msg.YOU_CANNOT_MOVE_WHILE_SITTING);
      clientActionFailed();
      return;
    }
    super.onIntentionInteract(object);
  }
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.L2Player

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.