Created
May 12, 2015 17:53
-
-
Save tkrpata/addcbf6dd4d7a44b319e to your computer and use it in GitHub Desktop.
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
# Robot Roll Call | |
# | |
# robot roll call - does what it says | |
# | |
robots = [ | |
"http://i.imgur.com/6PcNC.jpg", # robot roll call | |
"http://i.imgur.com/9UmSw.jpg", # cambot | |
"http://i.imgur.com/1CrLw.jpg", # gypsy | |
"http://i.imgur.com/SNpTp.jpg", # tom servo | |
"http://i.imgur.com/HVXpw.jpg", # croooow! | |
] | |
module.exports = (robot) -> | |
robot.hear /robot roll call/i, (msg) -> | |
sendRobot(0,0,msg); | |
sendRobot = (index,timeout,msg) -> | |
msg.send robots[index]; | |
index++; | |
if index < robots.length | |
setTimeout (-> sendRobot index, timeout, msg), 750; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment