Jump to content
  • 0

Question

Posted

Hello guys, need help, how to disable grand boss quest teleport.

 

expl. When you get to baium,valakas or antharas lair, other ppl cant teleport. until rb dead or you dead, how to disable this that all ppl can tp anytime?

thanks.

3 answers to this question

Recommended Posts

  • 0
Posted

as i understand i need to remove smth from here, or add some lines, SweeTs can you give me help with it?

 

 

package net.sf.l2j.gameserver.scripting.scripts.teleports;

import java.util.List;

import net.sf.l2j.commons.math.MathUtil;
import net.sf.l2j.commons.random.Rnd;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.data.DoorTable;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.instancemanager.ZoneManager;
import net.sf.l2j.gameserver.model.Location;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
import net.sf.l2j.gameserver.scripting.ScriptManager;
import net.sf.l2j.gameserver.scripting.scripts.ai.individual.Antharas;
import net.sf.l2j.gameserver.scripting.scripts.ai.individual.Baium;
import net.sf.l2j.gameserver.scripting.scripts.ai.individual.Sailren;
import net.sf.l2j.gameserver.scripting.scripts.ai.individual.Valakas;

/**
 * This script leads behavior of multiple bosses teleporters.
 * <ul>
 * <li>13001, Heart of Warding : Teleport into Lair of Antharas</li>
 * <li>29055, Teleportation Cubic : Teleport out of Baium zone</li>
 * <li>31859, Teleportation Cubic : Teleport out of Lair of Antharas</li>
 * <li>31384, Gatekeeper of Fire Dragon : Opening some doors</li>
 * <li>31385, Heart of Volcano : Teleport into Lair of Valakas</li>
 * <li>31540, Watcher of Valakas Klein : Teleport into Hall of Flames</li>
 * <li>31686, Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano</li>
 * <li>31687, Gatekeeper of Fire Dragon : Opens doors to Heart of Volcano</li>
 * <li>31759, Teleportation Cubic : Teleport out of Lair of Valakas</li>
 * <li>31862, Angelic Vortex : Baium Teleport (3 different HTMs according of situation)</li>
 * <li>32107, Teleportation Cubic : Teleport out of Sailren Nest</li>
 * <li>32109, Shilen's Stone Statue : Teleport to Sailren Nest</li>
 * </ul>
 * @author Plim, original python script by Emperorc
 */
public class GrandBossTeleporters extends Quest
{
    private static final String qn = "GrandBossTeleporters";
    
    private static final Location BAIUM_IN = new Location(113100, 14500, 10077);
    private static final Location[] BAIUM_OUT =
    {
        new Location(108784, 16000, -4928),
        new Location(113824, 10448, -5164),
        new Location(115488, 22096, -5168)
    };
    
    private static final Location SAILREN_IN = new Location(27333, -6835, -1970);
    private static final Location[] SAILREN_OUT =
    {
        new Location(10610, -24035, -3676),
        new Location(10703, -24041, -3673),
        new Location(10769, -24107, -3672)
    };
    
    private static int _valakasPlayersCount = 0;
    
    public GrandBossTeleporters()
    {
        super(-1, "teleports");
        
        addFirstTalkId(29055, 31862);
        addStartNpc(13001, 29055, 31859, 31384, 31385, 31540, 31686, 31687, 31759, 31862, 32107, 32109);
        addTalkId(13001, 29055, 31859, 31384, 31385, 31540, 31686, 31687, 31759, 31862, 32107, 32109);
    }
    
    @Override
    public String onAdvEvent(String event, Npc npc, Player player)
    {
        String htmltext = "";
        QuestState st = player.getQuestState(qn);
        if (st == null)
            st = newQuestState(player);
        
        st.setState(STATE_STARTED);
        
        if (event.equalsIgnoreCase("baium"))
        {
            // Player is mounted on a wyvern, cancel it.
            if (player.isFlying())
                htmltext = "31862-05.htm";
            // Player hasn't blooded fabric, cancel it.
            else if (!st.hasQuestItems(4295))
                htmltext = "31862-03.htm";
            // All is ok, take the item and teleport the player inside.
            else
            {
                st.takeItems(4295, 1);
                
                // allow entry for the player for the next 30 secs.
                ZoneManager.getInstance().getZoneById(110002, L2BossZone.class).allowPlayerEntry(player, 30);
                player.teleToLocation(BAIUM_IN, 0);
            }
        }
        else if (event.equalsIgnoreCase("baium_story"))
            htmltext = "31862-02.htm";
        else if (event.equalsIgnoreCase("baium_exit"))
            player.teleToLocation(Rnd.get(BAIUM_OUT), 100);
        else if (event.equalsIgnoreCase("31540"))
        {
            if (st.hasQuestItems(7267))
            {
                st.takeItems(7267, 1);
                player.teleToLocation(183813, -115157, -3303, 0);
                st.set("allowEnter", "1");
            }
            else
                htmltext = "31540-06.htm";
        }
        return htmltext;
    }
    
    @Override
    public String onFirstTalk(Npc npc, Player player)
    {
        String htmltext = "";
        QuestState st = player.getQuestState(qn);
        if (st == null)
            st = newQuestState(player);
        
        st.setState(STATE_STARTED);
        
        switch (npc.getNpcId())
        {
            case 29055:
                htmltext = "29055-01.htm";
                break;
            
            case 31862:
                final int status = GrandBossManager.getInstance().getBossStatus(29020);
                if (status == Baium.AWAKE)
                    htmltext = "31862-01.htm";
                else if (status == Baium.DEAD)
                    htmltext = "31862-04.htm";
                else
                    htmltext = "31862-00.htm";
                break;
        }
        
        return htmltext;
    }
    
    @Override
    public String onTalk(Npc npc, Player player)
    {
        String htmltext = "";
        QuestState st = player.getQuestState(getName());
        if (st == null)
            return null;
        
        st.setState(STATE_STARTED);
        
        int status;
        switch (npc.getNpcId())
        {
            case 13001:
                status = GrandBossManager.getInstance().getBossStatus(Antharas.ANTHARAS);
                if (status == Antharas.FIGHTING)
                    htmltext = "13001-02.htm";
                else if (status == Antharas.DEAD)
                    htmltext = "13001-01.htm";
                else if (status == Antharas.DORMANT || status == Antharas.WAITING)
                {
                    if (st.hasQuestItems(3865))
                    {
                        st.takeItems(3865, 1);
                        ZoneManager.getInstance().getZoneById(110001, L2BossZone.class).allowPlayerEntry(player, 30);
                        
                        player.teleToLocation(175300 + Rnd.get(-350, 350), 115180 + Rnd.get(-1000, 1000), -7709, 0);
                        
                        if (status == Antharas.DORMANT)
                        {
                            GrandBossManager.getInstance().setBossStatus(Antharas.ANTHARAS, Antharas.WAITING);
                            ScriptManager.getInstance().getQuest("Antharas").startQuestTimer("beginning", Config.WAIT_TIME_ANTHARAS, null, null, false);
                        }
                    }
                    else
                        htmltext = "13001-03.htm";
                }
                break;
            
            case 31859:
                player.teleToLocation(79800 + Rnd.get(600), 151200 + Rnd.get(1100), -3534, 0);
                break;
            
            case 31385:
                status = GrandBossManager.getInstance().getBossStatus(Valakas.VALAKAS);
                if (status == 0 || status == 1)
                {
                    if (_valakasPlayersCount >= 200)
                        htmltext = "31385-03.htm";
                    else if (st.getInt("allowEnter") == 1)
                    {
                        st.unset("allowEnter");
                        ZoneManager.getInstance().getZoneById(110010, L2BossZone.class).allowPlayerEntry(player, 30);
                        
                        player.teleToLocation(204328, -111874, 70, 300);
                        
                        _valakasPlayersCount++;
                        
                        if (status == Valakas.DORMANT)
                        {
                            GrandBossManager.getInstance().setBossStatus(Valakas.VALAKAS, Valakas.WAITING);
                            ScriptManager.getInstance().getQuest("Valakas").startQuestTimer("beginning", Config.WAIT_TIME_VALAKAS, null, null, false);
                        }
                    }
                    else
                        htmltext = "31385-04.htm";
                }
                else if (status == 2)
                    htmltext = "31385-02.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 (_valakasPlayersCount < 50)
                    htmltext = "31540-01.htm";
                else if (_valakasPlayersCount < 100)
                    htmltext = "31540-02.htm";
                else if (_valakasPlayersCount < 150)
                    htmltext = "31540-03.htm";
                else if (_valakasPlayersCount < 200)
                    htmltext = "31540-04.htm";
                else
                    htmltext = "31540-05.htm";
                break;
            
            case 31759:
                player.teleToLocation(150037, -57720, -2976, 250);
                break;
            
            case 32107:
                player.teleToLocation(Rnd.get(SAILREN_OUT), 100);
                break;
            
            case 32109:
                if (!player.isInParty())
                    htmltext = "32109-03.htm";
                else if (!player.getParty().isLeader(player))
                    htmltext = "32109-01.htm";
                else
                {
                    if (st.hasQuestItems(8784))
                    {
                        status = GrandBossManager.getInstance().getBossStatus(Sailren.SAILREN);
                        if (status == Sailren.DORMANT)
                        {
                            final List<Player> party = player.getParty().getMembers();
                            
                            // Check players conditions.
                            for (Player member : party)
                            {
                                if (member.getLevel() < 70)
                                    return "32109-06.htm";
                                
                                if (!MathUtil.checkIfInRange(1000, player, member, true))
                                    return "32109-07.htm";
                            }
                            
                            // Take item from party leader.
                            st.takeItems(8784, 1);
                            
                            final L2BossZone nest = ZoneManager.getInstance().getZoneById(110015, L2BossZone.class);
                            
                            // Teleport players.
                            for (Player member : party)
                            {
                                if (nest != null)
                                {
                                    nest.allowPlayerEntry(member, 30);
                                    member.teleToLocation(SAILREN_IN, 100);
                                }
                            }
                            GrandBossManager.getInstance().setBossStatus(Sailren.SAILREN, Sailren.FIGHTING);
                            ScriptManager.getInstance().getQuest("Sailren").startQuestTimer("beginning", 60000, null, null, false);
                        }
                        else if (status == Sailren.DEAD)
                            htmltext = "32109-04.htm";
                        else
                            htmltext = "32109-05.htm";
                    }
                    else
                        htmltext = "32109-02.htm";
                }
                break;
        }
        
        return htmltext;
    }
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Wts adena 1kk = 10$  LU4 1kk = 1.6$ discord - GODDARDSHOP 
    • Dear partners! At the moment, we are in great need of the following items: TikTok Ads and Google Ads advertising accounts with an ad limit starting from $100. Countries: Europe, USA, Asia Contact us via the contacts in the thread or in this post. We look forward to cooperating! Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Dear partners! At the moment, we are in great need of the following items: TikTok Ads and Google Ads advertising accounts with an ad limit starting from $100. Countries: Europe, USA, Asia Contact us via the contacts in the thread or in this post. We look forward to cooperating! Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of stars in Telegram. SMM Panel: Go – promotion of your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website using the following format: "SEND ME BONUS, MY USERNAME IS..." — you need to post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Hey everyone, I’m thrilled to introduce our upcoming server, Dragon‑Network, built on the powerful Interlude+ chronicle and crafted for serious PvP, balanced progression and community fun. Below you’ll find all the key details — rates, features, event structure, and why this will be your next home for Lineage 2. 📅 Grand Opening November 21, 2025 — mark the date, rally your friends, prepare your gear. The realm opens, and the wars begin. ⚙️ Rates & Server Setup XP: 10× Chronicle: Interlude+ (expanded from our previous server) PvP-focused content, daily events, and reward-rich systems These core settings ensure you’ll feel progress and power, without losing the depth of classic Interlude. 🎯 Features & Highlights Based on our features page: Alternative class change quests: skip the lengthy standard quests by collecting tradable items dropped by monsters. Dragon-Network Full Interlude+ content: Kamaloka, Labyrinth, Pailaka quests, Hellbound Island, S80 items, Attribute system, Isle of Prayer hunting zone, siegeable fortresses and more. Dragon-Network Daily Team vs Team (TvT) events: prove your worth, climb the ranks and earn valuable rewards. Dragon-Network Balanced PvP mechanics: custom sub-stack features, armor mastery rules, optimized skill effects — all to keep the fight fair and skill-based. Dragon-Network Other extras: Raid Bosses with defined respawn times, rich loot systems, improved QOL features like improved buffs, combo songs/dances, tattoo system, etc. Dragon-Network 🎮 Why This Server Matters You’re playing Interlude+, but with modern enhancements — classic content with new mechanics, not a simple resurrect of the old. PvP and events are daily and structured, so you don’t wait weeks to engage. We’ve designed progression to be meaningful: rewards, class changes, content unlocks all move you forward without feeling pay-to-win. Community-first: Whether you enter solo or with friends, you’ll find team action, clans forming, and events where everyone has a chance to shine. 🗺 What to Do Next Visit our website: dragon-network.eu (check out the “Features” tab for full details) Prepare your Master Account, get your clan or buddies ready. On launch day (Nov 21), log in early, grab your spot, participate in the first TvT, and start building your legacy. Get ready — the gates open soon. The grind begins. The battles await. Will you rise to become legend on Dragon-Network? 🐉 Feel free to ask any questions below or share this post with your friends. Let’s make this launch one to remember.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock