Commit 102183c2 authored by TanakaKotoha's avatar TanakaKotoha

new

parent ed4cfa74
{
"id": "FansView",
"version": "1.0.1",
"name": "番数显示",
"author": "88826",
"description": "17番你能秒我?你能秒杀我?!你今天能17番把白石奈奈给秒杀了,我当!场!就把这个牌桌给吃掉!",
"preview": "preview.png",
"entry": "script.js"
}
\ No newline at end of file
if (game) {
_show = uiscript.UI_TingPai.prototype._show;
uiscript.UI_TingPai.prototype._show = function (t, e) {
var fans = [];
if (view.DesktopMgr.bianjietishi) {
for (a = 0; a < this.items.length; a++)
this.items[a].container.visible = !1;
t = t.sort(function (t, e) {
return mjcore.MJPai.Distance(t.tile, e.tile)
});
for (var a = 0; a < t.length; a++) {
var s = t[a].count;
if (!t[a].yiman) {
s += view.DesktopMgr.Inst.mainrole.during_liqi;
}
fans[a] = !t[a].yiman ? s.toString() + "" : "役满";
if (t[a].yiman) {
this.items[a].container._childs[4]._childs[0].color = "#FFD700";
this.items[a].container._childs[4]._childs[0].bold = true;
if (s > 1) {
this.items[a].container._childs[4]._childs[0].y = 5;
this.items[a].container._childs[4]._childs[0].fontSize = 20;
fans[a] = s.toString() + "倍役满";
}
} else {
this.items[a].container._childs[4]._childs[0].color = "#FFFFFF";
this.items[a].container._childs[4]._childs[0].bold = false;
this.items[a].container._childs[4]._childs[0].fontSize = 27;
this.items[a].container._childs[4]._childs[0].y = 1;
}
this.items[a].container._childs[4]._childs[0].text = fans[a];
}
this.bg.bg.height = 280;
this.bg.bound.height = 280;
this.bg.bar.height = 280;
this.bg.mask.height = 280;
}
return _show.call(this, t, e);
}
}
//抄查水表作业
(function () {
const injectTingPaiUI = function () {
if (
typeof uiscript === 'undefined' ||
!uiscript.UI_DesktopInfo ||
typeof ui === 'undefined' ||
// !ui.mj.desktopInfoUI.uiView ||
!Laya.View.uiMap['mj/tingpai'] ||
!Laya.View.uiMap['lobby/friend']) {
console.log('Majsoul TingPaiUIScript inject failed, Retring.')
return setTimeout(injectTingPaiUI, 1000)
}
console.log('Majsoul TingPaiUIScript injected.');
//注入听牌ui
(() => {
let e = Laya.View.uiMap["mj/tingpai"].child[0].child[2].child;
let t = {
type: "Image",
props: {
y: 168,
x: 0,
width: 82,
skin: "myres/mjdesktop/bg_3.png",
name: "fans",
height: 30
},
child: [{
"type": "Label",
"props": {
"y": 1,
"x": -28,
"width": 140,
"text": "0番",
"height": 28,
"fontSize": 27,
"font": "SimHei",
"color": "#ffffff",
"align": "center"
}
}
]
}
for (var a = 0; a < 14; a++) {
e[a].child.push(t);
}
})();
}
injectTingPaiUI()
})()
{
"id": "FriendsRoom_AllOpen",
"version": "1.0.1",
"name": "友人房完全可自定义",
"author": "88826",
"description": "你在教我做事?\n(修改部分选项可能导致无法创建房间)",
"dir": "assets",
"preview": "preview.png",
"entry": "script.js",
"applyServer": [0],
"resourcepack": [{
"from": "myres/room/qieshangmanguan.png",
"to": "qieshangmanguan.png"
},{
"from": "myres/room/begin_open_mode.png",
"to": "begin_open_mode.png"
},{
"from": "myres/room/benchang.png",
"to": "benchang.png"
},{
"from": "myres/room/biao_dora.png",
"to": "biao_dora.png"
},{
"from": "myres/room/dora3_mode.png",
"to": "dora3_mode.png"
},{
"from": "myres/room/fafu_1.png",
"to": "fafu_1.png"
},{
"from": "myres/room/fafu_2.png",
"to": "fafu_2.png"
},{
"from": "myres/room/fafu_3.png",
"to": "fafu_3.png"
},{
"from": "myres/room/gang_biaodora.png",
"to": "gang_biaodora.png"
},{
"from": "myres/room/gang_lidora.png",
"to": "gang_lidora.png"
},{
"from": "myres/room/helelianzhuang.png",
"to": "helelianzhuang.png"
},{
"from": "myres/room/helezhongju.png",
"to": "helezhongju.png"
},{
"from": "myres/room/jifei.png",
"to": "jifei.png"
},{
"from": "myres/room/jingsuanyuandian.png",
"to": "jingsuanyuandian.png"
},{
"from": "myres/room/jiuchao_mode.png",
"to": "jiuchao_mode.png"
},{
"from": "myres/room/jiuzhongjiupai.png",
"to": "jiuzhongjiupai.png"
},{
"from": "myres/room/li_dora.png",
"to": "li_dora.png"
},{
"from": "myres/room/liqi.png",
"to": "liqi.png"
},{
"from": "myres/room/liujumanguan.png",
"to": "liujumanguan.png"
},{
"from": "myres/room/madian_1.png",
"to": "madian_1.png"
},{
"from": "myres/room/madian_2.png",
"to": "madian_2.png"
},{
"from": "myres/room/madian_3.png",
"to": "madian_3.png"
},{
"from": "myres/room/madian_4.png",
"to": "madian_4.png"
},{
"from": "myres/room/ming_dora_open.png",
"to": "ming_dora_open.png"
},{
"from": "myres/room/mutil_yakuman.png",
"to": "mutil_yakuman.png"
},{
"from": "myres/room/muyu_mode.png",
"to": "muyu_mode.png"
},{
"from": "myres/room/nanruxiru.png",
"to": "nanruxiru.png"
},{
"from": "myres/room/qieshangmanguan.png",
"to": "qieshangmanguan.png"
},{
"from": "myres/room/sanjiahele.png",
"to": "sanjiahele.png"
},{
"from": "myres/room/sifenglianda.png",
"to": "sifenglianda.png"
},{
"from": "myres/room/sigangsanle.png",
"to": "sigangsanle.png"
},{
"from": "myres/room/sijializhi.png",
"to": "sijializhi.png"
},{
"from": "myres/room/tianbian.png",
"to": "tianbian.png"
},{
"from": "myres/room/tingpailianzhuang.png",
"to": "tingpailianzhuang.png"
},{
"from": "myres/room/tingpaizhongju.png",
"to": "tingpaizhongju.png"
},{
"from": "myres/room/toutiao.png",
"to": "toutiao.png"
},{
"from": "myres/room/yifa.png",
"to": "yifa.png"
},{
"from": "myres/room/pai_left.png",
"to": "pai_left.png"
},{
"from": "myres/room/test_paixing.png",
"to": "test_paixing.png"
}]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
// Adds in-game keyboard controls
// v3
// get keycodes here: https://keycode.info/
// skip and discard hotkeys will also press the Confirm button at the end of round/game
// planned:
// selector for multi-wait chi calls
// maybe:
// tsumogiri + cancel on same button? might be conflicts such as tenpai state
// correctly switch selected tile after calling if tile moved
// allow skipping of quest/reward screen
// allow any call button to work if only 1 option is available
// If CONFIRM_DISCARDS is false tile hotkeys will discard immediately.
var CONFIRM_DISCARDS = false;
// show the hotkeys underneath the tiles.
var SHOW_TILE_HOTKEYS = true;
// 1 2 3 4 5 6 7 8 9 0 - = bksp |
var TILE_HOTKEYS = [49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 189, 187, 8, 220];
// some may not display correctly, override below:
var TILE_DISP = ['', '', '', '', '', '', '', '', '', '', '', '=', '', '\\'];
var HOTKEYS = {
// skip and discard hotkeys will also press the Confirm button at the end of round/game
'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
'nineterminalsabort': 188, // ,
'autowin': 77, // m
'nocall': 78, // n
'autogiri': 66, // b
}
// 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];
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
var waitkbmod = setInterval(() => {
try {
uiscript.UI_DesktopInfo.Inst.block_emo
view.ViewPlayer_Me.Inst.hand
window.onkeydown = function(e) {
// should enable spamming while key is held down (might be system/browser dependant)
var key = e.keyCode ? e.keyCode : e.which;
switch (key) {
case HOTKEYS.left:
// move 1 tile left
move_left();
break;
case HOTKEYS.right:
// move 1 tile right
move_right();
break;
}
}
window.onkeyup = function(e) {
var key = e.keyCode ? e.keyCode : e.which;
switch (key) {
case HOTKEYS.discard:
discardTile(selectedTile);
pressConfirm();
break;
case HOTKEYS.tsumogiri:
discardTile(view.ViewPlayer_Me.Inst.hand.length - 1);
break;
case HOTKEYS.skip:
callOperation('btn_cancel')
pressConfirm();
break;
case HOTKEYS.pon:
callOperation('btn_peng')
break;
case HOTKEYS.chi:
callOperation('btn_chi')
// if there are multiple, check this._data.chi.length > 1, see i.prototype.onBtn_Chi
break;
case HOTKEYS.kan:
callOperation('btn_gang')
break;
case HOTKEYS.win:
callOperation('btn_hu')
callOperation('btn_zimo')
break;
case HOTKEYS.riichi:
callOperation('btn_lizhi')
break;
case HOTKEYS.pei:
callOperation('btn_babei')
break;
case HOTKEYS.nineterminalsabort:
callOperation('btn_jiuzhongjiupai')
break;
case HOTKEYS.autowin:
toggleAuto('btn_autohu')
break;
case HOTKEYS.nocall:
toggleAuto('btn_autonoming')
break;
case HOTKEYS.autogiri:
toggleAuto('btn_automoqie')
break;
}
// send emojis
if (EMOJI_HOTKEYS.includes(key)) {
sendEmoji(EMOJI_HOTKEYS.indexOf(key));
}
// choose tile directly
if (TILE_HOTKEYS.includes(key)) {
var tile = TILE_HOTKEYS.indexOf(key);
if (tile < view.ViewPlayer_Me.Inst.hand.length) {
if (CONFIRM_DISCARDS)
selectTile(tile);
else
discardTile(tile);
}
}
}
function toggleAuto(op) {
uiscript.UI_DesktopInfo.Inst._container_fun.getChildByName(op)._clickHandler.method()
}
function discardTile(index) {
view.ViewPlayer_Me.Inst._choose_pai = view.ViewPlayer_Me.Inst.hand[index];
view.ViewPlayer_Me.Inst.can_discard && view.ViewPlayer_Me.Inst._choose_pai.valid && (view.ViewPlayer_Me.Inst.DoDiscardTile(),
view.ViewPlayer_Me.Inst.resetMouseState())
}
function pressConfirm() {
if (uiscript.UIMgr.Inst && uiscript.UIMgr.Inst._ui_liuju && uiscript.UIMgr.Inst._ui_liuju._enable)
uiscript.UIMgr.Inst._ui_liuju.onBtnConfirm();
if (uiscript.UIMgr.Inst && uiscript.UIMgr.Inst._ui_gameend && uiscript.UIMgr.Inst._ui_gameend._enable)
uiscript.UIMgr.Inst._ui_gameend.onConfirm();
if (uiscript.UI_Huleshow.Inst && uiscript.UI_Huleshow.Inst._enable)
uiscript.UI_Huleshow.Inst.onBtnConfirm();
if (uiscript.UI_ScoreChange.Inst && uiscript.UI_ScoreChange.Inst._enable)
uiscript.UI_ScoreChange.Inst.onBtnConfirm();
if (uiscript.UIMgr.Inst && uiscript.UIMgr.Inst._ui_win && uiscript.UIMgr.Inst._ui_win._enable)
uiscript.UIMgr.Inst._ui_win.onConfirm();
}
function sendEmoji(index) {
var validc = 0;
if (!uiscript.UI_DesktopInfo.Inst.block_emo.allgray)
uiscript.UI_DesktopInfo.Inst.block_emo.scrollview._container_items._childs.some((e, i) => {
if (e.getChildByName('btn')._clickHandler) {
if (validc == index) {
uiscript.UI_DesktopInfo.Inst.block_emo.muted = true;
uiscript.UI_DesktopInfo.Inst.block_emo.scrollview._container_items._childs[i].getChildByName('btn')._clickHandler.method()
return true;
}
validc++;
}
});
}
uiscript.UI_DesktopInfo.Inst.block_emo.__proto__.switchShow = (function() {
var cacheF = uiscript.UI_DesktopInfo.Inst.block_emo.__proto__.switchShow;
return function() {
if (this.muted)
this.muted = false;
else
return cacheF.apply(this, arguments);
};
})();
var selectedTile = 0;
function selectTile(index) {
var n = 0,
a = 0;
Laya.Browser.width / 1920 < Laya.Browser.height / 1080 ? a = (Laya.Browser.height - Laya.Browser.width / 1920 * 1080) / 2 : n = (Laya.Browser.width - Laya.Browser.height / 1080 * 1920) / 2;
Laya.MouseManager.instance.mouseX = ((index * view.ViewPlayer_Me.Inst.handwidth + view.ViewPlayer_Me.Inst.handorigin_x) - view.ViewPlayer_Me.Inst.screen_left) / (view.ViewPlayer_Me.Inst.screen_right - view.ViewPlayer_Me.Inst.screen_left) * (Laya.Browser.width - 2 * n);
Laya.MouseManager.instance.mouseY = (-view.ViewPlayer_Me.Inst.screen_top) / (view.ViewPlayer_Me.Inst.screen_bottom - view.ViewPlayer_Me.Inst.screen_top) * (Laya.Browser.height - 2 * a)
selectedTile = index;
}
function move_left() {
selectedTile = (selectedTile + view.ViewPlayer_Me.Inst.hand.length - 1) % view.ViewPlayer_Me.Inst.hand.length;
while (!view.ViewPlayer_Me.Inst.hand[selectedTile].valid) {
selectedTile = (selectedTile + view.ViewPlayer_Me.Inst.hand.length - 1) % view.ViewPlayer_Me.Inst.hand.length;
}
selectTile(selectedTile);
}
function move_right() {
selectedTile = (selectedTile + 1) % view.ViewPlayer_Me.Inst.hand.length;
while (!view.ViewPlayer_Me.Inst.hand[selectedTile].valid) {
selectedTile = (selectedTile + 1) % view.ViewPlayer_Me.Inst.hand.length;
}
selectTile(selectedTile);
}
function callOperation(opname) {
this.GameMgr.Inst._pre_mouse_point = new Laya.Point(1, 1);
if (uiscript.UI_LiQiZiMo.Inst.enable && uiscript.UI_LiQiZiMo.Inst._oplist.includes(opname)) {
uiscript.UI_LiQiZiMo.Inst.onClickOpBtn(opname)
} else if (uiscript.UI_ChiPengHu.Inst.enable && uiscript.UI_ChiPengHu.Inst._oplist.includes(opname)) {
uiscript.UI_ChiPengHu.Inst.onClickOpBtn(opname)
}
}
var keycss = `
:root {
--keySize: 2.5vw;
--keySizeH: 2.5vh;
}
.key__button {
box-sizing: border-box;
line-height: min(var(--keySize),calc(1.778*var(--keySizeH)));
font-size: calc(.8*min(var(--keySize),calc(1.778*var(--keySizeH))));
text-align: center;
width: var(--keySize);
color: #555;
height: var(--keySize);
max-width: calc(1.778*var(--keySizeH));
max-height: calc(1.778*var(--keySizeH));
border-color: #f2f2f2;
border-style: solid;
text-shadow: 0 0.5px 1px #777, 0 2px 6px #f2f2f2;
border-width: 1px;
border-radius: calc(.25*min(var(--keySize),calc(1.778*var(--keySizeH))));
background: -webkit-linear-gradient(top, #f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
font-family: sans-serif;
display: inline-block;
transition: box-shadow 0.3s ease, transform 0.15s ease;
box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 6px 0 #C0C0C0, 0 8px 17px rgba(#444, 0.4), 2px 1px 4px rgba(#444, 0.25), -2px 1px 4px rgba(#444, 0.25), 0 9px 16px rgba(#444, 0.1);
}
#tileLabels {
display: flex;
justify-content: space-around;
align-items: flex-end;
height: 100%;
width: var(--labelsWidth);
margin-left: var(--offsetLeft);
pointer-events: none;
}
#tileWrapper
{
width: 100vw;
height: 56.25vw; /* 100/56.25 = 1.778 */
max-height: 100vh;
max-width: 177.78vh; /* 16/9 = 1.778 */
margin: auto;
position: absolute;
top:0;bottom:0; /* vertical center */
left:0;right:0; /* horizontal center */
pointer-events: none;
}
`,
head = document.head || document.getElementsByTagName('head')[0],
style = document.getElementById('tileStyle') || document.createElement("STYLE");
style.setAttribute('id', 'tileStyle');
style.innerHTML = '';
style.type = 'text/css';
head.appendChild(style);
var n = 0,
a = 0;
Laya.Browser.width / 1920 < Laya.Browser.height / 1080 ? a = (Laya.Browser.height - Laya.Browser.width / 1920 * 1080) / 2 : n = (Laya.Browser.width - Laya.Browser.height / 1080 * 1920) / 2;
var x = (view.ViewPlayer_Me.Inst.handorigin_x - view.ViewPlayer_Me.Inst.screen_left - view.ViewPlayer_Me.Inst.handwidth / 2) / (view.ViewPlayer_Me.Inst.screen_right - view.ViewPlayer_Me.Inst.screen_left),
w = view.ViewPlayer_Me.Inst.handwidth * 14 / (view.ViewPlayer_Me.Inst.screen_right - view.ViewPlayer_Me.Inst.screen_left);
var keycssvars = ':root {--offsetLeft: ' + x * 100 + '%; --labelsWidth:' + w * 100 + '%; --maxWidth:' + w * 100 * 16 / 9 + 'vh}';
style.appendChild(document.createTextNode(keycssvars));
style.appendChild(document.createTextNode(keycss));
var tileWrapper = document.getElementById('tileWrapper') || document.createElement("DIV");
var tileLabels = document.getElementById('tileLabels') || document.createElement("DIV");
tileWrapper.innerHTML = '';
tileWrapper.setAttribute('id', 'tileWrapper')
tileLabels.innerHTML = '';
tileLabels.setAttribute('id', 'tileLabels')
tileWrapper.appendChild(tileLabels);
var TILE_ELEMENTS = [];
TILE_HOTKEYS.forEach((key, i) => {
let kdiv = document.createElement('DIV');
kdiv.setAttribute('class', 'key__button');
if (TILE_DISP[i])
kdiv.innerHTML = TILE_DISP[i];
else {
let chrCode = key - 48 * Math.floor(key / 48);
let chr = String.fromCharCode((96 <= key) ? chrCode : key);
kdiv.innerHTML = chr;
}
tileLabels.appendChild(kdiv);
TILE_ELEMENTS.push(kdiv);
});
document.body.appendChild(tileWrapper);
function isInGame() {
return this != null && view != null && view.DesktopMgr != null && view.DesktopMgr.Inst != null && view.DesktopMgr.player_link_state != null && game.Scene_MJ.Inst.active && (!uiscript.UI_GameEnd.Inst || !uiscript.UI_GameEnd.Inst.enable);
}
setInterval(() => {
if (isInGame() && SHOW_TILE_HOTKEYS) {
tileLabels.style.display = 'flex';
// hide unneeded hotkeys
TILE_ELEMENTS.forEach((e, i) => {
if (i < view.ViewPlayer_Me.Inst.hand.length)
e.style.visibility = 'visible';
else
e.style.visibility = 'hidden';
});
} else
tileLabels.style.display = 'none';
}, 500);
clearInterval(waitkbmod);
} catch (TypeError) {}
}, 1000);
\ No newline at end of file
{
"id": "KeyboardControls",
"version": "1.0.0",
"name": "键盘操纵",
"author": ["NeverDecaf"],
"description": "现在各位一番人全体起立!\n太太要……纯键盘打麻将了……",
"preview": "preview.png",
"entry": ["KeyboardControls.js"]
}
\ No newline at end of file
{
"id": "LootEmulator",
"version": "1.0.0",
"name": "抽卡模拟器",
"author": "88826",
"description": "麻将不打了,书也不读了,走了。",
"preview": "preview.png",
"entry": "script.js"
}
\ No newline at end of file
const LootList = {};
const UpList = {};
const Chance = { //概率
Characters: 0.05, //角色
Decoration: 0.15, //装扮
Gift_purple: 0.05, //紫礼物
Gift_blue: 0.51, //蓝礼物
//Gift_green: 0.24, 绿礼物,实际不会使用
Characters_Up: 0.51, //UP角色共用概率
Decoration_Up: 0.49 //Up装扮共用概率
}
const AfricaCompensate = true; //是否存在保底
//比较好的随机算法
function randomNum(minNum, maxNum) {
switch (arguments.length) {
case 1:
return parseInt(Math.random() * minNum + 1, 10);
break;
case 2:
return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
break;
default:
return 0;
break;
}
}
//获取奖池信息
function getLootList(e) {
if (!LootList[e]) {
for (var i in cfg.chest.preview.rows_) {
var Current_item = cfg.chest.preview.rows_[i];
if (!Current_item.check_activity || uiscript.UI_Activity.activity_is_running(Current_item.check_activity)) {
if (!LootList[Current_item.chest_id]) {
LootList[Current_item.chest_id] = {
Characters: [],
Decoration: [],
Gift_green: [],
Gift_blue: [],
Gift_purple: []
}
}
if (Current_item.type == "chara") {
LootList[Current_item.chest_id].Characters.push(Current_item.item_id);
}
if (Current_item.type == "skin") {
LootList[Current_item.chest_id].Decoration.push(Current_item.item_id);
}
if (Current_item.type == "gift") {
if (cfg.item_definition.item.map_[Current_item.item_id].sell_reward_count == 1) {
LootList[Current_item.chest_id].Gift_green.push(Current_item.item_id);
} else if (cfg.item_definition.item.map_[Current_item.item_id].sell_reward_count == 5) {
LootList[Current_item.chest_id].Gift_blue.push(Current_item.item_id);
} else {
LootList[Current_item.chest_id].Gift_purple.push(Current_item.item_id);
}
}
}
}
console.log(LootList);
}
}
//获取UP信息
function getUpList(e) {
if (!UpList[e]) {
var UpGroup = cfg.activity.chest_up.getGroup(uiscript.UI_Activity.onTreasureRateUpRetID(e));
if (UpGroup) {
for (GroupIndex in UpGroup) {
if (!UpList[UpGroup[GroupIndex].chest_id]) {
UpList[UpGroup[GroupIndex].chest_id] = {
Characters: [],
Decoration: []
};
}
for (ItemIndex in UpGroup[GroupIndex].up_items) {
var ItemId = UpGroup[GroupIndex].up_items[ItemIndex];
if (cfg.item_definition.item.map_[ItemId] != undefined) {
UpList[UpGroup[GroupIndex].chest_id].Decoration.push(ItemId);
}
if (cfg.item_definition.character.map_[ItemId] != undefined) {
UpList[UpGroup[GroupIndex].chest_id].Characters.push(ItemId);
}
}
}
}
console.log(UpList);
}
}
//模拟抽卡
function getResult(a, i, e) {
var Africa = true; //给非洲人的保底机制
for (var j = 0; j < i; j++) {
var Ran = randomNum(1, 100);
var ItemId = 200001;
var IsRepeat_Character = false;
var IsRepeat_Skin = false;
ItemId = LootList[e].Gift_green[randomNum(0, LootList[e].Gift_green.length - 1)]
if (Ran < (Chance.Characters + Chance.Decoration + Chance.Gift_purple + Chance.Gift_blue) * 100) {
ItemId = LootList[e].Gift_blue[randomNum(0, LootList[e].Gift_blue.length - 1)]
}
if (Ran < (Chance.Characters + Chance.Decoration + Chance.Gift_purple) * 100) {
Africa = false;
ItemId = LootList[e].Gift_purple[randomNum(0, LootList[e].Gift_purple.length - 1)]
}
if (Ran < (Chance.Characters + Chance.Decoration) * 100) {
if (UpList && UpList[e] && UpList[e].Decoration && UpList[e].Decoration.length > 0 && randomNum(0, 100) < Chance.Decoration_Up * 100) {
ItemId = UpList[e].Decoration[randomNum(0, UpList[e].Decoration.length - 1)]
//console.log("抽到UP装扮")
} else {
ItemId = LootList[e].Decoration[randomNum(0, LootList[e].Decoration.length - 1)]
}
for (var k = 0; k < a.results.length; k++) {
if (a.results[k].reward.id == ItemId) {
IsRepeat_Skin = true;
//console.log("装扮重复了");
}
}
}
if (Ran <= Chance.Characters * 100) {
IsRepeat_Skin = false; //防止出现角色被当装扮的状况
if (UpList && UpList[e] && UpList[e].Characters && UpList[e].Characters.length > 0 && randomNum(0, 100) < Chance.Characters_Up * 100) {
ItemId = UpList[e].Characters[randomNum(0, UpList[e].Characters.length - 1)];
//console.log("抽到UP角色")
} else {
ItemId = LootList[e].Characters[randomNum(0, LootList[e].Characters.length - 1)];
}
for (var k = 0; k < a.results.length; k++) {
if (a.results[k].reward.id == ItemId) {
IsRepeat_Character = true;
//console.log("角色重复了");
}
}
}
//非酋保底
if (AfricaCompensate && Africa && j == 9) {
//console.log("恁保底辣,蛤蛤蛤蛤蛤");
ItemId = LootList[e].Gift_purple[randomNum(0, LootList[e].Gift_purple.length - 1)];
}
let reward = {
reward: {
id: ItemId,
count: 1
}
}
//装扮重了,5星石安慰奖
if (IsRepeat_Skin) {
reward = {
reward: {
id: ItemId,
count: 1
},
replace: {
id: 302003,
count: 5
}
}
}
//角色重了,75母猪石(?)
if (IsRepeat_Character) {
reward = {
reward: {
id: ItemId,
count: 1
},
replace: {
id: 302002,
count: 75
}
}
}
a.results.push(reward);
}
}
if (game) {
//Hook 抽卡花费
let onCreate = uiscript.UI_Treasure.prototype.onCreate
uiscript.UI_Treasure.prototype.onCreate = function () {
for (var i in cfg.chest.chest.map_) {
cfg.chest.chest.map_[i].price = 0;
cfg.chest.chest.map_[i].price10 = 0;
}
return onCreate.call(this);
}
//Hook 再抽一次按钮
let show = uiscript.UI_Tanfang.prototype.show;
uiscript.UI_Tanfang.prototype.show = function (t, e) {
uiscript.UI_Tanfang.Inst.final_result.btn_again._clickHandler.method = function () {
uiscript.UI_Tanfang.Inst.final_result.close();
var e = uiscript.UI_Tanfang.Inst.chest_id;
var r = {};
r.results = [];
getResult(r, 1, e)
uiscript.UI_Tanfang.Inst.show(e, r.results)
}
return show.call(this, t, e)
}
//Hook 抽卡按钮
uiscript.UI_TanfangRoot.prototype._show = function (e, i, n) {
var a = this;
this.beginload(),
this.loading.visible = !1,
this.need_show_loading = !0,
Laya.timer.clearAll(this),
Laya.timer.once(500, this, function () {
a.need_show_loading && (a.loading.visible = !0)
}),
this.waiting_to_show = !1,
this.chect_id = e, //猫粮的奇怪拼写?
//原函数结束
getLootList(e)
getUpList(e)
a.results = []
getResult(a, i, e)
a.loadover ? a.show_result() : a.waiting_to_show = !0,
this.enable = !0;
}
}
{
"id": "MajsoulHelper",
"version": "4.1.5",
"name": "牌理辅助",
"author": ["Fr0stbyteR"],
"description": "麻将就是要笑着打。\nWDNMD!\n天凤牌理诚不欺我(",
"preview": "preview.png",
"entry": "main.js"
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(){
const inject = function() {
if (typeof view !== "undefined" && view.DesktopMgr.Inst) {
console.log("Majsoul Helper injected.");
for (const key in view.DesktopMgr.Inst.actionMap) {
const action = view.DesktopMgr.Inst.actionMap[key];
const m = action.method;
action.method = (e) => {
setTimeout(() => analyseOperation(e), 500);
return m(e);
};
}
} else setTimeout(inject, 1000);
// uiscript.UI_GameEnd.prototype.show = () => game.Scene_MJ.Inst.GameEnd();
// uiscript.UI_PiPeiYuYue.Inst.addMatch(2);
}
const analyseOperation = function(e) {
const action = e.msg;
if (action.hasOwnProperty("md5")) {
setTimeout(() => {
view.DesktopMgr.Inst.setAutoHule(true);
view.DesktopMgr.Inst.setAutoMoQie(true);
view.DesktopMgr.Inst.setAutoNoFulu(true);
uiscript.UIMgr.Inst._ui_desktop.refreshFuncBtnShow(uiscript.UIMgr.Inst._ui_desktop._container_fun.getChildByName("btn_autohu"), 1);
}, 2000)
}
}
inject();
console.log("auto hule inited");
}()
{
"id": "autohule",
"version": "2.0.0",
"name": "自动和了",
"author": "Ethan",
"description": "盖亚!!!!!!!!!!",
"preview": "preview.png",
"entry": "autohule.js",
"applyServer": [0]
}
{
"id":"fulu",
"version":"1.0.0",
"name": "副露占位提示",
"author": ["8q","AnriMachishiro"],
"preview": "preview.png",
"description": "你还记得你打出过多少张鸣牌吗?",
"entry": "fulu.js"
}
(function () {
const alpha = 76 // alpha 值,取值范围 [0, 255] 只能取整数
const images = {}
const recreateResource = Laya.Texture2D.prototype.recreateResource
Laya.Texture2D.prototype.recreateResource = function (...args) {
if (this.src && this.src.includes("scene/Assets/Resource/mjpai/") && !this.src.endsWith("/hand.png") && !images[this.src]) images[this.src] = this._image
if (this['8q_fulu_sign']) {
const pixels = this._pixels, width = this._width, faceWidth = .65 * width, backColor = [pixels[0], pixels[1], pixels[2], alpha]
for (let i = 0; i < pixels.length; i += 4) {
if ((i / 4) % width > faceWidth) {
[pixels[i], pixels[i + 1], pixels[i + 2], pixels[i + 3]] = backColor
} else {
pixels[i + 3] = Math.min(alpha + ((pixels[i] - 223) ** 2 + (pixels[i + 1] - 223) ** 2 + (pixels[i + 2] - 220) ** 2) / 256, 255)
}
}
}
return recreateResource.call(this, ...args)
}
const textures = {}
view.Block_QiPai.prototype.QiPaiNoPass = function () {
if (this.last_pai) {
this.last_pai['8q_fulu_sign'] = true
const material = this.last_pai.model.meshRender.sharedMaterial
material.cull = Laya.BaseMaterial.CULL_NONE
material.blend = Laya.BaseMaterial.BLEND_ENABLE_SEPERATE
const src = material.getTexture(1).src
let texture = textures[src]
if (!texture) {
texture = textures[src] = new Laya.Texture2D(true, material._repeat, material._format, material._mipmap)
texture['8q_fulu_sign'] = true
texture._setUrl(src)
texture.onAsynLoaded(src, images[src], undefined)
images[src] = null
}
material.setTexture(1, texture)
// 如果希望立直牌被鸣走后,下一张牌也横过来,就取消下面两行注释
//const last_is_liqi = this.last_is_liqi
this.QiPaiPass()
//this.last_is_liqi = last_is_liqi
}
}
view.DesktopMgr.prototype.getPaiLeft = function (val) { // 因为被鸣的牌没有被移除,所以算剩余牌会把它也算进去
let cnt = 0
for (let i = 0; i < 4; i++) {
const player = this.players[i]
for (let pai of player.container_babei.pais) {
if (mjcore.MJPai.Distance(pai.val, val) == 0) cnt++
}
for (let pai of player.container_ming.pais) {
if (mjcore.MJPai.Distance(pai.val, val) == 0) cnt++
}
for (let pai of player.container_qipai.pais) {
if (!pai['8q_fulu_sign']) { // dirty fix, TODO: refactor
if (mjcore.MJPai.Distance(pai.val, val) == 0) cnt++
}
}
if (player.container_qipai.last_pai && mjcore.MJPai.Distance(player.container_qipai.last_pai.val, val) == 0) cnt++
}
for (let pai of this.mainrole.hand) {
if (mjcore.MJPai.Distance(pai.val, val) == 0) cnt++
}
for (let paiVal of this.dora) {
if (paiVal && mjcore.MJPai.Distance(paiVal, val) == 0) cnt++
}
const left = 4 - cnt
return left < 0 ? 0 : left > 4 ? 4 : left
}
}())
{"id":"koikake","version":"1.0.0","name":"恋×シンアイ彼女","author":"Fubuki","description":"","preview":"assets/preview.jpg","resourcepack":[{"from":"scene/Assets/Resource/tablecloth/tablecloth_default/Table_Dif.jpg","to":"Table_Dif.jpg","all-servers":true},{"from":"myres2/tablecloth/tablecloth_default/preview.jpg","to":"preview.jpg","all-servers":true},{"from":"extendRes/items/tablecloth_navy.jpg","to":"preview.jpg","all-servers":true}]}
\ No newline at end of file
const intervalId = setInterval(() => {
if (cfg && cfg.item_definition && cfg.item_definition.item) {
const item = cfg.item_definition.item.get('305044')
item.name_chs = '恋×シンアイ彼女'
item.desc_chs = ''
clearInterval(intervalId)
}
}, 2000)
\ No newline at end of file
{
"id": "paulzzh_plugin_zjdc",
"version": "2.1.0",
"name": "最近大铳",
"author": "Paulzzh",
"description": "点炮太多,我很抱歉。",
"entry": "paulzzh_plugin_zjdc.user.js",
"applyServer": [0, 1, 2, 3]
}
// ==UserScript==
// @name 【雀魂】最近大铳
// @namespace https://paulzzh.tech/
// @supportURL https://github.com/paulzzh/Majsoul-Chong
// @version 2.1.0
// @description 最近大铳插件,让最近大和区域显示最近大铳
// @author Paulzzh
// @license MIT
// @match *://majsoul.com/1/
// @match *://www.majsoul.com/1/
// @match *://game.maj-soul.com/1/
// @match *://game.mahjongsoul.com/
// @match *://mahjongsoul.game.yo-star.com/
// @grant none
// @icon https://img.paulzzh.tech/other/majsoul/zjdc.png
// ==/UserScript==
(function() {
'use strict';
window.paulzzh_plugin_zjdc = {};
paulzzh_plugin_zjdc.enable = true; //插件效果总开关
//==================================
//
// 最近大铳 插件配置
//
//大铳大和切换延迟(毫秒)
paulzzh_plugin_zjdc.display_showtime = 3000;
//插件注入成功后是否展示提示框
paulzzh_plugin_zjdc.show_welcome = true;
//是否展示最近大铳最近大和
paulzzh_plugin_zjdc.show_zjdc = true;
//是否上报对局牌谱
paulzzh_plugin_zjdc.push_record = true;
//以下内容请不要修改
paulzzh_plugin_zjdc.version = "2.1.0";
paulzzh_plugin_zjdc.readme = "【最近大铳】插件 权限申请\n版本:"+paulzzh_plugin_zjdc.version+"\n\n本插件会收集您和他人的account_id,昵称,对局日期,和(铳)牌信息等信息。\n会储存您和他人的account_id,和(铳)牌信息等信息。\n为了实现插件的基础功能,这些数据是必须的。\n他们会被上传到第三方服务器 "+paulzzh_plugin_zjdc.server+"\n本插件与雀魂官方无任何联系,放铳数据均来自安装此插件的用户主动上传。\n\n温馨提示:第一次使用没有放铳数据是无法显示的,建议您先铳个大的再在个人信息页查看~\n演示视频:av65372237(b站)\n开源地址:https://github.com/paulzzh/Majsoul-Chong\n\n此提示只会显示一次,确定后将不再提示。\n\n\n2.0.0更新:全新2.0.0版本发布,兼容国服日服美服,兼容铜/银/金/玉/王座/友人/比赛/休闲普通/宝牌狂热/明牌配牌/龙之目玉等三麻/四麻/活动场,其中除金玉王比赛之外的房间依靠用户上报/好友推送"
//最近大铳 数据交换服务器 一般情况下不需要修改。
//为了确认用户身份,会收集您和他人的account_id,昵称,对局日期,和(铳)牌信息等信息;会储存您和他人的account_id,和(铳)牌信息等信息。
paulzzh_plugin_zjdc.server = "https://majsoul.paulzzh.tech/api/v2/zjdc?version="+paulzzh_plugin_zjdc.version;
//==================================
//切换大铳大和
paulzzh_plugin_zjdc.display = function() {
var vui=paulzzh_plugin_zjdc.display_vui;
var datas = paulzzh_plugin_zjdc.display_data;
var data=datas[paulzzh_plugin_zjdc.display_which%datas.length];
vui.me.getChildAt(0).getChildAt(0).text = data.text;
vui.me.getChildAt(0).getChildAt(0).color = data.color;
vui.me.getChildAt(0).getChildAt(0).font = data.font;
vui._showDaHe(data.data.hands, data.data.ming, data.data.hupai);
vui._setTitle(data.data.title_id);
paulzzh_plugin_zjdc.display_which +=1;
};
paulzzh_plugin_zjdc.display_inv = [];
paulzzh_plugin_zjdc.display_clear = function(vui){
vui.me.getChildAt(0).getChildAt(0).text = "最近大和";
vui.me.getChildAt(0).getChildAt(0).color = "#e8af71";
vui.me.getChildAt(0).getChildAt(0).font = "fengyu";
var l=paulzzh_plugin_zjdc.display_inv.length;
for(var i=0; i<l ; i++){
clearInterval(paulzzh_plugin_zjdc.display_inv.shift());
}
paulzzh_plugin_zjdc.display_which = 0;
}
//网络请求,铳牌获取
paulzzh_plugin_zjdc.query = function(vui,account_id,which,t) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200 && account_id==paulzzh_plugin_zjdc.account_id && which==paulzzh_plugin_zjdc.which) {
try {
paulzzh_plugin_zjdc.display_clear(vui);
var ret = JSON.parse(xhr.responseText);
if (ret.code) {
var data = []
if (ret.data_c){
data.push({"text":"最近大铳","color":"#ff4e4e","font":"fengyu","data":ret.data_c});
};
if (ret.data_z){
//雀魂fengyu字体没有"炸"这个字。。没办法只能换字体
data.push({"text":"最近炸庄","color":"#c1c630","font":"SimHei","data":ret.data_z});
};
if (t.statistic_data){
for (var a = 0; a < t.statistic_data.length; a++) {
var r = t.statistic_data[a];
if (which==String(r.mahjong_category)+String(r.game_category)){
data.push({"text":"最近大和","color":"#e8af71","font":"fengyu","data":r.statistic.highest_hu});
break
}
}
};
paulzzh_plugin_zjdc.display_data=data;
paulzzh_plugin_zjdc.display_vui=vui;
paulzzh_plugin_zjdc.display_inv.push(setInterval(paulzzh_plugin_zjdc.display,paulzzh_plugin_zjdc.display_showtime));
}
} catch(error) {
console.log("[最近大铳]" + error.message)
}
}
};
xhr.open("post", paulzzh_plugin_zjdc.server, true);
xhr.setRequestHeader("Content-Type", "application/json");
var tosend={"action":"query","self_id":GameMgr.Inst.account_id,"target_id":account_id,"type":which};
console.log(tosend);
xhr.send(JSON.stringify(tosend));
};
//网络请求,对局记录
paulzzh_plugin_zjdc.push = function(uuid) {
if (paulzzh_plugin_zjdc.enable && GameMgr.Inst.ingame && uuid.length==43){
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
var ret = JSON.parse(xhr.responseText);
console.log(ret.message)
}
};
xhr.open("post", paulzzh_plugin_zjdc.server, true);
xhr.setRequestHeader("Content-Type", "application/json");
var tosend={"action":"push","self_id":GameMgr.Inst.account_id,"uuid":uuid,"area":GameMgr.client_language};
console.log(tosend);
xhr.send(JSON.stringify(tosend));
}
};
//对于雀魂的hack
paulzzh_plugin_zjdc.hook = function() {
try {
//需要注入的东西,要在游戏加载完后修改
if (uiscript.UI_PlayerInfo.Inst && uiscript.UI_OtherPlayerInfo.Inst && uiscript.UI_PlayerInfo.Inst.show && uiscript.UI_OtherPlayerInfo.Inst.show && uiscript.UI_PlayerInfo.Inst.detail_data.blocks[1].show && uiscript.UI_OtherPlayerInfo.Inst.detail_data.blocks[1].show && game.Scene_MJ.Inst.GameEnd) {
console.log("[最近大铳]游戏已登录");
try {
//自己详情页
paulzzh_plugin_zjdc.funcpds = uiscript.UI_PlayerInfo.Inst.detail_data.blocks[1].show;
uiscript.UI_PlayerInfo.Inst.detail_data.blocks[1].show = function(t, e, n, a) {
var w = String(e)+String(n);
var vui = uiscript.UI_PlayerInfo.Inst.detail_data.blocks[1];
var account_id = GameMgr.Inst.account_id;
paulzzh_plugin_zjdc.display_clear(vui);
//xhr异步问题,为了验证一下选项卡是否更改
paulzzh_plugin_zjdc.which=w;
paulzzh_plugin_zjdc.account_id=account_id;
if(paulzzh_plugin_zjdc.enable && paulzzh_plugin_zjdc.show_zjdc && a==1){
paulzzh_plugin_zjdc.query(vui,account_id,w,t);
}
paulzzh_plugin_zjdc.funcpds.apply(this, [t, e, n, a])
};
//别人详情页
paulzzh_plugin_zjdc.funcopds = uiscript.UI_OtherPlayerInfo.Inst.detail_data.blocks[1].show;
uiscript.UI_OtherPlayerInfo.Inst.detail_data.blocks[1].show = function(t, e, n, a) {
var w = String(e)+String(n);
var vui = uiscript.UI_OtherPlayerInfo.Inst.detail_data.blocks[1];
var account_id = uiscript.UI_OtherPlayerInfo.Inst.account_id;
paulzzh_plugin_zjdc.display_clear(vui);
//xhr异步问题,为了验证一下选项卡是否更改
paulzzh_plugin_zjdc.which=w;
paulzzh_plugin_zjdc.account_id=account_id;
if(paulzzh_plugin_zjdc.enable && paulzzh_plugin_zjdc.show_zjdc && a==1){
paulzzh_plugin_zjdc.query(vui,account_id,w,t);
}
paulzzh_plugin_zjdc.funcopds.apply(this, [t, e, n, a])
};
//对局结束了
paulzzh_plugin_zjdc.GameEnd = game.Scene_MJ.Inst.GameEnd;
game.Scene_MJ.Inst.GameEnd = function() {
if(paulzzh_plugin_zjdc.enable && paulzzh_plugin_zjdc.push_record){
paulzzh_plugin_zjdc.push(GameMgr.Inst.mj_game_uuid);
}
paulzzh_plugin_zjdc.GameEnd.apply(this)
};
clearInterval(paulzzh_plugin_zjdc.inv);
console.log("[最近大铳]插件已成功注入!");
if(paulzzh_plugin_zjdc.enable && paulzzh_plugin_zjdc.show_welcome){
uiscript.UI_LightTips.Inst.show("【最近大铳】插件 已成功注入!");
}
if(localStorage.getItem("paulzzh_plugin_zjdc_xieyi") != paulzzh_plugin_zjdc.version){
uiscript.UI_InfoLite.Inst.show(paulzzh_plugin_zjdc.readme);
localStorage.setItem("paulzzh_plugin_zjdc_xieyi",paulzzh_plugin_zjdc.version);
}
} catch(error) {
console.log("[最近大铳]插件注入失败" + error.message)
}
} else {
console.log("[最近大铳]游戏未加载完毕")
}
} catch(error) {
console.log("[最近大铳]插件注入失败" + error.message)
}
};
//检测雀魂加载状态
paulzzh_plugin_zjdc.inv = setInterval(paulzzh_plugin_zjdc.hook,3000)
})();
\ No newline at end of file
{
"id": "reportVoice",
"version": "3.0.1",
"name": "解锁所有语音",
"author": "Majsoul Plus Team",
"description": "可以在本地解锁全部角色语音。\n让您获得完整麻将体验。",
"preview": "preview.jpg",
"entry": "script.js"
}
// Hack 开启报番型,作者 Majsoul Plus Team
const hackVoice = () => {
if (cfg && cfg.voice && cfg.voice.sound) {
cfg.voice.sound.rows_.forEach(sound => {
sound.level_limit = 0
sound.bond_limit = 0
})
}
}
const autoRun = () => {
try {
if (cfg.voice.sound) {
const raw = cfg.voice.sound
let timer = 0
const proxy = new Proxy(raw, {
get(target, key) {
clearTimeout(timer)
timer = setTimeout(hackVoice, 0)
return target[key]
},
set(target, key, value) {
target[key] = value
clearTimeout(timer)
timer = setTimeout(hackVoice, 0)
return true
}
})
cfg.voice.sound = proxy
console.log('Hacked所有语音')
} else {
throw new Error()
}
} catch (error) {
requestAnimationFrame(autoRun)
}
}
const reportVoice = setInterval(() => {
if (game) {
clearInterval(reportVoice)
requestAnimationFrame(autoRun)
}
}, 1000)
{
"id":"shuibiao",
"version":"1.1.1",
"name": "玩家信息查看扩展",
"author": "unknown",
"preview": "preview.png",
"description": "FBI OPEN THE DOOR!",
"entry": "script.js"
}
(function () {
const injectUI = function () {
if (
typeof uiscript === 'undefined' ||
!uiscript.UI_DesktopInfo ||
typeof ui === 'undefined' ||
// !ui.mj.desktopInfoUI.uiView ||
!Laya.View.uiMap['mj/desktopInfo'] ||
!Laya.View.uiMap['lobby/friend']) {
console.log('Majsoul UIScript inject failed, Retring.')
return setTimeout(injectUI, 1000)
}
console.log('Majsoul UIScript injected.');
// 注入"查看"按钮UI
(() => {
let e = Laya.View.uiMap['lobby/friend'].child[1].child[2].child[2].child[0].child[0].child;
let t = {
type: 'Button',
props: {
y: 99,
x: 450,
width: 156,
stateNum: 1,
skin: 'chs_t/myres/btn_small.png',
name: 'check',
height: 70,
anchorY: 0.5,
anchorX: 0.5,
sizeGrid: '30,30,30,30'
},
child: [{
type: 'Label',
props: {
y: 9,
x: 39,
width: 82,
text: '查看',
height: 39,
fontSize: 40,
font: 'chst_fengyu',
color: '#e6ba78',
align: 'center'
},
child: [{
type: 'Script',
props: {
runtime: "capsui.LabelLocalizationSize"
}
}
]
}, {
type: 'Script',
props: {
runtime: 'capsui.CButton'
}
}
]
};
e[0].child.push(t);
e[1].child.push(t);
})();
// 查水表 Class Start
var cyInitMgr = (function () {
function e() {
(this.f = []),
(this.done = []),
(e.Inst = this)
}
return (
(e.prototype.register = function (c, f) {
this.f.push({
c: c,
f: f
})
}),
(e.prototype.init = function (c) {
if (this.done.includes(c))
return
for (var i = 0; i < this.f.length; ++i) {
if (this.f[i].c == c)
this.f[i].f()
}
this.done.push(c)
}),
(GameMgr.Inst.EnterLobby = (function () {
var o = GameMgr.Inst.EnterLobby
return function () {
return cyInitMgr.Inst.init('lobby'),
o.apply(this, arguments)
}
})()),
e)
})();
new cyInitMgr();
// 查水表 Class End
// 注册到 lobby Start
cyInitMgr.Inst.register('lobby', () => {
const setItem = uiscript.UI_Friend.Inst.page_search.setItem
uiscript.UI_Friend.Inst.page_search.setItem = function (e, i, n) {
let x = setItem.call(this, e, i, n)
var c = 0;
["p0", "p1"].forEach(v => {
if (n[v]) {
n[v]["btn_check"] = i.getChildByName(v).getChildByName('check');
let id = this.playerinfos[2 * e + c].account_id
n[v]["btn_check"].clickHandler = Laya.Handler.create(
this,
function () {
uiscript.UI_OtherPlayerInfo.Inst.show(id)
}, null, false)
c = !c;
}
});
return x
}
})
// 注册到 lobby End
uiscript.UI_DesktopInfo.prototype.refreshSeat = function (t) {
void 0 === t && (t = !1);
view.DesktopMgr.Inst.seat;
for (var e = view.DesktopMgr.Inst.player_datas, i = 0; i < 4; i++) {
var n = view.DesktopMgr.Inst.localPosition2Seat(i),
a = this._player_infos[i];
if (n < 0)
a.container.visible = !1;
else {
a.container.visible = !0;
var r = view.DesktopMgr.Inst.getPlayerName(n);
if (game.Tools.SetNickname(a.name, r), a.head.id = e[n].avatar_id, a.head.head_frame = e[n].avatar_frame, a.avatar = e[n].avatar_id, 0 != i) {
var s = e[n].account_id && 0 != e[n].account_id,//移除牌谱模式判断 && view.DesktopMgr.Inst.mode != view.EMJMode.paipu,
o = e[n].account_id && 0 != e[n].account_id && view.DesktopMgr.Inst.mode == view.EMJMode.play,
l = view.DesktopMgr.Inst.mode != view.EMJMode.play;
t ? a.headbtn.onChangeSeat(s, o, l) : a.headbtn.reset(s, o, l)
}
e[n].title ? a.title.id = game.Tools.titleLocalization(e[n].account_id, e[n].title) : a.title.id = 0
}
}
};
// 改写 看信息 按钮
uiscript.UI_DesktopInfo.prototype.btn_seeinfo = function (t) {
if (view.DesktopMgr.Inst.gameing) {
var i = view.DesktopMgr.Inst.player_datas[view.DesktopMgr.Inst.localPosition2Seat(e)].account_id;
0 != i && (view.DesktopMgr.Inst.game_config, t.UI_OtherPlayerInfo.Inst.show(i, view.DesktopMgr.Inst.game_config.mode.mode < 10 ? 1 : 2))
}
};
console.log('查水表插件加载完毕')
}
injectUI()
})()
{
"id": "tablecloth_zxhh",
"version": "1.0.0",
"name": "桌布-仲夏花火",
"author": "AnriMachishiro",
"description": "官方隐藏桌布",
"preview": "assets/preview.jpg",
"resourcepack": [{
"from": "scene/Assets/Resource/tablecloth/tablecloth_default/Table_Dif.jpg",
"to": "Table_Dif.jpg",
"all-servers": true
}, {
"from": "myres2/tablecloth/tablecloth_default/preview.jpg",
"to": "preview.jpg",
"all-servers": true
}, {
"from": "extendRes/items/tablecloth_navy.jpg",
"to": "preview.jpg",
"all-servers": true
}]
}
\ No newline at end of file
const intervalId = setInterval(() => {
if (cfg.item_definition.item) {
const item = cfg.item_definition.item.get('305044')
item.name_chs = '桌布-仲夏花火'
item.desc_chs = '官方隐藏桌布'
clearInterval(intervalId)
}
}, 1000)
;
\ No newline at end of file
{
"id": "there_is_no_male",
"version":"1.1.2",
"name": "不要男妈妈",
"author": "Handle",
"description": "伞兵一号月见山准备就绪!\n不是我怎么被轰出去了啊……\n难受啊……马飞……",
"entry": "script.js",
"preview": "preview.png"
}
// 你们为什么要这样对待男生啊摔
if (game) {
console.log("男士止步版本 1.1.2")
;(() => {
const sexBlackVar = 2
const backupFun = game.Scene_MJ.prototype.openMJRoom
game.Scene_MJ.prototype.openMJRoom = function (...args) {
try {
const game_datas = args[0]
const mode_datas = game_datas.mode
const player_datas = args[1]
// console.log(args)
if (Array.isArray(player_datas)) {
player_datas.forEach(player_data => {
if (
player_data.character &&
cfg.item_definition.character.map_[player_data.character.charid]
.sex === sexBlackVar
) {
const allCharactersKeys = Object.keys(
cfg.item_definition.character.map_
)
const noMaleCharacters = allCharactersKeys.reduce((pre, cur) => {
if (
cfg.item_definition.character.map_[cur].sex !== sexBlackVar
) {
pre[cur] = cfg.item_definition.character.map_[cur]
}
return pre
}, {})
const noMaleCharactersKeys = Object.keys(noMaleCharacters)
const randomID =
noMaleCharactersKeys[
parseInt(Math.random() * noMaleCharactersKeys.length)
]
const characterInfo = cfg.item_definition.character.map_[randomID]
const canMarry = characterInfo.can_marry
player_data.avatar_id = 400101
const character = player_data.character
if (character.charid) {
// const views = character.views
character.charid = randomID
character.extra_emoji = [10, 11, 12, 13]
character.is_upgraded = true
character.level = 5
character.skin = canMarry
? Math.random() > 0.5
? characterInfo.init_skin
: characterInfo.full_fetter_skin
: characterInfo.init_skin
player_data.avatar_id = character.skin
}
}
})
}
args[1] = player_datas
} catch (e) {
// console.warn(e)
}
return backupFun.call(this, ...args)
}
})()
}
{
"id": "unlock",
"version": "1.3.2",
"name": "本地解锁一切内容",
"author": ["guano"],
"description": "梦里什么都有。",
"preview": "preview.png",
"entry": "script.js"
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"id": "yoFix",
"version": "1.0.1",
"name": "修复外服 Yo",
"author": "某昨P",
"description": "这个扩展修复了日服和美服卡在10/10的加载问题!",
"preview": "preview.jpg",
"loadBeforeGame": true,
"entry": "https://passport.mahjongsoul.com/js/yo_acc.prod_ja.js",
"applyServer": [1, 2]
}
{
"id": "CustomBGM",
"version": "5.0.0",
"name": "BGM Replace",
"author": "Tachibana",
"description": "BGM Replace",
"preview": "preview.jpg",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace": [
"audio/music/game.mp3",
"audio/music/liqi_chuzhen.mp3",
"audio/music/liqi1.mp3",
"audio/music/liqi2.mp3",
"audio/music/lobby.mp3",
"audio/music/zhongxialvdong.mp3",
"audio/music/yichujifa.mp3"
]
}
{
"id": "loliass",
"version": "1.0.2",
"name": "你把你泳装给我交了",
"author": "hat",
"description": "这波啊,这波是把阳菜和轻库娘的泳装全扒了。\n至于爽哥……那么小没得看露个点算了。",
"preview": "preview.png",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace":[
"extendRes/charactor/wushilanyangcai_YZ/full.png",
"extendRes/charactor/wushilanyangcai_YZ/half.png",
"extendRes/charactor/wushilanyangcai_YZ/smallhead.png",
"extendRes/charactor/wushilanyangcai_YZ/waitingroom.png",
"extendRes/charactor/qianzhi_YZ/full.png",
"extendRes/charactor/qianzhi_YZ/waitingroom.png",
"extendRes/charactor/qingku_YZ/full.png",
"extendRes/charactor/qingku_YZ/half.png",
"extendRes/charactor/qingku_YZ/waitingroom.png"
]
}
{
"id": "tiles_Revolution",
"version": "1.0.0",
"name": "牌背-浪花朵朵(国服/日服)",
"author": "Tachibana",
"description": "没有什么装扮是强行提取资源然后替换默认所无法解决的。",
"preview": "preview.jpg",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace": [
"extendRes/items/mjp_orange.jpg",
"jp/extendRes/items/mjp_orange.jpg",
"jp/myres2/mjp/mjp_default/preview.png",
"myres2/mjp/mjp_default/preview.png",
"res/atlas/jp/myres2/mjp/mjp_default/ui.png",
"res/atlas/myres2/mjp/mjp_default/ui.png",
"scene/Assets/Resource/mjpai/mjp_default/hand_ui.png",
"scene/Assets/Resource/mjpai/mjp_default/mjp.png"
]
}
\ No newline at end of file
{
"id": "tiles_kaede",
"version": "1.0.0",
"name": "牌背-枫叶",
"author": "Anonymoose",
"description": "我枫了。",
"preview": "preview.jpg",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace": [
"scene/Assets/Resource/mjpai/mjp_default/hand_ui.png",
"scene/Assets/Resource/mjpai/mjp_default/mjp.png",
"scene/Assets/Resource/mjpai/mjp_default/mjp.png",
"res/atlas/myres2/mjp/mjp_default/ui.png",
"myres2/mjp/mjp_default/preview.png",
"extendRes/items/mjp_orange.jpg"
]
}
\ No newline at end of file
{
"id": "tiles_purplestars",
"version": "1.0.0",
"name": "牌背-紫色之星",
"author": "JK Anon",
"description": "你掉的是这个大猩猩呢,还是这个小猩猩?",
"preview": "preview.jpg",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace": [
"scene/Assets/Resource/mjpai/mjp_default/hand_ui.png",
"scene/Assets/Resource/mjpai/mjp_default_0/hand_ui.png",
"scene/Assets/Resource/mjpai/mjp_default/mjp.png",
"scene/Assets/Resource/mjpai/mjp_default_0/mjp.png",
"scene/Assets/Resource/mjpai/mjp_default/mjp.png",
"res/atlas/myres2/mjp/mjp_default/ui.png",
"res/atlas/myres2/mjp/mjp_default_0/ui.png",
"myres2/mjp/mjp_default/preview.png",
"extendRes/items/mjp_orange.jpg"
]
}
\ No newline at end of file
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