[JavaScript] HELP! whit bot.

Caprio

Newbie
Joined
Jul 27, 2015
Messages
7
Reaction score
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:
b0dde26d81a1466f93a27e87093c1a55.png
 
What have you tried? Can you post a jsfiddle?
 
i have full my script who click button button is posted one.
 
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.
 
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"; }

}
 
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:
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 had to follow for me with your current explanation. And no working code. You only posted your js.
can you type in my skype or facebook?
skype: irmantass89
FB:Irmantas RImsa
 
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 :)
 
Back
Top