Global


0201 Label 01
03 Yield
30fd11 If $self is killed then goto 11
2f06 If actor has stopped moving then goto 06
0101 Go to first 01
0206 Label 06
3207 If Bond is in sight then goto 07
3e0d If actor has seen Bond or been shot in the last 10 seconds then goto 0d
3f0e If actor heard Bond in the last 10 seconds then goto 0e
4610 If a bullet just missed us then goto 10
3a0d If Bond shot another actor then goto 0d
3b0d If an actor is killed in sight of this actor then goto 0d
0b03 If actor is not doing anything then goto 03
33 Call RNG
350103 If random byte > 1 then goto 03
060002 Set return function to function 0002 - General guard
05fd0003 Assign function 0003 - Do idle animation to $self and advance frame
0203 Label 03
0101 Go to first 01
0210 Label 10
33 Call RNG
357f07 If random byte > 127 then goto 07
060002 Set return function to function 0002 - General guard
05fd000a Assign function 000a - Look around then jog to Bond to $self and advance frame
0207 Label 07
060002 Set return function to function 0002 - General guard
05fd0006 Assign function 0006 - Take a shot to $self and advance frame
020d Label 0d
060002 Set return function to function 0002 - General guard
05fd0008 Assign function 0008 - Jog to Bond and attack if seen to $self and advance frame
020e Label 0e
060002 Set return function to function 0002 - General guard
05fd000b Assign function 000b - Alerted cloneable guard to $self and advance frame
0211 Label 11
05fd0001 Assign function 0001 - Idle to $self and advance frame
04 End of function

Comments

Wait until not moving
If Bond is in sight, assign 0006 (take a shot)
If shot, assign 0008 (jog to Bond)
If heard Bond, assign 000b (alerted cloneable guard)
If a shot has been fired nearby, randomly assign 000a (look around then jog to Bond) or 0006 (take a shot)
If another guard killed in sight, assign 0008 (jog to Bond)
If not busy, 1 in 255 chance of 0003 (do idle animation)