Chat going wrong way

Aussie3236

New member
Apr 8, 2021
6
2
0
51
Hello All,
I have a quick question if anyone has an idea that they would like to share. Yesterday i had discord working: Game --> Discord
Today it seems to be reversed Discord --> Game. What i am talking about is general chat. General chat in the discord chanel is being sent to the game and the game is not forwarding it's chat to the Discord Chanel. I think i have disabled all the scripts but im pulling my hair out as to why it's reversed.
For public, Friends & party chat forwarding are all enabled with their respective scripts: .DSAY:[Friends]<{player_name}>{player_chat}

{
"ID": "147",
"Type": "Player Public Chat",
"Name": "Game Chat to Discord",
"Enabled": "1",
"Script": ".DSAY:[Public]<{player_name}>{player_chat}",
"Description": "",
"Parameters": "",
"Source": "User",
"OrderBy": "1",
"InitiatedBy": null,
"IsAdvancedScript": false,
"CallBackName": null,
"IsServerEvent": true
}

The following Scripts are both Disabled as i assume it would create a loop. Im not a script writer or programmer. They were enabled by me. Perhaps by mistake and a few grogs.
{
"ID": "143",
"Type": "Discord Public Chat",
"Name": "Discord Chat To Game - XXXXX",
"Enabled": "0",
"Script": "say \"[00A700][{discord_author}]: {discord_content}\"\r\n",
"Description": "DO NOT ENABLE. Could be issue with game chat not going to discord",
"Parameters": "STARTSWITH:.",
"Source": "User",
"OrderBy": "1",
"InitiatedBy": null,
"IsAdvancedScript": false,
"CallBackName": null,
"IsServerEvent": true
}
{
"ID": "60",
"Type": "Discord Public Chat",
"Name": "Echo all chat to game",
"Enabled": "0",
"Script": "say \"[{discord_author}]: {discord_content}\"\r\n.CHATW:[{discord_author}]: {discord_content}",
"Description": "",
"Parameters": "",
"Source": "RAT",
"OrderBy": "9999",
"InitiatedBy": null,
"IsAdvancedScript": false,
"CallBackName": null,
"IsServerEvent": true
}
I don't think there is a problem with the bot as i can issue commands like /who from discord and the info is displayed so the DB is being queried. Chat from game to Discord is not working thought. The RAT Console log is show the chat from the game.
2021-04-11 15:50:22ServerXXXX Has Arrived Type /help for commands.
2021-04-11 15:50:51XXXXXXhello from game
2021-04-11 15:51:09XXXXXXhello from game via friends
2021-04-11 15:51:44XXXXXXhello
2021-04-11 15:52:15XXXXXX/TELE BASE
2021-04-11 15:52:38XXXXXXtele base
2021-04-11 15:52:40XXXXXXanswer the party mate
2021-04-11 15:52:53XXXXXX/tele base
2021-04-11 15:53:03XXXXXXhello from party
 
Offhand, I don't see anything wrong with what you have pasted. One thing, you don't have to worry about a loop, RAT knows "itself" and doesn't respond to its own events, etc.

Please send me your database file, located at %appdata%\nomadsoft\7d2d_rat.db

Please be aware that this file does contain any game server passwords, etc.

If you're ok with that, please email me the file to trekkan@gmail.com and I'll check it out. I want to look at all of the events, etc.. as there's no way that the chat can flow to Discord (or to the game from Discord) without events being enabled or otherwise an event setup that is doing it.
 
Fixed it last night. I somehow remove the Variable pointing to the Discord Chat group that i wanted the output of the game chat to goto. Thanks so much for looking into it for me.
 
  • Like
Reactions: Trekkan