Hubot Teeworlds Adapter
Connects Hubot to your Teeworlds game server.
Getting started
- Configure Teeworlds external console. See Teeworlds configuration section.
- Install adapter:
$ npm install --save hubot-teeworlds
. - Set the environment variables specified in Hubot configuration section.
- Run Hubot:
$ bin/hubot -a teeworlds
.
Teeworlds configuration
Add the following lines to Teeworlds server config:
ec_port 8303
ec_password secret
ec_output_level 2
Restart server and test connection using telnet or ncat: $ telnet localhost 8303
.
Hubot configuration
The adapter requires only HUBOT_TW_SERVERS
environment variable — comma separated list of Teeworlds servers. Server list should be in the following format: hostname:port:password,...
. Example: localhost:8303:secret,localhost:8304:secret
.
Specifying of one server also supported.
Teeworlds specific events
This adapter also generates messages when someone picks a weapon or kills another player. You can handle such messages this way:
require 'hubot-teeworlds' require 'hubot-teeworlds' = = msg instanceof PickupMessage and msgweapon instanceof KatanaWeapon = msg instanceof KillMessage and msgweapon instanceof HammerWeapon robotlisten isKatanaPickup msgsend 'Katana!' robotlisten isHammerKill msgsend 'Today is Thor\'s day'
Note: ec_output_level 2
required for this functionality.
License
MIT © Black Roland