ID:163190
 
mob
verb
Attack(mob/M in oview(1))
if(usr.made==0)
usr << "<font color=green>Please make a character first.</font>"
return
if(usr.pvp == "Yes")
var/damage = src.strength - M.defense
if(M.client)
M.hp -= damage
src <<"You attack [M] for [damage]!"
src << sound('sound/bash.wav',,,3,100)
M <<"<font color=red>You are being attacked by</font> [src]!"
src.level_up()
M.death_check(src)
else
M.hp -= damage
src <<"You attack [M] for [damage]!"
src << sound('sound/bash.wav',,,2,100)
M <<"You are being attacked by [src]!"
src.exp += M.giveexp
src.level_up()
M.death_check(src)
else
if(usr.pvp == "No")
if(usr.team == "Good"&&M.team == "Good")
usr << "Can not hurt your friends."
return
else
var/damage = src.strength - M.defense
if(M.client)
M.hp -= damage
src <<"You attack [M] for [damage]!"
src << sound('sound/bash.wav',,,2,100)
M <<"You are being attacked by [src]!"
src.level_up()
M.death_check(src)
else
M.hp -= damage
src <<"You attack [M] for [damage]!"
src << sound('sound/bash.wav',,,2,100)
M <<"You are being attacked by [src]!"
src.exp += M.giveexp
src.level_up()
M.death_check(src)


Here is my attack verb I made but how can I make it instead of in view(1) like in front of cause I hate that box that pops up asking you to attack... it ruins the attack verb
Use get_step like so:
get_step(src,src.dir)

Look up get_step() in the DM Reference for more info.