Advertisement
Guest User

terran coho

a guest
Jan 25th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. var pageloadtime = 12
  2. var msgwaittime = 15
  3. function gogogo()
  4. {
  5. var players = 0
  6. var users = 0
  7. function sendMsg(userId, username)
  8. {
  9. $.get("http://www.roblox.com/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=" + userId + "&groupid=1181678", function(d) {
  10. if(d.indexOf('true') == -1) {
  11. $.post("http://www.roblox.com/messages/send",{
  12. subject : ":// Terran Cohort Recruitment Message",
  13. body : "Hello, " + username + "!\n\n You've seem quite interested in gunfighting/swordfighting, " + username + ". \nWe've picked you to join Terran Cohort. We will teach you how to gun fight (RCL), teach you how to sword fight, increase your skills, and discipline you into being an amazing honorable soldier of Terran Cohort! \n\nTo join click here: http://www.roblox.com/Groups/Group.aspx?gid=778092 Also, get this extension for Google Chrome to be notified when there is a new shout or a training also for group news (made by Merely): http://chrome.google.com/webstore/detail/roblox-group-enhancer-by/ddjfhkkpgfghimddaekfocbahebohdim\n\n\n Sincerely,\n Unreact \n-Chancellor",
  14. recipientid : userId,
  15. cacheBuster : new Date().getTime()
  16. }).complete(function(){
  17. console.log('Sent message to ' + username + '.')
  18. })
  19. }
  20. })
  21. }
  22.  
  23. function getPlayers()
  24. {
  25. var ids = []
  26. var sel = $('#ctl00_cphRoblox_TabbedInfo_GamesTab_RunningGamesList_RunningGamesContainer');
  27. sel = $(sel).find('a')
  28. for(i=0;i<sel.length;i++) {
  29. if(sel[i].href.toLowerCase().substring(0,'http://www.roblox.com/User.aspx?id='.length) == 'http://www.roblox.com/User.aspx?id='.toLowerCase()) {
  30. ids.push(sel[i].href.substring('http://www.roblox.com/User.aspx?id='.length))
  31. }
  32. }
  33. return ids
  34. }
  35.  
  36. function getUsernames()
  37. {
  38. var ids = []
  39. var sel = $('#ctl00_cphRoblox_TabbedInfo_GamesTab_RunningGamesList_RunningGamesContainer');
  40. sel = $(sel).find('a')
  41. for(i=0;i<sel.length;i++) {
  42. if(sel[i].href.toLowerCase().substring(0,'http://www.roblox.com/User.aspx?id='.length) == 'http://www.roblox.com/User.aspx?id='.toLowerCase()) {
  43. ids.push(sel[i].title)
  44. }
  45. }
  46. return ids
  47. }
  48.  
  49. var players = getPlayers()
  50. var users = getUsernames()
  51. var i=0;
  52. var time
  53.  
  54. function Loop()
  55. {
  56. setTimeout(function () {
  57. sendMsg(players[i],users[i])
  58. i++;
  59. if (i < players.length) {
  60. Loop();
  61. } else {
  62. __doPostBack('ctl00$cphRoblox$TabbedInfo$GamesTab$RunningGamesList$NextPageButton', '');
  63. setTimeout(function () {gogogo()},pageloadtime*1050)
  64. }
  65. }, msgwaittime*710)
  66. }
  67.  
  68. Loop()
  69. }
  70.  
  71. gogogo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement