Тема: Frintezza.java
Показать сообщение отдельно
Непрочитано 22.03.2012, 16:47   #9
Аватар для FewG
Пользователь

По умолчанию Re: Frintezza.java

Попробуй (просто замени метод onTalk):

Код:
public String onTalk(L2Npc npc, L2PcInstance player)
    {
        if (npc.getNpcId() == CUBE)
        {
            int x = 150037 + Rnd.get(500);
            int y = -57720 + Rnd.get(500);
            player.teleToLocation(x, y, -2976);
            return null;
        }
        String htmltext = "";
        if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == DORMANT)
        {
            if (player.getInventory().getItemByItemId(8073) == null)
                htmltext = "<html><body>You dont have required item.</body></html>";
            else
            {
                player.destroyItemByItemId("Quest", 8073, 1, player, true);
                GrandBossManager.getInstance().setBossStatus(FRINTEZZA, WAITING);
                startQuestTimer("close", 0, npc, null);
                startQuestTimer("room1_spawn", 5000, npc, null);
                startQuestTimer("room_final", 2100000, npc, null);
                startQuestTimer("frintezza_despawn", 60000, npc, null, true);
                _LastAction = System.currentTimeMillis();

                if (player == null || player.getLevel() < 74)
                    continue;
                if (!player.isInsideRadius(npc, 700, false, false))
                    continue;
                if (_PlayersInside.size() > 45)
                {
                    player.sendMessage("The number of challenges have been full, so can not enter.");
                    break;
                }
                _PlayersInside.add(player);
                _Zone.allowPlayerEntry(player, 300);
                player.teleToLocation(_invadeLoc[_LocCycle][0] + Rnd.get(50), _invadeLoc[_LocCycle][1] + Rnd.get(50), _invadeLoc[_LocCycle][2]);

                if (_PlayersInside.size() > 45)
                    break;
                _LocCycle++;
                if (_LocCycle >= 5)
                    _LocCycle = 0;                
            }
        }
        else
            htmltext = "<html><body>Someone else is already inside the Magic Force Field. Try again later.</body></html>";
        return htmltext;
    }
P.S. Сам не тестил, но интуитивно должно работать.
__________________
Пропаченные Боты для Игр: Ботва, Понаехали, тут! и пр. Пиши в ПМ.
FewG вне форума Ответить с цитированием