• 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 - Events, wildcards and whitespace

Soandso2

Well-known member
Joined
Mar 13, 2023
RedCents
937¢
How does macroquest handle the #*# wildcard in event triggers? As "something" or "nothing or something"?

From the documentation:
#event stuff "Ant #*# Cat"

This would trigger with /echo Ant Bird Cat

1) Do you NEED a wildcard to be present for the event to trigger? I.e. is #*# the same as "something" or is it the same as "nothing or something".
2) If no on question 1), do you need two spaces beween And and Cat for this to trigger, or would it trigger on /echo Ant Cat

Edit: And I am asking because I am currently coding without ability to test.
 
Last edited:
#*# is literally anything in that section, so it could capture the quick brown dog jumps over the lazy fox, or it could capture 123, as long as it fit the parameters.

and if you had "Ant #*# Cat" it would match anything between Ant to Cat. /echo Ant Cat has nothing in between, I believe.
 
#*# is literally anything in that section, so it could capture the quick brown dog jumps over the lazy fox, or it could capture 123, as long as it fit the parameters.

and if you had "Ant #*# Cat" it would match anything between Ant to Cat. /echo Ant Cat has nothing in between, I believe.
And NOTHING fits within in the scope of ANYTHING?

/echo Ant Cat has a space between Ant and Cat

/echo Ant #*# Cat has two spaces between And and Cat, even if the wildcard is not present at all.

I suppose it is better to explain why I ask. :) I am trying to set up some events for when I get experience.

[CODE lang="Lua" title="events"]mq.event("RegExp1","You gain experience! (#1#)",regExperience)
mq.event("RegExp2","You gain experience (with a bonus)! (#1#)",regExperience)
mq.event("RegExp3","You gain party experience! (#1#)",regExperience)
mq.event("RegExp4","You gain party experience (with a bonus)! (#1#)",regExperience)
mq.event("RegExp5","You gain raid experience! (#1#)",regExperience)
mq.event("RegExp6","You gain raid experience (with a bonus)! (#1#)",regExperience)[/CODE]

is what I have. The question is, if I could make this more effective (just for the sake of things). (Not sure if "with a bonus" shows up on raid experience.)

Would "You gain #*# experience!" trigger on all three: "You gain experience!", "You gain party experience!" and "You gain raid experience!"
 
Last edited:
That wouldn't trigger on you gain experience because there are two spaces around the wildcard. You could just remove the spaces there
You gain#*#experience
 
That wouldn't trigger on you gain experience because there are two spaces around the wildcard. You could just remove the spaces there
You gain#*#experience
Exactly, that's what I thought. Thanks!

And thus, I could boil this down to two trigger lines like so:

[CODE lang="Lua" title="Event triggers for experience"]mq.event("AAExp","You gain#*#experience!",aaExperience)
mq.event("RegExp","You gain#*#experience#*#(#1#)",regExperience)[/CODE]
 
Last edited:
Question - Events, wildcards and whitespace

Users who are viewing this thread

Back
Top
Cart