//This was created by Randall Lee Overbey II On 9/17/2010
mob
var
HP = 10
GP = 0
Loot = 0 // Does the mob have anything ?
AT = 0 // Mob's attitude not used currently
icon = 'Person.dmi'
bug
icon = 'Bug.dmi'
HP = 6
AT = 1
proc
brain()
for()
if(AT == 0)
if(HP >= 0 )
var
YOR = rand(0,1)// does it move this time ?
if(YOR == 1)
var/SEP = rand(70,110)
Move()
.=..()
step_rand(src)
sleep(SEP)
else return 0
if(AT == 1)
for()
if(HP >= 0)
if(src in oview(1))
var/DMG = rand(0,2)
usr.HP -= DMG
world << "[src] did [DMG] to you!"
sleep(20)
else
var/SEP = rand(30,60)
Move()
.=..()
step_towards(src,usr)
sleep(SEP)
else return 0
New()
brain()
..()
Login()
world << "[usr] : Loged in"
icon_state = gender
..()
proc
DeathCheck()
if(HP <= 0)
oview() << "[src] falls in combat..."
usr << "[src] dies!"
src.Loot = rand(0,1)
verb
attack(mob/M as mob in oview(1))
if(M.HP <= 0)
usr << "[M] is dead, so you can't do that."
else
if(M.AT == 0)
M.AT = 1
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/Damage = rand(2,8)
oview() << "[usr] did [Damage] damage to [M]!"
usr << "You did [Damage] damage!"
M.HP -= Damage
M.DeathCheck()
bury(mob/M as mob in oview(1))
if(M.HP <= 0)
del(M)
else
usr << "You can't do that"
loot(mob/M as mob in oview(1))
if(M.HP <= 0)
if(M.Loot == 0)
var/RM = rand(1,5)
usr.GP += RM
usr << "You recived [RM] gold!"
oview() << "[usr] took [RM] gold!"
M.Loot = 1
else
usr << "[M] has nothing"
else
usr << "Try killing [M] first"
Checkfunds()
usr << " You have [GP] GP!"
say(msg as text)
world << "[usr] : [msg]"
turf
Grass
icon = 'Grass.dmi'
world
turf = /turf/Grass
Problem description:
Okay I have a couple of bugs on the map they move. I kill them they stop moving. Everything is fine. But if I attack them and don't kill them they stop moving. When I attack with my character it should change the AT to 1 Which should make my bugs run after my character and attack him. This doesn't happen. I'm at a loss here.