1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

雀魂 ワンライナー

Last updated at Posted at 2022-09-03

コードの利用は、自己責任でお願いします。

onbeforeunload

タブを閉じる前や更新する前に、確認のメッセージを挟むコードです。雀魂以外のサイトでも実行できます。1

window.onbeforeunload = () => 1;

日付

1週間前1ヶ月前 のような日付の表記を、年月日に変更します。

game.Tools.time2Desc = date => new Date(date * 1000).toLocaleString();

ゲームを再起動するか、次のコードを実行すると、元の表記に戻ります。

game.Tools.time2Desc = game.Tools.time2DescServer;

順位

順位が 999+ と表示されていても、正確な順位を確認できます。三人麻雀の場合は {type: 2} に変更してください。

app.NetAgent.sendReq2Lobby("Lobby", "fetchLevelLeaderboard", {type: 1}, (err, res) => console.log(res.self_rank));

牌譜のブックマーク

ブックマークに追加するボタンが表示されない牌譜を、ブックマークに追加できます。牌譜画面で次のコードを実行すると、ボタンが表示されます。

uiscript.UI_DesktopInfo.Inst._btn_collect.visible = true;

スタンプ

対局開始後に実行すると、CPU を含む対局相手のスタンプが非表示になります。

uiscript.UI_DesktopInfo.Inst._player_infos.filter(v => v.headbtn).forEach(v => v.headbtn.emj_banned = true);

観戦ロビーのプルダウン

観戦ロビーのプルダウンの項目を並び替えて、3人東風戦 を一番下に配置します。

uiscript.UI_Ob.Inst.modes.sort((a, b) => b.name1 === "3人東風戦" ? -1 : 0);

ゲームを再起動するか、3人半荘戦 に変更してコードを実行すると、元の順番に戻ります。

cfg

cfg には、雀魂の様々な設定が格納されています。次のコードは、雀魂のキャラクター名を取得します。

cfg.item_definition.character.rows_.map(row => row.name_jp);

clickHandler

次のコードをロビー画面で実行すると、寮舎の画面に移動します。

uiscript.UI_Lobby.Inst.enable && uiscript.UI_Lobby.Inst.btns.me.getChildAt(0).clickHandler.method();
  1. TampermonkeyFireFox版Edge版)を使うと、常に実行されるように設定できます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?