Jump to content

Recommended Posts

Posted (edited)

Hello guys!

Maybe you have seen the effect of RedSky on some servers, when you die?

This code works the same way, on die... but instead of the RedSky, I've used the SpecialCamera which captures for some seconds the player that killed you.

I had to do something before I kill my self because of this boring day :lol:

It's for Interlude, I've tested it on l2jfrozen

 

So ugly patch, but it's written manually...

Index: config/functions/pvp.properties
===================================================================
AntiFarmPdefDiff = False
AntiFarmMaxPdefDiff = 300
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm if player has Patk < AntiFarmMaxPatkDiff.
AntiFarmPatkDiff = False
AntiFarmMaxPatkDiff = 300
# If true summons don't give any reward (avoid pvp/pk farm)
AntiFarmSummon = False
+
+#====================================
+# Camera effect on die
+#====================================
+# Effect enabled?
+CameraEnabled = True
+# Distance Camera <-> Killer
+CameraDistance = 10
+# Point of view to the killer
+# North = 90, South = 270, East = 0, West = 180
+CameraPOV = 0
+# Angle of view to the killer
+# angle > 0: looks up, angle < 0: looks down
+CameraAngle = 5
+# Animation speed (milliseconds)
+CameraSpeed = 3000
+# Animation delay
+CameraDuration = 3000


Index: head-src/com/l2jfrozen/Config.java
===================================================================
	public static boolean ANTI_FARM_PDEF_DIFF_ENABLED;
	public static int ANTI_FARM_MAX_PDEF_DIFF;
	public static boolean ANTI_FARM_PATK_DIFF_ENABLED;
	public static int ANTI_FARM_MAX_PATK_DIFF;
	public static boolean ANTI_FARM_PARTY_ENABLED;
	public static boolean ANTI_FARM_IP_ENABLED;
	public static boolean ANTI_FARM_SUMMON;

+    // Camera Effect
+    public static boolean CAMERA_ENABLED;
+    public static int CAMERA_DISTANCE;
+    public static int CAMERA_POV;
+    public static int CAMERA_ANGLE;
+    public static int CAMERA_SPEED;
+    public static int CAMERA_DELAY;
+
	// ============================================================
	public static void loadPvpConfig()
	{
		final String PVP = FService.PVP_CONFIG_FILE;
		
		try
		{
			final Properties pvpSettings = new Properties();
			final InputStream is = new FileInputStream(new File(PVP));
			pvpSettings.load(is);
			is.close();
			
			/* KARMA SYSTEM */
			KARMA_MIN_KARMA = Integer.parseInt(pvpSettings.getProperty("MinKarma", "240"));
            
            
FEW LINES BELOW >>>>>>>>>>>>>>>>>>>>>>>
            
            
			ANTI_FARM_PATK_DIFF_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmPatkDiff", "False"));
			ANTI_FARM_MAX_PATK_DIFF = Integer.parseInt(pvpSettings.getProperty("AntiFarmMaxPatkDiff", "300"));
			ANTI_FARM_PARTY_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmParty", "False"));
			ANTI_FARM_IP_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmIP", "False"));
			ANTI_FARM_SUMMON = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmSummon", "False"));
+
+            CAMERA_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("CameraEnabled", "false"));
+            CAMERA_DISTANCE = Integer.parseInt(pvpSettings.getProperty("CameraDistance", "10"));
+            CAMERA_POV = Integer.parseInt(pvpSettings.getProperty("CameraPOV", "0"));
+            CAMERA_ANGLE = Integer.parseInt(pvpSettings.getProperty("CameraAngle", "5"));
+            CAMERA_SPEED = Integer.parseInt(pvpSettings.getProperty("CameraSpeed", "3000"));
+            CAMERA_DELAY = Integer.parseInt(pvpSettings.getProperty("CameraDuration", "3000"));
		}
		catch (final Exception e)
		{
			e.printStackTrace();
			throw new Error("Failed to Load " + PVP + " File.");
		}
	}
	
	// ============================================================

Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
import com.l2jfrozen.gameserver.network.serverpackets.ShortCutInit;
import com.l2jfrozen.gameserver.network.serverpackets.SkillCoolTime;
import com.l2jfrozen.gameserver.network.serverpackets.SkillList;
import com.l2jfrozen.gameserver.network.serverpackets.Snoop;
import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
+import com.l2jfrozen.gameserver.network.serverpackets.SpecialCamera;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.StopMove;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.network.serverpackets.TargetSelected;


FEW LINES BELOW>>>>>>>>>>>>>>>>>



							}
						}
						else
						{
							onDieUpdateKarma(); // Update karma if delevel is not allowed
						}
					}
				}
			}
+               if (Config.CAMERA_ENABLED && !isPhoenixBlessed())
+	    	{
+	    	    sendPacket(new SpecialCamera(killer.getObjectId(), Config.CAMERA_DISTANCE, Config.CAMERA_POV, Config.CAMERA_ANGLE, Config.CAMERA_SPEED, Config.CAMERA_DELAY));
+	    	}
		}
		
		// Unsummon Cubics
		unsummonAllCubics();
		
		if (_forceBuff != null)
		{
			abortCast();
		}
		
		for (final L2Character character : getKnownList().getKnownCharacters())
			if (character.getTarget() == this)
			{
				if (character.isCastingNow())
					character.abortCast();
			}
		
		if (isInParty() && getParty().isInDimensionalRift())
		{
			getParty().getDimensionalRift().getDeadMemberList().add(this);
		}
Edited by Tessa
  • Upvote 4
Posted (edited)

Sort of interesting stuff, but such feature will "interrupt" mass pvp - you got instant res and guess what.. nothing, cuz you are watching your slayer :D

Edited by SweeTs
Posted (edited)

Sort of interesting stuff, but such feature will "interrupt" mass pvp - you got instant res and guess what.. nothing, cuz you are watching your slayer :D

That is why the animation delay is 3 seconds, and it's also configurable :lol:

 

Although, it is a nice idea. ;)

I've never seen that on any server :)

Edited by Tessa
Posted

 

Hello guys!

Maybe you have seen the effect of RedSky on some servers, when you die?

This code works the same way, on die... but instead of the RedSky, I've used the SpecialCamera which captures for some seconds the player that killed you.

I had to do something before I kill my self because of this boring day :lol:

It's for Interlude, I've tested it on l2jfrozen

 

So ugly patch, but it's written manually...

Index: config/functions/pvp.properties
===================================================================
AntiFarmPdefDiff = False
AntiFarmMaxPdefDiff = 300
# You must active AntiFarmEnabled = True to enable this mod.
# AntiFarm if player has Patk < AntiFarmMaxPatkDiff.
AntiFarmPatkDiff = False
AntiFarmMaxPatkDiff = 300
# If true summons don't give any reward (avoid pvp/pk farm)
AntiFarmSummon = False
+
+#====================================
+# Camera effect on die
+#====================================
+# Effect enabled?
+CameraEnabled = True
+# Distance Camera <-> Killer
+CameraDistance = 10
+# Point of view to the killer
+# North = 90, South = 270, East = 0, West = 180
+CameraPOV = 0
+# Angle of view to the killer
+# angle > 0: looks up, angle < 0: looks down
+CameraAngle = 5
+# Animation speed (milliseconds)
+CameraSpeed = 3000
+# Animation delay
+CameraDuration = 3000


Index: head-src/com/l2jfrozen/Config.java
===================================================================
	public static boolean ANTI_FARM_PDEF_DIFF_ENABLED;
	public static int ANTI_FARM_MAX_PDEF_DIFF;
	public static boolean ANTI_FARM_PATK_DIFF_ENABLED;
	public static int ANTI_FARM_MAX_PATK_DIFF;
	public static boolean ANTI_FARM_PARTY_ENABLED;
	public static boolean ANTI_FARM_IP_ENABLED;
	public static boolean ANTI_FARM_SUMMON;

+    // Camera Effect
+    public static boolean CAMERA_ENABLED;
+    public static int CAMERA_DISTANCE;
+    public static int CAMERA_POV;
+    public static int CAMERA_ANGLE;
+    public static int CAMERA_SPEED;
+    public static int CAMERA_DELAY;
+
	// ============================================================
	public static void loadPvpConfig()
	{
		final String PVP = FService.PVP_CONFIG_FILE;
		
		try
		{
			final Properties pvpSettings = new Properties();
			final InputStream is = new FileInputStream(new File(PVP));
			pvpSettings.load(is);
			is.close();
			
			/* KARMA SYSTEM */
			KARMA_MIN_KARMA = Integer.parseInt(pvpSettings.getProperty("MinKarma", "240"));
            
            
FEW LINES BELOW >>>>>>>>>>>>>>>>>>>>>>>
            
            
			ANTI_FARM_PATK_DIFF_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmPatkDiff", "False"));
			ANTI_FARM_MAX_PATK_DIFF = Integer.parseInt(pvpSettings.getProperty("AntiFarmMaxPatkDiff", "300"));
			ANTI_FARM_PARTY_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmParty", "False"));
			ANTI_FARM_IP_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmIP", "False"));
			ANTI_FARM_SUMMON = Boolean.parseBoolean(pvpSettings.getProperty("AntiFarmSummon", "False"));
+
+            CAMERA_ENABLED = Boolean.parseBoolean(pvpSettings.getProperty("CameraEnabled", "false"));
+            CAMERA_DISTANCE = Integer.parseInt(pvpSettings.getProperty("CameraDistance", "10"));
+            CAMERA_POV = Integer.parseInt(pvpSettings.getProperty("CameraPOV", "0"));
+            CAMERA_ANGLE = Integer.parseInt(pvpSettings.getProperty("CameraAngle", "5"));
+            CAMERA_SPEED = Integer.parseInt(pvpSettings.getProperty("CameraSpeed", "3000"));
+            CAMERA_DELAY = Integer.parseInt(pvpSettings.getProperty("CameraDuration", "3000"));
		}
		catch (final Exception e)
		{
			e.printStackTrace();
			throw new Error("Failed to Load " + PVP + " File.");
		}
	}
	
	// ============================================================

Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
import com.l2jfrozen.gameserver.network.serverpackets.ShortCutInit;
import com.l2jfrozen.gameserver.network.serverpackets.SkillCoolTime;
import com.l2jfrozen.gameserver.network.serverpackets.SkillList;
import com.l2jfrozen.gameserver.network.serverpackets.Snoop;
import com.l2jfrozen.gameserver.network.serverpackets.SocialAction;
+import com.l2jfrozen.gameserver.network.serverpackets.SpecialCamera;
import com.l2jfrozen.gameserver.network.serverpackets.StatusUpdate;
import com.l2jfrozen.gameserver.network.serverpackets.StopMove;
import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage;
import com.l2jfrozen.gameserver.network.serverpackets.TargetSelected;


FEW LINES BELOW>>>>>>>>>>>>>>>>>



							}
						}
						else
						{
							onDieUpdateKarma(); // Update karma if delevel is not allowed
						}
					}
				}
			}
+           if (Config.CAMERA_ENABLED)
+	    	{
+	    	    sendPacket(new SpecialCamera(killer.getObjectId(), Config.CAMERA_DISTANCE, Config.CAMERA_POV, Config.CAMERA_ANGLE, Config.CAMERA_SPEED, Config.CAMERA_DELAY));
+	    	}
		}
		
		// Unsummon Cubics
		unsummonAllCubics();
		
		if (_forceBuff != null)
		{
			abortCast();
		}
		
		for (final L2Character character : getKnownList().getKnownCharacters())
			if (character.getTarget() == this)
			{
				if (character.isCastingNow())
					character.abortCast();
			}
		
		if (isInParty() && getParty().isInDimensionalRift())
		{
			getParty().getDimensionalRift().getDeadMemberList().add(this);
		}

but how about this http://youtu.be/Gj-UFsAwoZw?t=3m36sis it possible to attach camera on attack for the arrow.

Posted

That is why the animation delay is 3 seconds, and it's also configurable :lol:

Yup, less than that is useles, but for mass pvp even 1 sec in much and means a lot :D

 

But they have "an idea". They can use the code for some other action, like for a custom quest, event or w/e :)

Posted (edited)

Yup, less than that is useles, but for mass pvp even 1 sec in much and means a lot :D

 

But they have "an idea". They can use the code for some other action, like for a custom quest, event or w/e :)

I was about do to something like this, but I'm too lazy today.. :lol:

 

but how about this http://youtu.be/Gj-UFsAwoZw?t=3m36sis it possible to attach camera on attack for the arrow.

 

I don't think so, the camera targets an objects..

Edited by Tessa
Posted

I was about do to something like this, but I'm too lazy today.. :lol:

 
 

I don't think so, the camera targets an objects..

So its more Client side then server - to be able to target object ?

Posted

Maybe it's not rly following the object aka arrow, just the camera speed, rotation is made like that, it's matched so well to the arrow speed. Who knows. :D

Posted

Maybe it's not rly following the object aka arrow, just the camera speed, rotation is made like that, it's matched so well to the arrow speed. Who knows. :D

Nope its not,  i have couple of ideas how to release it on client side but it should also work on server - like a skill or something!

Posted (edited)

I can't upload a video cuz I'm browsing with 3G usb :lol:

 

EDIT: I've updated the code.. seems the camera doesn't like so much the Phoenix Blessing :lol:

Edited by Tessa
Posted

Sort of interesting stuff, but such feature will "interrupt" mass pvp - you got instant res and guess what.. nothing, cuz you are watching your slayer :D

how about sieges :P ?

Posted

Well, it wasn't the best idea but at least it's an example of how to use this packet :lol:

Anyway, I'm currently using it to extend the quest engine of my own server pack and it becomes very interesting :)

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

    • never met a programmer that doesnt know english xD and as he said his knowledge and skills are beyond our imagination xD
    • nice work, welcome back to world of lineage development @melron 😄
    • He's likely baiting you to download his source full of backdoors indeed
    • Yeah inside router i had to enable udnp services 
    • Hello cheaters, As a team of avid developers and enthusiasts of Lineage 2, we are excited to present the L2 Control Hub, a groundbreaking plugin designed by myself and my collaborator, StinkyMadness. This innovative tool equips server administrators with powerful automation capabilities directly within the game's community board. L2 Control Hub simplifies the creation and management of automations, enabling you to customize your server operations without the need to modify the source code.   Key Features of L2 Control Hub: Robust Automation Triggers: Select from a plethora of triggers currently available, with continuous additions in the works to enhance your control options. Dynamic Conditions and Actions: Tailor your server operations with an extensive range of conditions and actions, ensuring flexible and precise control over game events and player interactions. Customizable Variables: Easily integrate server-specific variables from your database to further personalize and streamline your automations. Utilize these variables across various automation scenarios to cater to your specific server requirements. JavaScript Integration: Execute custom JavaScript codes that interact seamlessly with Java classes, bringing advanced functionalities to your server's ecosystem.   Explore L2 Control Hub in Action: We've prepared a series of video tutorials to demonstrate the capabilities of L2 Control Hub: Control Hub - Create a Simple Flow with 1 Condition and 1 Action: Get started with basic automations. Control Hub - Multiple Conditions with Multiple Actions: Explore more complex automations for detailed server management. Control Hub - Using Variables: Discover how to implement and use custom variables for tailored automations. Control Hub - Using JavaScript: Experience the power of custom scripts in enhancing your server functionality.   L2 Control Hub is currently about 70% complete, and we are actively developing and refining features. We invite you to join our ➡️ Discord community ⬅️ to engage with the development process, provide feedback, and be the first to test new features. Additionally, any updates or changes to the plugin are seamlessly delivered to all customers directly from our web server, ensuring your system is always up-to-date without the need for manual downloads.   Your game, your rules, automated. Join us in redefining server management in Lineage 2 and elevate your gaming community with unmatched automation capabilities. For more details, contact us directly to get started with L2 Control Hub.   Currently, the plugin is developed using aCis sources. We will continue with these sources until we finalize all the necessary details before proceeding to integrate with the more prominent sources available.       The L2 Control Hub is designed to extend beyond mere functional additions to your server. We are in the process of implementing a suite of advanced mechanisms, such as a vote manager capable of interfacing with any Lineage 2 voting site without requiring configuration, live statistics to provide admins with real-time insights, and an event engine that can generate any desired event within seconds. All these features will be seamlessly integrated into the module, enhancing your server management experience significantly.     Please note that L2 Control Hub will be a premium tool, reflecting the extensive features and benefits it offers. While we are finalizing the pricing structure, rest assured that we aim to deliver great value for your investment. We will announce the cost details soon on our platforms to ensure everyone is well-informed and can plan accordingly. Join us to take your server management to the next level with L2 Control Hub.     
  • Topics

×
×
  • Create New...