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.
Note: Your post will require moderator approval before it will be visible.

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

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...