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

    • Website: https://l2aurum.com/ Discord: https://discord.gg/ngaD9DJRjE   Dear Players, We are excited to announce that the x300 Summer Season Beta server will open on 19‑06‑2026 at 20:00 GMT+2. As previously mentioned, there will be no wipe and no account deletion. All accounts, characters, items, and progress from Season 1 will remain completely safe. To ensure a fair and competitive start for new players, all Season 1 accounts will be temporarily locked. The official Summer Season launch will take place on 26‑06‑2026 at 20:00 GMT+2. A few weeks after the official launch, Season 1 accounts will be unlocked so previous players can access their characters and continue their journey. This approach allows new players to enjoy a fresh start while preserving the progress and achievements of our long-term community. Thank you for your continued support, and we look forward to welcoming everyone to the new Summer Season. L2Aurum Team   Explore L2 Aurum Features Discover the Enhancements that set us apart!   Information Server Version: Interlude - PvP Server Client Interface: Unique Interface   Rates     Additional Features and changes When you create a new character, you will start in Giran Harbor at Level 1, equipped with full No-Grade items. Auto Farm is available for free for 2 hour daily without VIP. VIP players receive 4 hours of Auto Farm per day. The Auto Farm time resets with the server restart at 5:30 AM. Status Noblesse: Last hit Barakiel. Player Spawn Protection: 7 seconds. Geodata + Pathnodes: Enabled. All commands are available in the Community Board. Maximum 3 Bishops Per Party: Enabled. Boss Protect - Anti-Zerg: Enabled. Shift + click on monsters to see the droplist. Offline shop. Mana Potion Restores 1000 MP with a cooldown of 8 seconds. Inventory Slots: 250.   Weapon Information Lv1 Black Chaotic Weapons. Lv2 Aurum Weapons.   Armor Information Lv1 Blue Apella Armor. Lv2 Aurum Apella Armor. Misc additions Accessories +50 and +150 pdef|mdef. Tattoos: Resolve | Soul | Avadon. Agathions: Cosmetic only (no stats).   Buffs / Dances / Songs / Prophecies Duration: 2 hours. Total Buff Slots: 32 + 4 (Divine Inspiration). Vote Buff: You must vote on 3 of 6 vote sites to get the vote buff blessing. Castle Reward Every clan that captures a castle receives the castle owner clan blessing buff. To receive it, the clan leader must be online.   Events   Raid Bosses Epic Bosses Final Bosses     For full server information please visit website PvP: Server Features   Website: https://l2aurum.com/ Discord: https://discord.gg/ngaD9DJRjE      
  • 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..