Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-20-2012, 03:45 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You might take a look at this plugin for giving random appearances as far as face, hair, etc:

Code:
#Usage: plugin::RandomFeatures(Mob);
# Chooses a random set of facial features for playable races (NPCs or Players)

sub RandomFeatures {

        my $Mob = $_[0];

        if ($Mob)
        {
                $MobRace = $Mob->GetRace();
                
                if ($MobRace <= 12 || $MobRace == 128 || $MobRace == 130 || $MobRace == 330 || $MobRace == 522)
                {
                        
                        $Gender = $Mob->GetGender();
                        $Texture = 0xFF;
                        $HelmTexture = 0xFF;
                        $HairColor = 0xFF;
                        $BeardColor = 0xFF;
                        $EyeColor1 = 0xFF;
                        $EyeColor2 = 0xFF;
                        $HairStyle = 0xFF;
                        $LuclinFace = 0xFF;
                        $Beard = 0xFF;
                        $DrakkinHeritage = 0xFFFFFFFF;
                        $DrakkinTattoo = 0xFFFFFFFF;
                        $DrakkinDetails = 0xFFFFFFFF;
                        
                        # Set some common feature settings
                        $EyeColor1 = plugin::RandomRange(0, 9);
                        $EyeColor2 = plugin::RandomRange(0, 9);
                        $LuclinFace = plugin::RandomRange(0, 7);
                        
                        # Adjust all settings based on the min and max for each feature of each $MobRace and $Gender
                        #plugin::Debug("About to switch case");
                        use Switch;

                        switch ($MobRace)
                        {
                                case (1)
                                {
                                        # Human
                                        $HairColor = plugin::RandomRange(0, 19);
                                        if ($Gender == 0) {
                                                $BeardColor = $HairColor;
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $Beard = plugin::RandomRange(0, 5);
                                        }
                                        if ($Gender == 1) {
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (2)
                                {
                                        # Barbarian
                                        $HairColor = plugin::RandomRange(0, 19);
                                        $LuclinFace = plugin::RandomRange(0, 87);
                                        if ($Gender == 0) { #
                                                $BeardColor = $HairColor;
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $Beard = plugin::RandomRange(0, 5);
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (3) 
                                {
                                        # Erudite
                                        if ($Gender == 0) { #
                                                $BeardColor = plugin::RandomRange(0, 19);
                                                $Beard = plugin::RandomRange(0, 5);
                                                $LuclinFace = plugin::RandomRange(0, 57);
                                        }
                                        if ($Gender == 1) { #
                                                $LuclinFace = plugin::RandomRange(0, 87);
                                        }
                                }
                                case (4) 
                                {
                                        # WoodElf
                                        $HairColor = plugin::RandomRange(0, 19);
                                        if ($Gender == 0) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (5) 
                                {
                                        # HighElf
                                        $HairColor = plugin::RandomRange(0, 14);
                                        if ($Gender == 0) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $LuclinFace = plugin::RandomRange(0, 37);
                                                $BeardColor = $HairColor;
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (6) 
                                {
                                        # DarkElf
                                        $HairColor = plugin::RandomRange(13, 18);
                                        if ($Gender == 0) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $LuclinFace = plugin::RandomRange(0, 37);
                                                $BeardColor = $HairColor;
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (7) 
                                {
                                        # HalfElf
                                        $HairColor = plugin::RandomRange(0, 19);
                                        if ($Gender == 0) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $LuclinFace = plugin::RandomRange(0, 37);
                                                $BeardColor = $HairColor;
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (8) 
                                {
                                        # Dwarf
                                        $HairColor = plugin::RandomRange(0, 19);
                                        $BeardColor = $HairColor;
                                        if ($Gender == 0) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $Beard = plugin::RandomRange(0, 5);
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                                $LuclinFace = plugin::RandomRange(0, 17);
                                        }
                                }
                                case (9) 
                                {
                                        # Troll
                                        $EyeColor1 = plugin::RandomRange(0, 10);
                                        $EyeColor2 = plugin::RandomRange(0, 10);
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $HairColor = plugin::RandomRange(0, 23);
                                        }
                                }
                                case (10) 
                                {
                                        # Ogre
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $HairColor = plugin::RandomRange(0, 23);
                                        }
                                }
                                case (11) 
                                {
                                        # Halfling
                                        $HairColor = plugin::RandomRange(0, 19);
                                        if ($Gender == 0) { #
                                                $BeardColor = $HairColor;
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $Beard = plugin::RandomRange(0, 5);
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (12) 
                                {
                                        # Gnome
                                        $HairColor = plugin::RandomRange(0, 24);
                                        if ($Gender == 0) { #
                                                $BeardColor = $HairColor;
                                                $HairStyle = plugin::RandomRange(0, 3);
                                                $Beard = plugin::RandomRange(0, 5);
                                        }
                                        if ($Gender == 1) { #
                                                $HairStyle = plugin::RandomRange(0, 2);
                                        }
                                }
                                case (128) 
                                {
                                        # Iksar
                                        $LuclinFace = plugin::RandomRange(0, 9);
                                }
                                case (130) 
                                {
                                        # VahShir
                                        $LuclinFace = plugin::RandomRange(0, 9);
                                }
                                case (330) 
                                {
                                        # Froglok
                                        $LuclinFace = plugin::RandomRange(0, 9);
                                }
                                case (522) 
                                {
                                        # Drakkin
                                        $HairColor = plugin::RandomRange(0, 3);
                                        $BeardColor = $HairColor;
                                        $EyeColor1 = plugin::RandomRange(0, 11);
                                        $EyeColor2 = plugin::RandomRange(0, 11);
                                        $LuclinFace = plugin::RandomRange(0, 6);
                                        $DrakkinHeritage = plugin::RandomRange(0, 6);
                                        $DrakkinTattoo = plugin::RandomRange(0, 7);
                                        $DrakkinDetails = plugin::RandomRange(0, 7);
                                        if ($Gender == 0) { #
                                                $Beard = plugin::RandomRange(0, 12);
                                                $HairStyle = plugin::RandomRange(0, 8);
                                        }
                                        if ($Gender == 1) { #
                                                $Beard = plugin::RandomRange(0, 3);
                                                $HairStyle = plugin::RandomRange(0, 7);
                                        }
                                }

                        }
                        #plugin::Debug("About to SendIllusion");
                        $Mob->SendIllusion($MobRace,$Gender,$Texture,$HelmTexture,$LuclinFace,$HairStyle,$HairColor,$Beard,$BeardColor,$DrakkinHeritage,$DrakkinTattoo,$DrakkinDetails); # ,$size
                }
        }

}
For weapons, you should be able to use this plugin with these settings:

Code:
plugin::RandomWeapons(10648, 10692, 100, 0, 0, 0, 0);
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


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 07:55 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3