Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script,Update] MotD -- Message of the Day sent to players when they log in, based on the contents of a note.

1521338741

Edited 1521340585
The Aaron
Pro
API Scripter
MotD Update v0.2.7 &nbsp;-- Fixed typo crash. (Thanks&nbsp; bgb ) Update v0.2.6 -- Changed to tracking the last login time of players and only issuing the Message of the Day when it has been as least 6 hours since they were last seen.&nbsp; Also fixes the outstanding issue of the first player to login not getting the message.&nbsp; (Thanks Sarah C. ) MotD is a simple script that&nbsp;creates a handout named "MotD Note". When a player logs in, it whispers the contents of that note to the player. Any formatting that works in the Note is passed on to the player. You can use %%NAME%% as a placeholder for the name of the player. There aren't any commands for this script, it is completely automated.&nbsp; Just edit the MotD Note and enjoy! Git:&nbsp;&nbsp; <a href="https://github.com/shdwjk/Roll20API/blob/master/Mo" rel="nofollow">https://github.com/shdwjk/Roll20API/blob/master/Mo</a>... Previous discussion:&nbsp; <a href="https://app.roll20.net/forum/post/1460717/script-m" rel="nofollow">https://app.roll20.net/forum/post/1460717/script-m</a>... Support my work on If you use my scripts, want to contribute, and have the spare bucks to do so , go right ahead. However, please don't feel like you must contribute just to use them! I'd much rather have happy Roll20 users armed with my scripts than people not using them out of some sense of shame. Use them and be happy, completely guilt-free! Disclaimer: This Patreon campaign is not affiliated with Roll20; as such, contributions are voluntary and Roll20 cannot provide support or refunds for contributions.
1521339805
Gold
Forum Champion
I use "Message of the Day" in all my games, one of the first steps is to install this API Script. I'll try the update version soon. I'm on your Patreon too, btw, for supporting/encouraging this work in small monthly donations. Will you be putting this one on 1-Click? Thanks again. Gold
1521340623
The Aaron
Pro
API Scripter
I suppose I need to do that... =D
1521357887
GiGs
Pro
Sheet Author
API Scripter
This looks nifty. Can people who use it post examples of things they use it for?
G G said: This looks nifty. Can people who use it post examples of things they use it for? It is a handy script: It is a quick way to let people know of any changes made, a summary of the last game, etc.&nbsp;
1521368846
GiGs
Pro
Sheet Author
API Scripter
Pretty cool
1521371433
GiGs
Pro
Sheet Author
API Scripter
One thing I've noticed in testing this: if you edit the message of the day, it doesnt post the new version into the chat. I'm guessing its observing the 6 hour limit, but maybe modifying the handout should override that?
1521385618
The Aaron
Pro
API Scripter
Yeah, BGB hit me up for the same thing.&nbsp; I'm trying to think what the best way to handle that is. Question.&nbsp; Right now, it does a substitution for %%NAME%% for the player getting the message.&nbsp; Are there any other substitutions you'd want?
1521391422
GiGs
Pro
Sheet Author
API Scripter
I dont think I can answer that competently. I don't know enough about how it works :) Whatever solution ensures that when the handout is altered, it gets reposted into chat. Or possibly, when you edit it, whisper a chat to the GM asking something like, "If you want to repost the message, [Click me]" and that clears the saved timestamps.
1521392337
The Aaron
Pro
API Scripter
That’s not a bad idea!
1521417461

Edited 1521417780
Gold
Forum Champion
The Aaron said: Question.&nbsp; Right now, it does a substitution for %%NAME%% for the player getting the message.&nbsp; Are there any other substitutions you'd want? I use %%NAME%% religiously on this. What other choices do we have? List of Characters (by Name) that are controlled by: this person? Number of times cumulative this person has logged-in to the game on a counter? (Attendance XP?) The Aaron, who controls Arcane Scriptomancer Level 99 and Party Torch, has launched game 42 times! How about pulling in Next Game Time and calculating "Before Game Start" vs "After Game Start Time"? Log-in time compared to currently-set "Next Game Time". (You're early vs You're late). Busted! Haha. The Aaron is early, please wait for Next Game Time in 17 minutes. I use this in conjunction with another welcome API script, which has a Goodbye/Farewell announcer. I suppose you could grift that feature over. "The Aaron has left the building"
1521419111
The Aaron
Pro
API Scripter
I could track how many times a player has been given the MotD as an approximation of attendance.&nbsp; Basically, wouldn't want to track logins directly because a bad connection could result in many login events (that's part of what this fixes). The API doesn't have access to the next game time, so that's out unless you wanted a way to manually set the game time (or a more advanced way of setting a repeating game time, but that could get out of sync if you use the scheduling outside the game). Getting a list of controlled characters is possible.&nbsp;&nbsp;
1521419463

Edited 1521419562
Gold
Forum Champion
Ok, this would be somewhat interesting/useful: Welcome The Aaron! This is your 43rd welcome message in the game so far. Uh, that is, if you can provide nice ordinals like 1st, 2nd, 3rd.&nbsp; If that's not easy then Welcome The Aaron! This is your welcome message number 43 in the game so far! The list:characters idea is... Decent, I'd test it, but I'm not sure if I would use it. Maybe not worth the effort. IDK. The problem with it is that I might have a lot of Party Torch type of characters that are set on All Players. For example a bunch of blank character sheets ready to go.&nbsp; So I don't want it to say: "The Aaron who plays Arcane Scriptomancer, Party Torch, War Dog, Template, Template, Template, and Template". So this may render the Characters idea useless.
1521419898
Gold
Forum Champion
(Sorry for double replying. New topic, new idea). Can it support a Rollable Table roll, and a... I guess you call them recursive dice roll? Welcome to the 1t[Game-Names]! Welcome to the Most Awesome Game In The World. Welcome to the Dungeon! Welcome to the Jungle! Welcome to the [[5d100]] 1t[Game-Names]! Welcome to the 307 Dalmations! Welcome to the Land of the 415 Dragons! Welcome to the Museum of the 19 Horrors! Fun.
1521419912
The Aaron
Pro
API Scripter
Right, list of characters might be a problem, particularly if you have a long running game with many different characters. Ordinals are not a problem.&nbsp; I'm not sure I'll be adding this any time soon, but we'll see... =D
1521420013
The Aaron
Pro
API Scripter
Inline rolls will be expanded as in the chat, as will references to attributes of characters.&nbsp; Recursive won't work.&nbsp; I was talking with Kirsty about possibly doing the expansion of the inline rolls ahead of time so you wouldn't get the yellow box and hover behavior, but I don't know if it's worth the trouble.
1521420277

Edited 1521420488
Gold
Forum Champion
More on gamifying, attendance reward system, XP system: Welcome The Aaron! This is visit number 43 and you've earned [[5d100]] Gold Pieces today! Your total Gold Pieces for today is +217 GP. Your total Gold Pieces so far is: 5327 GP. IDK if this can be done on a Player without keeping the GP on a Character Attribute. This is all for fun & theory, nothing major to fix, just feature brainstorm.
1521420697

Edited 1521420746
Gold
Forum Champion
Whether you want to institute the Farewell feature or not (I have another API script that does it).. Could you add a Non-Whispered section to MotD that leaves a record of arrivals in the public chat? (The other, joiner/parter script, does a public welcome in chat, doesn't have a yellow whisper). Example, /whispers: Welcome The Aaron to the game! Announces in chat: "The Aaron is here!" Better in chat with rollable table: %%NAME%% is 1t[Player-Arrivals]! The Aaron is cool! The Aaron is on the scene! The Aaron is finally logged in! The Aaron is ready to roleplay!
1521421081
The Aaron
Pro
API Scripter
hmm.. maybe.&nbsp;
1521423093
Gold
Forum Champion
In case it helps at all in your consideration, here is the other API script that I use for such. It is simply a Snippit found in forums and is not in one-click. I enjoy editing the code to change the word "Adventurer" (my latest) and "Farewell" into other greetings. That's me, hacking code. It was called Simple Join/Part Greeter, but I prefer to rename it AnnounceHello.js for my games. /* global on _ playerIsGM sendChat ---CLOUD9 ERROR CLEARING--- */ // By: DXWarlock //Script: Simple Join/Part Greeter //Roll20 Thread: <a href="https://app.roll20.net/forum/post/2184135/script-" rel="nofollow">https://app.roll20.net/forum/post/2184135/script-</a>... //Roll20 Contact: <a href="https://app.roll20.net/users/262130" rel="nofollow">https://app.roll20.net/users/262130</a> var DXGREET = DXGREET || (function() { 'use strict'; var Greet = function(obj) { var name = obj.get("_displayname"); var isGM = ""; if(playerIsGM(obj.id) === true) { isGM = " [Dungeon Master]"; } if(obj.get("_online") == true) { setTimeout(function() { sendChat('', "&{template:default} {{name=Welcome Adventurer " + name + "}} {{&lt;small&gt;Entering Session:=&lt;small&gt;" + name + isGM + "}}"); }, 3000); } if(obj.get("_online") == false) { setTimeout(function() { sendChat('', "&{template:default} {{name=Farewell Adventurer " + name + "}} {{&lt;small&gt;Exited:=&lt;small&gt;" + name + isGM + "}}"); }, 500); } }, registerEventHandlers = function() { on('change:player:_online', Greet); }; return { RegisterEventHandlers: registerEventHandlers }; }()); on('ready', function() { 'use strict'; DXGREET.RegisterEventHandlers(); });