I'm trying to create search types, but I come across a problem in the substring when I create a switch I don't get all my search data.
Code base :
Old:
+@Override+public boolean useAdminCommand(String command,Player activeChar)+{+ final NpcHtmlMessage html =newNpcHtmlMessage(0);+ html.setFile("data/html/admin/search.htm");++if(command.equals("admin_search"))+ html.replace("%list%","<center><br><br><br>Set first an key word</center>");+elseif(command.startsWith("admin_search"))+{+StringTokenizer st =newStringTokenizer(command," ");+ st.nextToken();++int page =Integer.valueOf(st.nextToken());+if(st.hasMoreTokens())+{+StringBuilder sb =newStringBuilder(String.valueOf(page));+StringBuilderlist= getList(activeChar, page, command.substring(14+ sb.length()));+ html.replace("%list%",list== null ?"":list.toString());+}+else+ html.replace("%list%","<center><br><br><br>Set first an key word</center>");+}+ activeChar.sendPacket(html);+returntrue;+}+
New :
@Overridepublicvoid useAdminCommand(String command,Player player){
final StringTokenizer st =newStringTokenizer(command," ");
st.nextToken();
final NpcHtmlMessage html =newNpcHtmlMessage(0);
html.setFile("data/html/admin/search.htm");if(command.equals("admin_search"))
html.replace("%list%","<center><br><br><br>Set first an key word</center>");elseif(command.startsWith("admin_search")){if(!st.hasMoreTokens()){
player.sendMessage("Usage: //search <item>");return;}int page =Integer.valueOf(st.nextToken());switch(st.nextToken()){case"item":if(st.hasMoreTokens()){StringBuilder sb =newStringBuilder(String.valueOf(page));StringBuilderlist= getListItem(player, page, command.substring(14+ sb.length()));
html.replace("%list%",list== null ?"":list.toString());}else
html.replace("%list%","<center><br><br><br>Set first an key word</center>");break;}}
player.sendPacket(html);}
Used the service a couple of times for promo vids and some overlays—super fast turnaround and the quality was exactly what I needed. Quick to tweak stuff too if needed.
Childhood - the most magical and carefree time
Bright memories filled with vivid colors, where we could be anyone and go anywhere.
Everyone had their own playground, a tight-knit group of kids who knew each other inside out.
All free time was spent together - no tablets, no phones, just football, climbing on bars, and collecting bottle caps, badges, stamps, and wrappers.
Thinking back brings a smile to your face.
And everyone remembers that moment: sitting in the yard, waiting for a friend. He said, “I’ll be out in a minute.”
At first, you wait patiently… then frustration creeps in — why isn’t he out yet?
Minutes stretch endlessly, and every 30 seconds you check the clock, hoping he’ll appear.
Back then, waiting was part of the fun.
Today, waiting for a verification code from a service isn’t so enjoyable seconds feel like hours, and your fingers get tired of hitting “refresh.”
With VibeSMS, that feeling disappears: codes arrive instantly, with no unnecessary waiting or annoying pauses.
🌐 Website: https://vibe-sms.net/
📲 Telegram: https://t.me/vibe_sms
I add my external ip at the ip at the dbo.server of l2c4_lin2db and the ports 7777 and 2106 are opened and i checked that they are opened but still other players are unable to join, what should i change to make it work?
Hello, dear friends, we are the GAMEMONEY in-game currency store. We offer adena, donation coins, and items from all top projects. Please contact us with any questions.
DISCORD - GODDARDSHOP
Question
Williams
I'm trying to create search types, but I come across a problem in the substring when I create a switch I don't get all my search data.
Code base :
Old:
New :
Html :
3 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now