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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2020, 07:06 PM
Sturm
Hill Giant
 
Join Date: Dec 2015
Posts: 119
Default

You're going to want to add an "else" statement on that incase the player is in an illusion, so they get a desired pet race there as well.

I've been considering doing it this way as well, but you just saved me the time. Thanks!

Edit*
Quickly added the functionality to its own sub routine to make adding pet NPCID's less blocky:

Code:
sub EVENT_SPAWN {
    if ($npc->GetNPCTypeID() == 837) {
        PET_RACE();
    }
	# Next NPC ID here:
	
}

sub PET_RACE {
	my $petowner = $entity_list->GetClientByID($npc->GetOwnerID());
        if ($petowner->GetRace() == 1) { # Human
            $npc->SetRace(468);
            $npc->ChangeSize(12);
		}
		elsif ($petowner->GetRace() == 2) { # Barbarian
            $npc->SetRace(528);
            $npc->ChangeSize(4);
		}
		elsif ($petowner->GetRace() == 3) { # Erudite
            $npc->SetRace(602);
            $npc->ChangeSize(8);
		}
		elsif ($petowner->GetRace() == 4) { # Wood Elf
            $npc->SetRace(64);
            $npc->ChangeSize(7);
        }
		elsif ($petowner->GetRace() == 5) { # High Elf
            $npc->SetRace(473);
            $npc->ChangeSize(5);
        }
		elsif ($petowner->GetRace() == 6) { # Dark Elf
            $npc->SetRace(365);
            $npc->ChangeSize(8);
        }
        elsif ($petowner->GetRace() == 7) { # Half Elf
            $npc->SetRace(560);
            $npc->ChangeSize(7);
        }
		elsif ($petowner->GetRace() == 8) { # Dwarf
            $npc->SetRace(16);
            $npc->ChangeSize(6);
        }
		elsif ($petowner->GetRace() == 9) { # Troll
            $npc->SetRace(259);
            $npc->ChangeSize(8);
        }
		elsif ($petowner->GetRace() == 10) { # Ogre
            $npc->SetRace(135);
            $npc->ChangeSize(7);
        }
		elsif ($petowner->GetRace() == 11) { # Halfling
            $npc->SetRace(321);
            $npc->ChangeSize(6);
        }
		elsif ($petowner->GetRace() == 12) { # Gnome
            $npc->SetRace(570);
            $npc->ChangeSize(7);
        }
		elsif ($petowner->GetRace() == 128) { # Iksar
            $npc->SetRace(389);
            $npc->ChangeSize(7);
        }
		elsif ($petowner->GetRace() == 330) { # Froglok
            $npc->SetRace(245);
            $npc->ChangeSize(7);
        }
		elsif ($petowner->GetRace() == 522) { # Drakkin
            $npc->SetRace(611);
            $npc->ChangeSize(7);
        }
		else {
			$npc->SetRace(611); # Change this to desired pet race
            $npc->ChangeSize(7); # Change this to suit size
		}
}
__________________
Developer of the Imperium Server.
https://imperium-eq.com/
Reply With Quote
  #2  
Old 10-13-2020, 07:30 PM
macdaddy02
Fire Beetle
 
Join Date: Oct 2020
Posts: 13
Default

Ah. Sorry I am brand spanking new to this guys. If you see anything wrong or can improve it by all means do so. I am posting it to help others being I spent 3 full days searching and could only get answers to the hard code with pets.cpp file.

So, I took it upon myself to go around it ... I am sure I am missing a LOT of bells and whistles, so I give ANY and EVERYONE permission to make it better, all I ask is to please share with everyone and make it easy to find
Reply With Quote
  #3  
Old 10-13-2020, 07:58 PM
Sturm
Hill Giant
 
Join Date: Dec 2015
Posts: 119
Default

Quote:
Originally Posted by macdaddy02 View Post
Ah. Sorry I am brand spanking new to this guys. If you see anything wrong or can improve it by all means do so. I am posting it to help others being I spent 3 full days searching and could only get answers to the hard code with pets.cpp file.

So, I took it upon myself to go around it ... I am sure I am missing a LOT of bells and whistles, so I give ANY and EVERYONE permission to make it better, all I ask is to please share with everyone and make it easy to find
Don't be sorry! I'm still new as well

You publicly posted it, so permission was already implied. heh

Cheers!
__________________
Developer of the Imperium Server.
https://imperium-eq.com/
Reply With Quote
Reply

Thread Tools
Display Modes

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 06:34 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