mob/monster
Bear
icon = 'monsters123.dmi'
icon_state="Bear"
gold = 38
HP = 52
MHP = 52
player = 0
attack = 9
Expg = 12
level = 19
monster = 1
PK = 1
NPC = 0
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/You/P)
while(src)
if(P in oview(1))
step_towards(src,P)
for(P in oview(1))
break
for(P in oview(1))
break
for(P in oview(1))
break
for(P in oview(1))
break
else
step_rand(src)
sleep(5)
for(P in oview(1))
break
sleep(5)
spawn(5)
Wander()
Bump(mob/M)
if(M.player == 1)
Fight(M)
else
return
proc/Fight()
for(var/mob/E in get_step(usr,usr.dir))
var/damage = src.attack
E.HP -= damage
E << "[src] attacks you for [damage] damage!!"
src<<"You attack [E] for [damage] damage!!"
UserDcheck(E)
Problem description: In mny game i have it so the monsters wander around. Can anyone fix this code so they don't move unless you attack them?