Commit 2f2da748 authored by TanakaKotoha's avatar TanakaKotoha

wdnmd

parent afb92986
// 0.2
// Prevents getting kicked for inactivity
var waitheatbeat = setInterval(function() {
if (this && this.GameMgr && this.GameMgr.Inst && Laya) {
setInterval(() => {
this.GameMgr.Inst._pre_mouse_point = new Laya.Point(Math.floor(Math.random() * document.getElementById('layaCanvas').width), Math.floor(Math.random() * document.getElementById('layaCanvas').height));
document.dispatchEvent(new Event('mousemove'));
}, 10000);
Laya.timer.loop(1e3, this.GameMgr, this.GameMgr.Inst.clientHeatBeat)
clearInterval(waitheatbeat);
}
}, 1000);
{
"id": "AntiAfk",
"version": "1.0.0",
"version": "1.1.0",
"name": "阻止进入挂机状态",
"author": "NeverDecaf",
"description": "我还活着呢!(√)\n你妈的,为什么(×)",
......
// 0.3
// Adds in-game keyboard controls
// v3
......@@ -27,18 +28,18 @@ var HOTKEYS = {
'left': 37, // left arrow
'right': 39, // right arrow
'discard': 13, // enter
'tsumogiri': 192, // ·
'skip': 191, // /
'pon': 65, // a
'chi': 83, // s
'kan': 68, // d
'win': 40, // ArrowUp
'riichi': 32, // space
'pei': 38, // ArrowDown
'tsumogiri': 84, // t
'skip': 83, // s
'pon': 80, // p
'chi': 67, // c
'kan': 75, // k
'win': 87, // w
'riichi': 82, // r
'pei': 78, // n
'nineterminalsabort': 188, // ,
'autowin': 77, // m
'nocall': 78, // n
'autogiri': 66, // b
'autowin': 72, // h
'nocall': 70, // f
'autogiri': 68, // d
}
// NUMPAD KEYS: 7 8 9 4 5 6 1 2 3 0 . +
var EMOJI_HOTKEYS = [103, 104, 105, 100, 101, 102, 97, 98, 99, 96, 110, 107];
......
{
"id": "KeyboardControls",
"version": "1.0.0",
"version": "1.1.0",
"name": "键盘操纵",
"author": ["NeverDecaf"],
"description": "现在各位一番人全体起立!\n太太要……纯键盘打麻将了……",
......
{
"id": "deselect2select",
"version": "1.0.0",
"version": "1.1.0",
"name": "奉纳反选",
"author": "anon",
"description": "破烂通通给老娘爬!(未选中任何礼物时点击「全部清除」,将选中紫礼物以外全部礼物)",
......
// 0.1
// 'Deselect All' button will select all non-purple gifts if none are currently selected.
var waitForLoad = setInterval(function() {
if (uiscript && uiscript.UI_Bag_PageGift && uiscript.UI_Bag.Inst) {
uiscript.UI_Bag_PageGift.prototype.clear_choose = (function () {
if (uiscript && uiscript.UI_Bag_PageGift && uiscript.UI_Bag.Inst && uiscript.UI_Bag.Inst.page_gift) {
uiscript.UI_Bag_PageGift.prototype.clear_choose = (function() {
var cacheF = uiscript.UI_Bag_PageGift.prototype.clear_choose;
return function () {
return function() {
var selected = 0;
for (key in this.choose_count)
selected += this.choose_count[key]
......@@ -24,14 +26,15 @@ uiscript.UI_Bag_PageGift.prototype.clear_choose = (function () {
}
}
};
})();
uiscript.UI_Bag_PageGift.prototype.refresh_stardust = (function () {
})();
uiscript.UI_Bag_PageGift.prototype.refresh_stardust = (function() {
var cacheF = uiscript.UI_Bag_PageGift.prototype.refresh_stardust;
return function () {
return function() {
cacheF.apply(this, arguments);
this.btn_clear_choose.visible = !0
};
})();
uiscript.UI_Bag.Inst.page_gift.container_sell.getChildByName("btn_clear").clickHandler = new Laya.Handler(uiscript.UI_Bag.Inst.page_gift, uiscript.UI_Bag.Inst.page_gift.clear_choose)
clearInterval(waitForLoad);
}}, 1000);
\ No newline at end of file
})();
uiscript.UI_Bag.Inst.page_gift.container_sell.getChildByName("btn_clear").clickHandler = new Laya.Handler(uiscript.UI_Bag.Inst.page_gift, uiscript.UI_Bag.Inst.page_gift.clear_choose)
clearInterval(waitForLoad);
}
}, 1000);
\ No newline at end of file
{
"id": "muteunfocus",
"version": "1.0.0",
"version": "1.1.0",
"name": "窗口失去焦点后自动静音",
"author": "anon",
"description": "论如何在上班的时候不让人知道自己在断幺九。",
......
const soundOptions = ['audio','music','lizhi','yuyin','teshuyuyin'];
// 0.1
// Mute sounds if window lost focus
const soundOptions = ['audio', 'music', 'lizhi', 'yuyin', 'teshuyuyin'];
var soundSettings = {};
var waitaudiomutemod = setInterval(function() {
if (view && view.AudioMgr) {
document.body.onfocus = () => {
var waitaudiomod = setInterval(function() {
if (view && view.AudioMgr) {
unMute = function() {
if (old = window.localStorage.getItem('soundSettings'))
soundSettings = JSON.parse(old);
Object.entries(soundSettings).forEach(([k, v]) => {
view.AudioMgr[k] = v;
});
}
document.body.onblur = () => {
}
unMute();
document.body.onfocus = () => {
unMute();
}
document.body.onblur = () => {
soundOptions.forEach((n) => {
soundSettings[n+'Muted'] = view.AudioMgr[n+'Muted'];
soundSettings[n + 'Volume'] = view.AudioMgr[n + 'Volume'];
soundSettings[n + 'Muted'] = view.AudioMgr[n + 'Muted'];
window.localStorage.setItem('soundSettings',JSON.stringify(soundSettings));
});
soundOptions.forEach((n) => {
view.AudioMgr[n+'Muted'] = true;
view.AudioMgr[n + 'Muted'] = true;
});
}
clearInterval(waitaudiomutemod);
}}, 1000);
\ No newline at end of file
}
clearInterval(waitaudiomod);
}
}, 1000);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment