這有缺點是不能有兩個陷阱會以偵測到最新的測陷阱而miss舊的陷阱
效率不知影響如何
areaSpell 的條件很奇怪,只能測一次,測到後就不會測到相同的陷阱
下面的做法是測到陷阱後,以陷阱的(區塊一)以內為回避
(區塊二)以外就不在測陷阱了
在發現陷阱後,以我調的60秒後就不測阱陷,缺點陷阱消失會不知道
如果想做多個阱陷的回避,
就把下面多弄幾組並且一次執行一個就可以了
在外掛上打spell可以看到陷阱,但我不會抓資料,
如果會抓就自已調一個更好的巨集
--------------回避爆散陷阱-------------------
automacro 離開鎖定地圖 {
location not ein_fild03 (改鎖定地圖)
exclusive 1
run-once 1
priority 20
call {
lock 計時
lock 啟動區堿1
release 設定
}
}
automacro 設定 {
map ein_fild03 (改鎖定地圖)
exclusive 1
run-once 1
priority 20
call {
release 離開鎖定地圖
lock 計時
lock 啟動區堿1
}
}
automacro 啟動區堿 {
priority 21
areaSpell 爆散陷阱
exclusive 1
timeout 1
call {
$monPosX = @arg ("$.areaPos", 1)
$monPosY = @arg ("$.areaPos", 2)
$monPosX1 = @eval($monPosX - $var)
$monPosX2 = @eval($monPosX + $var)
$monPosX11 = @eval($monPosX - $var1)
$monPosX22 = @eval($monPosX + $var1)
$monPosY1 = @eval($monPosY - $var)
$monPosY2 = @eval($monPosY + $var)
$monPosY11 = @eval($monPosY - $var1)
$monPosY22 = @eval($monPosY + $var1)
$t = 0
release 啟動區堿1
release 計時
}
}
automacro 計時 {
priority 21
timeout 60 (發現陷阱到不要測陷阱的時間)
exclusive 1
call {
$t++
if ( $t == 1 ) goto ss1
lock 啟動區堿1
lock 計時
stop
:ss1
stop
}
}
automacro 啟動區堿1 {
priority 22
timeout 0.7
exclusive 1
aggressives < 1
set Move 5 (回避距離)
call {
$var = 6 (區塊一)
$var1 = 20 (區塊二)
$nopos = $.pos
$myPosX = @arg ("$nopos", 1)
$myPosY = @arg ("$nopos", 2)
if ($monPosX1 < $myPosX && $myPosX < $monPosX2) goto L1
if ($monPosX11 > $myPosX || $myPosX > $monPosX22) goto L2
if ($monPosY11 > $myPosY || $myPosY > $monPosY22) goto L4
stop
:L2
lock 計時
lock 啟動區堿1
stop
:L1
if ($monPosY1 < $myPosY && $myPosY < $monPosY2) goto L3
if ($monPosY11 > $myPosY || $myPosY > $monPosY22)) goto L4
stop
:L4
lock 計時
lock 啟動區堿1
stop
:L3
do as
if ($myPosX > $monPosX) goto east
if ($myPosX < $monPosX) goto west
:X0
if ($myPosY < $monPosY) goto X0south
if ($myPosY > $monPosY) goto X0north
log We have the same co-ord to the Monster
do @random ("east", "west", "south", "north") $Move
log Move Random
stop
:X0south
log Monster Loc: North X-axis0
do south $Move
log Move South
stop
:X0north
log Monster Loc: South X-axis0
do north $Move
log Move North
stop
:east
if ($myPosY < $monPosY) goto eastSouth
if ($myPosY > $monPosY) goto eastNorth
:Y0east
log Monster Loc: West Y-axis0
do east $Move
log Move East
stop
:eastSouth
log Monster Loc: NorthWest
do southeast $Move
log Move South East
stop
:eastNorth
log Monster Loc: SouthWest
do northeast $Move
log Move North East
stop
:west
if ($myPosY < $monPosY) goto westSouth
if ($myPosY > $monPosY) goto westNorth
:Y0west
log Monster Loc: East Y-axis0
do west $Move
log Move West
stop
:westSouth
log Monster Loc: NorthEast
do southwest $Move
log Move South West
stop
:westNorth
log Monster Loc: SouthEast
do northwest $Move
log Move North West
stop
}
} |