It's very simple, actually.
Here is an easy example.
mob/verb/attack(mob/m in oview(1)) src.att(m) mob/proc/att(mob/m) if(m.client && src.client) // pvp stuff can go here else var/damage=src.str m.hp-=damage m.att(src)
Thats a very easy example, it will obviously need a bit of work.
mob/PC/verb/attack() for(var/mob/PC/P in get_step(usr,usr.dir))//for all the players in front of the user P.HP-=usr.atk//substract the user's attack from the attacked person's HP P.deathcheck()//check if the attacked person dies mob/PC/proc/deathcheck() if(src.HP<=0) src.loc=locate(1,1,1)//send him back to the location 1,1,1
If you don't understand this try Bringer of Flame's one.
Here is an easy example.
Thats a very easy example, it will obviously need a bit of work.