{
    "DebugShipEntry": {
        "desc": "调试入口：在点击进入好友飞船开始",
        "recognition": {
            "type": "DirectHit"
        },
        "next": [
            "ResellEnterShip"
        ]
    },
    "ResellShipNavigation": {
        "desc": "使用MapNavigator导航至物资调度终端附近",
        "recognition": {
            "type": "DirectHit"
        },
        "action": {
            "type": "Custom",
            "param": {
                "custom_action": "MapNavigateAction",
                "custom_action_param": {
                    "path": [
                        {
                            "action": "ZONE",
                            "zone_id": "OMVBase01"
                        },
                        [
                            192.77,
                            140.62
                        ],
                        [
                            185,
                            141
                        ],
                        [
                            185,
                            130.5
                        ]
                    ]
                }
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipDetectTerminal"
        ]
    },
    "ResellShipDetectTerminal": {
        "desc": "检测物资调度终端（持续检测直到找到）",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    400,
                    200,
                    480,
                    320
                ],
                "template": "Resell/terminal.png",
                "threshold": 0.7
            }
        },
        "post_delay": 0,
        "timeout": 20000,
        "next": [
            "ResellShipInteract"
        ]
    },
    "ResellShipInteract": {
        "desc": "交互终端（按F键）",
        "recognition": {
            "type": "DirectHit"
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 70
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipInTerminal"
        ]
    },
    "ResellShipInTerminal": {
        "desc": "检测是否进入终端界面",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    0,
                    50,
                    250,
                    250
                ],
                "template": "Resell/inTerminal.png",
                "threshold": 0.8
            }
        },
        "post_delay": 0,
        "timeout": 5000,
        "next": [
            "ResellShipPage1Click"
        ]
    },
    "ResellShipPage1Click": {
        "desc": "【第一页】点击第一个商品",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    0,
                    220,
                    250,
                    460
                ],
                "template": "Resell/storeItem.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "Click",
            "param": {
                "target_offset": [
                    0,
                    0,
                    40,
                    -100
                ]
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage1SellSwipe",
            "ResellShipPage1NoStock"
        ]
    },
    "ResellShipPage1SellSwipe": {
        "desc": "【第一页】拉满数量滑条",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    1010,
                    525,
                    120,
                    122
                ],
                "template": "Resell/Confirm.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "Swipe",
            "param": {
                "begin": [
                    530,
                    525
                ],
                "end": [
                    700,
                    525
                ]
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage1SellExecute"
        ]
    },
    "ResellShipPage1SellExecute": {
        "desc": "【第一页】点击确认售卖",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    1010,
                    525,
                    120,
                    122
                ],
                "template": "Resell/Confirm.png",
                "threshold": 0.8
            }
        },
        "pre_delay": 0,
        "action": {
            "type": "Click"
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage1SellSuccess",
            "ResellShipPage1SellExecute"
        ]
    },
    "ResellShipPage1SellSuccess": {
        "desc": "【第一页】售卖成功，点击确认",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    577,
                    601,
                    124,
                    119
                ],
                "template": "Resell/success.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "Click"
        },
        "post_delay": 0,
        "next": [
            "ResellShipSwitchPage"
        ]
    },
    "ResellShipPage1NoStock": {
        "desc": "【第一页】没有库存，按ESC关闭弹窗",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    200,
                    500,
                    200,
                    100
                ],
                "template": "Resell/noStock.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 27
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipSwitchPage"
        ]
    },
    "ResellShipSwitchPage": {
        "desc": "按E翻到第二页",
        "recognition": {
            "type": "DirectHit"
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 69
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage2Click"
        ]
    },
    "ResellShipPage2Click": {
        "desc": "【第二页】点击第一个商品",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    0,
                    220,
                    250,
                    460
                ],
                "template": "Resell/storeItem.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "Click",
            "param": {
                "target_offset": [
                    0,
                    0,
                    40,
                    -100
                ]
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage2SellSwipe",
            "ResellShipPage2NoStock"
        ]
    },
    "ResellShipPage2SellSwipe": {
        "desc": "【第二页】拉满数量滑条",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    1010,
                    525,
                    120,
                    122
                ],
                "template": "Resell/Confirm.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "Swipe",
            "param": {
                "begin": [
                    530,
                    525
                ],
                "end": [
                    700,
                    525
                ]
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage2SellExecute"
        ]
    },
    "ResellShipPage2SellExecute": {
        "desc": "【第二页】点击确认售卖",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    1010,
                    525,
                    120,
                    122
                ],
                "template": "Resell/Confirm.png",
                "threshold": 0.8
            }
        },
        "pre_delay": 0,
        "action": {
            "type": "Click"
        },
        "post_delay": 0,
        "next": [
            "ResellShipPage2SellSuccess",
            "ResellShipPage2SellExecute"
        ]
    },
    "ResellShipPage2SellSuccess": {
        "desc": "【第二页】售卖成功，点击确认",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    577,
                    601,
                    124,
                    119
                ],
                "template": "Resell/success.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "Click"
        },
        "post_delay": 0,
        "next": [
            "ResellShipExitSell"
        ]
    },
    "ResellShipPage2NoStock": {
        "desc": "【第二页】没有库存，按ESC关闭弹窗",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    200,
                    500,
                    200,
                    100
                ],
                "template": "Resell/noStock.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 27
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipExitSell"
        ]
    },
    "ResellShipExitSell": {
        "desc": "ESC退出出售界面，开始检测环境",
        "recognition": {
            "type": "DirectHit"
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 27
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipExitTerminal",
            "ResellShipExitToFriendPage",
            "ResellShipEndVisitCheck"
        ]
    },
    "ResellShipExitTerminal": {
        "desc": "【环境检测1】在终端界面 -> ESC",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    0,
                    50,
                    250,
                    250
                ],
                "template": "Resell/inTerminal.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 27
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipExitToFriendPage",
            "ResellShipEndVisitCheck"
        ]
    },
    "ResellShipExitToFriendPage": {
        "desc": "【环境检测2】在船坞 -> ESC",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    0,
                    0,
                    125,
                    125
                ],
                "template": "Resell/inShip.png",
                "threshold": 0.8
            }
        },
        "action": {
            "type": "ClickKey",
            "param": {
                "key": 27
            }
        },
        "post_delay": 0,
        "next": [
            "ResellShipEndVisitCheck"
        ]
    },
    "ResellShipEndVisitCheck": {
        "desc": "检测结束拜访按钮（右下角）",
        "max_hit": 3,
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    1000,
                    600,
                    280,
                    120
                ],
                "template": "Resell/endVisitCheck.png",
                "threshold": 0.7
            }
        },
        "action": {
            "type": "Click"
        },
        "post_delay": 0,
        "timeout": 5000,
        "next": [
            "ResellShipEndVisitConfirm"
        ]
    },
    "ResellShipEndVisitConfirm": {
        "desc": "确认结束拜访弹窗",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    400,
                    300,
                    500,
                    300
                ],
                "template": "Resell/endVisitConfirm.png",
                "threshold": 0.7
            }
        },
        "action": {
            "type": "Click"
        },
        "post_delay": 0,
        "timeout": 5000,
        "next": [
            "ResellShipReturnOwnShip",
            "[JumpBack]WaitLoadingColor"
        ]
    },
    "ResellShipReturnOwnShip": {
        "desc": "等待返回自己的飞船（检测黑屏加载）",
        "recognition": {
            "type": "TemplateMatch",
            "param": {
                "roi": [
                    172,
                    0,
                    133,
                    118
                ],
                "template": "Resell/inGame1.png",
                "threshold": 0.8
            }
        },
        "pre_delay": 0,
        "post_delay": 0,
        "next": [
            "ResellMain"
        ]
    }
}
