Jump to content

Recommended Posts

Posted

I was advised to open this theme in this section

Hello, I'm interested if it's possible to do the similar thing on Java server. For instance, to create such a Shirt item that will change the appearance of the character. For example actually it is wearing Vorpal Light Set and it seems that it is wearing Halloween Costume or Christmas Costume. could you explain how to do this?

Thank you for your time

l3QKBUQ.jpg

Posted

You can do some like this with the VisualArmor controller, that uses the .dressme chat command to apply a visual aspect over your gear. With only the shirt sorry, but I have no idea at this moment. It's a cool idea anyway :)

Posted
It should be done similar to .dressme system. 

 

I would do it like this: in UserInfo.java and CharInfo.java make some checkings:

 

if you will find block of code like this(in CharInfo.java):

 

writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));

writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));

(...)

writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));

writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));

 

 

and 

 

in UserInfo.java (same for both, just there you can see small differences in UserInfo and CharInfo)

 


writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL));

writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));

(...)

writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));

writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));

 

 


This part of code sends information about what items are currently equipped, so client will show them on character.

 

You will just have to make checkings, which will look like this  :

 

 



if (shirt is equipped) && (all set items are equipped) 
{
shirt can change visually only fully equipped set


writeD(_inv.getPaperdollItemId(custom hair 2 slot accessory id));
writeD(_inv.getPaperdollItemId(custom helm id));
(...)
writeD(_inv.getPaperdollItemId(custom hair 1 slot accessory id));
writeD(_inv.getPaperdollItemId(custom face 1 slot accessory id));


of course for those things you dont want to be displayed just put 0
eg. using shirt = no any hair accessory so put:
in:
writeD(_inv.getPaperdollItemId(custom hair 2 slot accessory id));
this:
writeD(_inv.getPaperdollItemId(0));
}
else 
{
here will be normal set and items shown
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
(...)
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
}


 

You should have in mind that those 2 packets (one is what you see, 2nd what other people see), are sending info to people what they should see about you. It means all your character statistics will be real, just visual changes will be made.

 

I think you got main idea of it:P

Guest
This topic is now closed to further replies.
×
×
  • Create New...