grouping macro request

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

Moderator: MacroQuest Developers

nealj111
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun Jun 05, 2005 10:05 am

grouping macro request

Post by nealj111 » Sun Jun 05, 2005 10:14 am

Heres what I want it to do: invite a certain person and join a group if someone invites (dont matter who invites). For example... "noob" and "pally" are afk in the same group. Well "pally" goes ld and comes back but "noob" has left and wont be back for some time. With this macro it would make "noob" invite "pally" and "pally" will automactily join the group. Im no good a macro write (just starting to learn) so can someone make this for me please i will be most greatful :D

Everdead
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Feb 16, 2005 4:02 pm

Post by Everdead » Sun Jun 05, 2005 1:43 pm

So are pally and noob you oe just some random ppl I am confused at what you want.

If all you want is macro to auto join grps just make and event to handle it if you look around most the macros have the event already made for you copy past hackjob would work fine.

Everdead
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Feb 16, 2005 4:02 pm

Post by Everdead » Sun Jun 05, 2005 1:43 pm

So are pally and noob you oe just some random ppl I am confused at what you want.

If all you want is macro to auto join grps just make and event to handle it. If you look around most the macros have the event already made for you copy past hackjob would work fine.

nealj111
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun Jun 05, 2005 10:05 am

Post by nealj111 » Sun Jun 05, 2005 8:50 pm

I want it to invite a person and join groups....I am still new to the macro thing so im not sure if I would know which line to take out of a macro to make this one, but if you can post it here it will help me a lot

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

Post by Night Hawk » Tue Jun 07, 2005 2:03 pm

Code: Select all

#Event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#"

Sub Main
   :Loop
   /doevents
   /goto :Loop
/return

Sub Event_Invited
   /invite
/return
This isn't exactly a "safe" macro. ANYone that invites you, you will accept. You could make it name specific if you wanted to.

dedpoet
a hill giant
a hill giant
Posts: 247
Joined: Sat Aug 14, 2004 12:22 pm

Post by dedpoet » Tue Jun 07, 2005 4:42 pm

I like doing something like this before the /invite command. Makes it a little less anxious to join the group :wink:

Code: Select all

/delay ${Math.Calc[${Math.Rand[5]}+2]}s
That would wait 3-7 seconds before accepting the invitation. It's a bit more human. If you don't care how it looks, no worries.

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

Post by gimp » Tue Jun 07, 2005 5:24 pm

do something like

Code: Select all

#Event AcceptInvite "[MQ2] acceptinvite"
#Event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#"

Sub Event_Invited
   /if (${acceptinvite}) {
   /invite
/varcalc acceptinvite ${acceptinvite}-1
/echo accepted advite, you will now accept the following ${acceptinvite} invites
}
/return 

Sub Event_AcceptInvite 
/varcalc acceptinvite ${acceptinvite}+1
/echo you will now accept the following ${acceptinvite} invites
/return

Sub Main
  /declare acceptinvite int global 0
  /squelch /alias /acceptinvite /echo acceptinvite

   :Loop
   /doevents
   /goto :Loop
/return
sub main
im kinda stoned now so dunno if i made a ugly typo but youll get the idea.
just type /acceptinvite once to auto accept the next invite. type the command again to accept the following 2 invites, etc.[/quote]

nealj111
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun Jun 05, 2005 10:05 am

Post by nealj111 » Sat Jun 11, 2005 1:32 am

Cool thx guys. Was wondering if there is anyway to put in the macro to also invite certain people when they are in the same zone. Ive been reading the commands and stuff (kinda confusing to me hehe) maybe after going through a bunch of macros I might be able to piece something together, but more than likely it will be wrong if I do it.

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

Post by gimp » Sat Jun 11, 2005 6:20 am

heres how i do it

Code: Select all

#event HANDLE_INVITEME "<#1#> INVITEME"
Sub Event_HANDLE_INVITEME(string Line, string Sender)

	|This function creates groups or forms raids with all the bots
	/if (!${Ini[INI_FILE, BotNet, ${Sender}, NOT_FOUND]}) {
		/i msg IRC_CHANNEL # IGNORING REQUEST!
		/return
	}

	/if (!${Group.Members} && ${Spawn[pc ${Sender}].ID}) {
		/i msg IRC_CHANNEL # Forming group with ${Sender} in ${Zone.ShortName}
		/target pc ${Sender}
		/invite
	} else {
		|This code invites player to group or to raid if group is full. If raid is created, it
		|lets another group leader do the invite
		|Am I group leader? ${Me.AmIGroupLeader} is broken
		/if ((${Group.Leader.ID} == ${Me.ID}) && ${Spawn[pc ${Sender}].ID}) {
			/if (${Group.Members} < 5) {
				/i msg IRC_CHANNEL # Inviting ${Sender} to group in ${Zone.ShortName}
				/target pc ${Sender}
				/invite
			} else {
				/if (!${Raid.Members}) {
					/i msg IRC_CHANNEL # Inviting ${Sender} to raid in ${Zone.ShortName}
					/target pc ${Sender}
					/raidinvite
				} else {
					/echo # Debug: My group is full and I am in raid, let next group leader handle invite.
				}
			}
		} else {
			|/echo # Debug: Can't form group with ${Sender}-im not leader/player not in zone
		}
	}
/return
and

Code: Select all

#event HANDLE_INVITED "#1# invites you to join a group."
Sub Event_HANDLE_INVITED(string Line, string Player)

	|This function creates groups or forms raids with all the bots
	/if (!${Ini[INI_FILE, BotNet, ${Player}, NOT_FOUND]}) {
		/i msg IRC_CHANNEL # IGNORING GROUP INVITE FROM ${Player}
		/return
	}

	/if (!${Group.Members}) {
		/i msg IRC_CHANNEL # Accepted group invite from ${Player}
		/delay ${Math.Calc[${Math.Rand[5]}+2]}s
		/invite
	} else {
		/i msg IRC_CHANNEL # Warning: I was invited by ${Player} but am already in group
	}

/return

#event HANDLE_INVITEDRAID "#1# invites you to join a raid."
Sub Event_HANDLE_INVITEDRAID(string Line, string Player)

	|This function creates groups or forms raids with all the bots
	/if (!${Ini[INI_FILE, BotNet, ${Player}, NOT_FOUND]}) {
		/i msg IRC_CHANNEL # IGNORING RAID INVITE FROM ${Player}
		/return
	}

	/if (!${Raid.Members}) {
		/i msg IRC_CHANNEL # Accepted raid invite from ${Player}
		/delay ${Math.Calc[${Math.Rand[5]}+2]}s
		/raidaccept
	} else {
		/i msg IRC_CHANNEL # Warning: I was invited to raid by ${Player} but am already in raid
	}

/return

WizeOne
a hill giant
a hill giant
Posts: 207
Joined: Tue Jul 12, 2005 12:36 pm

Post by WizeOne » Thu Sep 08, 2005 6:28 pm

how to change this to plug in?
#Event AcceptInvite "[MQ2] acceptinvite"
#Event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#"

Sub Event_Invited
/if (${acceptinvite}) {
/invite
/varcalc acceptinvite ${acceptinvite}-1
/echo accepted advite, you will now accept the following ${acceptinvite} invites
}
/return

Sub Event_AcceptInvite
/varcalc acceptinvite ${acceptinvite}+1
/echo you will now accept the following ${acceptinvite} invites
/return

Sub Main
/declare acceptinvite int global 0
/squelch /alias /acceptinvite /echo acceptinvite

:Loop
/doevents
/goto :Loop
/return
sub main
ie so wouldnt need to run it every time.
maybe have a inc file that you can list players you will accept invites from

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Thu Sep 08, 2005 7:48 pm

MQ2Combat will auto-accept invites. http://www.macroquest2.com/phpBB2/viewtopic.php?t=7713
Slice

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: grouping macro request

Post by xyilla » Fri May 23, 2025 10:45 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: grouping macro request

Post by xyilla » Fri May 23, 2025 10:47 pm


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: grouping macro request

Post by xyilla » Fri May 23, 2025 10:48 pm