Consent Monks and Rogues in Raid.

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

Moderator: MacroQuest Developers

don'tdoit
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 12:24 pm

Consent Monks and Rogues in Raid.

Post by don'tdoit » Mon May 17, 2004 11:01 pm

Ok, this is my first post of a mac, so be gentle but enjoy. If it already exists elsewhere I apologize, but I didn't see it. This macro simply consents all the Monks and Rogues in your current Raid.

Code: Select all

Sub Main
   /declare a int local
   /varset a 1
   :loop 
   /if (${String[${Raid.Member[${a}].Class}].Equal[Monk]} || ${String[${Raid.Member[${a}].Class}].Equal[Rogue]}) {
      /echo Consenting ${Raid.Member[${a}]}
      /consent ${Raid.Member[${a}]}
      /delay 25
   }
   /varcalc a ${a}+1
   /if (${a}>${Raid.Members}) {
      /echo Done Consenting, enjoy your AFK!
      /return
   }
   /goto :loop 
/return

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Tue May 18, 2004 7:19 am

Not in a raid to test it atm, but made a couple changes:

1) used a for next loop
2) got rid of the String conversion and used ${Raid.Member[a].Class.Name} which is already a string.
3) added clerics to the classes to consent
4) added .Name to ${Raid.Member[${a}].Name} in the consent command.

Should leave us with:

Code: Select all

Sub Main 

   /declare a int local 

   /for a 1 to ${Raid.Members}

      /if (${Raid.Member[${a}].Class.Name}.Equal[Monk] || ${Raid.Member[${a}].Class.Name}.Equal[Rogue]} || ${Raid.Member[${a}].Class.Name}.Equal[Cleric]) { 
         /consent ${Raid.Member[${a}].Name} 
         /echo Consenting ${Raid.Member[${a}].Name}
         /delay 2s
      } 
   /next a

/return

Onezero
a ghoul
a ghoul
Posts: 95
Joined: Thu Jan 01, 2004 1:19 pm
Location: Normal, IL
Contact:

Post by Onezero » Tue May 18, 2004 11:07 pm

Fixed a few bracket errors in the /if line.

Code: Select all

Sub Main

   /declare a int local

   /for a 1 to ${Raid.Members}

      /if (${Raid.Member[${a}].Class.Name.Equal[Monk]} || ${Raid.Member[${a}].Class.Name.Equal[Rogue]} || ${Raid.Member[${a}].Class.Name.Equal[Cleric]}) {
         /consent ${Raid.Member[${a}].Name}
         /echo Consenting ${Raid.Member[${a}].Name}
         /delay 2s
      }
   /next a

/return
.[b].[/b]:[b]:[/b] Onezero
"[i]Health is merely the slowest rate at which you can die.[/i]"

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Tue May 18, 2004 11:56 pm

Thanks, was just lookin to see why that wasnt workin. Added one more antispam change:

Code: Select all

Sub Main 

   /declare a int local 1
   /declare t int local 0
   /declare Names string local "Consented: "

   /for a 1 to ${Raid.Members}

      /if (${Raid.Member[${a}].Class.Name.Equal[Monk]} || ${Raid.Member[${a}].Class.Name.Equal[Rogue]} || ${Raid.Member[${a}].Class.Name.Equal[Cleric]}) { 
         /consent ${Raid.Member[${a}].Name}
         /varset Names ${Names}${Raid.Member[${a}].Name},
         /varcalc t ${t}+1
         /delay 2s
      } 
   /next a
      /varset Names ${Names}(${t} total)
      /echo ${Names}

/return

eluminate
orc pawn
orc pawn
Posts: 16
Joined: Wed Apr 28, 2004 4:20 am

Post by eluminate » Thu May 20, 2004 10:28 am

5 line guild rogue hotbutton works too.

Pheph
a hill giant
a hill giant
Posts: 196
Joined: Thu Oct 09, 2003 8:15 pm

Post by Pheph » Thu May 20, 2004 6:02 pm

yeah, but with a macro you don't have to adjust it after which roag is online...

sj_digriz
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Jun 02, 2004 9:10 am
Contact:

Post by sj_digriz » Wed Jun 02, 2004 9:18 am

Hi, this is my first post and probably a total newb situation. If it is, just give me the finger and I'll continue to read and see if I can figure out what I'm doing wrong.

When I run this script I get the /if syntax error for each class consent. I was in a raid at the time I tried using it.

Hope this belongs here and not over in help. Anyhow, thanks for the script.

SJ

Code: Select all

Sub Main 

   /declare a int local 1
   /declare t int local 0
   /declare Names string local "Consented: "

   /for a 1 to ${Raid.Members}

      /if (${Raid.Member[${a}].Class.Name.Equal[Monk]} || ${Raid.Member[${a}].Class.Name.Equal[Rogue]} || ${Raid.Member[${a}].Class.Name.Equal[Cleric]}) { 
         /consent ${Raid.Member[${a}].Name}
         /varset Names ${Names}${Raid.Member[${a}].Name},
         /varcalc t ${t}+1
         /delay 2s
      } 
   /next a
      /varset Names ${Names}(${t} total)
      /echo ${Names}

/return

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Fri Jun 04, 2004 1:22 am

k here we go. died a few times tonight and got it working pretty well:

Code: Select all

|consent.mac
|v1.0 4-Jun-04

Sub Main 

   /declare a int local 1
   /declare r int local 0
   /declare m int local 0
   /declare c int local 0
   /declare rogues string local
   /declare monks string local
   /declare clerics string local
   /varset rogues ""
   /varset monks ""
   /varset clerics ""

   /for a 1 to ${Raid.Members}

      /if (${Raid.Member[${a}].Class.Name.Equal[Rogue]}) { 
         /consent ${Raid.Member[${a}].Name}
         /varset rogues ${rogues}${Raid.Member[${a}].Name}, 
         /varcalc r ${r}+1
         /delay 2s
      } else /if (${Raid.Member[${a}].Class.Name.Equal[Monk]}) {
         /consent ${Raid.Member[${a}].Name}
         /varset monks ${monks}${Raid.Member[${a}].Name}, 
         /varcalc m ${m}+1
         /delay 2s
      } else /if (${Raid.Member[${a}].Class.Name.Equal[Cleric]}) {
         /consent ${Raid.Member[${a}].Name}
         /varset clerics ${clerics}${Raid.Member[${a}].Name}, 
         /varcalc c ${c}+1
         /delay 2s
      }
   /next a
      /echo Consented ${r} Rogues: ${rogues}
      /echo Consented ${m} Monks: ${monks}
      /echo Consented ${c} Clerics: ${clerics}

/return
The 1 long line of names was better than the 15 lines of spam, but still decided I didnt like it, so went with the 1 line per class you see above for the output. Also makes it a little easier to see what to remove or change if you want to tailor it.

sj_digriz
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Jun 02, 2004 9:10 am
Contact:

Post by sj_digriz » Fri Jun 04, 2004 2:11 pm

cool, I'll give it a go tonight. We tend to consent rogues and necros. Necros/monks are pretty much all that have a shot at surviving when we wipe now. So I swapped in necros for clerics.

Thanks again,

SJ

sj_digriz
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Jun 02, 2004 9:10 am
Contact:

Post by sj_digriz » Sun Jun 06, 2004 8:53 pm

$$$$ just wanted to say it worked awesome. Unfortunately that means we were total retards and wiped, but this was a cool util to have.

sj_digriz
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Jun 02, 2004 9:10 am
Contact:

broke on 16th patch

Post by sj_digriz » Sun Jun 20, 2004 9:11 pm

returns 0 consents after the 16th patch and the updated 19th MQ compile.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sun Jun 20, 2004 9:40 pm

The EQRAIDMEMBER struct changed. You can either wait for it to be added to a new zip or you can refer to here for the updated struct.

sj_digriz
a lesser mummy
a lesser mummy
Posts: 40
Joined: Wed Jun 02, 2004 9:10 am
Contact:

Post by sj_digriz » Sun Jun 20, 2004 10:08 pm

heh, thanks for the info. This is my favorite macro now. Doing Inktu'ta and Tvexu gets a little hard on the consents. Even with my old hotkeys its a pain in the rear.

raytrace
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Jun 20, 2004 2:50 pm

Post by raytrace » Mon Jun 21, 2004 11:22 am

Yeah, I'm always getting yelled at because I forget to consent on a death. I die so rarely that I just don't think about it.

Now for us that forget, couldn't you do this instead?

*Edit* I made the struct changes that ieatacid linked to earlier in this thread and recompiled MQ2 and this worked out great.

Code: Select all

|consent.mac 
|v1.1 21-Jun-04
#event Slain "#*#You have been slain by#*# "

|-------------------------------------------------------------------------------
|Sub: Main
|-------------------------------------------------------------------------------
Sub Main 
   /echo Consent Macro Started 
   :Loop 
        /doevents 
        /delay 5s 
   /goto :Loop
/return

|-------------------------------------------------------------------------------
|Sub: Slain   'Your butt just got owned'
|-------------------------------------------------------------------------------
Sub Slain
   /declare a int local 1 
   /declare r int local 0 
   /declare m int local 0 
   /declare c int local 0 
   /declare rogues string local 
   /declare monks string local 
   /declare clerics string local 
   /varset rogues "" 
   /varset monks "" 
   /varset clerics "" 

   /echo Consenting...

   /for a 1 to ${Raid.Members} 

      /if (${Raid.Member[${a}].Class.Name.Equal[Rogue]}) { 
         /consent ${Raid.Member[${a}].Name} 
         /varset rogues ${rogues}${Raid.Member[${a}].Name}, 
         /varcalc r ${r}+1 
         /delay 2s 
      } else /if (${Raid.Member[${a}].Class.Name.Equal[Monk]}) { 
         /consent ${Raid.Member[${a}].Name} 
         /varset monks ${monks}${Raid.Member[${a}].Name}, 
         /varcalc m ${m}+1 
         /delay 2s 
      } else /if (${Raid.Member[${a}].Class.Name.Equal[Cleric]}) { 
         /consent ${Raid.Member[${a}].Name} 
         /varset clerics ${clerics}${Raid.Member[${a}].Name}, 
         /varcalc c ${c}+1 
         /delay 2s 
      } 
   /next a 
      /echo Consented ${r} Rogues: ${rogues} 
      /echo Consented ${m} Monks: ${monks} 
      /echo Consented ${c} Clerics: ${clerics} 
/return
Last edited by raytrace on Tue Jun 22, 2004 8:40 pm, edited 1 time in total.

dok
a ghoul
a ghoul
Posts: 127
Joined: Mon Mar 15, 2004 3:38 pm

Post by dok » Tue Jun 22, 2004 2:21 am

should work, except you're going to need a "/doevents" loop in there to check if you die.

Code: Select all

Sub Main 
   /echo Consent Macro Started 
   :Loop
        /doevents
        /delay 5s
   /goto :Loop
/return