From 340f6caf8604d60c60b217510dc622a587434f91 Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Wed, 8 Dec 2021 10:38:18 +0800 Subject: [PATCH 01/26] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E4=BA=BA=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/custom.js | 1 + js/handle.js | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/js/custom.js b/js/custom.js index 042b1b0..0316f63 100644 --- a/js/custom.js +++ b/js/custom.js @@ -154,6 +154,7 @@ function exitEv(id){ } // 进入广场 function peopleObj(name,uid,say,action,active_time, is_admin){ + // console.log(name + ' ' + uid + ' ' + say + ' ' + action + ' ' + active_time + ' ' + is_admin, 'sssss') let yspHtml = ''; let yspData = [ { diff --git a/js/handle.js b/js/handle.js index 697858e..e5f04c8 100644 --- a/js/handle.js +++ b/js/handle.js @@ -6,10 +6,21 @@ let musicUrl = 'https://bili.scdxtc.cn' // 自动删除不说话用户 let autoDel = false + +// 是否开始虚拟人物 +let virtualPeople = true + +// 虚拟人物数量 +let virtualNum = 50 + +let virtualList = [] + +let virtualWordList = ['哈哈哈', '我又来了!', '大爷闪亮登场', '真会玩 哈哈'] + // 多少秒不说话删除 let speakExpireTime = 10*60 // 歌曲列表 -var musicList = [] +let musicList = [] // 领舞人领舞时间 秒 let leaderTime = 15*60 @@ -315,7 +326,28 @@ function receiveMessage(event) // -------------------- 每条弹幕处理 end ----------------------- } +// 创建随机任务 +function createVirtual() { + for (let i = 0; i < virtualNum; i++) { + let eventName = eventTextList[Math.floor(Math.random()*(eventTextList.length-1))] + let word = virtualWordList[Math.floor(Math.random()*(virtualWordList.length-1))] + if (virtualList[i] != undefined) { + peopleObj(virtualList[i], 'virtual'+i, word, getEvent(eventName), 0, 0); + } else { + peopleObj('我是卧底95'+i, 'virtual'+i, word, getEvent(eventName), 1638930062, 0); + } + } +} + music(); // 清理缓存 sessionStorage.clear() + +$(function(){ + // 创建虚拟人物 + if (virtualPeople) { + createVirtual() + } +}) + window.addEventListener("message", receiveMessage, false); \ No newline at end of file From 01a39cfc041da6fdf9d417a75084821a38d11077 Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Wed, 8 Dec 2021 10:40:12 +0800 Subject: [PATCH 02/26] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E5=A7=93=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/handle.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/handle.js b/js/handle.js index 4326579..5b58063 100644 --- a/js/handle.js +++ b/js/handle.js @@ -13,6 +13,7 @@ let virtualPeople = true // 虚拟人物数量 let virtualNum = 50 +// 虚拟人物名字列表 let virtualList = [] let virtualWordList = ['哈哈哈', '我又来了!', '大爷闪亮登场', '真会玩 哈哈'] From 4278f400650ec6d23b16dd5595fcd00777e3cce6 Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Wed, 8 Dec 2021 10:43:01 +0800 Subject: [PATCH 03/26] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=AD=8C=E6=9B=B2?= =?UTF-8?q?=E5=8F=96=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dancing.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dancing.html b/dancing.html index f3862f3..80a9d3f 100644 --- a/dancing.html +++ b/dancing.html @@ -25,8 +25,8 @@ -