Jump to content

Recommended Posts

Posted

Retail-Like Bluff effect, for Interlude L2J

 

Here is a simple diff file:

 

Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/serverpackets/BeginRotation.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/serverpackets/BeginRotation.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/serverpackets/BeginRotation.java (revision 159)
@@ -19,18 +19,15 @@
package net.sf.l2j.gameserver.network.serverpackets;

-import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
-
public class BeginRotation extends L2GameServerPacket
{
	private static final String _S__77_BEGINROTATION = "[s] 62 BeginRotation";
-	private int _charObjId;
-	private int _degree;
-	private int _side;
+	private int _charObjId, _degree, _side, _speed;

-	public BeginRotation(L2PcInstance player, int degree, int side)
+	public BeginRotation(int objectId, int degree, int side, int speed)
	{
-		_charObjId = player.getObjectId();
+		_charObjId = objectId;
		_degree = degree;
		_side = side;
+		_speed = speed;
	}

@@ -42,4 +39,5 @@
		writeD(_degree);
		writeD(_side);
+		writeD(_speed);
	}

Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/serverpackets/StopRotation.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/serverpackets/StopRotation.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/serverpackets/StopRotation.java (revision 159)
@@ -19,6 +19,4 @@
package net.sf.l2j.gameserver.network.serverpackets;

-import net.sf.l2j.gameserver.model.L2Character;
-
/**
 * This class ...
@@ -29,11 +27,11 @@
{
	private static final String _S__78_STOPROTATION = "[s] 63 StopRotation";
-	private int _charObjId;
-	private int _degree;
+	private int _charObjId, _degree, _speed;

-	public StopRotation(L2Character player, int degree)
+	public StopRotation(int objectId, int degree, int speed)
	{
-		_charObjId = player.getObjectId();
+		_charObjId = objectId;
		_degree = degree;
+		_speed = speed;
	}

@@ -44,4 +42,6 @@
		writeD(_charObjId);
		writeD(_degree);
+		writeD(_speed);
+		writeC(0); // ?
	}

Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/clientpackets/FinishRotating.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/clientpackets/FinishRotating.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/clientpackets/FinishRotating.java (revision 159)
@@ -46,5 +46,5 @@
		if (getClient().getActiveChar() == null)
		    return;
-		StopRotation sr = new StopRotation(getClient().getActiveChar(), _degree);
+		StopRotation sr = new StopRotation(getClient().getActiveChar().getObjectId(), _degree, 0);
		getClient().getActiveChar().broadcastPacket(sr);
	}
Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/clientpackets/StartRotating.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/clientpackets/StartRotating.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/network/clientpackets/StartRotating.java (revision 159)
@@ -46,5 +46,5 @@
		if (getClient().getActiveChar() == null)
		    return;
-		BeginRotation br = new BeginRotation(getClient().getActiveChar(), _degree, _side);
+		BeginRotation br = new BeginRotation(getClient().getActiveChar().getObjectId(), _degree, _side, 0);
		getClient().getActiveChar().broadcastPacket(br);
	}
Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/skills/effects/EffectBluff.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/skills/effects/EffectBluff.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/skills/effects/EffectBluff.java (revision 159)
@@ -19,10 +19,10 @@
package net.sf.l2j.gameserver.skills.effects;

-import net.sf.l2j.gameserver.ai.CtrlIntention;
-import net.sf.l2j.gameserver.model.L2CharPosition;
import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.actor.instance.L2FolkInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2SiegeSummonInstance;
+import net.sf.l2j.gameserver.network.serverpackets.BeginRotation;
+import net.sf.l2j.gameserver.network.serverpackets.StopRotation;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.skills.Env;
@@ -33,5 +33,6 @@
 * Implementation of the Bluff Effect
 */
-final class EffectBluff extends L2Effect {
+final class EffectBluff extends L2Effect
+{

    public EffectBluff(Env env, EffectTemplate template)
@@ -50,6 +51,5 @@
	public void onStart()
    {
-        getEffected().startFear();
-    	if(getEffected() instanceof L2FolkInstance) return;
+        if(getEffected() instanceof L2FolkInstance) return;
    	// if(getEffected() instanceof L2SiegeGuardInstance) return;
    	// Cannot be used on Headquarters Flag.
@@ -58,33 +58,12 @@

    	if(getEffected() instanceof L2SiegeSummonInstance)
-    	{
    		return;
-    	}
-        int posX = getEffected().getX();
-        int posY = getEffected().getY();
-        int posZ = getEffected().getZ();
-        int signx=-1;
-        int signy=-1;
-        if (getEffected().getX()>getEffector().getX())
-            signx=1;
-        if (getEffected().getY()>getEffector().getY())
-            signy=1;
-
-        //posX += signx*40; //distance less than melee attacks (40)
-        //posY += signy*40;
-
-        getEffected().setRunning();
-        getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO,
-                              new L2CharPosition(posX +(signx*40),posY + (signy*40),posZ,0));
-        getEffected().sendPacket(SystemMessage.sendString("You can feel Bluff's effect"));
-        getEffected().setTarget(null);
+    	
+    	getEffected().broadcastPacket(new BeginRotation(getEffected().getObjectId(), getEffected().getHeading(), 1, 65535));
+    	getEffected().broadcastPacket(new StopRotation(getEffected().getObjectId(), getEffector().getHeading(), 65535));
+    	getEffected().setHeading(getEffector().getHeading());
        onActionTime();
    }
-    @Override
-	public void onExit()
-    {
-        getEffected().stopFear(this);
-
-    }
+    
    @Override
	public boolean onActionTime()
Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/skills/effects/EffectRemoveTarget.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/skills/effects/EffectRemoveTarget.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/skills/effects/EffectRemoveTarget.java (revision 159)
@@ -18,4 +18,5 @@
package net.sf.l2j.gameserver.skills.effects;

+import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.skills.Env;
@@ -44,4 +45,5 @@
        getEffected().abortAttack();
        getEffected().abortCast();
+        getEffected().getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, getEffector());
    }

Index: /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/ai/AbstractAI.java
===================================================================
--- /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/ai/AbstractAI.java (revision 12)
+++ /trunk/Eclipse-Game/java/net/sf/l2j/gameserver/ai/AbstractAI.java (revision 159)
@@ -624,5 +624,5 @@
            {
                // Send a Server->Client packet StopRotation to the actor and all L2PcInstance in its _knownPlayers
-                StopRotation sr = new StopRotation(_actor, pos.heading);
+            	StopRotation sr = new StopRotation(_actor.getObjectId(), pos.heading, 0);
                _actor.sendPacket(sr);
                _actor.broadcastPacket(sr);

 

Credits: L2JForum, and ŚyśţęmƒяәдҚς ( For many modifications i did here )

  • 2 weeks later...
Posted

can you tell me what you have exactly edit?

 

 

Nothing. He realized that we know that none of what he have shared is his work, so he started to c/p shares from other forums and give credits to the modification he did (But actually he didn't changed anything).

Posted

Nothing. He realized that we know that none of what he have shared is his work, so he started to c/p shares from other forums and give credits to the modification he did (But actually he didn't changed anything).

Actually i did some modifications, not a fix, just a big clean up changing some lines and etc.

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

    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock