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

    • Sell ready interlude server files, with all popular features and tested, stable source + fully functional premium geodata for free.   Features include: Events: DM CTF TVT LM Dressme system Custom Buffer GM Shop Custom community board Donation manager  Auto Farm   Album: sell c6 — ImgBB   Test Server online: Patch link: https://drive.google.com/file/d/1mvEbv9XESsvfWwc638xFyyzyESeE2U95/view?usp=drive_link Auto acc create and auto admin   Price: 300$. Discord: l2retro
    • Faltan demasiados archivos,  y lógicas en clases claves como L2pcInstance, entre otras. si bien muchas cosas están y el flujo es valorable.  Gracias por tu esfuerzo es bastante... pero realmente no esta completo el código, falta que subas todas las modificaciones en clases colaterales... podrías intentar subir un diff de todo el mod  completo de tu pack y bueno ahí si que cada uno adapte... pero faltan muchas cosas, dudo que haya gente que lo haya echo funcionar con esto... 
    • I know people who have fully bypassed and reversed AAC. One day, they might even release the full source code, but for now, they’re still making money off it. I won’t name anyone, but it’s clear that there aren’t any truly solid anticheats for Lineage2. As I’ve said before, kernel level anticheats are the only real solution. Anything that runs as Internal and injects gets flagged, and your account ends up getting kicked or banned. That’s just how most games handle it nowadays. To TL;DR the whole thing cheating will always exist because there are people out there smart enough to bypass any protection and run private cheats. Public cheats are always detected eventually, so I don’t see any point in buying AAC, especially when they claim it blocks adr, which simply isn’t true.
    • 🌐 Website: https://l2adonis.com 📅 GRAND OPENING: July 18, 2025 – 20:00 (UTC+2) 💬 Discord: https://discord.com/invite/tZBj8JxAwx 🚫 No auto-farm • No auto-macro • No pay-to-win • No custom   Some Basic Info's (More detalied info's on website)  EXP/SP: x25  Adena: x15  Drop: x15  Spoil: x15  Seal Stones: x15  Raid Boss Drop: x10  Epic Boss Drop: x1  Manor: x10  Safe Enchant: +4  Max Enchant: +16  Normal Scroll Chance: 50%  Blessed Scroll Chance: 66% (If enchant fail item remain +4)  Buff Slots (30+4 extra with Divine Inspiration)  Dances/Songs Slots 14  Auto-learn skills  ⚔️ Real PvP • Real Progression • Retail-like experience JOIN NOW and relive the real L2 experience!
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchihamkt.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/uthciha-servicess  | https://campsite.bio/utchihaamkt
  • 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