View Single Post
  #1  
Old 10-13-2020, 08:19 AM
macdaddy02
Fire Beetle
 
Join Date: Oct 2020
Posts: 13
Default How to get owners race?

First let me start by explaining what I'm after here. I am looking to use a .pl file in the quests/globals folder named the spells ID. Mainly I'm trying to change the Beastlord's pet without hard coding.

What I have so far is:

Code:
sub EVENT_SPAWN
{
my $NPCRace = $npc->GetRace();
if($NPCRace == 76){quest::npcrace(64);quest::npctexture(1);quest::npcsize(8);}   #Woodelf
if($NPCRace == 163){quest::npcrace(16);quest::npctexture(1);quest::npcsize(7);}   #Dwarf
if($NPCRace == 232){quest::npcrace(297);quest::npctexture(1);quest::npcsize(4);}   #Darkelf
if($NPCRace == 50){quest::npcrace(348);quest::npctexture(1);quest::npcsize(8);quest::npcgender(2);}   #Human
if($NPCRace == 87){quest::npcrace(559);quest::npctexture(1);quest::npcsize(10);}   #Halfling
if($NPCRace == 63){quest::npcrace(285);quest::npctexture(1);quest::npcsize(6);}   #Halfelf
if($NPCRace == 40){quest::npcrace(473);quest::npctexture(1);quest::npcsize(4);}   #Highelf
if($NPCRace == 39){quest::npcrace(570);quest::npctexture(1);quest::npcsize(4);}   #Gnome
if($NPCRace == 35){quest::npcrace(602);quest::npctexture(1);quest::npcsize(8);}   #Erudite
if($NPCRace == 31){quest::npcrace(473);quest::npctexture(1);quest::npcsize(4);}   #Drakkin
if($NPCRace == 48){quest::npcrace(473);quest::npctexture(1);quest::npcsize(4);}   #Froglok
if($NPCRace == 91){quest::npcrace(321);quest::npctexture(0);quest::npcsize(6);}   #Troll
if($NPCRace == 43){quest::npcrace(388);quest::npctexture(0);quest::npcsize(10);}   #Ogre
if($NPCRace == 41){quest::npcrace(415);quest::npctexture(1);quest::npcsize(8);}   #Barbarian
if($NPCRace == 42){quest::npcrace(389);quest::npctexture(1);quest::npcsize(3);}   #Iksar
}
**I found this at: http://www.eqemulator.org/forums/showthread.php?t=37594

With this it only searches for the pets race and then changes it based off the pets race with another race. The problem I have is that most races are given the "wolf" as default so I was curious if anyone would know how to make the pet race search for the owners race and allow me to change the pets based off the race of the owner instead of the pet?

I've only managed to find this topic on anything near what I'm looking for: http://www.eqemulator.org/forums/showthread.php?t=39581

Sorry if I didn't explain that well and thank you all for the help, much appreciated!
Reply With Quote