Weapon Skill

The Formula

 * [x] = indicates a round down on x. [1.99] = 1

Stats
Stats are rounded down, so you only get a bonus from them on even values. On strength + dexterity weapons the numbers are added and then again rounded down. The result of this is that you may only get a increase ever 4 stats in the worst case.

STAT = 0 IF (STRENGTH_WEAPON && DEXTERITY_WEAPON) { IF (STRENGTH < 50) { STAT += STRENGTH - 25 } ELSE { STAT += [STRENGTH / 2] }    IF (DEXTERITY < 50) { STAT += DEXTERITY - 25 } ELSE { STAT += [DEXTERITY / 2] } } else { IF (STRENGTH_WEAPON) { STAT += STRENGTH }    IF (DEXTERITY_WEAPON) { STAT += DEXTERITY } } IF (STAT < 50) { STAT = STAT - 50 } else { STAT = [(STAT - 50) / 2] }

Weaponskill
SPEC = WEAPON_SPEC + RR_BONUS + ITEM_BONUS BONUS = 1 in most cases, 0 on STAFF and MAULERSTAFF WEAPONSKILL_BONUS = some procs / skills give +x% weaponskill

WEAPONSKILL = DAMAGE_TABLE * (200 + BONUS * ITEM_BONUS) / 500] * (100 + STAT) / 100] * (100 + SPEC) / 100] * (100 + WEAPONSKILL_BONUS) / 100]

Calculator
http://tool.excidio.net/weaponskill.htm