Don't take this wrong, but there's a lot of information in the file 'readme.html' that is included in the download. Problem is that it's not set up as a how-to, but as a language definition. So you have to know what syntax you're looking up before you can use it. I learned by grabbing a simple MAC and then looking up all the terms from it until I understood what every line did - then I tried a harder mac.
Just to show that this isn't a RTFM post, I'll try to help you out.
#define actually replaces all instances of the first word with the second at runtime. so if I did this:
and then did this
Then it would quit me out. People use this to keep their variables straight. Let's say that I want to run something 4 times. I need a counter that adds up to 4, then quits. Example:
Code: Select all
#define counter v1
sub Main
/varset counter 0
:Loop
/varadd counter 1
/if n $counter!=4 /goto :Loop
/return
Notice that the define is the name only, no dollar sign. If you're talking about the variable don't use the $, if you're talking about the value of the variable, use the $. So when I'm comparing the value above in my if statement - I use the $. When I'm setting the value in my varset and varadd statments, I don't use the $.
Also remember from above that define replaces the text. So if I had done this:
then it would only have place v1 into the code where I put $counter, the word counter would have been left alone and that would be bad. Alternatively, this:
would have replaced all words counter wit $v1. So when I tried to set the variable there would be a problem, and when I tried to get it's value (using $counter) it would yell as well (this would translate into $$v1).
I don't know if there is a limit to the number of variables, I do know that single digit vars are done as v1, NOT as v01. v01 won't work.
Events as I've always used them are only kicked off from information to the chat window. As Lurker said, these moniter the text window for text and then call the sub routine that you specify. This is useful for kicking off an action in response to the outside world.
/target and /face are zone wide. These are nifty in that you don't need a macro. When hunting just type /target X and then type /face. Walk a ways and you'll hit what you're looking for. This is very handy in hard to navigate zones. In Lesser Faydark I usually just do a /target priest (targets the priest of Discord) and then /face, followed by an autorun. Takes me right to the lift.
How? Not really a secret, all things in a zone are sent to your machine when you zone in. MQ listens in on this data, and lets you know about them. Remember, the graphics in the game are just there to be pretty. When it comes down to it a zone is just a list of pointers to items with in that zone and your character is just one row in a database.
Hope that helps.