Ir para conteúdo
  • Cadastre-se

L2J Mega Corrigido


Posts recomendados


Alguém pode me ajudar? Estou um pouco a falta de prática enferrujado..

Tô tentando rodar em meu vps, loginserver rodou normal más o gs ta dando erro e ainda não sei pq.

Tô usando, Java 8, Navicat 12, MySQL 5.5

 

IMG_20200126_131552.jpg

Editado por The HakaiShin Kira GM
Link para o comentário
Compartilhar em outros sites

1 hora atrás, The HakaiShin Kira GM disse:

Alguém pode me ajudar? Estou um pouco a falta de prática enferrujado..

Tô tentando rodar em meu vps, loginserver rodou normal más o gs ta dando erro e ainda não sei pq.

Tô usando, Java 8, Navicat 12, MySQL 5.5

 

IMG_20200126_131552.jpg

vou te explicar de uma maneira rápida e fácil, pelo que entendi desse error.. vai em login e gameserver.. vai ta assim

URL = jdbc:mysql://localhost/l2jmegac6
#URL = jdbc:hsqldb:hsql://localhost/l2jmegac6
#URL = jdbc:sqlserver://localhost/database=l2jmegac6/user=sa/password=  <<< "esse aqui tem que ser o nome da sua database no navicat"

Login = root << "esse aqui vc não muda"
Password = << "esse aqui é quando vc configuro seu mysql, se vc coloco senha nele que é a senha do seu database no navicat, coloque a senha aqui loginserver e gamesever"

  • Gostei 1
Link para o comentário
Compartilhar em outros sites

1 hora atrás, MundvayneHELLBOY disse:

vou te explicar de uma maneira rápida e fácil, pelo que entendi desse error.. vai em login e gameserver.. vai ta assim

URL = jdbc:mysql://localhost/l2jmegac6 (a alteração do banco é aqui, pois está usando mysql)
#URL = jdbc:hsqldb:hsql://localhost/l2jmegac6
#URL = jdbc:sqlserver://localhost/database=l2jmegac6/user=sa/password=  <<< "esse aqui tem que ser o nome da sua database no navicat"

Login = root << "esse aqui vc não muda"
Password = << "esse aqui é quando vc configuro seu mysql, se vc coloco senha nele que é a senha do seu database no navicat, coloque a senha aqui loginserver e gamesever"

O projeto usa mysql, se ver as linhas abaixo, está comentado
#hsql
#sqlserver

  • Gostei 2

giphy.gif 
Se te ajudei não custa nada Curtir  ou Agradecer😉

Link para o comentário
Compartilhar em outros sites

2 horas atrás, Albeci Nogueira disse:

O projeto usa mysql, se ver as linhas abaixo, está comentado
#hsql
#sqlserver

Isso mesmo, fazer a alteração no MYSQL, mas por via das dúvidas faz a alteração em todos, obrigado pela observação...melhor alterar os três pra não haver problema ^^

Editado por MundvayneHELLBOY
Esqueci de acrescentar uma frase no final do texto
  • Gostei 1
Link para o comentário
Compartilhar em outros sites

Obrigado pelas dicas, vou ver agora. Achei estranho no pack v6 o installer da db aponta uma database chamada mega e o gs/ls aponta acismega.

Entendo que haja algo na db que estou fazendo errado

Screenshot_20200126-220951_Microsoft_Remote_Desktop~3.png

Screenshot_20200126-221046_Microsoft_Remote_Desktop~2.png

Editado por The HakaiShin Kira GM
Link para o comentário
Compartilhar em outros sites

Em 25/01/2020 at 00:29, Albeci Nogueira disse:

se vc colocar eles em uma área pvp, eles não vao pra vila mesmo não, faz um teste em outra área, uma de farm por exemplo.

queria que eles nascessem no mesmo lugar pra treta continuar

www.facebook.com/marcelojunior07
Seja diferente !

Link para o comentário
Compartilhar em outros sites

4 horas atrás, Ar4gorn disse:

Andei procurando e não achei nenhuma configuração pro chat, os chats estão globais, tanto no ! quanto no +
Alguém encontrou ou tem que alterar no java? Caso sim, onde especificamente? 

deve se sua system, pq isso ta normal

Link para o comentário
Compartilhar em outros sites

3 horas atrás, ~Danilo Nascimento~ disse:

Sim, é configuração do servidor, você terá que fazer uma correção no core, “gameserver/handler/chathandler”

agora entendi oq ele quis dizer, sobre configurar + ou ! para pega chat all ou somente na região.

Link para o comentário
Compartilhar em outros sites

8 horas atrás, ~Danilo Nascimento~ disse:

Sim, é configuração do servidor, você terá que fazer uma correção no core, “gameserver/handler/chathandler”

Meu Shout Chat está assim:

Spoiler

package net.sf.l2j.gameserver.handler.chathandlers;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.handler.IChatHandler;
import net.sf.l2j.gameserver.model.BlockList;
import net.sf.l2j.gameserver.model.World;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.network.FloodProtectors;
import net.sf.l2j.gameserver.network.FloodProtectors.Action;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

public class ChatShout implements IChatHandler
{
    private static final int[] COMMAND_IDS =
    {
        1
    };

    @Override
    public void handleChat(int type, Player activeChar, String target, String text)
    {
        if (!FloodProtectors.performAction(activeChar.getClient(), Action.GLOBAL_CHAT))
            return;
        
        final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
        String convert = text.toLowerCase();
        CreatureSay disable = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), convert);
        
        if (Config.ALLOW_PVP_CHAT)
            if ((activeChar.getPvpKills() < Config.PVPS_TO_TALK_ON_SHOUT) && !activeChar.isGM())
            {
                activeChar.sendMessage("You must have at least " + Config.PVPS_TO_TALK_ON_SHOUT + " pvp kills in order to speak in global chat.");
                return;
            }
        
        for (Player player : World.getInstance().getPlayers())
        {
            if ((Config.DISABLE_CAPSLOCK) && (!activeChar.isGM()) && (!BlockList.isBlocked(player, activeChar)))
            {
                player.sendPacket(disable);
            }
            else
            {
                player.sendPacket(cs);
            }
        }
    }

    @Override
    public int[] getChatTypeList()
    {
        return COMMAND_IDS;
    }
}

E meu trade chat assim:

Spoiler

package net.sf.l2j.gameserver.handler.chathandlers;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.datatables.MapRegionTable;
import net.sf.l2j.gameserver.handler.IChatHandler;
import net.sf.l2j.gameserver.model.BlockList;
import net.sf.l2j.gameserver.model.World;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.network.FloodProtectors;
import net.sf.l2j.gameserver.network.FloodProtectors.Action;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

public class ChatTrade implements IChatHandler
{
    private static final int[] COMMAND_IDS =
    {
        8
    };

    @Override
    public void handleChat(int type, Player activeChar, String target, String text)
    {
        if (!FloodProtectors.performAction(activeChar.getClient(), Action.TRADE_CHAT))
            return;

        final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
        final int region = MapRegionTable.getInstance().getMapRegion(activeChar.getX(), activeChar.getY());
        
        String convert = text.toLowerCase();
        CreatureSay disable = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), convert);
        
        if (Config.ALLOW_PVP_CHAT)
            if ((activeChar.getPvpKills() < Config.PVPS_TO_TALK_ON_TRADE) && !activeChar.isGM())
            {
                activeChar.sendMessage("You must have at least " + Config.PVPS_TO_TALK_ON_TRADE + " pvp kills in order to speak in trade chat.");
                return;
            }
        for (Player player : World.getInstance().getPlayers())
        {
            if ((Config.DISABLE_CAPSLOCK) && (!activeChar.isGM()) && (!BlockList.isBlocked(player, activeChar) && region == MapRegionTable.getInstance().getMapRegion(player.getX(), player.getY())))
            {
                player.sendPacket(disable);
            }
            else
            {
                player.sendPacket(cs);
            }
        }
        
    }

    @Override
    public int[] getChatTypeList()
    {
        return COMMAND_IDS;
    }
}

...........................................................................................................................>>>--------------------------------------------------------------->............................................................................................................................

IChatHandler :

Spoiler

package net.sf.l2j.gameserver.handler;

import net.sf.l2j.gameserver.model.actor.instance.Player;

/**
 * Interface for chat handlers
 * @author durgus
 */
public interface IChatHandler
{
    /**
     * Handles a specific type of chat messages
     * @param type
     * @param activeChar
     * @param target
     * @param text
     */
    public void handleChat(int type, Player activeChar, String target, String text);

    /**
     * Returns a list of all chat types registered to this handler
     * @return
     */
    public int[] getChatTypeList();
}
 

ChatHandler:

Spoiler

package net.sf.l2j.gameserver.handler;

import java.util.HashMap;
import java.util.Map;

import net.sf.l2j.gameserver.handler.chathandlers.ChatAll;
import net.sf.l2j.gameserver.handler.chathandlers.ChatAlliance;
import net.sf.l2j.gameserver.handler.chathandlers.ChatClan;
import net.sf.l2j.gameserver.handler.chathandlers.ChatHeroVoice;
import net.sf.l2j.gameserver.handler.chathandlers.ChatParty;
import net.sf.l2j.gameserver.handler.chathandlers.ChatPartyMatchRoom;
import net.sf.l2j.gameserver.handler.chathandlers.ChatPartyRoomAll;
import net.sf.l2j.gameserver.handler.chathandlers.ChatPartyRoomCommander;
import net.sf.l2j.gameserver.handler.chathandlers.ChatPetition;
import net.sf.l2j.gameserver.handler.chathandlers.ChatShout;
import net.sf.l2j.gameserver.handler.chathandlers.ChatTell;
import net.sf.l2j.gameserver.handler.chathandlers.ChatTrade;

public class ChatHandler
{
    private final Map<Integer, IChatHandler> _datatable = new HashMap<>();

    public static ChatHandler getInstance()
    {
        return SingletonHolder._instance;
    }

    protected ChatHandler()
    {
        registerChatHandler(new ChatAll());
        registerChatHandler(new ChatAlliance());
        registerChatHandler(new ChatClan());
        registerChatHandler(new ChatHeroVoice());
        registerChatHandler(new ChatParty());
        registerChatHandler(new ChatPartyMatchRoom());
        registerChatHandler(new ChatPartyRoomAll());
        registerChatHandler(new ChatPartyRoomCommander());
        registerChatHandler(new ChatPetition());
        registerChatHandler(new ChatShout());
        registerChatHandler(new ChatTell());
        registerChatHandler(new ChatTrade());
    }

    public void registerChatHandler(IChatHandler handler)
    {
        for (int id : handler.getChatTypeList())
            _datatable.put(id, handler);
    }

    public IChatHandler getChatHandler(int chatType)
    {
        return _datatable.get(chatType);
    }

    public int size()
    {
        return _datatable.size();
    }

    private static class SingletonHolder
    {
        protected static final ChatHandler _instance = new ChatHandler();
    }
}

Alguém pode ajudar sobre o que alterar para que os 2 chats não sejam globais?
 

Editado por Ar4gorn
Link para o comentário
Compartilhar em outros sites

estou com um probleminha na parte de edição dos npc em termo de aparência  usando o botao shift do teclado ,  teria como mudar esse menu do admin por favor ou mim mostrar como posso fazer para colocar de volta a opção edit npc  no  menu  de admin???????

desde já agradeço

Link para o comentário
Compartilhar em outros sites

3 horas atrás, valquiria disse:

estou com um probleminha na parte de edição dos npc em termo de aparência  usando o botao shift do teclado ,  teria como mudar esse menu do admin por favor ou mim mostrar como posso fazer para colocar de volta a opção edit npc  no  menu  de admin???????

desde já agradeço

qual o problema, ou o que vc não está conseguindo fazer com o menu que já veio na rev? 
 

giphy.gif 
Se te ajudei não custa nada Curtir  ou Agradecer😉

Link para o comentário
Compartilhar em outros sites

6 horas atrás, Albeci Nogueira disse:

qual o problema, ou o que vc não está conseguindo fazer com o menu que já veio na rev? 
 

tipo :  quando aperto shifit para ver as informaçoes do npc .........nao aparece a opção  edit   dai  nao  dar  para  editar tipo (atack speed  , P atack ,  HP ,   essas  coisas  entend???   

 

segue  foto

Sem título.jpg

Link para o comentário
Compartilhar em outros sites

50 minutos atrás, valquiria disse:

tipo :  quando aperto shifit para ver as informaçoes do npc .........nao aparece a opção  edit   dai  nao  dar  para  editar tipo (atack speed  , P atack ,  HP ,   essas  coisas  entend???   

 

segue  foto

Sem título.jpg

Isso você tem que editar na xml do Npc, em “data/xml/npcs”, procura o id do NPC igual aparece ali e edita, aCis não da pra fazer isso pelo shift + click igual algumas packs.

21 minutos atrás, valquiria disse:

essa opção  que  dar   acesso as  mudanças  no npc   tito((((..........HP ..........atck ........M atack..........id Template.......title ......etc

 

segue foto........

edit npc.jpg

Esse pack é Frozen, aCis não é igual !

j58fx5.gif

Link para o comentário
Compartilhar em outros sites

3 minutos atrás, ~Danilo Nascimento~ disse:

Isso você tem que editar na xml do Npc, em “data/xml/npcs”, procura o id do NPC igual aparece ali e edita, aCis não da pra fazer isso pelo shift + click igual algumas packs.

Esse pack é Frozen, aCis não é igual !

ok  entendi  grato 🥰

Editado por valquiria
Link para o comentário
Compartilhar em outros sites

Source Versão Atual(Corrigido o bug de multisell com adena!)

Spoiler

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Pack Versão Atual(Corrigido o bug de multisell com adena!)

Spoiler

O conteúdo está oculto, favor efetuar login ou se cadastrar!

Oque foi corrigido ? Bug de adena feito pelo multisell.

Video Mostrando o Bug

 

 

Video mostrando a correção!

 

Para aqueles que já tem a source e adicionaram outros mods e modificaram o core, para não perde tudo , toma a correção individual. Procure A Class MultiSellChoose.java e mude todo o arquivo !

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.network.clientpackets;

import java.util.ArrayList;
import java.util.List;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.L2Augmentation;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
import net.sf.l2j.gameserver.model.itemcontainer.PcInventory;
import net.sf.l2j.gameserver.model.multisell.Entry;
import net.sf.l2j.gameserver.model.multisell.Ingredient;
import net.sf.l2j.gameserver.model.multisell.PreparedListContainer;
import net.sf.l2j.gameserver.network.FloodProtectors;
import net.sf.l2j.gameserver.network.FloodProtectors.Action;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;


public class MultiSellChoose extends L2GameClientPacket
{
    // Special IDs.
    private static final int CLAN_REPUTATION = 65336;
    // private static final int PC_BANG_POINTS = 65436;
    
    private int _listId;
    private int _entryId;
    private int _amount;
    private int _transactionTax; // local handling of taxation
    
    @Override
    protected void readImpl()
    {
        _listId = readD();
        _entryId = readD();
        _amount = readD();
        _transactionTax = 0;
    }
    
    @Override
    public void runImpl()
    {
        final Player player = getClient().getActiveChar();
        if (player == null)
            return;
        
        if (!FloodProtectors.performAction(getClient(), Action.MULTISELL))
        {
            player.setMultiSell(null);
            return;
        }
        
        if (_amount < 1 || _amount > 9999)
        {
            player.setMultiSell(null);
            return;
        }
        
        final PreparedListContainer list = player.getMultiSell();
        if (list == null || list.getId() != _listId)
        {
            player.setMultiSell(null);
            return;
        }
        
        final Npc npc = player.getCurrentFolkNPC();
        if ((npc != null && !list.isNpcAllowed(npc.getNpcId())) || (npc == null && list.isNpcOnly()))
        {
            player.setMultiSell(null);
            return;
        }
        
        if (npc != null && !npc.canInteract(player))
        {
            player.setMultiSell(null);
            return;
        }
        
        final PcInventory inv = player.getInventory();
        
        for (Entry entry : list.getEntries())
        {
            if (entry.getId() == _entryId)
            {
                if (!entry.isStackable() && _amount > 1)
                {
                    player.setMultiSell(null);
                    return;
                }
                
                int slots = 0;
                long weight = 0;
                for (Ingredient e : entry.getProducts())
                {
                    if (e.getItemId() < 0)
                        continue;
                    
                    if (!e.isStackable())
                        slots += e.getItemCount() * _amount;
                    else if (player.getInventory().getItemByItemId(e.getItemId()) == null)
                        slots++;
                    
                    weight += (long)e.getItemCount() * _amount * e.getWeight();
                }
                
                if (!inv.validateCapacity(slots))
                {
                    player.sendPacket(SystemMessageId.SLOTS_FULL);
                    return;
                }
                
                if (weight > Integer.MAX_VALUE || weight < 0 || !inv.validateWeight((int)weight))
                {
                    player.sendPacket(SystemMessageId.WEIGHT_LIMIT_EXCEEDED);
                    return;
                }
                
                // Generate a list of distinct ingredients and counts in order to check if the correct item-counts are possessed by the player
                List<Ingredient> ingredientsList = new ArrayList<>(entry.getIngredients().size());
                boolean newIng;
                
                for (Ingredient e : entry.getIngredients())
                {
                    newIng = true;
                    
                    // at this point, the template has already been modified so that enchantments are properly included
                    // whenever they need to be applied. Uniqueness of items is thus judged by item id AND enchantment level
                    for (int i = ingredientsList.size(); --i >= 0;)
                    {
                        Ingredient ex = ingredientsList.get(i);
                        
                        // if the item was already added in the list, merely increment the count
                        // this happens if 1 list entry has the same ingredient twice (example 2 swords = 1 dual)
                        if (ex.getItemId() == e.getItemId() && ex.getEnchantLevel() == e.getEnchantLevel())
                        {
                            long totalCount = (long)ex.getItemCount() + e.getItemCount();
                            if (totalCount > Integer.MAX_VALUE || totalCount < 0)
                            {
                                player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
                                return;
                            }
                            
                            // two same ingredients, merge into one and replace old
                            final Ingredient ing = ex.getCopy();
                            ing.setItemCount((int)totalCount);
                            ingredientsList.set(i, ing);
                            
                            newIng = false;
                            break;
                        }
                    }
                    
                    // if it's a new ingredient, just store its info directly (item id, count, enchantment)
                    if (newIng)
                        ingredientsList.add(e);
                }
                
                // now check if the player has sufficient items in the inventory to cover the ingredients' expences
                for (Ingredient e : ingredientsList)
                {
                    if (Integer.MAX_VALUE / e.getItemCount() < _amount)
                    {
                        player.sendPacket(SystemMessageId.YOU_HAVE_EXCEEDED_QUANTITY_THAT_CAN_BE_INPUTTED);
                        return;
                    }
                    
                    if (e.getItemId() == CLAN_REPUTATION)
                    {
                        if (player.getClan() == null)
                        {
                            player.sendPacket(SystemMessageId.YOU_ARE_NOT_A_CLAN_MEMBER);
                            return;
                        }
                        
                        if (!player.isClanLeader())
                        {
                            player.sendPacket(SystemMessageId.ONLY_THE_CLAN_LEADER_IS_ENABLED);
                            return;
                        }
                        
                        if (player.getClan().getReputationScore() < e.getItemCount() * _amount)
                        {
                            player.sendPacket(SystemMessageId.THE_CLAN_REPUTATION_SCORE_IS_TOO_LOW);
                            return;
                        }
                    }
                    else
                    {
                        // if this is not a list that maintains enchantment, check the count of all items that have the given id.
                        // otherwise, check only the count of items with exactly the needed enchantment level
                        if (inv.getInventoryItemCount(e.getItemId(), list.getMaintainEnchantment() ? e.getEnchantLevel() : -1, false) < ((Config.ALT_BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient()) ? e.getItemCount() * _amount : e.getItemCount()))
                        {
                            player.sendPacket(SystemMessageId.NOT_ENOUGH_ITEMS);
                            return;
                        }
                    }
                }
                
                List<L2Augmentation> augmentation = new ArrayList<>();
                
                for (Ingredient e : entry.getIngredients())
                {
                    if (e.getItemId() == CLAN_REPUTATION)
                    {
                        final int amount = e.getItemCount() * _amount;
                        
                        player.getClan().takeReputationScore(amount);
                        player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.S1_DEDUCTED_FROM_CLAN_REP).addNumber(amount));
                    }
                    else
                    {
                        ItemInstance itemToTake = inv.getItemByItemId(e.getItemId());
                        if (itemToTake == null)
                        {
                            player.setMultiSell(null);
                            return;
                        }
                        
                        if (Config.ALT_BLACKSMITH_USE_RECIPES || !e.getMaintainIngredient())
                        {
                            // if it's a stackable item, just reduce the amount from the first (only) instance that is found in the inventory
                            if (itemToTake.isStackable())
                            {
                                if (!player.destroyItem("Multisell", itemToTake.getObjectId(), (e.getItemCount() * _amount), player.getTarget(), true))
                                {
                                    player.setMultiSell(null);
                                    return;
                                }
                            }
                            else
                            {
                                // for non-stackable items, one of two scenaria are possible:
                                // a) list maintains enchantment: get the instances that exactly match the requested enchantment level
                                // b) list does not maintain enchantment: get the instances with the LOWEST enchantment level
                                
                                // a) if enchantment is maintained, then get a list of items that exactly match this enchantment
                                if (list.getMaintainEnchantment())
                                {
                                    // loop through this list and remove (one by one) each item until the required amount is taken.
                                    ItemInstance[] inventoryContents = inv.getAllItemsByItemId(e.getItemId(), e.getEnchantLevel(), false);
                                    for (int i = 0; i < (e.getItemCount() * _amount); i++)
                                    {
                                        if (inventoryContents.isAugmented())
                                            augmentation.add(inventoryContents.getAugmentation());
                                        
                                        if (!player.destroyItem("Multisell", inventoryContents.getObjectId(), 1, player.getTarget(), true))
                                        {
                                            player.setMultiSell(null);
                                            return;
                                        }
                                    }
                                }
                                else
                                // b) enchantment is not maintained. Get the instances with the LOWEST enchantment level
                                {
                                    for (int i = 1; i <= (e.getItemCount() * _amount); i++)
                                    {
                                        ItemInstance[] inventoryContents = inv.getAllItemsByItemId(e.getItemId(), false);
                                        
                                        itemToTake = inventoryContents[0];
                                        // get item with the LOWEST enchantment level from the inventory (0 is the lowest)
                                        if (itemToTake.getEnchantLevel() > 0)
                                        {
                                            for (ItemInstance item : inventoryContents)
                                            {
                                                if (item.getEnchantLevel() < itemToTake.getEnchantLevel())
                                                {
                                                    itemToTake = item;
                                                    
                                                    // nothing will have enchantment less than 0. If a zero-enchanted item is found, just take it
                                                    if (itemToTake.getEnchantLevel() == 0)
                                                        break;
                                                }
                                            }
                                        }
                                        
                                        if (!player.destroyItem("Multisell", itemToTake.getObjectId(), 1, player.getTarget(), true))
                                        {
                                            player.setMultiSell(null);
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                
                // Generate the appropriate items
                for (Ingredient e : entry.getProducts())
                {
                    if (e.getItemId() == CLAN_REPUTATION)
                        player.getClan().addReputationScore(e.getItemCount() * _amount);
                    else
                    {
                        if (e.isStackable())
                            inv.addItem("Multisell", e.getItemId(), e.getItemCount() * _amount, player, player.getTarget());
                        else
                        {
                            for (int i = 0; i < (e.getItemCount() * _amount); i++)
                            {
                                ItemInstance product = inv.addItem("Multisell", e.getItemId(), 1, player, player.getTarget());
                                if (product != null && list.getMaintainEnchantment())
                                {
                                    if (i < augmentation.size())
                                        product.setAugmentation(new L2Augmentation(augmentation.get(i).getAugmentationId(), augmentation.get(i).getSkill()));
                                    
                                    product.setEnchantLevel(e.getEnchantLevel());
                                    product.updateDatabase();
                                }
                            }
                        }
                        
                        // msg part
                        SystemMessage sm;
                        
                        if (e.getItemCount() * _amount > 1)
                            sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(e.getItemId()).addNumber(e.getItemCount() * _amount);
                        else
                        {
                            if (list.getMaintainEnchantment() && e.getEnchantLevel() > 0)
                                sm = SystemMessage.getSystemMessage(SystemMessageId.ACQUIRED_S1_S2).addNumber(e.getEnchantLevel()).addItemName(e.getItemId());
                            else
                                sm = SystemMessage.getSystemMessage(SystemMessageId.EARNED_ITEM_S1).addItemName(e.getItemId());
                        }
                        player.sendPacket(sm);
                    }
                }
                player.sendPacket(new ItemList(player, false));
                
                // All ok, send success message, remove items and add final product
                player.sendPacket(SystemMessageId.SUCCESSFULLY_TRADED_WITH_NPC);
                
                StatusUpdate su = new StatusUpdate(player);
                su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
                player.sendPacket(su);
                
                // finally, give the tax to the castle...
                if (npc != null && entry.getTaxAmount() > 0)
                    npc.getCastle().addToTreasury(_transactionTax * _amount);
                
                break;
            }
        }
    }
}

Galera, muito obrigado a todos, por testarem a pack, realmente a pack é boa, mas vou dizer a todos, nossa nunca vi tanto bug numa pack assim, parece que quanto mais eles atualizam, pior fica, Continuem com os testes e reportem! Abraço!

  • Gostei 1
  • Obrigado 2
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.




×
×
  • Criar Novo...

Important Information

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.