/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
MGOTO

-=mobproc command=-
-=mgoto <line number (1 - LINES IN MOBPROC)>=-
-=mgoto <predefined mtag>=-

This command is used in SPC_MOBPROC mobs.  It %6jumps%0 the mobproc
command ptr to the line # or mtag specified in its argument.  Used in
conjunction with an %6mif%0 this can be very useful and also very
confusing to the reader.  For example:
...
say this is line 13
say this is line 14
mgoto 13
say this is line 16
say this is line 17
...
In the above example, lines 16 and 17 are never executed because the
command ptr is jumped to line 13 every time it reaches the %6mgoto%0.
An advanced use would be similar to the following:

...
say this is line 5
mtarget char pc 0
mif !tarcharroom
{
  mgoto 5
}
say Finally!  You are my target, +C :)
...
In the above example, the mob continues to try to target a random pc in
its room.  If it cannot target a pc, then !tarcharroom is TRUE so the
block gets executed, thus the jump to line 5.  If the target was
successfully made, then the block is skipped and the mobs says Finally...

%B%6NEW%0:  It's very useful to mgoto to a mtag, rather than a specific
            line #.  For example:
...
mtag sometag
mtargetroom char pc 0
mif tarcharrace drakyn
{
spit +C
mgoto sometag
}
hug +C
mpause 5
mgoto sometag
...

In the above snippet that spits only on drakyns (:)), you'll notice how an
mtag is set up named 'sometag' and how we can 'mgoto sometag' from
ANYwhere in the mobproc.  The use of mtags over absolute line #s is
greatly encouraged.

Valid mgoto ranges are (1 - length of mobproc).

Similar commands: MRESET, MEND, MIF, MTAG