Spawn Tracker

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

HaVoC8750

Spawn Tracker

Post by HaVoC8750 » Wed Oct 29, 2003 2:12 am

could some one convert this? Ive tried several...hundred times with no sucess =(

can anyone convert this? Ive tried a few..hundred times and still no sucsess.

http://macroquest2.com/phpBB2/viewtopic.php?t=2620

TIA

Code: Select all

#turbo 
#event ZONING "LOADING, PLEASE WAIT ..." 
#define TELLPLAYER v0 
Sub Main 
   /varset TELLPLAYER "NULL" 
   /if n $strlen("$p0")==0 { 
      /echo Syntax: /macro camp <"NPC Name"> ["NPC Name"] .. 
      /endmacro 
   } 
   /alert clear 1 
   /varset l0 0 
   :Loop 
      /alert add 1 npc "$p$int($l0)" 
      /if n $strlen("$p$int($calc($l0+1))")==0 /goto :Track 
      /varadd l0 1 
   /goto :Loop 
   :Track 
      /doevents 
      /if $alert(1)==TRUE { 
         /target alert 1 
         /face alert 1 
         /if "$TELLPLAYER"=="NULL" { 
            /varset t0 1m 
            :DoAlert 
               /call SoundAlert 
            /if n $t0>0 /goto :DoAlert 
         } else { 
            /tell $TELLPLAYER $target(name,clean) has spawned. 
         } 
         /endmacro 
      } 
      /delay 10s 
   /goto :Track 
/return 

Sub SoundAlert 
   /for l0 1 to 4 
      /beep 
   /next l0 
   /delay 2s 
/return 

sub Event_ZONING 
   /endmacro 
/return

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

Post by Trixz » Wed Oct 29, 2003 3:07 am

I think this should work... was done very quickly and was not tested, I'm pretty sure its right though... at least converted right... I didn't pay attention to weather the code was right in the first place or not.

Code: Select all

#turbo 
#event ZONING "LOADING, PLEASE WAIT ..." 
Sub Main
   /declare TELLPLAYER local
   /declare Var1 local            
   /declare Time timer 
   /varset TELLPLAYER "NULL" 
   /if n $strlen("@param0")==0 { 
      /echo Syntax: /macro camp <"NPC Name"> ["NPC Name"] .. 
      /endmacro 
   } 
   /alert clear 1 
   /varset Var1 0 
   :Loop 
      /alert add 1 npc "@param$int($l0)" 
      /if n $strlen("@param$int($calc($l0+1))")==0 /goto :Track 
      /varadd Var1 1 
   /goto :Loop 
   :Track 
      /doevents 
      /if $alert(1)==TRUE { 
         /target alert 1 
         /face alert 1 
         /if "@TELLPLAYER"=="NULL" { 
            /varset Time 1m 
            :DoAlert 
               /call SoundAlert 
            /if n @Time>0 /goto :DoAlert 
         } else { 
            /tell @TELLPLAYER $target(name,clean) has spawned. 
         } 
         /endmacro 
      } 
      /delay 10s 
   /goto :Track 
/return 

Sub SoundAlert 
   /for Var1 1 to 4 
      /beep 
   /next Var1 
   /delay 2s 
/return 

sub Event_ZONING 
   /endmacro 
/return

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Wed Oct 29, 2003 9:46 am

Trixz wrote:

Code: Select all

Sub SoundAlert 
   /for Var1 1 to 4 
      /beep 
   /next Var1 
   /delay 2s 
/return
Have to look like

Code: Select all

Sub SoundAlert 
  /declare Var1 local
   /for Var1 1 to 4 
      /beep 
   /next Var1 
   /delay 2s 
/return 
Did not have the loop variabel set :)
|| Napolion ||