Jump to content

[Share]Doors Status Hp and castle walls{IL}


Recommended Posts

This share works in all the packs l2j,l2jfree,l2jemu. If you have any error delete it..It's not

necessary in all the packs

 

Credits SpooKNoF

It's the only who made this and i don't want karma. I took the code from SpooKNoF for the share

 

 

Index: //java/com/l2dot/gameserver/network/serverpackets/DoorInfo.java

===================================================================

--- //java/com/l2dot/gameserver/network/serverpackets/DoorInfo.java (revision 47)

+++ //java/com/l2dot/gameserver/network/serverpackets/DoorInfo.java (revision 59)

@@ -20,5 +20,6 @@

 

import com.l2dot.gameserver.model.actor.instance.L2DoorInstance;

-

+ import com.l2dot.gameserver.model.actor.instance.L2StaticObjectInstance;

+ import com.l2dot.gameserver.network.serverpackets.StaticObject;

/**

 * 60

@@ -38,17 +39,46 @@

private static final String _S__60_DOORINFO = " 4c DoorInfo";

Index: //java/com/l2dot/gameserver/network/serverpackets/DoorInfo.java

 

 

private L2DoorInstance _door;

+ private final int _staticObjectId;

+    private final int _objectId;

+    private final int _type;

+    private final boolean _isTargetable;

+    private final boolean _isClosed;

+    private final boolean _isEnemyOf;

+    private final int _maxHp;

+    private final int _currentHp;

+    private final boolean _showHp;

+    private final int _damageGrade;

 

- public DoorInfo(L2DoorInstance door)

- {

- _door=door;

- }

+

+ public DoorInfo(L2DoorInstance door, boolean showHp)

+    {

+        _staticObjectId = door.getDoorId();

+        _objectId = door.getObjectId();

+        _type = 1;

+        _door=door;

+        _isTargetable = true;

+        _isClosed = !door.getOpen();

+        _isEnemyOf = door.isEnemyOf(_door);

+        _maxHp = door.getMaxHp();

+        _currentHp = (int) door.getCurrentHp();

+        _showHp = showHp;

+        _damageGrade = door.getDamage();

+    }

 

- @Override

- protected final void writeImpl()

- {

- writeC(0x4c);

- writeD(_door.getObjectId());

- writeD(_door.getDoorId());

- }

+    @Override

+    protected final void writeImpl()

+    {

+     writeC(0x4c);

+     writeD(_door.getObjectId());

+     writeD(_door.getDoorId());

+        writeD(_type);

+        writeD(_isTargetable ? 1 : 0);

+        writeD(_isClosed ? 1 : 0);

+        writeD(_door.isEnemyOf(getClient().getActiveChar()) ? 1 : 0);

+        writeD(_currentHp);

+        writeD(_maxHp);

+        writeD(_showHp ? 1 : 0);

+        writeD(_damageGrade);

+    }

 

/* (non-Javadoc)

@@ -62,2 +92,3 @@

 

}

+

 

 

 

 

 

 

Index: //java/com/l2dot/gameserver/network/clientpackets/RequestRecordInfo.java

===================================================================

--- //com/l2dot/gameserver/network/clientpackets/RequestRecordInfo.java (revision 47)

+++ /java/com/l2dot/gameserver/network/clientpackets/RequestRecordInfo.java (revision 61)

@@ -80,5 +80,5 @@

else if (object instanceof L2DoorInstance)

{

- _activeChar.sendPacket(new DoorInfo((L2DoorInstance) object));

+ _activeChar.sendPacket(new DoorInfo((L2DoorInstance) object, false));

_activeChar.sendPacket(new DoorStatusUpdate((L2DoorInstance) object));

}

 

 

 

 

Index: //java/com/l2dot/gameserver/model/actor/knownlist/PcKnownList.java

===================================================================

--- //java/com/l2dot/gameserver/model/actor/knownlist/PcKnownList.java (revision 47)

+++ //java/com/l2dot/gameserver/model/actor/knownlist/PcKnownList.java (revision 60)

@@ -114,5 +114,5 @@

            else if (object instanceof L2DoorInstance)

            {

-                getActiveChar().sendPacket(new DoorInfo((L2DoorInstance) object));

+             getActiveChar().sendPacket(new DoorInfo((L2DoorInstance) object, false));

                getActiveChar().sendPacket(new DoorStatusUpdate((L2DoorInstance) object));

            }

 

 

Link to comment
Share on other sites

well , as zero* says this is spooknof's code. it shouldnt be in public. its stolen.i mean he gaved it to me , and someone stolen my assembla account for a while , and took dot's source and this code too. and some others.. -.-

 

whatever. thanks to spooknof for this.

 

and thanks zero for posting it

Link to comment
Share on other sites

stef dont need to explain yourself...

 

Credits SpooKNoF

It's the only who made this and i don't want karma. I took the code from SpooKNoF for the share

 

only for interlude :)

and its the only one who made it? hes just one who made it work under that shitty interlude :)

 

anyway gg

Link to comment
Share on other sites

ok realy nice zero but you have and other codes? this is prety nice and i i think the l2dot was the best why you stop working this?

 

 

where i add this?  private L2DoorInstance _door;

+    private final int _staticObjectId;

+      private final int _objectId;

+      private final int _type;

+      private final boolean _isTargetable;

+      private final boolean _isClosed;

+      private final boolean _isEnemyOf;

+      private final int _maxHp;

+      private final int _currentHp;

+      private final boolean _showHp;

+      private final int _damageGrade;

 

-  public DoorInfo(L2DoorInstance door)

-  {

-      _door=door;

-  }

+    public DoorInfo(L2DoorInstance door, boolean showHp)

+      {

+          _staticObjectId = door.getDoorId();

+          _objectId = door.getObjectId();

+          _type = 1;

+          _door=door;

+          _isTargetable = true;

+          _isClosed = !door.getOpen();

+          _isEnemyOf = door.isEnemyOf(_door);

+          _maxHp = door.getMaxHp();

+          _currentHp = (int) door.getCurrentHp();

+          _showHp = showHp;

+          _damageGrade = door.getDamage();

+      }

 

-  @Override

-  protected final void writeImpl()

-  {

-      writeC(0x4c);

-      writeD(_door.getObjectId());

-      writeD(_door.getDoorId());

-  }

+      @Override

+      protected final void writeImpl()

+      {

+          writeC(0x4c);

+          writeD(_door.getObjectId());

+          writeD(_door.getDoorId());

+          writeD(_type);

+          writeD(_isTargetable ? 1 : 0);

+          writeD(_isClosed ? 1 : 0);

+          writeD(_door.isEnemyOf(getClient().getActiveChar()) ? 1 : 0);

+          writeD(_currentHp);

+          writeD(_maxHp);

+          writeD(_showHp ? 1 : 0);

+          writeD(_damageGrade);

+      }

 

    /* (non-Javadoc)

@@ -62,2 +92,3 @@

 

}

+

Link to comment
Share on other sites

ok realy nice zero but you have and other codes? this is prety nice and i i think the l2dot was the best why you stop working this?

 

 

where i add this?  private L2DoorInstance _door;

+    private final int _staticObjectId;

+      private final int _objectId;

+      private final int _type;

+      private final boolean _isTargetable;

+      private final boolean _isClosed;

+      private final boolean _isEnemyOf;

+      private final int _maxHp;

+      private final int _currentHp;

+      private final boolean _showHp;

+      private final int _damageGrade;

 

-  public DoorInfo(L2DoorInstance door)

-  {

-      _door=door;

-  }

+    public DoorInfo(L2DoorInstance door, boolean showHp)

+      {

+          _staticObjectId = door.getDoorId();

+          _objectId = door.getObjectId();

+          _type = 1;

+          _door=door;

+          _isTargetable = true;

+          _isClosed = !door.getOpen();

+          _isEnemyOf = door.isEnemyOf(_door);

+          _maxHp = door.getMaxHp();

+          _currentHp = (int) door.getCurrentHp();

+          _showHp = showHp;

+          _damageGrade = door.getDamage();

+      }

 

-  @Override

-  protected final void writeImpl()

-  {

-      writeC(0x4c);

-      writeD(_door.getObjectId());

-      writeD(_door.getDoorId());

-  }

+      @Override

+      protected final void writeImpl()

+      {

+          writeC(0x4c);

+          writeD(_door.getObjectId());

+          writeD(_door.getDoorId());

+          writeD(_type);

+          writeD(_isTargetable ? 1 : 0);

+          writeD(_isClosed ? 1 : 0);

+          writeD(_door.isEnemyOf(getClient().getActiveChar()) ? 1 : 0);

+          writeD(_currentHp);

+          writeD(_maxHp);

+          writeD(_showHp ? 1 : 0);

+          writeD(_damageGrade);

+      }

 

    /* (non-Javadoc)

@@ -62,2 +92,3 @@

 

}

+

 

 

loulou i think you are noob but ok... bfw http://my-trac.assembla.com/L2Dot/timeline where it is?

Link to comment
Share on other sites

  • 1 month later...

Mages,vlepo oti ine sxetika palio to post,alla kapios pou kserei borei na mu apadisei pos duleyei ayto to pragma parapano?pou to vazo,ti kano?Kai an dn leiturgei,iparxei allos tropos na fixaro to bug me tis koloportes na dialiontai mono se siege?

Link to comment
Share on other sites

Thank you for the script, but i get 1 error right here:

_isClosed = !door.getOpen();

What should i change !door.getOpen() too? I'm using L2Server Interludes top revision

 

EDIT:

Seems that changing _closed into int solved the problem, but i don't know if the doors going to work.

Link to comment
Share on other sites

Thank you for the script, but i get 1 error right here:

_isClosed = !door.getOpen();

What should i change !door.getOpen() too? I'm using L2Server Interludes top revision

 

EDIT:

Seems that changing _closed into int solved the problem, but i don't know if the doors going to work.

 

I have the same error, could you post how it should look ?

Link to comment
Share on other sites

Thank you for the script, but i get 1 error right here:

_isClosed = !door.getOpen();

What should i change !door.getOpen() too? I'm using L2Server Interludes top revision

 

EDIT:

Seems that changing _closed into int solved the problem, but i don't know if the doors going to work.

 

Read The share 1st :)

If you have any error delete it......

Link to comment
Share on other sites

  • 3 weeks later...
  • 10 months later...

Sorry for "spamming" in this old thread, but i thought it was a great share and many peaple had a problem :D

 

Thank you for the script, but i get 1 error right here:

_isClosed = !door.getOpen();

What should i change !door.getOpen() too? I'm using L2Server Interludes top revision

 

EDIT:

Seems that changing _closed into int solved the problem, but i don't know if the doors going to work.

 

Since in l2doorinstance getOpen is int, and int as we know can't accept "!" the correct is the following.

_isClosed = door.getOpen() == 0;

I have the same error, could you post how it should look ?

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

    • Trustworthy person; hope you find what you're looking for!
    • Customs being added to systextures/animation/texture influences the increase in virtual ram by a very small amount, which means you won't have a headache in the future with critical error issues, unless it's a dubious custom, there are 2 custom weapon packs available for H5 that are "compromised", they didn't make a very good adaptation, one of the packages is the weapons from the goddess of destruction for H5, another is the hero weapons from the goddess of destruction for H5, avoid these customs for your H5 server if you see it on any forum.   Now coming back to your question; one thing that the NCSoft developers never did was add files to their system, probably because they were aware of what could happen when doing that, now think about one thing: the game's system retail itself is no more than 70MB, every time there was an update made by NCSoft they always added the equipment/items/cloaks etc. in their folders intended for that, so why do we do this? I still have my client containing a system with almost 1GB, 1-2h online is the time I can stay online before the ram memory limit, but I have already redone my entire client with customs being destined for textures/systexture/animations, almost all the customs that I had on that client containing a 1GB system I have on my current server, with the difference that I removed everything from the system and critical error is now nothing more than legends, my current server has a total of 220MB in the system folder And theoretically speaking, based on what I've seen, especially on many forums, I believe that the heavier the system folder is, the faster we accelerate the consumption of the client's virtual ram memory, causing countless different types of critical error in one short period of time, in many forums that I've seen on topics involving critical, the solution that stands out the most is about downloading a new clean "system"
    • Do you think that everything on the system is loaded regardless if you use it or not ? or even worst, are they loaded even if they exist as textures/meshes but not defined on the DAT files ?
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hoodservices https://campsite.bio/utchihaamkt
    • Yes, it is, it's not hard to do (if you know what you're doing); just time consuming.   To make some things clear: 1. You can not create .ukx files with animated skeletalmeshes inside, by using any of the freeshared L2Editors (basically, no support for .psa files) 2. You need a patched UT2003/UT2004. You can either get your own ut2004 and download Gildor's patch from his web, or use any of these: When you use these, you should be able to import both .psk and .psa animations > link the skeletalmesh to the psa > save as .ukx > use ut2down to convert the file to l2 format > encrypt the .ukx with standard l2 encryption (you can use mxc encdec, you can find it in the folder of the l2editor i shared). Your best bet is to use pawnviewer (aka dev mode) to test that. If you have troubles with that process then leave a reply here, otherwise, if it works correctly, you can move on to adding missing animnotify classes to you unrealed, then proper animnotifies, sounds, effects or w/e is missing from your .ukx files. Keep in mind that this is overall not difficult but a huge amount of work (unless you're good at scripting/macros) since you'd need to manually re-create every single animnotify, by hand. If you have doubts or i wasn't clear enough let me know here. (in case you don't know what an animnotify is: UDN - Two - AnimNotifies (unrealengine.com) )  
  • Topics

×
×
  • Create New...