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

GUSTAVO

Постоялец
  • Публикаций

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

  • Посещение

  • Победитель дней

    3
  • Отзывы

    0%

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

  1. Смотрите в исходе бафера условие в котором взымается плата за баф и добавьте туда проверку на ПА
  2. GUSTAVO

    l2jdev_last

    Не проходит подключение к бд, смотрите конфиг
  3. GUSTAVO

    Last Hero l2j

    Прочитай еще раз пост. Я не просил критики по этому поводу.
  4. GUSTAVO

    Last Hero l2j

    Ребята, есть у кого ласт хиро под лыжу хф? Поделитесь, чет найти не могу
  5. А в целом наборы бафов как бафает? Если медленно по одному бафу, то смени dsetup от rguard или отключи кго вообще и еще можешь посмотреть флудпротект на байпасы там конфиг есть или нет, не помню
  6. Сборка какая? В байпас кнопок дописывай обновление кбшки
  7. GUSTAVO

    Ищу данный сет

    А я чет обратил ток на то что ты выделил)
  8. Эм, ты выставил в xml иконки и стало показывать? Я давным давно как то тоже залез в это сборище и мне по моему в xml не пологло иконки выставит, решение нашел в таблице. И то что емурт постороена не на таблице, это не значит что в кб у тебя должно быть так) на заточку там скрипт написан и в скрипте указано откуда брать иконки)
  9. GUSTAVO

    Ищу данный сет

    Ну так хеви лайт и роба , там же стоят буквы обозначающие h l и r
  10. В базе есть таблица item_icons в нее добавляешь id вещи и иконку
  11. Если ты пытаешься с ит шмот запихать в хф, у тебя не получится, там в клиент части разные armorgrp , на хф в бд не надо шмот заливать, только xml файлы. Из этих xml файлов считываются ид частей шмота и инфа по ним(перчатка это или сапоги, цены, материал и тд..) и далее отправляется пакет в клиент который и отображает твой шмот. сборки эти есть на форуме, юзай поиск.
  12. Попробуй сперва просто запустить сборку. Скачай, например, l2jserver без наворотов и дополнений или l2jworldzone - тут уже есть куча добавлений, но исходов не видел. Если хочешь можешь взять с исходниками l2jps , тот же l2jworldzone. l2jps и l2jwordzone основаны на l2jserver, только там исходы довольно старые уже (ну я думаю тебе не столь важно раз для себя будешь использовать) 1. Есть куча мануалов по установке программ и заупску сборки l2jserver. 2. Бери xml и sql те что уже есть в сборке, например если у тебя есть клиент часть шмота, открой xml того же дино сет, скопируй строки и просто смени id на частях сета. 3. Насчет костюмизации, в шаре не видел (да и не искал) сборок с этой реализацией, делается это дело в исходниках. В сборках которые указывал выше (кроме чистого l2jserver т.к. там только tvt евент с конфигами) есть ивенты, можешь полазить по конфигам и попробывать что либо изменить, но там евенты кривые. 4. Лобби есть в интернете от разных хроник, просто в клиент добавляешь с заменой текстуру. Насчет создания новой ничего не подскажу. А вообще гугл знает ответ на любой твой вопрос по этому поводу.
  13. GUSTAVO

    Lameupdater

    LameUpdater обращает внимание на регистр букв. Т.е. если у вас в клиенте путь lineage2/system а в patchlist.xml записано как System (первая буква заглавная) то заменять файлы он не станет. проверьте возможно проблема в этом
  14. я брал чистый сурс и такого не добавлял)
  15. ризировать (и нужно), чтобы избавиться от громоздкости.) В PcInstance (вроде так называется Player в лыже) сделать метод visualId(ид слота), который возвращает подмененный ид итема. hasVisual(ид слота) - тоже самое, только если ид итема не пуст, то возвращает true. Спасибо за помощь!! Сегодня дома буду пробывать, отпишу сюда отчет.
  16. А т.е. над этим условием надо делать еще условие на то что вообще есть в бд id другой перчатки или нет? пример for (int slot : getPaperdollOrder()) { if (ячейка в бд имеет id перчатки) { if(slot == Inventory.PAPERDOLL_GLOVES) { writeD(ИД_ИТЕМА_ИЗ_БД); } else { writeD(_activeChar.getInventory().getPaperdollObjectId(slot)); } } else { writeD(_activeChar.getInventory().getPaperdollObjectId(slot)); } } Hide так делать?
  17. Лыжа) писал в первом посте l2j high five)
  18. Я тут голову уже забил первым вариантом и думаю его и надо как то доделать)
  19. Условие не понял: slot == Inventory.PAPERDOLL_GLOVES if(slot == Inventory.PAPERDOLL_GLOVES && в БД используется визуально другая перчатка){ writeD(ИД_ИТЕМА_ИЗ_БД); } else{ writeD(_activeChar.getInventory().getPaperdollObjectId(slot)); } Так получается надо?
  20. И как лучше сделать? Допустим через кб будет добавляться id визуальной перчатки в БД. Нужно сделать новый метод на подобие getPaperdollOrder и в него добавлять условия, если в БД есть значение на перчатки то ставить id из БД, если на ботинках нет значения, тогда добавляем стандартные и тд.. ? Вот стандартные методы: PAPERDOLL_ORDER private static final int[] PAPERDOLL_ORDER = new int[] { Inventory.PAPERDOLL_UNDER, Inventory.PAPERDOLL_HEAD, Inventory.PAPERDOLL_RHAND, Inventory.PAPERDOLL_LHAND, Inventory.PAPERDOLL_GLOVES, Inventory.PAPERDOLL_CHEST, Inventory.PAPERDOLL_LEGS, Inventory.PAPERDOLL_FEET, Inventory.PAPERDOLL_CLOAK, Inventory.PAPERDOLL_RHAND, Inventory.PAPERDOLL_HAIR, Inventory.PAPERDOLL_HAIR2, Inventory.PAPERDOLL_RBRACELET, Inventory.PAPERDOLL_LBRACELET, Inventory.PAPERDOLL_DECO1, Inventory.PAPERDOLL_DECO2, Inventory.PAPERDOLL_DECO3, Inventory.PAPERDOLL_DECO4, Inventory.PAPERDOLL_DECO5, Inventory.PAPERDOLL_DECO6, Inventory.PAPERDOLL_BELT }; Hide и такой getPaperdollOrder protected int[] getPaperdollOrder() { return PAPERDOLL_ORDER; } Hide Менять нужно только первое? Например на такое? измененный private static final int[] PAPERDOLL_ORDER = new int[] { Inventory.PAPERDOLL_UNDER, Inventory.PAPERDOLL_HEAD, if (есть значение в БД) { id из БД } else { Inventory.PAPERDOLL_RHAND, } if (есть значение в БД) { id из БД } else { Inventory.PAPERDOLL_LHAND, } if (есть значение в БД) { id из БД } else { Inventory.PAPERDOLL_GLOVES, } if (есть значение в БД) { id из БД } else { Inventory.PAPERDOLL_CHEST, } if (есть значение в БД) { id из БД } else { Inventory.PAPERDOLL_LEGS, } if (есть значение в БД) { id из БД } else { Inventory.PAPERDOLL_FEET, } Inventory.PAPERDOLL_CLOAK, Inventory.PAPERDOLL_RHAND, Inventory.PAPERDOLL_HAIR, Inventory.PAPERDOLL_HAIR2, Inventory.PAPERDOLL_RBRACELET, Inventory.PAPERDOLL_LBRACELET, Inventory.PAPERDOLL_DECO1, Inventory.PAPERDOLL_DECO2, Inventory.PAPERDOLL_DECO3, Inventory.PAPERDOLL_DECO4, Inventory.PAPERDOLL_DECO5, Inventory.PAPERDOLL_DECO6, Inventory.PAPERDOLL_BELT }; Hide Так будет правильно? Или я что то попутал сейчас и id он ищет в том цикле? В цикле вроде он id перечисляет так: _activeChar.getInventory().getPaperdollItemDisplayId(slot) где slot - (int slot : getPaperdollOrder()) Так я выше получается не правильно написал в спойлере и id мне надо выставлять в методе getPaperdollItemDisplayId ??
  21. оба класса нужно редактировать? или одного достаточно? в обеих классах нашел строки: тык for (int slot : getPaperdollOrder()) { writeD(_activeChar.getInventory().getPaperdollObjectId(slot)); } for (int slot : getPaperdollOrder()) { writeD(_activeChar.getInventory().getPaperdollItemDisplayId(slot)); } Hide в классе UserInfo.java нашел writeD(_activeChar.getActiveWeaponItem() != null ? 40 : 20); // 20 no weapon, 40 weapon equipped как понял это пушка Можете пояснить что за что отвечает? в спойлере
  22. Приветствую форумчан ! Подскажите как реализовать костюмизацию (менять внешний вид шмота и пух)? сборка l2j high five , искал на просторах инэта и нашел только что нужно смотреть в сторону CharInfo.java и UserInfo.java , открыл эти классы, посмотрел и чего то не лезет в голову как правильно подменять пакет с визулкой шмота и пух и где он там вообще. Пробывал по специальному эффекту смотреть, не понятно, но вроде связанно как то с теми классами. Может есть у кого примеры на l2j ? кто подскажет и может быть поделится примерами?
  23. Всем привет. Может кто сталкивался с такой ерундой? Добавил в кб мультиселы, нажимаю, открывает окно с мультиселом, а купить не получается ничего. Такое бывает не всегда. бывает нормально покупает, а бывает не покупает ничего. в гс ничего не выводит, никаких реакций. тупо ничего не происходит. Вот код на мультиселл : Тык if (command.startsWith("_bbsmultisell;")) { if (!canUse(activeChar, !Config.MULTISELL_CB_DEAD, !Config.MULTISELL_CB_IVENT, !Config.MULTISELL_CB_SIEGE, !Config.MULTISELL_CB_CAST, !Config.MULTISELL_CB_COMBAT, !Config.MULTISELL_CB_FLAG, !Config.MULTISELL_CB_OLYMPIAD, !Config.MULTISELL_CB_JAIL, !Config.MULTISELL_CB_FLY, !Config.MULTISELL_CB_KARMA, !Config.MULTISELL_CB_DUEL, !Config.MULTISELL_CB_SIT, !Config.MULTISELL_CB_INSTANCE)) { return false; } final StringTokenizer st = new StringTokenizer(command, ";"); st.nextToken(); int listId = 778; int idp = Integer.parseInt(st.nextToken()); try { listId = Integer.parseInt(st.nextToken()); } catch (final Exception e) { activeChar.sendMessage("Ohh Cheat dont work? You have a problem now!"); Util.handleIllegalPlayerAction(activeChar, "Client " + client.toString() + " Failed: [Community Board] No found ID!", Config.DEFAULT_PUNISH); } String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Shop/" + idp + ".html"); CommunityBoardHandler.separateAndSend(content, activeChar); MultisellData.getInstance().separateAndSend(listId, activeChar, null, false); } Hide Проверку на npc не убирал, может это влияет? Но почему раз через раз? Вот MultisellData.java тЫк /* * Copyright (C) 2004-2016 L2J Server * * This file is part of L2J Server. * * L2J Server 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. * * L2J Server 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 com.l2jserver.gameserver.data.xml.impl; import java.io.File; import java.io.FileFilter; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import com.l2jserver.Config; import com.l2jserver.gameserver.model.StatsSet; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.multisell.Entry; import com.l2jserver.gameserver.model.multisell.Ingredient; import com.l2jserver.gameserver.model.multisell.ListContainer; import com.l2jserver.gameserver.model.multisell.PreparedListContainer; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo; import com.l2jserver.gameserver.network.serverpackets.MultiSellList; import com.l2jserver.gameserver.network.serverpackets.SystemMessage; import com.l2jserver.gameserver.network.serverpackets.UserInfo; import com.l2jserver.gameserver.util.Util; import com.l2jserver.util.data.xml.IXmlReader; import com.l2jserver.util.file.filter.NumericNameFilter; public final class MultisellData implements IXmlReader { private final Map<Integer, ListContainer> _entries = new HashMap<>(); public static final int PAGE_SIZE = 40; // Special IDs. public static final int PC_BANG_POINTS = -100; public static final int CLAN_REPUTATION = -200; public static final int FAME = -300; // Misc private static final FileFilter NUMERIC_FILTER = new NumericNameFilter(); protected MultisellData() { load(); } @Override public void load() { _entries.clear(); parseDatapackDirectory("data/multisell", false); if (Config.CUSTOM_MULTISELL_LOAD) { parseDatapackDirectory("data/multisell/custom", false); } verify(); LOG.info("{}: Loaded {} multisell lists.", getClass().getSimpleName(), _entries.size()); } @Override public void parseDocument(Document doc, File f) { try { int id = Integer.parseInt(f.getName().replaceAll(".xml", "")); int entryId = 1; Node att; final ListContainer list = new ListContainer(id); for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) { if ("list".equalsIgnoreCase(n.getNodeName())) { att = n.getAttributes().getNamedItem("applyTaxes"); list.setApplyTaxes((att != null) && Boolean.parseBoolean(att.getNodeValue())); att = n.getAttributes().getNamedItem("useRate"); if (att != null) { try { list.setUseRate(Double.valueOf(att.getNodeValue())); if (list.getUseRate() <= 1e-6) { throw new NumberFormatException("The value cannot be 0"); // threat 0 as invalid value } } catch (NumberFormatException e) { try { list.setUseRate(Config.class.getField(att.getNodeValue()).getDouble(Config.class)); } catch (Exception e1) { LOG.warn("{}: Unable to parse {}", getClass().getSimpleName(), doc.getLocalName(), e1); list.setUseRate(1.0); } } catch (DOMException e) { LOG.warn("{}: Unable to parse {}", getClass().getSimpleName(), doc.getLocalName(), e); } } att = n.getAttributes().getNamedItem("maintainEnchantment"); list.setMaintainEnchantment((att != null) && Boolean.parseBoolean(att.getNodeValue())); for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) { if ("item".equalsIgnoreCase(d.getNodeName())) { Entry e = parseEntry(d, entryId++, list); list.getEntries().add(e); } else if ("npcs".equalsIgnoreCase(d.getNodeName())) { for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { if ("npc".equalsIgnoreCase(b.getNodeName())) { if (Util.isDigit(b.getTextContent())) { list.allowNpc(Integer.parseInt(b.getTextContent())); } } } } } } } _entries.put(id, list); } catch (Exception e) { LOG.error("{}: Error in file {}", getClass().getSimpleName(), f, e); } } @Override public FileFilter getCurrentFileFilter() { return NUMERIC_FILTER; } private final Entry parseEntry(Node n, int entryId, ListContainer list) { Node first = n.getFirstChild(); final Entry entry = new Entry(entryId); NamedNodeMap attrs; Node att; StatsSet set; for (n = first; n != null; n = n.getNextSibling()) { if ("ingredient".equalsIgnoreCase(n.getNodeName())) { attrs = n.getAttributes(); set = new StatsSet(); for (int i = 0; i < attrs.getLength(); i++) { att = attrs.item(i); set.set(att.getNodeName(), att.getNodeValue()); } entry.addIngredient(new Ingredient(set)); } else if ("production".equalsIgnoreCase(n.getNodeName())) { attrs = n.getAttributes(); set = new StatsSet(); for (int i = 0; i < attrs.getLength(); i++) { att = attrs.item(i); set.set(att.getNodeName(), att.getNodeValue()); } entry.addProduct(new Ingredient(set)); } } return entry; } /** * This will generate the multisell list for the items.<br> * There exist various parameters in multisells that affect the way they will appear: * <ol> * <li>Inventory only: * <ul> * <li>If true, only show items of the multisell for which the "primary" ingredients are already in the player's inventory. By "primary" ingredients we mean weapon and armor.</li> * <li>If false, show the entire list.</li> * </ul> * </li> * <li>Maintain enchantment: presumably, only lists with "inventory only" set to true should sometimes have this as true. This makes no sense otherwise... * <ul> * <li>If true, then the product will match the enchantment level of the ingredient.<br> * If the player has multiple items that match the ingredient list but the enchantment levels differ, then the entries need to be duplicated to show the products and ingredients for each enchantment level.<br> * For example: If the player has a crystal staff +1 and a crystal staff +3 and goes to exchange it at the mammon, the list should have all exchange possibilities for the +1 staff, followed by all possibilities for the +3 staff.</li> * <li>If false, then any level ingredient will be considered equal and product will always be at +0</li> * </ul> * </li> * <li>Apply taxes: Uses the "taxIngredient" entry in order to add a certain amount of adena to the ingredients. * <li> * <li>Additional product and ingredient multipliers.</li> * </ol> * @param listId * @param player * @param npc * @param inventoryOnly * @param productMultiplier * @param ingredientMultiplier */ public final void separateAndSend(int listId, L2PcInstance player, L2Npc npc, boolean inventoryOnly, double productMultiplier, double ingredientMultiplier) { ListContainer template = _entries.get(listId); if (template == null) { LOG.warn("{}: Cannot find list ID: {} requested by player: {}, NPC ID: {}!", getClass().getSimpleName(), listId, player, (npc != null ? npc.getId() : 0)); return; } if (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())) { LOG.warn("{}: Player {} attempted to open multisell {} from npc {} which is not allowed!", getClass().getSimpleName(), player, listId, npc); return; } final PreparedListContainer list = new PreparedListContainer(template, inventoryOnly, player, npc); // Pass through this only when multipliers are different from 1 if ((productMultiplier != 1) || (ingredientMultiplier != 1)) { list.getEntries().forEach(entry -> { // Math.max used here to avoid dropping count to 0 entry.getProducts().forEach(product -> product.setItemCount((long) Math.max(product.getItemCount() * productMultiplier, 1))); // Math.max used here to avoid dropping count to 0 entry.getIngredients().forEach(ingredient -> ingredient.setItemCount((long) Math.max(ingredient.getItemCount() * ingredientMultiplier, 1))); }); } int index = 0; do { // send list at least once even if size = 0 player.sendPacket(new MultiSellList(list, index)); index += PAGE_SIZE; } while (index < list.getEntries().size()); player.setMultiSell(list); } public final void separateAndSend(int listId, L2PcInstance player, L2Npc npc, boolean inventoryOnly) { separateAndSend(listId, player, npc, inventoryOnly, 1, 1); } public static final boolean hasSpecialIngredient(int id, long amount, L2PcInstance player) { switch (id) { case CLAN_REPUTATION: if (player.getClan() == null) { player.sendPacket(SystemMessageId.YOU_ARE_NOT_A_CLAN_MEMBER); break; } if (!player.isClanLeader()) { player.sendPacket(SystemMessageId.ONLY_THE_CLAN_LEADER_IS_ENABLED); break; } if (player.getClan().getReputationScore() < amount) { player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_SCORE_IS_TOO_LOW); break; } return true; case FAME: if (player.getFame() < amount) { player.sendPacket(SystemMessageId.NOT_ENOUGH_FAME_POINTS); break; } return true; } return false; } public static final boolean takeSpecialIngredient(int id, long amount, L2PcInstance player) { switch (id) { case CLAN_REPUTATION: player.getClan().takeReputationScore((int) amount, true); SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.S1_DEDUCTED_FROM_CLAN_REP); smsg.addLong(amount); player.sendPacket(smsg); return true; case FAME: player.setFame(player.getFame() - (int) amount); player.sendPacket(new UserInfo(player)); player.sendPacket(new ExBrExtraUserInfo(player)); return true; } return false; } public static final void giveSpecialProduct(int id, long amount, L2PcInstance player) { switch (id) { case CLAN_REPUTATION: player.getClan().addReputationScore((int) amount, true); break; case FAME: player.setFame((int) (player.getFame() + amount)); player.sendPacket(new UserInfo(player)); player.sendPacket(new ExBrExtraUserInfo(player)); break; } } private final void verify() { ListContainer list; final Iterator<ListContainer> iter = _entries.values().iterator(); while (iter.hasNext()) { list = iter.next(); for (Entry ent : list.getEntries()) { for (Ingredient ing : ent.getIngredients()) { if (!verifyIngredient(ing)) { LOG.warn("{}: Cannot find ingredient with item ID: {} in list: {}!", getClass().getSimpleName(), ing.getItemId(), list.getListId()); } } for (Ingredient ing : ent.getProducts()) { if (!verifyIngredient(ing)) { LOG.warn("{}: Cannot find product with item ID: {} in list: {}!", getClass().getSimpleName(), ing.getItemId(), list.getListId()); } } } } } private final boolean verifyIngredient(Ingredient ing) { switch (ing.getItemId()) { case CLAN_REPUTATION: case FAME: return true; default: return ing.getTemplate() != null; } } public static MultisellData getInstance() { return SingletonHolder._instance; } private static class SingletonHolder { protected static final MultisellData _instance = new MultisellData(); } } Hide Где и как проверку убрать? лучше было бы в конфиг включалку вывести проверку на нпц. сборка l2j high five. Какие еще могут быть варианты почему так работает мультиисел?
  24. Решено: Все оказалось просто. В GameServer.java поставил в первую очередь загрузку try (InputStream is = new FileInputStream(new File(LOG_NAME))) { LogManager.getLogManager().readConfiguration(is); } в методе: public static void main(String[] args) throws Exception { В Батнике StartGamerver.bat добавил -Dconsole.encoding=UTF-8 -Dfile.encoding=UTF-8 и в Log.cfg добавил строчку java.util.logging.ConsoleHandler.encoding=Cp866 после строки java.util.logging.ConsoleHandler.formatter = com.l2jserver.log.formatter.ConsoleLogFormatter И все нормально выводит. Спасибо @@CalypsoToolz
  25. GUSTAVO

    Dev-guard ?

    есть в шаре серверная часть, но больше интересует клиент сурсы
×
×
  • Создать...