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.
This diff is collapsed.
{
"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]
}
This diff is collapsed.
{
"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]
}
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