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

    • NEW HIDDENSTASH KEY SYSTEM INTRODUCED TO THE SITE   **Earn While You Spend - Introducing HS Cashback!**   Every purchase on our site now rewards you with **HS Keys cashback**   EVERY ONE WHO REGISTERS IN SITE UNTILL 15TH OF MAY GETS 2000 HS KEYS IN HES BALANE   Here's how it works:       **1 USD = 1000 HS Keys**   **Get 3% cashback** on every purchase   **Use your HS Keys to **save on your next order**   ---   ### ⚡ Why this is awesome   * Every order gives you value back   * Stack it with promos & HS usage   * Turn your spending into future discounts   ---   ### Example   Spend **$10** → Get **300 HS Keys** back   Spend **$50** → Get **1500 HS Keys** back   ---   ### Smart system (built for fairness)   * Cashback is rounded to keep things balanced   * Prevents abuse from tiny orders   * Rewards real buyers   ---   ### Start earning now   Every purchase = progress toward your next discount   Shop now and build your HS balance!   #cashback #gamingdeals #d2r #rewards #loyalty   Stay safe out there, heroes - and happy hunting! www.d2rhiddenstash.com     We just launched our new Affiliate Program — and it’s the easiest way to earn HS Keys.   Invite your friends using your personal link.   Example: If your friend spends $10 → you get 300 HS Keys No limits. No effort. Just share your link.   Get your referral link here: www.d2rhiddenstash.com/profile     Start earning today
    • It’s time for something new to rise. In a world filled with short-lived projects and empty promises, Emerge was created with a different vision — a vision built on experience, precision, and long-term commitment. This is not just another server launch. This is the beginning of something that is meant to last. 🌑 Eclipse x10 – A New Beginning Eclipse x10 is designed for players who seek more than just fast progression. It is built for those who value competition, balance, and a real Lineage II experience. From the very first day, every system has been carefully adjusted to provide a smooth and fair journey — where both solo players and clans can thrive. No shortcuts. No chaos. Only a structured and competitive world. ⚔️ What Awaits You • A balanced mid-rate environment (x10 core progression) • Stable and optimized gameplay • Fair systems with focus on long-term play • Competitive PvP and rewarding PvE • Active and dedicated administration • A project built with vision, not temporary hype 📊 Server Rates Basic: EXP/SP: x10 Adena: x5 Drop: x5 Spoil: x5 Secondary: Quests: x1 Seal Stones: x5 Life Stone Drop: x1 Enchant Scroll Drop: x1 Bosses: Raid Boss EXP/SP: x1 Raid Boss Drop: x1 Epic Boss EXP/SP: x1 Epic Boss Drop: x1 Enchant: Safe: +3 Max: +16 📅 Launch Information Grand Opening: 5 June 2026 The countdown has already begun. Clans are forming. Strategies are being prepared. The question is — will you be ready? 🔗 Join the Community Every strong server begins with a strong community. Be part of it from the very start. 💬 Discord: https://discord.gg/l2emerge 🌐 Website: https://www.l2emerge.com  
    • https://jumpshare.com/share/L45ApA5PVrGN2O5Ua5pQ   Skill synchronization with the server: Launching and synchronizing animations, launching and synchronizing effects. All of this is tied to the server's timing  
  • 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..