Jump to content
  • 0

[Request] Teleport for a time


Question

8 answers to this question

Recommended Posts

  • 0
Posted

Hmm.. this is just a wild imagination on how to do it..

 

When the player gets ported, it also gets a buff.

When the buff time is over, it will give the effect "Return".

 

But then again, how do you make a buff execute on the last second, and how do you make a GK buff you at the same time you enter the "Teleport" button?!

  • 0
Posted

When a player teleport, get 2 values on a table on DB, one origin city, second status of return (cuz you want to do that with every teleport? or with ones on them not all teleport?)...

 

A treat (in core) activate a timeout of "x time" and when get zero, invoque "recall player" like GM got into their menu into that player in return to origin city...

 

Any concret idea of how to do that pfff... it's just an idea not a codding solution :S...

 

How to make a player recall? well you can create a npc in every town that do that request over that player...

  • 0
Posted

In L2TeleporterInstance, or your own instance:

 

1. add special container for those players, for example:

 

private List<L2PcInstance> _players = new FastList<L2PcInstance>();

 

2. create boolean to check conditions of the party (like members level, if they are close to the GK, if party != null, members count and so on, sample:)

 

/**

* Check if party may enter.

* @param player

* @return

*/

private boolean checkConditions(L2PcInstance player)

{

L2Party party = player.getParty();

 

if (party == null)

{

player.sendPacket(new ExShowScreenMessage("You need party with at least 5 members to enter!", 5000));

return false;

}

if (party.getLeader() != player)

{

player.sendPacket(new ExShowScreenMessage("You are not party leader!", 5000));

return false;

}

if (party.getMemberCount() < 2)

{

player.sendPacket(new ExShowScreenMessage("You need party with at least 5 members to enter!", 5000));

return false;

}

for (L2PcInstance partyMember : party.getPartyMembers())

{

if (partyMember.getLevel() < 82)

{

ExShowScreenMessage msg = new ExShowScreenMessage("Each party member should be level 82 at least!", 5000);

party.broadcastToPartyMembers(msg);

return false;

}

if (!Util.checkIfInRange(500, player, partyMember, true))

{

ExShowScreenMessage msg = new ExShowScreenMessage("Each party member should be close to the leader!", 5000);

party.broadcastToPartyMembers(msg);

return false;

}

}

return true;

}

 

3. create new bypass for this kind of teleport, for example tele_party

 

Inside of this bypass, use already created boolean:

 

if (checkConditions)

  //iterate over party members, to tele them one by one

  // and add them to the _players aswell

 

4. Create new inner class for new task, which will tele players back after certain time.

 

private class ScheduleBackTask implements Runnable

{

public ScheduleEnterTask()

{

// Nothing

}

 

@Override

public void run()

{

                      //Iterate over _players container, to tele them back

                      _players.clear();

}

}

 

5. Again inside bypass under teleporting players, use this, to run task:

 

ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleBackTask(), 300000);

 

And put there time in milisec, after this time they will be teleportedback

 


 

I could make some mistakes, i was to lazy to check it with eclipse, but will be ok.

Guest
This topic is now closed to further replies.


  • Posts

    • First, you need to understand what you're doing and what you want to achieve. You have to choose a server core. After that, decide what you want your server to include, code it, modify the client to fit your server, go public, and drink champagne.   If you know how to code, creating a server is relatively easy — a few months of work and you can make it happen. Modifying the client is a completely different story. There’s a lack of tutorials, tools, and source materials. I’m currently working on the client myself, and I’ve already spent over three weeks just trying to get started due to the lack of information. If you don’t have the knowledge and experience, you’ll need a team and a bag of money — but realistically, it just won’t succeed.
    • The server has been online and stable for over 2 months now, and we’re still going strong! No wipes, no shortcuts ~ just continuous work, daily fixes, events, and improvements to ensure the best possible experience.   Great News! 🔥 CHAPTER II IS COMING — GRACIA FINAL 🔥 On February 16, L2Elixir enters a new era. The server will be officially updated to Gracia Final, opening Chapter II of our journey. Expect new content, improvements, and surprises that will refresh the gameplay while keeping the classic Gracia Final spirit alive.   More challenges, more competition, and more reasons to log in.   📅 Update Date: February 16 ⚔️ Chapter II: Gracia Final This is not a reset. This is evolution.   Prepare yourselves — Chapter II begins soon.   Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs    
    • Server owners, Top.MaxCheaters.com is now live and accepting Lineage 2 server listings. There is no voting, no rankings manipulation, and no paid advantages. Visibility is clean and equal, and early listings naturally appear at the top while the platform grows. If your server is active, it should already be listed. Submit here 👉https://Top.MaxCheaters.com This platform is part of the MaxCheaters.com network and is being built as a long-term reference point for the Lineage 2 community. — MaxCheaters.com Team
    • Hello! We are Genesis, small team that works on new Lineage 2 project. Our goal with this project is to create a fresh new place to play — built around real community feedback, with no aggressive pay-to-win donations and with carefully thought-out quality-of-life improvements, balance changes etc. We believe that even tho we all love this game, everyone has at least one or two things they would like to change in the game to make it more enjoyable. Thats why we want the comunity feedback to shape our server. Main information about the server: • Interlude Classic version • Rates: EXP x4 SP x2 Loot x2, Spoil x2 (not set in stone, might be changed) • Local & Server-Side Dualbox Protection • Complete, Clear Website with Integrated Account Panel (Game account creation, direct communication with support, bug reporting, voting and reward system) • Launcher – External Game Login System: manage all your accounts inside the launcher, “Play” button logs you directly into the game server Here are list of few changes we already added/decided to add to the server: • Reworked Client to fit interlude Era with upgraded Classic Ui • Custom Antibot system • Custom AntiDualBox System • Offline shops • Offline shop with buffs (available only in towns) • Mass Sweeper added to the game • Newbie buffs available all the way to lvl 76 (nothing crazy, but its free) • Slight balance change to Destroyer damage with Polearm and Cancel spell from SPS • PvP zones on every Epic spawn spot • Overbuffing blocked • And more! Since we put big focus on community feedback and suggestions, we are looking for people for our internal tests, that will discuss whether current changes „fit” into the game and maybe suggest some changes themselves. If what you’ve just read sounds interesting to you, if you want to help creating server fitted for you, join our server Discord. Help us to understand what Lineage 2 players in 2026 actually expect and need — so we can meet those expectations and avoid becoming just another server that dies a natural death.     Even if you’re not interested in playing right now, but you are a long-time Lineage 2 player, feel free to join our community. We would greatly appreciate your experience and feedback to help us improve and develop our project. Join the growing L2Genesis community: https://discord.gg/mcuHsQzNCm Also check our website: https://l2genesis.com/
  • 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..