Public Macros A leason on Events
Reply
A leason on Events
Ok kids,
After spending hours trying to test some code,that I had set up with an event, and hitting a brick wall because I couldn't figure out why it wasn't working I thought I would just post this for enyone trying to write an event that doesn't know exactly how.

Elements for an event:
Macro
More +


#chat
| this can be #chat group, #chat say, #chat (name of a chat channel) etc....

#event nameofevent "#1# tells group, 'hello'"
|OR
#event nameofevent "#*#Hello#*#"
|events can be written many different ways to accomplish many different things
|#*# - wild card will ignore any text this replaces including spaces
|#1# - first thing to be passed to the sub event
|#2# - second to be passed to event etc.....

Sub Main

|this is where your loops is
|MAKE SURE you have a /doevent some where in there to trigger what ever events
|are qued or they will not happen

|example of a loop (yes it is spamming ..just and example)
:start
/gsay I will repeat myself untill you get tired of me
/delay 5s
|this will trigger this event at this time
/doevent
/goto :start
/return

|the (Line,ChatText,${Targ}) will vary depending on what your trying to accomplish
Sub_Event_nameofevent(line)
/gsay well hello to you to
/return

I figure if I posted this little leason it MIGHT keep me from waiting HOURS on something because I missed one simple line of code. Plus it might help someone who isn't familar with events or chat.
Fri Jun 08, 2012 8:57 am
Public Macros A leason on Events
Reply