if(!src.client) //was !src.key
yes = 1
attacking = 1
damage = src.defense / (src.defense / 2) * usr.strength + rand(1,usr.strength)
src.health -= damage
src << "[usr] starts a battle with you!"
oview(1) << "[usr] begins to battle with [src]!"
src << "[usr] does [damage] damage to you!"
usr << "You do [damage] to [src]!"
usr.verbs -= new /mob/verb/attack()
sleep(10)
usr.verbs += new /mob/verb/attack()
Retaliate()
if(src.health <= 0)
src.loc = locate(1,1,1) //somewhere
src.health = src.maxHealth
attacking = 0
usr << "You killed [src]."
gain_Level()
proc
Retaliate()
while(usr in get_step(src,src.dir))
yes = 1
retaliate = usr.defense / (usr.defense / 2) * src.strength + rand(1,src.strength)
usr.health -= retaliate
usr << "[src.name] does [retaliate] to you!"
src.verbs -= new /mob/proc/Retaliate()
sleep(10)
src.verbs += new /mob/proc/Retaliate()
if(usr.health <= 0 || usr.health <= -1)
usr.loc = locate(1,1,1)
usr.health = 0
attacking = 0
usr << "You have been killed by [src.name]."
oview(1) << "[usr] got killed [src.name]!"
Problem description:What the problem is here is that under the Retaliate proc, I want it so that when the person attacks the npc, the npc begins to follow the person attacking it when hit and when the person attacking it is dead, to go back to its usual spot.