Pet attacking on enrage macro

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

Lum
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Sep 16, 2004 10:12 am

Pet attacking on enrage macro

Post by Lum » Wed Sep 29, 2004 7:34 pm

I'm not so great at making macros, so i figured i would see if one has been made. Search didn't ocme up with any results i wanted that i could see. Its probably put into a larger multi purpose macro but i just want a simple one.

Is it possible to make a macro, or plugin, that will read what your pet replies to /pet attack (attacking thismob, master), and watch for that name NPC to enrage near you. When the npc enrages it will command /pet back off or /pet hold.

I've watched little fluffy tear himself a new one by quadding into a boss mobs enrage before i could get to pet hold :P

llama
orc pawn
orc pawn
Posts: 20
Joined: Mon Dec 29, 2003 8:13 am

Post by llama » Wed Sep 29, 2004 7:52 pm

This works for me. But no check if it is pet target that is Enraged or other mob.

Code: Select all


#Event Enrage   "#*#has become ENRAGED#*#" 


Sub Main 

:loop
/doevents
/goto :loop

/return


Sub Event_Enrage
	/echo Enrage, PET OFF.
	/pet back
	/pet back
	/pet hold
	/return


Lum
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Sep 16, 2004 10:12 am

Post by Lum » Sun Oct 03, 2004 9:56 pm

the code from llama works, but as i wanted to avoid im having problems with other pets nearby enraging, my own pet enraging, or just mobs nearby i dont care about. It sucks when fluffy enrages, ses his own message and then backs off, getting his butt reemed before a heal lands :P

as i asked before is it possible to read the Text that pet says he is attacking, watch for that name of mob to enrage and that makes him back off, but not another mob nearby that i haven't told him specifically to attack? I dont need the macro to make him attack again as i dont intend to afk it :P

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Oct 04, 2004 1:59 am

Well this is close to what you want but definatly should need work since I have never used the #1# type of events I am not sure I added them right.. maybe someone can clean this up.

Code: Select all

#Event mob "#*#attacking #1#, master"
#Event Enrage "#1#has become ENRAGED#*#"
Sub Main

/declare mobname string global

:waitforevents
/doevents
/delay 1
/goto waitforevents

/return

Sub mob
/varset mobname #1#
/return

Sub Enrage
/if ${mobname} ==#1#
/pet hold
/return

Falco72
a hill giant
a hill giant
Posts: 215
Joined: Fri Sep 26, 2003 3:24 am

Post by Falco72 » Mon Oct 04, 2004 2:33 am

Code: Select all

#Event Mob "#*#attacking #1#, master"
#Event Enrage "#1# has become ENRAGED#*#"
#Event UnEnrage "#1# is no longer enraged#*#"

Sub Main
   /declare mobname string outer

   :waitforevents
   /doevents
   /delay 1
   /goto :waitforevents
/return

Sub Event_Mob(string MobText,string AttkMobName)
   /varset mobname ${AttkMobName}
/return

Sub Event_Enrage(string OnRageText,string EnRgName)
   /if (!${Me.Pet.ID} /return
   /if ${mobname.Equal[${EnRgName}]} {
      /pet back off
      /delay 2
      /pet hold
   }
/return

Sub Event_UnEnrage(string OffRageText,string OffRgName)
   /if (!${Me.Pet.ID} /return
   /if (${mobname.Equal[${OffRgName}]) {
      /target npc ${mobname}
      /delay 3
      /pet kill
   }
/return
Reworked the code so it can really works in a macro. BUT, working with enrage is a pain, you need to be enough near to the mob to ear the enrage call and your macro need not to be doing other things else the event will kick off later and your pet will be probably killed.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Mon Oct 04, 2004 10:51 am

You can use variables in event trigger definitions.
This would trigger if mobname was set correctly:

Code: Select all

#event enrage "|${mobname}| has become enraged."

Lum
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Sep 16, 2004 10:12 am

Post by Lum » Mon Oct 04, 2004 1:58 pm

Thanks, ill have to try it out next time i come to something that enrages. i already know I'll have to be in range to hear enrage, I usually do if i know the mob enrages so i can TRY to protect my pet hehe