Commit ae86ca57 authored by Tachibana's avatar Tachibana

ndyd

parent 830a142e
# MajsoulPlusMods # MajsoulPlusMods
自用[雀魂Plus](https://github.com/MajsoulPlus/majsoul-plus-client/releases)用Mod整理(仅保留当前最新版本上仍然可用内容) 自用[雀魂Plus](https://github.com/MajsoulPlus/majsoul-plus-client/releases)用Mod整理(仅保留当前最新版本上仍然可用内容)
考虑到近期情况,请在确认确实不会出差错的情况下使用本处的内容。不定期会对可能导致问题的内容/实质无用的内容作删除处理。
### 分流 ### 分流
https://code.mycard.moe/komeijisatori/MajsoulPlusMods https://code.mycard.moe/komeijisatori/MajsoulPlusMods
......
{
"id": "anonymizer",
"version": "1.1.1",
"name": "按Ctrl隐藏昵称",
"author": "anon",
"description": "猜猜我是谁?",
"preview": "preview.png",
"entry": "script.js"
}
\ No newline at end of file
// ==UserScript==
// @name Anonymizer
// @namespace NyaggerSquad
// @icon https://i.imgur.com/LeIOXEm.png
// @version 1.11
// @description Press ctrl to Why
// @author anon
// @include https://mahjongsoul.game.yo-star.com/
// @include https://game.mahjongsoul.com/
// @include https://majsoul.union-game.com/0/
// ==/UserScript==
(function() {
'use strict'
var NAME = "";
var TITLE = 600001;
var RANK = 10101;
var RANK3 = 20101;
var HEAD = 0;//400101;
var KEY = 17;
var USE_TOGGLE = false;
var ready = true;
var down = false;
var toggle = false;
document.addEventListener('keydown', function(e) {
e = e || window.event;
if ((e.keyCode == KEY || e.key == KEY) && ready && !down){
if (!USE_TOGGLE)
Anonymize(true);
}
}, true);
document.addEventListener('keyup', function(e) {
e = e || window.event;
if ((e.keyCode == KEY || e.key == KEY) && ready){
Anonymize(false);
}
}, true);
var WinNameBeautifulHack = "";
function Anonymize(check){
if (USE_TOGGLE){
toggle = !toggle;
check = toggle;
}
let uiscene = 0;
function checkScene(scene){
return scene && ((scene.Inst && scene.Inst._enable) || (scene._Inst && scene._Inst._enable))
}
if (checkScene(uiscene=uiscript.UI_Lobby)){
//uiscene.Inst.top.label_name.text = NAME;
//uiscene.Inst.top.name.text = NAME;
uiscene.Inst.top.name._childs[0]._tf.text = NAME;
uiscene.Inst.top.rank.id = RANK;
uiscene.Inst.top.title.id = TITLE;
uiscene.Inst.top.small_rank.id = RANK3;
if (!check) uiscene.Inst.refreshInfo();
}
if (checkScene(uiscene=uiscript.UI_PlayerInfo)){
//uiscene.Inst.name.text = NAME;
//uiscript.UI_PlayerInfo.Inst.container_info.getChildByName("name")
uiscene.Inst.name._childs[0]._tf.text = NAME;
uiscene.Inst.level.exp = 0;
uiscript.UI_PlayerInfo.Inst.detail_data.mj_category==1?uiscene.Inst.level.id = RANK:uiscene.Inst.level.id = RANK3;
uiscene.Inst.title.id = TITLE;
if (!check){
uiscene.Inst.refreshBaseInfo();
uiscript.UI_PlayerInfo.Inst.changeMJCategory(uiscript.UI_PlayerInfo.Inst.detail_data.mj_category);
}
}
if (checkScene(uiscene=uiscript.UI_DesktopInfo)){
for (let i in uiscene.Inst._player_infos){
//uiscene.Inst._player_infos[i].name.text = NAME;
//uiscript.UI_DesktopInfo.Inst._player_infos[0].container.getChildByName("container_name").getChildByName("name")
uiscene.Inst._player_infos[i].name._childs[0]._tf.text = NAME;
uiscene.Inst._player_infos[i].title.id = TITLE;
if (HEAD) uiscene.Inst._player_infos[i].head.id = HEAD;
}
if (!check) uiscene.Inst.refreshSeat();
}
if (checkScene(uiscene=uiscript.UI_GameEnd)){
for (let i in uiscene.Inst.players)
//uiscene.Inst.players[i].label_name.text = NAME;
uiscene.Inst.players[i].name._childs[0]._tf.text = NAME;
if (!check) uiscene.Inst.show();
}
if (checkScene(uiscene=uiscript.UI_ScoreChange)){
for (let i in uiscene.Inst.viewplayers){
//uiscene.Inst.viewplayers[i].txt_name.text = NAME;
uiscene.Inst.viewplayers[i].name._childs[0]._tf.text = NAME;
if (HEAD) uiscene.Inst.viewplayers[i].head.id = HEAD;
}
//if (!check) uiscene.Inst.show(!1);
}
if (checkScene(uiscene=uiscript.UI_FightBegin)){
for (let i in uiscene._Inst.cells){
uiscene._Inst.cells[i].title.id = TITLE;
uiscene._Inst.cells[i].rank.id = RANK;
//uiscene._Inst.cells[i].name.text = NAME;
uiscene._Inst.cells[i].name._childs[0]._tf.text = NAME;
//uiscene._Inst.cells[i].body
}
}
if (checkScene(uiscene=uiscript.UI_Win)){
if (check){
WinNameBeautifulHack = uiscene.Inst.winner_name._childs[0]._tf.text
//uiscene.Inst.label_winner_name.text = NAME;
uiscene.Inst.winner_name._childs[0]._tf.text = NAME;
} else uiscene.Inst.winner_name._childs[0]._tf.text = WinNameBeautifulHack;
//if (!check) uiscene.Inst.show(uiscene.Inst.data, !1);
}
if (checkScene(uiscene=uiscript.UI_WaitingRoom)){
for (let i in uiscene.Inst.players){
//uiscene.Inst.player_cells[i].name.text = NAME;
uiscene.Inst.player_cells[i].name._childs[0]._tf.text = NAME;
uiscene.Inst.player_cells[i].rank.id = RANK;
uiscene.Inst.player_cells[i].title.id = TITLE;
if (!check) uiscene.Inst._refreshPlayerInfo(uiscene.Inst.players[i]);
}
}
down = check;
}
function ToggleCheck() {
var cacheF = uiscript.UIBase.onEnable;
return function(){
console.log(this);
var result = cacheF.apply(this, arguments);
return result;
};
}
var LobbyCheck = setInterval(function(){
if (GameMgr.prototype.EnterLobby){
GameMgr.prototype.EnterLobby = (function() {
var cacheF = GameMgr.prototype.EnterLobby;
return function(){
ready = true;
uiscript.UIBase.onEnable = ToggleCheck;
var result = cacheF.apply(this, arguments);
return result;
};
})();
clearInterval(LobbyCheck);
}
},2000);
})();
\ No newline at end of file
// ==UserScript==
// @name Riichi-Oh: The Story of Riichi
// @namespace NyaggerSquad
// @icon https://i.imgur.com/tKWKjza.jpg
// @version 1.0
// @description You're all free now!
// @author anon
// @include https://mahjongsoul.game.yo-star.com/
// @include https://game.mahjongsoul.com/
// @include https://game.maj-soul.com/1/
// ==/UserScript==
(function() {
'use strict';
const COWARD = false;
var LazyCheck = setInterval(function(){
if (GameMgr.prototype.EnterLobby){
GameMgr.prototype.EnterLobby = (function() {
var cacheF = GameMgr.prototype.EnterLobby;
return function(){
if (COWARD)
app.Taboo.test = (a) => null;
else
game.Tools.strWithoutForbidden = (a) => a;
var result = cacheF.apply(this, arguments);
return result;
};
})();
clearInterval(LazyCheck);
}
},2000);
})();
\ No newline at end of file
{
"id": "decensor",
"version": "1.0.0",
"name": "解除敏感词屏蔽",
"author": "anon",
"description": "这不比博人传燃?\n(至少目前于国服无用)",
"preview": "1.png",
"entry": ["decensor.js"]
}
\ No newline at end of file
{
"id": "extraBGMs_IIDX18",
"version": "1.0.0",
"name": "IIDX 18 Resort Anthem",
"author": "Tachibana",
"description": "beatmania IIDX 18 Resort Anthem BGM",
"dir": "assets",
"preview": "preview.jpg",
"resourcepack": [
"audio/audio_lobby/matchcomplete.mp3",
"audio/audio_mj/countdown5.mp3",
"audio/audio_mj/new_dora.mp3",
"audio/audio_mj/winlose.mp3",
"audio/music/lobby.mp3",
"audio/my_music/0.mp3",
"audio/my_music/1.mp3",
"audio/my_music/2.mp3",
"audio/my_music/3.mp3",
"audio/my_music/4.mp3",
"audio/my_music/5.mp3",
"audio/my_music/6.mp3",
"audio/my_music/7.mp3",
"audio/my_music/e1.mp3",
"audio/my_music/e2.mp3",
"audio/my_music/e3.mp3",
"audio/my_music/h1.mp3",
"audio/my_music/h2.mp3",
"audio/my_music/h3.mp3",
"audio/my_music/p.mp3",
"audio/my_music/r1.mp3",
"audio/my_music/r2.mp3",
"audio/my_music/r3.mp3"
],
"dependencies": {},
"entry": "script.js"
}
\ No newline at end of file
// 增强型BGM,作者 rin93 改造 青龙圣者 ,bin
if (!!view && !!uiscript) {
const musicDir = 'music/'
//h1为终局精算点正分,h2为Top,h3为精算点负分;r1为他家立直,r2为自家立直,r3为追立;连庄BGM不变,e1-e3未使用。
const _showBackup = uiscript.UI_GameEnd.prototype.show
uiscript.UI_GameEnd.prototype.show = function () {
var musicPlayerFlag = false
view.DesktopMgr.Inst.gameEndResult.players.forEach((player, index) => {
if (player.seat == view.DesktopMgr.Inst.seat) {
if (index == 0) {
view.AudioMgr.PlayMusic('my_music/h2.mp3', 1, false, true)
musicPlayerFlag = true
} else if (player.total_point >= 0) {
view.AudioMgr.PlayMusic('my_music/h1.mp3', 1, false, true)
musicPlayerFlag = true
} else {
view.AudioMgr.PlayMusic('my_music/h3.mp3', 1, false, true)
musicPlayerFlag = true
}
}
})
if (!musicPlayerFlag) {
view.AudioMgr.PlayMusic('my_music/h1.mp3', 1, false, true)
}
_showBackup.apply(this, arguments)
}
// 不同 UI 注入不同音乐
const lobbyMusic = musicDir + 'lobby.mp3'
const executeUIs = [['UI_Lobby', 'onEnable', 'lobby.mp3']]
executeUIs.forEach(([scriptKey, funName, fileName]) => {
uiscript[scriptKey].prototype[funName] = (() => {
const functionBackup = uiscript[scriptKey].prototype[funName]
return function () {
view.AudioMgr.PlayMusic(musicDir + fileName, 1, false, true)
return functionBackup.apply(this, arguments)
}
})()
})
!(function (e = view, u = uiscript, i = view.DesktopMgr, am = view.AudioMgr) {
var _cy_riched,
_cy_myrich,
_cy_cur_bgm,
_cy_fc,
_cy_bgmidx,
_cy_tk,
tmp;
(am.PlayMusic = (() => {
const functionBackup = am.PlayMusic
let lastTimeMusic = ''
return function (audioDir, ...args) {
console.log(args)
console.warn('Playing: ' + audioDir)
if (args[2] !== true) {
if (view.BgmListMgr.bgm_lobby_list.includes(audioDir)) {
lastTimeMusic = lobbyMusic
}
return functionBackup.apply(this, [lastTimeMusic, ...args])
} else {
lastTimeMusic = audioDir
}
return functionBackup.apply(this, [audioDir, ...args])
}
})()),
(paiRemain = () => {
return i.Inst.left_tile_count <= 20
}),
(playMusic = () => {
var t = ''
if (_cy_riched) {
t = _cy_riched > 1 ? 'r' + 3 : _cy_myrich ? 'r' + 2 : 'r' + 1
} else {
t = paiRemain() ? 'p' : (_cy_bgmidx % 8) + ''
}
_cy_cur_bgm = !t ? _cy_cur_bgm : 'my_music/' + t + '.mp3';
!_cy_fc && _cy_cur_bgm && i.Inst.gameing && am.PlayMusic(_cy_cur_bgm, 0, false, true)
}),
(e.ViewPlayer.prototype.AddQiPai = (function () {
var o = e.ViewPlayer.prototype.AddQiPai
return function (r, x, y, z) {
return (
x &&
(++_cy_riched,
(_cy_myrich = this.container_qipai.player.seat == i.Inst.seat),
playMusic()),
o.apply(this, arguments)
)
}
})()),
(newRound = function (t) {
if (!_cy_tk && i.Inst) {
_cy_tk = 1
i.Inst.RefreshPaiLeft = (() => {
var o = i.Inst.RefreshPaiLeft
return function (a, b) {
return paiRemain() && playMusic(), o.apply(this, arguments)
}
})()
}
_cy_cur_bgm = ''
//t.ju为局数
_cy_bgmidx = t.chang * 4 + t.ju
_cy_riched = 0
new Error().stack.split('\n')[2].match(/fastrecord/) && (_cy_fc = 1)
playMusic()
}),
['play', 'fastplay', 'record', 'fastrecord'].forEach(i => {
e.ActionNewRound[i] = (() => {
var o = e.ActionNewRound[i]
return function (t) {
return (tmp = o.apply(this, arguments)), newRound(t), tmp
}
})()
}),
Object.entries({
Replay: '_refreshBarshow',
Live_Broadcast: '_fastSync'
}).forEach(([k, v]) => {
u['UI_' + k]['prototype'][v] = (() => {
var o = u['UI_' + k]['prototype'][v]
return function () {
return (
(tmp = o.apply(this, arguments)),
_cy_fc && ((_cy_fc = 0), playMusic()),
tmp
)
}
})()
})
})(view, uiscript, view.DesktopMgr, view.AudioMgr)
}
\ No newline at end of file
{
"id": "partytime",
"version": "0.9.0",
"name": "Ctrl+C复制观战链接",
"author": "Nyagger Squad",
"description": "迷迭迷迭福姬桑,tetoki(手被打断)\n(对方如要通过链接观战,也需要启用此插件)",
"preview": "preview.png",
"entry": "script.js"
}
// ==UserScript==
// @name Party Time
// @namespace NyaggerSquad
// @icon https://i.imgur.com/CXj6fxh.png
// @version 0.9
// @description Everyone's invited. Press Ctrl+C during a match to get a link to the game. Anyone with the script can use that url to spectate.
// @author anon
// @include https://mahjongsoul.game.yo-star.com/
// @include https://game.mahjongsoul.com/
// @include https://game.maj-soul.com/1/
// ==/UserScript==
(function() {
'use strict';
let spec = localStorage.getItem("_pre_spec");
document.addEventListener('keydown', e => {
if (e.code === 'KeyC' && e.ctrlKey){
let uuid = GameMgr.Inst.mj_game_uuid;
if (!uuid)
return;
//window.location is https://localhost:8887/ on my mjs+ (which should actually work if mjs+ is running)
//GameMgr.Inst.link_url is https://mahjongsoul.game.yo-star.com/ for the US servers but should work for the others
//navigator.clipboard.writeText(window.location + "?spec="+uuid);
navigator.clipboard.writeText(GameMgr.Inst.link_url + "?spec="+uuid);
uiscript.UI_Popout.PopOutNoTitle("观战链接已复制。",null);
}
});
function spectateUUID(uuid){
localStorage.removeItem("_pre_spec");
uiscript.UI_Live_Broadcast.fetchInfo(uuid, Laya.Handler.create(uiscript.UI_Friend.Inst, function(e) {
e.success && uiscript.UI_Friend.Inst.close(Laya.Handler.create(uiscript.UI_Friend.Inst, function() {
let plist = e.data.live_head.players;
uiscript.UI_Live_Broadcast.goToWatch(uuid, e.data, plist[Math.floor(Math.random() * plist.length)].account_id)
}))
}, null, !1))
}
function read_otherpaipu(){
let link = uiscript.UI_PaiPu.Inst.pop_otherpaipu.input.text.split('?spec=');
if (!link || !(link = link[link.length - 1]))
return;
spec = link;
return;
}
function check_helper(u){
return u && u.UI_Lobby && u.UI_Lobby.Inst && u.UI_Lobby.Inst.pending_lobby_jump;
}
var LazyCheck = setInterval(function(){
if (check_helper(uiscript)){
uiscript.UI_Lobby.Inst.pending_lobby_jump = (function(){
var cacheF = uiscript.UI_Lobby.Inst.pending_lobby_jump;
return function(){
var result = cacheF.apply(this, arguments);
if (typeof spec !== 'undefined' && spec !== null){
spectateUUID(spec);
}
return result;
};
})();
clearInterval(LazyCheck);
}
},2000);
var PaipuCheck = setInterval(function(){
if (uiscript && uiscript.UI_PaiPu && uiscript.UI_PaiPu.Inst && uiscript.UI_PaiPu.Inst.pop_otherpaipu && uiscript.UI_PaiPu.Inst.pop_otherpaipu){
uiscript.UI_PaiPu.Inst.pop_otherpaipu.hide = (function(){
var cacheF = uiscript.UI_PaiPu.Inst.pop_otherpaipu.hide;
return function(){
var result = cacheF.apply(this, arguments);
read_otherpaipu();
if (typeof spec !== 'undefined' && spec !== null){
spectateUUID(spec);
}
return result;
};
})();
clearInterval(PaipuCheck);
}
},4000);
})();
{
"id": "board_white",
"version": "1.0.0",
"name": "透明白点数显示板",
"author": ["元始天尊", "AnriMachishiro", "小魔"],
"description": "我觉得我做不出役满绝对是点数显示板的问题。\n暂未适配新版",
"preview": "assets/scene/Assets/Resource/table/tablemid/bg.png",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace": [
"scene/Assets/Resource/table/tablemid/bg.png",
"scene/Assets/Resource/table/tablemid/box_color.png",
"scene/Assets/Resource/table/tablemid/chang.png",
"scene/Assets/Resource/table/tablemid/feng.png",
"scene/Assets/Resource/table/tablemid/ju.png",
"scene/Assets/Resource/table/tablemid/left.png",
"scene/Assets/Resource/table/tablemid/num_left.png",
"scene/Assets/Resource/table/tablemid/score.png"
]
}
\ No newline at end of file
{
"id": "board_whiteblack",
"version": "1.0.0",
"name": "透明白+不透明黑 点数显示板",
"author": ["元始天尊", "AnriMachishiro", "小魔"],
"description": "我觉得我做不出役满绝对是点数显示板的问题。\n暂未适配新版",
"preview": "assets/scene/Assets/Resource/table/tablemid/bg.png",
"dependencies": {
"majsoul_plus": "^2.0.0"
},
"replace": [
"scene/Assets/Resource/table/tablemid/bg.png",
"scene/Assets/Resource/table/tablemid/box_color.png",
"scene/Assets/Resource/table/tablemid/chang.png",
"scene/Assets/Resource/table/tablemid/feng.png",
"scene/Assets/Resource/table/tablemid/ju.png",
"scene/Assets/Resource/table/tablemid/left.png",
"scene/Assets/Resource/table/tablemid/num_left.png",
"scene/Assets/Resource/table/tablemid/score.png"
]
}
\ 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.
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