Jump to content

Recommended Posts

Posted

This little code will shows the real diff range of async between server and client position. By default, this code was maked for aCis but can be use for any L2J forks.

 

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java	(revision 1133)
+++ java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java	(working copy)
@@ -2,6 +2,8 @@
 
 import java.nio.BufferUnderflowException;
 
+import net.sf.l2j.commons.math.MathUtil;
+
 import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.model.actor.ai.CtrlIntention;
 import net.sf.l2j.gameserver.model.actor.instance.Player;
@@ -95,6 +97,18 @@
 			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
 			return;
 		}
+		
+		// Check async range.
+		dx = _originX - activeChar.getX();
+		dy = _originY - activeChar.getY();
+		double dz1 = _originZ - activeChar.getZ();
+		float diff = (float) Math.sqrt(dx * dx + dy * dy + dz1 * dz1);
+		int heading = MathUtil.calculateHeadingFrom(_originX, _originY, activeChar.getX(), activeChar.getY());
+		if (Math.abs(activeChar.getHeading() - heading) > 16000)
+			diff = diff * -1;
+		
+		activeChar.sendMessage("Async distance: " + diff);
+		
 		activeChar.getAI().setIntention(CtrlIntention.MOVE_TO, new Location(_targetX, _targetY, _targetZ));
 	}
 }
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java	(revision 1133)
+++ java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java	(working copy)
@@ -1,5 +1,7 @@
 package net.sf.l2j.gameserver.network.clientpackets;
 
+import net.sf.l2j.commons.math.MathUtil;
+
 import net.sf.l2j.gameserver.model.actor.instance.Player;
 import net.sf.l2j.gameserver.model.zone.ZoneId;
 import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle;
@@ -88,5 +90,17 @@
 		player.setClientY(_y);
 		player.setClientZ(_z);
 		player.setClientHeading(_heading); // No real need to validate heading.
+		
+		// Check async range.
+		dx = _x - player.getX();
+		dy = _y - player.getY();
+		dz = _z - player.getZ();
+		float diff = (float) Math.sqrt(dx * dx + dy * dy + dz * dz);
+		
+		int heading = MathUtil.calculateHeadingFrom(_x, _y, player.getX(), player.getY());
+		if (Math.abs(player.getHeading() - heading) > 16000)
+			diff = diff * -1;
+		
+		player.sendMessage("[4] Async distance: " + diff);
 	}
 }
\ No newline at end of file

Have fun, so! :smile:

Posted
6 hours ago, Pamela32 said:

I love shares like this one

Bcs give a more realistic gameplay

 

?????????????? How a debug is doing that ?????????????? , maybe you mean that help you to fix things and looks more realistic gameplay.

Posted
1 hour ago, StinkyMadness said:

 

?????????????? How a debug is doing that ?????????????? , maybe you mean that help you to fix things and looks more realistic gameplay.

 

Well .. yea .. as u can see ky English sucks anyway 

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

    • Hello, you can check www.l2jmaster.org we have a test server. regards.
    • 🎣 Enhanced Fishing Bot — Midnight 12.0.7 Now fully hands-off: it re-applies your lures AND uses your consumables automatically. 🔥   ▶️ Watch it in action:   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ The only WoW fishing bot that keeps your pole lured and your buffs up the entire session — no babysitting, no lost catch rate. And it doesn't read your screen or touch the game — it listens for the splash like a real player. ❝ Other bots fish with a bare pole and waste half your session. This one keeps it lured and buffed the whole time — so you catch more, every cast. ❞ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ WHAT'S NEW • Automatic lure application — your fishing pole stays lured all session, so your catch rate never drops • Automatic consumables — food, buffs & fishing items get used for you, on time, automatically • Fully unattended — set it and genuinely walk away   ⚙️ HOW IT WORKS Pure audio detection — no pixels, no memory reading, no injection. It hears the splash, loots, recasts. Works at any resolution, UI scale, or graphics setting.   🛡️ BUILT TO STAY UNDER THE RADAR Every action is randomized to look human: • Randomized reaction times & key-hold durations • Occasional "missed" catches & distracted pauses • Idle breaks, anti-AFK jumps, periodic bag checks • Subtle mouse & position jitter • Built-in 3-hour session cap — never looks like a 24/7 robot • Fatigue system — reactions slow over long sessions, like a tired player   🪝 EVERYTHING INCLUDED • Comes with the bot + the BobberAssist addon (handles lures & consumables in-game) • One-time setup — remembers your settings • Optional VB-CABLE support to isolate WoW audio • Sit-and-fish mode for less mob aggro   🔒 LICENSING • One license = one PC, locked on first launch • Instant key delivery in our Discord • Changed PCs? Open a ticket and we'll reset it   ♻️ Free updates for life — buy once, every future version is free. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💬 All the details, pricing & download are in our Discord: 👉 JOIN THE DISCORD 👈 Like any automation, use at your own discretion — ToS applies.  
  • 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..