Script Scheduler - Workinq/Alt-Logging GitHub Wiki

Do I really have to access each screen individually to perform commands??? No! ORelio's Console Client has a very cool feature called Script Scheduler which you can use to send messages and/or commands with ease! This is a feature which many people don't understand how to setup however, by the end of this tutorial you should be able to set it up with no problem.

To start off we need to edit the main configuration file, MinecraftClient.ini. If you don't know how to edit this file then click here to see how to (this page isn't an actual tutorial but contains a segment showing how to edit the file).

The section we will be editing is the following:

...
[ScriptScheduler]
enabled=false
tasksfile=tasks.ini
...

and all you're going to have to do is change the enabled variable to true, the final version will look like this:

...
[ScriptScheduler]
enabled=true
tasksfile=tasks.ini
...

Now you need to create a new file called tasks.ini, this file will be where you will register all of the commands that you want to execute and how they will be triggered.

These are the following triggers which you can use to execute commands:

  • triggerOnFirstLogin - when the account logs on to the server for the first time, a task will be executed.
  • triggerOnLogin - when an account logs on to the server, a task will be executed.
  • triggerOnTime - when the server running the alts reaches a certain time (e.g. 6:30 PM), a task will be executed.
  • triggerOnInterval - a task will be executed every X seconds.

This is the format you need to follow when creating tasks:

[Task]
trigger=true
script=my-script.txt

The trigger variable needs to be set to one of the ones in the bullet pointed list above, do not call this trigger as it's not a valid trigger.

The script variable should be where the text file containing all the commands is located. Make sure it exists or the task won't work.

The following are examples for tasks, I will be showing an example or every trigger in the above bullet pointed list:

Task which is triggered on first login:

[Task]
triggerOnFirstLogin=true
script=commands.txt

Task which is triggered on login:

[Task]
triggerOnLogin=true
script=commands.txt

Task which is triggered on time (this will trigger at midnight, hence the 00:00 time value):

[Task]
triggerOnTime=true
timeValue=00:00
script=commands.txt

Task which is triggered on interval (this will trigger every 30 seconds):

[Task]
triggerOnInterval=true
timeInterval=30
script=commands.txt

Now that you know how to trigger the scripts, you need to create the actual script file. In my case I've called it commands.txt throughout all of the above examples. You can create the script file however you like, just make sure that it is in the same directory as the alt logging script.

The commands.txt script is very similar, all you need to do is enter a valid command. A list of all commands can be found here or below:

- quit or exit: disconnect from the server and close the application
- reco [account] : disconnect and reconnect to the server
- connect <server> [account] : go to the given server and resume the script
- script <script name> : run a script containing a list of commands
- send <text> : send a message or a command to the server
- respawn : Use this to respawn if you are dead (like clicking "respawn" ingame)
- log <text> : display some text in the console (useful for scripts)
- list : list players logged in to the server (uses tab list info sent by server)
- set varname=value : set a value which can be used as %varname% in further commands
- wait <time> : wait X ticks (10 ticks = ~1 second. Only for scripts)
- move : used for moving when terrain and movements feature is enabled
- look : used for looking at direction when terrain and movements is enabled
- debug : toggle debug messages, useful for chatbot developers
- help : show command help. Tip: Use "/send /help" for server help

This is an example of what you would have in the commands.txt file:

send /home base
wait 5
send I've tped to the base

These script files are all about experimenting! Don't go asking around how to do something, experiment and try out different things! And if you really become stuck and don't know how to do something, that's when you ask. Please take in mind that this console client isn't super advanced so you can't perform actions such as swinging your sword or making the alts follow you. However, there is lots of potential on what could be done with it so go out and try out different commands offered to you by the console client.

⚠️ **GitHub.com Fallback** ⚠️