Package lineage2.gameserver.network.serverpackets

Examples of lineage2.gameserver.network.serverpackets.ShowBoard


  {
    if (npcId != actor.getDisplayId())
    {
      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
        {
View Full Code Here


        effect.get(0).exit();
      }
      skill.getEffects(actor, player, false, false);
      if (animation)
      {
        actor.broadcastPacket(new MagicSkillUse(actor, player, skill.getId(), skill.getLevel(), skill.getHitTime(), 0));
      }
    }
  }
View Full Code Here

      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
        {
          player.setTarget(null);
          player.setTarget(actor);
          player.sendPacket(su);
View Full Code Here

   * Method updateEffectIconsImpl.
   */
  public void updateEffectIconsImpl()
  {
    Player owner = getPlayer();
    PartySpelled ps = new PartySpelled(this, true);
    Party party = owner.getParty();
    if (party != null)
    {
      party.broadCast(ps);
    }
View Full Code Here

   */
  @Override
  protected void onEvtDead(Creature killer)
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "BS02_D", 1, 0, actor.getLoc()));
    Functions.npcSay(actor, "A fatal error has occurred");
    Functions.npcSay(actor, "System is being shut down...");
    Functions.npcSay(actor, "......");
    try
    {
View Full Code Here

      String page = st.nextToken();
      html = HtmCache.getInstance().getNotNull("scripts/services/community/bbs_memo_edit.htm", player);
      html = html.replace("%page%", page);
      html = html.replace("%memo_id%", "0");
      html = html.replace("%TREE%", " > Create a record?");
      player.sendPacket(new ShowBoard(html, "1001", player));
      List<String> args = new ArrayList<>();
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("");
      args.add("0");
      args.add("");
      args.add("0");
      args.add("");
      args.add("");
      args.add("");
      args.add("1970-01-01 00:00:00 ");
      args.add("1970-01-01 00:00:00 ");
      args.add("0");
      args.add("0");
      args.add("");
      player.sendPacket(new ShowBoard(args));
      return;
    }
    else if ("mmread".equals(cmd))
    {
      int memoId = Integer.parseInt(st.nextToken());
      String page = st.nextToken();
      Connection con = null;
      PreparedStatement statement = null;
      ResultSet rset = null;
      try
      {
        con = DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("SELECT * FROM `bbs_memo` WHERE `account_name` = ? and memo_id = ?");
        statement.setString(1, player.getAccountName());
        statement.setInt(2, memoId);
        rset = statement.executeQuery();
        if (rset.next())
        {
          String post = HtmCache.getInstance().getNotNull("scripts/services/community/bbs_memo_read.htm", player);
          post = post.replace("%title%", rset.getString("title"));
          post = post.replace("%char_name%", rset.getString("char_name"));
          post = post.replace("%post_date%", String.format("%1$tY-%1$tm-%1$te %1$tH:%1tM:%1$tS", new Date(rset.getInt("post_date") * 1000L)));
          post = post.replace("%memo%", rset.getString("memo").replace("\n", "<br1>"));
          post = post.replace("%page%", page);
          post = post.replace("%memo_id%", String.valueOf(memoId));
          ShowBoard.separateAndSend(post, player);
          return;
        }
      }
      catch (Exception e)
      {
      }
      finally
      {
        DbUtils.closeQuietly(con, statement, rset);
      }
      onBypassCommand(player, "_bbsmemo");
      return;
    }
    else if ("mmdele".equals(cmd))
    {
      int memoId = Integer.parseInt(st.nextToken());
      Connection con = null;
      PreparedStatement statement = null;
      try
      {
        con = DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("DELETE FROM `bbs_memo` WHERE `account_name` = ? and memo_id = ?");
        statement.setString(1, player.getAccountName());
        statement.setInt(2, memoId);
        statement.execute();
      }
      catch (Exception e)
      {
      }
      finally
      {
        DbUtils.closeQuietly(con, statement);
      }
      onBypassCommand(player, "_mmlist_1");
      return;
    }
    else if ("mmmodi".equals(cmd))
    {
      int memoId = Integer.parseInt(st.nextToken());
      String page = st.nextToken();
      Connection con = null;
      PreparedStatement statement = null;
      ResultSet rset = null;
      try
      {
        con = DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("SELECT * FROM `bbs_memo` WHERE `account_name` = ? and memo_id = ?");
        statement.setString(1, player.getAccountName());
        statement.setInt(2, memoId);
        rset = statement.executeQuery();
        if (rset.next())
        {
          html = HtmCache.getInstance().getNotNull("scripts/services/community/bbs_memo_edit.htm", player);
          html = html.replace("%page%", page);
          html = html.replace("%memo_id%", String.valueOf(memoId));
          html = html.replace("%TREE%", "&nbsp;>&nbsp;<a action=\"bypass _mmread_" + memoId + "_" + page + "\">Note: " + rset.getString("title") + "</a>&nbsp;>&nbsp;Editing");
          player.sendPacket(new ShowBoard(html, "1001", player));
          List<String> args = new ArrayList<>();
          args.add("0");
          args.add("0");
          args.add(String.valueOf(memoId));
          args.add("0");
          args.add("0");
          args.add("0");
          args.add(player.getName());
          args.add("0");
          args.add(player.getAccountName());
          args.add("0");
          args.add(rset.getString("title"));
          args.add(rset.getString("title"));
          args.add(rset.getString("memo"));
          args.add(String.format("%1$tY-%1$tm-%1$te %1$tH:%1tM:%1$tS", new Date(rset.getInt("post_date") * 1000L)));
          args.add(String.format("%1$tY-%1$tm-%1$te %1$tH:%1tM:%1$tS", new Date(rset.getInt("post_date") * 1000L)));
          args.add("0");
          args.add("0");
          args.add("");
          player.sendPacket(new ShowBoard(args));
          return;
        }
      }
      catch (Exception e)
      {
View Full Code Here

      args.add("");
      args.add("");
      args.add("0");
      args.add("0");
      args.add("");
      player.sendPacket(new ShowBoard(html, "1001", player));
      player.sendPacket(new ShowBoard(args));
    }
    else if ("mailwritepledgeform".equals(cmd))
    {
      Clan clan = player.getClan();
      if ((clan == null) || (clan.getLevel() < 2) || !player.isClanLeader())
      {
        onBypassCommand(player, "_clbbsclan_" + player.getClanId());
        return;
      }
      String html = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_pledge_mail_write.htm", player);
      html = html.replace("%PLEDGE_ID%", String.valueOf(clan.getClanId()));
      html = html.replace("%pledge_id%", String.valueOf(clan.getClanId()));
      html = html.replace("%pledge_name%", clan.getName());
      ShowBoard.separateAndSend(html, player);
    }
    else if ("announcepledgewriteform".equals(cmd))
    {
      Clan clan = player.getClan();
      if ((clan == null) || (clan.getLevel() < 2) || !player.isClanLeader())
      {
        onBypassCommand(player, "_clbbsclan_" + player.getClanId());
        return;
      }
      HashMap<Integer, String> tpls = Util.parseTemplate(HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_clanannounce.htm", player));
      String html = tpls.get(0);
      html = html.replace("%PLEDGE_ID%", String.valueOf(clan.getClanId()));
      html = html.replace("%ACTION_ANN%", "");
      html = html.replace("%ACTION_FREE%", "");
      Connection con = null;
      PreparedStatement statement = null;
      ResultSet rset = null;
      String notice = "";
      int type = 0;
      try
      {
        con = DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("SELECT * FROM `bbs_clannotice` WHERE `clan_id` = ? and type != 2");
        statement.setInt(1, clan.getClanId());
        rset = statement.executeQuery();
        if (rset.next())
        {
          notice = rset.getString("notice");
          type = rset.getInt("type");
        }
      }
      catch (Exception e)
      {
      }
      finally
      {
        DbUtils.closeQuietly(con, statement, rset);
      }
      if (type == 0)
      {
        html = html.replace("<?usage?>", tpls.get(1));
      }
      else
      {
        html = html.replace("<?usage?>", tpls.get(2));
      }
      html = html.replace("%flag%", String.valueOf(type));
      List<String> args = new ArrayList<>();
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("0");
      args.add("");
      args.add("0");
      args.add("");
      args.add("0");
      args.add("");
      args.add("");
      args.add(notice);
      args.add("");
      args.add("");
      args.add("0");
      args.add("0");
      args.add("");
      player.sendPacket(new ShowBoard(html, "1001", player));
      player.sendPacket(new ShowBoard(args));
    }
    else if ("announcepledgeswitchshowflag".equals(cmd))
    {
      Clan clan = player.getClan();
      if ((clan == null) || (clan.getLevel() < 2) || !player.isClanLeader())
View Full Code Here

  {
    if (npcId != actor.getDisplayId())
    {
      actor.setDisplayId(npcId);
      DeleteObject d = new DeleteObject(actor);
      L2GameServerPacket su = new StatusUpdate(actor).addAttribute(StatusUpdateField.CUR_HP, StatusUpdateField.MAX_HP);
      for (Player player : World.getAroundPlayers(actor))
      {
        player.sendPacket(d, new NpcInfo(actor, player));
        if (player.getTarget() == actor)
        {
View Full Code Here

          break;
        case 30:
        case 20:
        case 10:
        case 5:
          Announcements.getInstance().announceToAll(new SystemMessage(SystemMessage.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECONDS__PLEASE_FIND_A_SAFE_PLACE_TO_LOG_OUT).addNumber(shutdownCounter));
          break;
        case 0:
          switch (shutdownMode)
          {
            case SHUTDOWN:
View Full Code Here

            spawnRoom(7);
            setReenterTime(System.currentTimeMillis());
            for(Player p : getPlayers())
            {
              p.sendPacket(new ExSendUIEvent(p, 1, 1, 0, 0));
              p.sendPacket(new SystemMessage(SystemMessage.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTES).addNumber(5));
            }
            startCollapseTimer(5 * 60 * 1000L);
            timeSpent = (int) (System.currentTimeMillis() - _savedTime) / 1000;
          }
        }, 10000L);
View Full Code Here

TOP

Related Classes of lineage2.gameserver.network.serverpackets.ShowBoard

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.