非公開 チェーン機能解除

    
      
  • /*
     * @title チェーン機能解除
     * @description チェーンを付けられたら一瞬で解除するぞ
     * @private
     */
    javascript:(function(){
        /* 1. 既存のタイマーを掃除 */
        if(window._chainGuard) clearInterval(window._chainGuard);
    
        window._chainGuard = setInterval(() => {
            if (typeof players === 'undefined' || typeof myId === 'undefined') return;
    
            /* 2. 自分を特定(オブジェクト・配列両対応) */
            const me = players[myId] || (Array.isArray(players) ? players.find(p => p.id == myId) : null);
            if (!me) return;
    
            /* 3. 判定:リーダー(1) または フォロワー(2) の状態なら、何らかのチェーン中 */
            /* 文字列 'leader' 'follower' にも念のため対応 */
            const isChained = (me.chainRole == 1 || me.chainRole == 2 || me.chainRole === 'leader' || me.chainRole === 'follower');
    
            if (isChained) {
                console.log(`[防衛] チェーン検知(Role:${me.chainRole})。信号 {"type":"chain_detach"} を射出します。`);
                
                /* 4. サーバーへ信号を送信 */
                if (typeof triggerChainDetach === 'function') {
                    triggerChainDetach();
                } else {
                    const s = window.socket || (window.game && window.game.socket);
                    if (s && s.readyState === 1) {
                        s.send(JSON.stringify({ type: 'chain_detach' }));
                    }
                }
            }
        }, 100); /* 0.1秒ごとにチェック */
    
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2026/05/07 19:12:52 - 6 hours ago
  2. 2026/05/07 19:12:42 - 6 hours ago