a spawn watching alarm I made

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Ghhost
orc pawn
orc pawn
Posts: 13
Joined: Mon Nov 01, 2010 1:29 pm

a spawn watching alarm I made

Post by Ghhost » Mon Dec 15, 2014 5:03 am

this is an alarm that watches for specific mobs
when it sounds off it opens the map and shows me exactly where the mob is. I have /mapfilter target applied, and so far I have found this very helpful

Code: Select all


#turbo
Sub Main 


   :Scan

      /target a gorgalask 
      /target a sprited harpie 
      /target a watchful guard 
      /target an avenging gazer 



      /delay 10
      /if (${Target.ID}) /goto :Alarm
      /if (!${Target.ID}) /goto :Scan



   :Alarm

      /keypress m
      /beep
      /beep
      /beep
      /beep
      /beep
      /beep
      /g %T JUST POPPED
      /end


       
/return

enjoy

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: a spawn watching alarm I made

Post by EqMule » Mon Dec 15, 2014 8:37 am

I appreaciate the effort and you sharing so please take this in the nicest way possible ;)

you are sending 4 target packets every second to the server with this macro, so its basically an attack on them...

there is a better way to check for Spawns by using the Spawn TLO so you actually only does the /target if there s a mob in the zone you can /target...
you might want to add a .Distance3D check as well to make sure you don't /target across the zone, unless that's your intention, (its risky though)
anyway...
note that im typing this from my phone, I haven't actually run it, but it should work in theory:

Code: Select all

#turbo
Sub Main
   :Scan
      /call SpawnCheck "a gorgalask"
      /call SpawnCheck "a sprited harpie "
      /call SpawnCheck "a watchful guard"
      /call SpawnCheck "an avenging gazer"
      /delay 10
      /goto :Scan
/return

Sub Alarm(int id)
      /target id ${id}
      /delay 10 ${Target.ID}
      /keypress m
      /beep
      /beep
      /beep
      /beep
      /beep
      /beep
      /g %T JUST POPPED
      /end
/return

Sub SpawnCheck(string spawnname)
      /if (${Bool[${Spawn[${spawnname}].ID}]}==TRUE) {
            /call Alarm ${Spawn[${spawnname}].ID}
      }
/return
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

Ghhost
orc pawn
orc pawn
Posts: 13
Joined: Mon Nov 01, 2010 1:29 pm

Re: a spawn watching alarm I made

Post by Ghhost » Mon Dec 15, 2014 7:04 pm

EqMule wrote:I appreaciate the effort and you sharing so please take this in the nicest way possible ;)

you are sending 4 target packets every second to the server with this macro, so its basically an attack on them...
that's something that I didn't even think about
I realize that you are just informing me of the reality of it
and I know that you aren't being mean or sarcastic in any way
and I appreciate it
I thank you for the heads up and I'm off to try the revamp right now
and thank you for the reply

*update*

just tried the new script and I have to say that is amazing
I figure the longer I try to understand I'll eventually learn more as I go
thank you again for the info

ForoMoro
a lesser mummy
a lesser mummy
Posts: 60
Joined: Fri Jul 30, 2010 12:43 am

Re: a spawn watching alarm I made

Post by ForoMoro » Wed Jan 28, 2015 9:53 pm

I liked it! I tweaked it a little bit to fit my own play style, and here's what I did. I removed the /target command, just to be safe so as to not /target something all the way across the zone.

Instead, mine echos in the MQ2 window who spawned, does /mapfilter custom of that NPC, and opens the map.

Code: Select all

#turbo
Sub Main
   :Scan
      /echo Checking...
      /call SpawnCheck "Knarthenne Skurl"
      /call SpawnCheck "Marl Kastane"
      /delay 200
      /goto :Scan
/return

Sub Alarm(int id)
      /delay 10 ${Target.ID}
      /keypress m
      /beep
      /beep
      /beep
      /beep
      /beep
      /beep
      /end
/return

Sub SpawnCheck(string spawnname)
      /if (${Bool[${Spawn[${spawnname}].ID}]}==TRUE) {
            /echo ${spawnname} is up!
	    /mapfilter custom ${spawnname}
	    /call Alarm ${Spawn[${spawnname}].ID}
      }
/return
Last edited by ForoMoro on Sat May 23, 2015 9:06 pm, edited 1 time in total.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: a spawn watching alarm I made

Post by dewey2461 » Wed Jan 28, 2015 11:32 pm

Nice to see new folks creating macros. Its one way to get interested in coding.