有關 跟隨巨集
求問 跟隨及被跟隨的人物名要放在那裡
謝謝
#find master
automacro findMaster {
timeout 3
console /^I lost my master/
call {
$master = @config (followTarget)
do pm "$master" x $.map $.pos
}
}
automacro findMaster2 {
timeout 3
console /^Calculating route to find master/
call {
$master = @config (followTarget)
do pm "$master" x $.map $.pos
}
}
#goto master
automacro gotoMaster {
pm /x (.*) (.*) (.*)/
call {
$pm = $.lastpm
if ($pm != $master) stop
do move $.lastMatch1 $.lastMatch2 $.lastMatch3
}
}
#when master is found
automacro foundMaster {
console /^Found my master!/
call {
do pm "$master" clear
}
}
跟隨
#Slave Macro
################################
######FIND MASTER###############
################################
#find master
automacro findMaster {
timeout 4
console /I lost my master/
call {
$master = @config (followTarget)
do pm "$master" Where are you?
}
}
automacro findMaster2 {
timeout 4
console /Calculating route to find master/
call {
$master = @config (followTarget)
do pm "$master" Where are you?
}
}
#goto master
automacro gotoMaster {
pm /at (.*) (.*) (.*)/
call {
$pm = $.lastpm
if ($pm != $master) stop
do move $.lastMatch1 $.lastMatch2 $.lastMatch3
}
}
#when master is found
automacro foundMaster {
console /Found my master/
call {
do pm "$master" I found
}
}
|