Skip to content

Instantly share code, notes, and snippets.

@peterbartha
Created November 2, 2020 14:27
Show Gist options
  • Save peterbartha/9db8d9b8999c660dc38758b23e7ee789 to your computer and use it in GitHub Desktop.
Save peterbartha/9db8d9b8999c660dc38758b23e7ee789 to your computer and use it in GitHub Desktop.
nCore spo0ky day(s) auto clicker
/**
* Az alábbi kód az nCore oldalon Haloween környékén meghirdetett eseménynél
* segít némi plusz pontot, kevesebb seed időt elérni.
*
* A `Conditional breakpoint` kommentek utáni kódot Chrome/Firefox böngészők
* debuggerében a komment alatti sorokra kell felvenni. A `false` minden sor
* végén azt eredményezi, hogy nem áll majd meg a kód futás a beírt kód
* kiértékelését követően (igaz érték esetén megáll a breakpointon).
*
* Használjátok, DE! nagyon szépen kérlek benneteket, NE! használjátok "túl",
* azaz NE! emiatt legyetek a top 25-ben... nagyon nem lenne fair. :) Köszi!
*/
$(document).ready(function() {
function h(i, a) {
return Math.floor(Math.random() * (a - i + 1)) + i
}
function d(m) {
clearInterval(j);
var l = $("#spo0kyD");
l.fadeTo("fast", 1);
var i = parseInt(l.css("top").replace("px", ""))
, o = parseInt(l.css("left").replace("px", ""));
o + 195 > $(window).width() && (o = $(window).width() - 195),
i + 120 > $(window).height() && (i = $(window).height() - 120),
l.css({
width: "175px",
top: i + "px",
left: o + "px"
}),
l.addClass("ape-popup"),
l.html(m + '<br /><p class="list_alert" id="removeMessage" style="cursor:pointer;">bezár</p>'),
c = setInterval("$('#spo0kyD').fadeOut('slow', function(){$('#spo0kyD').remove()});", 30000)
}
function b() {
clearInterval(j),
clearInterval(c),
$("#spo0kyD").length > 0 && $("#spo0kyD").remove(),
"undefined" != typeof k && k.length > 0 && k.modal("hide")
}
var j, k, g, c;
$(document).on("click", "#removeMessage", function(i) {
/* Conditional breakpoint */ var i = {}; i.originalEvent = 1; false
if (void 0 === i.originalEvent) {
return alert("Kérlek te kattints ne egy kód."),
!1
}
var a = $("#spo0kyD");
a.fadeOut("slow"),
a.remove(),
clearInterval(c)
}),
$(document).on("click", "#spo0kyD > img", function(i) {
/* Conditional breakpoint */ var i = {}; i.originalEvent = 1; false
if (void 0 === i.originalEvent) {
return alert("Kérlek te kattints ne egy kód."),
!1
}
if ("true" === $("#spo0kyD").attr("data-recaptcha")) {
k = $("#spookymodal").clone(!0).attr("id", ""),
k.find(".modal-title").html("Captcha challenge"),
k.find(".modal-footer").remove(),
k.find(".modal-body").html('<div id="recaptcha"></div><br /><button class="anyanswer">Mehet</button>'),
$(document.body).append(k),
k.modal(),
g = grecaptcha.ready(function() {
grecaptcha.execute('6LeGT8AUAAAAAEZXWudAtmZaSDcuEzQmC3VRhq7p', {
action: 'spooky'
}).then(function(token) {});
}),
clearInterval(j),
/* Conditional breakpoint start */
var myIntVal = setInterval(() => {
console.log('waiting for recaptcha response');
if ("undefined" !== typeof $(".g-recaptcha-response").val()) {
$('.anyanswer').click();
console.log('found');
clearInterval(myIntVal);
setTimeout(() => window.location.reload(), 5000);
}
}, 500); false
/* Conditional breakpoint end */
$("#spo0kyD").stop(!0)
} else {
var a = {
eventid: $("#spo0kyD").attr("data-uuid"),
userid: $("#confg").attr("data-uid")
};
/* Conditional breakpoint */ setTimeout(() => window.location.reload(), 5000); false
f.send(JSON.stringify(a))
}
}),
$(document).on("click", ".anyanswer", function(m) {
/* Conditional breakpoint */ var m = {}; m.originalEvent = 1; false
if (void 0 === m.originalEvent) {
return alert("Kérlek kattints te."),
!1
}
var l = null;
if ("undefined" == typeof $(".g-recaptcha-response").val()) {
return m.preventDefault(),
!1
}
l = $(".g-recaptcha-response").val();
var i = {
recaptcha: l,
eventid: $("#spo0kyD").attr("data-uuid"),
userid: $("#confg").attr("data-uid")
};
f.send(JSON.stringify(i))
}),
$(document).on("hidden.bs.modal", function() {
k.remove()
});
var f = new WebSocket("wss://spooky.ncore.cc:3001/spooky");
f.onopen = function() {
b()
}
,
f.onmessage = function(m) {
var x = JSON.parse(m.data);
switch (x.type) {
case "spooky":
b();
var q = 100
, r = 100
, a = 10
, e = $(window).width() - q - 10
, w = 10
, o = $(window).height() - r - 10
, t = Math.floor(Math.random() * (parseFloat(e) - parseFloat(a) + 1)) + parseFloat(a)
, n = Math.floor(Math.random() * (parseFloat(o) - parseFloat(w) + 1)) + parseFloat(w);
/* Conditional breakpoint start */
function h(i, a) {
return Math.floor(Math.random() * (a - i + 1)) + i
}; false
/* Conditional breakpoint stop */
$("body").append('<div id="spo0kyD" data-uuid="' + x.eventid + '" data-recaptcha="' + x.recaptcha + '" style="z-index:1000;position:fixed;left:' + t + "px;width:" + q + "px;top:" + n + 'px;"><img style="cursor:pointer;" src="https://nc-img.cdn.l7cache.com/spooky2k20/sp2020-' + h(1, 45) + '.png" /></div>'),
/* Conditional breakpoint */ setTimeout(() => { $("#spo0kyD > img").click(); console.log('click invoked');}, 3000); false
j = setInterval("$('#spo0kyD').fadeOut('slow', function(){$('#spo0kyD').remove()});", 30000);
break;
case "spooky-event":
"undefined" != typeof k && k.modal("hide"),
x.success ? d(x.text) : b(),
"undefined" != typeof g && grecaptcha.reset(g)
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment