Jump to content

Recommended Posts

Posted

Hey all.

 

This is the super duper flash i made. Those that play LoL will know what i'm talking about, but i have to say it works somehow different that LoL flash(since L2 has camera rotation, 3d stuff, it has to be slower or players would ragequit).

 

Video:

 

Sorry if it's laggy.

 

Here:

Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/TestFlash.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/TestFlash.java	(revision 0)
+++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/TestFlash.java	(revision 0)
@@ -0,0 +1,104 @@
+/*
+ * This program 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.
+ * 
+ * This program 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 net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+import net.sf.l2j.gameserver.ThreadPoolManager;
+import net.sf.l2j.gameserver.ai.CtrlIntention;
+import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
+import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation;
+import net.sf.l2j.gameserver.skills.AbnormalEffect;
+
+/**
+ * @author Anarchy
+ *
+ */
+public class TestFlash implements IVoicedCommandHandler
+{
+	private static final String[] VOICED_COMMANDS = { "flash" };
+	
+	@Override
+	public boolean useVoicedCommand(String command, L2PcInstance activeChar)
+	{
+		if (command.equals("flash"))
+		{
+			if (activeChar.flashing)
+			{
+				activeChar.sendMessage("You have already requested for a flash on next click.");
+				return false;
+			}
+			activeChar.flashing = true;
+			activeChar.sendMessage("Your next click will flash you to your location.");
+		}
+		
+		return true;
+	}
+
+	@Override
+	public String[] getVoicedCommandList()
+	{
+		return VOICED_COMMANDS;
+	}
+	
+	public static void flash(L2PcInstance p, int x, int y, int z)
+	{
+		if (p.isInsideRadius(x, y, 350, false))
+		{
+			p.stopMove(null);
+			p.startAbnormalEffect(AbnormalEffect.MAGIC_CIRCLE);
+			p.flashing = false;
+			p.sendPacket(ActionFailed.STATIC_PACKET);
+			ThreadPoolManager.getInstance().scheduleGeneral(new DoIt(p, x, y, z), 3500);
+		}
+		else
+		{
+			p.sendMessage("Too far.");
+			p.sendPacket(ActionFailed.STATIC_PACKET);
+		}
+	}
+	
+	private static class DoIt implements Runnable
+	{
+		private L2PcInstance p = null;
+		private int x = 0, y = 0, z = 0;
+		
+		public DoIt(L2PcInstance p, int x, int y, int z)
+		{
+			this.p = p;
+			this.x = x;
+			this.y = y;
+			this.z = z;
+		}
+		
+		@Override
+		public void run()
+		{
+			p.abortAttack();
+			p.abortCast();
+			p.setIsTeleporting(true);
+			p.setTarget(null);
+			p.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
+			p.decayMe();
+			p.getPosition().setXYZ(x, y, z);
+			p.onTeleported();
+			p.broadcastUserInfo();
+			p.sendPacket(new ValidateLocation(p));
+			p.sendPacket(ActionFailed.STATIC_PACKET);
+			p.revalidateZone(true);
+			p.stopAbnormalEffect(AbnormalEffect.MAGIC_CIRCLE);
+		}
+	}
+}
Index: java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java	(revision 3)
+++ java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java	(working copy)
@@ -18,6 +18,7 @@

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ai.CtrlIntention;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.TestFlash;
import net.sf.l2j.gameserver.model.L2CharPosition;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
@@ -95,6 +96,12 @@
			return;
		}

+		if (activeChar.flashing)
+		{
+			TestFlash.flash(activeChar, _targetX, _targetY, _targetZ);
+			return;
+		}
+		
		if (_moveMovement == 0 && Config.GEODATA < 1) // cursor movement without geodata is disabled
			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
		else
Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(revision 20)
+++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -234,6 +234,8 @@
  */
public final class L2PcInstance extends L2Playable
{
+	public boolean flashing = false;
+	
	private boolean _isTopKiller = false;

	public boolean isTopKiller()
Index: java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java	(revision 14)
+++ java/net/sf/l2j/gameserver/handler/VoicedCommandHandler.java	(working copy)
@@ -22,6 +22,7 @@
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Kills;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.KinoChoose;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Leave;
+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.TestFlash;

public class VoicedCommandHandler
{
@@ -43,6 +44,7 @@
		{
			registerVoicedCommandHandler(new KinoChoose());
		}
+		registerVoicedCommandHandler(new TestFlash());
	}

	public void registerVoicedCommandHandler(IVoicedCommandHandler handler)

 

If it's not easy to see in video, let me give an explanation:

 

Players can press .flash(yeah, i was just testing the effect didn't make it work with a skill but it's easy) and next click will flash them after 3,5 seconds to that location(no teleportation black screen, instant flash). There is also an effect before flash. There is a 350 radius around the char restriction where you can flash.

 

Coded on aCis.

Posted

When I was playing around on aCis pack with speed values, I did on gm speed level 3 around... 52,921 speed, did you know how it moved? Just like that but without the lags! :)

 

So when I clicked with ultimate zoomout from my point A to point B it was going instantly there but the cool part is the character wasn't even breathing or had dynamic movement it was just like paralyzed, but when I lowered down to around 20k, it looked like it drinked 2 packs of Redull and smoked 100g of meth, lol.

 

Funny facts, though.

Posted

When I was playing around on aCis pack with speed values, I did on gm speed level 3 around... 52,921 speed, did you know how it moved? Just like that but without the lags! :)

 

So when I clicked with ultimate zoomout from my point A to point B it was going instantly there but the cool part is the character wasn't even breathing or had dynamic movement it was just like paralyzed, but when I lowered down to around 20k, it looked like it drinked 2 packs of Redull and smoked 100g of meth, lol.

 

Funny facts, though.

Well, that way works but why risk getting 100 meters jump if character collides with a rock or smth ;p

 

Also there are 0 lags, it's just the video lagging.

Posted

Well, that way works but why risk getting 100 meters jump if character collides with a rock or smth ;p

 

Also there are 0 lags, it's just the video lagging.

I did some tests in colliding with objects and cliffs and most important, walking in swamp and water and colliding with other objects in these hostile environments... well what can I say, the output is kinda predictable, if you know what I mean  :good sir:

Posted

Seems something like warp.

 

better, the warp has forward or backward warp, this warps you on your cursor just like lol threw the moveToLocation packet ;)

Posted

make a skill handler for it, and dedicate a skill id :)

 

Also don't use static modifiers on a class you set private, and for stuff like this try using anonymous(since u dont need residues for a simple thing) classes like:

threadpool..blabla.scheduleGeneral(new Runnable() {
      @Override
      public void run() {
            // do shit
      }
}, 3500);

in java 8 its gonna be with lambda <3
threadpool..blabla.scheduleGeneral(() -> {
            // do shit
}, 3500);

 

Always wanted to do a mod like blink :P

Guest Elfocrash
Posted

Too many lines of code to do something way simpler.

Also you'd better check the warp spell effect from higher chronicles.

Posted

make a skill handler for it, and dedicate a skill id :)

 

Also don't use static modifiers on a class you set private, and for stuff like this try using anonymous(since u dont need residues for a simple thing) classes like:

threadpool..blabla.scheduleGeneral(new Runnable() {
      @Override
      public void run() {
            // do shit
      }
}, 3500);

in java 8 its gonna be with lambda <3
threadpool..blabla.scheduleGeneral(() -> {
            // do shit
}, 3500);

 

Always wanted to do a mod like blink :P

Yeah easy to make it work with a skill, it was just for tests ;p

Java 8 is gonna be awesome from what i've heard so far ;p

 

Too many lines of code to do something way simpler.

Also you'd better check the warp spell effect from higher chronicles.

I just c/p teleToLocation() method, removed the packet TeleportToLocation to avoid the black screen, while sending a ValidateLocation packet to actually show the new location to the player.

Just experiments :D

Guest Elfocrash
Posted

I just c/p teleToLocation() method, removed the packet TeleportToLocation to avoid the black screen, while sending a ValidateLocation packet to actually show the new location to the player.

Just experiments :D

 

 

As you can see here teh swaping could easily be just a "get distance in front" and move there. The code you see on vid is like 3 lines of code.

Obviously for front flash you need geolocation check and sin/cos usage

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

    • 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..