Pages

Sunday, May 9, 2010

Openkore Macro | Party Search Macro

This macro will be triggered when the slave is lost, it will send pm to master and the master will send a command to move to its current location and also the slave sends command to move the master to its current location.
Pros: faster party search, followBot 1 will just set a "meeting point" for both master and slave, but this one,, they will move to each others place, thus meeting them FAST
Cons: when the master is dead and at town, he will still go to the slave even his HP is low, so i use the SIT MACRO below, to ensure that if the master has low hp he wont move until the slave heals him =)

Place this into macros.txt of your slave and master.

slave(usually the priest)
master(the one who will be suported by the slave)

Macro Code:

For Slave


################################
######FIND MASTER###############
################################
#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
}
}


For Master

#######################################
########FIND SLAVE#####################
#######################################
#slave is lost
automacro findSlave {
pm /x (.*) (.*) (.*)/
call {
$slavemap = $.lastMatch1
$slavemapx = $.lastMatch2
$slavemapy = $.lastMatch3
$mymap = $.map
if ($slavemap == $mymap) goto findslave
do pm "$.lastpm" x $.map $.pos
stop
:findslave
do pm "$.lastpm" x $.map $.pos
do move $slavemap $slavemapx $slavemapy
}
}
#when slave is found
automacro clear {
pm /clear/
call {
do eval AI::clear("move", "route");
}
}

1 comments:

Anonymous said...

kudos, great work! a problem though, it seems when 'clear' macro activates it loses its previous random point where its suppose to go and re-sets to another location, meaning sometimes it tend to return to its previous random spot, where in it already cleared monsters in that location.

for some reason the usual 'followbot' process doesn't have the problem

Post a Comment