Moderator: MacroQuest Developers

Code: Select all
| Spawnchecker macro by wilso132
| USAGE: /macro spawncheck <spawn_name> <# of times to beep>
| e.g. /macro spawncheck frenzied 20 will check for something with the
| name "frenzied" and beep 20 times
Sub Main
/declare alertlistno_ global
/declare spawn_name global
/declare x global
/declare num_of_beeps global
/varset x 0
/varset alertlistno_ 9
/varset spawn_name "@Param0"
/varset num_of_beeps @Param1
/echo Going to beep @num_of_beeps times when spawn_name spawns.
/alert clear alertlistno_
/alert add alertlistno_ npc radius 10000 "@spawn_name"
:TOP
/if $alert(alertlistno_)==TRUE {
/w npc @spawn_name
/echo Matches your criteria of @spawn_name
/for x 0 to @num_of_beeps
/beep
/next x
/echo spawned at $time(h):$time(m)
/return
} else {
/goto :TOP
}
/return

You really need to use the Spawnalert plugin, it will allow you to run other macros at the same time and will work for every zone you use.well..I tried and tried..I can not figure out how to get a plugin to work..I can compile MQ2 np..but the plugins evade me.
into the file c:\mq2\mq2spawnalert\mq2spawnalert.cppMQ2SpawnAlert.cpp
Code: Select all
| Spawnchecker macro by wilso132
| USAGE: /macro spawncheck <spawn_name> <# of times to beep>
| e.g. /macro spawncheck frenzied 20 will check for something with the
| name "frenzied" and beep 20 times
| MQ2 Data enabled by kasodo
Sub Main
/declare spawn_name outer
/declare x int outer
/declare num_of_beeps int outer
/varset x 0
/varset spawn_name ${Param0}
/varset num_of_beeps ${Param1}
/echo Going to beep ${num_of_beeps} times when spawn_name spawns.
:TOP
if (${NearestSpawn[npc radius 10000 ${spawn_name}]}) {
/w npc ${spawn_name}
/echo Matches your criteria of ${spawn_name}
/for x 0 to ${num_of_beeps}
/beep
/next x
/echo spawned at ${Time}
/return
} else {
/goto :TOP
}
/return

[/quote]C:\Documents and Settings\mynamehere>cd d:\mq
C:\Documents and Settings\mynamehere>
Code: Select all
Sub Main
:loop
/tar ${Param0}
/if (${Target.ID}) /beep
/goto :loop
/returnCode: Select all
Sub Main
:loop
/keypress esc
/tar ${Param0}
/if (${Target.ID}) /goto :loop2
/delay 30s
/goto :loop
:loop2
/beep
/goto :loop2
/return