Openkore.com

OpenKore Forums
It is currently 16 Nov 2018, 11:55

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Protect The Priest Macro=)
PostPosted: 15 Jan 2010, 03:45 
Offline
The Way Of Human
The Way Of Human
User avatar

Joined: 16 Aug 2009, 03:47
Posts: 188
Location: Gonryun
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:
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:
################################
######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:
################################
######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.php?f=32&t=8444&p=32795#p32795

thx Mushroom =)

_________________
Just like old times.


Last edited by gamenikko on 09 May 2010, 07:51, edited 17 times in total.

Top
 Profile  
 
 Post subject: Re: Protect the priest macro
PostPosted: 15 Jan 2010, 05:29 
Offline
Human
Human
User avatar

Joined: 21 Jul 2009, 13:27
Posts: 23
ithink u should use $.lastMonsterID instead of $.lastMonster1

_________________
Hi everyone dont scold me plz


Top
 Profile  
 
 Post subject: Re: Protect the priest macro
PostPosted: 15 Jan 2010, 09:05 
Offline
The Way Of Human
The Way Of Human
User avatar

Joined: 16 Aug 2009, 03:47
Posts: 188
Location: Gonryun
skill fails if i used $.lastMonsterID

_________________
Just like old times.


Top
 Profile  
 
 Post subject: Re: Protect the priest macro
PostPosted: 15 Jan 2010, 14:36 
Offline
Perl Monk
Perl Monk
User avatar

Joined: 04 Apr 2008, 14:04
Posts: 428
Location: Brazil
$.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.


Top
 Profile  
 
 Post subject: Re: Protect The Priest Macro=)
PostPosted: 24 Jan 2010, 07:07 
Offline
Human
Human

Joined: 06 Dec 2009, 11:30
Posts: 21
Code:
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


Top
 Profile  
 
 Post subject: Re: Protect The Priest Macro=)
PostPosted: 24 Jan 2010, 13:56 
Offline
Perl Monk
Perl Monk
User avatar

Joined: 04 Apr 2008, 14:04
Posts: 428
Location: Brazil
It's because of this:
Quote:
$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.


Top
 Profile  
 
 Post subject: Re: Protect The Priest Macro=)
PostPosted: 25 Jan 2010, 14:26 
Offline
The Way Of Human
The Way Of Human
User avatar

Joined: 16 Aug 2009, 03:47
Posts: 188
Location: Gonryun
UPDATED added another method

_________________
Just like old times.


Top
 Profile  
 
 Post subject: Re: Protect The Priest Macro=)
PostPosted: 25 Jan 2010, 14:35 
Offline
Perl Monk
Perl Monk
User avatar

Joined: 04 Apr 2008, 14:04
Posts: 428
Location: Brazil
Just a note, you can change:
Code:
$lockmap = YourLockMap

to
Code:
$lockmap = @config(lockMap)


So you won't need to change the macro everytime your lockMap changes.

_________________
Quit.


Top
 Profile  
 
 Post subject: Re: Protect The Priest Macro=)
PostPosted: 27 Jan 2010, 21:59 
Offline
Human
Human

Joined: 09 Dec 2009, 01:18
Posts: 33
the macros protect priest is not working when PM asd a 1-0 command the master bot wont react.


Top
 Profile  
 
 Post subject: Re: Protect The Priest Macro=)
PostPosted: 28 Jan 2010, 09:20 
Offline
The Way Of Human
The Way Of Human
User avatar

Joined: 16 Aug 2009, 03:47
Posts: 188
Location: Gonryun
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group