More changes.

- Spiders targetting.
- Attacking ai added.
- Ranging ai fixes.
- Extended api.