I'm here today to release my Costume System to you all, and you know what's the best part? It's FREE. It's thanks to the server "UniversalElements", without which I would have probably started selling it as well.
So, my Costume System is a dynamic library which needs to be preloaded when executing any game instance, and it will arrange everything on its own to make this System work on your client, provided this supports the costume and has it implemented correctly. If everything it correct on your client (taking the files from official servers should be enough), it will work out-of-the-box.
Important: It only works on game 2089M
Let me start by saying that I have no clear idea of how the official Costume System works, and all I know is what someone else told me: so errors or bugs are likely to be present, but worry not, I will fix them as soon as I have time, if you report them.
There's another side note: the system at the moment is not fully complete yet. In particular, the "expire" part is missing, so the costumes are permanent as of now. This will be implemented in the future, but as I said, when I will have time.
I haven't tested whether bonuses work or not, because I won't use them on my server, but by logic they should work. So, if someone could test this, it'd be great
Okay, so, let's make it work. The library needs to be loaded with the usual LD_[32_]PRELOAD method, I won't write how to do that once again, you can search on EPVP or Google about that.
As for the item_proto, the client one needs no editing (if you took the costumes part from the official client). The server one, on the other hand, needs the following edits:
- Costumes need to be type "28", the subtype needs to be "0" for armor-costumes and "1" for hair. The weapon-costume is not yet implemented on official servers, so I didn't implement it as well (even though everything is ready to make it work).
- Not needed anymore - Costumes need a specific wearflag. It's 0x1000 (4096 in decimal notation) for armor-costumes and 0x2000 (8192 in decimal notation) for hair.
- Make sure the "value3" field matches both the one in the clientside item_proto and the ShapeIndex of the costume in characters' MSMs.
- Modify the player table of your database, in particular the column "part_main": make it unsigned, and also make sure that it's a SMALLINT. Or you can run this query:
Code:ALTER TABLE `player` MODIFY COLUMN `part_main` smallint(6) UNSIGNED NOT NULL DEFAULT 0 AFTER `ip`;
Password: UniversalElements
If, by chance, you'd like to donate something for this library as I'm releasing it for FREE (while others were selling this for €50+), I'd be very grateful. Also, I'm sure a donation would boost possible bugfixes and further development
Changelog:
- Version 1.2.4: Fixes wearflag bug. The library still needed a wearflag to be set, despite ignoring which one.
- Version 1.2.3: Fixed the other hair bug, which consisted in the saved hair value to be overwritten at login. Set part_hair in the "player" table to 0 to solve it. - Removed the need to set the wearflag for costumes. It will only rely on the type and subtype now. - Fixed mysql_query bug (or at least I think so), thanks to BlackYuko for the suggestion.
- Version 1.2.0: Costumes are now shown in character selection, and the hair bug is fixed.
N.B.: To make character selection work properly, you need to modify the player table of your database, in particular the column "part_main": make it unsigned, and also make sure that it's a SMALLINT. Or you can run this query:
Code:ALTER TABLE `player` MODIFY COLUMN `part_main` smallint(6) UNSIGNED NOT NULL DEFAULT 0 AFTER `ip`;
- Version 1.1.0: Initial release