Commit a50c169a authored by TanakaKotoha's avatar TanakaKotoha

dededededededededededede

parent 7791afc2
{
"id": "title",
"version": "1.0.0",
"name": "其他服称号可见",
"author": "anon",
"description": "年轻人,我劝你耗子尾汁!",
"preview": "11.png",
"entry": ["title.js"]
}
\ No newline at end of file
// ==UserScript==
// @name Complete Global Saturation
// @namespace NyaggerSquad
// @icon https://i.imgur.com/EQmyAni.png
// @version 1.01
// @description Makes titles from other servers visible (as long as they exist on the current server)
// @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';
//skips updating titles that are missing an english name (they'll stay as notitle),
//otherwise the title area will be completely blank since they don't actually exist on the english server.
//set this to false if you aren't playing on EN (although I haven't actually tested that)
const SKIP_CHINK = true;
function refreshHook(){
for (let i in view.DesktopMgr.Inst.player_datas){
let local = view.DesktopMgr.Inst.seat2LocalPosition(view.DesktopMgr.Inst.players[i].seat);
let player_data = view.DesktopMgr.Inst.player_datas[i];
let player_info = uiscript.UI_DesktopInfo.Inst._player_infos[local];
//player_info.head.set_head_frame(player_data.account_id, player_data.avatar_frame);
if (SKIP_CHINK && !/^[\w\d\s :/-]+$/i.test(cfg.item_definition.title.get(player_data.title)?.name_en)){
console.log("Skipped ", cfg.item_definition.title.get(player_data.title).name_en, cfg.item_definition.title.get(player_data.title).icon)
continue;
}
player_info.title.id = player_data.title;
}
}
function retardCompatibilityFix(){
uiscript.UI_DesktopInfo.Inst.refreshSeat = (function() {
var cacheF = uiscript.UI_DesktopInfo.Inst.refreshSeat;
return function(){
var result = cacheF.apply(this, arguments);
refreshHook();
return result;
};
})();
}
var LazyCheck = setInterval(function(){
if (uiscript?.UI_DesktopInfo?.Inst?.initRoom){
uiscript.UI_DesktopInfo.Inst.initRoom = (function(){
var cacheF = uiscript.UI_DesktopInfo.Inst.initRoom;
return function(){
var result = cacheF.apply(this, arguments);
retardCompatibilityFix();
return result;
};
})();
clearInterval(LazyCheck);
}
},2000);
})();
\ No newline at end of file
{
"id": "uncle",
"version": "1.0.0",
"name": "陌生人在注视着你",
"author": "anon",
"description": "使用日志查看器向不知情的匿名用户发送消息和好友申请。",
"preview": "1.png",
"entry": ["uncle.js"]
}
// ==UserScript==
// @name Friendly Uncle
// @namespace NyaggerSquad
// @icon https://i.imgur.com/JeyA6ks.png
// @version 1.1
// @description Use the log viewer to send messages and friend requests to unsuspecting anons. A bit creepy if you ask me.
// @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';
function InappropriateTouch(){
if (view.DesktopMgr.Inst.paipu_config & view.EMJMode.live_broadcast) return;
uiscript.UI_DesktopInfo.Inst.btn_seeinfo = function(e) {
if (view.DesktopMgr.Inst.gameing) {
var i = view.DesktopMgr.Inst.player_datas[view.DesktopMgr.Inst.localPosition2Seat(e)].account_id;
if (i) {
var n = 1 == view.DesktopMgr.Inst.game_config.category,
a = 1,
r = view.DesktopMgr.Inst.game_config.meta;
r && r.mode_id == game.EMatchMode.shilian && (a = 4), uiscript.UI_OtherPlayerInfo.Inst.show(i, view.DesktopMgr.Inst.game_config.mode.mode < 10 ? 1 : 2, n ? 1 : 2, a)
}
}
}
uiscript.UI_DesktopInfo.Inst.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);
game.Tools.SetNickname(a.name, r), a.head.id = e[n].avatar_id, a.head.set_head_frame(e[n].account_id, e[n].avatar_frame);
var s = cfg.item_definition.item.get(e[n].avatar_frame);
if (s && s.iargs[0] ? a.head.me.y = a.head_origin_y - s.iargs[0] / 100 * this.head_offset_y : a.head.me.y = a.head_origin_y, a.avatar = e[n].avatar_id, 0 != i) {
var o = e[n].account_id && 0 != e[n].account_id,
l = e[n].account_id && 0 != e[n].account_id && view.DesktopMgr.Inst.mode == view.EMJMode.play,
h = view.DesktopMgr.Inst.mode != view.EMJMode.play;
t ? a.headbtn.onChangeSeat(o, l, h) : a.headbtn.reset(o, l, h)
}
e[n].title ? a.title.id = game.Tools.titleLocalization(e[n].account_id, e[n].title) : a.title.id = 0
}
}
}
for (let i = 0; i < 4; i++){
let head = uiscript.UI_DesktopInfo.Inst._player_infos[i].container.getChildByName("btn_head");
if (!head)
continue;
head.clickHandler.caller.showinfo = true;
head.clickHandler.caller.btn_seeinfo.visible = true;
head.clickHandler.caller.enable = false;
}
}
var LazyCheck = setInterval(function(){
if (uiscript?.UI_DesktopInfo?.Inst?.initRoom){
uiscript.UI_DesktopInfo.Inst.initRoom = (function(){
var cacheF = uiscript.UI_DesktopInfo.Inst.initRoom;
return function(){
InappropriateTouch();
var result = cacheF.apply(this, arguments);
return result;
};
})();
clearInterval(LazyCheck);
}
},2000);
})();
\ 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