1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[JavaScript] HELP! whit bot.

Discussion in 'Scripting' started by Caprio, Feb 11, 2017.

  1. Caprio

    Caprio Newbie

    Joined:
    Jul 27, 2015
    Messages:
    7
    Likes Received:
    0
    so guys i have stucked, in site i have 3 buttons when you open the page 2 buttons turn red and 1 button turns blue. when you click the blue button the buttons change now a different button is blue. so i need java script code to click required button anyone can help me? website wapmafija.lt


    some screens: [​IMG]
     
  2. Gogol

    Gogol Jr. VIP Jr. VIP

    Joined:
    Sep 10, 2010
    Messages:
    3,411
    Likes Received:
    3,057
    Gender:
    Male
    What have you tried? Can you post a jsfiddle?
     
  3. Caprio

    Caprio Newbie

    Joined:
    Jul 27, 2015
    Messages:
    7
    Likes Received:
    0
    i have full my script who click button button is posted one.
     
  4. Gogol

    Gogol Jr. VIP Jr. VIP

    Joined:
    Sep 10, 2010
    Messages:
    3,411
    Likes Received:
    3,057
    Gender:
    Male
    please post a Minimal, Complete, and Verifiable example of what you are trying to achieve. you can use jsfiddle.net for the demo. The thing is, nobody has time to go through your website and scan every bit of code to see the problem, for free that is.
     
  5. Caprio

    Caprio Newbie

    Joined:
    Jul 27, 2015
    Messages:
    7
    Likes Received:
    0
    guys i need script who clicks one button off 3 buttons for this script


    Code:
    var klubas = "794"; // klubo id rasit uzeja i kluba nuorodoj wapmafija.lt/klubai.php?id=club&sid=&club=738
    var vard = "xxxxx"; //prisijungimo vardas
    var slap = "kxirxxmxinxxasx"; //prisijungimo slaptazodis
    
    var parts = location.hostname.split('.');
    var subdomain = parts.shift();
    var upperleveldomain = parts.join('.');
    if(upperleveldomain == "wapmafija.lt" || subdomain == "wapmafija"){
    if(document.getElementsByName('nn')[0]){
      var useris = document.getElementsByName('nn')[0];
      useris.value = vard;
      var pass = document.getElementsByName('password')[0];
      pass.value = slap;
    }
    
     
    setTimeout(function() {
      var position = document.documentElement.innerHTML.indexOf('Pasirink auką');
     if(position > 0){
       if(document.getElementsByClassName("button")[0]){
         document.getElementsByClassName("button")[0].click();
     }}
      }, 1100)
      var position = document.documentElement.innerHTML.indexOf('Neskubėk taip!');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
     
      var position = document.documentElement.innerHTML.indexOf('Tavo lygis pakilo');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
     
      var position = document.documentElement.innerHTML.indexOf('Tau neužtenka gyvybių!');
     if(position > 0){ location.href = "/klubai.php?id=club&sid=&club="+klubas; }
     
    var position = document.documentElement.innerHTML.indexOf('Įveskite kodą');
     if(position > 0){ 
       var noOfRepetitions = 3;
    
    myAudio = new Audio('http://www.hellcrates.com/sound.mp3');
    
    myAudio.addEventListener('ended', function() {
                noOfRepetitions = noOfRepetitions-1;
                if (noOfRepetitions > 0) {
                    this.currentTime = 0;
                    this.play()};
    }, false);
    
    myAudio.play();
       throw new Error("Something went badly wrong!"); }
     
      var position = document.documentElement.innerHTML.indexOf('Neivestas kodas!');
     if(position > 0){ location.href = "/klubai.php?id=club&sid=&club="+klubas; }
     
        var position = document.documentElement.innerHTML.indexOf('Narkotikas(Kiekis)[kaina]');
     if(position > 0){ document.getElementsByClassName("button")[0].click(); }
     
      var position = document.documentElement.innerHTML.indexOf('narkotikų jau nebėra!');
     if(position > 0){  var noOfRepetitions = 3;
    myAudio = new Audio('http://www.hellcrates.com/sound.mp3');
    myAudio.addEventListener('ended', function() {
                noOfRepetitions = noOfRepetitions-1;
                if (noOfRepetitions > 0) {
                    this.currentTime = 0;
                    this.play()};
    }, false);
    myAudio.play();
     throw new Error("Something went badly wrong!"); }
     
    var position = document.documentElement.innerHTML.indexOf('sėkmingai nusipirkai');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
     
    
    var position = document.documentElement.innerHTML.indexOf('Atnaujinti puslapio negalima!');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
    
    var position = document.documentElement.innerHTML.indexOf('Jau turi visas gyvybes!');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
     
    
    var position = document.documentElement.innerHTML.indexOf('Sveikata');
     if(position > 0){ location.href = "/ligonine.php?sid=&id=opa"; }
     
    
      var position = document.documentElement.innerHTML.indexOf('Tu pagydytas!');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
     
    
      var position = document.documentElement.innerHTML.indexOf('Daugiau nebegali');
     if(position > 0){ 
       var noOfRepetitions = 3;
    
    myAudio = new Audio('http://www.hellcrates.com/sound.mp3');
    
    myAudio.addEventListener('ended', function() {
                noOfRepetitions = noOfRepetitions-1;
                if (noOfRepetitions > 0) {
                    this.currentTime = 0;
                    this.play()};
    }, false);
    
    myAudio.play();
      
     
      
       throw new Error("Something went badly wrong!"); }
     
    var position = document.documentElement.innerHTML.indexOf('Eiti į žaidimą');
     if(position > 0){ document.getElementsByTagName("b")[1].click(); }
    
       var position = document.documentElement.innerHTML.indexOf('STOP!');
     if(position > 0){ location.href = "/plesimai.php?sid="; }
     
     
    
     var position = document.documentElement.innerHTML.indexOf('Ikliuvai nevykeli!');
     if(position > 0){ location.href = "/zona.php?sid="; }
     
      var position = document.documentElement.innerHTML.indexOf('spalvos mygtuką');
     if(position > 0){ var noOfRepetitions = 3;
    
    myAudio = new Audio('http://www.hellcrates.com/sound.mp3');
    
    myAudio.addEventListener('ended', function() {
                noOfRepetitions = noOfRepetitions-1;
                if (noOfRepetitions > 0) {
                    this.currentTime = 0;
                    this.play()};
    }, false);
    
    myAudio.play();
      
     
      
       throw new Error("Something went badly wrong!"); }
     
     var position = document.documentElement.innerHTML.indexOf('Tave pagavo mentai!');
     if(position > 0){ location.href = "/zona.php?sid=&id=begu"; }
     
      var position = document.documentElement.innerHTML.indexOf('Sveikinu! Tau pavyko papirkti');
     if(position > 0){ location.href = "/ligonine.php?sid=&id=opa"; }
     
      var position = document.documentElement.innerHTML.indexOf('Deja pataikei ne ant to mento!');
     if(position > 0){ location.href = "/zona.php?sid=&id=begu"; }
    
    }
     
  6. Caprio

    Caprio Newbie

    Joined:
    Jul 27, 2015
    Messages:
    7
    Likes Received:
    0
    so?
     
  7. scnonah

    scnonah Jr. VIP Jr. VIP

    Joined:
    Jan 2, 2017
    Messages:
    224
    Likes Received:
    124
    Gender:
    Male
    Go to jsfiddle.net and setup your code working like it is now. Then come back here and paste the link and explain where you're having issues. It's a little hard to follow for me with your current explanation. And no working code. You only posted your js.
     
    Last edited: Feb 11, 2017
  8. Caprio

    Caprio Newbie

    Joined:
    Jul 27, 2015
    Messages:
    7
    Likes Received:
    0
    can you type in my skype or facebook?
    skype: irmantass89
    FB:Irmantas RImsa
     
  9. scnonah

    scnonah Jr. VIP Jr. VIP

    Joined:
    Jan 2, 2017
    Messages:
    224
    Likes Received:
    124
    Gender:
    Male
    No. I just told you what to do.
     
  10. Caprio

    Caprio Newbie

    Joined:
    Jul 27, 2015
    Messages:
    7
    Likes Received:
    0
    but its not my website i just creating bot.
     
  11. Gogol

    Gogol Jr. VIP Jr. VIP

    Joined:
    Sep 10, 2010
    Messages:
    3,411
    Likes Received:
    3,057
    Gender:
    Male
    where is the jsfiddle?

    Anyway, I still did not understand what you are trying to achieve.. if you can explain it in a clear fashion, I can do it for you for free as I have some free time today :)