Page 1 of 1

a spawn watching alarm I made

Posted: Mon Dec 15, 2014 5:03 am
by Ghhost
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

Re: a spawn watching alarm I made

Posted: Mon Dec 15, 2014 8:37 am
by EqMule
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

Re: a spawn watching alarm I made

Posted: Mon Dec 15, 2014 7:04 pm
by Ghhost
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

Re: a spawn watching alarm I made

Posted: Wed Jan 28, 2015 9:53 pm
by ForoMoro
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

Re: a spawn watching alarm I made

Posted: Wed Jan 28, 2015 11:32 pm
by dewey2461
Nice to see new folks creating macros. Its one way to get interested in coding.