Well I just so happened to test this today and it does indeed work.
You just need to make sure you cast:
$CT was me getting my pet target, really this would affect any NPC I targeted
Code:
sub EVENT_TARGET_CHANGE{
if($client->GetAggroCount() == 0){
### Test Scaling ###
if($name eq "Akkasham"){
$CT = $client->GetTarget();
$CT->CastToNPC()->ModifyNPCStat("max_hp", "10000000");
$CT->CastToNPC()->SetHP($CT->GetMaxHP());
}
}
}