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,
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:
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.
[size=+1]You Can Use MQData Variables in #Events![/size] For example,
Rich (BB code):
#Event Example "Hey |${Me}|, how are you?"
[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.

