This is a temp fix because it doesn't work like live by pulling a random Race # from the zone the caster is in. also this is custom because each of the pets(I,II,III,IV) level up as the player levels up. but it solves the issue with pets being made as level 255 with 17 billion hp.
Spells.cpp line 5303 replace the Default code with this.
default:
{
char f_name[50];
strcpy(f_name,this->GetCleanName());
strcat(f_name,"`s Monster");
strcpy(npc_type->name, f_name);
if (pettype==19 && casting_spell_id==488
// Using this for Summon Monster pet line untill we can figure out how to pull a Random race # from current Zone.
{
printf("Generating Summon Monster IV Pet...\n",type,pettype);
npc_type->AC = GetCasterLevel()*1.5;
npc_type->INT = GetCasterLevel()*1.5;
npc_type->AGI = GetCasterLevel()*1.5;
npc_type->STR = GetCasterLevel()*1.5;
npc_type->STA = GetCasterLevel()*1.5;
npc_type->DEX = GetCasterLevel()*1.5;
npc_type->WIS = GetCasterLevel()*1.5;
npc_type->CHA = GetCasterLevel()*1.5;
npc_type->ATK = GetCasterLevel()*0.4;
npc_type->size = GetCasterLevel()*0.2;
npc_type->bodytype = BT_SummonedUndead;
npc_type->level = GetCasterLevel()+4;
npc_type->race = 123;
npc_type->class_ = 1;
npc_type->texture = 1;
npc_type->min_dmg = GetCasterLevel()*0.8;
npc_type->max_dmg = GetCasterLevel()*2.0;
npc_type->max_hp = GetCasterLevel()*50.0;
npc_type->cur_hp = npc_type->max_hp;
npc_type->Mana = GetCasterLevel()*50.0;
}
if (pettype==5 && casting_spell_id==1404)
{
printf("Generating Summon Monster III Pet...\n",type,pettype);
npc_type->AC = GetCasterLevel()*1.125;
npc_type->INT = GetCasterLevel()*1.125;
npc_type->AGI = GetCasterLevel()*1.125;
npc_type->STR = GetCasterLevel()*1.125;
npc_type->STA = GetCasterLevel()*1.125;
npc_type->DEX = GetCasterLevel()*1.125;
npc_type->WIS = GetCasterLevel()*1.125;
npc_type->CHA = GetCasterLevel()*1.125;
npc_type->ATK = GetCasterLevel()*0.3;
npc_type->size = GetCasterLevel()*0.15;
npc_type->bodytype = BT_SummonedUndead;
npc_type->level = GetCasterLevel()+3;
npc_type->race = 95;
npc_type->class_ = 1;
npc_type->texture = 1;
npc_type->min_dmg = GetCasterLevel()*0.6;
npc_type->max_dmg = GetCasterLevel()*1.5;
npc_type->max_hp = GetCasterLevel()*37.5;
npc_type->cur_hp = npc_type->max_hp;
npc_type->Mana = GetCasterLevel()*37.5;
}
if (pettype==5 && casting_spell_id==1402)
{
printf("Generating Summon Monster II Pet...\n",type,pettype);
npc_type->AC = GetCasterLevel()*0.75;
npc_type->INT = GetCasterLevel()*0.75;
npc_type->AGI = GetCasterLevel()*0.75;
npc_type->STR = GetCasterLevel()*0.75;
npc_type->STA = GetCasterLevel()*0.75;
npc_type->DEX = GetCasterLevel()*0.75;
npc_type->WIS = GetCasterLevel()*0.75;
npc_type->CHA = GetCasterLevel()*0.75;
npc_type->ATK = GetCasterLevel()*0.2;
npc_type->size = GetCasterLevel()*0.10;
npc_type->bodytype = BT_SummonedUndead;
npc_type->level = GetCasterLevel()+2;
npc_type->race = 14;
npc_type->class_ = 1;
npc_type->texture = 1;
npc_type->min_dmg = GetCasterLevel()*0.4;
npc_type->max_dmg = GetCasterLevel()*1.0;
npc_type->max_hp = GetCasterLevel()*25.0;
npc_type->cur_hp = npc_type->max_hp;
npc_type->Mana = GetCasterLevel()*25.0;
}
if (pettype==5 && casting_spell_id==1400)
{
printf("Generating Summon Monster I Pet...\n",type,pettype);
npc_type->AC = GetCasterLevel()*0.375;
npc_type->INT = GetCasterLevel()*0.375;
npc_type->AGI = GetCasterLevel()*0.375;
npc_type->STR = GetCasterLevel()*0.375;
npc_type->STA = GetCasterLevel()*0.375;
npc_type->DEX = GetCasterLevel()*0.375;
npc_type->WIS = GetCasterLevel()*0.375;
npc_type->CHA = GetCasterLevel()*0.375;
npc_type->ATK = GetCasterLevel()*0.1;
npc_type->size = GetCasterLevel()*0.05;
npc_type->bodytype = BT_SummonedUndead;
npc_type->level = GetCasterLevel()+1;
npc_type->race = 46;
npc_type->class_ = 1;
npc_type->texture = 1;
npc_type->min_dmg = GetCasterLevel()*0.2;
npc_type->max_dmg = GetCasterLevel()*0.5;
npc_type->max_hp = GetCasterLevel()*12.5;
npc_type->cur_hp = npc_type->max_hp;
npc_type->Mana = GetCasterLevel()*12.5;
}
else
{
printf("Unknown type/pettype of: %i,%i. Using Default Formula...\n",type,pettype);
npc_type->max_hp = GetCasterLevel()*50.5;
npc_type->cur_hp = npc_type->max_hp;
npc_type->min_dmg = GetCasterLevel()*0.8;
npc_type->max_dmg = GetCasterLevel()*2.0;
break;
}
}
}
i changed the Unknown/pettype code because it was calculating wrong for some reason an unknown pet before was recieving a level boost way to high(level 123-255) and hp was also way to high(10k to 17bil).