|Watching.mac by HardOne 12/20/2010
|This macro will watch for a specific mob to spawn
|When your mob spawns, it will send a text using MQ2MMOText Plugin
#turbo 80
#event ImDead "#*#You have been slain by#*#"
#event ImDead "Returning to home point, please wait..."
#event ImDead "#*#Returning to Bind Location#*#"
Sub Main
/if (!${Plugin[MQ2MMOText].Name.Equal[mq2mmotext]}) /plugin MQ2MMOText load
/if (!${Plugin[MQ2PCCheck].Name.Equal[mq2pccheck]}) /plugin MQ2PCCheck load
/if (!${Plugin[MQ2CEcho].Name.Equal[mq2cecho]}) /plugin MQ2CEcho load
/target clear
| ** Edit this section with the mob your looking for. Place mob name in quotes for multi-names
/declare MobName1 string outer "Mob One"
/declare MobName2 string outer MobTwo
/declare MobName3 string outer MobThree
/declare MobName4 string outer "Mob Four"
| ** No more edits needed past this point
/declare PageTimer1 timer outer 0
/declare PageTimer2 timer outer 0
/declare PageTimer3 timer outer 0
/declare PageTimer4 timer outer 0
/cecho Watching for ${MobName1}, ${MobName2}, ${MobName3}, and ${MobName4} in \ao${Zone}!
:mainloop
/doevents
/if (!${PageTimer1}) /call CheckSpawn1
/if (!${PageTimer2}) /call CheckSpawn2
/if (!${PageTimer3}) /call CheckSpawn3
/if (!${PageTimer4}) /call CheckSpawn4
/goto :mainloop
/return
Sub CheckSpawn1
/if (${SpawnCount[npc named ${MobName1}]}) {
/echo ${MobName1} has Spawned @ ${Time}!
/bc ${MobName1} has Spawned @ ${Time}!
/mmotext send ${MobName1} has Spawned!
/beep
/beep
/beep
/varset PageTimer1 5m
}
/return
Sub CheckSpawn2
/if (${SpawnCount[npc named ${MobName2}]}) {
/echo ${MobName2} has Spawned @ ${Time}!
/bc ${MobName2} has Spawned @ ${Time}!
/mmotext send ${MobName2} has Spawned!
/beep
/beep
/beep
/varset PageTimer2 5m
}
/return
Sub CheckSpawn3
/if (${SpawnCount[npc named ${MobName3}]}) {
/echo ${MobName3} has Spawned @ ${Time}!
/bc ${MobName3} has Spawned @ ${Time}!
/mmotext send ${MobName3} has Spawned!
/beep
/beep
/beep
/varset PageTimer3 5m
}
/return
Sub CheckSpawn4
/if (${SpawnCount[npc named ${MobName4}]}) {
/echo ${MobName4} has Spawned @ ${Time}!
/bc ${MobName4} has Spawned @ ${Time}!
/mmotext send ${MobName4} has Spawned!
/beep
/beep
/beep
/varset PageTimer4 5m
}
/return
Sub Event_ImDead
/doevents
/echo I've been Killed! Alerting People...
/bc Somehow I Died! Ending Macro.
/call PeopleNear
/mmotext send I was killed, no longer watching!
/beep
/beep
/beep
/endmac
/return