Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2014, 03:15 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default NPC Armor Color Plugin.

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.
Reply With Quote
  #2  
Old 12-29-2014, 08:58 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

awesome code bro
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3