Change Required Amount of Players for Grandbosses/Instances

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Change Required Amount of Players for Grandbosses/Instances

Post by II337 »

Where do I need to go in my files to change these values?
For example I want to set up that you need atleast 5 people to join Valakas/Antharas/Zaken.
I want that people can teleport into a instance alone. For example seed of destruction.
Does someone knows how I can edit these values?
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Change Required Amount of Players for Grandbosses/Instan

Post by II337 »

push
User avatar
Battlecruiser
L2j Veteran
L2j Veteran
Posts: 332
Joined: Thu May 01, 2008 9:44 am

Re: Change Required Amount of Players for Grandbosses/Instan

Post by Battlecruiser »

Inside instance scripts. But wait for the abstraction layer for automatic detection of group type (party, command channel) required to enter.
Git user
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Change Required Amount of Players for Grandbosses/Instan

Post by II337 »

I tried to change in in the scripts of instances and individual scripts.
Maybe I changed the wrong values but it does not work for me...
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Change Required Amount of Players for Grandbosses/Instan

Post by II337 »

Still need help here. I fixed Antharas already.
Zaken and Valakas left.
User avatar
Zealar
L2j Veteran
L2j Veteran
Posts: 1236
Joined: Sun Jul 15, 2007 10:29 am

Re: Change Required Amount of Players for Grandbosses/Instan

Post by Zealar »

Zaken

Edit : data/scripts/instances/CavernOfThePirateCaptain.java

Look for that lines
private static final int PLAYERS_83_MIN = 9;
private static final int PLAYERS_83_MAX = 27;

For valakas look

data/scripts/ai/npc/Teleports/GrandBossTeleporters.java
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Change Required Amount of Players for Grandbosses/Instan

Post by II337 »

There is no java in this path.
data/scripts/instances/CavernOfThePirateCaptain.java
I only have Zaken Java.
I searched for "private static" and "players.size"
did not found any. At Antharas.java it was easier to change.
And at Zaken Java there is not even any about private static.

Code: Select all

/* * Copyright (C) 2004-2013 L2J DataPack *  * This file is part of L2J DataPack. *  * L2J DataPack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *  * L2J DataPack is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */package ai.npc.Teleports.GrandBossTeleporters; import ai.individual.Antharas;import ai.individual.Valakas;import ai.npc.AbstractNpcAI; import com.l2jserver.Config;import com.l2jserver.gameserver.datatables.DoorTable;import com.l2jserver.gameserver.instancemanager.GrandBossManager;import com.l2jserver.gameserver.instancemanager.QuestManager;import com.l2jserver.gameserver.model.actor.L2Npc;import com.l2jserver.gameserver.model.actor.instance.L2GrandBossInstance;import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;import com.l2jserver.gameserver.model.quest.Quest;import com.l2jserver.gameserver.model.quest.QuestState;import com.l2jserver.gameserver.model.zone.type.L2BossZone; /** * Grand Bosses teleport AI.<br> * Original python script by Emperorc. * @author Plim */public class GrandBossTeleporters extends AbstractNpcAI{    // NPCs    private static final int[] NPCs =    {        13001, // Heart of Warding : Teleport into Lair of Antharas        31859, // Teleportation Cubic : Teleport out of Lair of Antharas        31384, // Gatekeeper of Fire Dragon : Opening some doors        31385, // Heart of Volcano : Teleport into Lair of Valakas        31540, // Watcher of Valakas Klein : Teleport into Hall of Flames        31686, // Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano        31687, // Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano        31759, // Teleportation Cubic : Teleport out of Lair of Valakas    };    // Items    private static final int PORTAL_STONE = 3865;    private static final int VACUALITE_FLOATING_STONE = 7267;        private Quest valakasAI()    {        return QuestManager.getInstance().getQuest(Valakas.class.getSimpleName());    }        private Quest antharasAI()    {        return QuestManager.getInstance().getQuest(Antharas.class.getSimpleName());    }        private static int playerCount = 2;        @Override    public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)    {        String htmltext = "";        QuestState st = player.getQuestState(getName());                if (st == null)        {            st = newQuestState(player);        }                if (st.hasQuestItems(VACUALITE_FLOATING_STONE))        {            player.teleToLocation(183813, -115157, -3303);            st.set("allowEnter", "1");        }        else        {            htmltext = "31540-06.htm";        }        return htmltext;    }        @Override    public String onTalk(L2Npc npc, L2PcInstance player)    {        String htmltext = "";        QuestState st = player.getQuestState(getName());                if (st == null)        {            return null;        }                switch (npc.getNpcId())        {            case 13001:            {                if (antharasAI() != null)                {                    int status = GrandBossManager.getInstance().getBossStatus(29019);                    int statusW = GrandBossManager.getInstance().getBossStatus(29066);                    int statusN = GrandBossManager.getInstance().getBossStatus(29067);                    int statusS = GrandBossManager.getInstance().getBossStatus(29068);                                        if ((status == 2) || (statusW == 2) || (statusN == 2) || (statusS == 2))                    {                        htmltext = "13001-02.htm";                    }                    else if ((status == 3) || (statusW == 3) || (statusN == 3) || (statusS == 3))                    {                        htmltext = "13001-01.htm";                    }                    else if ((status == 0) || (status == 1)) // If entrance to see Antharas is unlocked (he is Dormant or Waiting)                    {                        if (st.hasQuestItems(PORTAL_STONE))                        {                            L2BossZone zone = GrandBossManager.getInstance().getZone(179700, 113800, -7709);                                                        if (zone != null)                            {                                zone.allowPlayerEntry(player, 2);                            }                                                        player.teleToLocation(179700 + getRandom(700), 113800 + getRandom(2100), -7709);                                                        if (status == 0)                            {                                L2GrandBossInstance antharas = GrandBossManager.getInstance().getBoss(29019);                                antharasAI().notifyEvent("waiting", antharas, player);                            }                        }                        else                        {                            htmltext = "13001-03.htm";                        }                    }                }                break;            }            case 31859:            {                player.teleToLocation(79800 + getRandom(600), 151200 + getRandom(1100), -3534);                break;            }            case 31385:            {                if (valakasAI() != null)                {                    int status = GrandBossManager.getInstance().getBossStatus(29028);                                        if ((status == 0) || (status == 1))                    {                        if (playerCount >= 2)                        {                            htmltext = "31385-03.htm";                        }                        else if (st.getInt("allowEnter") == 1)                        {                            st.unset("allowEnter");                            L2BossZone zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);                                                        if (zone != null)                            {                                zone.allowPlayerEntry(player, 2);                            }                                                        player.teleToLocation(204328 + getRandom(600), -111874 + getRandom(600), 70);                                                        playerCount++;                                                        if (status == 0)                            {                                L2GrandBossInstance valakas = GrandBossManager.getInstance().getBoss(29028);                                valakasAI().startQuestTimer("beginning", Config.VALAKAS_WAIT_TIME * 60000, valakas, null);                                GrandBossManager.getInstance().setBossStatus(29028, 1);                            }                        }                        else                        {                            htmltext = "31385-04.htm";                        }                    }                    else if (status == 2)                    {                        htmltext = "31385-02.htm";                    }                    else                    {                        htmltext = "31385-01.htm";                    }                }                else                {                    htmltext = "31385-01.htm";                }                break;            }            case 31384:            {                DoorTable.getInstance().getDoor(24210004).openMe();                break;            }            case 31686:            {                DoorTable.getInstance().getDoor(24210006).openMe();                break;            }            case 31687:            {                DoorTable.getInstance().getDoor(24210005).openMe();                break;            }            case 31540:            {                if (playerCount < 2)                {                    htmltext = "31540-01.htm";                }                else if (playerCount < 100)                {                    htmltext = "31540-02.htm";                }                else if (playerCount < 150)                {                    htmltext = "31540-03.htm";                }                else if (playerCount < 200)                {                    htmltext = "31540-04.htm";                }                else                {                    htmltext = "31540-05.htm";                }                break;            }            case 31759:            {                player.teleToLocation(150037 + getRandom(500), -57720 + getRandom(500), -2976);                break;            }        }        return htmltext;    }        private GrandBossTeleporters(String name, String descr)    {        super(name, descr);        addStartNpc(NPCs);        addTalkId(NPCs);    }        public static void main(String[] args)    {        new GrandBossTeleporters(GrandBossTeleporters.class.getSimpleName(), "ai/npc/Teleports");    }} 
User avatar
Zealar
L2j Veteran
L2j Veteran
Posts: 1236
Joined: Sun Jul 15, 2007 10:29 am

Re: Change Required Amount of Players for Grandbosses/Instan

Post by Zealar »

What version do you use?
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Change Required Amount of Players for Grandbosses/Instan

Post by II337 »

Your pack from 4shared.
Datapack 10421
Server 6622

H5 Stable
User avatar
Zealar
L2j Veteran
L2j Veteran
Posts: 1236
Joined: Sun Jul 15, 2007 10:29 am

Re: Change Required Amount of Players for Grandbosses/Instan

Post by Zealar »

\game\data\scripts\instances\CavernOfThePirateCaptain\CavernOfThePirateCaptain.java
II337
Posts: 67
Joined: Mon Oct 27, 2014 9:44 pm

Re: Change Required Amount of Players for Grandbosses/Instan

Post by II337 »

Image
Thats exactly how it looks
User avatar
Zealar
L2j Veteran
L2j Veteran
Posts: 1236
Joined: Sun Jul 15, 2007 10:29 am

Re: Change Required Amount of Players for Grandbosses/Instan

Post by Zealar »

Maybe that version is too old and don't got it as instance. Better update to last stable.
http://www.l2jserver.com/#downloads
Sybarious
Posts: 25
Joined: Tue May 05, 2015 9:36 pm

Re: Change Required Amount of Players for Grandbosses/Instances

Post by Sybarious »

Could someone advise please how to remove part and command channel requirement for Frintezza, Zaken and Freya?

I'm using the latest master build

Thanks :)
zhort
Posts: 106
Joined: Thu Oct 06, 2011 11:08 pm

Re: Change Required Amount of Players for Grandbosses/Instances

Post by zhort »

Sybarious wrote:Could someone advise please how to remove part and command channel requirement for Frintezza, Zaken and Freya?

I'm using the latest master build

Thanks :)
Check all if & comment or delete when u see & commander or soemthing like it
Post Reply