Jump to content

Recommended Posts

Posted (edited)

Hello, I'm trying to incorporate quest custom in l2jsunrise, but I can't do it. Copy the quest (Q00258_BringWolfPelts), rename it to (Q10506_BringWolfPelts1) ... create a new npc for the quest "32890" embed it in the Q1060_BringWolfPelts1.java

 

Original BringWolfPelts

 

Quote

/*
 * 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 quests.Q00258_BringWolfPelts;

import java.util.HashMap;
import java.util.Map;

import l2r.gameserver.enums.QuestSound;
import l2r.gameserver.model.actor.L2Npc;
import l2r.gameserver.model.actor.instance.L2PcInstance;
import l2r.gameserver.model.quest.Quest;
import l2r.gameserver.model.quest.QuestState;
import l2r.gameserver.model.quest.State;

/**
 * Bring Wolf Pelts (258)
 * @author xban1x
 */
public final class Q00258_BringWolfPelts extends Quest
{
    // Npc
    private static final int LECTOR = 30001;
    // Item
    private static final int WOLF_PELT = 702;
    // Monsters
    private static final int[] MONSTERS = new int[]
    {
        20120, // Wolf
        20442, // Elder Wolf
    };
    // Rewards
    private static final Map<Integer, Integer> REWARDS = new HashMap<>();
    
    static
    {
        REWARDS.put(390, 1); // Cotton Shirt
        REWARDS.put(29, 6); // Leather Pants
        REWARDS.put(22, 9); // Leather Shirt
        REWARDS.put(1119, 13); // Short Leather Gloves
        REWARDS.put(426, 16); // Tunic
    }
    
    // Misc
    private static final int MIN_LVL = 3;
    private static final int WOLF_PELT_COUNT = 40;
    
    public Q00258_BringWolfPelts()
    {
        super(258, Q00258_BringWolfPelts.class.getSimpleName(), "Bring Wolf Pelts");
        addStartNpc(LECTOR);
        addTalkId(LECTOR);
        addKillId(MONSTERS);
        registerQuestItems(WOLF_PELT);
    }
    
    @Override
    public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
    {
        final QuestState st = player.getQuestState(getName());
        if ((st != null) && event.equalsIgnoreCase("30001-03.html"))
        {
            st.startQuest();
            return event;
        }
        return null;
    }
    
    @Override
    public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
    {
        final QuestState st = killer.getQuestState(getName());
        if ((st != null) && st.isCond(1))
        {
            st.giveItems(WOLF_PELT, 1);
            if (st.getQuestItemsCount(WOLF_PELT) >= WOLF_PELT_COUNT)
            {
                st.setCond(2, true);
            }
            else
            {
                st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
            }
        }
        return super.onKill(npc, killer, isSummon);
    }
    
    @Override
    public String onTalk(L2Npc npc, L2PcInstance player)
    {
        final QuestState st = getQuestState(player, true);
        String htmltext = getNoQuestMsg(player);
        if (st == null)
        {
            return htmltext;
        }
        
        switch (st.getState())
        {
            case State.CREATED:
            {
                htmltext = (player.getLevel() >= MIN_LVL) ? "30001-02.htm" : "30001-01.html";
                break;
            }
            case State.STARTED:
            {
                switch (st.getCond())
                {
                    case 1:
                    {
                        htmltext = "30001-04.html";
                        break;
                    }
                    case 2:
                    {
                        if (st.getQuestItemsCount(WOLF_PELT) >= WOLF_PELT_COUNT)
                        {
                            final int chance = getRandom(16);
                            for (Map.Entry<Integer, Integer> reward : REWARDS.entrySet())
                            {
                                if (chance < reward.getValue())
                                {
                                    st.giveItems(reward.getKey(), 1);
                                    break;
                                }
                            }
                            st.exitQuest(true, true);
                            htmltext = "30001-05.html";
                            break;
                        }
                    }
                }
                break;
            }
        }
        return htmltext;
    }
}
 

 

Edited Quest

 

Quote

/*
 * 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 quests.Q10506_BringWolfPelts1;

import java.util.HashMap;
import java.util.Map;

import l2r.gameserver.enums.QuestSound;
import l2r.gameserver.model.actor.L2Npc;
import l2r.gameserver.model.actor.instance.L2PcInstance;
import l2r.gameserver.model.quest.Quest;
import l2r.gameserver.model.quest.QuestState;
import l2r.gameserver.model.quest.State;

/**
 * Bring Wolf Pelts (258)
 * @author xban1x
 */
public final class Q10506_BringWolfPelts1 extends Quest
{
    // Npc
    private static final int LECTOR = 32890;
    // Item
    private static final int WOLF_PELT = 702;
    // Monsters
    private static final int[] MONSTERS = new int[]
    {
        20120, // Wolf
        20442, // Elder Wolf
    };
    // Rewards
    private static final Map<Integer, Integer> REWARDS = new HashMap<>();
    
    static
    {
        REWARDS.put(390, 1); // Cotton Shirt
        REWARDS.put(29, 6); // Leather Pants
        REWARDS.put(22, 9); // Leather Shirt
        REWARDS.put(1119, 13); // Short Leather Gloves
        REWARDS.put(426, 16); // Tunic
    }
    
    // Misc
    private static final int MIN_LVL = 3;
    private static final int WOLF_PELT_COUNT = 40;
    
    public Q10506_BringWolfPelts1()
    {
        super(10506, Q10506_BringWolfPelts1.class.getSimpleName(), "Bring Wolf Pelts");
        addStartNpc(LECTOR);
        addTalkId(LECTOR);
        addKillId(MONSTERS);
        registerQuestItems(WOLF_PELT);
    }
    
    @Override
    public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
    {
        final QuestState st = player.getQuestState(getName());
        if ((st != null) && event.equalsIgnoreCase("32890-03.html"))
        {
            st.startQuest();
            return event;
        }
        return null;
    }
    
    @Override
    public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
    {
        final QuestState st = killer.getQuestState(getName());
        if ((st != null) && st.isCond(1))
        {
            st.giveItems(WOLF_PELT, 1);
            if (st.getQuestItemsCount(WOLF_PELT) >= WOLF_PELT_COUNT)
            {
                st.setCond(2, true);
            }
            else
            {
                st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
            }
        }
        return super.onKill(npc, killer, isSummon);
    }
    
    @Override
    public String onTalk(L2Npc npc, L2PcInstance player)
    {
        final QuestState st = getQuestState(player, true);
        String htmltext = getNoQuestMsg(player);
        if (st == null)
        {
            return htmltext;
        }
        
        switch (st.getState())
        {
            case State.CREATED:
            {
                htmltext = (player.getLevel() >= MIN_LVL) ? "32890-02.htm" : "32890-01.html";
                break;
            }
            case State.STARTED:
            {
                switch (st.getCond())
                {
                    case 1:
                    {
                        htmltext = "32890-04.html";
                        break;
                    }
                    case 2:
                    {
                        if (st.getQuestItemsCount(WOLF_PELT) >= WOLF_PELT_COUNT)
                        {
                            final int chance = getRandom(16);
                            for (Map.Entry<Integer, Integer> reward : REWARDS.entrySet())
                            {
                                if (chance < reward.getValue())
                                {
                                    st.giveItems(reward.getKey(), 1);
                                    break;
                                }
                            }
                            st.exitQuest(true, true);
                            htmltext = "32890-05.html";
                            break;
                        }
                    }
                }
                break;
            }
        }
        return htmltext;
    }
}
 

 

QUEST NPC BYPASS

 

Quote

<html><body>Trader Lector:<br>
I may be a merchant now, but I used to be a <font color="LEVEL">Leather Cutter.</font> I used to work for Duke Van Dyke in my early days. During the Elmore War, I made hundreds of leather armors for the Duke's soldiers in ten days. Even after retiring, I still practice making leather armor from time to time to keep my skills sharp.<br>
A few days ago, Consul Sir Windawood came to see me himself and asked me to make fifty leather armors for the newly established militia. I can make that many on my own, but I don't have enough materials. I need quite a few more <font color="LEVEL">wolf pelts.</font> Can I ask you to find them for me?<br>
<a action="bypass -h Quest Q10506_BringWolfPelts1 32890-03.html">Say that you'll help.</a>
</body></html>

 

And when starting the server I have an error.

 

[22:43:02] WARN: Failed loading: (C:\Server\game\data\scripts\quest\Q10506_BringWolfPelts1\Q10506_BringWolfPelts1.java) @ scripts.ini:13 - Reason: doesnt exists or is not a file.
 
What is missing ?

 

I Copy this Post  in this forum....

 

https://maxcheaters.com/topic/245452-how-can-i-make-a-custom-quest-hf/

https://maxcheaters.com/topic/234528-custom-quest/

 

 

Edited by amarhat
Posted

You need to add the script path in your script loading list. (forgot the name since I did not touch l2 for more that 2 years xd) Its usually in the same folder where your quest folders are.

Edit: "questmasterhandler.java"

  • Like 1
Posted
On 2/12/2023 at 7:55 AM, Finn said:

You need to add the script path in your script loading list. (forgot the name since I did not touch l2 for more that 2 years xd) Its usually in the same folder where your quest folders are.

Edit: "questmasterhandler.java"

 

Yes! i d it ! but i have this error !

 

[22:43:02] WARN: Failed loading: (C:\Server\game\data\scripts\quest\Q10506_BringWolfPelts1\Q10506_BringWolfPelts1.java) @ scripts.ini:13 - Reason: doesnt exists or is not a file.

 

"questmasterhandler.java" i not in my package ! My file name is  SCRIPT.INI in  game\data\

 

Quote

# This file contains a list of scripts that should be loaded by the GameServer
# The path is relative to the scripts folder, for example scripts/event.py would
# require the following entry:
# event.py
#
# Note: You can also load an script during server runtime using the Admin Panel

# Global Loader
handlers/loader/GlobalLoader.java

conquerablehalls/flagwar/BanditStronghold/BanditStronghold.java
conquerablehalls/flagwar/WildBeastReserve/WildBeastReserve.java

quest/Q10506_BringWolfPelts1/Q10506_BringWolfPelts1.java

 

If Put the rute of quest  in this file i have the error in console ! I do not know what to do.....

 

 

 

Posted (edited)

did u set the class for it? same file just scroll down. also activate custom quests in your setting file. dont know how sunrise handles it. might be different.

Edited by Finn
  • Thanks 1
Posted
3 hours ago, Finn said:

did u set the class for it? same file just scroll down. also activate custom quests in your setting file. dont know how sunrise handles it. might be different.

Thx !  Its Works !  I had not registered all the files in the handlers loaders !!!!!

 

Thx So much ! ! 

 

  • Vision locked this topic
Guest
This topic is now closed to further replies.


  • Posts

    • Hello guys, I’m Morientes, owner of the servers you might know: L2Lionna / L2Pandora / L2Ramona / L2ERA / L2Zaken / L2Classic / L2Peri / L2Alice / L2EVA / L2Dragon and more. Over the years I’ve been developing Lineage II projects starting from High Five, then Classic, and later Essence. I started with High Five, which I turned into a very well-tested server with over 100 openings. My peak was around 2800 players online, and the server was stable (no crashes). With every opening there was always something to improve, fix, or optimize, and over time it became more and more stable. I still have all SVN commits from all those years, I can show everything via screen share if needed. The reason I’m selling is not because of the quality. The files are solid and ready to run any type of server (any rates). The problem was on our side;  we didn’t have a good long-term strategy for reopening servers as a team. About Classic: I started from 2.0 (Zaken version) and gradually upgraded it up to 4.7 Kamael. Each chronicle upgrade came with a lot of improvements, especially in terms of stability. About Essence: I started from the very first version and developed it up to High Elf (Protocol 464). Starting from Protocol 286 (Secrets of Empire), I worked with PTS files and extracted a lot of deep fixes. I unpacked AI.obj with full functionality, used official sniffers, and whenever something wasn’t clear, I checked directly on official servers and sniffed packets or data. For every chronicle update, I basically sniffed the entire official server, zones, monsters, events, mechanics, everything. From Chronicle 388, Reborn approached us to buy our files. The current L2Reborn Essence is based on my work! I can prove everything. I also have their updates integrated into my pack. I stopped development after High Elf mainly because my main developer was constantly looking for other opportunities. It became difficult to maintain a stable team, especially with everything going on (including the situation in Ukraine at that time). Eventually, I couldn’t find a reliable dev to continue working on Essence, so I decided to step away from this market last year. Now I’ve decided to sell everything. What I’m selling: All necessary tools (sniffing, geodata build, pack upgrade tools, game client parsers, L2Wiki parser, interfaces etc.) Full SVN repositories with all commits (Essence / Classic / High Five) All edited clients I still have All my data I can also include on sell an official character that is active daily, ranked, end up gear, and has access to end-game zones!!! useful for deep sniffing where normal players don’t have access. If someone wants to buy everything, I prefer a full deal and I will transfer full ownership. If needed, I can also sell parts separately, but honestly I’d prefer to sell everything to one team that can continue this project — this has been my work, my hobby, my baby. Important: I don’t offer further updates. The files are sold exactly as they are. I will, of course, explain everything you need to know to continue working on them. Contact: Telegram: @AlexAlexey Discord: .primsl2
    • Grand Opening: April 11, 2026 Website: https://l2strive.com Discord: https://discord.gg/SsUARZpbkG   🛡️ Server Rates Strive is a High Five Mid-PvP/Craft Server  Experience (XP): x15 Skill Points (SP): x15 Adena: x10 Drop: x15 Spoil: x3 Safe Enchant: +3 Max Enchant: +16 ⚔️ Enhanced Boss Jewelry     ⚔️ Making Bosses Useful Again Let’s be real: usually, Core, Orfen, and Baylor are just placeholder bosses that nobody cares about. We’ve overhauled their jewelry to make them legit end-game gear. We’ve turned these into high-value targets for PvP—if you want these massive percentage boosts, you’re going to have to fight for them.   ⚔️ Enhanced Boss Jewelry   💍 Improved Ring of Core Base Stats: M.Def 48 | HP +445 | MP +21 Offensive: P. Atk +12% | M. Atk +12% Critical: Physical Critical Rate +14 | Magic Critical Rate +2 Utility: Skill Reuse Delay -10% | MP Consumption -5% 🛡️ Improved Earring of Orfen Base Stats: M.Def 71 | MP +31 Defensive: P. Def +15% | M. Def +15% Recovery: Vampiric Rage +4% | Healing Received +6% Resistances: Bleed / Poison / Root / Sleep +20% (Chance & Resistance) 💎 Baylor's Earring Base Stats: M.Def 71 | MP +31 Speed: Atk. Spd +5% | Casting Spd +5% Combat: MP Regeneration +5% Resistances: Stun / Paralyze +30% (Chance & Resistance) 🚀 Core Features Full & Enchanted Buffs: Enjoy 6-hour durations on all standard and enchanted buffs. Premium Buffs: Premium users benefit from extended 9-hour buff durations. 100% Free AutoFarm: Built-in system for seamless progression while away from your PC. Custom Shop: Professional and intuitive UI for all essential equipment and consumables. NPC Buffer: Full scheme support to get you battle-ready instantly. Stability: Dedicated high-performance hardware with professional Anti-DDoS protection.  
    • Hello,   im looking for c4 client developer that can fix some issues, missing icons etc. if you are l2off developer then even better.   its easy ones, fix few skill icons, item icon, easy money if someone has time. I guess its lack of files in my patch, but might be smth other   contact with me on discord: endART_#6190 @DumanisT @SkyLord @XManton @Fr3DBr @mjst @Sighed any ideas who could help me XD
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..