Protect The Priest Macro=)

Moderator: Moderators

Message
Author
gamenikko
The Way Of Human
The Way Of Human
Posts: 192
Joined: 16 Aug 2009, 03:47
Noob?: Yes
Location: Gonryun

Protect The Priest Macro=)

#1 Post by gamenikko »

Protect The Priest
-Using Status Recovery
-or/or both-
-Commanding the master

Update : May 09, 2010

This will cast status recovery on the aggressive monster that attacks your priest, thus changing the target of the monster.
Warning : turn this off if you will use tank mode, and you will use priest as your tanker!

macro for SLAVE

Code: Select all

automacro statusRecover {
	timeout 3
	console /Monster (.*) \((\d+)\) attacks you /i
	call {
	$m = $.lastMatch2
	do sm 72 $m
	}
}
READ:
Thx to Mushroom for correcting my codes =)

UPDATE : OR this macro =0

it will send an attack command to the MASTER to attack a monster that attacks the SLAVE
this will not work 100% of all time as bots will see different monster IDs,but in some case they are the same, so its cool =)

Updated May 09, 2010

macro for MASTER
you should use this if u are using advance party search macro, coz ur priest shall not be authorized by the master,

Code: Select all

################################
######COMMAND###################
################################

automacro Command {
   console /\(From: (.*)\) : xd (.*)/
   call {
#####NOTE : edit $town to the map you are using storage and auto buys!####
        $town = Geffen #edit this!
        $mymap = $.map
   $xd = $.lastMatch1
   $xd2 = $.lastMatch2
        if ($mymap == $town) stop
   do $xd2
	}
}

macro for SLAVE

Code: Select all

################################
######PROTECT ME################
################################

automacro protectMe {
   timeout 3
   console /Monster (.*) \((\d+)\) attacks you/
   call {
   $mymap = $.map
   $lockmap = @config (lockMap)
   $master = @config (followTarget)
   $follow = @config (follow)
   $mon = $.lastMatch2
   if ($follow = 0) stop
   if ($mymap != $lockmap) stop
   do pm "$master" xd a $mon
   }   
}
ok the only prob here is, when ur slave is lost, and ur master is far away, im recommending you, to use my party search macro =)
Advance Party Search Macro :
http://forums.openkore.com/viewtopic.ph ... 795#p32795

thx Mushroom =)
Last edited by gamenikko on 09 May 2010, 07:51, edited 17 times in total.
Just like old times.

koodpzok
Human
Human
Posts: 26
Joined: 21 Jul 2009, 13:27
Noob?: No

Re: Protect the priest macro

#2 Post by koodpzok »

ithink u should use $.lastMonsterID instead of $.lastMonster1
Hi everyone dont scold me plz

gamenikko
The Way Of Human
The Way Of Human
Posts: 192
Joined: 16 Aug 2009, 03:47
Noob?: Yes
Location: Gonryun

Re: Protect the priest macro

#3 Post by gamenikko »

skill fails if i used $.lastMonsterID
Just like old times.

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Protect the priest macro

#4 Post by Mushroom »

$.lastMonster is only when using the monster syntax.

For backreference in console syntax, use $.lastMatchN

$.lastMatch1 = backreference for the first pair of brackets
$.lastMatch2 = backreference for the second pair of brackets
$.lastMatch3 = backreference for the third pair of brackets

and so on..
Quit.

googley71
Human
Human
Posts: 21
Joined: 06 Dec 2009, 11:30
Noob?: Yes

Re: Protect The Priest Macro=)

#5 Post by googley71 »

Code: Select all

Syntax error in function 'sm' (Use Skill on Monster)
Usage: sm <skill #> <monster #> [level]
I get this message at my slave, I already have the skill
Any help with this?
Thanks

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Protect The Priest Macro=)

#6 Post by Mushroom »

It's because of this:
$m = $.lastMatchN
N should be a number according to the backreference.

Because you want to get the monster binID and in the regex (/Monster (.*) \((\d+)\) attacks you /i) the monster binID is the sencond pair of brackets, you should use $.lastMatch2. So, if you want get the monster's name, use $.lastMatch1.
Quit.

gamenikko
The Way Of Human
The Way Of Human
Posts: 192
Joined: 16 Aug 2009, 03:47
Noob?: Yes
Location: Gonryun

Re: Protect The Priest Macro=)

#7 Post by gamenikko »

UPDATED added another method
Just like old times.

Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: Protect The Priest Macro=)

#8 Post by Mushroom »

Just a note, you can change:

Code: Select all

 $lockmap = YourLockMap
to

Code: Select all

$lockmap = @config(lockMap)
So you won't need to change the macro everytime your lockMap changes.
Quit.

n00b
Human
Human
Posts: 33
Joined: 09 Dec 2009, 01:18
Noob?: No

Re: Protect The Priest Macro=)

#9 Post by n00b »

the macros protect priest is not working when PM asd a 1-0 command the master bot wont react.

gamenikko
The Way Of Human
The Way Of Human
Posts: 192
Joined: 16 Aug 2009, 03:47
Noob?: Yes
Location: Gonryun

Re: Protect The Priest Macro=)

#10 Post by gamenikko »

n00b wrote:the macros protect priest is not working when PM asd a 1-0 command the master bot wont react.
my bad hehehe i forgot to change a character, its ok now ^_^
Just like old times.

Post Reply