Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

v160++ Hair IDs to v83

Elite Diviner
Joined
Dec 10, 2012
Messages
475
Reaction score
9
Hello everyone,

I am using this guide
PHP:
http://forum.ragezone.com/f427/import-hairs-920827/
for my stylist npc for my server.

But one thing is, 40000++ hair ids have lesser colors compare to the old one.

so this is for male hair
PHP:
 if (id / 1000 == 30 || id / 1000 == 33 || (id / 1000 == 32 && id >= 32370) || id / 1000 == 36 || (id / 1000 == 37 && id >= 37160 && id <= 37170)) {

So I just tried it out and edited to make it like this
PHP:
if (id / 1000 == 30 || id / 1000 == 33 || (id / 1000 == 32 && id >= 32370) || id / 1000 == 36 || (id / 1000 == 37 && id >= 37160 && id <= 37170) || (id >= 39040 && id <= 41370)) {

I dont know whats wrong but when I click haircut 3, i get instant DC. hair 2 and hair 1 works just fine.

Is that because haircut3 has more than 127 hairs?
As the guide says, if more than 127 hairs, it might DC.

Any help?
 
Elite Diviner
Joined
Dec 10, 2012
Messages
475
Reaction score
9
Just looked back at the thread and it says it will auto split into group so people wont get DCed..

I have tested the hairs on v12 ( it seems to be the problem here though) but all the hairs are working.

The selection haircut 3 works on male but does not work on female...

hmm..
 
Upvote 0
Elite Diviner
Joined
Dec 10, 2012
Messages
475
Reaction score
9
Yea, already have my hair cap fixed. because I edited them on MYSQL and they dont show bald hairs.
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
How do you get disconnected?
Like, what error message do you get?
 
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
I'm guessing the rest of the error code refers to the "Invalid Pointer" code.
Mmm, there are two things I'd check, if I were you.

First: for how it's coded, the script will automatically split the haircuts into "max-127-elements lists" only up to 3 lists

PHP:
if (maleHair1.size() < 0x7F) {
    maleHair1.add(id);
} else {
    if (maleHair2.size() < 0x7F) {
        maleHair2.add(id);
    } else {
        maleHair3.add(id);
    }
}

This means that the 382nd haircut would still fall in maleHair3 (and that would make that list long 128 elements). I don't know how many haircuts you got imported, but you might wanna make sure you have less than that amount, otherwise you'd need to add an extra list.

As a tip, you could just make the number of haircut pages be equal to number_of_haircuts / 127, rounded to the highest int. This way you can be sure you'd always have the correct number of pages available.


A second thing to check is for haircut validity:
PHP:
(id >= 39040 && id <= 41370)
If this is the only check you added, you're gonna have some issues with certain haircuts, for example, 39250 is a female haircut.
Unless you already did and simply didn't post it here, make sure you include extra exceptions for hair validation.
 
Upvote 0
Elite Diviner
Joined
Dec 10, 2012
Messages
475
Reaction score
9
I see! i will check for the hair3 later!

Also I will add an exceptions later. for now I want to get the haircut 3 selection works first~
 
Upvote 0
Back
Top