Salutations,
Event_Zone is a callback subroutine, one that isn't called by the macro, but by MacroQuest when a /doevents command is called and the player has zoned. This could be put into your macro with something like (locs are made up)
Code: Select all
#include routines.mac
sub main
/varset v1 0
/call gotoloc 300,300
/call gotoloc 300,500
/face loc 400,500
/sendkey down up
:zoneloop
/doevents
/if n $v1!=1 /goto :zoneloop
/sendkey up up
/call gototarg "Plazmic"
/return
sub Event_Zone
/varset v1 1
/return
This code is pretty simple. Now the only time that Event_Zone will be called in this macro is when the player has zoned since the begining of the macro (or last call of /doevents depending on how fast it runs) and /doevents is called. When it is called it goes through the list of all the callback functions, (listed on macroquest2.com/?=sub when looking at this one must remember sub main isn't a callback function) and checks if the event they are for is true since the last call of /doevents or the begining of the macro if it hasn't been called yet. If the event has happened, the subroutine is called, otherwise it is not. One ccan get a pretty good idea for how this works by looking at the code contained in eventtest.mac and following the stuff in the macro (create a level 1 enc and kill it, cast a spell, fizzle a spell, raise a skill etc.)
I hope this helps...
(Edit by Plazmic: corrected spelling of my name
