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

    • POLAND — New VPS Location Our new VPS location in Poland is now available. Promo code: POLAND • 40% off new VPS orders in the Poland location • Offer valid until July 29, 2026 Enter the promo code POLAND during checkout to receive your discount.
    • In your place l will join to Mobius community to get something decent or just go to Lucera 2 ( ofc no source) if you want interlude on Classic client, coz Acis not have have it yet.
    • The client and the system aren't working very well; the screen is black, and some things aren't loading.  😞 
    • LINEAGE2.SK Summer Season is Comming! GRAND OPENING - 14.08.2026 at 20:00 GMT+1  OBT - 07.08.2025 at 20:00 GMT+1   Website :https://lineage2.sk Discord : https://discord.gg/gj7AC5juGP       Server Features and Rates Xp – 20x Sp – 20x Adena – 10x Drop – 15x Spoil - 15x  Epic Raid Boss  - 1x Regular RB - 5x  Quest - 5x Fame - 2x Epaulette - 15x Manor - 15x     Special Features Somik Interface Limited AutoFarm Vote System Champions System Achievement System And more in information below     Enchant Settings  Safe Enchant: +3  Max Enchant: +16 Enchant Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%     NPC Buffer all buffs, songs, dances including 3rd prof + resists Buff Slots: 24 (+4) / 12 Buff Duration: 2 Hours     Epic Bosses & Respawns Queen Ant: 24 hours +/-8h Core: 3 days +/-8h Orfen: 2 days +/-8h Baium: 5 days +/-8h Beleth: 7 days +/-8h Antharas: 7 days +/-8h Valakas: 7 days +/-8h     Instances Zones Zaken: 6 players Normal Freya: 6 players Hard Freya: 12 Players Frintezza: 6 Players Tiat: 6 Players Beleth: 12 Players     GM Shop weapon/armor/jwl (max S grade) shots/spiritshots (max S grade) mana potions (1000 MP, 10s)      Global Gatekeeper all towns including cata/necro ToI Gracia Hellbound ...     Olympiad period 7 days (Monday) no class participants min 6 base class participants min 6 max enchant +6 Start points 20     Class Transfer for Adena     Subclass Quest Not required Max Subclass 3 Subclass Max LvL 85     Events Team vs Team Capture the Flag Death Match Last Hero Korean Style Treasure Hunt      Clans All new clans start with Clan LvL 5! Clan Skills/LvL for Clan Coins     Others  max 3 windows per HWID  BoM/MoM spawned in towns Auto-learn skills Autoloot Retail LvL of Epic Bosses Cancellation return buff system (30sec) Cancellation return buff -  not effect olympiad
  • 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..