ID:698858
 
(See the best response by Carnage Productions.)
I haven't even made any working code for this yet, I wasn't really sure how to start (I am just starting, I am reading the guide and watching video tutorials.) Anyway, the code below is what I have in my "Mob" file already.

//Mob.dm//

/*
Delcares mobs, and there variables. Along with Login() parameters.
Also some enemies.
*/


//Mobs
mob
icon = 'Icons.dmi'
var
HP = 100
Strength = 5
CanAttack = 0
Skeleton
icon_state = "Bad"
CanAttack = 1
Login()
loc = locate(5,9,1)
icon = 'Icons.dmi'
world << "[usr.key] logged in!"
icon_state = alert("Gender Select", "What Gender?", "Male", "Female")

//Statpanel

Stat()
statpanel("Stats")
stat("Name:", src.key) //Displays name.
stat("Health:", HP) //Displays current health.
stat("Strength:", Strength) //Displays player's strength.



Best response
No ones going to create you an attack code, id suggest looking in the forum, at get_step, some resources and a few tutorials such as - http://www.byond.com/forum/?post=109791
An attack verb would be a verb that checks to see if the user of the verb can attack, and if so, decreases the target's HP based on the user's strength.

If you don't know how to make a verb, try the DM Guide. It can be found in the Developer menu.
Something like

mob/verb/attack(mob/m)
m.hp-=usr.Strength
mob
verb
Attack(mob/M as mob in oview(1))
var/damage = usr.str - M.def
if(damage <= 0)
usr << "[M] easily dodges your attack!"
M << "You easily dodge [usr]'s attack."
else
M.hp -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()



and then your gonna have to add

mob
proc
deathcheck()
if(src.hp <= 0)
view() << "[src] dies!"
src.hp = 10
src.Move(locate(1,1,1))
usr.str += 1
usr.def += 1
A better way than as mob in oview is using get_step look it up