Package l2p.gameserver.serverpackets

Examples of l2p.gameserver.serverpackets.NpcHtmlMessage


    else
    {
      activeChar.sendPacket(Msg.INVALID_TARGET);
      return;
    }
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    StringBuffer replyMSG = new StringBuffer("<html><title>Teleport Character</title>");
    replyMSG.append("<body>");
    replyMSG.append("The character you will teleport is " + player.getName() + ".");
    replyMSG.append("<br>");
    replyMSG.append("Co-ordinate x");
    replyMSG.append("<edit var=\"char_cord_x\" width=110>");
    replyMSG.append("Co-ordinate y");
    replyMSG.append("<edit var=\"char_cord_y\" width=110>");
    replyMSG.append("Co-ordinate z");
    replyMSG.append("<edit var=\"char_cord_z\" width=110>");
    replyMSG.append("<button value=\"Teleport\" action=\"bypass -h admin_teleport_character $char_cord_x $char_cord_y $char_cord_z\" width=60 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\">");
    replyMSG.append("<button value=\"Teleport near you\" action=\"bypass -h admin_teleport_character " + activeChar.getX() + " " + activeChar.getY() + " " + activeChar.getZ() + "\" width=115 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\">");
    replyMSG.append("<center><button value=\"Back\" action=\"bypass -h admin_current_player\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></center>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here


        {
          activeChar.sendMessage("Please specify buylist.");
        }
        break;
      case admin_gmshop:
        activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/gmshops.htm"));
        break;
      case admin_tax:
        activeChar.sendMessage("TaxSum: " + Stat.getTaxSum());
        break;
      case admin_taxclear:
View Full Code Here

    int CharactersEnd = players.size();
    if(CharactersEnd - CharactersStart > MaxCharactersPerPage)
    {
      CharactersEnd = CharactersStart + MaxCharactersPerPage;
    }
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=260><tr>");
    replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=180><center>Character Selection Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<br><br>");
    replyMSG.append("<table width=270>");
    replyMSG.append("<tr><td width=270>You can find a character by writing his name and</td></tr>");
    replyMSG.append("<tr><td width=270>clicking Find bellow.<br></td></tr>");
    replyMSG.append("<tr><td width=270>Note: Names should be written case sensitive.</td></tr>");
    replyMSG.append("</table><br>");
    replyMSG.append("<center><table><tr><td>");
    replyMSG.append("<edit var=\"character_name\" width=80></td><td><button value=\"Find\" action=\"bypass -h admin_find_character $character_name\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\">");
    replyMSG.append("</td></tr></table></center><br><br>");
    for(int x = 0; x < MaxPages; x++)
    {
      int pagenr = x + 1;
      replyMSG.append("<center><a action=\"bypass -h admin_show_characters " + x + "\">Page " + pagenr + "</a></center>");
    }
    replyMSG.append("<br>");
    // List Players in a Table
    replyMSG.append("<table width=270>");
    replyMSG.append("<tr><td width=80>Name:</td><td width=110>Class:</td><td width=40>Level:</td></tr>");
    for(int i = CharactersStart; i < CharactersEnd; i++)
    {
      L2Player p = players.get(i);
      replyMSG.append("<tr><td width=80>" + "<a action=\"bypass -h admin_character_list " + p.getName() + "\">" + p.getName() + "</a></td><td width=110>" + p.getTemplate().className + "</td><td width=40>" + p.getLevel() + "</td></tr>");
    }
    replyMSG.append("</table>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

      clanName = player.getClan().getName() + "/" + player.getClan().getLevel();
    }
    NumberFormat df = NumberFormat.getNumberInstance(Locale.ENGLISH);
    df.setMaximumFractionDigits(4);
    df.setMinimumFractionDigits(1);
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=260><tr>");
    replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=180><center>Character Selection Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_show_characters 0\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table><br>");
    replyMSG.append("<table width=270>");
    replyMSG.append("<tr><td width=100>Account/IP:</td><td>" + player.getAccountName() + "/" + player.getIP() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Name/Level:</td><td>" + player.getName() + "/" + player.getLevel() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Class/Id:</td><td>" + player.getTemplate().className + "/" + player.getClassId().getId() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Clan/Level:</td><td>" + clanName + "</td></tr>");
    replyMSG.append("<tr><td width=100>Exp/Sp:</td><td>" + player.getExp() + "/" + player.getSp() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Cur/Max Hp:</td><td>" + (int) player.getCurrentHp() + "/" + player.getMaxHp() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Cur/Max Mp:</td><td>" + (int) player.getCurrentMp() + "/" + player.getMaxMp() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Cur/Max Load:</td><td>" + player.getCurrentLoad() + "/" + player.getMaxLoad() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Patk/Matk:</td><td>" + player.getPAtk(null) + "/" + player.getMAtk(null, null) + "</td></tr>");
    replyMSG.append("<tr><td width=100>Pdef/Mdef:</td><td>" + player.getPDef(null) + "/" + player.getMDef(null, null) + "</td></tr>");
    replyMSG.append("<tr><td width=100>PAtkSpd/MAtkSpd:</td><td>" + player.getPAtkSpd() + "/" + player.getMAtkSpd() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Acc/Evas:</td><td>" + player.getAccuracy() + "/" + player.getEvasionRate(null) + "</td></tr>");
    replyMSG.append("<tr><td width=100>Crit/MCrit:</td><td>" + player.getCriticalHit(null, null) + "/" + df.format(player.getMagicCriticalRate(null, null)) + "%</td></tr>");
    replyMSG.append("<tr><td width=100>Walk/Run:</td><td>" + player.getWalkSpeed() + "/" + player.getRunSpeed() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Karma/Fame:</td><td>" + player.getKarma() + "/" + player.getFame() + "</td></tr>");
    replyMSG.append("<tr><td width=100>PvP/PK:</td><td>" + player.getPvpKills() + "/" + player.getPkKills() + "</td></tr>");
    replyMSG.append("<tr><td width=100>Coordinates:</td><td>" + player.getX() + "," + player.getY() + "," + player.getZ() + "</td></tr>");
    replyMSG.append("</table><br>");
    replyMSG.append("<table<tr>");
    replyMSG.append("<td><button value=\"Skills\" action=\"bypass -h admin_show_skills\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Effects\" action=\"bypass -h admin_show_effects\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Actions\" action=\"bypass -h admin_character_actions\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr><tr>");
    replyMSG.append("<td><button value=\"Stats\" action=\"bypass -h admin_edit_character\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Exp & Sp\" action=\"bypass -h admin_add_exp_sp_to_character\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td></td>");
    replyMSG.append("</tr></table></body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    {
      activeChar.sendPacket(Msg.SELECT_TARGET);
      return;
    }
    L2Player player = (L2Player) target;
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=260><tr>");
    replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=180><center>Character Selection Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_current_player\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<br><br>");
    replyMSG.append("<center>Editing character: " + player.getName() + "</center><br>");
    replyMSG.append("<table width=250>");
    replyMSG.append("<tr><td width=40></td><td width=70>Curent:</td><td width=70>Max:</td><td width=70></td></tr>");
    replyMSG.append("<tr><td width=40>HP:</td><td width=70>" + player.getCurrentHp() + "</td><td width=70>" + player.getMaxHp() + "</td><td width=70>Karma: " + player.getKarma() + "</td></tr>");
    replyMSG.append("<tr><td width=40>MP:</td><td width=70>" + player.getCurrentMp() + "</td><td width=70>" + player.getMaxMp() + "</td><td width=70>Pvp Kills: " + player.getPvpKills() + "</td></tr>");
    replyMSG.append("<tr><td width=40>Load:</td><td width=70>" + player.getCurrentLoad() + "</td><td width=70>" + player.getMaxLoad() + "</td><td width=70>Pvp Flag: " + player.getPvpFlag() + "</td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<table width=270><tr><td>Class<?> Template Id: " + player.getClassId() + "/" + player.getClassId().getId() + "</td></tr></table><br>");
    replyMSG.append("<table width=270>");
    replyMSG.append("<tr><td>Note: Fill all values before saving the modifications.</td></tr>");
    replyMSG.append("</table><br>");
    replyMSG.append("<table width=270>");
    replyMSG.append("<tr><td width=50>Hp:</td><td><edit var=\"hp\" width=50></td><td width=50>Mp:</td><td><edit var=\"mp\" width=50></td></tr>");
    replyMSG.append("<tr><td width=50>Pvp Flag:</td><td><edit var=\"pvpflag\" width=50></td><td width=50>Karma:</td><td><edit var=\"karma\" width=50></td></tr>");
    replyMSG.append("<tr><td width=50>Class<?> Id:</td><td><edit var=\"classid\" width=50></td><td width=50>Pvp Kills:</td><td><edit var=\"pvpkills\" width=50></td></tr>");
    replyMSG.append("</table><br>");
    replyMSG.append("<center><button value=\"Save Changes\" action=\"bypass -h admin_save_modifications $hp & $mp & $karma & $pvpflag & $pvpkills & $classid &\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></center><br>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    }
    else
    {
      return;
    }
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=260><tr>");
    replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=180><center>Character Selection Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_current_player\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table><br><br>");
    replyMSG.append("<center>Admin Actions for: " + player.getName() + "</center><br>");
    replyMSG.append("<center><table width=200><tr>");
    replyMSG.append("<td width=100>Argument(*):</td><td width=100><edit var=\"arg\" width=100></td>");
    replyMSG.append("</tr></table><br></center>");
    replyMSG.append("<table width=270>");
    replyMSG.append("<tr><td width=90><button value=\"Teleport\" action=\"bypass -h admin_teleportto " + player.getName() + "\" width=85 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=90><button value=\"Recall\" action=\"bypass -h admin_recall " + player.getName() + "\" width=85 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=90><button value=\"Quests\" action=\"bypass -h admin_quests " + player.getName() + "\" width=85 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    activeChar.sendPacket(adminReply);
  }

  private void findCharacter(L2Player activeChar, String CharacterToFind)
  {
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    int CharactersFound = 0;
    StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=260><tr>");
    replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=180><center>Character Selection Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_show_characters 0\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<br><br>");
    for(L2Player element : L2ObjectsStorage.getAllPlayersForIterate())
    {
      if(element.getName().startsWith(CharacterToFind))
      {
        CharactersFound = CharactersFound + 1;
        replyMSG.append("<table width=270>");
        replyMSG.append("<tr><td width=80>Name</td><td width=110>Class</td><td width=40>Level</td></tr>");
        replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_list " + element.getName() + "\">" + element.getName() + "</a></td><td width=110>" + element.getTemplate().className + "</td><td width=40>" + element.getLevel() + "</td></tr>");
        replyMSG.append("</table>");
      }
    }
    if(CharactersFound == 0)
    {
      replyMSG.append("<table width=270>");
      replyMSG.append("<tr><td width=270>Your search did not find any characters.</td></tr>");
      replyMSG.append("<tr><td width=270>Please try again.<br></td></tr>");
      replyMSG.append("</table><br>");
      replyMSG.append("<center><table><tr><td>");
      replyMSG.append("<edit var=\"character_name\" width=80></td><td><button value=\"Find\" action=\"bypass -h admin_find_character $character_name\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\">");
      replyMSG.append("</td></tr></table></center>");
    }
    else
    {
      replyMSG.append("<center><br>Found " + CharactersFound + " character");
      if(CharactersFound == 1)
      {
        replyMSG.append(".");
      }
      else if(CharactersFound > 1)
      {
        replyMSG.append("s.");
      }
    }
    replyMSG.append("</center></body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    else
    {
      activeChar.sendPacket(Msg.INVALID_TARGET);
      return;
    }
    final NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    final StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=260><tr>");
    replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td width=180><center>Character Selection Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_current_player\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<br><br>");
    replyMSG.append("<table width=270><tr><td>Name: " + player.getName() + "</td></tr>");
    replyMSG.append("<tr><td>Lv: " + player.getLevel() + " " + player.getTemplate().className + "</td></tr>");
    replyMSG.append("<tr><td>Exp: " + player.getExp() + "</td></tr>");
    replyMSG.append("<tr><td>Sp: " + player.getSp() + "</td></tr></table>");
    replyMSG.append("<br><table width=270><tr><td>Note: Dont forget that modifying players skills can</td></tr>");
    replyMSG.append("<tr><td>ruin the game...</td></tr></table><br>");
    replyMSG.append("<table width=270><tr><td>Note: Fill all values before saving the modifications.,</td></tr>");
    replyMSG.append("<tr><td>Note: Use 0 if no changes are needed.</td></tr></table><br>");
    replyMSG.append("<center><table><tr>");
    replyMSG.append("<td>Exp: <edit var=\"exp_to_add\" width=50></td>");
    replyMSG.append("<td>Sp:  <edit var=\"sp_to_add\" width=50></td>");
    replyMSG.append("<td>&nbsp;<button value=\"Save Changes\" action=\"bypass -h admin_add_exp_sp $exp_to_add & $sp_to_add &\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table></center>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

  }

  private void setSubclass(final L2Player activeChar, final L2Player player)
  {
    StringBuffer content = new StringBuffer("<html><body>");
    NpcHtmlMessage html = new NpcHtmlMessage(5);
    Set<PlayerClass> subsAvailable;
    subsAvailable = getAvailableSubClasses(player);
    if(subsAvailable != null && !subsAvailable.isEmpty())
    {
      content.append("Add Subclass:<br>Which subclass do you wish to add?<br>");
      for(PlayerClass subClass : subsAvailable)
      {
        content.append("<a action=\"bypass -h admin_setsubclass " + subClass.ordinal() + "\">" + formatClassForDisplay(subClass) + "</a><br>");
      }
    }
    else
    {
      activeChar.sendMessage(new CustomMessage("l2p.gameserver.model.instances.L2VillageMasterInstance.NoSubAtThisTime", activeChar));
      return;
    }
    content.append("</body></html>");
    html.setHtml(content.toString());
    activeChar.sendPacket(html);
  }
View Full Code Here

      }
    }
    // Send message to client if message not empty
    if(content != null && player != null)
    {
      NpcHtmlMessage npcReply = new NpcHtmlMessage(5);
      npcReply.setHtml(content);
      if(getQuestIntId() > 0 && getQuestIntId() < 20000)
      {
        npcReply.setQuest(getQuestIntId());
      }
      player.sendPacket(npcReply);
    }
    return content;
  }
View Full Code Here

TOP

Related Classes of l2p.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.