Bard Auto Aquire Target Macro

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

User avatar
Fluffy
a ghoul
a ghoul
Posts: 81
Joined: Sun Aug 22, 2004 5:08 pm

Bard Auto Aquire Target Macro

Post by Fluffy » Tue Oct 12, 2004 5:23 am

So as I was leveling a bard. I found chant kiting quite boring and I did not need to be there for it... so I wrote the following code to help after gathering 1000 mobs in a zone.. It will also report back XP gained after a kill and how long you have been doing it. Yes I know the XP reporting is redundant.. But I like it displayed that way..

Code: Select all

| - fluffychant.mac - By Fluffy
#event GetTar "You must first select a target for this spell!" 
#Event Exp       "#*#You gain#*#experience#*#" 
|#event Died       "You have entered" 

#turbo 10 

Sub Main() 
/declare Exper int outer 
/declare AAExp int outer 
/declare LDExp float outer ${Me.PctGroupLeaderExp} 
/declare AAAExp float outer ${Me.PctAAExp} 
/declare Exp float outer ${Me.PctExp} 

/varset Exper ${Me.Exp} 
/varset AAExp ${Me.AAExp} 

/echo Fluffy's Chant Kite Macro

:Loop 

/doevents
/if (!${Target.ID}) {
|No target get one
  /echo No target, getting one!
  /call GetTarget
  }
  
/if (${Target.Distance}>150) { 
  /echo Target Warped... Getting a new target; id was ${Target.ID} 
  /call GetTarget 
  /delay 2 
} 

/goto :Loop 
:Done
echo Fluffy's Chant Kite Macro Completed
/return 

Sub Event_Exp
  /call Exp
/return

Sub Exp
   /varset AAExp ${Math.Calc[${Me.AAExp}-${AAExp}]} 
   /varset Exper ${Math.Calc[${Me.Exp}-${Exper}]} 

   /echo **      EXP: ${Exper}:${Me.PctExp}% - AAXP: ${AAExp}:${Me.AAExp}% - ${Math.Calc[${Macro.RunTime}/60]} minutes 

   /varset Exper ${Me.Exp} 
   /varset AAExp ${Me.AAExp} 

  | More information
  |- Ignore leadership experience event triggers (redundant trigger)
  /if (${Line.Find[leadership]}) /return
  |- Experience calculation and reporting
  /echo ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%) 
  /varset LDExp ${Me.PctGroupLeaderExp} 
  /varset AAAExp ${Me.PctAAExp} 
  /varset Exp ${Me.PctExp} 

/return 

Sub Event_GetTar
  /call GetTarget
/return


Sub GetTarget 
/target ID ${NearestSpawn[2, npc].ID}
/if (${Target.ID}) {
  /echo Found one!
  }

/return 

Space-Boy
a hill giant
a hill giant
Posts: 242
Joined: Wed Dec 04, 2002 12:53 pm
Contact:

Post by Space-Boy » Tue Oct 12, 2004 6:08 am

try this for pretty and fun exp reporting! Add in the leader crap yourself!

Code: Select all


#Event Exp       "#*#You gain#*#experience#*#" 



/declare Exper int outer 
/declare AAExp int outer 
/varset Exper ${Me.PctExp} 
/varset AAExp ${Me.PctAAExp}
/declare Expert int outer 
/declare AAExpt int outer 
/varset Expert 0 
/varset AAExpt 0 
/declare mobcount int outer/varset mobcount 0



Sub Event_Exp 

/varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]} 
/varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]} 
/varset AAExpt ${Math.Calc[${AAExpt}+${AAExp}]} 
/varset Expert ${Math.Calc[${Expert}+${Exper}]} 
/varset mobcount ${Math.Calc[${mobcount}+1]}

/echo -----------------------------------------------
/echo -- Experience: Gained:${Exper}% Total:${Expert}%
/echo -- AltAdvance: Gained:${AAExp}% Total:${AAExpt}%
/echo -- Killed ${mobcount} Mobs in ${Math.Calc[${Macro.RunTime}/60]} Minutes
/echo -----------------------------------------------

/varset Exper ${Me.PctExp} 
/varset AAExp ${Me.PctAAExp} 
/return
You have gotten better at Carpal Tunnel! (247)

nemiq
orc pawn
orc pawn
Posts: 23
Joined: Tue Jan 13, 2004 1:36 am

Post by nemiq » Sun Mar 20, 2005 4:48 pm

how would I get this macro to exclude 1 particular monster in an area?

JJ
a hill giant
a hill giant
Posts: 227
Joined: Thu Nov 11, 2004 5:50 am

Post by JJ » Sun Mar 20, 2005 6:13 pm

Modify this section:

Code: Select all

Sub GetTarget 
/target ID ${NearestSpawn[2, npc].ID} 
/if (${Target.ID}) { 
  /echo Found one! 
  } 

/return 
with something like:

Code: Select all

/if (!${Target.CleanName.Equal[The Fabled Trakanon]}) ....