Sup guys.
For those of you who wants to write scripts for tasks automatization w/o recompiling or wants to have a simple way to write scripts (even if you don't know much about programming at all), I'd like to present the modified Amber client with JS scripting API.
All you need to do is download the client (or build it from sources if you wish) and place the script named "script.js" inside the root directory of the client's folder.
How does it look like?
To get the idea, you can take a look at the example script in my Scrifen repository on GitHub.
As you see, the client calls functions in your script when certain events occurs (including but not limited to `onLogin`, `onCharSelect`, `onGameLoaded`, `onCurioFound` etc).
You can also communicate with the client via the `game` object passed to the `onGameLoaded` hook (including but not limited to `studyCurio`, `getInvItems`, `goTo`, `transferItemsFrom`, `drink` etc).
How much this API can do?
Again, take a look at the example here. There are a lot of comments, incl. documentation (you can also view the generated JSDocs at http://80.220.243.128/Scrifen-JSDocs/ -- thanks to shubla).
For example, you can write a forager bot, drying frames / tanning tubs checker bot etc.
I need to do XXX, please add YYY function to your API
Feel free to write me about any ideas you have (either in this thread or PM).
There are a lot of custom solutions like this. My village has one, for example
Yep, I know. However, my solution is free, open-source, scriptable (you don't have to recompile the client to make a new script work) and easy-modifiable even for those who doesn't know much about programming and client's source code.
Moreover, what's wrong with having an additional option?
Client download link
Client's source code is available here ("feature/script-api" branch)