Tele-Arena Follow Script. For automating the playing of more than one character at a time.
Install bazel
To build a deployable jar, run bazel build //java/com/jeffreys/scripts/tafollow:TAFollow_deploy.jar
To execute tests, run bazel test ...
java -jar TAFollow.jar --config=<file with text proto of scripts.tafollow.Configuration>
You can also run out of the repo directory, bazel run //java/com/jeffreys/scripts/tafollow:TAFollow -- --config=<file with text proto>
But you're connected to a BBS playing TA, so you need to execute this in the context of my other program - TelnetScripter
Use TelnetScripter, connect to your system, and then execute the script by writing a wrapper script
#!/bin/sh
java -jar TAFollow.jar configuration.textproto
You can kill the script process in your OS. You cannot stop it via special text commands.
For maximum cross platform support. You can run this on Windows, Linux, Raspberry Pi, etc.
Once the script is running, either whisper or group chat to your followers to signal a command. There are
several built-in commands which I'll detail below. Anything not a command will just be sent verbatim, e.g. if you
whisper /character do this
, they'll execute do this
- Attacking
- Define
number_of_physical_attacks
, commanda <target>
- Define
- Attacking with a single spell
- Define
attack_spell
, commandas <target>
- Define
- Attacking with an area spell
- Define
group_spell
, commandag <target>
- Define
- Healing a target
- Define
heal_spell
, commandheal <target>
- Define
- Healing your group
- Define
group_heal_spell
, commandhealg
- Define
- Logging off
- In the case of script failure, rather than just exiting quietly, you can define a
logoff_command
to execute to safely exit your character
- In the case of script failure, rather than just exiting quietly, you can define a
- Logging data
- Define
log_file
and all script output will be written to this file for later analysis/debugging
- Define
- Triggers
- A powerful regex trigger based system lets you match inputs and autogenerate outputs. See the example below to see how to use this feature
See the text proto definition for the list of available fields.
Here's an example:
owner: "Par-Salian"
owner: "Paladine"
owner: "Fistandantilus"
owner: "Justarius"
number_of_physical_attacks: 6
log_file: "/tmp/tasslehoff.log"
idle_command: "\r\n"
idle_command_wait_milliseconds: 10000
triggers: {
expected_color: CYAN
trigger_regex: ".*You found (\\d+) gold crowns while searching the.*"
command: "sh $1"
}
triggers: {
expected_color: ANY
trigger_regex: ".*Mana: (\\d+) \\/ (\\d+).*"
command: "Mana: [$1 / $2]"
}
triggers: {
expected_color: ANY
trigger_regex: ".*Vitality: (\\d+) \\/ (\\d+).*"
command: "Vitality: [$1 / $2]"
}
triggers: {
expected_color: ANY
trigger_regex: ".*Status: (.*).*"
command: "Status: [$1]"
}
triggers: {
expected_color: ANY
trigger_regex: ".*Level: (\\d+).*"
command: "Level: [$1]"
}
triggers: {
expected_color: ANY
trigger_regex: ".*Experience: (\\d+).*"
command: "Exp: [$1]"
}
triggers: {
expected_color: ANY
trigger_regex: ".*You are no longer a member of .* group.*"
command: "=x\r\n"
}
triggers: {
expected_color: ANY
trigger_regex: ".*has just disbanded the group!.*"
command: "=x\r\n"
}