メインコンテンツへスキップ

GearSwapでBozzetto Breadwinnerの属性ミーブル対策

    2026年08月のアンバスケードエキスパートはBozzetto Breadwinnerです。
    敵の6属性のミーブルワーブルに合わせてバ系魔法を詠唱するとダメージと状態異常を無効化することができるので、これができるかどうかで難易度が大幅に変化します。(Housemakerのアースシェイカー?を一人だけでもらうようにするといった失敗するとほぼ即死ギミックもあるけど)
    複垢プレイヤーは手が忙しくなるので、GearSwapで自動化しました。

    自動化ライブラリを作る

    GearSwap\dataの中に新しくlibsというフォルダを作成してautomaton.luaというファイルを新しく作ります。

    作成したautomaton.luaの中にコードを書きます。

    -- libs/automaton.lua
    local res = require('resources')
    
    local automaton = {}
    
    -- libs/automaton.lua の上部に追加
    automaton.reaction_rules = {}
    
    -- 外部からルールブックを注入するための関数
    function automaton.set_reaction_rules(rules)
        automaton.reaction_rules = rules or {}
    end
    
    function automaton.start()
        -- アクションイベントの監視
        if not action_event_id then
            action_event_id = windower.register_event('action', function(act)
                
                -- カテゴリ7(NPCの技の構え)
                if act.category == 7 then
                    local actor = windower.ffxi.get_mob_by_id(act.actor_id)
                    if not actor then return end
                    
                    -- 本当の技IDはパケットの深い階層に隠されている
                    local ability_id = 0
                    if act.targets and act.targets[1] and act.targets[1].actions and act.targets[1].actions[1] then
                        ability_id = act.targets[1].actions[1].param
                    end
                    
                    local skill_info = res.monster_abilities[ability_id]
                    local skill_name = skill_info and skill_info.ja or ("不明な技 (ID: " .. tostring(ability_id) .. ")")
    
                    -- ルールが登録されていなければここで終了
                    if #automaton.reaction_rules == 0 then return end
                    
                    for _, rule in ipairs(automaton.reaction_rules) do
                        local mob_match = (not rule.mob_name) or (actor.name == rule.mob_name)
                        local skill_match = (skill_name == rule.skill_name)
                        
                        if mob_match and skill_match then
                            if automaton.can_use_magic() then
                                windower.send_command(windower.to_shift_jis(rule.command))
                            end
                            break 
                        end
                    end
                end
            end)
        end
    end
    
    function automaton.stop()
        if action_event_id then
            windower.unregister_event(action_event_id)
            action_event_id = nil
        end
    end
    

    ジョブファイルの編集

    使いたいジョブのファイルに加筆します。

    local automaton = require('libs/automaton')
    local res = require('resources')
    
    function get_sets()
        set_language('japanese')
    
        -- ご自身で作成された装備セットなどは省略
    
        -- リアクションルール定義
        local my_reactions = {
            { mob_name = 'Bozzetto Breadwinner', skill_name = 'ファイアミーブルワーブル', command = '@input /ma "バファイラ" <me>' },
            { mob_name = 'Bozzetto Breadwinner', skill_name = 'ブリザドミーブルワーブル', command = '@input /ma "バブリザラ" <me>' },
            { mob_name = 'Bozzetto Breadwinner', skill_name = 'エアロミーブルワーブル',   command = '@input /ma "バエアロラ" <me>' },
            { mob_name = 'Bozzetto Breadwinner', skill_name = 'ストーンミーブルワーブル', command = '@input /ma "バストンラ" <me>' },
            { mob_name = 'Bozzetto Breadwinner', skill_name = 'サンダーミーブルワーブル', command = '@input /ma "バサンダラ" <me>' },
            { mob_name = 'Bozzetto Breadwinner', skill_name = 'ウォータミーブルワーブル', command = '@input /ma "バウォタラ" <me>' },
        }
    
        -- 開始
        automaton.start()
    
        -- automatonエンジンにルールをセット
        automaton.set_reaction_rules(my_reactions)
        
    end
    
    -- 停止
    function file_unload()
        automaton.stop()
    end

    これで、ジョブチェンジやgs reloadでファイルを再読み込みさせればミーブルの技に合わせて、対応したバ系魔法を詠唱してくれるはずです。
    もちろん詠唱可能なジョブでないと詠唱できないというログが出るだけなので、そこはお忘れなく。

    ちなみにmy_reactionの中のmob_nameは省略可能で、例えば
    {skill_name = '爆弾投げ', command = '@input /ma "スタン" <t>'}
    というルールを入れておくと、視界内の爆弾投げに反応して「現在のターゲット」に対してスタンを唱えるでしょう。

    実際に使用しているautomaton.luaには自分でコーディングした
    プレイヤーキャラがヒーラーフェイス化するコードがもっとずらずらと書いてあったりしますが、今回は割愛。

    あなたへのおすすめ