The full code for the dog is this:
Spoiler
action A_DOG_WAIT 1840 1 5 1 1 action A_DOG_MOVE 1840 4 5 1 10 action A_DOG_CHEW 1860 3 1 1 20 action A_DOG_HIT 1865 1 1 1 20 action A_DOG_DYING 1865 4 1 1 40 action A_DOG_DEAD 1868 1 1 1 1 move DOG_WALK_SPEED 80 move DOG_ATTACK_SPEED 150 move DOG_BACKWARDS -64 move DOG_STOPPED ai AI_DOG_WAIT A_DOG_WAIT DOG_STOPPED faceplayer ai AI_DOG_DYING A_DOG_DYING DOG_STOPPED faceplayer ai AI_DOG_DEAD A_DOG_DEAD DOG_STOPPED faceplayer ai AI_DOG_HIT A_DOG_HIT DOG_STOPPED faceplayer ai AI_DOG_SEARCH A_DOG_MOVE DOG_ATTACK_SPEED seekplayer ai AI_DOG_CHEW A_DOG_CHEW DOG_STOPPED faceplayer state dog_hit ifcansee { ifcount 10 { ifdead { ifwasweapon RADIUSEXPLOSION { sound SQUISHED guts JIBS2 1 guts JIBS3 2 guts JIBS4 3 guts JIBS5 2 guts JIBS6 3 addkills 1 killit break } ifwasweapon RPG { sound SQUISHED guts JIBS2 1 guts JIBS3 2 guts JIBS4 3 guts JIBS5 2 guts JIBS6 3 addkills 1 killit break } sound DRON_DYING resetcount ai AI_DOG_DYING } else { ai AI_DOG_SEARCH } } } ends state dog_dying ifcansee { ifcount 40 { cstat 256 spawn BLOODPOOL addkills 1 ai AI_DOG_DEAD } } ends state dog_dead ifcansee { ifwasweapon RADIUSEXPLOSION { } else { ifwasweapon RPG { } else { break } } sound SQUISHED guts JIBS2 1 guts JIBS3 2 guts JIBS4 3 guts JIBS5 2 guts JIBS6 3 killit } ends state dog_search ifcansee { ifhitweapon { state random_wall_jibs sound DRON_PAIN resetcount ai AI_DOG_HIT } else { ifpdistl 800 { ifcanseetarget { ai AI_DOG_CHEW } } else { ifrnd 8 sound DRON_ROAM } } } ends state dog_start ifcount 0 { fall cstat 33025 } sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 sizeto 15 15 ifcount 2 { cstat 257 ai AI_DOG_SEARCH } ends state dog_chewing ifcansee { ifhitweapon { state random_wall_jibs sound DRON_PAIN resetcount ai AI_DOG_HIT } else { ifp palive { ifpdistl 900 { ifcanseetarget { ifcount 20 { resetcount ifrnd 128 cstat 257 else cstat 261 addphealth -2 sound DRON_ATTACK1 } } } else { cstat 257 ai AI_DOG_SEARCH } } else { cstat 257 ai AI_DOG_SEARCH } } } ends actor DRONE DOG_STRENGTH ifai 0 state dog_start else ifai AI_DOG_SEARCH state dog_search else ifai AI_DOG_CHEW state dog_chewing else ifai AI_DOG_HIT state dog_hit else ifai AI_DOG_DYING state dog_dying else ifai AI_DOG_DEAD state dog_dead enda
I guess something gives with the dog_start part, but I am not sure.