3 ms·
Say what to a community of hackers? :D setInterval(function(){ var seconds = parseInt($("#thebutton-s-10s").html()) * 10 + parseInt
by franciscop 12y ago
Say what to a community of hackers? :D
setInterval(function(){
var seconds = parseInt($("#thebutton-s-10s").html()) * 10
+ parseInt($("#thebutton-s-1s").html());
if (seconds > 15 && seconds < 20) {
$("#thebutton").click();
}
}, 100);
- pests 12y agoPeople had that running within an hour. The problem is temporary connectivity issues and so which makes you think its hit that low. There were efforts to track the lowest number seen so far but a common problem was getting artificially low just due to lag. quick edit: Another top level reply to this post is saying something similar.
- dack 12y agoCareful, if you lose the connection to the websocket you'll click inadvertently! Also, there's a global variable called "r.thebutton" which has info about the timer already - no need to parse out html elements :)
- franciscop 12y agoEdited to take this into account. Now it will only click within an interval, from 15 to 20 seconds. In this way, if it was 0, undef, etc, it would not be clicked, thanks!
- pests 12y agoOkay, so you see 17 seconds and click but who says your click isn't received after someone else's, but before your time is updated?
- tokenizerrr 12y agoYou don't. Neither does anyone doing it manually, this is part of the game.
- strathmeyer 12y agoThey detect 'cheaters' and flair people as such.
- jacalata 12y agoreally? How would you detect a clientside script like this?
- ryan-c 12y agofunction validateClickEvent(e) { var r = e.target.getBoundingClientRect(); if (e.x >= r.left && e.x <= r.right && e.y >= r.top && e.y <= r.bottom) { console.log('looks legit'); } else { console.log('faked click'); } } Set this as the click handler. The click method is browser specific, but on Chrome the x/y coordinates on the event will be incorrect. A smarter script could fool this, though.
- tom-lord 12y agoI don't know much javascript, but that looks extremely error prone to me. How would it behave in different monitor sizes? With zoomed in/out screens? On mobiles, tablets, etc? And it would still be pretty easy for a cheating script to work cheat your validation!
- ryan-c 12y agoIt's just an example, but zoom should scale both the element coordinates and the mouse coordinates. This sort of validation can be made a lot more elaborate.
- humanarity 12y agothebutton.dispatchEvent( new MouseEvent('click', {clientX:(r.left+r.right)/2, clientY:(r.top+r.bottom)/2})); Or something along those lines!! :)
- maaaats 12y ago