Just something cool I wrote that some people might like, it allows you to set an NPC's armor color based on RGB, currently it sets all pieces at once, but it could be changed to set eat piece individually, example script after plugin. The following code should be placed in a .pl file in your plugins folder. Example: mob_color.pl
Code:
sub SetMobColor {
plugin::val('npc')->WearChange($_, plugin::val('npc')->GetTexture(), plugin::MobColor($_[0], $_[1], $_[2])) for (0..6);
}
sub MobColor {
my $color = 0;
$color += (((256 ** 2) * $_[0]) + (256 * $_[1]) + $_[2]);
return $color;
}
return 1;
Here is the example code.
Code:
sub EVENT_SPAWN {
plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}
Here's a picture of what this looks like.