Перейти к содержанию

BANNER

Пользователи
  • Публикаций

    44
  • Зарегистрирован

  • Посещение

  • Отзывы

    0%

Весь контент BANNER

  1. Нужно сделать NPC в сборке First team,нашел в папке xml всех мобов,пробовал скопировать одного только под другим id и заспавнить в игре,но не получилось,выдает "Проблема шаблона" или что то такое. В базе где добавить нового моба не нашел( кажется там нет вкладки с NPC совсем
  2. сборка Ребелион 688 ревизии,а геодаты разные ставил и везде тот же прикол
  3. Установил геодату но когда захожу на сервер то не могу двигаться персонажем, Подскажите в чем дело!
  4. если не трудно мог бы описать как сделать это,верней как в ядре это прописать
  5. Хочу сделать что бы статус дворянина давался сразу после создания персонажа.Помогите,как это сделать?
  6. Хочу добавить классовый скил,подскажите как это сделать? Например когда берешь ТХ тебе дается скил который мне надо!
  7. как добавить описание бафу,ну чтобы рядом с бафом было написано что он дает.помогите! Вот сам кусок штмл <tr> <td align=center> <button value="Greater Might" action="bypass -h scripts_services.NPCBuffer.Buffer:doBuff 7057 1 0" width=88 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <button value="Wind Walk" action="bypass -h scripts_services.NPCBuffer.Buffer:doBuff 1204 2 0" width=88 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> <td align=center> <button value="Focus" action="bypass -h scripts_services.NPCBuffer.Buffer:doBuff 1077 3 0" width=88 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"> </td> </tr>
  8. Где редактировать баффера в Alt+B?Хотел добавить описание бафов и добавить некоторые бафы.Подскажите в какой папке штмл для редактирование.Сборка л2 хф ребелион тим rev 688
  9. Нет,30-это порядок вычесления,так как у меня на 40 бафы и статы от точки шмота на 80,а мне нужно что бы они подпали под процент умножения.Да и другие статы работают со значением 90
  10. С етим статом не добавляет шмот на сервер. <mul order="0x90" stat="absorbDam" value="1.10"/> Какой стат на stat="absorbDam" так как этот явно не работает?
  11. Запускаю гейм сервер и вот это,а потом зависает.Как исправить? SEVERE Error loading Map Region Table. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'l2emudb.mapreg ion' doesn't exist at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja va:2155) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java: 2322) at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeQuery(P reparedStatementWrapper.java:846) at net.l2emuproject.gameserver.instancemanager.MapRegionManager.<init>(M apRegionManager.java:68) at net.l2emuproject.gameserver.instancemanager.MapRegionManager$Singleto nHolder.<clinit>(MapRegionManager.java:392) at net.l2emuproject.gameserver.instancemanager.MapRegionManager.getInsta nce...
  12. через ExternalHostname - Ваш Интернет IP или InternalHostname - Ваш Локальный IP в базе прописано и на гейм сервере
  13. ну это под локал хост,а как поставить на интернет выход,ну свою ИП,чтобы другие могли конекнутся
  14. проблема почалась после смены IP на свой,на локал хосте все работало
  15. # ================================================================ # Настройки сервера авторизации # ================================================================ # Хост и порт для клиентских соединений LoginserverHostname = 46.200.111.172 LoginserverPort = 2106 # Хост и порт для игровых серверов LoginHost = * LoginPort = 9014 # Принимать новый игровой сервер в свободный слот AcceptNewGameServer = True # Настройки БД Driver = com.mysql.jdbc.Driver URL = jdbc:mysql://localhost/l2rdb Login = root Password =123zxc MaximumDbConnections = 3 # Через сколько секунд после последней активности будут закрыватся соединения с базой, по умолчанию 600 (10 минут) MaxIdleConnectionTimeout = 600 # Интервал проверки неактивных соединений, по умолчанию 60 (1 минута) IdleConnectionTestPeriod = 60 # Автоматическое создание аккаунтов AutoCreateAccounts = True # Шаблон для логина и пароля AccountTemplate = [A-Za-z0-9]{4,14} PasswordTemplate = [A-Za-z0-9]{4,16} # Хаш для паролей # Актуальное хеширование, рекомендуется whirlpool2 PasswordHash = whirlpool2 # Поддерживаемые устаревшие методы, например sha1 (l2jserver) LegacyPasswordHash = sha1 # Кеширование ключей BlowFishKeys = 20 RSAKeyPairs = 10 # Автобан IP # Количество неудачных входов, до бана IP LoginTryBeforeBan = 10 # Допустимое минимальное время между авторизациями с одного IP (в секундах) LoginTryTimeout = 5 # Время бана IP, если превышено количество неудачных входов (в секундах) IpBanTime = 300 # Логировать успешные входы в БД LoginLog = true # Пинг игрового сервера # Время между пингами, в секундах, 0 - отключить GameServerPingDelay = 30 # Максимальное число неудачных попыток пинга, после превышения которого, связь с игровым сервером прерывается GameServerPingRetry = 4 # Защита от брута. Если не правильный пароль, то при входе сервера будут отображаться как офф. FakeLogin = False
  16. Не запускается логин сервер,вот что пишет Starting Rebellion GameServer. Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; suppor t was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup port was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated a nd will likely be removed in a future release [16:16:10] INFO Loaded 127 server names [16:16:10] INFO Loaded whirlpool2 as default crypt. [16:16:11] INFO Cached 10 KeyPairs for RSA communication [16:16:11] INFO Stored 20 keys for Blowfish communication [16:16:11] INFO Loaded 0 registered GameServer(s). Exception in thread "main" java.net.BindException: Cannot assign requested addre ss: bind at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.Net.bind(Unknown Source) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at l2r.loginserver.gameservercon.GameServerCommunication.openServerSocke t(GameServerCommunication.java:52) at l2r.loginserver.AuthServer.<init>(AuthServer.java:40) at l2r.loginserver.AuthServer.main(AuthServer.java:88) Server terminated abnormaly ... Server terminated ... Для продолжения нажмите любую клавишу . . .
  17. Не запускается зборка,ни гейм ни логин сервер пишет Starting Rebellion LoginServer. Error: Could not find or load main class l2r.loginserver.LoginServer Server terminated abnormaly ... Server terminated ... Для продолжения нажмите любую клавишу . . Сборка rebellion team rev 602 Вот бат файл @echo off title Rebellion: Login Server Console :start echo Starting Rebellion LoginServer. echo. java -Xbootclasspath/p:./ -server -Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m -cp config;./libs/* l2r.loginserver.LoginServer if ERRORLEVEL 2 goto restart if ERRORLEVEL 1 goto error goto end :restart echo. echo Server restarted ... echo. goto start :error echo. echo Server terminated abnormaly ... echo. :end echo. echo Server terminated ... echo. pause
  18. package services.community; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.StringTokenizer; import l2r.gameserver.Config; import l2r.gameserver.data.htm.HtmCache; import l2r.gameserver.data.xml.holder.ItemHolder; import l2r.gameserver.data.xml.holder.RecipeHolder; import l2r.gameserver.handler.bbs.CommunityBoardManager; import l2r.gameserver.handler.bbs.ICommunityBoardHandler; import l2r.gameserver.model.GameObjectsStorage; import l2r.gameserver.model.Player; import l2r.gameserver.model.Recipe; import l2r.gameserver.model.World; import l2r.gameserver.model.items.ManufactureItem; import l2r.gameserver.model.items.TradeItem; import l2r.gameserver.network.serverpackets.RadarControl; import l2r.gameserver.network.serverpackets.ShowBoard; import l2r.gameserver.scripts.ScriptFile; import l2r.gameserver.templates.item.ItemTemplate; import l2r.gameserver.utils.HtmlUtils; import l2r.gameserver.utils.MapUtils; import l2r.gameserver.utils.Util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class RegionCommunity implements ScriptFile, ICommunityBoardHandler { private static final Logger _log = LoggerFactory.getLogger(RegionCommunity.class); 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[] _elements = { "&$1622;", "&$1623;", "&$1624;", "&$1625;", "&$1626;", "&$1627;" }; private static final String[] _grade = { "&$1291;", "&$1292;", "&$1293;", "&$1294;", "&$1295;", "S80 Grade", "S84 Grade" }; private static final int SELLER_PER_PAGE = 12; @Override public void onLoad() { if(Config.COMMUNITYBOARD_ENABLED) { _log.info("CommunityBoard: Region service loaded."); CommunityBoardManager.getInstance().registerHandler(this); } } @Override public void onReload() { if(Config.COMMUNITYBOARD_ENABLED) CommunityBoardManager.getInstance().removeHandler(this); } @Override public void onShutdown() {} @Override public String[] getBypassCommands() { return new String[] { "_bbsloc", "_bbsregion_", "_bbsreglist_", "_bbsregsearch", "_bbsregview_", "_bbsregtarget_" }; } @Override public void onBypassCommand(Player player, String bypass) { StringTokenizer st = new StringTokenizer(bypass, "_"); String cmd = st.nextToken(); player.setSessionVar("add_fav", null); if("bbsloc".equals(cmd)) { String tpl = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_regiontpl.htm", player); 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(Player seller : GameObjectsStorage.getAllPlayersForIterate()) { 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 && seller.getPrivateStoreType() != Player.STORE_OBSERVING_GAMES) sellers++; } reg = reg.replace("%sellers_count%", String.valueOf(sellers)); rl.append(reg); } HashMap<Integer, String> tpls = Util.parseTemplate(HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_region_list.htm", player)); String html = tpls.get(0); html = html.replace("%REGION_LIST%", rl.toString()); html = html.replace("<?tree_menu?>", tpls.get(1)); ShowBoard.separateAndSend(html, player); } else if("bbsregion".equals(cmd)) { String tpl = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_regiontpl.htm", player); int townId = Integer.parseInt(st.nextToken()); StringBuilder rl = new StringBuilder(""); int[] town = _towns[townId]; player.setSessionVar("add_fav", bypass + "&Region " + 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(Player seller : GameObjectsStorage.getAllPlayersForIterate()) { 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() == Player.STORE_PRIVATE_SELL || seller.getPrivateStoreType() == Player.STORE_PRIVATE_SELL_PACKAGE)) sellers++; else if(type == 1 && seller.getPrivateStoreType() == Player.STORE_PRIVATE_BUY) sellers++; else if(type == 2 && seller.getPrivateStoreType() == Player.STORE_PRIVATE_MANUFACTURE) sellers++; } } reg = reg.replace("%sellers_count%", String.valueOf(sellers)); rl.append(reg); } HashMap<Integer, String> tpls = Util.parseTemplate(HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_region_list.htm", player)); String html = tpls.get(0); html = html.replace("%REGION_LIST%", rl.toString()); html = html.replace("<?tree_menu?>", tpls.get(2).replace("%TREE%", " > " + HtmlUtils.htmlNpcString(town[0]))); ShowBoard.separateAndSend(html, player); } else if("bbsreglist".equals(cmd)) { 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]; player.setSessionVar("add_fav", bypass + "&Region " + townId + " " + _regionTypes[type]); List<Player> 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().getNotNull(Config.BBS_HOME_DIR + "bbs_region_sellers.htm", player); 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().getNotNull(Config.BBS_HOME_DIR + "bbs_region_stpl.htm", player); for(int i = start; i < end; i++) { Player seller = sellers.get(i); List<TradeItem> tl = seller.getTradeList(); List<ManufactureItem> cl = seller.getCreateList(); 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 = "-"; if(type == 0) title = tl != null && seller.getSellStoreName() != null && !seller.getSellStoreName().isEmpty() ? seller.getSellStoreName() : "-"; else if(type == 1) title = tl != null && seller.getBuyStoreName() != null && !seller.getBuyStoreName().isEmpty() ? seller.getBuyStoreName() : "-"; else if(type == 2 && seller.getPrivateStoreType() == Player.STORE_PRIVATE_MANUFACTURE) title = cl != null && seller.getManufactureName() != null && !seller.getManufactureName().isEmpty() ? seller.getManufactureName() : "-"; title = title.replace("<", ""); title = title.replace(">", ""); title = title.replace("&", ""); title = title.replace("$", ""); if(title.isEmpty()) title = "-"; 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%", " > <a action=\"bypass _bbsregion_" + townId + "\">" + HtmlUtils.htmlNpcString(town[0]) + "</a> > " + _regionTypes[type]); ShowBoard.separateAndSend(html, player); } else if("bbsregview".equals(cmd)) { 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]; Player seller = World.getPlayer(objectId); if(seller == null || seller.getPrivateStoreType() == 0) { onBypassCommand(player, "_bbsreglist_" + townId + "_" + type + "_" + page + "_" + byItem + "_" + search); return; } String title = "-"; String tpl = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_region_storetpl.htm", player); StringBuilder sb = new StringBuilder(""); if(type < 2) { List<TradeItem> sl = type == 0 ? seller.getSellList() : seller.getBuyList(); List<TradeItem> tl = seller.getTradeList(); if(sl == null || sl.isEmpty() || tl == null) { onBypassCommand(player, "_bbsreglist_" + townId + "_" + type + "_" + page + "_" + byItem + "_" + search); return; } if(type == 0 && seller.getSellStoreName() != null && !seller.getSellStoreName().isEmpty()) title = seller.getSellStoreName(); else if(type == 1 && seller.getBuyStoreName() != null && !seller.getBuyStoreName().isEmpty()) title = seller.getBuyStoreName(); for(TradeItem ti : sl) { ItemTemplate item = ItemHolder.getInstance().getTemplate(ti.getItemId()); if(item != null) { String stpl = tpl.replace("%item_name%", item.getName() + (item.isEquipment() && ti.getEnchantLevel() > 0 ? " +" + ti.getEnchantLevel() : "")); 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.getOwnersPrice()).replace(" ", ",")); String desc = ""; if(item.getCrystalType() != ItemTemplate.Grade.NONE) { desc = _grade[item.getCrystalType().ordinal() - 1]; desc += item.getCrystalCount() > 0 ? (player.isLangRus() ? " Кристаллов: " : " Crystals: ") + item.getCrystalCount() + "; " : "; "; } if(item.isEquipment()) if(ti.getAttackElement() >= 0 && ti.getAttackElementValue() > 0) desc += "&$1620;: " + _elements[ti.getAttackElement()] + " +" + ti.getAttackElementValue(); else if(ti.getDefenceFire() > 0 || ti.getDefenceWater() > 0 || ti.getDefenceWind() > 0 || ti.getDefenceEarth() > 0 || ti.getDefenceHoly() > 0 || ti.getDefenceUnholy() > 0) { desc += "&$1651;:"; if(ti.getDefenceFire() > 0) desc += " &$1622; +" + ti.getDefenceFire() + "; "; if(ti.getDefenceWater() > 0) desc += " &$1623; +" + ti.getDefenceWater() + "; "; if(ti.getDefenceWind() > 0) desc += " &$1624; +" + ti.getDefenceWind() + "; "; if(ti.getDefenceEarth() > 0) desc += " &$1625; +" + ti.getDefenceEarth() + "; "; if(ti.getDefenceHoly() > 0) desc += " &$1626; +" + ti.getDefenceHoly() + "; "; if(ti.getDefenceUnholy() > 0) desc += " &$1627; +" + ti.getDefenceUnholy() + "; "; } if(item.isStackable()) desc += player.isLangRus() ? "Стыкуемый; " : "Stackable; "; if(item.isSealedItem()) desc += player.isLangRus() ? "Запечатанный; " : "Sealed; "; if(item.isShadowItem()) desc += player.isLangRus() ? "Теневой предмет; " : "Shadow item; "; if(item.isTemporal()) desc += player.isLangRus() ? "Временный; " : "Temporal; "; stpl = stpl.replace("%item_desc%", desc); sb.append(stpl); } } } else { List<ManufactureItem> cl = seller.getCreateList(); if(cl == null) { onBypassCommand(player, "_bbsreglist_" + townId + "_" + type + "_" + page + "_" + byItem + "_" + search); return; } if((title = seller.getManufactureName()) == null) title = "-"; for(ManufactureItem mi : cl) { Recipe rec = RecipeHolder.getInstance().getRecipeByRecipeId(mi.getRecipeId() - 1); if(rec == null) continue; ItemTemplate item = ItemHolder.getInstance().getTemplate(rec.getItemId()); 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() != ItemTemplate.Grade.NONE) desc = _grade[item.getCrystalType().ordinal() - 1] + (item.getCrystalCount() > 0 ? (player.isLangRus() ? " Кристаллов: " : " Crystals: ") + item.getCrystalCount() + "; " : "; "); if(item.isStackable()) desc = player.isLangRus() ? "Стыкуемый; " : "Stackable; "; if(item.isSealedItem()) desc += player.isLangRus() ? "Запечатанный; " : "Sealed; "; stpl = stpl.replace("%item_desc%", desc); sb.append(stpl); } } String html = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "bbs_region_view.htm", player); 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%", " > <a action=\"bypass _bbsregion_" + townId + "\">" + HtmlUtils.htmlNpcString(town[0]) + "</a> > <a action=\"bypass _bbsreglist_" + townId + "_" + type + "_" + page + "_" + byItem + "_\">" + _regionTypes[type] + "</a> > " + seller.getName()); ShowBoard.separateAndSend(html, player); } else if("bbsregtarget".equals(cmd)) { int objectId = Integer.parseInt(st.nextToken()); Player seller = World.getPlayer(objectId); if(seller != null) { player.sendPacket(new RadarControl(0, 2, seller.getLoc())); if(player.knowsObject(seller)) { player.setObjectTarget(seller); seller.broadcastRelationChanged(); } } else player.sendActionFailed(); } } @Override public void onWriteCommand(Player player, String bypass, String arg1, String arg2, String arg3, String arg4, String arg5) { StringTokenizer st = new StringTokenizer(bypass, "_"); 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); onBypassCommand(player, "_bbsreglist_" + townId + "_" + type + "_1_" + byItem + "_" + arg3); } } private static List<Player> getSellersList(int townId, int type, String search, boolean byItem) { List<Player> list = new ArrayList<Player>(); int town[] = _towns[townId]; int rx = town[1]; int ry = town[2]; int offset = 0; for(Player seller : GameObjectsStorage.getAllPlayersForIterate()) { int tx = MapUtils.regionX(seller); int ty = MapUtils.regionY(seller); if(tx >= rx - offset && tx <= rx + offset && ty >= ry - offset && ty <= ry + offset) { List<TradeItem> tl = seller.getTradeList(); List<ManufactureItem> cl = seller.getCreateList(); if(seller.getPrivateStoreType() > 0) if(type == 0 && tl != null && (seller.getPrivateStoreType() == Player.STORE_PRIVATE_SELL || seller.getPrivateStoreType() == Player.STORE_PRIVATE_SELL_PACKAGE)) list.add(seller); else if(type == 1 && tl != null && seller.getPrivateStoreType() == Player.STORE_PRIVATE_BUY) list.add(seller); else if(type == 2 && cl != null && seller.getPrivateStoreType() == Player.STORE_PRIVATE_MANUFACTURE) list.add(seller); } } if(!search.isEmpty() && !list.isEmpty()) { List<Player> s_list = new ArrayList<Player>(); for(Player seller : list) { List<TradeItem> tl = seller.getTradeList(); List<ManufactureItem> cl = seller.getCreateList(); if(byItem) { if((type == 0 || type == 1) && tl != null) { List<TradeItem> sl = type == 0 ? seller.getSellList() : seller.getBuyList(); if(sl != null) for(TradeItem ti : sl) { ItemTemplate item = ItemHolder.getInstance().getTemplate(ti.getItemId()); if(item != null && item.getName() != null && item.getName().toLowerCase().contains(search)) { s_list.add(seller); break; } } } else if(type == 2 && cl != null) for(ManufactureItem mi : cl) { Recipe recipe = RecipeHolder.getInstance().getRecipeByRecipeId(mi.getRecipeId() - 1); if(recipe != null) { ItemTemplate item = ItemHolder.getInstance().getTemplate(recipe.getItemId()); if(item != null && item.getName() != null && item.getName().toLowerCase().contains(search)) { s_list.add(seller); break; } } } } else if(type == 0 && tl != null && seller.getSellStoreName() != null && seller.getSellStoreName().toLowerCase().contains(search)) s_list.add(seller); else if(type == 1 && tl != null && seller.getBuyStoreName() != null && seller.getBuyStoreName().toLowerCase().contains(search)) s_list.add(seller); else if(type == 2 && cl != null && seller.getCreateList() != null && seller.getManufactureName() != null && seller.getManufactureName().toLowerCase().contains(search)) s_list.add(seller); } list = s_list; } if(!list.isEmpty()) { Player[] players = new Player[list.size()]; list.toArray(players); Arrays.sort(players, new PlayersComparator<Player>()); list.clear(); list.addAll(Arrays.asList(players)); } return list; } private static class PlayersComparator<T> implements Comparator<T> { @Override public int compare(Object o1, Object o2) { if(o1 instanceof Player && o2 instanceof Player) { Player p1 = (Player) o1; Player p2 = (Player) o2; return p1.getName().compareTo(p2.getName()); } return 0; } } }
  19. Вот что пишет 23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:149,15: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:155,16: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:156,53: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:179,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:180,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:181,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:185,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:186,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:191,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:200,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:206,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:210,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:211,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:227,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:228,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:237,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:238,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:239,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:240,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:245,17: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:250,16: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:251,16: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:252,16: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:298,25: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:299,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:300,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:301,86: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:338,19: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:366,24: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:367,18: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:368,18: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:369,78: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:380,18: The method replace(char, char) in the type java.lang.String i s not applicable for the arguments (java.lang.String, java.lang.String) [23:48:22] ERROR C:\Server\gameserver\data\scripts\services\community\RegionComm unity.java:387,16: The method replace(char, char) in the type java.lang.String i s not applic..
×
×
  • Создать...