it idles sometimes but not all the time, after that rpm is at 750-800...is this the main relay???

i also put a relay out of my civic..i drove for awhile and die like before...can it be something else???