This is the code I use to run my bots in AdventureLand. I use an NPM package I also made called ALClient.
Take a look, feel free to modify it to suit your own needs, or for inspiration.
If you want to contribute to ALClient development, please do!
There's also a folder called vanilla_scripts
. Those scripts are meant to be run in the main game, do not attempt to run them with ALClient.