From 3a399c1d3c2eb4e69f8e832c767df807f01a44a7 Mon Sep 17 00:00:00 2001 From: bdf1 Date: Wed, 9 Nov 2022 01:29:36 +1300 Subject: [PATCH] =?UTF-8?q?=E5=8D=B7=E8=BD=B4=E4=B8=8B=E6=96=B9=E7=9A=84?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E8=AF=B4=E6=98=8E=E9=83=A8=E5=88=86?= =?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E5=AF=B9=E5=BA=94=E7=9A=84=E6=96=87?= =?UTF-8?q?=E5=AD=97=E6=8F=90=E7=A4=BA=E5=BA=94=E8=AF=A5=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E7=AD=89=E4=BA=8E=E6=8C=89=E4=B8=8B=E7=9B=B8?= =?UTF-8?q?=E5=BA=94=E6=8C=89=E9=94=AE=E7=9A=84=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/plugins.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/project/plugins.js b/project/plugins.js index d2d46c6..78c402f 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -321,6 +321,41 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.drawTip("请确认当前" + core.material.items['centerFly'].name + "的位置", 'centerFly'); return; } + core.control.setAutomaticRoute = function (destX, destY, stepPostfix) { + if (!core.status.played || core.status.lockControl) return; + if (this._setAutomaticRoute_isMoving(destX, destY)) return; + if (this._setAutomaticRoute_isTurning(destX, destY, stepPostfix)) return; + if (this._setAutomaticRoute_clickMoveDirectly(destX, destY, stepPostfix)) return; + // 找寻自动寻路路线 + if (destY == 13 || destY == 14) { + if (destX == 2 || destX == 3) { + destY == 13 ? core.openBook(true) : core.ui._drawHelp(); + } + if (destX == 4 || destX == 5) { + destY == 13 ? core.useFly(true) : core.turnHero(); + } + if (destX == 6 || destX == 7 || destX == 8) { + destY == 13 ? core.openToolbox(true) : core.openQuickShop(true); + } + if (destX == 9 || destX == 10) { + destY == 13 ? core.save(true) : core.openSettings(true); + } + if (destX == 11 || destX == 12) { + destY == 13 ? core.load(true) : core.openSettings(true); + } + return; + } + var moveStep = core.automaticRoute(destX, destY); + if (moveStep.length == 0 && (destX != core.status.hero.loc.x || destY != core.status.hero.loc.y || stepPostfix.length == 0)) + return; + moveStep = moveStep.concat(stepPostfix); + core.status.automaticRoute.destX = destX; + core.status.automaticRoute.destY = destY; + this._setAutomaticRoute_drawRoute(moveStep); + this._setAutomaticRoute_setAutoSteps(moveStep); + // 立刻移动 + core.setAutoHeroMove(); + } }, "drawLight": function () {