Skip to content

Commit

Permalink
script to add colored dividers between chat messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoskins committed May 28, 2017
1 parent b7c86ab commit 92bb344
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ColoredChatDividers/1.0/coloredChatDividers.js
@@ -0,0 +1,12 @@
/* Colored Chat Dividers
** This script makes colored dividers in chat, to differentiate between players. The diviers are colored the same as the color chosen by the player whose message precedes the divider.
** There are no options in the script, only include / don't include
** Version 1.0, last updated 5/27/2017
*/
on("chat:message", function(msg) {
var pid = msg.playerid;
var player = getObj("player", pid);
try{
sendChat(msg.who, '<div style="color: ' + player.get('color') + '; background-color:' + player.get('color') + ';">Divider</div>');
}catch(e){}
});
13 changes: 13 additions & 0 deletions ColoredChatDividers/script.json
@@ -0,0 +1,13 @@
{
"name": "Colored Chat Dividers",
"script": "coloredChatDividers.js",
"version": "1.0",
"previousversions": [],
"description": "This script creates a divider between chat messages, which are the color of the player whose message precedes the divider. This helps differentiate between players in long or busy chat exchanges.",
"authors": "William H.",
"roll20userid": "432281",
"useroptions": [],
"dependencies": [],
"modifies": {},
"conflicts": []
}

0 comments on commit 92bb344

Please sign in to comment.