Jump to content
  • 0

Script: Teleport With Item


Question

Posted

Hi friends, please help me to make this script correctly. I want to make when players are teleporting some zone then script will check and take quest item. I was copied this script from quest "618_IntoTheFlame" and changed item and NPC IDs but dont works in the game and GS console haven't any error. Thx for help.

 

Chronicle: Interlude

Lucera Pack

 

package ru.catssoftware.gameserver.model.quest.pack.ai;
 
import ru.catssoftware.gameserver.model.actor.instance.L2NpcInstance;
import ru.catssoftware.gameserver.model.actor.instance.L2PcInstance;
import ru.catssoftware.gameserver.model.quest.Quest;
import ru.catssoftware.gameserver.model.quest.QuestState;
 
public class Polyne extends Quest
{
 
    public Polyne()
    {
        super(-1, QUEST, "ai");
        addStartNpc(50006);
        addStartNpc(50023);
        addTalkId(50006);
        addTalkId(50023);
        addKillId(0x186b6);
    }
 
    public String onTalk(L2NpcInstance l2npcinstance, L2PcInstance l2pcinstance)
    {
        QuestState queststate = l2pcinstance.getQuestState("Polyne");
        if(queststate == null)
            return "<html><body>\u0412\u044B \u043B\u0438\u0431\u043E \u043D\u0435 \u043D\u0430 \u043F\u043E\u0438\u0441\u043A\u0438, \u0447\u0442\u043E \u0432\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0432 \u044D\u0442\u043E\u0442 NPC, \u0438\u043B\u0438 \u0432\u044B \u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u044E\u0442 \u044D\u0442\u043E\u0442 NPC \u0432 \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0435 \u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043D\u0438\u044F.</body></html>";
        int i = l2npcinstance.getNpcId();
        if(i == 50023)
            if(queststate.getInt("ok") != 0)
            {
                queststate.exitQuest(true);
                return "<html><body>Roien:<br>\u0412\u0430\u043B\u0430\u043A\u0430\u0441 \u0443\u0436\u0435 \u043F\u0440\u043E\u0441\u043D\u0443\u043B\u0441\u044F!<br>\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043E\u0439\u0442\u0438 \u0432 \u041B\u043E\u0433\u043E\u0432\u043E \u0412\u0430\u043B\u0430\u043A\u0430\u0441\u0430.</body></html>";
            } else
            {
                queststate.exitQuest(true);
                return "<html><body>Roien:<br>\u0423\u0441\u043B\u043E\u0432\u0438\u044F \u043D\u0435 \u041F\u0440\u0430\u0432\u043E \u0437\u0430\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F, \u0447\u0442\u043E\u0431\u044B \u041B\u043E\u0433\u043E\u0432\u043E \u0412\u0430\u043B\u0430\u043A\u0430\u0441\u0430.</body></html>";
            }
        if(i == 50006)
        {
            if(queststate.getQuestItemsCount(9564) > 0)
            {
                queststate.takeItems(9564, 1);
                l2pcinstance.teleToLocation(0x236e1, 0x23160, -12815);
                queststate.set("ok", "1");
            } else
            {
                queststate.exitQuest(true);
                return "<html><body>Asgard:<br>\u0423 \u0432\u0430\u0441 \u043D\u0435\u0442 \u041A\u043D\u0438\u0433\u0430 \u041F\u043E\u043B\u0438\u043D\u0430. \u041F\u043E\u0439\u0442\u0438 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043E\u0434\u0438\u043D, \u0430 \u0437\u0430\u0442\u0435\u043C \u0432\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A\u043E \u043C\u043D\u0435.</body></html>";
            }
        } else
        {
            queststate.exitQuest(true);
            return "<html><body>Asgard:<br>\u0412\u0430\u043B\u0430\u043A\u0430\u0441 \u0443\u0436\u0435 \u043F\u0440\u043E\u0441\u043D\u0443\u043B\u0441\u044F!<br>\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u043E\u0439\u0442\u0438 \u0432 \u041B\u043E\u0433\u043E\u0432\u043E \u0412\u0430\u043B\u0430\u043A\u0430\u0441\u0430.</body></html>";
        }
        return null;
    }
 
    public static String QUEST = "Polyne";
 
}

11 answers to this question

Recommended Posts

  • 0
Posted

I had create something like this 5 years ago.. I do not know if you want that script but download the bellow and check it out.

 

PS: No need 5 different teleports quest like I did. I hope you will understand the way. 

Also, that script are old and totally different lines with your lucera project. It's just a idea how to do that.

  • 0
Posted

I had create something like this 5 years ago.. I do not know if you want that script but download the bellow and check it out.

 

PS: No need 5 different teleports quest like I did. I hope you will understand the way. 

Also, that script are old and totally different lines with your lucera project. It's just a idea how to do that.

Thanks for reply, i'll check your script!

  • 0
Posted

Easy way to add a method and bypass in l2teleportedinstance.java use the bypass in html for the teleports you want and ready

  • 0
Posted

You have to call "Polyne 50006" on your bypass to get the teleport check.

 

It probably doesn't work because you return directly when quest isn't created on player profile. You have to create quest state, store it, do your action and then delete the quest state.

  • 0
Posted

You have to call "Polyne 50006" on your bypass to get the teleport check.

 

It probably doesn't work because you return directly when quest isn't created on player profile. You have to create quest state, store it, do your action and then delete the quest state.

<a action="bypass -h npc_%objectId%_Quest Polyne">"Teleport."</a><br> but i added this text into 50006.htm other NPC as valakas quest and i was created new Polyne quest. Only need script  :-\

  • 0
Posted

That script begins with net.sf.l2j.   i need ru.catssoftware. please can u will help me to meke it?

Lol addapt it to your sources
  • 0
Posted

If you can't even change package path, they you should forget about everything you are doing. Take your time and learn. Otherwise pray to Santa for someone give you 100% ready code, which won't happen.

 

As you are not willing to learn and understand a simpliest thing then.. Stop whatever you doing, or pay someone.

Guest
This topic is now closed to further replies.


  • Posts

    • Sell ready interlude server files, with all popular features and tested, stable source + fully functional premium geodata for free.   Features include: Events: DM CTF TVT LM Dressme system Custom Buffer GM Shop Custom community board Donation manager  Auto Farm   Album: sell c6 — ImgBB   Test Server online: Patch link: https://drive.google.com/file/d/1mvEbv9XESsvfWwc638xFyyzyESeE2U95/view?usp=drive_link Auto acc create and auto admin   Price: 300$. Discord: l2retro
    • Faltan demasiados archivos,  y lógicas en clases claves como L2pcInstance, entre otras. si bien muchas cosas están y el flujo es valorable.  Gracias por tu esfuerzo es bastante... pero realmente no esta completo el código, falta que subas todas las modificaciones en clases colaterales... podrías intentar subir un diff de todo el mod  completo de tu pack y bueno ahí si que cada uno adapte... pero faltan muchas cosas, dudo que haya gente que lo haya echo funcionar con esto... 
    • I know people who have fully bypassed and reversed AAC. One day, they might even release the full source code, but for now, they’re still making money off it. I won’t name anyone, but it’s clear that there aren’t any truly solid anticheats for Lineage2. As I’ve said before, kernel level anticheats are the only real solution. Anything that runs as Internal and injects gets flagged, and your account ends up getting kicked or banned. That’s just how most games handle it nowadays. To TL;DR the whole thing cheating will always exist because there are people out there smart enough to bypass any protection and run private cheats. Public cheats are always detected eventually, so I don’t see any point in buying AAC, especially when they claim it blocks adr, which simply isn’t true.
    • 🌐 Website: https://l2adonis.com 📅 GRAND OPENING: July 18, 2025 – 20:00 (UTC+2) 💬 Discord: https://discord.com/invite/tZBj8JxAwx 🚫 No auto-farm • No auto-macro • No pay-to-win • No custom   Some Basic Info's (More detalied info's on website)  EXP/SP: x25  Adena: x15  Drop: x15  Spoil: x15  Seal Stones: x15  Raid Boss Drop: x10  Epic Boss Drop: x1  Manor: x10  Safe Enchant: +4  Max Enchant: +16  Normal Scroll Chance: 50%  Blessed Scroll Chance: 66% (If enchant fail item remain +4)  Buff Slots (30+4 extra with Divine Inspiration)  Dances/Songs Slots 14  Auto-learn skills  ⚔️ Real PvP • Real Progression • Retail-like experience JOIN NOW and relive the real L2 experience!
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchihamkt.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/uthciha-servicess  | https://campsite.bio/utchihaamkt
  • 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