Jump to content

Recommended Posts

Posted (edited)

Hello I want to share this code ( Nothing Special )


Maybe many ppl like to use..Anyway..


 


With this Code Gm's Can see Dyes from players...


 


image.png


 


Let's Start :


 


Create a GMViewHennaInfo.java and inside this :



### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/network/serverpackets/GMViewHennaInfo.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/serverpackets/GMViewHennaInfo.java (revision 0)
+++ head-src/com/l2jfrozen/gameserver/network/serverpackets/GMViewHennaInfo.java (revision 0)
@@ -0,0 +1,51 @@
+package com.l2jfrozen.gameserver.network.serverpackets;
+
+import com.l2jfrozen.gameserver.model.actor.instance.L2HennaInstance;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+
+public class GMViewHennaInfo extends L2GameServerPacket
+{
+ private final L2PcInstance _activeChar;
+ private final L2HennaInstance[] _hennas = new L2HennaInstance[3];
+ private int _count;
+
+ public GMViewHennaInfo(L2PcInstance activeChar)
+ {
+ this._activeChar = activeChar;
+
+ int j = 0;
+ for (int i = 0; i < 3; i++)
+ {
+ L2HennaInstance h = this._activeChar.getHennas(i + 1);
+ if (h != null)
+ this._hennas[(j++)] = h;
+ }
+ this._count = j;
+ }
+
+@Override
+ protected void writeImpl()
+ {
+ writeC(234);
+
+ writeC(this._activeChar.getHennaStatINT());
+ writeC(this._activeChar.getHennaStatSTR());
+ writeC(this._activeChar.getHennaStatCON());
+ writeC(this._activeChar.getHennaStatMEN());
+ writeC(this._activeChar.getHennaStatDEX());
+ writeC(this._activeChar.getHennaStatWIT());
+
+ writeD(3);
+
+ writeD(this._count);
+ for (int i = 0; i < this._count; i++)
+ {
+ writeD(this._hennas[i].getSymbolId());
+ writeD(1);
+ }
+ }
+
+@Override
+ public String getType()
+ {
+ return "[S] 0xea GMHennaInfo";
+ }
+}
\ No newline at end of file


Now go found RequestGMCommand.java and edit :



### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestGMCommand.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestGMCommand.java (revision 1113)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestGMCommand.java (working copy)
@@ -24,6 +24,7 @@
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.serverpackets.GMViewCharacterInfo;
import com.l2jfrozen.gameserver.network.serverpackets.GMViewItemList;
+import com.l2jfrozen.gameserver.network.serverpackets.GMViewHennaInfo;
import com.l2jfrozen.gameserver.network.serverpackets.GMViewPledgeInfo;
import com.l2jfrozen.gameserver.network.serverpackets.GMViewQuestList;
import com.l2jfrozen.gameserver.network.serverpackets.GMViewSkillInfo;
@@ -82,6 +83,7 @@
case 5: // player inventory
{
sendPacket(new GMViewItemList(player));
+ sendPacket (new GMViewHennaInfo (player));
break;
}
case 6: // player warehouse


Many people Found This Code Useful... ;)


 


 


 


 


Edited by Monkey D. Luffy
Posted (edited)

I think this writeC(234) should be writeC(0xea).. it's strange that l2jfrozen don't have the GMHennaInfo packet. ^^

 You Create this Java file "GMHennaInfo.java" 

 

Right Click On com.l2jfrozen.gameserver.network.serverpackets 

 

New-->Class--> and on name inside GMViewHennaInfo -->Finish 

 

And inside the code ^^

Edited by Monkey D. Luffy
Posted

I think you get me wrong. ^^

I was wondered why l2jfrozen don't have this packet.. :P

The name of the file doesn't matter (it's for the developer), since the client reads the first writeC packet.

Posted

I think you get me wrong. ^^

I was wondered why l2jfrozen don't have this packet.. :P

The name of the file doesn't matter (it's for the developer), since the client reads the first writeC packet.

 

I Test with "writeC(234)" and work..Anyway ^-

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.



×
×
  • Create New...