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

    • Hello everyone, we are one of the top gaming currency stores. We work exclusively with top projects. If you are interested in anything like Adena, Coins, Equip, write to us Discord - pchelacoin Telegram - https://t.me/ipchelacoin BOHPTS, KETRAWARS, EURO-PVP, L2REBORN, E-GLOBAL, LA2DREAM TOP PRICE !!!!!!!
    • L2Elixir – Patch 4 Is Live!   We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.    ⚙️ General Enabled Class Change service (same class type only) ALT + B → Services → Character Development Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!    🎒 Items Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior) Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item) Added Dualsword Craft Stamp into Milestone Exchange list    🧙 Skills Fixed Banish Undead lethal chance Hot Springs Malaria and similar effects now level up faster while being attacked
    • thats new SEO level tricks you know nothing of noob - bottom line: exposed.
    • Warning: This guy is a big scammer, trying to sell everything, advertising for servers etc. That's his mail address evgesha.nrnr@gmail.com , stay away!   @Atom @Celestine
  • 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