Code:
mob/verb
Attack(mob/M in oview(1))//this makes it so the user has the verb attack but can only be used when someone is next to him/her
set category = "Combat"//combat tab
var/dmg = rand(1,usr.strength)//make a random damage variable
usr << "<B><I>[usr] Attacks [M]"//sends a attack message to the user
M.health -= dmg// takes away the person there attackings health depending on the damage variable
M.DeathCheck()//sends deathcheck which is right below this
mob/proc
DeathCheck()
if(usr.health <= 0)//checks if the users health is 0 or less
usr << "You die"
usr.health = 10
usr.loc = locate(1,1,1)
Do this:
You might also make DblClick() call 'usr.Attack(src)' if you want to have both.