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-14-2020, 10:20 PM
macdaddy02
Fire Beetle
 
Join Date: Oct 2020
Posts: 13
Default

@ChaosSlayer - But that doesn't work in this case, unless you hard code each individual beastlord race being that it's hard coded with most of them getting the wolf, UNLESS you want them all to get the same pet with the script you provide.

I know you get confused easily, so I'll give you examples.

Barbarian Beastlord = wolf pet and your script changes it to beetle.

That means every other beastlord race that gets the wolf would now have a beetle if they casted that same spell.

That's how the very first post I posted has it, if you'd take a look at it
Reply With Quote
  #2  
Old 10-14-2020, 10:46 PM
macdaddy02
Fire Beetle
 
Join Date: Oct 2020
Posts: 13
Default

I'm going to try and explain this carefully so that a new player can understand how this works. My entire reason for even starting this was because there is no information on scripts UNLESS you hard code the beastlord pets through the pets.cpp file.

I wanted to avoid that! So, I attempted to make a script that anyone could use without having to take months to learn how every process works.

Steps: (This is assuming that you've already downloaded the emulator/peq/etc to run your own servers, that is a completely different topic)

1) You must create .pl files in your (emulator/server directory) quests/global folder.

2) Depending on if you use my method or Huppy's method (I will provide it) to what you name these files. Mine would be the actual spell / NPC ID and Huppy's would be the name of the spell.

3) Examples:
My Method: 515.pl, 516.pl, 517.pl, 518.pl, etc.
Huppy's Method: BLpet09, BLpet16, BLpet22, BLpet26, BLpet31, etc.

4) All you do is copy/paste the codes into these .pl files and place them into the quests/global folder.

5) My method requires a little more work than Huppy's, so depending on how you want to do it, they both work flawlessly as I tried both methods on every race as a beastlord at every level of the pets.
I.E. My method requires you to change the: if ($npc->GetNPCTypeID() == 837) to if ($npc->GetNPCTypeID() == 515) or if ($npc->GetNPCTypeID() == 516), etc. Depending on what spell you're casting.
Huppy's Method: All you have to do is name the .pl files and use the SAME code in each

MY METHOD:
Code:
sub EVENT_SPAWN {
    if ($npc->GetNPCTypeID() == 515) {
        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);
        }
    }
}
REMEMBER TO CHANGE THE 515 to the number of the ID in EACH .pl file.

HUPPY'S METHOD (BE SURE TO GIVE HIM CREDIT)

Code:
sub EVENT_SPAWN {
	
        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);
        }
}
Remember to name each .pl file the name of the spell.

NOTE: PLEASE NOTE THAT YOU MUST CREATE ALL THE SPELL/ID FILES NO MATTER WHICH METHOD YOU USE.

I.E.
BLpet47p15, BLpet49p15, etc (HUPPY'S METHOD).
894, 895, 896, 897, etc (MY METHOD).

Both methods list all races except the Vah Shir. So you'd have to add these with the race ID of the Vah Shir. I figured we'd keep them traditional.

You can find these in the npc_types using a database editor. I use HeidiSQL.

Please enjoy the beastlords
Reply With Quote
  #3  
Old 10-14-2020, 11:58 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Quote:
Originally Posted by macdaddy02 View Post
@ChaosSlayer - But that doesn't work in this case, unless you hard code each individual beastlord race being that it's hard coded with most of them getting the wolf, UNLESS you want them all to get the same pet with the script you provide.

I know you get confused easily, so I'll give you examples.

Barbarian Beastlord = wolf pet and your script changes it to beetle.

That means every other beastlord race that gets the wolf would now have a beetle if they casted that same spell.

That's how the very first post I posted has it, if you'd take a look at it
Important point - there are NO npc Beastlords in game =) AT ALL.
No one will be casting these spells unless you actually give them that, and if you DO - you can specify which race pet they get.
Also, they still all get Wolf by default - so my methods doesn't turn EVERYTHING into beetle, only those who match the proper owner race.
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 02:54 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