• 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

TIP: #Events

Cade

The Rainman, (Administrator)
Joined
Feb 28, 2005
RedCents
1,041¢
I was cleaning out my PM inbox today and noticed that, over the years, several people have asked about #events, so I thought I'd just make a post as sort of a tutorial on getting the most out of #event.


[size=+1]You Can Use MQData Variables in #Events![/size] For example,
Rich (BB code):
#Event Example "Hey |${Me}|, how are you?"
This can be used to avoid hard-coding in names and things into #events. (Note: As you can see in the example, any MQData variables in #events must be surrounded by |'s.)

[size=+1]"#*#" Has A Purpose![/size] As most everyone has figured out, #*# is used to replace unknown or irrelevant text; however, if you want to know what exactly "#*#" is replacing, you can do that too! Example:

Rich (BB code):
#Event Example "#1# tells you, 'Hey |${Me}|, how is your friend #2#?'"

Sub event_Example(string line, string sender, string friendname)
{
/tell ${friendname} Hey, ${sender} wants to know how you are
/other_crap
}

When using this, the first parameter given to the sub is always the entire line. The second parameter is whatever #1# replaces, the third is whatever #2# replaces, and so on.
 
I dont know why nobody have said anything but this is really informative...

Redcent from me...

- decker
 
Yes. Me too.

I have taken, over my long IT experiance, many many programming languages.

Let's see: Data General Machine Code, Assembly, LISP, COBOL, FORTRAN, BASIC [Beginner, Intermediate, and Advanced], PASCAL, MODULA 2, and various macro and scripting languages.

[EDIT: Plus other languages that I can't even recall at the moment, I'm sure. I've been in the IT world since 1979 or so.]

But this bit of information was not apparent to me. In fact, I seem to recall wishing I could isolate and decompose input strings like this in the past. I assumed that it was possible, but I never could find any code examples.

So. Red Cent(s) from me. Thanks. If I ever need to do this in the future, I will now know how.
 
TIP: #Events

Users who are viewing this thread

Back
Top
Cart