kfritz411

Member
I got this script working but have one piece I just can't seem to get.

In the attached file, on line 40, I'm trying to find a way to "temporarily" overwrite the HairItemID. If I use HairItemID then it permanently overwrites and when the player is changed back to Human the Gargoyle Horns remain.

Everything I try "HairMod" "HairItemIDMod" "HairModID" etc, just keeps returning "Server.Mobiles does not contain a definition...."

Anyone have any ideas?
 

Attachments

  • HumanRingOfGargishKind.cs
    2.5 KB · Views: 2
Tried that, also tried referencing Server.Spells, Server.Spells.Fifth, etc, none of it seemed to work so I removed those references.
 
There simply isn't a variable there to hold the original hair ID value until you add one yourself. Honestly I'm not sure whether it would be best to go in the server script Mobile.cs where the other BodyMod info goes (requiring a recompile of the exe) or in the PlayerMobile.cs script where it can be serialized/deserialized properly.

Adding it to Mobile.cs seems like it could interfere with existing saves on your server but maybe someone else could chime in on that.
 
@Falkor that's what's tripping me up, is I can see in the incognito spell, there's these 2 pieces:

private static readonly int[] m_HairIDs = new int[]
{
0x2044, 0x2045, 0x2046,
0x203C, 0x203B, 0x203D,
0x2047, 0x2048, 0x2049,
0x204A, 0x0000
};
private static readonly int[] m_BeardIDs = new int[]
{
0x203E, 0x203F, 0x2040,
0x2041, 0x204B, 0x204C,
0x204D, 0x0000
};


pm.SetHairMods(pm.Race.RandomHair(pm.Female), pm.Race.RandomFacialHair(pm.Female));

but that didn't seem to want to work either.
 
You were right -- it's in incognito after all!

Here is a working version of the script.
 

Attachments

  • HumanRingOfGargishKind.cs
    2.6 KB · Views: 2

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back