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 04-19-2017, 01:22 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 426
Default Pet scaling...

I know there was a script released somewhere, but after searching for the last 20-30 minutes I just cannot seem to find it...

I was wondering if anyone had a pet scaling script that has some semi customization... Like, your pet has your HP, and their damage is scaled by the amount of DEX/AGI you have, you know... things like that...

Thanks!
__________________
I am the All Mighty Mittens!
Reply With Quote
  #2  
Old 04-19-2017, 06:22 PM
atrayas
Hill Giant
 
Join Date: Jun 2010
Posts: 105
Default

Id recommend doing custom tables in heidi for pet scaling.
Reply With Quote
  #3  
Old 04-19-2017, 09:12 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Pet Scaling Plugin:
Code:
sub PetScale {
    my $client = plugin::val('client');
    my $entity_list = plugin::val('entity_list');
    my $npc = $entity_list->GetNPCByID($client->GetPetID());
    if (plugin::GetModifier() <= 1) {
        $client->Message(315, "Scaling your pet would be useless, so it was not scaled.");
        return;
    }
    my %h = ("ac" => ["Armor Class", $npc->GetAC(), int($npc->GetAC() * plugin::GetModifier())],
    "max_hp" => ["Health", $npc->GetMaxHP(), int($npc->GetMaxHP() * plugin::GetModifier())],
    "min_hit" => ["Minimum Damage", $npc->GetMinDMG(), int($npc->GetMinDMG() * plugin::GetModifier())],
    "max_hit" => ["Maximum Damage", $npc->GetMaxDMG(), int($npc->GetMaxDMG() * plugin::GetModifier())],
    "atk" => ["Attack", $npc->GetATK(), int((1000 - (1000 / $client->GetLevel())) * plugin::GetModifier())],
    "accuracy" => ["Accuracy", $npc->GetAccuracyRating(), int((1000 - (1000 / $client->GetLevel())) * plugin::GetModifier())]);
    foreach my $key (sort {$a cmp $b} keys %h) {
        if (!$npc->EntityVariableExists($key)) {
            $npc->ModifyNPCStat($key, $h{$key}[2]);
            $npc->SetHP($npc->GetMaxHP());
            $npc->ChangeSize($client->GetSize(), 1);
            $npc->SetLevel($client->GetLevel());
            $npc->SetEntityVariable($key, 1);
        } else {
            $client->Message(315, "Your pet has already been scaled.");
            return;
        }
    }
    quest::popup("Pet Scaling Information", "Your Modifier: <font color = '#00FF00'>" . plugin::commify(plugin::GetModifier()) . "</font><br>
                                            Accuracy: <font color = '#00FFFF'>" . plugin::commify($h{"accuracy"}[1]) . "</font> - <font color = '#FFFF00'>" . plugin::commify($h{"accuracy"}[2]) . "</font><br>
                                            Armor Class: <font color = '#00FFFF'>" . plugin::commify($h{"ac"}[1]) . "</font> - <font color = '#FFFF00'>" . plugin::commify($h{"ac"}[2]) . "</font><br>
                                            Attack: <font color = '#00FFFF'>" . plugin::commify($h{"atk"}[1]) . "</font> - <font color = '#FFFF00'>" . plugin::commify($h{"atk"}[2]) . "</font><br>
                                            Health: <font color = '#00FFFF'>" . plugin::commify($h{"max_hp"}[1]) . "</font> - <font color = '#FFFF00'>" . plugin::commify($h{"max_hp"}[2]) . "</font><br>
                                            Minimum Damage: <font color = '#00FFFF'>" . plugin::commify($h{"min_hit"}[1]) . "</font> - <font color = '#FFFF00'>" . plugin::commify($h{"min_hit"}[2]) . "</font><br>
                                            Maximum Damage: <font color = '#00FFFF'>" . plugin::commify($h{"max_hit"}[1]) . "</font> - <font color = '#FFFF00'>" . plugin::commify($h{"max_hit"}[2]) . "</font><br>");
    $client->Message(315, "Your pet is now completely scaled.");
}

sub GetModifier {
    my $client = plugin::val('client');
    return 1000 if ($client->Admin() == 255);
    return (($client->GetCHA() / 100 > 1) ? ($client->GetCHA() / 100) : 1);
}

return 1;
Pet Scaling in global NPC/Player scripts:
Code:
## quests/global/global_player.pl
sub EVENT_SAY {
    if ($text=~/#Scale/i) {
        if ($client->GetPetID() > 0) {
            plugin::PetScale();
        }
    }
}

sub EVENT_SIGNAL {
    if ($signal == 999) {
        plugin::PetScale();
    }
}

## quests/global/global_npc.pl
sub EVENT_SPAWN {
    if ($npc->GetOwnerID() > 0 && $entity_list->GetMobByID($npc->GetOwnerID())->IsClient()) {
        quest::settimer("PetScale", 1);
    }
}

sub EVENT_TIMER {
    if ($timer eq "PetScale") {
        quest::stoptimer("PetScale");
        $entity_list->GetClientByID($npc->GetOwnerID())->SignalClient(999);
    }
}
It's old, and it does what I wanted it to do. Change it however you'd like.
Reply With Quote
  #4  
Old 04-20-2017, 02:12 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 426
Default

Thanks Kingly, while it does *scale* my pet, it doesn't do quite what I was looking for...
__________________
I am the All Mighty Mittens!
Reply With Quote
  #5  
Old 04-20-2017, 08:43 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

That was just my version. Modify it to your liking if you want, I thought I'd show you how I do it so you'd have somewhere to start from.
Reply With Quote
  #6  
Old 04-20-2017, 10:09 PM
Nerdgasm
Discordant
 
Join Date: Apr 2013
Posts: 426
Default

Quote:
Originally Posted by Kingly_Krab View Post
That was just my version. Modify it to your liking if you want, I thought I'd show you how I do it so you'd have somewhere to start from.
Fair enough, I'll come back to it when it's more important, how I have them out now is fine, but it's like, 11 spells from 1 - 50, and one at 50... Just kind of annoying getting rid of every other spell but those. =P
__________________
I am the All Mighty Mittens!
Reply With Quote
  #7  
Old 04-21-2017, 04:01 PM
GRUMPY
Discordant
 
Join Date: Oct 2016
Posts: 445
Default

Quote:
Originally Posted by atrayas View Post
Id recommend doing custom tables in heidi for pet scaling.
I noticed when you made a post for Elysium, you mentioned scaling pet stats using charisma ?

http://www.eqemulator.org/forums/showthread.php?t=40804

I also noticed in the source (pets.cpp) something commented out //not used anymore for scaling pet HP's, etc.
Has that whole concept become obsolete ?
Reply With Quote
  #8  
Old 04-21-2017, 06:50 PM
atrayas
Hill Giant
 
Join Date: Jun 2010
Posts: 105
Default

My partner from Elysium had edited the source and created custom tables within heidi to govern pet scaling using charisma. It was a very efficient way to control the overall power of the pets on the fly in case they were over tuned or under tuned.
Reply With Quote
  #9  
Old 05-08-2017, 01:18 AM
Darkscis
Sarnak
 
Join Date: Mar 2015
Posts: 62
Default

Quote:
Originally Posted by GRUMPY View Post
I noticed when you made a post for Elysium, you mentioned scaling pet stats using charisma ?

http://www.eqemulator.org/forums/showthread.php?t=40804

I also noticed in the source (pets.cpp) something commented out //not used anymore for scaling pet HP's, etc.
Has that whole concept become obsolete ?
Scaling for Elysium was all done in the source. I still have the code floating around somewhere if anyone wants a look at it. I don't mind sharing

EDIT: I think... lol I just looked but I have rebuilt both my work laptops that had the code. Hopefully I zipped it up somewhere but I have been working on other projects since then.
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 04:19 PM.


 

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