Jump to content
  • 0

Java Stringbuild


Question

Posted

Hi guys. How to fix this misunderstanding in code ? 

 [javac] C:\Users\user\Desktop\aCis_community\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\L2bf.java:37: error: cannot find symbol
    [javac]                StringBuild tb = new StringBuild("");
[javac] C:\Users\user\Desktop\aCis_community\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\L2bf.java:67: error: cannot find symbol
    [javac]                if(!activeChar.isBuffProtected())

Here is my script.

/*This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package net.sf.l2j.gameserver.handler; // +

import net.sf.l2j.gameserver.handler.IUserCommandHandler; // +
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; //+
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;//+

public class L2bf implements IUserCommandHandler
{
       private static final int[] COMMAND_IDS =
       {
               114
       };
      
       @Override
       public boolean useUserCommand(int id, L2PcInstance activeChar)
       {
               mainHtml(activeChar);
               return true;
       }
      
       public static void mainHtml(L2PcInstance activeChar)
       {
               NpcHtmlMessage nhm = new NpcHtmlMessage(5);
               StringBuild tb = new StringBuild("");
              
               tb.append("<html><head><title>Personal Menu</title></head><body>");
               tb.append("<center>");
               tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
               tb.append("<td valign=\"top\"><font color=\"FF6600\">Personal Menu</font>");  
               tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>");
               tb.append("</tr>");
               tb.append("</table>");
               tb.append("</center>");
               tb.append("<center>");
               tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td width=\"52\">ON</td>");
               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
               tb.append("</tr>");
               tb.append("<tr>");
               tb.append("<td width=\"52\">OFF</td>");
               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
               tb.append("</tr>");
               tb.append("</table><br>");
               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td align=\"center\" width=\"52\">Buff Protection</td>");
               if(activeChar.isBuffProtected())
               tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               if(!activeChar.isBuffProtected())
               tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("</tr>");
               tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY buff from another character.</font></td></tr>");
               tb.append("</table>");
               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td align=\"center\" width=\"52\">Personal Message Refusal</td>");
               if(activeChar.isInRefusalMode())
               tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               if(!activeChar.isInRefusalMode())
               tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("</tr>");
               tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY pm from another character.</font></td></tr>");
               tb.append("</table>");
               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td align=\"center\" width=\"52\">Trade Request Protection</td>");
               if(activeChar.isInTradeProt())
               tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               if(!activeChar.isInTradeProt())
               tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("</tr>");
               tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY trade request from another character.</font></td></tr>");
               tb.append("</table>");
               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td align=\"center\" width=\"52\">Soulshot/Spiritshot Effect</td>");
               if(activeChar.isSSDisabled())
               tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               if(!activeChar.isSSDisabled())
               tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("</tr>");
               tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you will enchance your pc's performance by disabling your ss effects.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page2\" width=16 height=16 back=\"L2UI_CH3.next1\" fore=\"L2UI_CH3.next1\"></td></tr>");
               tb.append("</table>");
              
               tb.append("</center>");
               tb.append("</body></html>");
              
               nhm.setHtml(tb.toString());
               activeChar.sendPacket(nhm);
       }
      
       public static void mainHtml2(L2PcInstance activeChar)
       {
               NpcHtmlMessage nhm = new NpcHtmlMessage(5);
               TextBuilder tb = new TextBuilder("");
              
               tb.append("<html><head><title>Personal Menu</title></head><body>");
               tb.append("<center>");
               tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>");
               tb.append("<td valign=\"top\"><font color=\"FF6600\">Personal Menu</font>");  
               tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>");
               tb.append("</tr>");
               tb.append("</table>");
               tb.append("</center>");
               tb.append("<center>");
               tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td width=\"52\">ON</td>");
               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
               tb.append("</tr>");
               tb.append("<tr>");
               tb.append("<td width=\"52\">OFF</td>");
               tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>");
               tb.append("</tr>");
               tb.append("</table><br>");
               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td align=\"center\" width=\"52\">Party Invite Protection</td>");
               if(activeChar.isPartyInvProt())
               tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               if(!activeChar.isPartyInvProt())
               tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("</tr>");
               tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY party invite from another character.</font></td></tr>");
               tb.append("</table>"); 
               tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">");
               tb.append("<tr>");
               tb.append("<td align=\"center\" width=\"52\">Exp Gain Protection</td>");
               if(activeChar.cantGainXP())
               tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>");
               if(!activeChar.cantGainXP())
               tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>");
               tb.append("</tr>");
               tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve expirience from killing monsters.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page1\" width=16 height=16 back=\"L2UI_CH3.back1\" fore=\"L2UI_CH3.next1\"></td></tr>");
               tb.append("</table>"); 
               tb.append("</center>");
               tb.append("</body></html>");
              
               nhm.setHtml(tb.toString());
               activeChar.sendPacket(nhm);
       }
      
       @Override
       public int[] getUserCommandList()
       {
               return COMMAND_IDS;
       }
}

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

StringBuild -> StringBuilder

TextBuilder -> StringBuilder

 

Ctrl+Shift+O to fix imports / to import the StringBuilder.

Edited by SweeTs
  • 0
Posted (edited)

Ok thanks 

 

What is incorrect symbol here? 

  [javac] C:\Users\user\Desktop\aCis_community\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\L2bf.java:65: error: cannot find symbol
    [javac]                if(activeChar.isBuffProtected())
[javac] C:\Users\user\Desktop\aCis_community\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\L2bf.java:95: error: cannot find symbol
    [javac]                if(activeChar.isSSDisabled())
[javac] C:\Users\user\Desktop\aCis_community\aCis_gameserver\java\net\sf\l2j\gameserver\model\actor\L2bf.java:143: error: cannot find symbol
    [javac]                if(!activeChar.isPartyInvProt())
Edited by Infed
  • 0
Posted

Don't you know to read?

 

 

if(activeChar.isBuffProtected())
if(activeChar.isSSDisabled())
if(!activeChar.isPartyInvProt())

 

You are trying to add a feature, which you don't have or you didn't add it yet, part of L2PcInstnace.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Hey, any one can help me or tell advice how to make this shown damage on screen directly on enemy when im hitting it, becuase now this damage is located on my screen near my character. What script or what interface.u class i need modify?
    • Opening Date: Q4 2026 (exact date TBA) Chronicle: High Five (H5) Rates: Mob EXP/SP: low (secondary) | PvP EXP: main progression source (custom formula, exact rate TBA)   Hey everyone,   Announcing L2Berserk, a custom Lineage 2 High Five project currently in development. This is a solo project, so progress may take a bit longer than a full team would need — but it's moving forward steadily. The idea behind it is simple: most servers either force you into rigid factions or let PvP happen almost by accident while everyone grinds mobs for hours. L2Berserk is a crossover of both worlds — there's no faction split, no separate towns, everyone spawns and plays in one shared hub, but progression itself is built around fighting other players instead of farming spots. If you enjoy PvP more than staring at a bot-farming route, this is being built with you in mind.   Already implemented: Custom launcher — own CDN and updater, auto-detects your existing install so setup is fast and low-friction Tower of Trials — a 10-floor PvE dungeon, 3 monster waves per floor, difficulty scales as you climb; built as a solo/small-group challenge track separate from the PvP-EXP loop PvP Arena — an NPC that queues players into Party vs Party or Command Channel vs Command Channel arena matches on demand Olympiad — implemented and functional for structured 1v1/team PvP Event Manager — automated system running rotating events every 10 minutes non-stop, so there's always something active for players to jump into Single shared hub — no faction-locked zones; PvP-driven EXP progression is the main way you level PvP Zone — a dedicated zone avaiable through PvP Zone Teleport Scroll. Zones have boundaries so players won't run from pvp forever. Planned: Kill-streak rewards / bounty system — the more active you are in PvP, the more visible and rewarded you become PvP ranking / leaderboard with seasonal recognition More content and events Additional Discord integrations A live testing phase with the community before the official opening, so mechanics get stress-tested before Q4 A lot more features are planned beyond what's listed here — the project is still actively growing If you have suggestions, feel free to post them on Discord   A note on where things stand: the server is currently offline (0% uptime) — that's expected at this early stage, not a sign the project stalled. Following along and feedback from anyone interested in this kind of PvP-first server are very welcome.   Website: l2berserk.fun
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..