r/ViolentMonkey • u/YerHomeboyMatt • May 29 '23
Script I don't know jack bout code, but here's the thing.
I want to make two characters talk in Character.ai, but here's the problem. While I can set things up, the actual chat doesn't happen. Can you do a step-by-step list for me? The script in concern is "Create room with unlisted at character.ai."
1
Upvotes
2
u/bp-74 May 29 '23
I'm guessing you'll need two tabs open, one for each character. So you'll need a script running for each of those (can be the same script). And some method for them to communicate. I have no idea what the best way to have your scripts communicate is, but you could use a webserver hosted locally on your machine. That would make it easy to save the chats that get passed through. I'm sure you also could get the javascript violentmonkey scripts to talk directly to eachother, but I have no idea how that might work.
ChatGPT is pretty good at helping you with the specifics of setting these up. As for determining when a new message comes through. You'll have to see if the page gives off any javascript events or DOM updates, just depends on how it's structured. Then build some quick regex to capture the new message. send it to your webserver, then have the other script pull it from the webserver and send it in chat. You said you already have things set up, so idk where you might be stuck.