mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-05-21 22:35:48 +08:00
refactor: ParametricTrans/自动参量质变仪js info与变量名更新 (#2224)
* fix typo: 自动参量质变仪现在可以不放薄荷了, 把提示中"薄荷"改为"材料" * 把注释和变量里面的薄荷/BH修复成了材料/MATERIAL
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
(async function () {
|
(async function () {
|
||||||
|
|
||||||
//初始化配置======================================================================================
|
//初始化配置======================================================================================
|
||||||
var BH = typeof settings.BH === 'string' && settings.BH.trim() !== '' ? settings.BH : "assets/bh.png";
|
var MATERIAL = typeof settings.MATERIAL === 'string' && settings.MATERIAL.trim() !== '' ? settings.MATERIAL : "assets/bh.png";
|
||||||
var ZHIBIANYI = typeof settings.ZHIBIANY === 'string' && settings.ZHIBIANYI.trim() !== '' ? settings.ZHIBIANYI : "assets/zhibian.png";
|
var ZHIBIANYI = typeof settings.ZHIBIANY === 'string' && settings.ZHIBIANYI.trim() !== '' ? settings.ZHIBIANYI : "assets/zhibian.png";
|
||||||
var actiontime = settings.actiontime != undefined && ~~settings.actiontime > 0 ? ~~settings.actiontime : 50;
|
var actiontime = settings.actiontime != undefined && ~~settings.actiontime > 0 ? ~~settings.actiontime : 50;
|
||||||
var CHA = "assets/cha.png"
|
var CHA = "assets/cha.png"
|
||||||
@@ -126,7 +126,7 @@ async function deployTransformer(){
|
|||||||
|
|
||||||
|
|
||||||
/**======================================================================================
|
/**======================================================================================
|
||||||
* 游戏内“参量质变仪”的放入薄荷交互流程
|
* 游戏内“参量质变仪”的放入材料交互流程
|
||||||
*/
|
*/
|
||||||
async function insertMaterial(){
|
async function insertMaterial(){
|
||||||
|
|
||||||
@@ -165,12 +165,12 @@ async function insertMaterial(){
|
|||||||
await leftButtonDown();
|
await leftButtonDown();
|
||||||
await sleep(100);
|
await sleep(100);
|
||||||
await moveMouseTo(1287,161);
|
await moveMouseTo(1287,161);
|
||||||
// 薄荷图片检测
|
// 质变材料图片检测
|
||||||
let YOffset = 0; // Y轴偏移量,根据需要调整
|
let YOffset = 0; // Y轴偏移量,根据需要调整
|
||||||
const maxRetries = 20; // 最大重试次数
|
const maxRetries = 20; // 最大重试次数
|
||||||
let retries = 0; // 当前重试次数
|
let retries = 0; // 当前重试次数
|
||||||
while (retries < maxRetries) {
|
while (retries < maxRetries) {
|
||||||
await imageRecognition(BH, 1, 0, 0);
|
await imageRecognition(MATERIAL, 1, 0, 0);
|
||||||
if (result.found) {
|
if (result.found) {
|
||||||
await leftButtonUp();
|
await leftButtonUp();
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
@@ -245,12 +245,12 @@ async function executeAttack(){
|
|||||||
//开始执行质变仪流程============================================
|
//开始执行质变仪流程============================================
|
||||||
try {
|
try {
|
||||||
if ((await deployTransformer())) {//部署质变仪流程
|
if ((await deployTransformer())) {//部署质变仪流程
|
||||||
log.info("部署成功,准备放入薄荷!!");
|
log.info("部署成功,准备放入材料(默认薄荷)!!");
|
||||||
}
|
}
|
||||||
if ((!await insertMaterial())) {//放入薄荷并开始质变流程
|
if ((!await insertMaterial())) {//放入材料并开始质变流程
|
||||||
log.info("未找到布置的质变仪,可能已经放入材料,尝试进行攻击流程!!");
|
log.info("未找到布置的质变仪,可能已经放入材料,尝试进行攻击流程!!");
|
||||||
}else{
|
}else{
|
||||||
log.info("放入薄荷完成,开始质变!!");
|
log.info("放入材料完成,开始质变!!");
|
||||||
}
|
}
|
||||||
if ((await executeAttack())) {//芭芭拉攻击指令流程
|
if ((await executeAttack())) {//芭芭拉攻击指令流程
|
||||||
log.info("质变执行完成,结束!!");
|
log.info("质变执行完成,结束!!");
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"label": "必填!!队伍名称,4号位放芭芭拉!"
|
"label": "必填!!队伍名称,4号位放芭芭拉!"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BH",
|
"name": "MATERIAL",
|
||||||
"type": "input-text",
|
"type": "input-text",
|
||||||
"label": "选填,默认薄荷,识别物料的图片路径(默认assets/bh.png)",
|
"label": "选填,默认薄荷,识别物料的图片路径(默认assets/bh.png)",
|
||||||
"default": "assets/bh.png"
|
"default": "assets/bh.png"
|
||||||
|
|||||||
Reference in New Issue
Block a user