Package com.l2jfrozen.gameserver.network.serverpackets

Examples of com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage


    tb.append("<tr><td><edit var=\"name\" width=120 height=15></td><td><button value=\"Create\" action=\"bypass -h npc_%objectId%_createscheme $name\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    tb.append("<td><button value=\"Back\" action=\"bypass -h npc_%objectId%_menu\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr></table>");
    tb.append("<br>Max schemes per player: "+String.valueOf(Config.NPCBUFFER_MAX_SCHEMES)+"<br>");
    tb.append("</body></html>");
   
    NpcHtmlMessage html = new NpcHtmlMessage(1);
    html.setHtml(tb.toString());
    sendHtmlMessage(player, html);
  }
View Full Code Here


   * @param scheme_key
   */
 
  private void showEditSchemeWindow(L2PcInstance player, String skill_group, String scheme_key)
  {
    NpcHtmlMessage html = new NpcHtmlMessage(1);
    html.setFile(PARENT_DIR+"schememenu.htm");
    html.replace("%typesframe%", getTypesFrame(scheme_key));
   
    if (skill_group.equalsIgnoreCase("unselected"))
    {
      html.replace("%schemelistframe%", getPlayerSchemeListFrame(player, skill_group, scheme_key));
      html.replace("%skilllistframe%", getGroupSkillListFrame(player, null, null));     
      html.replace("%myschemeframe%", getPlayerSkillListFrame(player, null, null));
    }
    else
    {
      html.replace("%schemelistframe%", getPlayerSchemeListFrame(player, skill_group, scheme_key));
      html.replace("%skilllistframe%", getGroupSkillListFrame(player, skill_group, scheme_key));     
      html.replace("%myschemeframe%", getPlayerSkillListFrame(player, skill_group, scheme_key));
    }
    sendHtmlMessage(player, html);
  }
View Full Code Here

  }
 
 
  private void showMessageWindow(L2PcInstance player)
    {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Buffer</title><body><center>");

        if (player.isSitting())
        {
          player.sendMessage("You can't use buffer while you're sitting.");
            strBuffer.append("Stand up, <font color=\"LEVEL\">%charname%</font>!<br>");
            strBuffer.append("How dare you to talk with me while you're sitting?!<br>");
        }
        else if (player.isAlikeDead())
        {
          player.sendMessage("You can't use buffer while you're dead or using fake death.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, you're dead.<br>");
            strBuffer.append("I can't offer any support effect for dead people...<br>");
        }
        else if (player.isInCombat())
        {
          player.sendMessage("You can't use buffer while you're in combat.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, I can't serve you.<br>");
            strBuffer.append("Came back when you will not be in a combat.<br>");
        }
        else
        {
          strBuffer.append("Welcome, <font color=\"LEVEL\">%charname%</font>!<br>");
         strBuffer.append("Here is the list of all available buffs:<br>");
       strBuffer.append("<img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>");
       strBuffer.append("<table width=300>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1204 2\">Wind Walk</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1040 3\">Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1243 6\">Bless Shield</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1068 3\">Might</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1036 2\">Magic Barrier</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1259 4\">Resist Shock</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1035 4\">Mental Shield</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1045 6\">Blessed Body</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1304 3\">Advanced Block</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1048 6\">Blessed Soul</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1062 2\">Berserker Spirit</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1189 3\">Resist Wind</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1086 2\">Haste</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1240 3\">Guidance</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1393 3\">Unholy Resistance</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1242 3\">Death Whisper</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1077 3\">Focus</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1033 3\">Resist Poison</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1268 4\">Vampiric Rage</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1087 3\">Agility</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1191 3\">Resist Fire</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1085 3\">Acumen</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1059 3\">Empower</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1182 3\">Resist Aqua</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1303 2\">Wild Magic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 1078 6\">Concentration</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1352 1\">Elemental Protection</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1353 1\">Divine Protection</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1397 3\">Clarity</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1392 3\">Holy Resistance</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 1043 1\">Holy Weapon</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1032 3\">Invigor</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1044 3\">Regeneration</a></td></tr>");
       strBuffer.append("<tr><td></td></tr>");
       strBuffer.append("<tr><td><font color=\"ff9900\">Dances:</font></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 275 1\">Fury</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 273 1\">Mystic</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 365 1\">Siren's</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 274 1\">Fire</a></td>  <td><a action=\"bypass -h npc_%objectId%_getbuff 276 1\">Concentration</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 310 1\">Vampire</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 271 1\">Warrior</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 277 1\">Light</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 272 1\">Inspiration</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 311 1\">Protection</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 309 1\">Earth Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 307 1\">Aqua Guard</a></td></tr>");
       strBuffer.append("<tr><td></td></tr>");
       strBuffer.append("<tr><td><font color=\"ff9900\">Songs:</font></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 264 1\">Earth</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 269 1\">Hunter</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 270 1\">Invocation</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 266 1\">Water</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 267 1\">Warding</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 304 1\">Vitality</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 268 1\">Wind</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 364 1\">Champion</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 349 1\">Renewal</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 265 1\">Life</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 363 1\">Meditation</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 305 1\">Vengeance</a></td></tr>");
       strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 308 1\">Storm Guard</a></td> <td><a action=\"bypass -h npc_%objectId%_getbuff 306 1\">Flame Guard</a></td></tr>");
       strBuffer.append("<tr><td></td></tr>");
       strBuffer.append("<tr><td><font color=\"ff9900\">Other:</font></td></tr>");
           strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_cancel\"><font color=\"ffffff\">Cancel</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1388 3\">Greater Might</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1389 3\">Greater Shield</a></td></tr>");
           strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_restore\"><font color=\"ffffff\">Restore</font></a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1363 1\">Chant of Victory</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1356 1\">Prophecy of Fire</a></td></tr>");
           strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 4699 13\">Bless of Queen</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1355 1\">Prophecy of Water</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 1357 1\">Prophecy of Wind</a></td></tr>");
           strBuffer.append("<tr><td><a action=\"bypass -h npc_%objectId%_getbuff 4700 13\">Gift of Queen</a></td><td><a action=\"bypass -h npc_%objectId%_getbuff 4703 13\">Gift of Seraphim</a></td></tr>");
       strBuffer.append("<tr><td></td></tr>");
       strBuffer.append("<tr><td></td></tr>");
       strBuffer.append("<tr><td></td></tr>");
       strBuffer.append("<tr><td></td><td></td><td></td></tr>");
       strBuffer.append("<tr><td></td><td></td><td></td></tr>");
       strBuffer.append("</table><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" width=300 height=32 align=left>");
         }
     strBuffer.append("</center></body></html>");
     html.setHtml(strBuffer.toString());
     html.replace("%objectId%", String.valueOf(getObjectId()));
     html.replace("%charname%", player.getName());
     player.sendPacket(html);
     }
View Full Code Here

     player.sendPacket(html);
     }
 
  private void showMainMenu(L2PcInstance player)
    {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        final StringBuilder strBuffer = StringUtil.startAppend(3500, "<html><title>Npc Buffer</title><body><center>");

        if (player.isSitting())
        {
          player.sendMessage("You can't use buffer while you're sitting.");
            strBuffer.append("Stand up, <font color=\"LEVEL\">%charname%</font>!<br>");
            strBuffer.append("How dare you to talk with me while you're sitting?!<br>");
        }
        else if (player.isAlikeDead())
        {
          player.sendMessage("You can't use buffer while you're dead or using fake death.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, you're dead.<br>");
            strBuffer.append("I can't offer any support effect for dead people...<br>");
        }
        else if (player.isInCombat())
        {
          player.sendMessage("You can't use buffer while you're in combat.");
            strBuffer.append("Sadly, <font color=\"LEVEL\">%charname%</font>, I can't serve you.<br>");
            strBuffer.append("Came back when you will not be in a combat.<br>");
        }
        else
        {
        strBuffer.append("<html>");
        strBuffer.append("<body>");
        strBuffer.append("<br>");
        strBuffer.append("<center><img src=\"preciousTex.logo2\" width=252 height=128></center>");
        strBuffer.append("<br>");
        strBuffer.append("<tr><td></td></tr>");
        strBuffer.append("<center> <table><tr>"
        + "<td><button value=\"Fighter\" action=\"bypass -h custom_dobuff fighterbuff\" width=75 height=21 back=\"L2UI_CH3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td> "
        + "<td><button value=\"Mage\" action=\"bypass -h custom_dobuff magebuff\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td>"
        + "</tr></table></center>");
        strBuffer.append("<br>");
        strBuffer.append("<br>");
        strBuffer.append("<center><button value=\"Scheme\" action=\"bypass -h npc_" + getObjectId() + "_schemebuff\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
        strBuffer.append("<br>");
           strBuffer.append("<center><button value=\"Buffer\" action=\"bypass -h npc_" + getObjectId() + "_aiobuff\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
        strBuffer.append("<br>");
           strBuffer.append("<center><button value=\"Restore\" action=\"bypass -h npc_" + getObjectId() + "_restore\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
        strBuffer.append("<br>");
           strBuffer.append("<center><button value=\"Cancel\" action=\"bypass -h npc_" + getObjectId() + "_cancel\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></center>");
        strBuffer.append("<br><br><br><br>");
        strBuffer.append("</body>");
        strBuffer.append("</html>");
         }
     strBuffer.append("</center></body></html>");
     html.setHtml(strBuffer.toString());
     html.replace("%objectId%", String.valueOf(getObjectId()));
     html.replace("%charname%", player.getName());
     player.sendPacket(html);
     }
View Full Code Here

    {
      String Welcome_Path = "data/html/welcome.htm";
      File mainText = new File(Config.DATAPACK_ROOT, Welcome_Path);
      if (mainText.exists())
      {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        html.setFile(Welcome_Path);
        html.replace("%name%", activeChar.getName());
        sendPacket(html);
      }
    }

    if ((activeChar.getClan() != null) && activeChar.getClan().isNoticeEnabled())
    {
      String clanNotice = "data/html/clanNotice.htm";
      File mainText = new File(Config.DATAPACK_ROOT, clanNotice);
      if (mainText.exists())
      {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        html.setFile(clanNotice);
        html.replace("%clan_name%", activeChar.getClan().getName());
        html.replace("%notice_text%", activeChar.getClan().getNotice().replaceAll("\r\n", "<br>"));
        sendPacket(html);
      }
    }

    if (Config.PM_MESSAGE_ON_START)
View Full Code Here

    return ADMIN_COMMANDS;
  }

  public void showMainPage(L2PcInstance activeChar)
  {
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    TextBuilder replyMSG = new TextBuilder("<html><title>Team vs Team</title><body>");

    replyMSG.append("<center><font color=\"LEVEL\">[TvT Engine]</font></center><br><br><br>");
    replyMSG.append("<table><tr><td><edit var=\"input1\" width=\"125\"></td><td><edit var=\"input2\" width=\"125\"></td></tr></table>");
    replyMSG.append("<table border=\"0\"><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Name\" action=\"bypass -h admin_tvt_name $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Description\" action=\"bypass -h admin_tvt_desc $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Join Location\" action=\"bypass -h admin_tvt_join_loc $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Max lvl\" action=\"bypass -h admin_tvt_maxlvl $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Min lvl\" action=\"bypass -h admin_tvt_minlvl $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Max players\" action=\"bypass -h admin_tvt_maxplayers $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Min players\" action=\"bypass -h admin_tvt_minplayers $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"NPC\" action=\"bypass -h admin_tvt_npc $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"NPC Pos\" action=\"bypass -h admin_tvt_npc_pos\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Reward\" action=\"bypass -h admin_tvt_reward $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Reward Amount\" action=\"bypass -h admin_tvt_reward_amount $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Join Time\" action=\"bypass -h admin_tvt_jointime $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Event Time\" action=\"bypass -h admin_tvt_eventtime $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Interval Time\" action=\"bypass -h admin_tvt_interval $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Team Add\" action=\"bypass -h admin_tvt_team_add $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Team Color\" action=\"bypass -h admin_tvt_team_color $input1 $input2\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Team Pos\" action=\"bypass -h admin_tvt_team_pos $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Team Remove\" action=\"bypass -h admin_tvt_team_remove $input1\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Join\" action=\"bypass -h admin_tvt_join\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Teleport\" action=\"bypass -h admin_tvt_teleport\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Start\" action=\"bypass -h admin_tvt_start\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><table><tr>");
    replyMSG.append("</tr></table><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"StartEventOnceTime\" action=\"bypass -h admin_tvt_startevent\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Abort\" action=\"bypass -h admin_tvt_abort\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Finish\" action=\"bypass -h admin_tvt_finish\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Sit Force\" action=\"bypass -h admin_tvt_sit\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Dump\" action=\"bypass -h admin_tvt_dump\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><br><table><tr>");
    replyMSG.append("<td width=\"100\"><button value=\"Save\" action=\"bypass -h admin_tvt_save\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Load\" action=\"bypass -h admin_tvt_load\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("<td width=\"100\"><button value=\"Auto Event\" action=\"bypass -h admin_tvt_autoevent\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table><br><br>");
    replyMSG.append("Current event:<br1>");
    replyMSG.append("Name:&nbsp;<font color=\"00FF00\">" + TvT.get_eventName() + "</font><br1>");
    replyMSG.append("Description:&nbsp;<font color=\"00FF00\">" + TvT.get_eventDesc() + "</font><br1>");
    replyMSG.append("Joining location name:&nbsp;<font color=\"00FF00\">" + TvT.get_joiningLocationName() + "</font><br1>");
   
    Location npc_loc = TvT.get_npcLocation();
   
    replyMSG.append("Joining NPC ID:&nbsp;<font color=\"00FF00\">" + TvT.get_npcId()+ " on pos " + npc_loc._x + "," + npc_loc._y + "," + npc_loc._z + "</font><br1>");
    replyMSG.append("Reward ID:&nbsp;<font color=\"00FF00\">" + TvT.get_rewardId() + "</font><br1>");
    replyMSG.append("Reward Amount:&nbsp;<font color=\"00FF00\">" + TvT.get_rewardAmount() + "</font><br><br>");
    replyMSG.append("Min lvl:&nbsp;<font color=\"00FF00\">" + TvT.get_minlvl() + "</font><br>");
    replyMSG.append("Max lvl:&nbsp;<font color=\"00FF00\">" + TvT.get_maxlvl() + "</font><br><br>");
    replyMSG.append("Min Players:&nbsp;<font color=\"00FF00\">" + TvT.get_minPlayers() + "</font><br>");
    replyMSG.append("Max Players:&nbsp;<font color=\"00FF00\">" + TvT.get_maxPlayers() + "</font><br><br>");
    replyMSG.append("Joining Time:&nbsp;<font color=\"00FF00\">" + TvT.get_joinTime() + "</font><br>");
    replyMSG.append("Event Timer:&nbsp;<font color=\"00FF00\">" + TvT.get_eventTime() + "</font><br><br>");
    replyMSG.append("Interval Time:&nbsp;<font color=\"00FF00\">" + TvT.get_intervalBetweenMatchs() + "</font><br><br>");
    replyMSG.append("Current teams:<br1>");
    replyMSG.append("<center><table border=\"0\">");

    for(String team : TvT._teams)
    {
      replyMSG.append("<tr><td width=\"100\"><font color=\"LEVEL\">" + team + "</font>");

      if(Config.TVT_EVEN_TEAMS.equals("NO") || Config.TVT_EVEN_TEAMS.equals("BALANCE"))
        replyMSG.append("&nbsp;(" + TvT.teamPlayersCount(team) + " joined)");
      else if(Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))
      {
        if(TvT.is_teleport() || TvT.is_started())
          replyMSG.append("&nbsp;(" + TvT.teamPlayersCount(team) + " in)");
      }

      replyMSG.append("</td></tr><tr><td>");
      replyMSG.append(TvT._teamColors.get(TvT._teams.indexOf(team)));
      replyMSG.append("</td></tr><tr><td>");
      replyMSG.append(TvT._teamsX.get(TvT._teams.indexOf(team)) + ", " + TvT._teamsY.get(TvT._teams.indexOf(team)) + ", " + TvT._teamsZ.get(TvT._teams.indexOf(team)));
      replyMSG.append("</td></tr><tr><td width=\"60\"><button value=\"Remove\" action=\"bypass -h admin_tvt_team_remove " + team
          + "\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
    }

    replyMSG.append("</table></center>");

    if(Config.TVT_EVEN_TEAMS.equals("SHUFFLE"))
    {
      if(!TvT.is_started())
      {
        replyMSG.append("<br1>");
        replyMSG.append(TvT._playersShuffle.size() + " players participating. Waiting to shuffle in teams(done on teleport)!");
        replyMSG.append("<br><br>");
      }
    }

    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    return ADMIN_COMMANDS;
  }

  private void sendHtmlForm(L2PcInstance activeChar)
  {
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

    int t = GameTimeController.getInstance().getGameTime();
    int h = t / 60;
    int m = t % 60;

    SimpleDateFormat format = new SimpleDateFormat("h:mm a");
    Calendar cal = Calendar.getInstance();
    cal.set(Calendar.HOUR_OF_DAY, h);
    cal.set(Calendar.MINUTE, m);
    adminReply.setFile("data/html/admin/shutdown.htm");
    adminReply.replace("%count%", String.valueOf(L2World.getAllPlayersCount()));
    adminReply.replace("%used%", String.valueOf(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()));
    adminReply.replace("%xp%", String.valueOf(Config.RATE_XP));
    adminReply.replace("%sp%", String.valueOf(Config.RATE_SP));
    adminReply.replace("%adena%", String.valueOf(Config.RATE_DROP_ADENA));
    adminReply.replace("%drop%", String.valueOf(Config.RATE_DROP_ITEMS));
    adminReply.replace("%time%", String.valueOf(format.format(cal.getTime())));
    activeChar.sendPacket(adminReply);

    adminReply = null;
    format = null;
    cal = null;
View Full Code Here

    return s;
  }*/

  private void showMainPage(L2PcInstance activeChar)
  {
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    TextBuilder replyMSG = new TextBuilder("<html><body>");

    replyMSG.append("<center><font color=\"LEVEL\"> [Manor System] </font></center><br>");
    replyMSG.append("<table width=\"100%\"><tr><td>");
    replyMSG.append("Disabled: " + (CastleManorManager.getInstance().isDisabled() ? "yes" : "no") + "</td><td>");
    replyMSG.append("Under Maintenance: " + (CastleManorManager.getInstance().isUnderMaintenance() ? "yes" : "no") + "</td></tr><tr><td>");
    replyMSG.append("<tr><td>Approved: " + (CastleManorManager.APPROVE == 1 ? "yes" : "no") + "</td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<center><table><tr><td>");
    replyMSG.append("<button value=\"" + (CastleManorManager.getInstance().isDisabled() ? "Enable" : "Disable") + "\" action=\"bypass -h admin_manor_disable\" width=110 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr><tr><td>");
    replyMSG.append("<button value=\"Refresh\" action=\"bypass -h admin_manor\" width=110 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td>");
    replyMSG.append("<button value=\"Back\" action=\"bypass -h admin_admin\" width=110 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>");
    replyMSG.append("</table></center>");
    replyMSG.append("<br><center>Castle Information:<table width=\"100%\">");
    replyMSG.append("<tr><td></td><td>Current Period</td><td>Next Period</td></tr>");

    for(Castle c : CastleManager.getInstance().getCastles())
    {
      replyMSG.append("<tr><td>" + c.getName() + "</td><td>" + c.getManorCost(CastleManorManager.PERIOD_CURRENT) + "a</td>" + "<td>" + c.getManorCost(CastleManorManager.PERIOD_NEXT) + "a</td></tr>");
    }

    replyMSG.append("</table><br>");
    replyMSG.append("</body></html>");

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

    adminReply = null;
    replyMSG = null;
  }
View Full Code Here

    }
  }

  public void showHtmlFile(L2PcInstance player, String file)
  {
    NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
    html.setFile("data/html/SepulcherNpc/" + file);
    html.replace("%npcname%", getName());
    player.sendPacket(html);
  }
View Full Code Here

  /**
   * @param activeChar
   */
  private void mainMenu(L2PcInstance activeChar)
  {
    NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId());
    TextBuilder sb = new TextBuilder();
    sb.append("<html><body><font color=\"009900\">Editing Walkers</font><br>");
    sb.append("<br>");
    sb.append("Is chosen NPCID: " + _npcid + "<br>");
    sb.append("Number of the current point: " + _point + "<br>");
    sb.append("<edit var=\"id\" width=80 height=15><br>");
    sb.append("<button value=\"New NPC\" action=\"bypass -h admin_walker_setnpc $id\" width=80 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>");
    sb.append("<button value=\"To establish a point\" action=\"bypass -h admin_walker_addpoint width=80 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"><br>");
    sb.append("</body></html>");
    html.setHtml(sb.toString());
    activeChar.sendPacket(html);
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.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.