Jump to content

[Share][Int] R-L Bluff effect.


Recommended Posts

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 )

Link to comment
Share on other sites

  • 2 weeks later...

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Good day everybody.   A credible team that SGuard represents is looking for a java developer.    The position is full time only i.e. your time is mostly dedicated within the team and team tasks.  All necessary tools are provided.  The team is consistent with > 6 team members and the team is looking to expand to meet various goals. A decent Lineage 2 Essense is needed.  Experience with l2r/l2p/l2s (not l2j or mobius) type of servers. The team is friendly and goal oriented, very active and resourceful.   Requirements are standard however strong java codding skill is necessary for the position.  Multi language is a plus but not necessary (English/Russian), any is accepted.   Terms and conditions including compensation are reasonable and considered to be up for the industry standards. Details are negotiable with suitable candidates.   You have to have either a public name that can be checked out or a strong reference from credible sources. You will need to have a headset and a mic just for the initial processing, there're no team meetings or conferences after that.   The team has decided it is in their best interest to not publish their information at this time. Details will be available only for suitable candidates.   If you think you're a good fit. Please contact me at:   skype: live:sguard.soft telegram: https://t.me/tech_support_s2    
    • SCAMMER Please do not get scammed! His Sellix Feedback is fake, his store opening date is manipulated by scripts. Daniele, the developer of Sellix confirmed this before suspending his account. You will receive a rar file with a doc that contains some random email and password and it won’t work. He won’t respond to your tickets either. I lost $120
    • Lineage II Interlude: Ember x3 The server offers a retail atmosphere with NPC buffs, low rates, and a bug-free environment. The auto-hunt feature transforms your game adventure by allowing you to easily accomplish challenges while managing the demands of a busy life.   Server Status: Online [Closed Beta Test] Official Opening: TBD Website: l2ember.online Community: Discord Channel   Key Features Our network infrastructure can support up to 5,000 simultaneous connections without compromising the quality of gameplay. The augmentation system follows the guidelines of the official server. Geodata operates smoothly and without issues. The game's data, which includes monster spawns, loot availability, and player skills, is working correctly. We are actively working on official-like quests and refining the game. Our AI is adequate and corresponds to the PTS server. Sieges are similar to the official server, without any lag or glitches. The Olympiad is fully functional and may be customized to the preferences of the players.   Rates EXP/SP (Regular Monsters): x3 EXP/SP (Raid Bosses): x2 EXP/SP (Quest): x1 Items Drop Rate: x2 Items Drop Rate (Raid Bosses): x2 Items Drop Rate (Quest): x2 Quest Items Reward Rate: x1 Quest Adena Reward Rate: x1 Adena Drop Rate: x2 Seal Stones Drop Rate: x2 Spoil Drop Rate: x2
    • I come here to show some of my work for any L2j version.   Base project for the work: L2jAcis 401   I will constantly update when I create more demonstration videos.   SellBuff System ( Online And Offline Mode ) : 50€  Payments: PayPal / Binance Videos:      NOTE: If I have broken any rules, please send me a PM.  
    • Are there any servers or customers using this at the moment? I'm interested but $300 is a lot (which I know that L2 related stuff is expensive anyway) so I'd like to test and experience the interface before making a decision
  • Topics

×
×
  • Create New...