Post
by Java » Wed Oct 23, 2002 4:30 pm
Basically the an Event is something that occurs.
Baseball, Football, Swimming, EQ chat, an EQ death.. these are all events.
A place in your computer memory is set aside:
The Ball Field, the Stadium, the Zone your in.
The Event your waiting to happen is given a name, and that name is placed as a holder in memory.
#event Ballgame "Root root root for the home team"
The part in quotes is the text that will happen.
See.. when the event happens ( the NPC spoke to you )
Then that special corner in memory is filled with that text "Root root root for the home team"
Then it is compared for value.
Rather then selecting a specific memory address, we let that event take place at a random memory spot, so to make the comparison, we need some sort of english way to get the address that text line was assigned to.
Example:
80900000 " " (fake memory address thats empty.. Event not happen yet)
40080000 "Root root root for the home team"
( Event happend.. but address is different.)
To get the variable we want to use, out of the memory slot it's in, we use english:
Event Ballgame
This is like a handle of a Pot on the stove.. Easier to pick it up with a handle then to grab it brutely with 2 hands, yes?
So we use the handle to get the memory address where the Text was put in memory.
We compare that handle to our variable.
If the compare is True.. the memory address is not empty, it contain that text line.
If the compare is false the event didn't happen. So the handle remains .. waiting for us to grab it and compare it.
Not very good at explaining Computer stuff to Life stuff so you can start to relate. But i hope i didn't totally confuse you.
In essence the variable comparison happens when the event happens.
And since MQ is a Top to Bottom language, we take 1 pass through the macro, starting at the #event and all the way to the bottom of the written macro where we end with /return.
Only way we can check for events more then the one time we start the macro is to make the macro start all over again, from the Top to the Bottom.
Similar to reading a page.
My perception is my reality.
[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]