Page 1 of 1

Spawn Detector

Posted: Tue Mar 11, 2008 2:21 pm
by Canadian_Cowgirl
DKAA, as usual, did the hardwork for me. But since this uses a command I hadn't seen used before - figured a refresh for the memory of the community .

Code: Select all

#turbo

Sub Main

:loop 
/if (${Spawn[a snow bunny].ID}) { 
     /exec "C:\Spawn.MP3" bg 
     /tell name WOOT! It's UP!
     /beep 
     /endm 
      } 
/delay 5s 
/goto :loop

/return
I suppose the enthusiastic could make the Spawn target a variable you enter at the start of the macro.. but I'm lazy :)

-C_CG.

Posted: Tue Mar 11, 2008 2:46 pm
by toomanynames
Is there a syntax available for "/exec"

Posted: Tue Mar 11, 2008 4:05 pm
by optix

Code: Select all

#turbo

Sub Main

/declare CharName string outer NAMEHERE
/declare SpawnWait string outer a snow bunny

:loop
/if (${Spawn[${SpawnWait}].ID}) {
     /exec "C:\Spawn.MP3" bg
     /tell ${CharName} WOOT! It's UP!
     /beep
     /endm
      }
/delay 5s
/goto :loop

/return 
Yes /exec is an EQ command, not a MQ command I believe.

Posted: Tue Mar 11, 2008 4:11 pm
by dont_know_at_all
/exec is an MQ command; /system is an EQ command.

/exec [application] [fg | bg]

application can be mapped via the [Application Paths] section of MacroQuest.ini