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);}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hello, lovely people, how are you? I just finished compiling the L2jFrozen project Rev: 1132 (very old).
I don't mind it being too old, since the project is for me and my children. (LAN/Offline) it's not meant to be put online. I want to learn and give my children more comfort when playing. And for my part, I also experiment with the game.
My problem is that I don't know much about the subject. I was able to make some basic configurations to my liking and that of my children, but it never compiles or anything like that... I would really need help from you, the community... I simply want to remove all subclass restrictions, remove the restriction on "Overlord, Warsmith, and Dark Elf subclasses with White Elves and vice versa." Thank you very much in advance! Greetings, community.
Warriors, prepare for a new era!
We are pleased to announce that on July 12, with the morning restart, Airin will be updated to Chronicle 4: Scions of Destiny.
- Open Beta Testing (OBT) will begin on July 9. Everyone will be able to test the update in advance, including class mechanics, quests, and new content.
- The Clan Hall Auction will take place on July 13.
We’ve also prepared a traditional bonus start - details will be shared in the coming days.
The full list of changes is available in the official patch notes.
Thank you for your support and participation in the project. See you in Chronicle 4!
The game client download will be available soon.
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.