I'm writing this guide to hopefully inspire some creative thinking and because this is so easy to do.
THIS is how you beat scripted events, this is how you make each character or only 1 character do something based soley on something you tell it to do.
Hell you could have a bot run solely off events if you want to tell it everything to do.
On with the guide!
What are events?
Events are things that happen during play that cause some sort of chat message to be generated.
Examples
Bob tells you: blah blah blah
Cleric001 begins to cast
King Xorbb Shouts
The spirit of the wolf leaves you
You have entered
soandso falls to the ground
By monitoring the chat windows text you can make your characters react to these messages
I thought events was a plugin?
It is! And it has its place but this is much better. MQ2Events is great for SIMPLE things but its limited, its also great for when your not running a macro.
MQ2Events starts to become limited when you want to make lots of decisions or execute multiple commands or just have a really long command to execute.
This limit is not really an issue in macros.
How much coding knowledge do I need to do this?
Not much, but you do need to understand the basic decision process and how to use the wiki to find the commands / objects to do what you want to do.
If you can write some holies your pretty much good to go, if not, go read some of the great guides on holy/down writing here on the site.
How do macros know something is an event to respond to?
You tell it to listen for some text...like an audio trigger.
CustomEcho is a label for the piece of code (actions) you want taken.
To get this to trigger you would do /echo Mytrigger
The text in this case must match EXACTLY or it wont fire....pain in the ass to know the exact phrase to respond to right? Yup!
Never fear we can ignore certain things and store stuff to use in the events. I recommend reading http://www.macroquest2.com/wiki/index.php/Custom_Events for more on what you can do but as an example
The above would respond to any text in the chat window with the word "Mytrigger" in it, ignoring any text before or after, so doing /echo Mytrigger or /g does Mytrigger work? would both fire the event.
Now how do we make action be taken? With a sub!
A sub looks like this:
CustomEcho is the label name you gave above.
Now open a text editor...we all like notepad++ !
put the following text into a new file
save the file in your macros directory as myevents.inc and be sure save as type is All (*.*)
now do /echo Mytrigger
doesn't do squat! lol
We need a macro to test it with!
Easy basic macro:
Only 2 things you need to understand here
#include myevents.inc
This is how you get the macro to listen to your events! I'll say that again....THIS is how you make the macro listen to your events....ANY macro, kissassist, modbot, autocleric, etc!
This is nice cause you dont have to screw with the original macro much. New kissassist comes out, goto the top and #include your files.
/doevents is the other important line here because its what tells a macro to carry out any actions if event text is found. For more info http://www.macroquest2.com/wiki/index.php/Doevents
Put the above code in a new notepad file and save it in your macros directory as testmyevents.mac and be sure save as type is ALL (*.*)
in game do /mac testmyevents
/echo Mytrigger
With events the possibilities are endless....when that dragon takes off you can /nav your chars to individual spots or /moveto somewhere safe! When your groupmate gets encased in something you can get right on busting them out! You can click, cast and do the hustle!
That's really it. Hope some maybe found this helpful, any suggestions or corrections are appreciated.
Hoping maybe to get some event sharing to help others out
Including as an example an event I used for the King Xorbb group event in RoF to keep my characters from getting charmed. If he shouted just the characters name, they would back off combat and face away. If he shouted their name and said they escaped punishment they would resume attaching
THIS is how you beat scripted events, this is how you make each character or only 1 character do something based soley on something you tell it to do.
Hell you could have a bot run solely off events if you want to tell it everything to do.
On with the guide!
What are events?
Events are things that happen during play that cause some sort of chat message to be generated.
Examples
Bob tells you: blah blah blah
Cleric001 begins to cast
King Xorbb Shouts
The spirit of the wolf leaves you
You have entered
soandso falls to the ground
By monitoring the chat windows text you can make your characters react to these messages
I thought events was a plugin?
It is! And it has its place but this is much better. MQ2Events is great for SIMPLE things but its limited, its also great for when your not running a macro.
MQ2Events starts to become limited when you want to make lots of decisions or execute multiple commands or just have a really long command to execute.
This limit is not really an issue in macros.
How much coding knowledge do I need to do this?
Not much, but you do need to understand the basic decision process and how to use the wiki to find the commands / objects to do what you want to do.
If you can write some holies your pretty much good to go, if not, go read some of the great guides on holy/down writing here on the site.
How do macros know something is an event to respond to?
You tell it to listen for some text...like an audio trigger.
Rich (BB code):
#Event CustomEcho "[MQ] Mytrigger"
^Listen ^For this text
To get this to trigger you would do /echo Mytrigger
The text in this case must match EXACTLY or it wont fire....pain in the ass to know the exact phrase to respond to right? Yup!
Never fear we can ignore certain things and store stuff to use in the events. I recommend reading http://www.macroquest2.com/wiki/index.php/Custom_Events for more on what you can do but as an example
Rich (BB code):
#Event CustomEcho "#*# Mytrigger #*#"
The above would respond to any text in the chat window with the word "Mytrigger" in it, ignoring any text before or after, so doing /echo Mytrigger or /g does Mytrigger work? would both fire the event.
Now how do we make action be taken? With a sub!
A sub looks like this:
Rich (BB code):
Sub Event_CustomEcho
/echo Custom Event Include WORKING!
/return
CustomEcho is the label name you gave above.
Rich (BB code):
Sub Event_*****
HERE is where the magic happens.
Make decisions, execute commands, as many as ya need!
/return
Now open a text editor...we all like notepad++ !
put the following text into a new file
Rich (BB code):
#Event CustomEcho "#*# Mytrigger #*#"
Sub Event_CustomEcho
/echo Custom Event Include WORKING!
/return
now do /echo Mytrigger
doesn't do squat! lol
We need a macro to test it with!
Easy basic macro:
Rich (BB code):
| Test Macro For events
#turbo 80
#include myevents.inc
Sub Main
:mainloop
/doevents
/goto :mainloop
/return
Only 2 things you need to understand here
#include myevents.inc
This is how you get the macro to listen to your events! I'll say that again....THIS is how you make the macro listen to your events....ANY macro, kissassist, modbot, autocleric, etc!
This is nice cause you dont have to screw with the original macro much. New kissassist comes out, goto the top and #include your files.
/doevents is the other important line here because its what tells a macro to carry out any actions if event text is found. For more info http://www.macroquest2.com/wiki/index.php/Doevents
Put the above code in a new notepad file and save it in your macros directory as testmyevents.mac and be sure save as type is ALL (*.*)
in game do /mac testmyevents
/echo Mytrigger
With events the possibilities are endless....when that dragon takes off you can /nav your chars to individual spots or /moveto somewhere safe! When your groupmate gets encased in something you can get right on busting them out! You can click, cast and do the hustle!
That's really it. Hope some maybe found this helpful, any suggestions or corrections are appreciated.
Hoping maybe to get some event sharing to help others out
Including as an example an event I used for the King Xorbb group event in RoF to keep my characters from getting charmed. If he shouted just the characters name, they would back off combat and face away. If he shouted their name and said they escaped punishment they would resume attaching
Rich (BB code):
#Event FaceAway "#*# shouts #1#"
Sub Event_FaceAway(string Line,string TrgtName)
/If (${TrgtName.Find[${Me.CleanName}]}) {
/If (${TrgtName.Find[punishment]}) {
/tell ${Group.Leader.Name} RESUMING COMBAT
/backoff
} else {
/tell ${Group.Leader.Name} BACKING OFF ACTIVE
/backoff
/face away
}
}
/return

