Package l2p.gameserver.serverpackets

Examples of l2p.gameserver.serverpackets.NpcHtmlMessage


          {
            activeChar.sendMessage("Command syntax: //ckarma char_name karma reason");
          }
          break;
        case admin_cban:
          activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/cban.htm"));
          break;
      }
    }
    return true;
  }
View Full Code Here


      player.sendChanges();
    }
  }
  private void showMainPage(L2Player activeChar)
  {
    activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/attribute.htm"));
  }
View Full Code Here

    if(activeChar.getPlayerAccess().Menu)
    {
      switch(command)
      {
        case admin_admin:
          activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/admin.htm"));
          break;
        case admin_play_sounds:
          if(wordList.length == 1)
          {
            activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/songs/songs.htm"));
          }
          else
          {
            try
            {
              activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/songs/songs" + wordList[1] + ".htm"));
            }
            catch(StringIndexOutOfBoundsException e)
            {
            }
          }
          break;
        case admin_play_sound:
          try
          {
            playAdminSound(activeChar, wordList[1]);
          }
          catch(StringIndexOutOfBoundsException e)
          {
          }
          break;
        case admin_silence:
          if(activeChar.getMessageRefusal()) // already in message refusal
          // mode
          {
            activeChar.unsetVar("gm_silence");
            activeChar.setMessageRefusal(false);
            activeChar.sendPacket(Msg.MESSAGE_ACCEPTANCE_MODE);
          }
          else
          {
            if(Config.SAVE_GM_EFFECTS)
            {
              activeChar.setVar("gm_silence", "true");
            }
            activeChar.setMessageRefusal(true);
            activeChar.sendPacket(Msg.MESSAGE_REFUSAL_MODE);
          }
          break;
        case admin_tradeoff:
          try
          {
            if(wordList[1].equalsIgnoreCase("on"))
            {
              activeChar.setTradeRefusal(true);
              activeChar.sendMessage("tradeoff enabled");
            }
            else if(wordList[1].equalsIgnoreCase("off"))
            {
              activeChar.setTradeRefusal(false);
              activeChar.sendMessage("tradeoff disabled");
            }
          }
          catch(Exception ex)
          {
            if(activeChar.getTradeRefusal())
            {
              activeChar.sendMessage("tradeoff currently enabled");
            }
            else
            {
              activeChar.sendMessage("tradeoff currently disabled");
            }
          }
          break;
        case admin_cfg:
        case admin_config:
          if(wordList.length < 2)
          {
            activeChar.sendMessage("USAGE: //config parameter[=value]");
            return false;
          }
          activeChar.sendMessage(Config.HandleConfig(activeChar, Util.joinStrings(" ", wordList, 1)));
          break;
        case admin_show_html:
          String html = wordList[1];
          try
          {
            if(html != null)
            {
              activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/" + html));
            }
            else
            {
              activeChar.sendMessage("Html page not found");
            }
          }
          catch(Exception npe)
          {
            activeChar.sendMessage("Html page not found");
          }
          break;
      }
      return true;
    }
    if(activeChar.getPlayerAccess().CanTeleport)
    {
      switch(command)
      {
        case admin_show_html:
          String html = wordList[1];
          try
          {
            if(html != null)
            {
              if(html.startsWith("tele"))
              {
                activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/" + html));
              }
              else
              {
                activeChar.sendMessage("Access denied");
              }
View Full Code Here

  }

  public void playAdminSound(L2Player activeChar, String sound)
  {
    activeChar.broadcastPacket(new PlaySound(sound));
    activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/admin.htm"));
    activeChar.sendMessage("Playing " + sound + ".");
  }
View Full Code Here

    L2Spawn spawn;
    L2NpcInstance npc;
    switch(command)
    {
      case admin_show_spawns:
        activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/spawns.htm"));
        break;
      case admin_spawn_index:
        try
        {
          String val = fullString.substring(18);
          activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/spawns/" + val + ".htm"));
        }
        catch(StringIndexOutOfBoundsException e)
        {
        }
        break;
View Full Code Here

    return true;
  }

  public void showSiegeUnitSelectPage(L2Player activeChar)
  {
    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><font color=\"LEVEL\">Siege Units</font></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><br>");
    replyMSG.append("<br><a action=\"bypass -h admin_territorysiege \">Territory siege menu</a><br>");
    replyMSG.append("<table width=260>");
    replyMSG.append("<tr><td>Unit Name</td><td>Owner</td></tr>");
    for(Castle castle : CastleManager.getInstance().getCastles().values())
    {
      if(castle != null)
      {
        replyMSG.append("<tr><td>");
        replyMSG.append("<a action=\"bypass -h admin_siege " + castle.getId() + "\">" + castle.getName() + "</a>");
        replyMSG.append("</td><td>");
        L2Clan owner = castle.getOwnerId() == 0 ? null : ClanTable.getInstance().getClan(castle.getOwnerId());
        if(owner == null)
        {
          replyMSG.append("NPC");
        }
        else
        {
          replyMSG.append(owner.getName());
        }
        replyMSG.append("</td></tr>");
      }
    }
    for(Fortress fortress : FortressManager.getInstance().getFortresses().values())
    {
      if(fortress != null)
      {
        replyMSG.append("<tr><td>");
        replyMSG.append("<a action=\"bypass -h admin_siege " + fortress.getId() + "\">" + fortress.getName() + "</a>");
        replyMSG.append("</td><td>");
        L2Clan owner = fortress.getOwnerId() == 0 ? null : ClanTable.getInstance().getClan(fortress.getOwnerId());
        if(owner == null)
        {
          replyMSG.append("NPC");
        }
        else
        {
          replyMSG.append(owner.getName());
        }
        replyMSG.append("</td></tr>");
      }
    }
    for(ClanHall clanhall : ClanHallManager.getInstance().getClanHalls().values())
    {
      if(clanhall != null && clanhall.getSiege() != null)
      {
        replyMSG.append("<tr><td>");
        replyMSG.append("<a action=\"bypass -h admin_siege " + clanhall.getId() + "\">" + clanhall.getName() + "</a>");
        replyMSG.append("</td><td>");
        L2Clan owner = clanhall.getOwnerId() == 0 ? null : ClanTable.getInstance().getClan(clanhall.getOwnerId());
        if(owner == null)
        {
          replyMSG.append("NPC");
        }
        else
        {
          replyMSG.append(owner.getName());
        }
        replyMSG.append("</td></tr>");
      }
    }
    replyMSG.append("</table>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    activeChar.sendPacket(adminReply);
  }

  public void showSiegePage(L2Player activeChar, Residence siegeUnit)
  {
    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>Siege Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_siege\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<center>");
    replyMSG.append("<br><br><br>Siege Unit: " + siegeUnit.getName() + "<br><br>");
    replyMSG.append("Unit Owner: ");
    L2Clan owner = siegeUnit.getOwnerId() == 0 ? null : ClanTable.getInstance().getClan(siegeUnit.getOwnerId());
    if(owner == null)
    {
      replyMSG.append("NPC");
    }
    else
    {
      replyMSG.append(owner.getName());
    }
    replyMSG.append("<br><br><table>");
    replyMSG.append("<tr><td><button value=\"Add Attacker\" action=\"bypass -h admin_add_attacker " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Add Defender\" action=\"bypass -h admin_add_defender " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("<tr><td><button value=\"List Clans\" action=\"bypass -h admin_list_siege_clans " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Clear List\" action=\"bypass -h admin_clear_siege_list " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<br>");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td><button value=\"Move Defenders\" action=\"bypass -h admin_move_defenders " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Spawn Doors\" action=\"bypass -h admin_spawn_doors " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<br>");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td><button value=\"Start Siege\" action=\"bypass -h admin_startsiege " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"End Siege\" action=\"bypass -h admin_endsiege " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<br>");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td><button value=\"Give Unit\" action=\"bypass -h admin_setcastle " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Take Unit\" action=\"bypass -h admin_castledel " + siegeUnit.getId() + "\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<br>");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td>NpcId: <edit var=\"value\" width=40>");
    replyMSG.append("<td><button value=\"Add Guard\" action=\"bypass -h admin_add_guard " + siegeUnit.getId() + " $value\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("</center>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    activeChar.sendPacket(adminReply);
  }

  public void showTerritorySiegePage(L2Player activeChar)
  {
    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>Territory Siege Menu</center></td>");
    replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_siege\" width=40 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<center>");
    replyMSG.append("<br><br><table>");
    replyMSG.append("<tr><td>Territory Id: <edit var=\"value\" width=40></td><td></td></tr>");
    replyMSG.append("<tr><td><button value=\"Add Player\" action=\"bypass -h admin_addterritorymember $value\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Add Clan\" action=\"bypass -h admin_addterritoryclan $value\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("<tr><td><button value=\"List Members\" action=\"bypass -h admin_listterritorymembers\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"Clear List\" action=\"bypass -h admin_clearterritorylist\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<br>");
    replyMSG.append("<table>");
    replyMSG.append("<tr><td><button value=\"Start Siege\" action=\"bypass -h admin_startterritorysiege\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
    replyMSG.append("<td><button value=\"End Siege\" action=\"bypass -h admin_stopterritorysiege\" width=80 height=15 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td></tr>");
    replyMSG.append("</table>");
    replyMSG.append("<br>");
    replyMSG.append("</center>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
View Full Code Here

    switch(command)
    {
      case admin_events:
        if(wordList.length == 1)
        {
          activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/events/events.htm"));
        }
        else
        {
          activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/events/" + wordList[1].trim()));
        }
        break;
    }
    return true;
  }
View Full Code Here

    return true;
  }

  public void showClanHallSelectPage(L2Player activeChar)
  {
    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    StringBuffer replyMSG = new StringBuffer("<html><body>");
    replyMSG.append("<table width=268><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><font color=\"LEVEL\">Clan Halls:</font></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><br>");
    replyMSG.append("<table width=268>");
    replyMSG.append("<tr><td width=130>ClanHall Name</td><td width=58>Town</td><td width=80>Owner</td></tr>");
    // TODO: make sort by Location
    for(ClanHall clanhall : ClanHallManager.getInstance().getClanHalls().values())
    {
      if(clanhall != null)
      {
        replyMSG.append("<tr><td>");
        replyMSG.append("<a action=\"bypass -h admin_clanhall " + clanhall.getId() + "\">" + clanhall.getName() + "</a>");
        replyMSG.append("</td><td>" + clanhall.getLocation() + "</td><td>");
        L2Clan owner = clanhall.getOwnerId() == 0 ? null : ClanTable.getInstance().getClan(clanhall.getOwnerId());
        if(owner == null)
        {
          replyMSG.append("none");
        }
        else
        {
          replyMSG.append(owner.getName());
        }
        replyMSG.append("</td></tr>");
      }
    }
    replyMSG.append("</table>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);
  }
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.