Jump to content

Recommended Posts

Posted

Hello devs!

I want to share small code that shows castle door's/wall's hp. Seems l2jfrozen don't have this feature, so I've decided to extend its current code.

Index: head-src/com/l2jfrozen/gameserver/model/actor/knownlist/PcKnownList.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/knownlist/PcKnownList.java	(revision 1113)
+++ head-src/com/l2jfrozen/gameserver/model/actor/knownlist/PcKnownList.java	(working copy)
@@ -126,7 +126,14 @@
 			}
 			else if (object instanceof L2DoorInstance)
 			{
-				active_char.sendPacket(new DoorInfo((L2DoorInstance) object, false));
+                               if (((L2DoorInstance) object).getCastle() != null)
+                               {
+                                   getActiveChar().sendPacket(new DoorInfo((L2DoorInstance) object, true));
+                               }
+                               else
+                               {
+                                   getActiveChar().sendPacket(new DoorInfo((L2DoorInstance) object, false));
+                               }
 				active_char.sendPacket(new DoorStatusUpdate((L2DoorInstance) object));
 			}
 			else if (object instanceof L2BoatInstance)
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRecordInfo.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRecordInfo.java	(revision 1113)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestRecordInfo.java	(working copy)
@@ -90,7 +90,14 @@
 				}
 				else if (object instanceof L2DoorInstance)
 				{
-					_activeChar.sendPacket(new DoorInfo((L2DoorInstance) object, false));
+				    if (((L2DoorInstance) object).getCastle() != null)
+				    {
+				        _activeChar.sendPacket(new DoorInfo((L2DoorInstance) object, true));
+				    }
+				    else
+				    {
+				        _activeChar.sendPacket(new DoorInfo((L2DoorInstance) object, false));
+				    }
 					_activeChar.sendPacket(new DoorStatusUpdate((L2DoorInstance) object));
 				}
 				else if (object instanceof L2BoatInstance)
Index: head-src/com/l2jfrozen/gameserver/network/serverpackets/DoorInfo.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/serverpackets/DoorInfo.java	(revision 1113)
+++ head-src/com/l2jfrozen/gameserver/network/serverpackets/DoorInfo.java	(working copy)
@@ -28,10 +28,12 @@
 {
 	private static final String _S__60_DOORINFO = "[S] 4c DoorInfo";
 	private final L2DoorInstance _door;
+	private final boolean _showHp;
 	
 	public DoorInfo(final L2DoorInstance door, final boolean showHp)
 	{
 		_door = door;
+		_showHp = showHp;
 	}
 	
 	@Override
@@ -40,6 +42,7 @@
 		writeC(0x4c);
 		writeD(_door.getObjectId());
 		writeD(_door.getDoorId());
+		writeD(_showHp ? 1 : 0);
 	}
 	
 	/*

I've tested that on l2jserver's rev 1433, but there shouldn't be a difference.

Posted (edited)

Thanks! :)

I don't use l2jfrozen's pack, but seems there are many people using it.

Here is what this patch does:

http://prntscr.com/5godye

http://prntscr.com/5goe6w

http://prntscr.com/5goeh7

Edited by Tessa
  • 3 weeks later...
Posted

Can you make and when a monster is "npc_to_pc_polymorph.sql" with visible HP ?

 

L2JFrozen

I think this comes from the client side..

  • 3 weeks later...
Posted (edited)

Shit code for shit pack.  :happyforever:

 

ShowHP -> isEnemy. Like L2OFF, you can see door HP only if you are enemy for castle owner.

 

Take aCis free pack and build this patch from him. We fixed it few years ago.

Edited by Rootware
Posted

Shit code for shit pack.  :happyforever:

 

ShowHP -> isEnemy. Like L2OFF, you can see door HP only if you are enemy for castle owner.

 

Take aCis free pack and build this patch from him. We fixed it few years ago.

To be honest aCis is a good public pack but.. Don't get cocky because Setekh for example said the same with archid and guess what.. Untill now your work is just awesome

Posted

Shit code for shit pack.  :happyforever:

 

ShowHP -> isEnemy. Like L2OFF, you can see door HP only if you are enemy for castle owner.

 

Take aCis free pack and build this patch from him. We fixed it few years ago.

Don't care how is in L2OFF... currently on official you can always see door's hp. I've taken the example from them.

Posted

Don't care how is in L2OFF... currently on official you can always see door's hp. I've taken the example from them.

 

Do not forget that many things are changing in the next chronicles. Therefore, any fix must be checked.

Posted

Do not forget that many things are changing in the next chronicles. Therefore, any fix must be checked.

Things like this never got my attention when I played on the official server... but I will never take the l2off extenders as an example. If someone who can remember if the hp should be visible only during a siege confirm that, I will update the code!

Posted

Things like this never got my attention when I played on the official server... but I will never take the l2off extenders as an example. If someone who can remember if the hp should be visible only during a siege confirm that, I will update the code!

 

Why? Why you hated extenders?

 

Many Interlude servers works on the C4 (upgraded) core and GF (downgraded). It's enough for many tests. Basic info about packet structure contains in Engine.dll. NC Soft not adds useless info to the packet.

Posted

Why? Why you hated extenders?

 

Many Interlude servers works on the C4 (upgraded) core and GF (downgraded). It's enough for many tests. Basic info about packet structure contains in Engine.dll. NC Soft not adds useless info to the packet.

I don't hate anything... with some help (because of Themida) I have reversed Engine.dll, so I know the exact structure of the packets. I've used l2off's files to get some retail spawn locations, npc/armor/weapon stats etc but nothing related to the gameplay, because I think it's not retail-like. This is my opinion!

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