Package net.sf.l2j.gameserver.serverpackets

Examples of net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage


        htmlContent.append("</table><table width=\"270\" border=\"0\">");
        htmlContent.append("<tr><td>" + penaltyStr + "</td></tr>");
        htmlContent.append("</table></center>");
        htmlContent.append("</body></html>");

        NpcHtmlMessage penaltyHtml = new NpcHtmlMessage(0);
        penaltyHtml.setHtml(htmlContent.toString());
        activeChar.sendPacket(penaltyHtml);

        return true;
    }
View Full Code Here


    htmlContent.append("</table><br><button value=\"Refresh\" action=\"bypass -h admin_view_petitions\" width=\"50\" " +
                       "height=\"15\" back=\"sek.cbui94\" fore=\"sek.cbui92\"><br><button value=\"Back\" action=\"bypass -h admin_admin\" " +
    "width=\"40\" height=\"15\" back=\"sek.cbui94\" fore=\"sek.cbui92\"></center></body></html>");

    NpcHtmlMessage htmlMsg = new NpcHtmlMessage(0);
    htmlMsg.setHtml(htmlContent.toString());
    activeChar.sendPacket(htmlMsg);
  }
View Full Code Here

    "width=\"50\" height=\"15\" back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>");
    htmlContent.append("<button value=\"Back\" action=\"bypass -h admin_view_petitions\" width=\"40\" height=\"15\" back=\"sek.cbui94\" " +
    "fore=\"sek.cbui92\"></center>");
    htmlContent.append("</body></html>");

    NpcHtmlMessage htmlMsg = new NpcHtmlMessage(0);
    htmlMsg.setHtml(htmlContent.toString());
    activeChar.sendPacket(htmlMsg);
  }
View Full Code Here

      activeChar.sendPacket(new RadarControl(0, 1, 51995, -51265, -3104));
    }

    if (content == null)
    {
      NpcHtmlMessage html = new NpcHtmlMessage(1);
      html.setHtml("<html><body>My Text is missing:<br>"+filename+"</body></html>");
      activeChar.sendPacket(html);
    }
    else
    {
      NpcHtmlMessage itemReply = new NpcHtmlMessage(5);
      itemReply.setHtml(content);
      activeChar.sendPacket(itemReply);
    }

    activeChar.sendPacket( new ActionFailed() );
  }
View Full Code Here

    {
        if (command.equalsIgnoreCase("stats"))
        {
            L2PcInstance pc = L2World.getInstance().getPlayer(target);
            if(pc!=null){
                NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

                TextBuilder replyMSG = new TextBuilder("<html><body>");

                replyMSG.append("<center><font color=\"LEVEL\">[ L2J EVENT ENGINE ]</font></center><br>");
                replyMSG.append("<br>Statistics for player <font color=\"LEVEL\">" + pc.getName() + "</font><br>");
                replyMSG.append("Total kills <font color=\"FF0000\">" + pc.kills.size() + "</font><br>");
                replyMSG.append("<br>Detailed list: <br>");
                Iterator<String> it = pc.kills.iterator();
                while(it.hasNext()){
                    replyMSG.append("<font color=\"FF0000\">" + it.next() + "</font><br>");
                }
                replyMSG.append("</body></html>");

                adminReply.setHtml(replyMSG.toString());
                activeChar.sendPacket(adminReply);
            }


        }
View Full Code Here

  }

  public void listAnnouncements(L2PcInstance activeChar)
  {
        String content = HtmCache.getInstance().getHtmForce("data/html/admin/announce.htm");
        NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
        adminReply.setHtml(content);
        TextBuilder replyMSG = new TextBuilder("<br>");
    for (int i = 0; i < _announcements.size(); i++)
    {
      replyMSG.append("<table width=260><tr><td width=220>" + _announcements.get(i) + "</td><td width=40>");
      replyMSG.append("<button value=\"Delete\" action=\"bypass -h admin_del_announcement " + i + "\" width=60 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr></table>");
    }
        adminReply.replace("%announces%", replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

      }
      else
      {
        if (CastleManorManager.getInstance().isDisabled())
        {
          NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
          html.setFile("data/html/npcdefault.htm");
          html.replace("%objectId%", String.valueOf(getObjectId()));
          html.replace("%npcname%", getName());
          player.sendPacket(html);
        }
        else
        {
          showMessageWindow(player, 0);
View Full Code Here

  @Override
  public void onBypassFeedback(L2PcInstance player, String command)
  {
    if (CastleManorManager.getInstance().isDisabled())
    {
      NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
      html.setFile("data/html/npcdefault.htm");
      html.replace("%objectId%", String.valueOf(getObjectId()));
      html.replace("%npcname%", getName());
      player.sendPacket(html);
      return;
    }

    int condition = validateCondition(player);
View Full Code Here

        else
          filename = "data/html/castleblacksmith/castleblacksmith-" + val + ".htm";
      }
    }

    NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
    html.setFile(filename);
    html.replace("%objectId%", String.valueOf(getObjectId()));
    html.replace("%npcname%", getName());
    html.replace("%castleid%", Integer.toString(getCastle().getCastleId()));
    player.sendPacket(html);
  }
View Full Code Here

      String htmContent = HtmCache.getInstance().getHtm(htmFile);

        if (htmContent != null)
        {
          int[] teamsPlayerCounts = TvTEvent.getTeamsPlayerCounts();
          NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());

        npcHtmlMessage.setHtml(htmContent);
          npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
        npcHtmlMessage.replace("%team1name%", Config.TVT_EVENT_TEAM_1_NAME);
        npcHtmlMessage.replace("%team1playercount%", String.valueOf(teamsPlayerCounts[0]));
        npcHtmlMessage.replace("%team2name%", Config.TVT_EVENT_TEAM_2_NAME);
        npcHtmlMessage.replace("%team2playercount%", String.valueOf(teamsPlayerCounts[1]));
          playerInstance.sendPacket(npcHtmlMessage);
        }
    }
    else if (TvTEvent.isStarting() || TvTEvent.isStarted())
    {
      String htmFile = "data/html/mods/TvTEventStatus.htm";
      String htmContent = HtmCache.getInstance().getHtm(htmFile);

        if (htmContent != null)
        {
          int[] teamsPlayerCounts = TvTEvent.getTeamsPlayerCounts();
          int[] teamsPointsCounts = TvTEvent.getTeamsPoints();
          NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());

        npcHtmlMessage.setHtml(htmContent);
          //npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
        npcHtmlMessage.replace("%team1name%", Config.TVT_EVENT_TEAM_1_NAME);
        npcHtmlMessage.replace("%team1playercount%", String.valueOf(teamsPlayerCounts[0]));
        npcHtmlMessage.replace("%team1points%", String.valueOf(teamsPointsCounts[0]));
        npcHtmlMessage.replace("%team2name%", Config.TVT_EVENT_TEAM_2_NAME);
        npcHtmlMessage.replace("%team2playercount%", String.valueOf(teamsPlayerCounts[1]));
        npcHtmlMessage.replace("%team2points%", String.valueOf(teamsPointsCounts[1])); // <---- array index from 0 to 1 thx DaRkRaGe
          playerInstance.sendPacket(npcHtmlMessage);
        }
    }

    playerInstance.sendPacket(new ActionFailed());
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage

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.