Money_Magnet Posted April 10, 2022 Share Posted April 10, 2022 Hey guys, I use a crash script but the problem is that sometimes it stops due to some random error like "Network error" or something like this. Do you any idea how can I implement a script that will check if my script is running and if it's not will start it? Link to comment Share on other sites More sharing options...
rungxanhlv Posted April 10, 2022 Share Posted April 10, 2022 write a script in F12 console to click run button when avaible Link to comment Share on other sites More sharing options...
Money_Magnet Posted April 10, 2022 Author Share Posted April 10, 2022 1 hour ago, rungxanhlv said: write a script in F12 console to click run button when avaible Would love to, but I am no where near to being a coder. Any idea how this is achieved? Link to comment Share on other sites More sharing options...
rungxanhlv Posted April 11, 2022 Share Posted April 11, 2022 Hope this will heple you. function Auto_bet(){ var Run_btn = document.documentElement.innerHTML.includes('Run Script'); if(Run_btn == true ){ document.querySelectorAll('div.button-inner')[2].click(); var find_btn = "Confirm"; var haystack = document.getElementsByClassName("button-inner"); var i; for (i = 0; i < haystack.length; i++) { if(haystack[i].innerHTML == find_btn){ console.log("Auto Start"); haystack[i].click(); } } } } var Start_Auto_bet = setInterval(Auto_bet,1000); To cancel interval run this code or refesh your browser" clearInterval(Start_Auto_bet); Link to comment Share on other sites More sharing options...
Darklightsite Posted April 11, 2022 Share Posted April 11, 2022 13 hours ago, rungxanhlv said: Remélhetőleg ez segíteni fog neked. function Auto_bet(){ var Run_btn = document.documentElement.innerHTML.includes('Run Script'); if(Run_btn == true ){ document.querySelectorAll('div.button-inner')[2].click(); var find_btn = "Confirm"; var haystack = document.getElementsByClassName("button-inner"); var i; for (i = 0; i < haystack.length; i++) { if(haystack[i].innerHTML == find_btn){ console.log("Auto Start"); haystack[i].click(); } } } } var Start_Auto_bet = setInterval(Auto_bet,1000); Az intervallum törléséhez futtassa ezt a kódot, vagy frissítse a böngészőt" clearInterval(Start_Auto_bet); Thanks the script. It work for me. But i change document.querySelectorAll('div.button-inner')[2].click(); To document.querySelectorAll('div.button-inner')[1].click(); Link to comment Share on other sites More sharing options...
Skele Posted April 11, 2022 Share Posted April 11, 2022 its much simpler than that setInterval(function(){ if(!crash.script.isRunning) { crash.script.start() } }, 1000) this essentialy is the same thing as click the start button if it is needed every 1 second. This is assuming you don't have your script fail in some overly cataclysmic manner in which it isn't still setting on the script page waiting for it to be started again. Link to comment Share on other sites More sharing options...
Money_Magnet Posted April 12, 2022 Author Share Posted April 12, 2022 14 hours ago, Skele said: its much simpler than that setInterval(function(){ if(!crash.script.isRunning) { crash.script.start() } }, 1000) this essentialy is the same thing as click the start button if it is needed every 1 second. This is assuming you don't have your script fail in some overly cataclysmic manner in which it isn't still setting on the script page waiting for it to be started again. Thanks guys, this just shows how many different ways there is to code something Link to comment Share on other sites More sharing options...
Darklightsite Posted April 16, 2022 Share Posted April 16, 2022 On 2022. 04. 11. at 20:34, Skele said: sokkal egyszerűbb ennél setInterval(function(){ if(!crash.script.isRunning) { crash.script.start() } }, 1000) ez a lényeg ugyanaz, mint a start gombra kattintás, ha 1 másodpercenként szükséges. Ez azt feltételezi, hogy a szkript nem hibásodik meg valami túlzottan kataklizmát okozó módon, amikor még mindig nincs beállítva a szkriptoldalon, és várja az újraindítást. I use my script to hash dice. Your code good to hash dice? Link to comment Share on other sites More sharing options...
Skele Posted April 16, 2022 Share Posted April 16, 2022 for hash dice you will likely have to change the "crash" to be "hdg" but after that it should work. Link to comment Share on other sites More sharing options...
Darklightsite Posted April 16, 2022 Share Posted April 16, 2022 39 minutes ago, Skele said: for hash dice you will likely have to change the "crash" to be "hdg" but after that it should work. Thanks you are a King Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.