First Macro

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Super-Novice
decaying skeleton
decaying skeleton
Posts: 2
Joined: Thu Apr 08, 2004 7:31 pm

First Macro

Post by Super-Novice » Thu Apr 08, 2004 7:42 pm

Okay...I had intended for this to just be a simple macro that told me when non-tower named spawned in BoT. I know other programs can already do this, but I figured it'd be good practice for me. Regardless, I can't get this macro to recognize the spawns for some reason.

Here's the code:

Code: Select all

|	Tracks named spawns in BoT. Alerts whenever a non-tower named spawns

Sub Main

	/alert add 1 "Hreidar Lynhilling"
	/alert add 2 "Wybjorn"
	/alert add 3 "Torstien Stoneskin"
	/alert add 4 "Ymir Stormseer"
	/alert add 5 "Thangbrand"
	/alert add 6 "Thorolf Sutherland"
	/alert add 7 "Valbrand"
	/alert add 8 "Guakr Sandstorm"
	/alert add 9 "Rorek Steelthorn"
	/alert add 10 "Elif Whitewind"
	/alert add 11 "Laef Windfall"
	/alert add 12 "Eindride Icestorm"
	/alert add 13 "Riodhr Torrentwind"
	/alert add 14 "Oreen Wavecrasher"

    :Loop
	/if $alert(1)=="TRUE" {/echo Hreidar Lynhilling spawned. West boss }
	/if $alert(2)=="TRUE" {/echo Wybjorn spawned. West mini }
	/if $alert(3)=="TRUE" {/echo Torstien Stoneskin spawned. West mini }
	/if $alert(4)=="TRUE" {/echo Ymir Stormseer spawned. Middle Earth mini }
	/if $alert(5)=="TRUE" {/echo Thangbrand spawned. Middle Earth mini }
	/if $alert(6)=="TRUE" {/echo Thorolf Sutherland spawned. Forge mini }
	/if $alert(7)=="TRUE" {/echo Valbrand spawned. Forge mini }
	/if $alert(8)=="TRUE" {/echo Guakr Sandstorm spawned. South boss }
	/if $alert(9)=="TRUE" {/echo Rorek Steelthorn spawned. Deep South mini }
	/if $alert(10)=="TRUE" {/echo Elif Whitewind spawned. North mini }
	/if $alert(11)=="TRUE" {/echo Laef Windfall spawned. North boss }
	/if $alert(12)=="TRUE" {/echo Eindride Icestorm spawned. East mini }
	/if $alert(13)=="TRUE" {/echo Riodhr Torrentwind spawned. East mini }
	/if $alert(14)=="TRUE" {/echo Oreen Wavecrasher spawned. East boss }
	/delay 2s
                /goto :Loop
/endmacro
When I run the macro, it runs through the list of alerts and responds with "Added alert for: (0-100) any <name of mob>". The /if statements never seem to be true though. I was standing right in front of Guakr a few minutes ago to test this and it never notified me. Likewise, Oreen spawned across the zone and it never notified me there either.

First, is there a better way to do this? And second, where am I going wrong with my /if statements?

Super-Novice
decaying skeleton
decaying skeleton
Posts: 2
Joined: Thu Apr 08, 2004 7:31 pm

Post by Super-Novice » Thu Apr 08, 2004 7:50 pm

Bleh...I figured out the problem with my /if statements right after I posted this.

Regardless, is there a better way to do this? Creating an alert for every possible named seems like a round-about of doing this. Does anyone know of a more efficient method of searching?