Yes, I am working on combat code, I will post the formulas right here: (Please note these are not on the public emu for two major reasons, 1) npcs do not have "base stats", 2) AC checks aren't functioning properly) PLEASE UNDERSTAND NOT ALL OF THESE ARE CODED INTO THE PROGRAM (meaning you can't copy and paste and they work)
First the chance to hit:
---------------------------------------------------------------------------------
float attacker = ((this->GetLevel()/2) * ((this->GetDEX()/6)+this->GetSTR()+atkbonus+this->pp.skills[skillinuse]));
float defender = (other->GetLevel()/2) * (other->GetAC()+(pp.skills[DEFENSE]/2)+other->GetINT()+other->GetAGI());
float hitsuccess = (attacker / defender);
Note: top of the division is all attacker info, bottom is defender.
---------------------------------------------------------------------------------
Then attack min damage:
---------------------------------------------------------------------------------
float mindmg = ((this->GetLevel()) * (weapon_damage * 2) * ((this->GetAGI()/4) + atkbonus + pp.skills[skillinuse] + this->GetSTR()));
float mindmg2 = ((other->GetLevel()) * (other->GetAC() + other->GetSTA() + other->GetINT() + other->GetAGI()));
float result = mindmg / mindmg2;
---------------------------------------------------------------------------------
Then attack max damage:
---------------------------------------------------------------------------------
float maxdmg = ((this->GetLevel()) * (weapon_damage * 3) * (this->GetAGI() + pp.skills[skillinuse] + this->GetSTR())*3);
float maxdmg2 = ((other->GetLevel()) * (other->GetAC() + other->GetSTA() + other->GetINT() + other->GetAGI()));
float result = maxdmg / maxdmg2;
Note: top of the division is all attacker info, bottom is defender.
---------------------------------------------------------------------------------
A random is put in these attacks so they are not static.
---------------------------------------------------------------------------------
Now for upping attack skills (chance to up your skill)
---------------------------------------------------------------------------------
float chanceskill = (maxskill*skillfactor) - ((curskill/10) * (1+(yourlvl-theirlvl));
float result = chanceskill / 1000; //makes it a decimal percentage
Yes, negatives are possible meaning, you don't get to up your skill! Makes sense, you don't get your skill upped on a lvl 30

Note: skillfactor is a number that can be set for each combat skill, I assumed in a way we would want a difference of the uppage per combat skill. (Ofcourse there will be limits of max skill and max skill per level.)
---------------------------------------------------------------------------------
Yet another, upping trade skills! (similar to combat skills)
---------------------------------------------------------------------------------
float result = ((maxskill*skillfactor) - (curskill)) / 1000;
Note: Yet another decimal to be used for %. (Ofcourse there will be limits of max skill and max skill per level.)
---------------------------------------------------------------------------------
It never ends! Time for some monk combat! (and kick)
---------------------------------------------------------------------------------
MaxDmg:
float result = ((lvl*2)*(str+skill+agi))*5.5 / ((((lvl)*(AC+AGI+STA))/3)/10);
MinDmg:
float result = ((lvl*2)*(str+skill+agi))*1.5 / ((((lvl)*(AC+AGI+STA))/3)/10);
Note: top of the division is all attacker info, bottom is defender. Secondly, the multiplying by 1.5 and 5.5 can be changed for different skills to make it more realistic (flying kick obviousely hits for a lot more than regular kick, thats what you would change to make this work) and ofcourse chance to hit code would also be used on these.
If there are any questions, don't ask

I posted this just for reference, nothing else.