Spawning (insert your own coordinates in place of 0.0):
  void main()
 {
 CreateObject(OBJECT_TYPE_CREATURE, "
http://lucasforums.com/showthread.php?t=143536"), Location(Vector(0.0,0.0,0.0), 0.0));
 } 
 Making NPCs hostile: 
 void main() 
 {
 ChangeToStandardFaction(GetObjectByTag ("use the"), 1);
 ChangeToStandardFaction(GetObjectByTag ("search function"), 1);
 }