View Single Post
  #3  
Old 11-15-2014, 12:03 AM
Furniture
Hill Giant
 
Join Date: Aug 2012
Posts: 205
Default

I created a fresh server with bots recently and wasnt aware that they were broken so when i came across my bots having 700K hp, i went and fixed it in my code. Ill post it here if anyone wants it, as well as post more fixes if there are more problems with bots.

Note: I dont use the SoD client so i omitted the SoD client hp rules completely.

Code:
int32 Bot::GenerateBaseHitPoints()
{
	// Calc Base Hit Points
	int new_base_hp = 0;
	uint32 lm = GetClassLevelFactor();
	uint32 Post255;

	if ((GetSTA() - 255) / 2 > 0)
		Post255 = (GetSTA() - 255) / 2;
	else
		Post255 = 0;

	new_base_hp = (5) + (GetLevel()*lm / 10) + (((GetSTA() - Post255)*GetLevel()*lm / 3000)) + ((Post255*GetLevel())*lm / 6000);
	return new_base_hp;
}
this gives bots same hp as a player of that lvl/class in titanium, when i have some time and bots arent fixed yet ill post my fixes as i do them
Reply With Quote