- Included in Very Vanilla
-
Included! No need to download.
- Server Type
- Live, Test Server
Plugin that does pretty much what the name says, connects MQ2 to discord. Chat messages that match a filter get sent to a Discord channel, and any commands you enter in that channel get executed:
Please consider it a beta release, may crash, etc. It's running stable for me though, and I'm keen to get other people's thoughts on it!
Setup
Filters
A line of chat will be sent to discord if it matches an allow filter, and doesn't match any block filters. Macro event syntax is used, so you can have wildcards (#*#) or variables (|${Var}| in them. For example to allow anything containing your character's name:
By default, anything starting with [MQ2] or [MQ2Discord] will be allowed.
Configuration is stored in the MQ2 directory, in MQ2Discord_server_character.json, if you want to edit it manually. You'll have to unload/load the plugin for it to take effect.
Compiling
Virus check for compiled zip: https://www.virustotal.com/#/file/5...b4265e7a9e090ddd3551260bef8753c6ad9/detection
Otherwise you're welcome to have a go at compiling, it's painful. You'll need sleepy discord, with the patch applied to add a poll method. Also nlohmann json (I installed with vcpkg).
Sample .json setting
The setting files will be created in your Release folder MQ2Discord_Server_Toonname.json
Todo
Please consider it a beta release, may crash, etc. It's running stable for me though, and I'm keen to get other people's thoughts on it!
Setup
- Setup
- Create a server & channel(s) from the Discord client
- Create a Discord bot & add it to your server, per the guide here: https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
Put MQ2Discord.dll in your plugins directoryNow included with redguides updaterPut LIBEAY32.dll & SSLEAY32.dll in the same directory as eqgame.exe (these are dependencies of the Discord library I'm using & get loaded from the path of the main exe, not the MQ2 directory. I'll see if I'm able to statically link soon, but for now you're stuck with DLLs)- In game, load the plugin with
- Enter your the token for your bot (see linked guide earlier) with
Rich (BB code):
/discord token <token>
- Enable developer mode in the discord app (settings -> appearance, scroll down)
- Enter your user id (right click your username in discord, copy id) with
Rich (BB code):
/discord user <user id>
- Since the token & user id are the same for all characters, you can do it with EQBC e.g.
Rich (BB code):
/bcaa //discord token <token>
- Enter the channel id to send messages to from this character (right click channel in discord, copy id) with
Rich (BB code):
/discord channel <channel id>
- Connect with
Rich (BB code):
/discord connect
Filters
A line of chat will be sent to discord if it matches an allow filter, and doesn't match any block filters. Macro event syntax is used, so you can have wildcards (#*#) or variables (|${Var}| in them. For example to allow anything containing your character's name:
Rich (BB code):
/discord allow #*#|${Me}|#*#
Configuration is stored in the MQ2 directory, in MQ2Discord_server_character.json, if you want to edit it manually. You'll have to unload/load the plugin for it to take effect.
Compiling
Virus check for compiled zip: https://www.virustotal.com/#/file/5...b4265e7a9e090ddd3551260bef8753c6ad9/detection
Otherwise you're welcome to have a go at compiling, it's painful. You'll need sleepy discord, with the patch applied to add a poll method. Also nlohmann json (I installed with vcpkg).
Sample .json setting
The setting files will be created in your Release folder MQ2Discord_Server_Toonname.json
Code:
{
"allow": [
"[MQ2Discord]#*#",
"#*#tells you,#*#",
"#*#sent a tell#*#",
"#*#out of character#*#",
"#*#shouts,#*#",
"#*#says,#*#",
"#*#tells general#*#"
],
"autoconnect": true,
"block": [
"#*#tells you, 'Attacking#*#",
"#*#warder says,#*#",
"#*#pet says,#*#",
"#*#warder tells you,#*#",
"#*#pet tells you,#*#",
"#*#You will not evade me,#*#",
"#*#Sorry, Master... calming down#*#"
],
"channel": "1234567890",
"token": "1234567890",
"user": "1234567890"
}
- Source code needs tidying up, I'm sure there's some bugs in there from my hack job multithreading among other things. I wasn't going to release it just yet but I realized there's probably some concerns around a plugin that connects externally :/
- Better default filters - send all chat channels, tells, ooc, say etc
- Escape discord's special characters e.g. *
- Convert item links to allakhazam links
- I could add regex filters if there's any interest, though Blech seems quite well designed for a large number of filters