|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
04-19-2017, 01:22 PM
|
Discordant
|
|
Join Date: Apr 2013
Posts: 419
|
|
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!
|
04-19-2017, 06:22 PM
|
Hill Giant
|
|
Join Date: Jun 2010
Posts: 105
|
|
Id recommend doing custom tables in heidi for pet scaling.
|
|
|
|
04-19-2017, 09:12 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
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.
|
|
|
|
04-20-2017, 02:12 PM
|
Discordant
|
|
Join Date: Apr 2013
Posts: 419
|
|
Thanks Kingly, while it does *scale* my pet, it doesn't do quite what I was looking for...
__________________
I am the All Mighty Mittens!
|
04-20-2017, 08:43 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,594
|
|
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.
|
04-20-2017, 10:09 PM
|
Discordant
|
|
Join Date: Apr 2013
Posts: 419
|
|
Quote:
Originally Posted by Kingly_Krab
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!
|
04-21-2017, 04:01 PM
|
Discordant
|
|
Join Date: Oct 2016
Posts: 445
|
|
Quote:
Originally Posted by atrayas
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 ?
|
04-21-2017, 06:50 PM
|
Hill Giant
|
|
Join Date: Jun 2010
Posts: 105
|
|
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.
|
05-08-2017, 01:18 AM
|
Sarnak
|
|
Join Date: Mar 2015
Posts: 62
|
|
Quote:
Originally Posted by GRUMPY
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.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 01:41 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|