SHOW:
|
|
- or go back to the newest paste.
| 1 | /* | |
| 2 | ||
| 3 | - | Change placeId to the place you want to scan for and message players. |
| 3 | + | Go to the group page you want to spam when running this. |
| 4 | Inspect Element->Console and copy and paste the code. | |
| 5 | Wait time can be adjusted and the bot will attempt to send messages super fast, but it's good to keep the time high or ROBLOX will detect flooding. | |
| 6 | ||
| 7 | You can change the group number to the group you are recruiting for so that it doesn't send the message to people in that group. | |
| 8 | ||
| 9 | - | Built off of (but in the end most of that code was removed): http://pastebin.com/s2nR7tha |
| 9 | + | |
| 10 | ||
| 11 | var waitTime = 5; // In seconds | |
| 12 | var group = 0; // 0 for no group check, otherwise people in this group will not receive the message | |
| 13 | - | var placeId = 218248596; // Place to check and message |
| 13 | + | |
| 14 | function send() {
| |
| 15 | $.post('/messages/send',{
| |
| 16 | subject: 'wassup m9er', | |
| 17 | body: 'Hello, ' + username + '.\n\nu ok m9?????', | |
| 18 | recipientid: userId, | |
| 19 | cacheBuster: new Date().getTime() | |
| 20 | }).done(function(response) {
| |
| 21 | if (response.success == true) {
| |
| 22 | console.log('Sent message to ' + username + ' (' + userId + ')');
| |
| 23 | } else {
| |
| 24 | console.log('Error sending to ' + username + ': ' + response.shortMessage);
| |
| 25 | } | |
| 26 | }); | |
| 27 | } | |
| 28 | if (group > 0) {
| |
| 29 | $.get('/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=' + userId + '&groupid=' + group, function(response) {
| |
| 30 | if(response.indexOf('true') == -1) {
| |
| 31 | send(); | |
| 32 | } else {
| |
| 33 | console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
| |
| 34 | - | send(); |
| 34 | + | |
| 35 | - | } else {
|
| 35 | + | |
| 36 | - | console.log('Didn\'t send a message to ' + username + ' because he is already in group ' + group + '.');
|
| 36 | + | |
| 37 | - | } |
| 37 | + | |
| 38 | } | |
| 39 | } | |
| 40 | ||
| 41 | function run() {
| |
| 42 | var timeout = 0; | |
| 43 | var elements = document.evaluate('//div[contains(@id,\'ctl00_cphRoblox_rbxGroupRoleSetMembersPane_GroupMembersUpdatePanel\')]//div[contains(@class,\'GroupMember\')]//span[contains(@class,\'Name\')]/a',document,null,XPathResult.UNORDERED_NODE_ITERATOR_TYPE,null);
| |
| 44 | - | var i=0; |
| 44 | + | var currentNode = elements.iterateNext(); |
| 45 | while (currentNode) {
| |
| 46 | (function(time,id,name) {
| |
| 47 | - | var url = '/games/getgameinstancesjson?placeId=' + placeId +'&startindex=' + i*10; |
| 47 | + | setTimeout(sendMsg,time,id,name); |
| 48 | - | $.get(url).done(function(obj){
|
| 48 | + | })(timeout,currentNode.href.match(/\d+/)[0],currentNode.textContent); |
| 49 | - | for (var server in obj.Collection) {
|
| 49 | + | timeout+=waitTime*1000; |
| 50 | - | for (var players in obj.Collection[server].CurrentPlayers) {
|
| 50 | + | currentNode = elements.iterateNext(); |
| 51 | - | var plr = obj.Collection[server].CurrentPlayers[players]; |
| 51 | + | |
| 52 | - | if (plr.Id > 0) {
|
| 52 | + | __doPostBack('ctl00$cphRoblox$rbxGroupRoleSetMembersPane$dlUsers_Footer$ctl02$ctl00','');
|
| 53 | - | (function(time,id,name) {
|
| 53 | + | var ready = setInterval(function() {
|
| 54 | - | setTimeout(sendMsg,time,id,name); |
| 54 | + | if (document.getElementById('__EVENTTARGET').value == '') {
|
| 55 | - | })(timeout,plr.Id,plr.Username); |
| 55 | + | clearInterval(ready); |
| 56 | - | timeout+=waitTime*1000; |
| 56 | + | setTimeout(run,timeout); |
| 57 | - | } |
| 57 | + | |
| 58 | }, 10); | |
| 59 | } | |
| 60 | - | i++; |
| 60 | + | var ready = setInterval(function() {
|
| 61 | - | setTimeout(run, timeout); |
| 61 | + | if (document.readyState === 'complete') {
|
| 62 | - | }); |
| 62 | + | clearInterval(ready); |
| 63 | run(); | |
| 64 | - | run(); |
| 64 | + | } |
| 65 | }, 10); |