Log in

View Full Version : Ingame Facial changes


pepsiphreak79
11-30-2011, 09:11 AM
So the gm #haircolor works as a temp
and the #hair command works
and the #face command work but i want to operate them from ingame using a Quest not as a GM..

I have a race changer NPC and a class changer NPC
But after changing race and class your char comes out ugly lol

Need help fixing this
What are the .pl commands to permanintly set face hair hair color eyec beard ect......
and even perminently set size

trevius
11-30-2011, 11:38 AM
You would have to use the SendIllusion() quest object to do that. Here is a plugin I made a while back that makes use of that command and other things:

#Usage: plugin::CloneAppearance(MobA, MobB, CloneName=false);
# Clones the looks of a mob
# MobA is the target mob to clone from
# MonB is the mob that is changing to clone MobA
# CloneName is an optional field that if set to 1 will clone the name of the target as well

sub CloneAppearance {
my $MobA = $_[0];
my $MobB = $_[1];
my $CloneName = $_[2];

my $Race = $MobA->GetRace();
my $Gender = $MobA->GetGender();
my $Texture = $MobA->GetTexture();
my $HelmTexture = $MobA->GetHelmTexture();
my $Face = $MobA->GetLuclinFace();
my $HairStyle = $MobA->GetHairStyle();
my $HairColor = $MobA->GetHairColor();
my $Beard = $MobA->GetBeard();
my $BeardColor = $MobA->GetBeardColor();
my $DrakkinHeritage = $MobA->GetDrakkinHeritage();
my $DrakkinTattoo = $MobA->GetDrakkinTattoo();
my $DrakkinDetails = $MobA->GetDrakkinDetails();
my $Size = $MobA->GetSize();

if (!$Size)
{
%RaceSizes = (
1 => 6, # Human
2 => 8, # Barbarian
3 => 6, # Erudite
4 => 5, # Wood Elf
5 => 5, # High Elf
6 => 5, # Dark Elf
7 => 5, # Half Elf
8 => 4, # Dwarf
9 => 9, # Troll
10 => 9, # Ogre
11 => 3, # Halfling
12 => 3, # Gnome
128 => 6, # Iksar
130 => 6, # Vah Shir
330 => 5, # Froglok
522 => 6, # Drakkin
);

$Size = $RaceSizes{$Race};
}

if (!$Size)
{
$Size = 6;
}

if (($MobB->IsClient() == 1) && ($Size > 15))
{
$Size = 15;
}

$MobB->SendIllusion($Race, $Gender, $Texture, $HelmTexture, $Face, $HairStyle, $HairColor, $Beard, $BeardColor, $DrakkinHeritage, $DrakkinTattoo, $DrakkinDetails, $Size);

for ($slot = 0; $slot < 7; $slot++)
{
my $Color = 0;
my $Material = 0;
if ($MobA->IsClient() || $slot > 6)
{
$Color = $MobA->GetEquipmentColor($slot);
$Material = $MobA->GetEquipmentMaterial($slot);
}
else
{
$Color = $MobA->GetArmorTint($slot);
if ($slot == 0)
{
$Material = $MobA->GetHelmTexture();
}
else
{
$Material = $MobA->GetTexture();
}
}
$MobB->WearChange($slot, $Material, $Color);
}

$PrimaryModel = $MobA->GetEquipmentMaterial(7);
$SecondaryModel = $MobA->GetEquipmentMaterial(8);

# NPCs can set animations and attack messages, but clients only set the model change
if ($MobB->IsNPC())
{
plugin::SetWeapons($PrimaryModel, $SecondaryModel, 1);
}
else
{
$MobB->WearChange(7, $PrimaryModel, 0);
$MobB->WearChange(8, $SecondaryModel, 0);
}

if ($CloneName)
{
my $CloneName = $MobA->GetCleanName();
$MobB->TempName($CloneName);
}


}


Though, this will only send an illusion, which means it will go back to the previous face settings when they zone. There isn't anything to make the changes permanent yet. Though, the problem is a pretty small one considering all clients can just use the Face button in their inventory window to set a new face at any time themselves.

pepsiphreak79
12-01-2011, 01:29 AM
im looking for something more perminent
has anyone been able to write a plugin to make these perminent?

texture
helm
haircolor
beardcolor
eyecolor1
eyecolor2
hair
face
beard
heritage
tattoo
details
size

pepsiphreak79
12-01-2011, 02:05 AM
Heres what im making its a character recreation NPC
But what point is recreation if you look like an ugly mutt....

Any illusion or temp facial change leaves you as soon as you log or zone so there useless...

This code is up 100% and spawned the npc all over the server

It allows for anyone to change race and class
It allows to manipulate stats a little
It allows for a high char to recreate without any real loss other than level and gains some stats each time

Ill impliment this into a quest soon kinda like another epic for the Resurrection quest



sub EVENT_SAY {

#beginlinks

my $newBard = quest::saylink ("new Bard", 1);
my $newBeastlord = quest::saylink ("new Beastlord", 1);
my $newBerserker = quest::saylink ("new Berserker", 1);
my $newCleric = quest::saylink ("new Cleric", 1);
my $newDruid = quest::saylink ("new Druid", 1);
my $newEnchanter = quest::saylink ("new Enchanter", 1);
my $newNecromancer = quest::saylink ("new Necromancer", 1);
my $newMagician = quest::saylink ("new Magician", 1);
my $newMonk = quest::saylink ("new Monk", 1);
my $newPaladin = quest::saylink ("new Paladin", 1);
my $newRanger = quest::saylink ("new Ranger", 1);
my $newRogue = quest::saylink ("new Rogue", 1);
my $newShadowknight = quest::saylink ("new Shadowknight", 1);
my $newShaman = quest::saylink ("new Shaman", 1);
my $newWarrior = quest::saylink ("new Warrior", 1);
my $newWizard = quest::saylink ("new Wizard", 1);
my $adjust = quest::saylink("adjust", 1);
my $str = quest::saylink ("Strength", 1);
my $sta = quest::saylink ("Stamina", 1);
my $agi = quest::saylink ("Agility", 1);
my $dex = quest::saylink ("Dexterity", 1);
my $wis = quest::saylink ("Wisdom", 1);
my $int = quest::saylink ("Intelligence", 1);
my $cha = quest::saylink ("Charisma", 1);
my $interested = quest::saylink ("interested", 1);
my $WARNING = quest::saylink ("WARNING", 1);
my $Bard = quest::saylink ("Bard", 1);
my $Beastlord = quest::saylink ("Beastlord", 1);
my $Berserker = quest::saylink ("Berserker", 1);
my $Cleric = quest::saylink ("Cleric", 1);
my $Druid = quest::saylink ("Druid", 1);
my $Enchanter = quest::saylink ("Enchanter", 1);
my $Necromancer = quest::saylink ("Necromancer", 1);
my $Magician = quest::saylink ("Magician", 1);
my $Monk = quest::saylink ("Monk", 1);
my $Paladin = quest::saylink ("Paladin", 1);
my $Ranger = quest::saylink ("Ranger", 1);
my $Rogue = quest::saylink ("Rogue", 1);
my $Shadowknight = quest::saylink ("Shadowknight", 1);
my $Shaman = quest::saylink ("Shaman", 1);
my $Warrior = quest::saylink ("Warrior", 1);
my $Wizard = quest::saylink ("Wizard", 1);
my $Ressurection = quest::saylink ("Ressurection", 1);
my $rebirth = quest::saylink ("rebirth", 1);
my $traped = quest::saylink ("traped", 1);
my $randomrace = quest::saylink ("Random Race", 1);
my $races = quest::saylink ("races", 1);
my $rnd = plugin::RandomRange(586);
my $Human = quest::saylink ("Human", 1);
my $Barbarian = quest::saylink ("Barbarian", 1);
my $Erudite = quest::saylink ("Erudite", 1);
my $male = quest::saylink ("Male", 1);
my $female = quest::saylink ("Female", 1);
my $unknown = quest::saylink ("unknown", 1);
my $WoodElf = quest::saylink ("Wood Elf", 1);
my $HighElf = quest::saylink ("High Elf", 1);
my $DarkElf = quest::saylink ("Dark Elf", 1);
my $HalfElf = quest::saylink ("Half Elf", 1);
my $Dwarf = quest::saylink ("Dwarf", 1);
my $Troll = quest::saylink ("Troll", 1);
my $Ogre = quest::saylink ("Ogre", 1);
my $Halfling = quest::saylink ("Halfling", 1);
my $Gnome = quest::saylink ("Gnome", 1);
my $Iksar = quest::saylink ("Iksar", 1);
my $VahShir = quest::saylink ("Vah Shir", 1);
my $Froglok = quest::saylink ("Froglok", 1);
my $Other = quest::saylink ("something else", 1);
my $Innoruuk = quest::saylink ("Innoruuk", 1);
my $Djinn = quest::saylink ("Djinn", 1);
my $Werewolf = quest::saylink ("Werewolf", 1);
#24 Fish
#26 Froglok
#27 Froglok Ghoul
#33 Ghoul
#58 Solusek Ro
my $Barbarian = quest::saylink ("Barbarian", 1);
my $Erudite = quest::saylink ("Erudite", 1);
my $Human = quest::saylink ("Human", 1);
my $Barbarian = quest::saylink ("Barbarian", 1);
my $Erudite = quest::saylink ("Erudite", 1);
my $Barbarian = quest::saylink ("Barbarian", 1);
my $Erudite = quest::saylink ("Erudite", 1);
my $Human = quest::saylink ("Human", 1);
my $Barbarian = quest::saylink ("Barbarian", 1);
my $newlvl = int(($ulevel*0.75)+0.25);
#EndLinks

#beginconversation

if($text=~/hail/i) {
if ($ulevel >= 60) { $client->Message(14,"Hello, $name! What an amazing world we live in. You have reached amazing Power. But there is more to learn for us all. [$Ressurection] Is possible now. ");}
if ($ulevel < 60) { $client->Message(3,"Return to me when you have grown too great for the realm."); }
quest::popup("Races", "<c \"#FF0000\">Caution lvl $ulevel $race $class </c>You may very well become thing Kill on Sight by doing this! <c \"#F07F00\">doing this will remove you from the world for a short time.</c><br> Changing your class withought resserection will cost you some of your expierence you will be lowered to level $newlvl");
$client->Message(14,"Have you ever wanted to [$adjust] your stats?");
$client->Message(15,"If you are unsure of what you are. I have been given the power to allow you to change your class While you are still young. Are you [$interested]? Before moving along though, you should head my [$WARNING]!");
$client->Message(13,"So you think your [$traped] in the wrong body?.");
}
if($text=~/traped/i) {
quest::say("FIRST I can turn you into a [$male], [$female], or an [$unknown]!");
quest::say("You can choose from a list of [$races] or I can turn you into a [$randomrace]!");}
if($text=~/races/i) {
$client->Message(13,"You may want to change race last incase some of the guards here want to kill the new you....");
quest::say("OK I can turn you into Permenently are [$Human], [$Barbarian], [$Erudite]!");
quest::say("[$WoodElf], [$HighElf], [$DarkElf], [$HalfElf], [$Dwarf], [$Troll], [$Ogre]!");
quest::say("[$Halfling], [$Gnome], [$Iksar], [$VahShir], [$Froglok]!");
quest::say("Or i can turn you into [$Other]!");
}
if($text=~/something else/i) {
quest::say("OK I can turn you into [$Innoruuk]!");
quest::say("OK I can turn you into [$Djinn]!");
quest::say("OK I can turn you into a [$Werewolf]!");
}
if($text=~/adjust/i) {
$client->Message(14,"Good luck with the your stats. Do you want [$str], [$sta], [$agi], [$dex], [$wis], [$int] or [$cha]. I caustion you Doing this will decrease all others by 2. While increasing your stat by 12");
}
if ($text =~/Ressurection/i){
$client->Message(14,"You may choose to be reborn as a new class. You will return to a state of a new life. You may remember some of your past life feats. And with your [$rebirth] you will be stronger than before.");
}
if ($text =~/rebirth/i){
quest::say ("What would you like to become?");
$client->Message(14,"Your Rebirth will cause you to leave this world for a moment.");
quest::say ("[$Bard], [$Beastlord], [$Berserker], [$Cleric], [$Druid], [$Enchanter]");
quest::say ("[$Necromancer], [$Magician], [$Monk], [$Paladin], [$Ranger], [$Rogue]");
quest::say ("[$Shadowknight], [$Shaman], [$Warrior], [$Wizard]");
}
if ($text =~/interested/i){
quest::say ("What would you like to become?");
quest::say ("I wish to become a [$newBard], a [$newBeastlord], a [$newBerserker], a [$newCleric], a [$newDruid]");
quest::say ("a [$newEnchanter], a [$newNecromancer], a [$newMagician], a [$newMonk], a [$newPaladin], a [$newRanger]");
quest::say ("a [$newRogue], a [$newShadowknight], a [$newShaman], a [$newWarrior], a [$newWizard]");
}


#endconversation


#beginactions

##ressurectionbegin

if ($text =~/Bard/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(3, +1);
quest::incstat(6, +2);
quest::permaclass(8);
}
if ($text =~/Beastlord/i){
quest::level(1);
quest::incstat(1, +1);
quest::incstat(2, +2);
quest::incstat(4, +1);
quest::permaclass(15);
}
if ($text =~/Berserker/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +2);
quest::incstat(3, +1);
quest::permaclass(16);
}
if ($text =~/Cleric/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(4, +2);
quest::permaclass(2);
}
if ($text =~/Druid/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(4, +2);
quest::permaclass(6);
}
if ($text =~/Enchanter/i){
quest::level(1);
quest::incstat(5, +2);
quest::incstat(6, +2);
quest::permaclass(14);
}
if ($text =~/Magician/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(5, +2);
quest::permaclass(13);
}
if ($text =~/Monk/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(2, +1);
quest::incstat(3, +1);
quest::permaclass(7);
}
if ($text =~/Necromancer/i){
quest::level(1);
quest::incstat(3, +2);
quest::incstat(5, +2);
quest::permaclass(11);
}
if ($text =~/Paladin/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(4, +1);
quest::incstat(6, +1);
quest::permaclass(3);
}
if ($text =~/Ranger/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(2, +1);
quest::incstat(4, +1);
quest::permaclass(4);
}
if ($text =~/Rogue/i){
quest::level(1);
quest::incstat(2, +2);
quest::incstat(3, +2);
quest::permaclass(9);
}
if ($text =~/Shadowknight/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +1);
quest::incstat(5, +1);
quest::incstat(6, +1);
quest::permaclass(5);
}
if ($text =~/Shaman/i){
quest::level(1);
quest::incstat(1, +1);
quest::incstat(4, +2);
quest::incstat(6, +1);
quest::permaclass(10);
}
if ($text =~/Warrior/i){
quest::level(1);
quest::incstat(0, +1);
quest::incstat(1, +2);
quest::incstat(2, +1);
quest::permaclass(1);
}
if ($text =~/Wizard/i){
quest::level(1);
quest::incstat(1, +2);
quest::incstat(5, +2);
quest::permaclass(12);
}

##ressurectionend

if($text=~/Random Race/i) {
quest::permarace($rnd);}
if($text=~/Male/i) {
quest::permagender(0);}
if($text=~/Female/i) {
quest::permagender(1);}
if($text=~/unknown/i) {
quest::permagender(2);}
if($text=~/Human/i) {
quest::permarace(1);}
if($text=~/Barbarian/i) {
quest::permarace(2);}
if($text=~/Erudite/i) {
quest::permarace(3);}
if($text=~/Wood Elf/i) {
quest::permarace(4);}
if($text=~/High Elf/i) {
quest::permarace(5);}
if($text=~/Dark Elf/i) {
quest::permarace(6);}
if($text=~/Half Elf/i) {
quest::permarace(7);}
if($text=~/Dwarf/i) {
quest::permarace(8);}
if($text=~/Human/i) {
quest::permarace(1);}
if($text=~/Troll/i) {
quest::permarace(9);}
if($text=~/Ogre/i) {
quest::permarace(10);}
if($text=~/Halfling/i) {
quest::permarace(11);}
if($text=~/Gnome/i) {
quest::permarace(12);}
if($text=~/Iksar/i) {
quest::permarace(128);}
if($text=~/Vah Shir/i) {
quest::permarace(130);}
if($text=~/Froglok/i) {
quest::permarace(330);}
if($text=~/Innoruuk/i) {
quest::permarace(123);
quest::permagender(2);}
if($text=~/Djinn/i) {
quest::permarace(126);
quest::permagender(2);}
if($text=~/Werewolf/i) {
quest::permarace(14);
quest::permagender(2);}


if($text=~/cheat/i){
quest::incstat(0,+5);
quest::incstat(1,+5);
quest::incstat(2,+5);
quest::incstat(3,+5);
quest::incstat(4,+5);
quest::incstat(5,+5);
quest::incstat(6,+5);
$client->Message(14,"CHEATER BURN IN HELL!!!");
}
if($text=~/Strength/i){
quest::incstat(0, +6);
quest::incstat(1, -1);
quest::incstat(2, -1);
quest::incstat(3, -1);
quest::incstat(4, -1);
quest::incstat(5, -1);
quest::incstat(6, -1);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if($text=~/Stamina/i){
quest::incstat(0, -1);
quest::incstat(1, +6);
quest::incstat(2, -1);
quest::incstat(3, -1);
quest::incstat(4, -1);
quest::incstat(5, -1);
quest::incstat(6, -1);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if($text=~/Agility/i){
quest::incstat(0, -1);
quest::incstat(1, -1);
quest::incstat(2, +6);
quest::incstat(3, -1);
quest::incstat(4, -1);
quest::incstat(5, -1);
quest::incstat(6, -1);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if($text=~/Dexterity/i){
quest::incstat(0, -1);
quest::incstat(1, -1);
quest::incstat(2, -1);
quest::incstat(3, +6);
quest::incstat(4, -1);
quest::incstat(5, -1);
quest::incstat(6, -1);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if($text=~/Wisdom/i){
quest::incstat(0, -1);
quest::incstat(1, -1);
quest::incstat(2, -1);
quest::incstat(3, -1);
quest::incstat(4, +6);
quest::incstat(5, -1);
quest::incstat(6, -1);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if($text=~/Intelligence/i){
quest::incstat(0, -1);
quest::incstat(1, -1);
quest::incstat(2, -1);
quest::incstat(3, -1);
quest::incstat(4, -1);
quest::incstat(5, +6);
quest::incstat(6, -1);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if($text=~/Charisma/i){
quest::incstat(0, -1);
quest::incstat(1, -1);
quest::incstat(2, -1);
quest::incstat(3, -1);
quest::incstat(4, -1);
quest::incstat(5, -1);
quest::incstat(6, +6);
$client->Message(14,"Done!!! It may not appear till your next return to the world..");
}
if ($text =~/WARNING/i){
quest::say ("You will keep all your skill ups and spells, BUT, I will bring you back to level 1. Your Stats may be altered as well. Are you still [$interested]?");
}

if ($text =~/new Bard/i){
quest::level($newlvl);
quest::permaclass(8);
}
if ($text =~/new Beastlord/i){
quest::level($newlvl);
quest::permaclass(15);
}
if ($text =~/new Berserker/i){
quest::level($newlvl);
quest::permaclass(16);
}
if ($text =~/new Cleric/i){
quest::level($newlvl);
quest::permaclass(2);
}
if ($text =~/new Druid/i){
quest::level($newlvl);
quest::permaclass(6);
}
if ($text =~/new Enchanter/i){
quest::level($newlvl);
quest::permaclass(14);
}
if ($text =~/new Necromancer/i){
quest::level($newlvl);
quest::permaclass(11);
}
if ($text =~/new Magician/i){
quest::level($newlvl);
quest::permaclass(13);
}
if ($text =~/new Monk/i){
quest::level($newlvl);
quest::permaclass(7);
}
if ($text =~/new Paladin/i){
quest::level($newlvl);
quest::permaclass(3);
}
if ($text =~/new Ranger/i){
quest::level($newlvl);
quest::permaclass(4);
}
if ($text =~/new Rogue/i){
quest::level($newlvl);
quest::permaclass(9);
}
if ($text =~/new Shadowknight/i){
quest::level($newlvl);
quest::permaclass(5);
}
if ($text =~/new Shaman/i){
quest::level($newlvl);
quest::permaclass(10);
}
if ($text =~/new Warrior/i){
quest::level($newlvl);
quest::permaclass(1);
}
if ($text =~/new Wizard/i){
quest::level($newlvl);
quest::permaclass(12);
}
}

trevius
12-01-2011, 04:05 AM
A new function would need to be added to the source code of EQEmu to make any of those changes permanent.

Did you see my comment about players being able to change their own face appearance at any time using the button in the inventory window?