Петы-Компаньоны

Статус
В этой теме нельзя размещать новые ответы.

BadStealth

Величайший
Местный
Победитель в номинации 2023
Победитель в номинации 2022
Победитель в номинации 2021
Победитель в номинации 2020
Просветитель
Клиент разработчик
Старожил I степени
Преподаватель
За веру и верность форуму
Победитель в номинации 2019
Сообщения
309
Розыгрыши
0
Репутация
429
Реакции
595
Баллы
1 573
Ребят подправил ивент Lovers' Jubilee (Юбилей Влюбленных).
Все нормально работает и запускается без ошибок. Но вот встала загвоздка в Компаньонах.
Они у меня вообще не прописаны. Т.е. при нажатии на Предмет призыва компаньон не появляется. Хотел сделать на примере волка- но пока лазил в исходах совершенно заблудился и запутался.
Может знает кто- КАК прописать этих компаньонов в сборку на исходах Фениксов?
Вот например ID 20911 для призыва Лилиат
А вот само ID Лилиат 1565
В таблицу Pet_Data дописал 5 уровней для этого пета. Ну так для проверки- но вот что и куда дальше я запутался.
В PetDataTable.java также дописал
Код:
public final static int BR_ROSE_LILIATH_A_ID = 1565;
BR_ROSE_LILIATH_A(BR_ROSE_LILIATH_A_ID, 20911, Config.FeedEventPets, false, 1, 12, .3f, 2, 2);
Куда прописать чтобы при использовании 20911 призывалась 1565?
При призыве выдает такую ошибку
Код:
20:53:50.120  could not restore Pet data from item[268485606]: java.lang.NullPointerException
java.lang.NullPointerException
        at l2p.gameserver.model.instances.L2PetInstance.getExpForThisLevel(L2PetInstance.java:658)
        at l2p.gameserver.model.instances.L2PetInstance.<init>(L2PetInstance.java:209)
        at l2p.gameserver.model.instances.L2PetBabyInstance.<init>(L2PetBabyInstance.java:30)
        at l2p.gameserver.model.instances.L2PetInstance.restore(L2PetInstance.java:123)
        at l2p.gameserver.model.instances.L2PetInstance.spawnPet(L2PetInstance.java:162)
        at items.PetSummon$SummonFinalizer.run(PetSummon.java:79)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Scheduled
ThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
oolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
 
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
PetDataTable
Код:
public final static int ROSE_DESELOPH_ID = 1562;
    public final static int ROSE_HYUM_ID = 1563;
    public final static int ROSE_REKANG_ID = 1564;
    public final static int ROSE_LILIAS_ID = 1565;
    public final static int ROSE_LAPHAM_ID = 1566;
    public final static int ROSE_MAPHUM_ID = 1567;
    public final static int IMPROVED_ROSE_DESELOPH_ID = 1568;
    public final static int IMPROVED_ROSE_HYUM_ID = 1569;
    public final static int IMPROVED_ROSE_REKANG_ID = 1570;
    public final static int IMPROVED_ROSE_LILIAS_ID = 1571;
    public final static int IMPROVED_ROSE_LAPHAM_ID = 1572;
    public final static int IMPROVED_ROSE_MAPHUM_ID = 1573;

       ROSE_DESELOPH(ROSE_DESELOPH_ID, 20908, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_HYUM(ROSE_HYUM_ID, 20909, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_REKANG(ROSE_REKANG_ID, 20910, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_LILIAS(ROSE_LILIAS_ID, 20911, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_LAPHAM(ROSE_LAPHAM_ID, 20912, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_MAPHUM(ROSE_MAPHUM_ID, 20913, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_DESELOPH(IMPROVED_ROSE_DESELOPH_ID, 20915, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_HYUM(IMPROVED_ROSE_HYUM_ID, 20916, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_REKANG(IMPROVED_ROSE_REKANG_ID, 20917, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_LILIAS(IMPROVED_ROSE_LILIAS_ID, 20918, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_LAPHAM(IMPROVED_ROSE_LAPHAM_ID, 20919, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_MAPHUM(IMPROVED_ROSE_MAPHUM_ID, 20920, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
PetBabyInstance
Код:
private static final Skill[][] ROSE_DESELOPH_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Might, 3), SkillTable.getInstance().getInfo(Pet_Haste, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
        },
    };
  
    private static final Skill[][] ROSE_HYUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Empower, 3), SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6) },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3)
        },
      
    };
  
    private static final Skill[][] ROSE_REKANG_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6), SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };
  
    private static final Skill[][] ROSE_LILIAS_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Might, 3), SkillTable.getInstance().getInfo(Pet_Haste, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
          
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
          
        },
      
    };
  
    private static final Skill[][] ROSE_LAPHAM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Empower, 3), SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6) },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
        },
    };
  
    private static final Skill[][] ROSE_MAPHUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6), SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };
  
    private static final Skill[][] IMPROVED_ROSE_DESELOPH_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1), SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
    };
  
    private static final Skill[][] IMPROVED_ROSE_HYUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Acumen, 3), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
    };
  
    private static final Skill[][] IMPROVED_ROSE_REKANG_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };
  
    private static final Skill[][] IMPROVED_ROSE_LILIAS_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
    };
  
    private static final Skill[][] IMPROVED_ROSE_LAPHAM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Acumen, 3), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
    };
  
    private static final Skill[][] IMPROVED_ROSE_MAPHUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };
}
Дальше уж думаю сами поймете что к чему.
 
PetDataTable
Код:
public final static int ROSE_DESELOPH_ID = 1562;
    public final static int ROSE_HYUM_ID = 1563;
    public final static int ROSE_REKANG_ID = 1564;
    public final static int ROSE_LILIAS_ID = 1565;
    public final static int ROSE_LAPHAM_ID = 1566;
    public final static int ROSE_MAPHUM_ID = 1567;
    public final static int IMPROVED_ROSE_DESELOPH_ID = 1568;
    public final static int IMPROVED_ROSE_HYUM_ID = 1569;
    public final static int IMPROVED_ROSE_REKANG_ID = 1570;
    public final static int IMPROVED_ROSE_LILIAS_ID = 1571;
    public final static int IMPROVED_ROSE_LAPHAM_ID = 1572;
    public final static int IMPROVED_ROSE_MAPHUM_ID = 1573;

       ROSE_DESELOPH(ROSE_DESELOPH_ID, 20908, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_HYUM(ROSE_HYUM_ID, 20909, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_REKANG(ROSE_REKANG_ID, 20910, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_LILIAS(ROSE_LILIAS_ID, 20911, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_LAPHAM(ROSE_LAPHAM_ID, 20912, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        ROSE_MAPHUM(ROSE_MAPHUM_ID, 20913, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_DESELOPH(IMPROVED_ROSE_DESELOPH_ID, 20915, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_HYUM(IMPROVED_ROSE_HYUM_ID, 20916, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_REKANG(IMPROVED_ROSE_REKANG_ID, 20917, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_LILIAS(IMPROVED_ROSE_LILIAS_ID, 20918, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_LAPHAM(IMPROVED_ROSE_LAPHAM_ID, 20919, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
        IMPROVED_ROSE_MAPHUM(IMPROVED_ROSE_MAPHUM_ID, 20920, Config.VITAMIN_PETS_FOOD_ID, false, 55, 12, .3, 2, 2),
PetBabyInstance
Код:
private static final Skill[][] ROSE_DESELOPH_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Might, 3), SkillTable.getInstance().getInfo(Pet_Haste, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
        },
    };

    private static final Skill[][] ROSE_HYUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Empower, 3), SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6) },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3)
        },
   
    };

    private static final Skill[][] ROSE_REKANG_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6), SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };

    private static final Skill[][] ROSE_LILIAS_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Might, 3), SkillTable.getInstance().getInfo(Pet_Haste, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
       
        },
        {
            SkillTable.getInstance().getInfo(Pet_Might, 3),
            SkillTable.getInstance().getInfo(Pet_Haste, 2),
            SkillTable.getInstance().getInfo(Pet_Focus, 3),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Death_Wisper, 3),
            SkillTable.getInstance().getInfo(Pet_Vampiric_Rage, 4)
       
        },
   
    };

    private static final Skill[][] ROSE_LAPHAM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Empower, 3), SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6) },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
        },
        {
            SkillTable.getInstance().getInfo(Pet_Empower, 3),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
        },
    };

    private static final Skill[][] ROSE_MAPHUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6), SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2) },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Blessed_Body, 6),
            SkillTable.getInstance().getInfo(Pet_Wind_Walk, 2),
            SkillTable.getInstance().getInfo(Pet_Blessed_Soul, 6),
            SkillTable.getInstance().getInfo(Pet_Shield, 3),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };

    private static final Skill[][] IMPROVED_ROSE_DESELOPH_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1), SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
    };

    private static final Skill[][] IMPROVED_ROSE_HYUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Acumen, 3), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
    };

    private static final Skill[][] IMPROVED_ROSE_REKANG_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };

    private static final Skill[][] IMPROVED_ROSE_LILIAS_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Chant_of_Blood_Awakening, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Critical_Attack, 1)
        },
    };

    private static final Skill[][] IMPROVED_ROSE_LAPHAM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Acumen, 3), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Acumen, 3),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Magic, 1)
        },
    };

    private static final Skill[][] IMPROVED_ROSE_MAPHUM_BUFFS =
    {
        { SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1), SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1) },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
        {
            SkillTable.getInstance().getInfo(Pet_Improve_Combat, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Condition, 1),
            SkillTable.getInstance().getInfo(Pet_Improve_Movement, 1),
            SkillTable.getInstance().getInfo(Pet_Armor_Maintenance, 1),
            SkillTable.getInstance().getInfo(Pet_Weapon_Maintenance, 1)
        },
    };
}
Дальше уж думаю сами поймете что к чему.
Вот спасибо... Все теперь нормально призывается. Ну со скилами при использовании пишет
Код:
15:10:02.125  unhandled action type 5009 by player admin
15:10:09.190  unhandled action type 5010 by player admin
15:10:13.600  unhandled action type 5007 by player admin
15:10:17.536  unhandled action type 5001 by player admin
15:12:34.410  unhandled action type 5001 by player admin
15:12:41.825  unhandled action type 5006 by player admin
15:12:48.120  unhandled action type 5007 by player admin
15:12:48.933  unhandled action type 5007 by player admin
15:12:49.416  unhandled action type 5007 by player admin
15:12:54.014  unhandled action type 5008 by player admin
15:12:54.737  unhandled action type 5008 by player admin
15:12:55.367  unhandled action type 5008 by player admin
15:12:55.997  unhandled action type 5008 by player admin
15:13:01.476  unhandled action type 5009 by player admin
15:13:01.899  unhandled action type 5009 by player admin
15:13:02.292  unhandled action type 5009 by player admin
15:13:02.688  unhandled action type 5009 by player admin
15:13:08.629  unhandled action type 5010 by player admin
15:13:09.076  unhandled action type 5010 by player admin
15:13:09.463  unhandled action type 5010 by player admin
15:13:09.814  unhandled action type 5010 by player admin
Буду разбираться. У меня сами петы были невидимки вставил фалик branch2.ukx из Фреи и петы появились.
Со скилами разобрался все нормально...
 
Последнее редактирование:
Ребят вот загвоздка с абнормалами...
У меня в сборке совершенно не реализована данная система. По ивенту там падают Хербы. Хербы я сделал. Но вот с помощью абнормалов там реализованно чтобы их можно было собирать до 10 штук. В результате изменяется иконка вверху в бафах с номером. И как только доходит до 10 то Пет восстанавливает Виталку.
Можно как-то реализовать какой-то счетчик подобранных хербов чтобы менялась цифра в БАФАХ и если счетчик достигнет 10 подобранных хербов подряд, то пет восстанавливал виталку.
Чтобы пет восстановил виталку я так понимаю ему надо прописать AI.
А вот как придумать этот счетчик я не знаю. И по какому принципу сделать чтобы менялась цифра в БАФАХ.
Там иконка розы с цифрой 1, затем иконка с цифрой 2 и т.д.
Буду очень признателен за хоть какое-то написание скрипта в общих чертах для счетчика.
 
пример
Код:
package handler.skills;

import java.util.List;

import l2p.gameserver.config.VitalityConfig;
import l2p.gameserver.data.holder.PetDataHolder;
import l2p.gameserver.data.holder.SkillHolder;
import l2p.gameserver.model.Creature;
import l2p.gameserver.model.Effect;
import l2p.gameserver.model.Player;
import l2p.gameserver.model.Skill;

/**
* Используется специальным хербом в эвенте
*
* @author Gaikotsu
*/
public class RosePetal extends ScriptSkillType
{
    private static final int[] _skillIds = { 22158 };
    private static int _fullPoints = VitalityConfig.MAX_POINTS;

    @Override
    public void useSkill(Skill skill, Creature caster, List<Creature> targets)
    {
        Player player;

        for (Creature target : targets)
        {
            player = (target.isPlayer() || target.isPet() || target.isServitor() || target.isSpecialSummon()) ? target.getPlayer() : null;

            if (player == null)
                continue;

            Effect ef = player.getEffectList().getEffectBySkillId(22158);
            int level = ef != null ? ef.getStackOrder() + 1 : 1;

            if (level >= 10 && player.getSummonList().getPet() != null && PetDataHolder.isRoseSpirit(player.getSummonList().getPet().getNpcId()))
            {
                player.getVitality().incPoints(_fullPoints / 10);
                player.getEffectList().stopEffect(ef.getSkill());
                player.sendUserInfo();
            }
            else
                SkillHolder.getInstance().getInfo(22158, Math.min(level, 10)).getEffects(caster, player, false, false);
        }
    }

    @Override
    public int[] getSkillIds()
    {
        return _skillIds;
    }
}
если простыми словами, то просто проверяется наличие эффекта определенного скилла на игроке и если скилла нет/меньше 10 уровня, то идет рекаст его же, но уровнем выше. иначе стопаем эффект и увеличиваем виталку

для реализации треба поддержка хэндлеров скиллов (полностью это все я на зг когда-то описывал, для феникса), ну или добавить новый скил тайп/эффект в ядро.
 
Последнее редактирование:
  • Мне нравится
Реакции: BadStealth

    BadStealth

    Баллов: 2
    За эпический ответ
Обратите внимание, что данный пользователь заблокирован! Не совершайте с ним никаких сделок! Перейдите в его профиль, чтобы узнать причину блокировки.
Вот спасибо... Все теперь нормально призывается. Ну со скилами при использовании пишет
Код:
15:10:02.125  unhandled action type 5009 by player admin
15:10:09.190  unhandled action type 5010 by player admin
15:10:13.600  unhandled action type 5007 by player admin
15:10:17.536  unhandled action type 5001 by player admin
15:12:34.410  unhandled action type 5001 by player admin
15:12:41.825  unhandled action type 5006 by player admin
15:12:48.120  unhandled action type 5007 by player admin
15:12:48.933  unhandled action type 5007 by player admin
15:12:49.416  unhandled action type 5007 by player admin
15:12:54.014  unhandled action type 5008 by player admin
15:12:54.737  unhandled action type 5008 by player admin
15:12:55.367  unhandled action type 5008 by player admin
15:12:55.997  unhandled action type 5008 by player admin
15:13:01.476  unhandled action type 5009 by player admin
15:13:01.899  unhandled action type 5009 by player admin
15:13:02.292  unhandled action type 5009 by player admin
15:13:02.688  unhandled action type 5009 by player admin
15:13:08.629  unhandled action type 5010 by player admin
15:13:09.076  unhandled action type 5010 by player admin
15:13:09.463  unhandled action type 5010 by player admin
15:13:09.814  unhandled action type 5010 by player admin
Буду разбираться. У меня сами петы были невидимки вставил фалик branch2.ukx из Фреи и петы появились.
Со скилами разобрался все нормально...
PetBabyInstance
Код:
public Skill[] getBuffs()
    {
        switch(getNpcId())
        {
        case PetDataTable.IMPROVED_BABY_COUGAR_ID:
            return COUGAR_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_BABY_BUFFALO_ID:
            return BUFFALO_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_BABY_KOOKABURRA_ID:
            return KOOKABURRA_BUFFS[getBuffLevel()];
            case PetDataTable.FAIRY_PRINCESS_ID:
            return FAIRY_PRINCESS_BUFFS[getBuffLevel()];
            case PetDataTable.SPIRIT_SHAMAN_ID:
            return SPIRIT_SHAMAN_BUFFS[getBuffLevel()];
            case PetDataTable.TOY_KNIGHT_ID:
            return TOY_KNIGHT_BUFFS[getBuffLevel()];
            case PetDataTable.TURTLE_ASCETIC_ID:
            return TURTLE_ASCETIC_BUFFS[getBuffLevel()];
            case PetDataTable.WHITE_WEASEL_ID:
            return WHITE_WEASEL_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_DESELOPH_ID:
            return ROSE_DESELOPH_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_HYUM_ID:
            return ROSE_HYUM_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_REKANG_ID:
            return ROSE_REKANG_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_LILIAS_ID:
            return ROSE_LILIAS_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_LAPHAM_ID:
            return ROSE_LAPHAM_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_MAPHUM_ID:
            return ROSE_MAPHUM_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_DESELOPH_ID:
            return IMPROVED_ROSE_DESELOPH_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_HYUM_ID:
            return IMPROVED_ROSE_HYUM_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_REKANG_ID:
            return IMPROVED_ROSE_REKANG_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_LILIAS_ID:
            return IMPROVED_ROSE_LILIAS_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_LAPHAM_ID:
            return IMPROVED_ROSE_LAPHAM_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_MAPHUM_ID:
            return IMPROVED_ROSE_MAPHUM_BUFFS[getBuffLevel()];
            default:
                return Skill.EMPTY_ARRAY;
        }
    }
private static final int Pet_Haste = 5186; // 1-2
    private static final int Pet_Vampiric_Rage = 5187; // 1-4
    @SuppressWarnings("unused")
    private static final int Pet_Regeneration = 5188; // 1-3
    private static final int Pet_Blessed_Body = 5189; // 1-6
    private static final int Pet_Blessed_Soul = 5190; // 1-6
    private static final int Pet_Guidance = 5191; // 1-3
    private static final int Pet_Wind_Walk = 5192; // 1-2
    private static final int Pet_Acumen = 5193; // 1-3
    private static final int Pet_Empower = 5194; // 1-3
    private static final int Pet_Concentration = 5201; // 1-3
    private static final int Pet_Might = 5586; // 1-3
    private static final int Pet_Shield = 5587; // 1-3
    private static final int Pet_Focus = 5588; // 1-3
    private static final int Pet_Death_Wisper = 5589; // 1-3
    private static final int Pet_Armor_Maintenance = 5988; // 1
    private static final int Pet_Weapon_Maintenance = 5987; // 1 
    private static final int Pet_Improve_Condition = 1501; // 1 
    private static final int Pet_Improve_Movement = 1504; // 1 
    private static final int Pet_Improve_Combat = 1499; // 1 
    private static final int Pet_Chant_of_Blood_Awakening = 1519; // 1 
    private static final int Pet_Improve_Critical_Attack = 1502; // 1 
    private static final int Pet_Improve_Magic = 1500; // 1 
    // debuff (unused)
    @SuppressWarnings("unused")
    private static final int WindShackle = 5196, Hex = 5197, Slow = 5198, CurseGloom = 5199;
 
Ребят думаю многих уже задрал своими вопросами, но все же...
В игре есть временные предметы- у которых время тикает как только они попадают в инвентарь.
Так же в игре есть временные предметы у которых время должно тикать только когда призван пет с этого предмета.
Пытался добавить условия для временных предметов чтобы если ID предмета 20911 то время для него останавливалось.
Ничего не получилось- время как шло так и идет.
Код:
    public void startTemporalTask(L2Player owner)
    {
        int itemaId = getItemId();
      
        if(!isTemporalItem() || owner == null) // Вещь не временная? До свидания.
        {
            return;
        }
        if(_itemLifeTimeTask != null && !_itemLifeTimeTask.isDone()) // Если таск уже тикает, то повторно дергать не надо
        {
            return;
        }
        if(!checkDestruction(owner)) // Если у вещи ещё есть мана - запустить таск уменьшения
        {
            _itemLifeTimeTask = ThreadPoolManager.getInstance().scheduleGeneral(new LifeTimeTask(), 60000);
        }
    }

PetBabyInstance
Код:
public Skill[] getBuffs()
    {
        switch(getNpcId())
        {
        case PetDataTable.IMPROVED_BABY_COUGAR_ID:
            return COUGAR_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_BABY_BUFFALO_ID:
            return BUFFALO_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_BABY_KOOKABURRA_ID:
            return KOOKABURRA_BUFFS[getBuffLevel()];
            case PetDataTable.FAIRY_PRINCESS_ID:
            return FAIRY_PRINCESS_BUFFS[getBuffLevel()];
            case PetDataTable.SPIRIT_SHAMAN_ID:
            return SPIRIT_SHAMAN_BUFFS[getBuffLevel()];
            case PetDataTable.TOY_KNIGHT_ID:
            return TOY_KNIGHT_BUFFS[getBuffLevel()];
            case PetDataTable.TURTLE_ASCETIC_ID:
            return TURTLE_ASCETIC_BUFFS[getBuffLevel()];
            case PetDataTable.WHITE_WEASEL_ID:
            return WHITE_WEASEL_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_DESELOPH_ID:
            return ROSE_DESELOPH_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_HYUM_ID:
            return ROSE_HYUM_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_REKANG_ID:
            return ROSE_REKANG_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_LILIAS_ID:
            return ROSE_LILIAS_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_LAPHAM_ID:
            return ROSE_LAPHAM_BUFFS[getBuffLevel()];
            case PetDataTable.ROSE_MAPHUM_ID:
            return ROSE_MAPHUM_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_DESELOPH_ID:
            return IMPROVED_ROSE_DESELOPH_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_HYUM_ID:
            return IMPROVED_ROSE_HYUM_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_REKANG_ID:
            return IMPROVED_ROSE_REKANG_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_LILIAS_ID:
            return IMPROVED_ROSE_LILIAS_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_LAPHAM_ID:
            return IMPROVED_ROSE_LAPHAM_BUFFS[getBuffLevel()];
            case PetDataTable.IMPROVED_ROSE_MAPHUM_ID:
            return IMPROVED_ROSE_MAPHUM_BUFFS[getBuffLevel()];
            default:
                return Skill.EMPTY_ARRAY;
        }
    }
private static final int Pet_Haste = 5186; // 1-2
    private static final int Pet_Vampiric_Rage = 5187; // 1-4
    @SuppressWarnings("unused")
    private static final int Pet_Regeneration = 5188; // 1-3
    private static final int Pet_Blessed_Body = 5189; // 1-6
    private static final int Pet_Blessed_Soul = 5190; // 1-6
    private static final int Pet_Guidance = 5191; // 1-3
    private static final int Pet_Wind_Walk = 5192; // 1-2
    private static final int Pet_Acumen = 5193; // 1-3
    private static final int Pet_Empower = 5194; // 1-3
    private static final int Pet_Concentration = 5201; // 1-3
    private static final int Pet_Might = 5586; // 1-3
    private static final int Pet_Shield = 5587; // 1-3
    private static final int Pet_Focus = 5588; // 1-3
    private static final int Pet_Death_Wisper = 5589; // 1-3
    private static final int Pet_Armor_Maintenance = 5988; // 1
    private static final int Pet_Weapon_Maintenance = 5987; // 1
    private static final int Pet_Improve_Condition = 1501; // 1
    private static final int Pet_Improve_Movement = 1504; // 1
    private static final int Pet_Improve_Combat = 1499; // 1
    private static final int Pet_Chant_of_Blood_Awakening = 1519; // 1
    private static final int Pet_Improve_Critical_Attack = 1502; // 1
    private static final int Pet_Improve_Magic = 1500; // 1
    // debuff (unused)
    @SuppressWarnings("unused")
    private static final int WindShackle = 5196, Hex = 5197, Slow = 5198, CurseGloom = 5199;
Со скилами разобрался спасибо все скилы работают. Ну кроме абнормалов. :) Пока!!!
Щас вот с временным использование предметов загвоздка- а там написано время призыва 3 часа. Я сделал предмет временным так он сразу тикает- хоть призван пет хоть нет.
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху Снизу