i never liked 500+ hitting mobs, but not even fluffy darkpaw who could smash my face without having a weapon for 20+ what i barely could manage with a tarnished two handed sword.. well.. first time in my eq life i can take revenge on these fippies
the following code part goes into attack.cpp, our target is the npc::attack
Code:
if((max_dmg+eleBane) != 0 && damage > (max_dmg+eleBane)) {
mlog(COMBAT__DAMAGE, "Damage (%d) is above max (%d). Setting to max.", damage, (max_dmg+eleBane));
damage = (max_dmg+eleBane);
}
******* above is just for finding the place.. start is here *******
//this goes only for pets
if (this->GetOwnerID())
{
//this applies only for h2h, so that is not so low dam
if (skillinuse==HAND_TO_HAND)
{
damage=mylevel/20;
}
//formula is after player formula
//no "weapon skill" is counted, instead we say level * 10, saying "max weapon skill" with that
damage=MakeRandomInt(1,(weapon_damage * ((GetSTR()*20) + (GetSkill(OFFENSE)*15) + (mylevel*10)) / 1000)+eleBane);
}
******* code ends here *****
//THIS IS WHERE WE CHECK TO SEE IF WE HIT:
if(other->IsClient() && other->CastToClient()->IsSitting()) {
mlog(COMBAT__DAMAGE, "Client %s is sitting. Hitting for max damage (%d).", other->GetName(), (max_dmg+eleBane));
damage = (max_dmg+eleBane);
} else {
so.. all we do is putting the melee formula of client into npc.. this above goes only for pets by default (so you will have to put weapon in their hands). if you want to apply it for all the NPCs then remove the first "if". if you want to leave them on poor hand-to-hand melee then comment the second "if" out as well. this second makes sure to improve the "damage" if mob is fighting with hand to hand.. so previously quad150ing guards will not start quad1punching you just because you gave them no rusty weapon
todo: check if the creature is humanoid.. creatures biting actually do not need weapon - wont do it at 2am..