洛谷画板 画ll的logo的脚本 js

 console.log("Luogu Painter for limelight by Winslow");
const offset = {
	"x":100,
	"y":200
}
var isFirstNode = true;
var prevNode = [0,0,0];//每次画点不和上次重复

var nodeList = [
	[4,1,16],
	[5,1,16],
	[3,2,16],
	[4,2,16],
	[5,2,16],
	[6,2,16],
	[2,3,16],
	[3,3,16],
	[4,3,16],
	[5,3,16],
	[6,3,16],
	[7,3,16],
	[1,4,16],
	[2,4,16],
	[3,4,16],
	[4,4,16],
	[5,4,16],
	[6,4,16],
	[7,4,16],
	[8,4,16],
	[1,5,16],
	[2,5,16],
	[3,5,16],
	[4,5,16],
	[5,5,16],
	[6,5,16],
	[7,5,16],
	[8,5,16],
	[4,8,16],
	[5,8,16],
	[3,7,16],
	[4,7,16],
	[5,7,16],
	[6,7,16],
	[2,6,16],
	[3,6,16],
	[4,6,16],
	[5,6,16],
	[6,6,16],
	[7,6,16],
	[1,6,18],
	[8,6,18],
	[2,7,18],
	[7,7,18],
	[3,8,18],
	[6,8,18],
	[4,9,18],
	[5,9,18],
	[1,7,17],
	[8,7,17],
	[2,8,17],
	[7,8,17],
	[3,9,17],
	[6,9,17],
	[4,10,17],
	[5,10,17],
	
	[11,2,0],
	[11,3,0],
	[11,4,0],
	[11,5,0],
	[11,6,0],
	[11,7,0],
	[11,8,0],
	[11,9,0],
	
	[13,4,0],
	
	[13,6,0],
	[13,7,0],
	[13,8,0],
	[13,9,0],
	
	[15,7,0],
	[15,8,0],
	[15,9,0],
	
	[17,7,0],
	[17,8,0],
	[17,9,0],
	
	[19,7,0],
	[19,8,0],
	[19,9,0],
	
	[16,6,0],
	[18,6,0],
	
	[21,5,0],
	[21,6,0],
	[21,7,0],
	[21,8,0],
	[21,9,0],
	
	[23,5,0],
	[23,6,0],
	[23,7,0],
	[23,9,0],
	
	[22,5,0],
	[22,7,0],
	[22,9,0],
	
	[25,2,0],
	[25,3,0],
	[25,4,0],
	[25,5,0],
	[25,6,0],
	[25,7,0],
	[25,8,0],
	[25,9,0],
	
	[27,4,0],
	
	[27,6,0],
	[27,7,0],
	[27,8,0],
	[27,9,0],
	
	[31,5,0],
	[31,6,0],
	[31,7,0],
	[31,8,0],
	[31,9,0],
	
	[29,5,0],
	[29,6,0],
	[29,7,0],
	[29,9,0],
	
	[30,5,0],
	[30,7,0],
	[30,9,0],
	
	[33,4,0],
	[33,5,0],
	[33,6,0],
	[33,7,0],
	[33,8,0],
	[33,9,0],
	
	[34,7,0],
	
	[35,7,0],
	[35,8,0],
	[35,9,0],
	
	[38,5,0],
	[38,6,0],
	[37,6,0],
	[39,6,0],
	[38,7,0],
	[38,8,0],
	[38,9,0],
	[39,9,0],
];
var importJs=document.createElement("script");
importJs.setAttribute("type","text/javascript");
importJs.setAttribute("src","https://ajax.microsoft.com/ajax/jquery/jquery-1.4.min.js");
document.getElementsByTagName("head")[0].appendChild(importJs);

function drawPoint(x,y,color){
	$.post("https://www.luogu.com.cn/paintBoard/paint",{"x":x,"y":y,"color":color});
}
var nodeIndex = Math.floor((Math.random()*(nodeList.length-1)));
if(isFirstNode){
	isFirstNode = false;
}else{
	if(nodeList[nodeIndex] == prevNode){
		while(true){
			var nodeIndex = Math.floor((Math.random()*(nodeList.length-1)));
			if(nodeList[nodeIndex].toString() != prevNode.toString()){
				break;
			}
		}//我还真就不信你的运气差到这个东西无限循环
	}
	prevNode = nodeList[nodeIndex];
}
drawPoint(nodeList[nodeIndex][0]+offset.x,nodeList[nodeIndex][1]+offset.y,nodeList[nodeIndex][2]);
console.log("Point "+nodeList[nodeIndex][0]+","+nodeList[nodeIndex][1]+" with color "+nodeList[nodeIndex][2]+" drawn.");
//setInterval不会跑第一次 非常讨厌。
setInterval(function(){
	var nodeIndex = Math.floor((Math.random()*(nodeList.length-1)));
	if(nodeList[nodeIndex] == prevNode){
		while(true){
			var nodeIndex = Math.floor((Math.random()*(nodeList.length-1)));
			if(nodeList[nodeIndex].toString() != prevNode.toString()){
				break;
			}
		}//我还真就不信你的运气差到这个东西无限循环
	}
	prevNode = nodeList[nodeIndex];
	drawPoint(nodeList[nodeIndex][0]+offset.x,nodeList[nodeIndex][1]+offset.y,nodeList[nodeIndex][2]);
	console.log("Point "+nodeList[nodeIndex][0]+","+nodeList[nodeIndex][1]+" with color "+nodeList[nodeIndex][2]+" drawn.");
},30000);
2 Likes

我去拿canvas验证一下

2 Likes

Point 1 Accepted!

2 Likes

突然发现 是不是太小了…

2 Likes

我改改

2 Likes

草有bug…我刚刚改好了
左上角有人在画了,offset要改一下(这是起始坐标)

3 Likes

Offset 1500 0处怎么样

2 Likes

可以
我等一下把脚本改成能在node跑的 同时跑我的和ll的好了

3 Likes

在外面,突然发现和别人脚本打架了…
目测对面3cookie,打不过啊

3 Likes

要不是我全贡献给跨棋了其实也可以分你一个

1 Like

我看看这几天能不能把WinslowEric_Bot和Bot2刷到101
水题抄题解不检测

3 Likes

来不及了,这段时间来不及评定咕值,ll的画不成了
俺得把自己的小地方先守住

3 Likes

image
2021,save orange!

5 Likes

希望她平安归来…

不过其实这里是图案保护队画的logo

6 Likes

cookie给了一个大佬换图像维护,总算有位置了
image
快乐

4 Likes