Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script to add colored dividers between chat messages
- Loading branch information
Hoskins
committed
May 28, 2017
1 parent
b7c86ab
commit 92bb344
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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){} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": [] | ||
} |