Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2022, 11:03:07 pm *

Login with username, password and session length
Pages: [1]
Print
Author Topic: Raid Invite + Raid Group Macro  (Read 2073 times)
Othik
Newbie
*
Posts: 5


View Profile
« on: December 09, 2019, 11:38:24 am »

Lately the server has been going down a ton and I've been loosing my raid groups. I created a 'quality of life' macro to invite my toons to a raid and place them in specified groups. Call me lazy but this saves me a ton of clicking.

I use MQ2AutoGroup plugin which auto accepts raid or group invites for me. I added code to the macro to accept invites for anyone that doesn't use MQ2AutoGroup but I haven't tested it. It should work but I can fix this if anyone has issue with this.

I made the macro easy to setup. There's a Setup section at the top of the macro to enter your toon names and specify which group you want them in. I left my toons coded in the macro as an example. You must change these values before this macro will work. You can add/remove settings to accommodate how many toons you have. You must add the raid leader (toon running the macro) to the settings as well so the macro knows which group to place in. I just used ${Me.Name} in my macro but you can replace that with actual name of toon.



After you change the settings in the macro all you need to do is /macro raidinvite on the toon you want to be raid leader. If you drop any of your toons from raid you can just run this macro again on the raid leader. It will invite missing toons and place them back in their specified group.

Hope someone finds this useful.
Download here: RaidInvite.mac Or copy/paste code below and place into a new file named RaidInvite.mac in your MQ2\Macros folder:
Code:

| ===================================================================== |
| RaidInvite.mac                                                        |
| Written by Othik                                                      |
| Date 12/09/2019                                                       |
| Version 1.1                                                           |
|                                                                       |
| Macro to invite players to raid and move them to specified groups.    |
| ===================================================================== |
| Add/Remove/Change values below.                                       |
| Increment Player# variable for each player.                           |
| Add player names and group number separated by pipe '|' symbol        |
| You must include name of raid leader so macro can place into group    |
|   Example:                                                            |
|       /declare Player1 string outer Julian|1                          |
|       /declare Player2 string outer Dirk|2                            |
| ===================================================================== |

Sub Setup
    | Group 1
    /declare Player1 string outer ${Me.Name}|1
    /declare Player2 string outer Ashinda|1
    /declare Player3 string outer Erfiz|1
    /declare Player4 string outer Vasta|1
    /declare Player5 string outer Liberta|1
    /declare Player6 string outer Tolith|1

    | Group 2
    /declare Player7 string outer Degnok|2
    /declare Player8 string outer Ecrosin|2
    /declare Player9 string outer Nidwin|2
/Return

| ================================ |
| Don't change anything below here |
| ================================ |
Sub Main
    /call Setup
    /if (!${Window[RaidWindow]}) /raidwindow
    /delay 3s ${Window[RaidWindow]}

    /call UnlockRaid
    /call InvitePlayers
    /bca //notify ConfirmationDialogBox Yes_Button LeftMouseUp
    /call LockRaid
    /call GroupPlayers

    /if (${Window[RaidWindow]}) /raidwindow
/Return

Sub UnlockRaid
    :UnlockLoop
        /notify RaidWindow RAID_UnLockButton LeftMouseUp
        /delay 1s !${Raid.Locked}
    /if (${Raid.Locked}) /goto :UnlockLoop
/Return

Sub LockRaid
    :LockLoop
        /notify RaidWindow RAID_LockButton LeftMouseUp
        /delay 1s ${Raid.Locked}
    /if (!${Raid.Locked}) /goto :LockLoop
/Return

Sub InvitePlayers
    /declare i int local
    /declare Player string local
    /for i 1 to 72
        /varset Player ${Player${i}}
        /if (${Player.NotEqual[NULL]} && ${Player.Count[|]}) {
            /raidinvite ${Player${i}.Arg[1,|]}
            /delay 2
        } else {
            /delay 5
            /return
        }
    /next i
/Return

Sub GroupPlayers
    /delay 3
    /declare i int local
    /declare Player string local
    /for i 1 to 72
        /varset Player ${Player${i}}
        /if (${Player.NotEqual[NULL]} && ${Player.Count[|]}) {
            /call MoveToGroup ${Player${i}.Arg[1,|]} ${Player${i}.Arg[2,|]}
        } else {
            /delay 5
            /return
        }
    /next i
    /delay 1s
/Return

Sub MoveToGroup(string Player, int GroupNumber)
    /declare i int
    /for i 1 to  ${Window[RaidWindow].Child[RAID_NotInGroupPlayerList].Items}
        /if (${Window[RaidWindow].Child[RAID_NotInGroupPlayerList].List[${i},2].Equal[${Player}]}) {
            :MoveLoop
                /notify RaidWindow RAID_NotInGroupPlayerList ListSelect ${i}
                /delay 5
                /notify RaidWindow RAID_Group${GroupNumber}Button LeftMouseUp
                /delay 5
            /if (${Window[RaidWindow].Child[RAID_NotInGroupPlayerList].List[${i},2].Equal[${Player}]}) /goto :MoveLoop
            /return
        }
    /next i
/Return


-
Othik
« Last Edit: December 09, 2019, 11:46:57 am by Othik » Logged
Rent Due
EZ Server Admin GM
Administrator
Master
*****
Posts: 776



View Profile
« Reply #1 on: December 09, 2019, 12:11:01 pm »

Amazing work! Thanks
Logged

OssoEnnio
Newbie
*
Posts: 11


View Profile
« Reply #2 on: July 15, 2020, 04:24:05 am »

So nice.
/bump
Logged
Pages: [1]
Print
Jump to:  

Recent

Stats

Members
Stats
  • Total Posts: 63673
  • Total Topics: 4939
  • Online Today: 74
  • Online Ever: 2631
  • (February 09, 2022, 02:06:05 pm)
Users Online
Users: 1
Guests: 58
Total: 59
TinyPortal v1.0 beta 4 © Bloc