L2shaken

Members
  • Content count

    76
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

0 Neutral

About L2shaken

  • Rank
    Heir

Contact Methods

  • Website URL
    http://Facebook.com/daniloboffo

Profile Information

  • Gender
    Male
  • Country
    Brazil

Recent Profile Visitors

397 profile views
  1. so I tested this happening only in giran, I tested in other cities with the same npcs and this does not occur. :/
  2. https://imgur.com/jKwUKW6 Hi, I'm having a problem on my server, a bit strange, when I'm a little distant and I click on Npc the char gets stuck and does not move to any side while I'm targeting the NPC, it only returns to normal when I shoot the target, and the bottom line is that this is only happening in giran, someone already had it, can you tell me what it can be? use aCis 350. OBS: there is no error in GS.
  3. https://imgur.com/a/Zxj78 What is causing this error? I looked at everything and apparently everything is ok.
  4. html.replace("%item%", ItemTable.getInstance().createDummyItem(EventManager.getInstance().getInt(eventId, "rewardId")).getItemName()); I found the error, it is in this line, I isolated it and it worked normally.
  5. public void showFirstHtml(L2PcInstance player, int obj) Show me that part of your code in EventManager.java for me to compare. is possible ?
  6. Edit: I renamed the html to see and this message appeared missing the html, that is, it is following the correct path, but it is not opening. https://imgur.com/a/VPz7I
  7. I added everything. Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java else if (_command.startsWith("eventvote ")) { EventManager.getInstance().addVote(activeChar, Integer.parseInt(_command.substring(10))); } else if (_command.startsWith("eventstats ")) { try { EventStats.getInstance().showHtml(Integer.parseInt(_command.substring(11)),activeChar); } catch (Exception e) { activeChar.sendMessage("Currently there are no statistics to show."); } } else if (_command.startsWith("eventstats_show ")) { EventStats.getInstance().showPlayerStats(Integer.parseInt(_command.substring(16)),activeChar); } else if (_command.equals("eventbuffershow")) { EventBuffer.getInstance().showHtml(activeChar); } else if (_command.startsWith("eventbuffer ")) { EventBuffer.getInstance().changeList(activeChar, Integer.parseInt(_command.substring(12,_command.length()-2)), (Integer.parseInt(_command.substring(_command.length()-1)) == 0 ? false : true)); EventBuffer.getInstance().showHtml(activeChar); } else if (_command.startsWith("eventinfo ")) { int eventId = Integer.valueOf(_command.substring(10)); NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile("data/html-" + activeChar.getPlayerLanguage() + "/mods/eventinfo/" + eventId + ".htm"); html.replace("%amount%", String.valueOf(EventManager.getInstance().getInt(eventId, "rewardAmmount"))); html.replace("%item%", ItemTable.getInstance().createDummyItem(EventManager.getInstance().getInt(eventId, "rewardId")).getItemName()); html.replace("%minlvl%", String.valueOf(EventManager.getInstance().getInt(eventId, "minLvl"))); html.replace("%maxlvl%", String.valueOf(EventManager.getInstance().getInt(eventId, "maxLvl"))); html.replace("%time%", String.valueOf(EventManager.getInstance().getInt(eventId, "matchTime") / 60)); html.replace("%players%", String.valueOf(EventManager.getInstance().getInt(eventId, "minPlayers"))); html.replace("%url%", EventManager.getInstance().getString("siteUrl")); html.replace("%buffs%", EventManager.getInstance().getBoolean(eventId, "removeBuffs") ? "Self" : "Full"); activeChar.sendPacket(html); activeChar.sendPacket(ActionFailed.STATIC_PACKET); } Index: aCis_gameserver/java/net/sf/l2j/gameserver/events/EventManager.java Responsible for displaying html from NPC: public void showFirstHtml(L2PcInstance player, int obj) { NpcHtmlMessage html = new NpcHtmlMessage(obj); StringBuilder sb = new StringBuilder(); int count = 0; sb.append("<html><body><center><table width=270><tr><td width=145>Event Engine</td><td width=75>" + (getBoolean("eventBufferEnabled") ? "<a action=\"bypass -h eventbuffershow\">Buffer</a>" : "") + "</td><td width=50><a action=\"bypass -h eventstats 1\">Statistics</a></td></tr></table></center><br>"); if (getStatus() == State.VOTING) { sb.append("<center><table width=270 bgcolor=5A5A5A><tr><td width=90>Events</td><td width=140><center>Time left: " + cdtask.getTime() + "</center></td><td width=40><center>Votes</center></td></tr></table></center><br>"); for (Map.Entry<Integer, Event> event : events.entrySet()) { count++; sb.append("<center><table width=270 " + (count % 2 == 1 ? "" : "bgcolor=5A5A5A") + "><tr><td width=180>" + event.getValue().getString("eventName") + "</td><td width=30><a action=\"bypass -h eventinfo " + event.getKey() + "\">Info</a></td><td width=30><center>" + getVoteCount(event.getKey()) + "</td></tr></table></center>"); } sb.append("</body></html>"); html.setHtml(sb.toString()); player.sendPacket(html); } else if (getStatus() == State.REGISTERING) { sb.append("<center><table width=270 bgcolor=5A5A5A><tr><td width=70>"); if (players.contains(player)) sb.append("<a action=\"bypass -h npc_" + obj + "_unreg\">Unregister</a>"); else sb.append("<a action=\"bypass -h npc_" + obj + "_reg\">Register</a>"); sb.append("</td><td width=130><center><a action=\"bypass -h eventinfo " + getCurrentEvent().getInt("ids") + "\">" + getCurrentEvent().getString("eventName") + "</a></td><td width=70>Time: " + cdtask.getTime() + "</td></tr></table><br>"); for (L2PcInstance p : EventManager.getInstance().players) { count++; sb.append("<center><table width=270 " + (count % 2 == 1 ? "" : "bgcolor=5A5A5A") + "><tr><td width=120>" + p.getName() + "</td><td width=40>lvl " + p.getLevel() + "</td><td width=110>" + p.getTemplate().getClassName() + "</td></tr></table>"); } sb.append("</body></html>"); html.setHtml(sb.toString()); player.sendPacket(html); } else if (getStatus() == State.RUNNING) getCurrentEvent().showHtml(player, obj); }
  8. I've tried everything, apparently everything is correct, I do not understand this error.
  9. Hi, I'm having a problem with the phoenix event when I click on "info" in npc, it does not open the html with the information of the event and this error in GS, does anyone know how to fix it? https://imgur.com/a/DTLu3 https://imgur.com/a/5jumZ
  10. hello i need help for this code, anyone help me ? https://imgur.com/a/X6PVB code: <spoiler> /* * 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.communitybbs.Manager; import com.mchange.v1.util.MapUtils; import java.util.Arrays; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import net.sf.l2j.gameserver.cache.HtmCache; import net.sf.l2j.gameserver.datatables.ClanTable; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.datatables.RecipeTable; import net.sf.l2j.gameserver.instancemanager.CastleManager; import net.sf.l2j.gameserver.instancemanager.ClanHallManager; import net.sf.l2j.gameserver.model.L2Clan; import net.sf.l2j.gameserver.model.L2ManufactureItem; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.TradeList; import net.sf.l2j.gameserver.model.TradeList.TradeItem; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.entity.Castle; import net.sf.l2j.gameserver.model.entity.ClanHall; import net.sf.l2j.gameserver.model.item.RecipeList; import net.sf.l2j.gameserver.model.item.kind.Item; import net.sf.l2j.gameserver.model.item.type.CrystalType; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.RadarControl; import net.sf.l2j.gameserver.util.Util; public class RegionBBSManager extends TopBBSManager { // @formatter:off private static final int[][] _towns = new int[][] { {1010005, 19, 21}, {1010006, 20, 22}, {1010007, 22, 22}, {1010013, 22, 19}, {1010023, 24, 18}, {1010049, 23, 24}, {1010199, 24, 16}, {1010200, 21, 16}, {1010574, 22, 13}}; private static final String[] _regionTypes = { "&$596;", "&$597;", "&$665;" }; private static final String[] _grade = { "&$1291;", "&$1292;", "&$1293;", "&$1294;", "&$1295;", "S80 Grade", "S84 Grade" }; private static final int SELLER_PER_PAGE = 12; private static final String _pageRegionTpl = "data/html/CommunityBoard/region/bbs_regiontpl.htm"; private static final String _pageRegionSTpl = "data/html/CommunityBoard/region/bbs_region_stpl.htm"; private static final String _pageRegionStoreTpl = "data/html/CommunityBoard/region/bbs_region_storetpl.htm"; private static final String _pageRegionList = "data/html/CommunityBoard/region/bbs_region_list.htm"; private static final String _pageRegionSelers = "data/html/CommunityBoard/region/bbs_region_sellers.htm"; private static final String _pageRegionView = "data/html/CommunityBoard/region/bbs_region_view.htm"; // @formatter:on //protected RegionBBSManager() //{ //} public static RegionBBSManager getInstance() { return SingletonHolder._instance; } @Override public void parseCmd(String command, L2PcInstance player) { StringTokenizer st = new StringTokenizer(command, ";"); if (command.equals("_bbsloc")) { String tpl = HtmCache.getInstance().getHtm(_pageRegionTpl); StringBuilder rl = new StringBuilder(""); for (int townId = 0; townId < _towns.length; townId++) { int[] town = _towns[townId]; String reg = tpl.replace("%region_bypass%", "_bbsregion;" + String.valueOf(townId)); reg = reg.replace("%region_name%", HtmlUtils.htmlNpcString(town[0])); reg = reg.replace("%region_desc%", "&$498;: &$1157;, &$1434;, &$645;."); reg = reg.replace("%region_type%", "l2ui.bbs_folder"); int sellers = 0; int rx = town[1]; int ry = town[2]; int offset = 0; for (L2PcInstance seller : L2World.getInstance().getAllPlayers().values()) { int tx = MapUtils.regionX(seller); int ty = MapUtils.regionY(seller); if ((tx >= (rx - offset)) && (tx <= (rx + offset)) && (ty >= (ry - offset)) && (ty <= (ry + offset))) { if (seller.getPrivateStoreType() != 0) { sellers++; } } } reg = reg.replace("%sellers_count%", String.valueOf(sellers)); rl.append(reg); } String html = HtmCache.getInstance().getHtm(_pageRegionList); html = html.replace("%REGION_LIST%", rl.toString()); separateAndSend(html, player); } else if (command.startsWith("_bbsregion")) { st.nextToken(); String tpl = HtmCache.getInstance().getHtm(_pageRegionTpl); int townId = Integer.parseInt(st.nextToken()); StringBuilder rl = new StringBuilder(""); int[] town = _towns[townId]; for (int type = 0; type < _regionTypes.length; type++) { String reg = tpl.replace("%region_bypass%", "_bbsreglist;" + townId + ";" + type + ";1;0;"); reg = reg.replace("%region_name%", _regionTypes[type]); reg = reg.replace("%region_desc%", _regionTypes[type] + "."); reg = reg.replace("%region_type%", "l2ui.bbs_board"); int sellers = 0; int rx = town[1]; int ry = town[2]; int offset = 0; for (L2PcInstance seller : L2World.getInstance().getAllPlayers().values()) { int tx = MapUtils.regionX(seller); int ty = MapUtils.regionY(seller); if ((tx >= (rx - offset)) && (tx <= (rx + offset)) && (ty >= (ry - offset)) && (ty <= (ry + offset))) { if ((type == 0) && ((seller.getPrivateStoreType() == 1) || (seller.getPrivateStoreType() == 8))) { sellers++; } else if ((type == 1) && (seller.getPrivateStoreType() == 3)) { sellers++; } else if ((type == 2) && (seller.getPrivateStoreType() == 5)) { sellers++; } } } reg = reg.replace("%sellers_count%", String.valueOf(sellers)); rl.append(reg); } String html = HtmCache.getInstance().getHtm(_pageRegionList); html = html.replace("%REGION_LIST%", rl.toString()); separateAndSend(html, player); } else if (command.startsWith("_bbsreglist")) { st.nextToken(); int townId = Integer.parseInt(st.nextToken()); int type = Integer.parseInt(st.nextToken()); int page = Integer.parseInt(st.nextToken()); int byItem = Integer.parseInt(st.nextToken()); String search = st.hasMoreTokens() ? st.nextToken().toLowerCase() : ""; int[] town = _towns[townId]; List<L2PcInstance> sellers = getSellersList(townId, type, search, byItem == 1); int start = (page - 1) * SELLER_PER_PAGE; int end = Math.min(page * SELLER_PER_PAGE, sellers.size()); String html = HtmCache.getInstance().getHtm(_pageRegionSelers); if (page == 1) { html = html.replace("%ACTION_GO_LEFT%", ""); html = html.replace("%GO_LIST%", ""); html = html.replace("%NPAGE%", "1"); } else { html = html.replace("%ACTION_GO_LEFT%", "bypass _bbsreglist;" + townId + ";" + type + ";" + (page - 1) + ";" + byItem + ";" + search); html = html.replace("%NPAGE%", String.valueOf(page)); StringBuilder goList = new StringBuilder(""); for (int i = page > 10 ? page - 10 : 1; i < page; i++) { goList.append("<td><a action=\"bypass _bbsreglist;").append(townId).append(";").append(type).append(";").append(i).append(";").append(byItem).append(";").append(search).append("\"> ").append(i).append(" </a> </td>\n\n"); } html = html.replace("%GO_LIST%", goList.toString()); } int pages = Math.max(sellers.size() / SELLER_PER_PAGE, 1); if (sellers.size() > (pages * SELLER_PER_PAGE)) { pages++; } if (pages > page) { html = html.replace("%ACTION_GO_RIGHT%", "bypass _bbsreglist;" + townId + ";" + type + ";" + (page + 1) + ";" + byItem + ";" + search); int ep = Math.min(page + 10, pages); StringBuilder goList = new StringBuilder(""); for (int i = page + 1; i <= ep; i++) { goList.append("<td><a action=\"bypass _bbsreglist;").append(townId).append(";").append(type).append(";").append(i).append(";").append(byItem).append(";").append(search).append("\"> ").append(i).append(" </a> </td>\n\n"); } html = html.replace("%GO_LIST2%", goList.toString()); } else { html = html.replace("%ACTION_GO_RIGHT%", ""); html = html.replace("%GO_LIST2%", ""); } StringBuilder seller_list = new StringBuilder(""); String tpl = HtmCache.getInstance().getHtm(_pageRegionSTpl); for (int i = start; i < end; i++) { L2PcInstance seller = sellers.get(i); TradeList tl = null; if (seller.getPrivateStoreType() == PrivateStoreType.BUY) { tl = seller.getBuyList(); } else { tl = seller.getSellList(); } Map<Integer, L2ManufactureItem> cl = seller.getManufactureItems(); if ((tl == null) && (cl == null)) { continue; } String stpl = tpl; stpl = stpl.replace("%view_bypass%", "bypass _bbsregview;" + townId + ";" + type + ";" + page + ";" + seller.getObjectId() + ";" + byItem + ";" + search); stpl = stpl.replace("%seller_name%", seller.getName()); String title = "N/A"; if (type == 0) { title = (tl != null) && (tl.getTitle() != null) && !tl.getTitle().isEmpty() ? tl.getTitle() : "N/A"; } else if (type == 1) { title = (tl != null) && (tl.getTitle() != null) && !tl.getTitle().isEmpty() ? tl.getTitle() : "N/A"; } else if ((type == 2) && (seller.getPrivateStoreType() == PrivateStoreType.MANUFACTURE)) { title = (cl != null) && (seller.getStoreName() != null) && !seller.getStoreName().isEmpty() ? seller.getStoreName() : "-"; } title = title.replace("<", ""); title = title.replace(">", ""); title = title.replace("&", ""); title = title.replace("$", ""); if (title.isEmpty()) { title = "N/A"; } stpl = stpl.replace("%seller_title%", title); seller_list.append(stpl); } html = html.replace("%SELLER_LIST%", seller_list.toString()); html = html.replace("%search_bypass%", "_bbsregsearch_" + townId + "_" + type); html = html.replace("%TREE%", "&nbsp;>&nbsp;<a action=\"bypass _bbsregion;" + townId + "\"><font color=\"aa9977\"> " + HtmlUtils.htmlNpcString(town[0]) + "</font></a>&nbsp;>&nbsp;" + _regionTypes[type]); separateAndSend(html, player); } else if (command.startsWith("_bbsregview")) { st.nextToken(); int townId = Integer.parseInt(st.nextToken()); int type = Integer.parseInt(st.nextToken()); int page = Integer.parseInt(st.nextToken()); int objectId = Integer.parseInt(st.nextToken()); int byItem = Integer.parseInt(st.nextToken()); String search = st.hasMoreTokens() ? st.nextToken().toLowerCase() : ""; int[] town = _towns[townId]; L2PcInstance seller = L2World.getInstance().getPlayer(objectId); if ((seller == null) || (seller.getPrivateStoreType() == PrivateStoreType.NONE)) { parseCmd("_bbsreglist;" + townId + ";" + type + ";" + page + ";" + byItem + ";" + search, player); return; } String title = "-"; String tpl = HtmCache.getInstance().getHtm(_pageRegionStoreTpl); StringBuilder sb = new StringBuilder(""); if (type < 2) { TradeList sl = type == 0 ? seller.getSellList() : seller.getBuyList(); if (sl == null) { parseCmd("_bbsreglist;" + townId + ";" + type + ";" + page + ";" + byItem + ";" + search, player); return; } if ((type == 0) && (sl.getTitle() != null) && !sl.getTitle().isEmpty()) { title = sl.getTitle(); } else if ((type == 1) && (sl.getTitle() != null) && !sl.getTitle().isEmpty()) { title = sl.getTitle(); } for (TradeItem ti : sl.getItems()) { Item item = ItemTable.getInstance().getTemplate(ti.getItem().getItemId()); if (item != null) { String stpl = tpl.replace("%item_name%", ti.getItem().getName() + (ti.getItem().isEquipable() && (ti.getEnchant() > 0) ? " +" + ti.getEnchant() : "")); stpl = stpl.replace("%item_img%", item.getIcon()); stpl = stpl.replace("%item_count%", String.valueOf(ti.getCount())); stpl = stpl.replace("%item_price%", String.format("%,3d", ti.getPrice()).replace(" ", ",")); String desc = ""; if (item.getCrystalType() != CrystalType.NONE) { desc = _grade[item.getCrystalType().getId() - 1]; desc += item.getCrystalCount() > 0 ? " Crystals: " + item.getCrystalCount() + ";&nbsp;" : ";&nbsp;"; } if (item.isEquipable()) { //removed elements } if (item.isStackable()) { desc += "Stackable;&nbsp;"; } // FIXME /** * if (item.isSealedItem()) { desc += "Sealed;&nbsp;"; } if (item.isShadowItem()) { desc += "Shadow item;&nbsp;"; } if (item.isTimeItem()) { desc += "Temporal;&nbsp;"; } */ stpl = stpl.replace("%item_desc%", desc); sb.append(stpl); } } } else { Map<Integer, L2ManufactureItem> cl = seller.getManufactureItems(); if (cl == null) { parseCmd("_bbsreglist;" + townId + ";" + type + ";" + page + ";" + byItem + ";" + search, player); return; } if ((title = seller.getStoreName()) == null) { title = "-"; } for (L2ManufactureItem mi : seller.getManufactureItems().values()) { RecipeList rec = RecipeTable.getInstance().getRecipeByItemId(mi.getRecipeId() - 1); if (rec == null) { continue; } Item item = ItemTable.getInstance().getTemplate(rec.getId()); if (item == null) { continue; } String stpl = tpl.replace("%item_name%", item.getName()); stpl = stpl.replace("%item_img%", item.getIcon()); stpl = stpl.replace("%item_count%", "N/A"); stpl = stpl.replace("%item_price%", String.format("%,3d", mi.getCost()).replace(" ", ",")); String desc = ""; if (item.getCrystalType() != CrystalType.NONE) { desc = _grade[item.getCrystalType().getId() - 1] + (item.getCrystalCount() > 0 ? " Crystals: " + item.getCrystalCount() + ";&nbsp;" : ";&nbsp;"); } if (item.isStackable()) { desc = "Stackable;&nbsp;"; } // FIXME /** * if (item.isSealedItem()) { desc += "Sealed;&nbsp;"; } */ stpl = stpl.replace("%item_desc%", desc); sb.append(stpl); } } String html = HtmCache.getInstance().getHtm(_pageRegionView); html = html.replace("%sell_type%", _regionTypes[type]); title = title.replace("<", ""); title = title.replace(">", ""); title = title.replace("&", ""); title = title.replace("$", ""); if (title.isEmpty()) { title = "-"; } html = html.replace("%title%", title); html = html.replace("%char_name%", seller.getName()); html = html.replace("%object_id%", String.valueOf(seller.getObjectId())); html = html.replace("%STORE_LIST%", sb.toString()); html = html.replace("%list_bypass%", "_bbsreglist;" + townId + ";" + type + ";" + page + ";" + byItem + ";" + search); html = html.replace("%TREE%", "&nbsp;>&nbsp;<a action=\"bypass _bbsregion;" + townId + "\">" + HtmlUtils.htmlNpcString(town[0]) + "</a>&nbsp;>&nbsp;<a action=\"bypass _bbsreglist;" + townId + ";" + type + ";" + page + ";" + byItem + "\">" + _regionTypes[type] + "</a>&nbsp;>&nbsp;" + seller.getName()); separateAndSend(html, player); } else if (command.startsWith("_bbsregtarget")) { st.nextToken(); int objectId = Integer.parseInt(st.nextToken()); L2PcInstance seller = L2World.getInstance().getPlayer(objectId); if (seller != null) { player.sendPacket(new RadarControl(0, 2, seller.getLoc().getX(), seller.getLoc().getY(), seller.getLoc().getZ())); if (player.getKnownList().getKnownObject(seller.getObjectId()) != null) { player.setTarget(seller); seller.broadcastRelationChanged(); } } else { player.sendPacket(ActionFailed.STATIC_PACKET); } } return; } @SuppressWarnings("synthetic-access") private static List<L2PcInstance> getSellersList(int townId, int type, String search, boolean byItem) { List<L2PcInstance> list = new LinkedList<>(); int town[] = _towns[townId]; int rx = town[1]; int ry = town[2]; int offset = 0; for (L2PcInstance seller : L2World.getInstance().getAllPlayers().values()) { int tx = MapUtils.regionX(seller); int ty = MapUtils.regionY(seller); if ((tx >= (rx - offset)) && (tx <= (rx + offset)) && (ty >= (ry - offset)) && (ty <= (ry + offset))) { TradeItem[] tl = null; if (seller.getPrivateStoreType() == PrivateStoreType.BUY) { tl = seller.getBuyList().getItems(); } else { tl = seller.getSellList().getItems(); } Map<Integer, L2ManufactureItem> cl = seller.getManufactureItems(); if (seller.getPrivateStoreType() != PrivateStoreType.NONE) { if ((type == 0) && (tl != null) && ((seller.getPrivateStoreType() == PrivateStoreType.SELL) || (seller.getPrivateStoreType() == PrivateStoreType.PACKAGE_SELL))) { list.add(seller); } else if ((type == 1) && (tl != null) && (seller.getPrivateStoreType() == PrivateStoreType.BUY)) { list.add(seller); } else if ((type == 2) && (cl != null) && (seller.getPrivateStoreType() == PrivateStoreType.MANUFACTURE)) { list.add(seller); } } } } if (!search.isEmpty() && !list.isEmpty()) { List<L2PcInstance> s_list = new LinkedList<>(); for (L2PcInstance seller : list) { TradeList tl = null; if (seller.getPrivateStoreType() == PrivateStoreType.BUY) { tl = seller.getBuyList(); } else { tl = seller.getSellList(); } Map<Integer, L2ManufactureItem> cl = seller.getManufactureItems(); if (byItem) { if (((type == 0) || (type == 1)) && (tl != null)) { TradeItem[] sl = type == 0 ? seller.getSellList().getItems() : seller.getBuyList().getItems(); if (sl != null) { for (TradeItem ti : sl) { Item item = ItemTable.getInstance().getTemplate(ti.getItem().getItemId()); if ((item != null) && (item.getName() != null) && item.getName().toLowerCase().contains(search)) { s_list.add(seller); break; } } } } else if ((type == 2) && (cl != null)) { for (L2ManufactureItem mi : seller.getManufactureItems().values()) { RecipeList recipe = RecipeTable.getInstance().getRecipeList(mi.getRecipeId() - 1); if (recipe != null) { Item item = ItemTable.getInstance().getTemplate(recipe.getId()); if ((item != null) && (item.getName() != null) && item.getName().toLowerCase().contains(search)) { s_list.add(seller); break; } } } } } else if ((type == 0) && (tl != null) && (tl.getTitle() != null) && tl.getTitle().toLowerCase().contains(search)) { s_list.add(seller); } else if ((type == 1) && (tl != null) && (tl.getTitle() != null) && tl.getTitle().toLowerCase().contains(search)) { s_list.add(seller); } else if ((type == 2) && (cl != null) && (seller.hasManufactureShop()) && (seller.getStoreName() != null) && seller.getStoreName().toLowerCase().contains(search)) { s_list.add(seller); } } list = s_list; } if (!list.isEmpty()) { L2PcInstance[] players = new L2PcInstance[list.size()]; list.toArray(players); Arrays.sort(players, new PlayersComparator<L2PcInstance>()); list.clear(); list.addAll(Arrays.asList(players)); } return list; } @Override protected String getFolder() { return "region/"; } public void parsewrite(String url, String arg1, String arg2, String arg3, String arg4, String arg5, L2PcInstance player) { StringTokenizer st = new StringTokenizer(url, "_"); String cmd = st.nextToken(); if ("bbsregsearch".equals(cmd)) { int townId = Integer.parseInt(st.nextToken()); int type = Integer.parseInt(st.nextToken()); String byItem = "Item".equals(arg4) ? "1" : "0"; if (arg3 == null) { arg3 = ""; } arg3 = arg3.replace("<", ""); arg3 = arg3.replace(">", ""); arg3 = arg3.replace("&", ""); arg3 = arg3.replace("$", ""); if (arg3.length() > 30) { arg3 = arg3.substring(0, 30); } parseCmd("_bbsreglist;" + townId + ";" + type + ";1;" + byItem + ";" + arg3, player); } } private static class PlayersComparator<T> implements Comparator<T> { @Override public int compare(Object o1, Object o2) { if ((o1 instanceof L2PcInstance) && (o2 instanceof L2PcInstance)) { L2PcInstance p1 = (L2PcInstance) o1; L2PcInstance p2 = (L2PcInstance) o2; return p1.getName().compareTo(p2.getName()); } return 0; } } private static class SingletonHolder { protected static final RegionBBSManager _instance = new RegionBBSManager(); } } </spoiler>
  11. only the most foolish adms think this will work, is it all a will to see your servers full?
  12. This will work until players who do not know the engine find out what it is, who will donate to a server where you only have fake bots? My opinion: because instead of creating a mod that plays the role of adrenaline, which any player can use within the game itself, or even a simple system of macros where the player can be alone, this will help the lineage community 2 , many players have no time to create and no money to pay the bot, would be something fair.