What it is: A NPC tracker. Features include informing you when a mob spawns, when the mob dies, zone-dependant mob listing and a short description attached to the mob's name.
How it works: There is 2 files neccessary to make it run. The first is track.mac, use this file to run the macro itself. Then there's alert.ini, this file is used to store the listing of all NPC alerts.
A very important note: When this macro initializes it can be very spammy with MQ's initial setup. If you dislike seeing all the spam, you can remove some of the repetitive text by adding into your macroquest.ini file:
Code: Select all
Filter7=Added alert for
Filter8=Alert list
Installation: Place the following file into your \macros\ directory:
*updated posted info
Code: Select all
|Shin Noir's Track.mac
#turbo
#define INIPATH "C:\Macroquest\Release\Macros\alert.ini"
Sub Main
/if "$p0"=="add" {
/if "$p1"=="" /call Syntax
/if "$p2"=="" /call Syntax
/call ListKeys empty $zone
/if n $return==0 {
/echo No empty keys were found.
/endmacro
}
/ini "INIPATH" "$zone" "$int($return)" "$p1"
/ini "INIPATH" "$zone" "i$int($return)" "$p2"
/echo Added: Key: $int($return)
/echo - Name: $p1
/echo - Desc: $p2
} else /if "$p0"=="run" {
/goto :Run
} else /if "$p0"=="edit" {
/if n $strlen("$p1")>3 /call Syntax
/if "$p2"=="" /call Syntax
/if "$p3"=="" /call Syntax
/ini "INIPATH" "$zone" "$int($p1)" "$p2"
/ini "INIPATH" "$zone" "i$int($p1)" "$p3"
/echo Updated: Key: $int($p1)
/echo - Name: $p2
/echo - Desc: $p3
} else /if "$p0"=="list" {
/call ListKeys echo
} else {
/call Syntax
}
:Run
/call AlertSetup
:Loop
/if "$v1"!="$zone" /call AlertSetup |Zone Change Detected, Updating Alert list.
/call DoTracking
/goto :Loop
/return
Sub DoTracking
/for v3 1 to $a(0,0)
/if "$alert($v3)"=="TRUE" /if $a(1,$v3)<3 /if "$a(0,$v3)"!=0 {
/if "$a(2,$v3)"!=0 {
/echo $a(0,$v3) is up. ($a(2,$v3))
} else {
/echo $a(0,$v3) is up.
}
/varset a(1,$v3) 3
}
/if "$alert($v3)"=="FALSE" /if $a(1,$v3)>1 {
/varset a(1,$v3) 0 |If mob has been detected and now died, reset alert indicator.
/echo "$a(0,$v3) died."
}
/next v3
/return
Sub AlertSetup
|** Clear Alerts **|
/varset v1 "$zone"
/for v3 1 to 100
/varset a(0,$v3) 0 |Clear NPC name listing
/varset a(1,$v3) 0 |Clear Alert Status listing
/varset a(2,$v3) 0 |Clear Info Listing
/next v3
|** Get Alerts from alert.ini **|
/for v3 1 to 10
/if "$ini("INIPATH","$zone","$v3")"=="NOTFOUND" {
/varset a(0,0) $int($calc($v3-1))
/goto :FoundItems
} else {
/varset a(0,$v3) "$ini("INIPATH","$zone","$v3")"
}
/next v3
:FoundItems
|** Set Alerts **|
/if $a(0,0)==0 {
/echo No NPC alerts set for $zone.
/goto :FinishedInfo
} else {
/for v3 1 to $a(0,0)
/alert clear $v3
|** changes "an orc pawn" to "an_orc_pawn" for alert setting **|
/varset v20 "$a(0,$v3)"
/varset l1 $int($strlen("$v20")-1)
/for l0 0 to $l1
/if "$mid($l0,1,"$v20")"==" " /varset v20 "$left($l0,"$v20")_$right($int($l1-$l0),"$v20")"
/next l0
/varset v20 "$v20"
|** Add alerts in "an_orc_pawn00" settings **|
/alert add $v3 npc "$v20""00"
/alert add $v3 npc "$v20""01"
/alert add $v3 npc "$v20""02"
/alert add $v3 npc "$v20""03"
/alert add $v3 npc "$v20""04"
/alert add $v3 npc "$v20""05"
/doevents
/next v3
/echo $a(0,0) alerts for $zone set.
}
|** Get Info from alert.ini **|
/for v3 1 to $a(0,0)
/if "$ini("INIPATH","$zone","i$v3")"!="NOTFOUND" /varset a(2,$v3) "$ini("INIPATH","$zone","i$v3")"
/next v3
:FinishedInfo
/return
Sub ListKeys
/if "$p0"!="echo" /if "$p0"!="empty" {
/echo Syntax: /call ListKeys <echo|empty> <section>
/endmacro
} else /if "$p1"=="" {
/echo Syntax: /call ListKeys <echo|empty> <section>
/endmacro
}
/varset l0 0
:Loop
/varadd l0 1
/if "$p0"=="echo" {
/if "$ini("INIPATH","$p1","$int($l0)")"!="NOTFOUND" /echo Name: $ini("INIPATH","$p1","$int($l0)")
/if "$ini("INIPATH","$p1","i$int($l0)")"!="NOTFOUND" /echo Desc: i$int($l0) :: Value: $ini("INIPATH","$p1","$int($l0)")
}
/if "$p0"=="empty" /if "$ini("INIPATH","$zone","$int($l0)")"=="NOTFOUND" /return $int($l0)
/if n $l0<100 /goto :Loop
/return 0
Sub Syntax
/echo Syntax: /macro track <run|add|edit|list> ["name"|key] ["description"|"name"] ["description"]
/echo Example: /macro track run
/echo Example: /macro track list
/echo Example: /macro track add "Some NPC Name" "Some Description"
/echo Example: /macro track edit 5 "Some NPC Name" "Some Description"
/endmacro
/returnCode: Select all
#########################
# Alert.ini #
#########################
# By: Shin Noir #
# ShinNoir@hotmail.com #
#########################
#Alert Setup Example:
#
#Syntax:
#[Zone Name]
#<#>=<spawn name>
#<i#>=<spawn desc>
#
#[South Ro]
#1=an Ancient Cyclops
#i1=Jboots quest. Drops Ring of the Ancients
#
#[Dreadlands]
#1=Gorenaire
#2=Veltar
#i2=Used in a monk quest.
#
#[North Karana]
#1=Quillmane
#
#Note: Avoid using [] and " inside descriptions..
#Note: Partial names work too! "Ancient" for an Ancient Cyclops should be fine.
[Acrylia Caverns]
[Ak'Anon]
[Akheva Ruins]
[Torden, The Bastion of Thunder]
[Befallen]
[Beholders Maze]
[Black Burrow]
[Burning Woods]
[Butcherblock Mountains]
[Cabilis East]
[Cabilis West]
[Cazic Thule]
[Charasis]
[Chardok]
[Chardok, Halls of Betrayal]
[City of Mist]
[Cobalt Scar]
[Crushbone]
[Crypt of Dalnir]
[Crypt of Nadox]
[Crystal Caverns]
[Dagnors Cauldron]
[Dawnshroud Peaks]
[Doomfire, The Burning Lands]
[Dragon Necropolis]
[Dreadlands]
[Drunder, Fortress of Zek]
[Dulak's Harbor]
[East Commonlands]
[Eastern Karana]
[Eastern Wastes]
[Echo Caverns]
[Emerald Jungle]
[Erudin]
[Erudin Palace]
[Eruds Crossing]
[Eryslai, the Kingdom of Wind]
[Everfrost Peaks]
[The Feerrott]
[Felwithe]
[Field of Bone]
[Firiona Vie]
[Freeport East]
[Freeport North]
[Freeport West]
[Frontier Mountains]
[Fungus Grove]
[Great Divide]
[Greater Faydark]
[Grieg's End]
[Grimling Forest]
[Gukta, Outpost of Marr]
[Gulf of Gunthak]
[Halas]
[Hate's Fury]
[Highhold Pass]
[Highpass Keep]
[Hollowshade Moor]
[Iceclad Ocean]
[Icewell Keep]
[Innothule Swamp]
[Jaggedpine Forest]
[Kael Drakkal]
[Kaesora]
[Kaladim North]
[Kaladim South]
[Karnor's Castle]
[Katta Castellum]
[Kedge Keep]
[Kerafyrm's Lair]
[Kerra Island]
[Kithicor Forest]
[Kurn's Tower]
[Lair of Terris Thule]
[Lake of Ill Omen]
[Lake Rathetear]
[Lavastorm Mountains]
[Lesser Faydark]
[Lower Guk]
[Marus Seru]
[Mines of Nurga]
[Mistmoore Castle]
[Misty Thicket]
[Mons Letalis]
[Nagafen's Lair: The Caverns of Exile]
[Nagafen's Lair]
[Najena]
[Nektulos Forest]
[Neriak Third Gate]
[Neriak Commons]
[Neriak Foreign Quarter]
[Netherbian Lair]
[North Ro]
[North Karana]
[Oasis of Marr]
[Ocean of Tears]
[Oggok]
[Old Sebilis]
[Paineel]
[Paladul Caverns]
[Permafrost]
[Plane of Disease]
[Plane of Fear]
[Plane of Growth]
[Plane of Hate]
[Plane of Innovation]
[Plane of Justice]
[Plane of Knowledge]
[Plane of Mischief]
[Plane of Nightmare]
[Plane of Sky]
[Plane of Storms]
[Plane of Time]
[Plane of Torment]
[Plane of Tranquility]
[Plane of Valor]
[Qeynos Aqueducts]
[Qeynos Hills]
[Qeynos North]
[Qeynos South]
[Ragrax, Stronghold of the Twelve]
[Mountains of Rathe]
[Reef of Coirnav]
[Rivervale]
[Ruins of Lxanvom]
[Runnyeye]
[Sanctus Seru]
[Shadeweaver's Thicket]
[Shadow Haven]
[Shar Vahl]
[Sirens Grotto]
[Skyfire Mountains]
[Skyshrine]
[Soluseks Eye]
[South Karana]
[Southern Karana]
[Splitpaw Lair]
[Steamfont]
[Stonebrunt Mountains]
[Surefall Glades]
[Swamp of No Hope]
[Temple of Droga]
[Temple of Solusek Ro]
[Temple of Veeshan]
[The Bazaar]
[The Deep]
[The Grey]
[The Hole]
[The Maiden's Eye]
[The Nexus]
[The Overthere]
[The Scarlet Desert]
[The Tenebrous Mountains]
[The Twilight Sea]
[The Umbral Plains]
[Thurgadin]
[Timorous Deep]
[Torgiran Mines]
[Tower of Frozen Shadow]
[Tower of Solusek Ro]
[Toxxulia Forest]
[Trakanon's Teeth]
[Umbral Plains]
[Unrest]
[Upper Guk]
[Veeshan's Peak]
[Vegarison, the Earthen Badlands]
[Veksar]
[Velketor's Labyrinth]
[Vex Thal]
[Wakening Land]
[West Commonlands]
[Western Karana]
[Western Wastes]
*Invisible warrior PH's for some uber mobs will inform you a mob is up, when he really isn't.
*Some of the zone names are untested to be true $zone returns. If an alert doesn't work after adding it, be sure the bracketed [ ] zone matches the echo in game of no matches.




