Рейтинг темы:
  • 1 Голос(ов) - 1 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Сборка Шайтана
#1
Доброго времени суток.

Волнует следующие вопросы:

1. Не могу никак найти где конфиг, который делает spiritshot бесконечными...
Искал, искал... не нашел. Кажется он не реализован?

Как в исходниках реализовать его, если он не реализован?
В папке handler два файла ItemHandler.j ava и IItemHandler.j ava
Но в них нет не слова о spiritshot

2. Где можно скачать бафера NPC для сборки этой с схемами сохранения баффов? Как говорили мне, исходники ребелион и обычные NPC бафферы L2J (которых сотни) не подойдут для этой сборки.

3. Как убрать еще NO CARRIER (при крите, выдает в титуле NO CARRIER, а потом не заходит больше, сервера как буд-то офф для этого аккаунта.)

Прошу помощи. Всем помогаеющим +

Добавлено через 2 часа 52 минуты
ХЕЕЕЕЕЕЕЛП
Ответ
#2
1.
Первое решается простым путем, редактируете \data\scripts\handlers\itemhandlers\SoulShots.java . Находите в нем такой участок:
Код:
if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), SSCount, null, false))
            {
                if (activeChar.getAutoSoulShot().containsKey(itemId))
                {
                    activeChar.removeAutoSoulShot(itemId);
                    activeChar.sendPacket(new ExAutoSoulShot(itemId, 0));

                    SystemMessage sm = new SystemMessage(SystemMessageId.AUTO_USE_OF_S1_CANCELLED);
                    sm.addString(item.getItem().getName());
                    activeChar.sendPacket(sm);
                }
                else
                    activeChar.sendPacket(new SystemMessage(SystemMessageId.NOT_ENOUGH_SOULSHOTS));
                return;
            }

И удаляете его. Точно так же и с \data\scripts\handlers\itemhandlers\SpiritShot.java.
©PROGRAMMATOR


2. Берёте любого баффера с вашим функционалом и перепиливаете под свою сборку.
3. Надпись NO CARRIER не влияет на "Не возможность зайти на акк". Тут проблема в чём то другом.
Web программист\разработчик

— Есть только один способ проделать большую работу — полюбить ее. Если вы к этому не пришли, подождите. Не беритесь за дело.
Ответ
#3
За 1. Спасибо, но путь немного по другому был, если кто не может найти эти файлы, пробуйте искать так:

Ваши Исходники\data\scripts\items\SpiritShot.jav a
Ваши Исходники\data\scripts\items\SoulShots.jav a

Но там не такой код, как в этом коде это сделать?

Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ExAutoSoulShot;
import l2p.gameserver.serverpackets.MagicSkillUse;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.skills.Stats;
import l2p.gameserver.tables.ItemTable;
import l2p.gameserver.templates.L2Item;
import l2p.gameserver.templates.L2Weapon;
import l2p.gameserver.templates.L2Weapon.WeaponType;
import l2p.util.Rnd;

public class SoulShots implements IItemHandler, ScriptFile
{
    private static final int[] _itemIds = { 5789, 1835, 1463, 1464, 1465, 1466, 1467, 13037, 13045, 13055, 22082, 22083,
            22084, 22085, 22086 };
    private static final short[] _skillIds = { 2039, 2150, 2151, 2152, 2153, 2154 };

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
            return;
        L2Player player = (L2Player) playable;

        L2Weapon weaponItem = player.getActiveWeaponItem();

        L2ItemInstance weaponInst = player.getActiveWeaponInstance();
        int SoulshotId = item.getItemId();
        boolean isAutoSoulShot = false;
        L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());

        if(player.getAutoSoulShot().contains(SoulshotId))
            isAutoSoulShot = true;

        if(weaponInst == null)
        {
            if(!isAutoSoulShot)
                player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            return;
        }

        // soulshot is already active
        if(weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE)
            return;

        int grade = weaponItem.getCrystalType().externalOrdinal;
        int soulShotConsumption = weaponItem.getSoulShotCount();
        long count = item.getCount();

        if(soulShotConsumption == 0)
        {
            // Can't use soulshots
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            return;
        }

        if(grade == 0 && SoulshotId != 5789 && SoulshotId != 1835 // NG
                || grade == 1 && SoulshotId != 1463 && SoulshotId != 22082 && SoulshotId != 13037 // D
                || grade == 2 && SoulshotId != 1464 && SoulshotId != 22083 && SoulshotId != 13045 // C
                || grade == 3 && SoulshotId != 1465 && SoulshotId != 22084 // B
                || grade == 4 && SoulshotId != 1466 && SoulshotId != 22085 && SoulshotId != 13055 // A
                || grade == 5 && SoulshotId != 1467 && SoulshotId != 22086 // S
        )
        {
            // wrong grade for weapon
            if(isAutoSoulShot)
                return;
            player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
            return;
        }

        if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)
        {
            int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
            if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
                soulShotConsumption = newSS;
        }

        if(count < soulShotConsumption)
        {
            player.sendPacket(Msg.NOT_ENOUGH_SOULSHOTS);
            return;
        }

        weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_SOULSHOT);
        player.getInventory().destroyItem(item, soulShotConsumption, false);
        player.sendPacket(Msg.POWER_OF_THE_SPIRITS_ENABLED);
        player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));
    }

    public final int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {}

    public void onShutdown()
    {}
}

Со 2. Пока проблемы... В исходниках я увидел папку NPCBuffer, там в ней файлы html и один файл Buffer.java, как это реализовать?

3. Вы правы, что надпись NO CARRIER не влияет, можно ли отключить эту опцию? Как?
Причина "не зайти на акк и сервера для этого акка лежат", после крит еррор. Играл во второе окно и именно со вторым окном, примерно после мин 5, второе окно критует и для этого акка сервера оффаются. В чем может быть дело? Может защита где-то какая-то от окон? Но не нашел... Где и что можно глянуть?
Ответ
#4
Ответ
#5
ANZO, спасибо большое.

Все убрал и в spiritshot.j ava, что выделено было.
Сборку скомпилировал, как теперь добавить и что нужно добавить, чтобы вступило в силу? Как я понял, нужно перезалить таблицу из сборки, которую скомпилировал, тольк какую? etcitem.sql ?
Ответ
#6
Вам нужно заменить в сборке архив ядра (core.jar или l2pserver.jar) на тот который Вы получили на выходе при компиляции.
Ответ
#7
Сделал как Вы сказали, SpiritShot стали бесконечными, а вот SoulShot нет. Как сделать?
Вот код:

Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ExAutoSoulShot;
import l2p.gameserver.serverpackets.MagicSkillUse;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.skills.Stats;
import l2p.gameserver.tables.ItemTable;
import l2p.gameserver.templates.L2Item;
import l2p.gameserver.templates.L2Weapon;
import l2p.gameserver.templates.L2Weapon.WeaponType;
import l2p.util.Rnd;

public class SoulShots implements IItemHandler, ScriptFile
{
    private static final int[] _itemIds = {5789, 1835, 1463, 1464, 1465, 1466, 1467, 13037, 13045, 13055, 22082, 22083,
        22084, 22085, 22086};
    private static final short[] _skillIds = {2039, 2150, 2151, 2152, 2153, 2154};

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
        {
            return;
        }
        L2Player player = (L2Player) playable;
        L2Weapon weaponItem = player.getActiveWeaponItem();
        L2ItemInstance weaponInst = player.getActiveWeaponInstance();
        int SoulshotId = item.getItemId();
        boolean isAutoSoulShot = false;
        L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());
        if(player.getAutoSoulShot().contains(SoulshotId))
        {
            isAutoSoulShot = true;
        }
        if(weaponInst == null)
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            }
            return;
        }
        // soulshot is already active
        if(weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE)
        {
            return;
        }
        int grade = weaponItem.getCrystalType().externalOrdinal;
        int soulShotConsumption = weaponItem.getSoulShotCount();
        long count = item.getCount();
        if(soulShotConsumption == 0)
        {
            // Can't use soulshots
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            return;
        }
        if(grade == 0 && SoulshotId != 5789 && SoulshotId != 1835 // NG
            || grade == 1 && SoulshotId != 1463 && SoulshotId != 22082 && SoulshotId != 13037 // D
            || grade == 2 && SoulshotId != 1464 && SoulshotId != 22083 && SoulshotId != 13045 // C
            || grade == 3 && SoulshotId != 1465 && SoulshotId != 22084 // B
            || grade == 4 && SoulshotId != 1466 && SoulshotId != 22085 && SoulshotId != 13055 // A
            || grade == 5 && SoulshotId != 1467 && SoulshotId != 22086 // S
            )
        {
            // wrong grade for weapon
            if(isAutoSoulShot)
            {
                return;
            }
            player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
            return;
        }
        if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)
        {
            int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
            if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
            {
                soulShotConsumption = newSS;
            }
        }
        weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_SOULSHOT);
        player.sendPacket(Msg.POWER_OF_THE_SPIRITS_ENABLED);
        player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));
    }

    public final int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {
    }

    public void onShutdown()
    {
    }
}

Добавлено через 13 часов 41 минуту
ХЕЛП !

Добавлено через 15 часов 1 минуту
Кстати и SpiritShot тоже не бесконечные...
Может я что-то не так заменил?
Скомпилировал, файл l2pserver.jar заменил в сборке в Game папке и в Login папке.
Код SoulShot.j ava выше.
Прошу помоши.
Ответ
#8
Не надо UPать с такой частотой. От этого скорость решения вашей проблемы никак не увеличится. Хотите быстро, оплатите работу специалиста.
Ответ
#9
Я уже третий день не могу покинуть эту тему с шотами.

Код BeastShot.java
Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.L2Summon;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.MagicSkillUse;

public class BeastShot implements IItemHandler, ScriptFile
{
    private final static int[] _itemIds = {6645, 6646, 6647, 20332, 20333, 20334};

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
        {
            return;
        }
        L2Player player = (L2Player) playable;
        boolean isAutoSoulShot = false;
        if(player.getAutoSoulShot().contains(item.getItemId()))
        {
            isAutoSoulShot = true;
        }
        L2Summon pet = player.getPet();
        if(pet == null)
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.PETS_AND_SERVITORS_ARE_NOT_AVAILABLE_AT_THIS_TIME);
            }
            return;
        }
        if(pet.isDead())
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.WHEN_PET_OR_SERVITOR_IS_DEAD_SOULSHOTS_OR_SPIRITSHOTS_FOR_PET_OR_SERVITOR_ARE_NOT_AVAILABLE);
            }
            return;
        }
        int consumption = 0;
        int skillid = 0;
        switch(item.getItemId())
        {
            case 6645:
            case 20332:
                if(pet.getChargedSoulShot())
                {
                    return;
                }
                consumption = pet.getSoulshotConsumeCount();
                if(item.getCount() < consumption)
                {
                    player.sendPacket(Msg.YOU_DONT_HAVE_ENOUGH_SOULSHOTS_NEEDED_FOR_A_PET_SERVITOR);
                    return;
                }
                pet.chargeSoulShot();
                skillid = 2033;
                break;
            case 6646:
            case 20333:
                if(pet.getChargedSpiritShot() > 0)
                {
                    return;
                }
                consumption = pet.getSpiritshotConsumeCount();
                if(item.getCount() < consumption)
                {
                    player.sendPacket(Msg.YOU_DONT_HAVE_ENOUGH_SPIRITSHOTS_NEEDED_FOR_A_PET_SERVITOR);
                    return;
                }
                pet.chargeSpiritShot(L2ItemInstance.CHARGED_SPIRITSHOT);
                skillid = 2008;
                break;
            case 6647:
            case 20334:
                if(pet.getChargedSpiritShot() > 1)
                {
                    return;
                }
                consumption = pet.getSpiritshotConsumeCount();
                if(item.getCount() < consumption)
                {
                    player.sendPacket(Msg.YOU_DONT_HAVE_ENOUGH_SPIRITSHOTS_NEEDED_FOR_A_PET_SERVITOR);
                    return;
                }
                pet.chargeSpiritShot(L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT);
                skillid = 2009;
                break;
        }
        pet.broadcastPacket(new MagicSkillUse(pet, pet, skillid, 1, 0, 0));
        player.getInventory().destroyItem(item, consumption, false);
    }

    public final int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {
    }

    public void onShutdown()
    {
    }
}

Код BlessedSpiritShot.java
Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ExAutoSoulShot;
import l2p.gameserver.serverpackets.MagicSkillUse;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.tables.ItemTable;
import l2p.gameserver.templates.L2Item;
import l2p.gameserver.templates.L2Weapon;

public class BlessedSpiritShot implements IItemHandler, ScriptFile
{
    // all the items ids that this handler knowns
    private static final int[] _itemIds = {3947, 3948, 3949, 3950, 3951, 3952, 22072, 22073, 22074, 22075, 22076};
    private static final short[] _skillIds = {2061, 2160, 2161, 2162, 2163, 2164};

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
        {
            return;
        }
        L2Player player = (L2Player) playable;
        L2ItemInstance weaponInst = player.getActiveWeaponInstance();
        L2Weapon weaponItem = player.getActiveWeaponItem();
        int SoulshotId = item.getItemId();
        boolean isAutoSoulShot = false;
        L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());
        if(player.getAutoSoulShot().contains(SoulshotId))
        {
            isAutoSoulShot = true;
        }
        if(weaponInst == null)
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
            }
            return;
        }
        if(weaponInst.getChargedSpiritshot() == L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT)
        // already charged by blessed spirit shot
        // btw we cant charge only when bsps is charged
        {
            return;
        }
        int spiritshotId = item.getItemId();
        int grade = weaponItem.getCrystalType().externalOrdinal;
        int blessedsoulSpiritConsumption = weaponItem.getSpiritShotCount();
        long count = item.getCount();
        if(blessedsoulSpiritConsumption == 0)
        {
            // Can't use Spiritshots
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
            return;
        }
        if(grade == 0 && spiritshotId != 3947 // NG
            || grade == 1 && spiritshotId != 3948 && spiritshotId != 22072 // D
            || grade == 2 && spiritshotId != 3949 && spiritshotId != 22073 // C
            || grade == 3 && spiritshotId != 3950 && spiritshotId != 22074 // B
            || grade == 4 && spiritshotId != 3951 && spiritshotId != 22075 // A
            || grade == 5 && spiritshotId != 3952 && spiritshotId != 22076 // S
            )
        {
            if(isAutoSoulShot)
            {
                return;
            }
            player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
            return;
        }
        if(count < blessedsoulSpiritConsumption)
        {
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);
            return;
        }
        weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_BLESSED_SPIRITSHOT);
        player.getInventory().destroyItem(item, blessedsoulSpiritConsumption, false);
        player.sendPacket(Msg.POWER_OF_MANA_ENABLED);
        player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));
    }

    public final int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {
    }

    public void onShutdown()
    {
    }
}

Код FishShots.java
Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ExAutoSoulShot;
import l2p.gameserver.serverpackets.MagicSkillUse;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.templates.L2Weapon;
import l2p.gameserver.templates.L2Weapon.WeaponType;

public class FishShots implements IItemHandler, ScriptFile
{
    // All the item IDs that this handler knows.
    private static int[] _itemIds = {6535, 6536, 6537, 6538, 6539, 6540};
    private static int[] _skillIds = {2181, 2182, 2183, 2184, 2185, 2186};

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
        {
            return;
        }
        L2Player player = (L2Player) playable;
        int FishshotId = item.getItemId();
        boolean isAutoSoulShot = false;
        if(player.getAutoSoulShot().contains(FishshotId))
        {
            isAutoSoulShot = true;
        }
        L2ItemInstance weaponInst = player.getActiveWeaponInstance();
        L2Weapon weaponItem = player.getActiveWeaponItem();
        if(weaponInst == null || weaponItem.getItemType() != WeaponType.ROD)
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            }
            return;
        }
        if(item.getCount() < 1)
        {
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(FishshotId);
                player.sendPacket(new ExAutoSoulShot(FishshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(item.getName()));
                return;
            }
            player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);
            return;
        }
        // spiritshot is already active
        if(weaponInst.getChargedFishshot())
        {
            return;
        }
        int grade = weaponItem.getCrystalType().externalOrdinal;
        if(grade == 0 && FishshotId != 6535 || grade == 1 && FishshotId != 6536 || grade == 2 && FishshotId != 6537 || grade == 3 && FishshotId != 6538 || grade == 4 && FishshotId != 6539 || grade == 5 && FishshotId != 6540)
        {
            if(isAutoSoulShot)
            {
                return;
            }
            player.sendPacket(Msg.THIS_FISHING_SHOT_IS_NOT_FIT_FOR_THE_FISHING_POLE_CRYSTAL);
            return;
        }
        weaponInst.setChargedFishshot(true);
        player.getInventory().destroyItem(item.getObjectId(), 1, false);
        player.sendPacket(Msg.POWER_OF_MANA_ENABLED);
        player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));
    }

    public int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {
    }

    public void onShutdown()
    {
    }
}

Код SoulShots.java
Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ExAutoSoulShot;
import l2p.gameserver.serverpackets.MagicSkillUse;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.skills.Stats;
import l2p.gameserver.tables.ItemTable;
import l2p.gameserver.templates.L2Item;
import l2p.gameserver.templates.L2Weapon;
import l2p.gameserver.templates.L2Weapon.WeaponType;
import l2p.util.Rnd;

public class SoulShots implements IItemHandler, ScriptFile
{
    private static final int[] _itemIds = {5789, 1835, 1463, 1464, 1465, 1466, 1467, 13037, 13045, 13055, 22082, 22083,
        22084, 22085, 22086};
    private static final short[] _skillIds = {2039, 2150, 2151, 2152, 2153, 2154};

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
        {
            return;
        }
        L2Player player = (L2Player) playable;
        L2Weapon weaponItem = player.getActiveWeaponItem();
        L2ItemInstance weaponInst = player.getActiveWeaponInstance();
        int SoulshotId = item.getItemId();
        boolean isAutoSoulShot = false;
        L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());
        if(player.getAutoSoulShot().contains(SoulshotId))
        {
            isAutoSoulShot = true;
        }
        if(weaponInst == null)
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            }
            return;
        }
        // soulshot is already active
        if(weaponInst.getChargedSoulshot() != L2ItemInstance.CHARGED_NONE)
        {
            return;
        }
        int grade = weaponItem.getCrystalType().externalOrdinal;
        int soulShotConsumption = weaponItem.getSoulShotCount();
        long count = item.getCount();
        if(soulShotConsumption == 0)
        {
            // Can't use soulshots
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.CANNOT_USE_SOULSHOTS);
            return;
        }
        if(grade == 0 && SoulshotId != 5789 && SoulshotId != 1835 // NG
            || grade == 1 && SoulshotId != 1463 && SoulshotId != 22082 && SoulshotId != 13037 // D
            || grade == 2 && SoulshotId != 1464 && SoulshotId != 22083 && SoulshotId != 13045 // C
            || grade == 3 && SoulshotId != 1465 && SoulshotId != 22084 // B
            || grade == 4 && SoulshotId != 1466 && SoulshotId != 22085 && SoulshotId != 13055 // A
            || grade == 5 && SoulshotId != 1467 && SoulshotId != 22086 // S
            )
        {
            // wrong grade for weapon
            if(isAutoSoulShot)
            {
                return;
            }
            player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
            return;
        }
        if(weaponItem.getItemType() == WeaponType.BOW || weaponItem.getItemType() == WeaponType.CROSSBOW)
        {
            int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
            if(newSS < soulShotConsumption && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
            {
                soulShotConsumption = newSS;
            }
        }
        if(count < soulShotConsumption)
        {
            player.sendPacket(Msg.NOT_ENOUGH_SOULSHOTS);
            return;
        }
        weaponInst.setChargedSoulshot(L2ItemInstance.CHARGED_SOULSHOT);
        player.getInventory().destroyItem(item, soulShotConsumption, false);
        player.sendPacket(Msg.POWER_OF_THE_SPIRITS_ENABLED);
        player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));
    }

    public final int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {
    }

    public void onShutdown()
    {
    }
}

Код SpiritShot.java
Код:
package items;

import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.cache.Msg;
import l2p.gameserver.handler.IItemHandler;
import l2p.gameserver.handler.ItemHandler;
import l2p.gameserver.model.L2Playable;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.model.items.L2ItemInstance;
import l2p.gameserver.serverpackets.ExAutoSoulShot;
import l2p.gameserver.serverpackets.MagicSkillUse;
import l2p.gameserver.serverpackets.SystemMessage;
import l2p.gameserver.tables.ItemTable;
import l2p.gameserver.templates.L2Item;
import l2p.gameserver.templates.L2Weapon;

public class SpiritShot implements IItemHandler, ScriptFile
{
    // all the items ids that this handler knowns
    private static final int[] _itemIds = {5790, 2509, 2510, 2511, 2512, 2513, 2514, 22077, 22078, 22079, 22080, 22081};
    private static final short[] _skillIds = {2061, 2155, 2156, 2157, 2158, 2159};

    public void useItem(L2Playable playable, L2ItemInstance item, Boolean ctrl)
    {
        if(playable == null || !playable.isPlayer())
        {
            return;
        }
        L2Player player = (L2Player) playable;
        L2ItemInstance weaponInst = player.getActiveWeaponInstance();
        L2Weapon weaponItem = player.getActiveWeaponItem();
        int SoulshotId = item.getItemId();
        boolean isAutoSoulShot = false;
        L2Item itemTemplate = ItemTable.getInstance().getTemplate(item.getItemId());
        if(player.getAutoSoulShot().contains(SoulshotId))
        {
            isAutoSoulShot = true;
        }
        if(weaponInst == null)
        {
            if(!isAutoSoulShot)
            {
                player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
            }
            return;
        }
        // spiritshot is already active
        if(weaponInst.getChargedSpiritshot() != L2ItemInstance.CHARGED_NONE)
        {
            return;
        }
        int SpiritshotId = item.getItemId();
        int grade = weaponItem.getCrystalType().externalOrdinal;
        int soulSpiritConsumption = weaponItem.getSpiritShotCount();
        long count = item.getCount();
        if(soulSpiritConsumption == 0)
        {
            // Can't use Spiritshots
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.CANNOT_USE_SPIRITSHOTS);
            return;
        }
        if(grade == 0 && SpiritshotId != 5790 && SpiritshotId != 2509 // NG
            || grade == 1 && SpiritshotId != 2510 && SpiritshotId != 22077 // D
            || grade == 2 && SpiritshotId != 2511 && SpiritshotId != 22078 // C
            || grade == 3 && SpiritshotId != 2512 && SpiritshotId != 22079 // B
            || grade == 4 && SpiritshotId != 2513 && SpiritshotId != 22080 // A
            || grade == 5 && SpiritshotId != 2514 && SpiritshotId != 22081 // S
            )
        {
            // wrong grade for weapon
            if(isAutoSoulShot)
            {
                return;
            }
            player.sendPacket(Msg.SPIRITSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
            return;
        }
        if(count < soulSpiritConsumption)
        {
            if(isAutoSoulShot)
            {
                player.removeAutoSoulShot(SoulshotId);
                player.sendPacket(new ExAutoSoulShot(SoulshotId, false), new SystemMessage(SystemMessage.THE_AUTOMATIC_USE_OF_S1_WILL_NOW_BE_CANCELLED).addString(itemTemplate.getName()));
                return;
            }
            player.sendPacket(Msg.NOT_ENOUGH_SPIRITSHOTS);
            return;
        }
        weaponInst.setChargedSpiritshot(L2ItemInstance.CHARGED_SPIRITSHOT);
        player.getInventory().destroyItem(item, soulSpiritConsumption, false);
        player.sendPacket(Msg.POWER_OF_MANA_ENABLED);
        player.broadcastPacket(new MagicSkillUse(player, player, _skillIds[grade], 1, 0, 0));
    }

    public final int[] getItemIds()
    {
        return _itemIds;
    }

    public void onLoad()
    {
        ItemHandler.getInstance().registerItemHandler(this);
    }

    public void onReload()
    {
    }

    public void onShutdown()
    {
    }
}

Больше шотов нет.
Прошу помощи.

Добавлено через 4 часа 41 минуту
Убрал везде

player.getInventory().destroyItem(item, soulShotConsumption, false);

Скомпилированый файл ядра l2pserver.jar заменяю в папке game и login

все равно не бесконечные...

Добавлено через 5 часов 1 минуту
Все понял сам.
Нужно было еще scripts.jar заменить. Всем + кто помог.
Ответ
#10
Здравствуйте.
Такая вот бадяга, почему-то мобы не ходят, не атакуют и т.д. Уже и ГЕОдату подключал (на других сборках с этой геодатой все ОК), и памяти выделял больше, и с инвиза выходил, и обычным игроком тестил... Но все равно не ходят мобы, стоят на месте и не атакуют, атоковать начинают только после удара по ним.

Подскажите, в чем проблема.

Добавлено через 26 минут
Кто поможет???

Добавлено через 28 минут
Кто поможет???
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Lineage2 java Chronicle3 сборка AlexBayev 0 1,065 07-20-2024, 05:23 PM
Последний пост: AlexBayev
  Актуальная сборка Lineage 2 Esferol 7 4,302 02-03-2021, 06:39 PM
Последний пост: MorjeKor
  сборка EmuRT 2.4 Smiler 35 16,825 08-30-2020, 01:10 AM
Последний пост: valsha
  Сборка и исходники gw rage с небольшими доработками orchila 0 1,935 08-27-2020, 11:28 PM
Последний пост: orchila
  Сборка HF5 Prhyme 5 3,092 04-22-2020, 10:31 AM
Последний пост: Shady
  Сборка L2 Grand Crusade - Salvation и т.д. angelin13 4 6,111 03-09-2020, 11:07 AM
Последний пост: valsha
  Сборка Эпилога Kast 4 3,064 06-27-2018, 11:10 PM
Последний пост: Xeonc
  Есть железо и руки нужна сборка Anderson86 6 3,026 12-01-2017, 07:10 AM
Последний пост: Anderson86
  Сборка под Freya... TieLay 37 15,199 05-29-2017, 11:06 AM
Последний пост: ntking
  [Шара] Исходники и Сборка GvE сервера Альянс против Империи xevilx 21 12,230 02-14-2017, 06:38 AM
Последний пост: FaintSmile

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)