skin changer?

no

目前為 2024-02-06 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         skin changer?
// @version      0.1
// @match        *://agma.io/**
// @icon         https://www.google.com/s2/favicons?sz=64&domain=agma.io
// @grant        unsafeWindow
// @run-at       document-start
// @description no
// @namespace https://greasyfork.org/users/1238627
// ==/UserScript==
//ALERT
// TO USE THIS SCRIPT, YOU HAVE TO CHANGE THE SKIN ID AND WEARABLES ID
// JUST RIGHT CLICK ON THE SKIN U WANT TO CHANGE, THEN CHOOSE INSPECT ELEMENT IT SHOULD SHOW THE ID
// USAGE: PRESS KEY 'A' = SKIN CHANGER+WEARABLE CHANGER, DIGIT '0'=AUTO ANIMATION
//THANKS
let skinId = [11639,13748],
	wearablesId = [61, 35, 36];
let interval,
	interval1,
	interval2,
    interval3,
    interval4,
    interval5,
    ee = false,
    ee1 = false,
	send,
	curserTimeout,
    nick = [''],
	currentSkin = 0,
	currentWears = 0,
    currentNick = 0,
	enabled = !1,
	enabled1 = !1,
	status = !1,
    pushpacket;
const osend = WebSocket.prototype.send;
WebSocket.prototype.send = new Proxy(WebSocket.prototype.send, {
	apply(target, thisArg, argArray) {
		send = (...args) => target.call(thisArg, ...args);
		let pkt = argArray[0];
		pkt = (pkt instanceof ArrayBuffer) ? new DataView(pkt) : (pkt instanceof DataView) ? pkt : new DataView(pkt.buffer);
		if (pkt.byteLength == 6 && pkt.getUint8(0) == 162){pushpacket = new Uint8Array(pkt.buffer)}
		target.apply(thisArg, argArray);
	}
});
class Writer {
	constructor(e) {
		(this.buffer = new DataView(new ArrayBuffer(e))), (this.position = 0), (this.littleEndian = !0);
	}
	setString(e) {
		for (let t = 0; t < e.length; t++) this.setUint16(e.charCodeAt(t));
		return this;
	}
	setInt8(e) {
		return this.buffer.setInt8(this.position++, e), this;
	}
	setUint8(e) {
		return this.buffer.setUint8(this.position++, e), this;
	}
	setInt16(e) {
		return this.buffer.setInt16((this.position += 2) - 2, e, this.littleEndian), this;
	}
	setUint16(e) {
		return this.buffer.setUint16((this.position += 2) - 2, e, this.littleEndian), this;
	}
	setInt32(e) {
		return this.buffer.setInt32((this.position += 4) - 4, e, this.littleEndian), this;
	}
	setUint32(e) {
		return e % 1 != 0 && 88 == e.toString().slice(-2) && (e += 2), this.buffer.setUint32((this.position += 4) - 4, e, this.littleEndian), this;
	}
	setFloat32(e) {
		return this.buffer.setFloat32((this.position += 4) - 4, e, this.littleEndian), this;
	}
	setFloat64(e) {
		return this.buffer.setFloat64((this.position += 8) - 8, e, this.littleEndian), this;
	}
	send() {
		return send(this.buffer);
	}
}
window.addEventListener("DOMContentLoaded",()=>{
function changeSkin() {
	ssk(id[currentSkin], wears[currentWears],''), (currentSkin = (currentSkin + 1) % id.length);
}

function we() {
	ssk(id[currentSkin], wears[currentWears],''), (currentWears = (currentWears + 1) % wears.length);
}
function changename() {
	ssk(id[currentSkin], wears[currentWears],nick[currentNick]), (currentNick = (currentNick + 1) % nick.length);
}
function sendchat(msg) {
var b = new DataView(new ArrayBuffer(2 + 2 * msg.length)),
x = 0;
b.setUint8(x++, 98);
b.setUint8(x++, 1);
for (var _ = 0; _ < msg.length; ++_) b.setUint16(x, msg.charCodeAt(_), true), x += 2;
send(b.buffer);
}
function respawn(e, t, nick) {
	if ("block" != $("#advert").css("display") && "block" != $("#overlays").css("display")) {
		var n = [""];
		const i = new Writer(4 + 2 * n.length + 2 * ''.length);
		i.setUint8(1).setUint16(e).setUint8(n.length), i.setUint16(t), i.setString('').send();
	}
}
function curserMsg(e, t, n) {
	"green" == t && (t = "rgb(0, 192, 0)"),
		"red" == t && (t = "rgb(255, 0, 0)"),
		"gray" == t && (t = "rgb(153, 153, 153)"),
		clearTimeout(curserTimeout),
		$("#curser").text(e).show().css("color", t),
		0 !== n && (curserTimeout = setTimeout(() => $("#curser").fadeOut(400), n ?? 4e3));
}
const delays = (e) => new Promise((t) => setTimeout(t, e));
async function animation() {
		for (let e = 23; e <= 26; e++) new Writer(2).setUint8(179).setUint8(e).send(), e < 26 && (await delays(5100));
	}
	(unsafeWindow.ssk = (e, t) => {
		respawn(e, t);
	}),
	window.addEventListener("keydown", (event) => {
		if (!($("input, textarea").is(":focus"))) {
			switch (event.key) {
				case "a":
					enabled = !enabled;
					//ssk(0, 0);
					if (enabled) {
						changeSkin();
						interval1 = setInterval(changeSkin, 5100);
						interval2 = setInterval(we, 100);
                        interval3 = setInterval(changename,500)
					} else {
						clearInterval(interval1);
						clearInterval(interval2);
                        clearInterval(interval3);
					}
					break;
				case "0":
					enabled1 = !enabled1;
                    curserMsg(`Animation ${enabled1? 'ON' : 'OFF'}`,'green',500)
					if (enabled1) {
						animation();
						interval = setInterval(animation, 20400);
					} else {
						clearInterval(interval);
					}
					break;
                    case 'p':
                    break;
				default:
					break;
			}
		}
	});
    let swals = unsafeWindow.swal
    unsafeWindow.swal = function(){
    const text = arguments[0].text;
        if(/Multi Feed/.test(text))return;
        swals.apply(this,arguments)
    }
unsafeWindow.addEventListener("keydown", (e) => {
	if (("p" == e.key || "P" == e.key) && !$("input, textarea").is(":focus")) {
        ee=!ee
new Writer(3).setUint8(4).setUint8(36).setUint8(1).send();
       if(ee){interval4= setInterval(()=>{
       if("block" != $("#advert").css("display") && "block" != $("#overlays").css("display")){
          new Writer(2).setUint8(180).setUint8(5).send();
                 }
        })}
        else {clearInterval(interval4)}
	}
    if (("o" == e.key || "O" == e.key) && !$("input, textarea").is(":focus")) {
        ee1 = !ee1
if(ee1){interval5= setInterval(()=>{for(let i =0;i<JSON.parse(document.getElementById("cellsAmount").textContent);i++){
    if("block" != $("#advert").css("display") && "block" != $("#overlays").css("display"))send(new Uint8Array([162,i,pushpacket[2],pushpacket[3],0,0]))
}})
}
        else {clearInterval(interval5)}
    }
});
let inta;
(unsafeWindow.anim1 = (e) => ("block" != $("#overlays").css("display"))&&send(new Uint8Array([4, 1, e])));
    var e = document.createElement("input");
	(e.type = "checkbox"), (e.id = "cGoldFlicker"), (e.name = "cGoldFlicker");
	var t = document.createElement("label");
	(t.textContent = "Gold Flicker"), t.setAttribute("for", "cGoldFlicker");
	var n = document.createElement("input");
	(n.type = "number"), (n.id = "delayInput"), (n.placeholder = "0"), (n.min = "0"), (n.style.width = "60px"), (n.style.textAlign = "center");
	const i = localStorage.getItem("savedDelay");
	i && (n.value = i),
		$("#roleSettings").append(e),
		$("#roleSettings").append(t),
		$("#roleSettings").append(n),
		$("#roleSettings").append("<br>"),
		$("#settingTab3, .rab-radius").click(() => {
			$("#roleSettings").css("display", "block"),
				(document.getElementById("cGoldFlicker").disabled = !1),
				setInterval(() => {
					document.getElementById("cGoldFlicker").disabled && ((document.getElementById("cGoldFlicker").disabled = !1), $("#roleSettings").css("display", "block"));
				}, 0);
		}),
		e.addEventListener("change", function() {
			this.checked ? curserMsg("Flicker turned ON", "green") : curserMsg("Flicker turned OFF", "green");
		}),
		e.addEventListener("change", function() {
			if (this.checked) {
				const e = parseInt(document.getElementById("delayInput").value) || 100;
				let t = !1;
				inta = setInterval(async () => {
					(t = !t), await anim1(t ? 1 : 0);
				}, e);
			} else clearInterval(inta);
		}),
		n.addEventListener("input", function() {
			if (e.checked && inta) {
				clearInterval(inta);
				const e = parseInt(this.value) || 100;
				let t = !1;
				(inta = setInterval(async () => {
					(t = !t), await anim1(t ? 1 : 0);
				}, e)),
				localStorage.setItem("savedDelay", e);
			}
		});
});