您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bot Exampe
- // ==UserScript==
- // @name PP Bot Example
- // @namespace http://tampermonkey.net/
- // @version 0.2
- // @description Bot Exampe
- // @author Bambi1
- // @match https://pixelplace.io/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=pixelplace.io
- // @run-at document-start
- // @grant none
- // @license MIT
- // ==/UserScript==
- function fix(a, b) {
- Object.defineProperty(window.console, a, {configurable:false,enumerable:true,writable:false,value:b});
- }
- fix('log', console.log);
- fix('warn', console.warn);
- fix('error', console.error);
- fix('info', console.info);
- const originalWebSocket = window.WebSocket;
- var socket;
- class WebSocketHook extends originalWebSocket {
- constructor(a, b) {
- super(a, b);
- socket = this;
- }
- }
- window.WebSocket = WebSocketHook;
- function placePix(x, y, col) {
- socket.send(`42["p",[${x},${y},${col},1]]`);
- }
- function startingPos(x, y){
- var three = 3;
- var four = 4;
- var color = 5;
- placePix(x , y,color)
- placePix(x+1, y+1,color)
- placePix(x+2, y+2,color)
- placePix(x+four,y+three,color)
- }
- document.addEventListener('keydown', function(event) {
- // Check if the pressed key is 'j'
- if (event.key === 'j') {
- // Get the element with the id "coordinates"
- var coordinatesElement = document.getElementById('coordinates');
- var coordinatesValue = coordinatesElement.textContent;
- // Split the coordinates value into x and y parts
- var [x, y] = coordinatesValue.split(',');
- //send the coordinates as integers
- startingPos(parseInt(x), parseInt(y));
- }
- });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址