Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   Lineage II (https://forum.zone-game.info/forumdisplay.php?f=34)
-   -   Сундук с сокровищами (https://forum.zone-game.info/showthread.php?t=12084)

MROBAR 17.01.2011 12:24

Re: Сундук с сокровищами
 
В скиле ничего не висит ... ну ток шанст прохода , требуемые вещи , мп , и т.д ... это реально по ходу в ядре ... ну я ещё поищу , отпишусь

zeta 17.01.2011 12:55

Re: Сундук с сокровищами
 
Cборка l2j server. По ядру кто может подробнее объяснить?

incognito 17.01.2011 16:51

Re: Сундук с сокровищами
 
\data\scripts\handlers\skillhandlers\Unlock.java <--тут сия скилтайп
Код:

private static final boolean chestUnlock(L2Skill skill, L2Character chest)
        {
                int chance = 0;
                if (chest.getLevel() > 60)
                {
                        if (skill.getLevel() < 10)
                                return false;
                       
                        chance = (skill.getLevel() - 10) * 5 + 30;
                }
                else if (chest.getLevel() > 40)
                {
                        if (skill.getLevel() < 6)
                                return false;
                       
                        chance = (skill.getLevel() - 6) * 5 + 10;
                }
                else if (chest.getLevel() > 30)
                {
                        if (skill.getLevel() < 3)
                                return false;
                        if (skill.getLevel() > 12)
                                return true;
                       
                        chance = (skill.getLevel() - 3) * 5 + 30;
                }
                else
                {
                        if (skill.getLevel() > 10)
                                return true;
                       
                        chance = skill.getLevel() * 5 + 35;
                }
               
                chance = Math.min(chance, 50);
                return Rnd.get(100) < chance;
        }

это метод открытия сундука, тут же шанс, остальное дело ваших рук=)

zeta 17.01.2011 18:53

Re: Сундук с сокровищами
 
Задам еще оди вопрос к знатокам. Где указан id самой заточки которая падает при использовании скила унлук?

incognito 17.01.2011 21:30

Re: Сундук с сокровищами
 
Цитата:

Сообщение от zeta (Сообщение 104669)
Задам еще оди вопрос к знатокам. Где указан id самой заточки которая падает при использовании скила унлук?

в дроплисте под них все, потому что в сундуковом инстансе
Код:

public void onSpawn()
        {
                super.onSpawn();
                _isInteracted = false;
                _specialDrop = false;
                setMustRewardExpSp(true);
        }
....
public void doItemDrop(L2NpcTemplate npcTemplate, L2Character lastAttacker)
        {
                int id = getTemplate().npcId;
               
                if (!_specialDrop)
                {
                        if (id >= 18265 && id <= 18286)
                                id += 3536;
                        else if (id == 18287 || id == 18288)
                                id = 21671;
                        else if (id == 18289 || id == 18290)
                                id = 21694;
                        else if (id == 18291 || id == 18292)
                                id = 21717;
                        else if (id == 18293 || id == 18294)
                                id = 21740;
                        else if (id == 18295 || id == 18296)
                                id = 21763;
                        else if (id == 18297 || id == 18298)
                                id = 21786;
                }
               
                super.doItemDrop(NpcTable.getInstance().getTemplate(id),lastAttacker);
        }

а сия метод идет от
Код:

        public void doItemDrop(L2NpcTemplate npcTemplate, L2Character lastAttacker)
        {
                if (lastAttacker == null)
                        return;
               
                L2PcInstance player = lastAttacker.getActingPlayer();
               
                // Don't drop anything if the last attacker or owner isn't L2PcInstance
                if (player == null)
                        return;
               
                // level modifier in %'s (will be subtracted from drop chance)
                int levelModifier = calculateLevelModifierForDrop(player);
               
                CursedWeaponsManager.getInstance().checkDrop(this, player);
               
                // now throw all categorized drops and handle spoil.
                if (npcTemplate.getDropData()!=null)
                {
                        for(L2DropCategory cat:npcTemplate.getDropData())
                        {
                                RewardItem item = null;
                                if (cat.isSweep())
                                {
                                        // according to sh1ny, seeded mobs CAN be spoiled and swept.
                                        if ( isSpoil()/* && !isSeeded() */)
                                        {
                                                FastList<RewardItem> sweepList = new FastList<RewardItem>();
                                               
                                                for(L2DropData drop: cat.getAllDrops() )
                                                {
                                                        item = calculateRewardItem(player, drop, levelModifier, true);
                                                        if (item == null)
                                                                continue;
                                                       
                                                        if (Config.DEBUG)
                                                                _log.fine("Item id to spoil: " + item.getItemId() + " amount: " + item.getCount());
                                                        sweepList.add(item);
                                                }
                                                // Set the table _sweepItems of this L2Attackable
                                                if (!sweepList.isEmpty())
                                                        _sweepItems = sweepList.toArray(new RewardItem[sweepList.size()]);
                                        }
                                }
...

что и говорит мне о дроплисте


Текущее время: 20:12. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot