ID:174693
 
I put my monster in and set it to move. After I kill it, though, it stops moving. I also want it to attack. What would I need to change in my code? Here it is:

mob
Chicken
icon = 'chicken.dmi'
hp = 5
str = 5
def = 2
New()
while(src.hp>0)
step_rand(src)
sleep(5)
mob
proc
deathcheck()
if(src.hp <= 0)
world << "[src] has been killed by [usr]!"
src.icon_state = "dead"
usr.sxp += 10
usr.dxp += 10
usr:levelcheck()
sleep(100)
src.icon_state = ""
src.hp = 5

Thanks a bunch!
have you tried looking at any tutorials like rpgstarter 1/2?
they show how to make monsters attack if i remember correctly
In response to Lazyboy
O_o

That guide was uber. I almost entirely changed my code. Thank you so much.

edit: Correction, I entirely changed my code. I whiped it blank and started from scratch. Now it will be a lot better, though.
In response to Monkiesmania
You know what, you can just forget the entire while part. Just do this..
mob
Chicken
icon = 'chicken.dmi'
hp = 5
str = 5
def = 2
New()
step_rand(src,5)