The developers of this botting program would then expose their own API and scripting language that would allow other developers to interact with the game through their program. The could then write scripts such as: Go to this location via map coordinates, pick up some object, solve a puzzle, fight some boss, eat when below a certain health, etc.
Note: I used to run a VPS company that would specifically cater to those that were botting in Runescape; this allowed them to run their bots 24/7 without using their own hardware.