Macro for Master
• Go to control folder - macros.txt and paste this
#Master Macro
#######################################
########FIND SLAVE#####################
#######################################
#slave is lost
automacro findSlave {
pm /Where are you?/
call {
$slavemap = $.lastMatch1
$slavemapx = $.lastMatch2
$slavemapy = $.lastMatch3
$mymap = $.map
if ($slavemap == $mymap) goto findslave
do pm "$.lastpm" at $.map $.pos
stop
:findslave
do pm "$.lastpm" at $.map $.pos
}
}
#when slave is found
automacro clear {
pm /I found/
call {
do eval AI::clear("move", "route");
}
}
Macro for Slave
• Go to control folder - macros.txt and paste this
macro stuck {
$stucked = @random ("east", "north", "south", "west")
do $stucked
call follow
}
macro follow {
do config follow 1
}
#Slave Macro
################################
######FIND MASTER###############
################################
#find master
automacro findMaster {
timeout 3
run-once 0
exclusive 1
console /I lost my master/
call {
$master = @config (followTarget)
}
}
automacro findMaster2 {
timeout 3
run-once 0
exclusive 1
console /Calculating route to find master/
call {
$master = @config (followTarget)
}
}
#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 {
}
}
Set Your Config For Slave
follow 1
followTarget «« Nama Master
followEmotion 1
followEmotion_distance 4
followFaceDirection 0
followDistanceMax 0
followDistanceMin 1
followLostStep 15
followSitAuto 0
followBot 0
Sumber : http://forums.openkore.com/
Tidak ada komentar:
Posting Komentar