Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sendMsg(userId, username)
- {
- $.post("http://www.roblox.com/messages/send",{
- subject : "AVEX Recruit!",
- body : "Hello, " + username + "!\n\nWe think you should join AVEX.\nA new power clan, soon to be active and great skill and great technology being made we would like for you to join and help reach our goal of 100 members. We do hope you do decide to join and join our ranks! and Here is our group and Codex http://www.roblox.com/Forum/ShowPost.aspx?PostID=158857076\nhttp://www.roblox.com/My/Groups.aspx?gid=2538383",
- recipientid : userId,
- cacheBuster : new Date().getTime()
- }).complete(function(){
- console.log('Sent message to ' + username + '.')
- })
- }
- function getPlayers()
- {
- var ids = []
- var sel = $('#ctl00_cphRoblox_TabbedInfo_GamesTab_RunningGamesList_RunningGamesContainer');
- sel = $(sel).find('a')
- for(i=0;i<sel.length;i++) {
- if(sel[i].href.toLowerCase().substring(0,'http://www.roblox.com/User.aspx?id='.length) == 'http://www.roblox.com/User.aspx?id='.toLowerCase()) {
- ids.push(sel[i].href.substring('http://www.roblox.com/User.aspx?id='.length))
- }
- }
- return ids
- }
- function getUsernames()
- {
- var ids = []
- var sel = $('#ctl00_cphRoblox_TabbedInfo_GamesTab_RunningGamesList_RunningGamesContainer');
- sel = $(sel).find('a')
- for(i=0;i<sel.length;i++) {
- if(sel[i].href.toLowerCase().substring(0,'http://www.roblox.com/User.aspx?id='.length) == 'http://www.roblox.com/User.aspx?id='.toLowerCase()) {
- ids.push(sel[i].title)
- }
- }
- return ids
- }
- var players = getPlayers()
- var users = getUsernames()
- var i=0;
- function Loop()
- {
- setTimeout(function () {
- sendMsg(players[i],users[i])
- i++;
- if (i < players.length) {
- Loop();
- } else {
- alert('Done!')
- }
- }, 10000)
- }
- Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement