MyWarrior v1.0

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

Moderator: MacroQuest Developers

timmy
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Oct 27, 2004 8:42 pm

MyWarrior v1.0

Post by timmy » Sat Jun 04, 2005 4:48 pm

I've been lurking around the forums for a long time. Recently I've been starting to write my own macros, this community has given me so much and I feel it's about time I contributed some of my work.

I'm not very experienced at this, I still have alot to learn about coding in this language so if theres anything funky then keep that in mind.

Before I had written this macro I really hadn't found anything that suited what I was looking for (WH being the closest, however I found it to be quite buggy). I 6-box toons while playing my warrior manually to do the pulling and tanking, this macro is designed to be an assistant rather than a complete automation of the warrior.

Hopefully someone will find this useful.

v1.0 Features:
Targetting Information - Telling you what class, race etc. Useful for knowing if you're dealing with a cleric type mob or a mob that could potentially gate.
Auto Taunt/Kick - Will only do this if the mob if close enough and attack is on, the distance can be adjusted in the macro.
Move Back After Summon - One problem I've always hated is when a mob summons you, the mob will turn around. This macro will move you back a few steps after a summon which will help keep the mob from moving around too much (Rogues like this). I found this to be very useful in places like Riftseekers where the mobs have a very small combat range and tend to summon you lots after being pushed a little.
Enrage Handling - Turns attack off and on with mob enrage.
Assist Calling - You can specify the macro to call assist when mob gets to a certain percentage of health, this can be turned on and off with a parameter.
Camp Check Warning - Notifies you in the MQ window when someone calls a camp check and at what time (obviously this won't catch all cases due to misspellings and odd abbreviations).
Mob CHing/Gating Warning - Notifies in MQ window when a mob is attempting to gate or cast Complete Healing. Having trouble with the CH catch, I'll do some testing.
Built in Wait4rez
Mob Death Handling - Checks MobID rather than watching for an exp message like some macros do, this hopefully prevents the macro from getting stuck like some macros do that check for exp messages to figure out when a mob is dead.
Stand After Feign - When the macro detects that a mob has proc'd an FD spell on you the macro will immediately stand and continue attacking. Havn't been able to test this.
Furious Activation - Macro will automatically hit furious when you get to a percentage of health. You may want to adjust the percentage for your warrior based on hitpoints etc, I think I have it set to around 7% which has saved my 13k tank from dying in RS a few times.

Let me know if you have any feedback, problems or suggestions.

Code: Select all

#Event GotSummoned "You have been summoned!"
#Event Enraged     "#*#|${Target.CleanName}| has become ENRAGED#*#" 
#Event EnragedOff  "#*#|${Target.CleanName}| is no longer enraged#*#"
#Event ImDead      "You have been slain by#*#"
#Event ImDead      "You died."
#Event MobGate     "|${Target.CleanName}| begins to cast the gate spell#*#"
#Event MobCH       "|${Target.CleanName}| begins to cast the complete healing spell#*#"
#Event CampCheck   "#*#out of character#*#camp#*#check#*#" 
#Event CampCheck   "#*#out of character#*#cc#*#" 
#Event CampCheck   "#*#shout#*#camp#*#check#*#" 
#Event CampCheck   "#*#shout#*#cc#*#" 

Sub Main

/declare AssistPct int outer ${Param0}
/declare MyTarget int outer
/declare UseAssist int outer
/declare TargetInfo int outer

/echo Warrior Macro Loaded.

| *********************
| *Checking Parameters*
| *********************

/if (${Defined[Param0]}) {
   /if (${Param0}>=1 && ${Param0}<=99) { 
      /echo Calling Assist is: ON 
      /echo Assist Will be Called at: ${AssistPct} 
      /varset AssistPct ${AssistPct}
      /varset UseAssist 1
   } else {
      /echo Assist PCT Needs to be a Number Between 0 and 100
      /endmac
   }
} else {
   /echo Calling Assist is: OFF
   /echo To Set Assist Calling, Use Format: /mac mywarrior <PCT to Call Assist>
   /echo Ex: /mac mywarrior 97
}

| ***********
| *Main Loop*
| ***********

:Mainloop

/call CheckAssist
/call CheckHealth
/call NewTarget
/call TauntKick
/call CheckFeigned
/doevents

/goto :Mainloop

| ***************************************
| *Check To See If I Need To Call Assist*
| ***************************************

Sub CheckAssist

/if (${UseAssist}>0 && ${Target.Type.Equal[NPC]} && ${MyTarget}!=${Target.ID} && ${Target.PctHPs}<=${AssistPct} && ${Me.Combat}) { 
   /varset MyTarget ${Target.ID}
   /g Assist me now on -[[ %t ]]-
   /rs Assist me now on -[[ %t ]]-
} 

/return

| **************************************
| *Check To See If My Health Is Too Low*
| **************************************

Sub CheckHealth

   /if (${Me.PctHPs}<=9) {
      
      /disc Furious
      /echo Health too low! Hitting Furious!
      /g HEAL ME!
      /delay 2s

   }

/return

| ******************************
| *Display Target's Information*
| ******************************

Sub NewTarget

/if (${TargetInfo}!=${Target.ID} && ${Target.ID}) {

   /varset TargetInfo ${Target.ID}
   /echo Target Information:
   /echo [ ${Target.Level} ${Target.Race} ${Target.Class} ] ${Target} ${Target.Surname} ( ${Target.Type} )

}

/return

| ******************************************
| *Check To See If I Need To Taunt And Kick*
| ******************************************

Sub TauntKick

   /if (${Me.Combat}) {  
 
      /if (${Me.AbilityReady[Kick]} && ${Target.Distance}<=25) {
         /doability kick 
      } 

      /if (${Me.AbilityReady[Taunt]} && ${Target.Distance}<=25) { 
         /doability taunt 
      } 

   }

/return

| ************************************
| *Am I Feigning? If So Then Stand Up*
| ************************************

Sub CheckFeigned

   /if (${Me.Feigning}) {

      /stand
      /attack on
      /echo Mob made me feign, Standing!

   }

/return


| ********
| *Events*
| ********


Sub Event_GotSummoned

   /keypress back hold
   /delay 4
   /keypress back

/return

Sub Event_Enraged

   /attack off
   /echo Mob is Enraged, turning off attack and waiting!

/return

Sub Event_EnragedOff

   /attack on
   /echo Enrage off, attacking..

/return

Sub Event_MobGate

  /echo ** WARNING ** ${Target.CleanName} is Attempting to Gate!

/return

Sub Event_MobCH

  /echo ** WARNING ** ${Target.CleanName} is Attempting to Cast Complete Heal!

/return

Sub Event_CampCheck

  /echo ** Camp Check Called at ${Time} **

/return

Sub Event_ImDead

/if (!${Defined[t]})         /declare t         int outer 0 
/if (!${Defined[loottotal]}) /declare loottotal int outer 
/if (!${Defined[lootslot]})  /declare lootslot  int outer 
/if (!${Defined[lootleft]})  /declare lootleft  int outer 0 

/call Consent 

/echo Awaiting rez: will auto-accept, then loot leaving ${lootleft} item/s on corpse 

:waitforrez 

/if (!${Window[ConfirmationDialogBox].Open}) { 
  /delay 1s ${Window[ConfirmationDialogBox].Open} 
  /goto :waitforrez 
} 

/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup 

:zonein 

/delay 5 
/target mycorpse 
/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]} 

/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein 

/if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
  /delay 3s 
  /call Loot 
} else /goto :zonein 

/return 

Sub Consent 

/consent group 
/delay 25 
/consent raid 
/delay 25 
/consent guild 

/return 

Sub Loot 

:corpsepull 
/target mycorpse 
/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]} 
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) { 
  /echo No corpse in this zone 
  /return 
} 
/delay 3s 
/corpse 
/delay 1s ${Target.Distance}<20 
/if (${Target.Distance}>20) { 
  /echo Corpse is too far away 
  /return 
} 
/if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
  /loot 
} else { 
  /echo where did my corpse go? 
  /return 
} 
/delay 5s ${Me.State.Equal[BIND]} 
/if (${Me.State.NotEqual[BIND]}) /goto :corpsepull 
/varset loottotal 0 
:LootLag 
/if (${loottotal}!=${Corpse.Items}) { 
  /varset loottotal ${Corpse.Items} 
  /delay 1s 
  /goto :LootLag 
} 
/if (${loottotal}<=${lootleft}) { 
  /echo Looting aborted.  Error in number items to be left on corpse. 
  /notify LootWnd DoneButton leftmouseup 
  /return 
} 
/varset loottotal ${Math.Calc[${Corpse.Items}-${lootleft}]} 
/echo Looting all but ${lootleft} item(s) 
/for lootslot 1 to ${loottotal} 
:LootItem 
/itemnotify loot${lootslot} rightmouseup 
/delay 5 !${Corpse.Item[${lootslot}].ID} 
/if (!${Corpse.Item[${lootslot}].ID}) { 
  /next lootslot 
} else /goto :LootItem 
/if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag 
:DoneLooting 
/notify LootWnd DoneButton leftmouseup 
/echo Done looting.  ${lootleft} Item(s) left on your corpse. 


/return

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Sat Jun 04, 2005 4:56 pm

Code: Select all

Sub TauntKick

   /if (${Me.Combat}) { 
 
      /if (${Me.AbilityReady[Kick]} && ${Target.Distance}<=25) {
         /doability kick
      }

      /if (${Me.AbilityReady[Taunt]} && ${Target.Distance}<=25) {
         /doability taunt
      }

   }
For the taunt code you should put a HoTT Check. chain taunt is actually bad. because it puts you exacly 1 hate above the next highest person on list.

timmy
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Oct 27, 2004 8:42 pm

Post by timmy » Sat Jun 04, 2005 6:42 pm

You're right, it's not such a great idea. Personally though I've not had many problems with aggro while chain taunting in grouping or raid situations however the potential to have those problems are definately there.

I'll add a HoTT check and figure out an additional way of checking aggro if HoTT isn't active, I think I have some ideas.

Thanks

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Sat Jun 04, 2005 7:49 pm

Code: Select all

  /if ( !${Me.TargetOfTarget.Name.Equal[${Me}]} ) {
    /if ( ${Target.Distance}<25 && ${Me.AbilityReady["Taunt"]} ) {
      /doability "Taunt"
    }
  }
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Sat Jun 04, 2005 7:55 pm

You should also put in a bash / slam check, you do lose out on some dps / agro if you don't use them.

Code: Select all

    /if ( ${Me.Combat} && !${Me.Casting.ID} && ${Me.AbilityReady["Bash"]} ) {
      /if ( ${InvSlot[Offhand].Item.Type.Equal[Shield]} ) {
        /doability "Bash"
      } else {
        /doability "111"
      }
    }
That is for my SK, you may want to do something slightly different from a dual weilding perspective. The rules for bash are slightly different for a warrior.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

monstermac
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sat Jun 04, 2005 11:27 pm

Post by monstermac » Sat Jun 04, 2005 11:32 pm

Any chance you can put in auto assist or if puller calls assist or inc that he will assist the puller and grab agro with some bow action and maybe bazu when mob is in range? but only once.

GORGE
decaying skeleton
decaying skeleton
Posts: 9
Joined: Tue Mar 22, 2005 11:23 pm

Post by GORGE » Fri Jun 17, 2005 2:01 am

Amazing mac been a warrior for 1074 aa's now and 70 levels. Few things id add if I knew how to would be this:

1) Auto shield players under XX%health (id say like 30 pct once they get low health aggro it gets ugly)

2) The mac I use now has stick so im always on the mob but it tends to let you run to much if there was a way to have it tether you some what to a spot would help esp on raids.

3) slam > kick :) but is slam still broke or is there a way now to get it to auto slam ( i have only got kick and bash to ever work)

4) In a perfect world id love to be able to have it auto below if you lose aggro combined with the taunt.

5) I have the warlord's tenacity aa (temporarily raises hps in a pinch) if it could do that ability along with the furious it would be very useful.

the whole getting up from fd thing is amazing man and auto furious too. Thanks a ton for doing it.

fry
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Jun 04, 2005 7:57 am

Post by fry » Wed Jun 29, 2005 12:04 pm

monstermac wrote:Any chance you can put in auto assist or if puller calls assist or inc that he will assist the puller and grab agro with some bow action and maybe bazu when mob is in range? but only once.
That and make it go back to a certain spot after mob is dead. If it's not already set up that way that is.

DigitalMocking
a grimling bloodguard
a grimling bloodguard
Posts: 620
Joined: Mon Apr 04, 2005 5:53 pm

Post by DigitalMocking » Thu Jun 30, 2005 1:01 am

You might want to check out this: http://macroquest2.com/phpBB2/viewtopic.php?t=11622... it does what you're asking for and more.

timmy, I like your macro, I liked it so much I wrote my own, thanks for the inspiration, I took a lot of your ideas and ran with them. You might wanna take a look at lazytank 1.0 and see if there are other ideas.

Great idea on the bow code btw, I'll add that to get a little more agro before it bellows

GORGE
decaying skeleton
decaying skeleton
Posts: 9
Joined: Tue Mar 22, 2005 11:23 pm

Post by GORGE » Thu Jun 30, 2005 2:00 am

clicked on that link but it goes no where :(

Id love to see your warrior one tho.

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Thu Jun 30, 2005 2:02 am

That link is to a VIP topic. You'll need to donate and get VIP access to view it :)

DigitalMocking
a grimling bloodguard
a grimling bloodguard
Posts: 620
Joined: Mon Apr 04, 2005 5:53 pm

Post by DigitalMocking » Thu Jun 30, 2005 4:08 am

Like Night Hawk said, its in the ViP section, most of my work gets posted there, and frankly you should give the devs 10 or 20 bucks, they deserve it.

GORGE
decaying skeleton
decaying skeleton
Posts: 9
Joined: Tue Mar 22, 2005 11:23 pm

Post by GORGE » Thu Jun 30, 2005 4:28 am

On it now :) just have to break down and verify my bank with pay pal :( fricken hate pay pal.

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Thu Jun 30, 2005 5:24 am

nice code :)
regarding the auto taunt, here's how i do it, feel free to use

Code: Select all

/if (${Me.Combat} && (${Me.TargetOfTarget.ID} != ${Me.ID})) {

	/if (${Me.CombatAbilityReady["Bazu Bellow"]}) {
		/i msg IRC_CHANNEL TAUNT: ${Target.CleanName} (${Target.ID}) (${Me.TargetOfTarget.Name} has aggro)
		/doability "Bazu Bellow"
		/delay 5
	} else {		
		/if (${Me.AbilityReady["Taunt"]}) {
			/i msg IRC_CHANNEL # Taunt: ${Target.CleanName} (${Target.ID}) (${Me.TargetOfTarget.Name} has aggro)
			/doability  "Taunt"
			/delay 5
		}
	}
}

GORGE
decaying skeleton
decaying skeleton
Posts: 9
Joined: Tue Mar 22, 2005 11:23 pm

Post by GORGE » Thu Jun 30, 2005 11:19 am

there im no longer a freeloader.