----------------------
The goal was to get this macro to identify a mob that spawned, email an address with the information. I think I've got it figured out fairly well. Let me know what you all think.
Code: Select all
| Orginal Spawnchecker macro by wilso132
| MobCheck edited by HaCK for Email Support
| USAGE: /macro mobcheck <spawn_name>
| e.g. "/macro mobcheck frenzied" will check for something with the
| name "frenzied" and run mobcheck.bat located at c:\MobCheck\ (Edit
| this to wherever you unzipped MobCheck Zip file). Also Edit
| "mobcheck.bat" to fill in your EMail address. If you cannot Edit INI files
| BAT files or Macro files please DO NOT use this macro. Thanks!
Sub Main
/declare alertlistno_ global
/declare spawn_name global
/varset alertlistno_ 9
/varset spawn_name "@Param0"
/echo MobCheck Macro is going to send an email 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"
/mqlog "@spawn_name" Has Spawned on $date(m)/$date(d)/$date(y) @ $time(h):$time(m)
/echo Time of spawn is $date(m)/$date(d)/$date(y) @ $time(h):$time(m)
/exec c:\MobCheck\mobcheck.bat bg
/return
} else {
/goto :TOP
}
/return
Code: Select all
@ECHO OFF
ECHO SENDING EMAIL, PLEASE WAIT...
rem PLEASE EDIT LOCATION OF MACROQUEST LOG FILES & LOCATION OF UNZIPPED MOBCHECK ZIP
Move "C:\Macroquest\Logs\mobcheck.mac.log" C:\Mobcheck\sendmail.txt
rem PLEASE EDIT TO EMAIL ADDRESS & LOCATION OF UNZIPPED MOBCHECK ZIP FILE
C:\mobcheck\sendmail.exe from=mobcheck@macroquest2.com to=your_email@your_domain.com Subject="Mob has SPAWNED, Check message for Details" Text=c:\Mobcheck\sendmail.txt StartAfterLoad
cls

