Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2020, 02:13 PM
hayward6
Forum Guide
 
Join Date: Jul 2005
Posts: 468
Default Pet enhancments

For as long as I've played Everquest, and as long as I have hosted a server, I have always preferred pet classes. The biggest downside to pet classes in Everquest is their weakness when compared to other games, including even EQ2. To combat that on my server I have always adjusted the NPCtypes of all pets to have double the HP, Damage, and regeneration. That works, but ultimately it's messy. First of all that tweaks all pets in the game, so you have to be careful if you're fighting in Najena or any other place with a lot of those npc types.

What I am wondering, is if anyone has a better idea. Maybe in the form of a pet leveling script that would run when a pet is summoned, or a scaling buff spell that can be scribed by pet classes that would buff the pet and maybe even summon gear for it.

Appreciate any thoughts on the subject.
__________________
Sayin Silverwolf
Server Op of The Sandbox (Non-Legit)
Reply With Quote
  #2  
Old 10-22-2020, 04:52 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Yep there is simple enough pet script you can attach to a pet that will adjust pet power, for example based on your stats and keep it in level.
I had this script fully functional back when I was working on my server 7 years back, but I lost all my files.
I plan to recreate it again in a few days, unless someone else beats me to it before that
Reply With Quote
  #3  
Old 10-22-2020, 07:34 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Inside global_player.pl

Signals the players pet on level up to re-scale them...

Code:
sub EVENT_LEVEL_UP {
	$client->Message(15, "Auto Skill Activating");
		foreach my $skill ( 0 .. 42, 48 .. 54, 56, 62, 66, 67, 70 .. 74 ) {
		
		next unless $client->CanHaveSkill($skill);
		
		my $max = $client->MaxSkill( $skill, $client->GetClass(), $client->GetLevel() );
		
		next unless $max > $client->GetRawSkill($skill);
		
		$client->SetSkill( $skill, $max );
	}
	if($ulevel < 70) {
		quest::traindiscs($ulevel); 
		quest::scribespells($ulevel);
	}
	
	my $PETID = $client->GetPetID();
	if($PETID > 0) {
		my $PET = $entity_list->GetNPCByID($PETID);
		$PET->SignalNPC(42);
	}
}

global_npc.pl

On spawn of an NPC.. checks if its a pet... and calls ScalePet()

The signal code is here for when a player levels it will receive the signal and re-scale to the players new level.

I can't find my original code that did this for me... but this is a rough idea of what I used to use

Code:
sub EVENT_SPAWN {


	#Pet Code only below here
    my $ownerid = $npc->GetOwnerID();
    if($ownerid <= 0) { return; }
    
    my $owner = $entity_list->GetMobByID($ownerid);
    
    if($owner->IsClient()) {
        $npc->SetLevel($owner->GetLevel());
        ScalePet($npc, $owner->CastToClient(), $owner->GetCHA());
    }
}


sub EVENT_SIGNAL {

	if ($signal == 42) {
		my $ownerid = $npc->GetOwnerID();
		if($ownerid <= 0) { return; }
		my $owner = $entity_list->GetMobByID($ownerid);
		if($owner->IsClient()) {
			$npc->SetLevel($owner->GetLevel());
			ScalePet($npc, $owner->CastToClient(), $owner->GetCHA());
		}
	}
}

sub ScalePet {
	my $pet = $_[0];
	my $owner = $_[1];
	my $cha = $_[2];
	

       #Add more code under here to modify them ect...
	$pet->ModifyNPCStat("max_hp", $owner->GetMaxHP() + ($cha * 0.25));
	
}
Reply With Quote
  #4  
Old 10-22-2020, 09:46 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

LOL Natedog that was fast =P

Looks like I won't have to reinvent this script from scratch
Reply With Quote
  #5  
Old 10-23-2020, 07:06 AM
hayward6
Forum Guide
 
Join Date: Jul 2005
Posts: 468
Default

Thank you very much! It does seem to do what I am looking for, and I will experiment with tweaks. One thing I notice is the pet spawns low on health. Figure it's due to the scaling happening after summoning, and the new HP gap.
__________________
Sayin Silverwolf
Server Op of The Sandbox (Non-Legit)
Reply With Quote
  #6  
Old 10-24-2020, 03:14 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

on spawn i have....

Code:
$npc->SetHP($npc->GetMaxHP());
at the end of the pet scaling code to make sure they are full HP after re-scale

Also I found my original code for it... but it has some things that are custom in it and I'd rather not confuse people with snippets of code that don't work without the custom source for it lol
Reply With Quote
  #7  
Old 10-25-2020, 02:29 PM
hayward6
Forum Guide
 
Join Date: Jul 2005
Posts: 468
Default

That worked perfectly, thank you again! I used to have a basic understanding of perl and what we could do, but it's mostly lost on me now. Between this and some regeneration tweaks, pet classes should have it pretty good.
__________________
Sayin Silverwolf
Server Op of The Sandbox (Non-Legit)
Reply With Quote
  #8  
Old 04-20-2021, 11:51 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 419
Default

So with this, Nate, can you add multiple different pet scaling options? Like, one for Beastlord would be different then one for... Mage's lets say... is there a way to do that?
__________________
I am the All Mighty Mittens!
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: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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3