Package com.l2jfrozen.gameserver.network.serverpackets

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


    {
      String html = HtmCache.getInstance().getHtm("data/html/" + htmlFolder + "/" + merchant.getNpcId() + "-bought.htm");

      if(html != null)
      {
        NpcHtmlMessage boughtMsg = new NpcHtmlMessage(merchant.getObjectId());
        boughtMsg.setHtml(html.replaceAll("%objectId%", String.valueOf(merchant.getObjectId())));
        player.sendPacket(boughtMsg);
      }
    }

    StatusUpdate su = new StatusUpdate(player.getObjectId());
View Full Code Here


    }

    if(!actor.validateLink(_link))
      return;

    NpcHtmlMessage msg = new NpcHtmlMessage(0);
    msg.setFile(_link);

    sendPacket(msg);
  }
View Full Code Here

    String html = HtmCache.getInstance().getHtm("data/html/" + htmlFolder + "/" + merchant.getNpcId() + "-sold.htm");

    if(html != null)
    {
      NpcHtmlMessage soldMsg = new NpcHtmlMessage(merchant.getObjectId());
      soldMsg.setHtml(html.replaceAll("%objectId%", String.valueOf(merchant.getObjectId())));
      player.sendPacket(soldMsg);
    }

    // Update current load as well
    StatusUpdate su = new StatusUpdate(player.getObjectId());
View Full Code Here

        // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
        player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
      }
      else
      {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        html.setFile(PARENT_DIR+"7090.htm");
        sendHtmlMessage(player, html);
      }
    }
    // Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
    player.sendPacket(ActionFailed.STATIC_PACKET);
View Full Code Here

      }

      if(petItemId == 0 || !player.isMounted())
      {
        player.sendMessage("Ride your strider first...");
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        html.setFile("data/html/fortress/wyvernmanager-explain.htm");
        html.replace("%count%", String.valueOf(10));
        player.sendPacket(html);
        html = null;
        return;
      }
      else if(player.isMounted() && petItem != null && petItem.getEnchantLevel() < 55)
      {
        NpcHtmlMessage html = new NpcHtmlMessage(1);
        html.setFile("data/html/fortress/wyvernmanager-explain.htm");
        html.replace("%count%", String.valueOf(10));
        player.sendPacket(html);
        html = null;
        return;
      }

      // Wyvern requires Config.MANAGER_CRYSTAL_COUNT crystal for ride...
      if(player.getInventory().getItemByItemId(1460) != null && player.getInventory().getItemByItemId(1460).getCount() >= 10)
      {
        if(!player.disarmWeapons())
          return;

        if(player.isMounted())
        {
          player.dismount();
        }

        if(player.getPet() != null)
        {
          player.getPet().unSummon(player);
        }

        player.getInventory().destroyItemByItemId("Wyvern", 1460, 10, player, player.getTarget());

        Ride mount = new Ride(player.getObjectId(), Ride.ACTION_MOUNT, 12621);
        player.sendPacket(mount);
        player.broadcastPacket(mount);
        player.setMountType(mount.getMountType());

        player.addSkill(SkillTable.getInstance().getInfo(4289, 1));
        player.sendMessage("The Wyvern has been summoned successfully!");

      }
      else
      {
        NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
        html.setFile("data/html/fortress/wyvernmanager-explain.htm");
        html.replace("%count%", String.valueOf(10));
        player.sendPacket(html);
        html = null;
        player.sendMessage("You need 10 Crystals: B Grade.");
      }
View Full Code Here

      {
        filename = "data/html/fortress/wyvernmanager.htm";
      }
    }

    NpcHtmlMessage html = new NpcHtmlMessage(1);
    html.setFile(filename);
    html.replace("%objectId%", String.valueOf(getObjectId()));
    html.replace("%count%", String.valueOf(10));
    player.sendPacket(html);
    filename = null;
    html = null;
  }
View Full Code Here

    if(SkillsEnd - SkillsStart > MaxSkillsPerPage)
    {
      SkillsEnd = SkillsStart + MaxSkillsPerPage;
    }

    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    TextBuilder replyMSG = new TextBuilder("<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=\"sek.cbui94\" fore=\"sek.cbui92\"></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_skills\" width=40 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
    replyMSG.append("</tr></table>");
    replyMSG.append("<br><br>");
    replyMSG.append("<center>Editing <font color=\"LEVEL\">" + player.getName() + "</font></center>");
    replyMSG.append("<br><table width=270><tr><td>Lv: " + player.getLevel() + " " + player.getTemplate().className + "</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>");
    replyMSG.append("<br><center>Click on the skill you wish to remove:</center>");
    replyMSG.append("<br>");
    String pages = "<center><table width=270><tr>";

    for(int x = 0; x < MaxPages; x++)
    {
      int pagenr = x + 1;
      pages += "<td><a action=\"bypass -h admin_remove_skills " + x + "\">Page " + pagenr + "</a></td>";
    }

    pages += "</tr></table></center>";
    replyMSG.append(pages);
    replyMSG.append("<br><table width=270>");
    replyMSG.append("<tr><td width=80>Name:</td><td width=60>Level:</td><td width=40>Id:</td></tr>");

    for(int i = SkillsStart; i < SkillsEnd; i++)
    {
      replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_remove_skill " + skills[i].getId() + "\">" + skills[i].getName() + "</a></td><td width=60>" + skills[i].getLevel() + "</td><td width=40>" + skills[i].getId() + "</td></tr>");
    }

    replyMSG.append("</table>");
    replyMSG.append("<br><center><table>");
    replyMSG.append("Remove skill by ID :");
    replyMSG.append("<tr><td>Id: </td>");
    replyMSG.append("<td><edit var=\"id_to_remove\" width=110></td></tr>");
    replyMSG.append("</table></center>");
    replyMSG.append("<center><button value=\"Remove skill\" action=\"bypass -h admin_remove_skill $id_to_remove\" width=110 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></center>");
    replyMSG.append("<br><center><button value=\"Back\" action=\"bypass -h admin_current_player\" width=40 height=15></center>");
    replyMSG.append("</body></html>");
    adminReply.setHtml(replyMSG.toString());
    activeChar.sendPacket(adminReply);

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

    {
      activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
      return;
    }

    NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
    adminReply.setFile("data/html/admin/charskills.htm");
    adminReply.replace("%name%", player.getName());
    adminReply.replace("%level%", String.valueOf(player.getLevel()));
    adminReply.replace("%class%", player.getTemplate().className);
    activeChar.sendPacket(adminReply);

    adminReply = null;
    player = null;
    target = null;
View Full Code Here

    StringTokenizer st = new StringTokenizer(command, " ");
    String currentCommand = st.nextToken();

      if (currentCommand.startsWith("schemebuff"))
    {
           NpcHtmlMessage html = new NpcHtmlMessage(1);
           html.setFile(PARENT_DIR+"menu.htm");
           sendHtmlMessage(player, html);
      }
      else if (currentCommand.startsWith("aiobuff"))
    {
       showMessageWindow(player);
    }
      else if (currentCommand.startsWith("menu"))
    {
      NpcHtmlMessage html = new NpcHtmlMessage(1);
      html.setFile(PARENT_DIR+"menu.htm");
      sendHtmlMessage(player, html);
    }
      else if (currentCommand.startsWith("support"))
    {
      String targettype = st.nextToken();     
      showGiveBuffsWindow(player, targettype);
    }
      else if (currentCommand.startsWith("givebuffs"))
    {
      String targettype = st.nextToken();
      String scheme_key = st.nextToken();
      int cost = Integer.parseInt(st.nextToken());
     
      if (cost == 0 || cost <= player.getInventory().getAdena())
      {
        L2Character target = player;
        if (targettype.equalsIgnoreCase("pet"))
          target = player.getPet();
       
        else if (target != null)
        {     
          for (L2Skill sk : CharSchemesTable.getInstance().getScheme(player.getObjectId(), scheme_key))
          {
            sk.getEffects(this, target);
         
          player.reduceAdena("NPC Buffer", cost, this, true);
        }
        else
        {
          player.sendMessage("Incorrect Pet");
          NpcHtmlMessage html = new NpcHtmlMessage(1);
          html.setFile(PARENT_DIR+"menu.htm");
          sendHtmlMessage(player, html);
        }       
      }
      else
      {
View Full Code Here

        tb.append("<a action=\"bypass -h npc_%objectId%_givebuffs "+targettype+" "+e.getKey()+" "+String.valueOf(cost)+"\">"+e.getKey()+"</a> Cost: "+cost+"<br1>");
      }
    }
    tb.append("</body></html>");
   
    NpcHtmlMessage html = new NpcHtmlMessage(1);
    html.setHtml(tb.toString());
    sendHtmlMessage(player, 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.