Jump to content

Williams

Members
  • Posts

    253
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Everything posted by Williams

  1. 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 = new NpcHtmlMessage(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>"); + else if (command.startsWith("admin_search")) + { + StringTokenizer st = new StringTokenizer(command, " "); + st.nextToken(); + + int page = Integer.valueOf(st.nextToken()); + if (st.hasMoreTokens()) + { + StringBuilder sb = new StringBuilder(String.valueOf(page)); + StringBuilder list = 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); + return true; + } + New : @Override public void useAdminCommand(String command, Player player) { final StringTokenizer st = new StringTokenizer(command, " "); st.nextToken(); final NpcHtmlMessage html = new NpcHtmlMessage(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>"); else if (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 = new StringBuilder(String.valueOf(page)); StringBuilder list = 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); } Html : <table width=260> <tr> <td><combobox width=65 height=21 var="param" list=item;skill></td> <td><edit width=130 var="search"></td> <td><button value="Search" action="bypass -h admin_search 1 $param $search" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> </tr> </table><br>
  2. 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. Old: + @Override + public boolean useAdminCommand(String command, Player activeChar) + { + final NpcHtmlMessage html = new NpcHtmlMessage(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>"); + else if (command.startsWith("admin_search")) + { + StringTokenizer st = new StringTokenizer(command, " "); + st.nextToken(); + + int page = Integer.valueOf(st.nextToken()); + if (st.hasMoreTokens()) + { + StringBuilder sb = new StringBuilder(String.valueOf(page)); + StringBuilder list = 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); + return true; + } + New : @Override public void useAdminCommand(String command, Player player) { final StringTokenizer st = new StringTokenizer(command, " "); st.nextToken(); final NpcHtmlMessage html = new NpcHtmlMessage(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>"); else if (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 = new StringBuilder(String.valueOf(page)); StringBuilder list = 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); } HTML <table width=260> <tr> <td><combobox width=65 height=21 var="param" list=item;skill></td> <td><edit width=130 var="search"></td> <td><button value="Search" action="bypass -h admin_search 1 $param $search" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> </tr> </table><br>
  3. I'm not going to remove it I'm going to modify it by adding time lol
  4. I would like to know which package connects with the client to cast the teleport description. msg id = 811 StringUtil.append(sb, "<a action=\"bypass -h npc_", getObjectId(), "_teleport ", index, "\" msg=\"811;", teleport.getDesc(), "\">", teleport.getDesc()); every teleport has the message 811 I would like to know where I find the root of this command.
  5. Hello I'm trying to bring a client and I'm searching all clients interlude which client do I connect with this version?
  6. Updated topic for aCis 401.
  7. Skin Code (github.com) your tips were the best thank you.
  8. what I want you to understand is the following when I relog and try to enter again I need to click several times on "Start" when doing this my character that was NoCarrier in the game he is disconnected there for me to enter the error is that the lack of implementation of some package to check when entering the game
  9. If you notice the @Rootware video when he relogs with the character and enters the game, his character doesn't disconnect at any time, he just stays there what I want to do and also restore the player's party that was disconnected. I'm trying to restore the parties with the ObjectId I created when each player joins one in the game. I don't need to create a memo for leader/member/title/title color if (player.isInParty()) { final Party oldParty = World.getInstance().getPartyByObjectId(player.getMemos().getInteger("NoCarrierPartyObjId")); if (oldParty != null) oldParty.updateNoCarrierParty(player); }
  10. this piece of your code only throws disconnects message for party players and changes the party leader if the leader is disconnected this part is not what I'm talking about. You don't need to save every action in memo.
  11. yes i did practically that just take a look to add the system i created a task to calculate the time. public void addNoCarrier(int duration) { if (isInStoreMode()) return; NoCarrierTaskManager.getInstance().add(this); setNoCarrier(true); broadcastCharInfo(); setInvul(true); if (isInParty()) getMemos().set("NoCarrierParty", System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(duration)); else getMemos().set("NoCarrier", System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(duration)); } when a player joins a party it is stored : public Party(Player leader, Player target, LootRule lootRule) { super(leader); _members.add(leader); _members.add(target); leader.setParty(this); target.setParty(this); _lootRule = lootRule; leader.getMemos().set("NoCarrierPartyObjId", _partyObjId); target.getMemos().set("NoCarrierPartyObjId", _partyObjId); EnterWorld if (player.getMemos().containsKey("NoCarrier") || player.getMemos().containsKey("NoCarrierParty") && player.getMemos().containsKey("NoCarrierPartyObjId")) { when entering the game I created 3 checks to verify the object Id of the party and if it really was in the party, if it is in the party ok you receive the party again public void updateNoCarrierParty(Player player) { player.sendPacket(new PartySmallWindowAll(player, this)); // Add party to player. player.setParty(this); // Update icons. for (Player member : _members) { member.updateEffectIcons(true); member.broadcastUserInfo(); } broadcastCreatureSay(new CreatureSay(SayType.PARTY, "[No Carrier]", "Player: " + player.getName() + " has logged in again."), player); if (_commandChannel != null) player.sendPacket(ExOpenMPCC.STATIC_PACKET); }
  12. it's not that simple, cleanup() causes the player to be removed even adding a variable to check if the player is in a party it is removed when trying to enter/exit the game. In aCis 401 in the RequestGameStart package I believe that here is the problem for more than 3 clicks to log into the game I believe there is something else missing to succeed I will research a little more.
  13. Recently some people showed me this video and i got interested in the system i'm creating it but i come across a problem when i log into the server again my party dissolves when i try to log into the server the party ends which package i need to modify? No Carrier system @Rootware how is it going : Part 2
  14. I liked aCis a lot, but it is very unstable 12 years in development and half of the project is not functional. I switched to L2jMobius and there are also glitches but I joined aCis/Mobius and made a project for myself. Recently some members reached out to me to fix a bug in Skill Fear. I've never seen a project with as many defects as this one aCis and its absurd price of 100 Euros.
  15. I would like to know the name of this system and which chronicle.
  16. I opted for proguard when I'm going to obfuscate my project I have this error but I'm using java se 16 gameserver\libs\l2jserver.jar] (Can't process class [net/sf/l2j/Config.class] (Unsupported version number [61.0] (maximum 60.65535, Java 16))
  17. Does anyone recommend any program to obfuscate java code?
  18. TradeStart needs to be implemented too.
  19. diff --git a/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java b/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java index 8429f78..6a60785 100644 --- a/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java +++ b/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/model/item/instance/ItemInstance.java @@ -503,7 +503,7 @@ */ public boolean isTradable() { - return isAugmented() ? false : _item.isTradable(); + return isAugmented() ? true : _item.isTradable(); } /** diff --git a/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java b/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java index c202669..3810b76 100644 --- a/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java +++ b/L2jOne_C6_Interlude/java/net/sf/l2j/gameserver/network/serverpackets/TradeStart.java @@ -39,7 +39,7 @@ writeD(item.getBodyPart()); writeH(temp.getEnchantLevel()); writeH(temp.getCustomType2()); - writeH(0x00); + writeH(temp.getAugmentation() == null ? 0x00 : temp.getAugmentation().getId()); } } } \ No newline at end of file I went to do some tests, and how are we going to receive these packages
  20. I did this to remove Stackable from multisell and hypothetically solve this, but I don't recommend removing isStackable from multisell. . - Pastebin.com
×
×
  • 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..

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock