Help With My Macro

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
blakbord01
Noob
Noob
Posts: 2
Joined: 08 Sep 2017, 08:17
Noob?: Yes

Help With My Macro

#1 Post by blakbord01 »

here's my code..

Code: Select all

automacro Monsters {
		console /\[(.*)/(.*)\] Monster (.*) \((\d+)\) attacks you/
		run-once 1
		call {
			pause 2
			
			$num1 = $.lastmatch1
			$num2 = $.lastmatch2
			$monster = $.lastmatch3
			$monsterID = $.lastmatch4
			
			if ($monster == Kobold Archer) goto case1
			if ($monster == Wild Rose) goto case2
			if ($monster == Dustiness) goto case2

			:case1
				do p pneuma
				release Monsters

			:case2
				release Monsters
		}
}
it is working but not perfect, the bot keeps doing party message for every monster that attacks the bot..

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Help With My Macro

#2 Post by Mortimal »

Code: Select all

automacro Monsters {
      console /\[(.*)/(.*)\] Monster (.*) \((\d+)\) attacks you/
      run-once 1
      call {
         pause 2
         
         $num1 = $.lastmatch1
         $num2 = $.lastmatch2
         $monster = $.lastmatch3
         $monsterID = $.lastmatch4
         
         if ($monster == Kobold Archer) goto case1
         goto case2
         :case1
            do p pneuma
            release Monsters

         :case2
            release Monsters
      }
}
Please use pin function for uploading your file contents!

Post Reply