#######################################
########FIND SLAVE#####################
#######################################
automacro FindSlave {
pm /move (.*) (.*) (.*)/
call {
$slavemap = $.lastMatch1
$slavemapx = $.lastMatch2
$slavemapy = $.lastMatch3
$mymap = $.map
if ($slavemap == $mymap) goto findslave
do eval warning "Slave not on Map\n";
do eval message "Commanding Slave to Move Towards Master\n";
do pm "$.lastpm" move $.map $.pos
stop
:findslave
do eval warning "Moving to Slave\n";
do pm "$.lastpm" move $.map $.pos
do move $slavemap $slavemapx $slavemapy
}
}
FOR THE SLAVE
automacro lost {
console /I lost my master/
call {
do p move $.pos
}
}