I am on a freshly installed PC, but let ma inspire you with MS-Paint:
To get you through the steps:
Orange is the highway or we could call it transportation mode. You use that to tell your bot how to get across the zone. That is often done by walking and dodging sticky stuff.
In this example you would select a point on the orange line and there switch to coordinate based movement. Keep in mind I have no clue if the ToS bots are doing it like that yet. It is just how it usually goes.
Coordinate based movement, because you gotta poke around for questmobs and stuff like that. Technically it is way more complicated and I couldnt write that stuff myself, but from what I understood there are two ways. One segments the map automatically and creates waypoints on its own, the other is checking if “movement” leads to a change in coordinates. If you cant go to the left, bot tries to go left nothing will change so another direction is chosen.
If the quest for example is kill 10 mobs, then it hangs around in combat mode until it has done that. Afterwards it returns to the highway (or gives the quest back).
Now you think other quests can become more complicated, but bots are highly sophisticated - they have all the game data availible to them. How much HP% does your target have, how many targets there are, how many targets you are engaged with, how far they are. If you need to use a questitem on mob X at 20% HP, then you would disallow high dmg nukes, on mob X (depends on the quest) and keep hitting him gently until <20% is reached then quested. If interaction is needed you can move to that waypoint straight and interact.
Afterwards you let him go back to the highway to the next quest/npc etc. You do that zone for zone until you have something that savely levels your bot from 1-WhatYouDesire and don’t share it. Or sell it and make tons of cash.
To answer your comprehensive quest bot: Does Archage count? 
Archage had a free one from 1-30 including all quests IIRC. Don’t nail me on the level though I just plugged that one in and tested it. Got stuck twice during the whole process and was created by a single user (the plugin - not the bot).
I am confident though that sophisticated bots alread exist, but you have to understand those are businesses that have them. They don’t share it. Chances are high you have encountered bots and not recognized them.
Edit: I should mention that objects often have a place and therefor the bot can go there. So if it is pick plants you go to the coordinate. If it is an item a mob might drop… well that item lands in your inventory and is therefor countable by the bot. If not you let the bot do it until the quest-step changes. Millions of ways.