Page 1 of 1

Help With My Macro

Posted: 04 Oct 2017, 01:48
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..

Re: Help With My Macro

Posted: 04 Oct 2017, 04:01
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
      }
}