• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Next question... use a tell to auto invite someone?

Jax

Active member
Joined
Jun 16, 2016
RedCents
428¢
Could I set something up where if a buddy logged on, and I was grinding AFK he could sent me a trigger keyword for me to /invite him?

Thanks in advance for my daily question! :)
 
Can someone explain this part?

Rich (BB code):
trigger=#1# tells you, #2#

The command part makes complete sense, but I'm not sure I follow the #1 and #2 part of the code snippet.

I think I got it. I am very code stupid:

#1 is the event from my buddy and #2 is what he/she says IE: the argument in line 2 ... like "invite me yo" or something.
 
But is it literal "#1" and "#2" in line one and then the who sent it and what he sent in the second line?

So this:

[invitepall]
trigger=#PallsName# tells you, #invite me#
command=/if (${EventArg1.Equal[PallsName]} && ${EventArg2.Equal[invite me]}) /invite PallsNameHere

or this:

[invitepall]
trigger=#1# tells you, #2#
command=/if (${EventArg1.Equal[PallsName]} && ${EventArg2.Equal[invite me]}) /invite PallsNameHere
 
Layman's explanation:
Think of #1# as a programmable placeholder. When ever anyone at all sends you a tell , that person's name will be #1#. Hence the check on if someone sent you a tell , that persons name equals your friends name.. so the event only triggers if it is your friend who is sending the tell... AND he says what ever keyword you tell him to send. As an example

Rich (BB code):
[invitepall]
trigger=#1# tells you, #2#
command=/if (${EventArg1.Equal[Jax]} && ${EventArg2.Equal[invite me dude!!1!]}) /invite Jax

The #1# simply designates all the text before the listed phrase (in this case "tells you,") is parked as a "string" or information retrievable with the "${EventArg1}" part. Where as #2# would be the text that comes after the listed phrase ( IE the keyword, code phrase, what ever you want to call it) which can be anything you want.... and the event would only trigger if your friend sends a tell that says that keyword/phrase. (that way it is not sending an invite everytime your friend sends a tell)

More detail info on pound commands here
With the specific infor your looking for as a custom event
from the mothership official boards.
 
You can also use an event inside your macro that is almost the same syntax.

I used to do this when AFK circle kiting was the way to AFK play.

Rich (BB code):
#event Tell		"#1# tells you, #2#"

Rich (BB code):
Sub Event_Tell(who,what)
/echo ${who} told me ${what} |Logging purposes
/if (${who.Equal["Friend"]} && ${what.Equal["invite me"]}) /invite Friend

/return

You could make an array of friends and do a find in array if you had multiple exp leaching friends.


Personal opinion:: Plugins are better, but if you only want this assclown to be able to get a ninja invite when a specific macro is running... well there ya go.
 
You can also use an event inside your macro that is almost the same syntax.

I used to do this when AFK circle kiting was the way to AFK play.

Rich (BB code):
#event Tell		"#1# tells you, #2#"

Rich (BB code):
Sub Event_Tell(who,what)
/echo ${who} told me ${what} |Logging purposes
/if (${who.Equal["Friend"]} && ${what.Equal["invite me"]}) /invite Friend

/return

You could make an array of friends and do a find in array if you had multiple exp leaching friends.


Personal opinion:: Plugins are better, but if you only want this assclown to be able to get a ninja invite when a specific macro is running... well there ya go.

Say I am running KA, would I just add the code to another section using brackets? I'm very code stupid.

Asking because my MQ2Events seems to have stopped working since the last patch, and I can't figure out why. Nothing changed on my end.
 
You would add the #event line at the top of kiss where the rest of the #events are defined. You can add the Sub Event_Tell routine to the bottom.
 
So I tried adding this and managed to crash MQ2 ... no shock for me and my lack of skillz.

Crash happens after combat is engaged.

Here's the code... I think I got some brackets jacked up or something?

Rich (BB code):
| ----------------------------------------------------------------------------
| SUB: Tells
| ----------------------------------------------------------------------------
	Sub Event_Tell(who,what)
		/echo ${who} told me ${what} |Logging purposes
			/if (${who.Equal["Buddy"]} && ${what.Equal["inviteme"]}) /invite Mybuddy
			
			}
		}
	/return

I put it right after the rogue code in KA mac.

Also, for the event:

Rich (BB code):
#Event Tell				"#1# tells you, #2#"

Any thoughts on what I am jacking up?

Thanks.
 
MQ2 isn't very good at telling you about some of the finer points it's having problems with. Simply putting a comment in the wrong spot, or needing a space, or it not wanting a space, can make all the difference.

Start with putting a space between parms:
Rich (BB code):
Sub Event_Tell(who,what)

Change to (space added)
Rich (BB code):
Sub Event_Tell(who, what)

Second, and I know this may seem crazy, but again, I have seen comment placement completely jack things up and MQ2 never tell me. At the end of your echo statement there is a comment. Move that comment to its own line or remove it (not sure if that'll help).

Thirdly, I don't know if using an EQ internal command can cause problems, but I would certainly consider it. The word 'Tell' in your event 'could' be causing problems. In software, it is always considered good practice to NOT use an internal command as a variable or sub/event name. Perhaps change the name of the event to ToldMe (and change the name in the related Sub as well).

Finally, you have /invite Mybuddy where you would have to hard code the toonname of your friend whereas if you simply used ${who} you wouldn't have to hard-code the name in 2 places (the first being ${who.Equal["Buddy"]}).

No clue if these will solve your issue(s) but it's where I would start.

--------------------------------------------------------------------

You are automating something that doesn't seem necessary to automate imo. If you want an invite then I would assume the grp leader is going to be played. Most of us use a hotkey to mass invite our group members.

As just an example:
Rich (BB code):
/multiline ; /invite toon1 ; /invite toon2 ; /invite toon3 ; /invite toon4 ; /invite toon5

So even if Grp mem #4 wasn't present at the time you could still use the hotkey when he was without causing any issues (other than a msg 'So and so is already in group' which is no harm no foul).

Also consider using EQBC to send commands to your toons/group. Most of us do.
 
I think he wants to set up an AFK group with a few spots open. Then when friend logs in, they can ask for an invite and get one, while the AFk group keeps on grinding along.

I highly recommend making some sort of list to check against. This will make it easier to add friends 800 other alts as you become aware of their names and/or other friends, but also insure your toons only respond to approved names. Like Jax has with his buddy list.
 
Ok, fair enough, then MQ2AutoAccept should be considered. That way he has his list and can manage it and all the rest is automated.

One more thing about comments, try putting a space after '|' and before any text. I've had that be a problem.
 
Thanks guys. I'm going to look into MQ2AutoAccept instead of trying to modify KA's code.

Appreciate all the help ... and yes, the use-case Warlock was talking about is exactly what I'm doing.



Edit:So looking through the auto-accept info: I don't see how it would apply to someone sending me a tell and me wanting to invite them after receiving that tell.
 
Last edited:
Yeah, the more I thought about it, the more I realized AutoAccept is for incoming rather than outgoing (invites). So you are stuck with modding KA. But, it's a simple event and sub so should be pretty straightforward and not intrusive to KA.

I suppose you could use a SHIT but that is way more complicated than event/sub in KA. Keep at it, try it again...

- - - Updated - - -

Ok, this turned out to be much harder than expected. There are a number of things going on here.

  • Space not needed between parms so forget about that.
  • Crash is caused by an infinite loop where the tell gets compounded on itself and eventually overflows a buffer. I only discovered this by putting in a delay. That allowed me to watch the window fill up and end mac before crashing.
  • I believe having the word 'Tell' in there exacerbated the situation.

Here is what I cam up with (notice the single quotes):
Rich (BB code):
#event TellSent			 "#1# tells you, '#2#'"

And:
Rich (BB code):
Sub Event_TellSent(string line,string person,string said)
	| /echo Line: ${line} - Person: ${person} - Said: ${said}
	/if (${person.Equal[ToonName]} && ${said.Find[inviteme]}) {
		/echo ${person} wants inviting
		/if (${Group} < 5) {
			/invite ${person}
		} else {
			/tell ${person} Group full up
		}
	}	
/return
 
Thanks Incognito ... will put this in today and see if it is working for me also!

Single quotes make sense because that's the way it was setup in MQ2Events.

- - - Updated - - -

Shouldn't this be 6?

Rich (BB code):
/if (${Group} < 5) {
 
Thanks Incognito ... will put this in today and see if it is working for me also!

Single quotes make sense because that's the way it was setup in MQ2Events.

- - - Updated - - -


Shouldn't this be 6?

Rich (BB code):
/if (${Group} < 5) {

Test it in game, but ${Group} returns the number of group members not including the character issuing the command.
 
Just to toss this out there incase it is easier to work with. (that and I am intrigued =P)

http://www.macroquest2.com/wiki/index.php/Pound_Commands#.23chat
#chat

#chat channelname

This is a special type of #event which watches the specified channelname. Content from the channelname is accessed by creating a Sub Event_Chat.

Valid channels are: auc, chat, guild, group, ooc, say, shout, and tell. (chat represents channels)

Only one channel may be used on the #chat line, however multiple lines may be added. Example:

#chat guild
#chat group

Sub Event_Chat(ChatChannel,ChatSender,ChatText)
/echo ${ChatSender} told me ${ChatText} in ${ChatChannel}
/return

This would trigger Event_Chat for both guild and group chat.

http://www.macroquest2.com/wiki/index.php/Custom_Events#.23chat_Special_event
The #chat command is a special custom event. It will always pass the channel, sender and text to the Sub Event_Chat subroutine. So your Sub Event_Chat should look something like this:

Sub Event_Chat(ChatChannel,ChatSender,ChatText)
/echo ${ChatSender} told me ${ChatText} in ${ChatChannel}
/return

Variable names can be anything you choose.

This can give you options to set up a sub that checks for various chat messages. Some examples from RD are

Rich (BB code):
Sub Event_Chat(ChatType,Sender,ChatText)
        /if (${ChatText.Find[break]}) /call BreakInvis
        /if (${ChatText.Find[create a campfire]}) /call CreateCampfire
        /if (${ChatText.Find[go to trader]}) /call Trader
	/if (${MasterList.Find[${Sender}]}) {
		/if (${ChatText.Find[portto]} && ${DoPorts} && ${Select[${Me.Class.ShortName},DRU,WIZ]}) {
                       /call PortUs ${ChatText.Arg[2]}
                       /return
			}

Since the chat event is already part of MQ and is there, might as well utilize it.

Then you can use it's set up to trigger sub events, or put the sub sections directly into the chat sub. This ought to make it easier to expand into using other keyword phrases to trigger other subs, instead of making separate event entries per keyword.

The ${ChatText.Arg[#]} = the argument (word) that is # number of places over... for instance in the Portto line you would say "/bc portto succor" and ${ChatText.Arg[2]} would be "succor" in the call.

Anyways from there you ought to be able to make some sort of entry like

Rich (BB code):
/if (${ChatText.Find[invite me dude]}) /call InviteFriends ${Sender}

then a sub that looks something like

Rich (BB code):
Sub InviteFriends(Friend)
	/if (${Me.Class.ShortName.NotEqual[BRD]}) /twist off
	/if (${Me.Casting.ID}) /delay 10s !${Me.Casting.ID}
	/invite ${Friend}
	/return

the checks are because you cant send invites while casting.

Anyways, this kind of set up gives you a lot of utility in how you want something to work. Want your guy to "listen" in multiple chats, but only respond to tells on certain entries? then:

Rich (BB code):
/if (${ChatType.Equal[tell]} && ${ChatText.Find[invite me dude]}) /call InviteFriends ${Sender}


Thus a sort of end result type thing that may work for Jax would be something like:

Rich (BB code):
#chat tell
.....
Sub Event_Chat(ChatChannel,ChatSender,ChatText)
	/if (${ChatType.Equal[tell]} && ${ChatText.Find[invite me dude]}) /call InviteFriends ${ChatSender}
	/return

Sub InviteFriends(Friend)
	/if (${Me.Class.ShortName.NotEqual[BRD]}) /twist off
	/if (${Me.Casting.ID}) /delay 10s !${Me.Casting.ID}
	/echo ${person} wants inviting
	/if (${Group} < 5) {
		/invite ${Friend}
		} else {
		/tell ${person} Group full up
		}
	/return

Untested at this point (sorry, kids are visiting) (shamelessly stole from Incog, nice check on the group)

You can of course change the keyword to whatever (${ChatText.Find[Supercalifragilisticexpialidocious]})

Now for the list... that would be a whole other endeaver.

Sorry if this is off base, I tend to get excited when exploring things. I have been adding to chat in RD on and off (as well as others) and find it useful.
 
Last edited:
I was thinking he could build an array, add the list of friends to the array, could even put the list in the ini, and do a simply array search for the person who just sent you the tell. Hell you could get fancy and do same for a list of commands in case one day you realize you want more than just invites.

I too was intrigued...
 
I'm glad I could provide some thought provoking leaching. :)

BTW - your code worked perfectly, Incognito.

Thanks.
 
I was thinking he could build an array, add the list of friends to the array, could even put the list in the ini, and do a simply array search for the person who just sent you the tell. Hell you could get fancy and do same for a list of commands in case one day you realize you want more than just invites.

I too was intrigued...


Why not just search his friends list in the friends window. That way he can just add them in his friends window and done.
 
Huh... was unaware of that one, and unfamiliar with the manipulation of that TLO. The wiki is a little light there. Not really seeing a search function there. Would need to write some sort of subsection to check the sender name against east friend name return one at a time it would seem to me. Which shouldn't be to hard ... just saying.

Is your EQ friends list transferable to other toons easily?
 
Not sure about the transferable part, but if you needed to use an ini file for searching, it might still be easier to maintain a friends list on one character and have the macro populate the friends section from the EQ friends list. could just create an event that looks for a trigger phrase that will kick off the routine to update the ini file.

If the friends list is kept at the client, then you should be able to copy it to other characters, but if it is kept on the server, then we are out of luck..

If you need some references on how to search lists in windows you could look at one of my older macros that searches 2 lists in the same window. http://www.redguides.com/community/showthread.php/29629-Barter-Auto-Seller-Macro-Sell-your-inventory-the-easy-way?highlight=sell+inventory+easy
 
Question - Next question... use a tell to auto invite someone?

Users who are viewing this thread

Back
Top
Cart