Hello maxcheaters! We are a small group of friends that are developing a closed roleplay community, and want to adapt some customs to our L2JMobius free pack (currently we are using Classic Zaken 2.1). We have currently adapted a Skin Manager and L2JDevs ModEngine, but we are having some problem with An4rchy's Dressme. So far, te code is "working". Panel works, get target appearance works, but only for other players. That's surely because our CharInfo implementation is ok, but the UserInfo is messed up. That's something that we can usually fix on our end but...
We have realised that the UserInfo in L2JMobius is pretty different from the one present on aCIs or Frozen, and that the appareance of the player is controlled by ExUserInfoEquipSlot (I guess?). We have currently tried some approachs to solve this, none of them with success. This is our last try:
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.network.serverpackets;import org.l2jmobius.commons.network.PacketWriter;import org.l2jmobius.gameserver.enums.InventorySlot;import org.l2jmobius.gameserver.model.VariationInstance;import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;import org.l2jmobius.gameserver.model.itemcontainer.PlayerInventory;import org.l2jmobius.gameserver.network.OutgoingPackets;/**
* @author Sdw
*/publicclassExUserInfoEquipSlot extends AbstractMaskPacket<InventorySlot>{private final PlayerInstance _player;private final byte[] _masks =new byte[]{(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00};publicExUserInfoEquipSlot(PlayerInstance player){this(player,true);}publicExUserInfoEquipSlot(PlayerInstance player, boolean addAll){
_player = player;if(addAll){
addComponentType(InventorySlot.values());}}@Overrideprotected byte[] getMasks(){return _masks;}@Overridepublic boolean write(PacketWriter packet){OutgoingPackets.EX_USER_INFO_EQUIP_SLOT.writeId(packet);
packet.writeD(_player.getObjectId());
packet.writeH(InventorySlot.values().length);
packet.writeB(_masks);
final PlayerInventory inventory = _player.getInventory();for(InventorySlot slot :InventorySlot.values()){if(containsMask(slot)){if(!_player.isDressMeEnabled()){
final VariationInstance augment = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(inventory.getPaperdollObjectId(slot.getSlot()));
packet.writeD(inventory.getPaperdollItemId(slot.getSlot()));
packet.writeD(augment != null ? augment.getOption1Id():0);
packet.writeD(augment != null ? augment.getOption2Id():0);
packet.writeD(inventory.getPaperdollItemVisualId(slot.getSlot()));}else{switch(slot){case RHAND:
final VariationInstance augmentRHand = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollObjectId(slot.getSlot()):(_player.getDressMeData().getWeapId()==0? inventory.getPaperdollObjectId(slot.getSlot()): _player.getDressMeData().getWeapId()));
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemId(slot.getSlot()):(_player.getDressMeData().getWeapId()==0? inventory.getPaperdollItemId(slot.getSlot()): _player.getDressMeData().getWeapId()));
packet.writeD(augmentRHand != null ? augmentRHand.getOption1Id():0);
packet.writeD(augmentRHand != null ? augmentRHand.getOption2Id():0);
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemVisualId(slot.getSlot()):(_player.getDressMeData().getWeapId()==0? inventory.getPaperdollItemVisualId(slot.getSlot()): _player.getDressMeData().getWeapId()));break;case GLOVES:
final VariationInstance augmentGloves = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollObjectId(slot.getSlot()):(_player.getDressMeData().getGlovesId()==0? inventory.getPaperdollObjectId(slot.getSlot()): _player.getDressMeData().getGlovesId()));
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemId(slot.getSlot()):(_player.getDressMeData().getGlovesId()==0? inventory.getPaperdollItemId(slot.getSlot()): _player.getDressMeData().getGlovesId()));
packet.writeD(augmentGloves != null ? augmentGloves.getOption1Id():0);
packet.writeD(augmentGloves != null ? augmentGloves.getOption2Id():0);
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemVisualId(slot.getSlot()):(_player.getDressMeData().getGlovesId()==0? inventory.getPaperdollItemVisualId(slot.getSlot()): _player.getDressMeData().getGlovesId()));break;case CHEST:
final VariationInstance augmentChest = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollObjectId(slot.getSlot()):(_player.getDressMeData().getChestId()==0? inventory.getPaperdollObjectId(slot.getSlot()): _player.getDressMeData().getChestId()));
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemId(slot.getSlot()):(_player.getDressMeData().getChestId()==0? inventory.getPaperdollItemId(slot.getSlot()): _player.getDressMeData().getChestId()));
packet.writeD(augmentChest != null ? augmentChest.getOption1Id():0);
packet.writeD(augmentChest != null ? augmentChest.getOption2Id():0);
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemVisualId(slot.getSlot()):(_player.getDressMeData().getChestId()==0? inventory.getPaperdollItemVisualId(slot.getSlot()): _player.getDressMeData().getChestId()));break;case LEGS:
final VariationInstance augmentLegs = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollObjectId(slot.getSlot()):(_player.getDressMeData().getLegsId()==0? inventory.getPaperdollObjectId(slot.getSlot()): _player.getDressMeData().getLegsId()));
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemId(slot.getSlot()):(_player.getDressMeData().getLegsId()==0? inventory.getPaperdollItemId(slot.getSlot()): _player.getDressMeData().getLegsId()));
packet.writeD(augmentLegs != null ? augmentLegs.getOption1Id():0);
packet.writeD(augmentLegs != null ? augmentLegs.getOption2Id():0);
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemVisualId(slot.getSlot()):(_player.getDressMeData().getLegsId()==0? inventory.getPaperdollItemVisualId(slot.getSlot()): _player.getDressMeData().getLegsId()));break;case FEET:
final VariationInstance augmentFeet = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollObjectId(slot.getSlot()):(_player.getDressMeData().getBootsId()==0? inventory.getPaperdollObjectId(slot.getSlot()): _player.getDressMeData().getBootsId()));
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemId(slot.getSlot()):(_player.getDressMeData().getBootsId()==0? inventory.getPaperdollItemId(slot.getSlot()): _player.getDressMeData().getBootsId()));
packet.writeD(augmentFeet != null ? augmentFeet.getOption1Id():0);
packet.writeD(augmentFeet != null ? augmentFeet.getOption2Id():0);
packet.writeD(_player.getDressMeData()== null ? inventory.getPaperdollItemVisualId(slot.getSlot()):(_player.getDressMeData().getBootsId()==0? inventory.getPaperdollItemVisualId(slot.getSlot()): _player.getDressMeData().getBootsId()));break;default:
final VariationInstance augment = inventory.getPaperdollAugmentation(slot.getSlot());
packet.writeH(22);// 10 + 4 * 3
packet.writeD(inventory.getPaperdollObjectId(slot.getSlot()));
packet.writeD(inventory.getPaperdollItemId(slot.getSlot()));
packet.writeD(augment != null ? augment.getOption1Id():0);
packet.writeD(augment != null ? augment.getOption2Id():0);
packet.writeD(inventory.getPaperdollItemVisualId(slot.getSlot()));break;}}}}returntrue;}}
I know it can be wrote WAY better, but we are ourselves PHP devs, so pls understand :p
These are the reference classes, so you can see the difference:
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.
Good afternoon, I need to create a very simple website for my server, I would like the WhatsApp/discord or Instagram contact of a website developer for l2 off
you are right. thats because i was so confused by some servers, in which u could either download an old client like c6 or the classic client and you could play on that server on both. So when i took the decision to start my own server i wanted it to be on the classic client and while i was searching i couldnt find any information about it. Sorry for the confusion i caused.
You are contradicting yourself!
In your first message you clearly state "I want to create a GF server on the latest client". What this means is you want a GF server that is working/running on the latest client. You didn't say "not exactly like GF". You explicitly stated that the server would be GF and the client will be whichever new client you could find. You never asked for servers either, as evident from the following excerpt: "to link Gracia Final Pack to that client". You asked how to do it, and more specifically: "Do I just get a clean install and edit ini in the client", which brought me to the conclusion that you were completely oblivious and/or delusional, hense my EXTENSIVE and ON-POINT response, if I say so myself.
Question
Ikeryn
Hello maxcheaters! We are a small group of friends that are developing a closed roleplay community, and want to adapt some customs to our L2JMobius free pack (currently we are using Classic Zaken 2.1). We have currently adapted a Skin Manager and L2JDevs ModEngine, but we are having some problem with An4rchy's Dressme. So far, te code is "working". Panel works, get target appearance works, but only for other players. That's surely because our CharInfo implementation is ok, but the UserInfo is messed up. That's something that we can usually fix on our end but...
We have realised that the UserInfo in L2JMobius is pretty different from the one present on aCIs or Frozen, and that the appareance of the player is controlled by ExUserInfoEquipSlot (I guess?). We have currently tried some approachs to solve this, none of them with success. This is our last try:
I know it can be wrote WAY better, but we are ourselves PHP devs, so pls understand :p
These are the reference classes, so you can see the difference:
https://bitbucket.org/MobiusDev/l2j_mobius/src/master/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java
https://bitbucket.org/MobiusDev/l2j_mobius/src/master/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/network/serverpackets/ExUserInfoEquipSlot.java
and
https://gitlab.com/Tryskell/acis_public/-/blob/master/aCis_gameserver/java/net/sf/l2j/gameserver/network/serverpackets/UserInfo.java
We are adapting An4rchy's dressme:
Some help would be much appreciated. In exchange, we will release and share it with the community!
Have a nice corona-day!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.