Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //you need to have the alliance chat window open, saloon chat closed, and the fort screen open with recruitment screen up
- var results = '';
- $('.row.battlestat.tw_red').children('.battle_nam').each(function(){results += $(this).html() + '<br>'});
- $('.tw2gui_scrollpane_clipper_contentpane','#battle_stat').html('<div>' + results + '</div>')
- //start of jarocode
- num_eles = document.querySelectorAll(".chat_contacts .client_name");
- var team = [];
- for (i = 0; i < num_eles.length; i++) {
- team.push(document.querySelectorAll(".chat_contacts .client_name")[i].innerText);
- }
- //end of jarocode
- var notSignedIn = [];
- var signedIn = [];
- //editted following line to select ".fort_battle_recruitlist_list" first
- $('.fort_battle_recruitlist_list .tw2gui_scrollpane_clipper_contentpane .player').each(function(){signedIn.push($(this).text())});
- checkTeam();
- function checkSignedIn(persontocheck){
- var found = false;
- for(var i = 0;i < signedIn.length;i++){
- if(signedIn[i].toLowerCase() == persontocheck.toLowerCase()){
- found = true;
- break;
- }
- }
- if(!found){
- notSignedIn.push(persontocheck);
- }
- }
- function checkTeam(){
- for(var i = 0;i < team.length;i++){
- checkSignedIn(team[i])
- }
- /*
- var results = notSignedIn.length + ' players Not signed in\n\n';
- for(var i = 0;i < notSignedIn.length;i++){
- results += notSignedIn[i] + '\n';
- }
- alert(results)
- */
- prompt(notSignedIn.length + ' players Not signed in', notSignedIn.join('; '));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement