ID:263020
 
mob/proc/Enemy_Look()
var/mob/M
while(usr)
if(M in oview(5))
walk_to(src,M,1,4)
if(M in oview(1)){step_towards(src,M)}
else
sleep(15)
step_rand(src)
break
else
for(M in view(src))
break
sleep(5)
spawn(2)
Enemy_Look()

mob/proc/Enemy_Attack(mob/M)
var/dodamage = src.Str-M.Def
var/dondamage = dodamage/M.Agl
var/donedamage = dondamage+src.Spd
var/damagedone = donedamage-M.armor
var/Defloss = M.Def/5
var/Aglloss = M.Agl/5
var/Defadd = M.MaxDef/60
var/Agladd = M.MaxAgl/60
var/HPadd = M.MaxHP/150
M.Def -= Defloss
if(M.Def<=1){M.Def = 1}
M.MaxDef += Defadd
M.Agl -= Aglloss
M.MaxAgl += Agladd
M.MaxHP += HPadd
if(M.safe == 1){return}
else if(usr.attacking == 1){return}
else if(damagedone <= 0){usr.attacking = 1; M.HP -= 1; M<<"[usr.char_name] hit you for 1 damage."; spawn(20); usr.attacking = 0}
else
usr.attacking = 1
M.HP -= donedamage
M<<"<font color=maroon>[usr.char_name] hit you for <font color=red>[round(damagedone)]<font color=green> damage."
sleep(20)
usr.attacking = 0
if(M.HP<=1)
M.death=src.char_name
M.Death()
world<<"<font color=maroon>Player Info: <font color=red>[M.char_name] has been slain by [usr.char_name]."
M.yen = 0
M<<"<font color=maroon>Client Info: <font color=red>You have lost all your yen."

mob/Evil
Greed
icon = 'Mobs.dmi'
icon_state = "bomb"
New()
.=..()
spawn(1)
Enemy_Look()
Bump(mob/M)
if(M.client){Enemy_Attack(M)}


I'm not realy sure why, but the enemies won't move or attack.

Aight just try this... it may not be the best coding but I imported it into my game (the moving and attacking but I just made my attack proc a message that said "die" XD but it should still call the attack proc.. Also for the Enemy_look() I used tabs.. I hate spaces XD but it shouldnt mess ya up anyway here it is:

mob/proc/Enemy_Look()
while(usr)
var/attack = 0
for(var/mob/M in oview(5))
attack++
if(attack)
for(var/mob/M in oview(5))
if(M.client)
step_towards(src,M)
break
else
sleep(15)
step_rand(src)
break
else
sleep(15)
step_rand(src)
sleep(2)

mob/proc/Enemy_Attack(mob/M)
var/dodamage = src.Str-M.Def
var/dondamage = dodamage/M.Agl
var/donedamage = dondamage+src.Spd
var/damagedone = donedamage-M.armor
var/Defloss = M.Def/5
var/Aglloss = M.Agl/5
var/Defadd = M.MaxDef/60
var/Agladd = M.MaxAgl/60
var/HPadd = M.MaxHP/150
M.Def -= Defloss
if(M.Def<=1){M.Def = 1}
M.MaxDef += Defadd
M.Agl -= Aglloss
M.MaxAgl += Agladd
M.MaxHP += HPadd
if(M.safe == 1){return}
else if(usr.attacking == 1){return}
else if(damagedone <= 0){usr.attacking = 1; M.HP -= 1; M<<"[usr.char_name] hit you for 1 damage."; spawn(20); usr.attacking = 0}
else
usr.attacking = 1
M.HP -= donedamage
M<<"<font color=maroon>[usr.char_name] hit you for <font color=red>[round(damagedone)]<font color=green> damage."
sleep(20)
usr.attacking = 0
if(M.HP<=1)
M.death=src.char_name
M.Death()
world<<"<font color=maroon>Player Info: <font color=red>[M.char_name] has been slain by [usr.char_name]."
M.yen = 0
M<<"<font color=maroon>Client Info: <font color=red>You have lost all your yen."
mob/Evil
Greed
icon = 'Mobs.dmi'
icon_state = "bomb"
New()
.=..()
spawn(1)
Enemy_Look()
Bump(mob/M)
if(M.client){Enemy_Attack(M)}