Ae Kite Macro?

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Huggles
orc pawn
orc pawn
Posts: 11
Joined: Wed Apr 21, 2004 6:13 pm

Ae Kite Macro?

Post by Huggles » Wed Apr 21, 2004 6:14 pm

Ive been using this for a while now, i tried to update it but must be doing something wrong, any help would be superb

Code: Select all

#event MissedNote "You miss a note, bringing your song to a close!" 
#event NeedTarget "You must first select a target for this spell!" 
#event Slow       "you slow down" 
#event Exp        "You gain " 
#event Tell       "tells you" 
#event Recovered "You haven't recovered yet..." 
#event Notsee   "You cannot see" 
#event Died "You have entered" 

| this needs to be on now -- parameter parsing takes too long 
#turbo 

Sub Main(p0,p1,p2,p3,p4,p5,p6) 

/declare cirx global 
/declare ciry global 
/declare cirr global 
| array of songs 
/declare a array 
| number of songs 
/declare nsongs global 
| current song 1-3 
/declare cursong global 
/declare prevsong global 
/declare exper global 
/declare aaexp global 
/declare health global 
/declare songtimer timer 
/declare selotimer timer 
/declare angstimer timer 
/declare puretonetimer timer 
/declare bellowtimer timer 
/declare rangecalc global 
/declare lastmobid global 
/varset rangecalc 0 

  /if $defined(p0)==false { 
    /echo usage: swarm.mac <DOT> <DOT> <DOT> <selo> <loc x> <loc y> <radius> 
    /return 
  } 

  | check if the location was passed in... 
  /if $defined(p4)==false { 
        /varset cirx $char(y) 
        /varset ciry $char(x) 
        /varset cirr 32 
  } else { 
        /varset cirx @p4 
        /varset ciry @p5 
        /varset cirr @p6 
  } 

  /varset nsongs 3 

| First song 
  /varset a(1) @p0 
  /echo Song 1: $char(gem,@p0) 

  /if $defined(p1)!=false { 
            /varset a(2) @p1 
            /echo Song 2: $char(gem,@p1) 
      } 

  /if $defined(p2)!=false { 
            /varset a(3) @p2 
            /echo Song 3: $char(gem,@p2) 
      } 

|Selos 
  /if $defined(p5)!=false { 
            /varset a(4) @p3 
            /echo Song 4: $char(gem,@p3) 
      } 

| always incremented before starting a new 
| song.  songs start at 1 so we can make 
| cursong = 0 to restart the list 
  /varset cursong 1 
  /varset exper $char(exp)% 
  /varset aaexp $char(aa,exp)% 
  /varset songtimer 64 
  /varset bellowtimer 186 
  /varset selotimer 0 
  /varset angstimer 240 
  /varset puretonetimer 64 

:Loop 
   /if $defined(p3)==false { 
      /varset selotimer 10000 
  } 
  /if $defined(p5)!=false { 
    /if $char(speed)<=1 /varset cursong @a(4) 
    /call circ @cirx @ciry @cirr 
  } 
    /if n @selotimer<=0 { 
      /varset cursong @a(4) 
      /varset selotimer 1500 
      /call Sing 
  } 
    /if n @puretonetimer<=0  { 
      /varset angstimer 0 
      /disc puretone 
      /varset puretonetimer 43200 
  } 
    /if n @songtimer<=0 /call Sing 
    /call circ @cirx @ciry @cirr 
    /doevents 
/goto :Loop 
/return 

Sub Sing 
   /stopsong 
   /cast @cursong 
   /if n $target(id)!=@lastmobid /if n @rangecalc!=0 /varset rangecalc 0 
|   /echo casting @cursong 
   /varset prevsong @cursong 
   /varadd cursong 1 
   /varset songtimer 32 
   /call circ @cirx @ciry @cirr 
   /doevents 
   /if n @cursong>@nsongs /varset cursong @a(1) 
/return 

Sub circ 
   /if $char(speed)<=.2 /press Num_Lock 
   /if n $distance(@cirx,@ciry)<(@cirr/2){ 
   /face heading $calc($heading(@cirx,@ciry)+180) 
   } else { 
   /face heading $calc($heading(@cirx,@ciry)+$calc(90*$calc(@cirr/$distance(@cirx,@ciry)))) 
   } 
/return 

Sub Event_MissedNote 
  | restart song 
   /varset cursong @prevsong 
   /varset songtimer 0 
   /call circ $xloc $yloc $radius 
   /doevents 
/return 

Sub Event_Recovered 
  | restart song 
   /if @cursong!=a(5) { 
   /varset cursong @prevsong 
} 
   /varset songtimer 0 
   /call circ $xloc $yloc $radius 
   /doevents 
/return 

Sub Event_Notsee 
   /stopsong 
   /varset cursong @prevsong 
   /varset songtimer 0 
   /call circ $xloc $yloc $radius 
   /doevents 
/return 

Sub Event_NeedTarget 
  | get target 
   /tar npc 
   /varset lastmobid $target(id) 
   /call circ @cirx @ciry @cirr 
   /doevents 
/return 

Sub Event_Tell 
   /beep 
   /call circ $xloc $yloc $radius 
   /doevents 
/return 

Sub Event_Died 
  /delay 10 
  /sit 
  /delay 10 
  /camp desktop 
/return 

Sub Event_Exp 
  /varset aaexp $calc($char(aa,exp)-@aaexp) 
  /varset exper $calc($char(exp)-@exper) 
  /echo Running time $calc($running/60) minutes 
  /echo @exper% regular exp @aaexp% AA exp 
  /varset exper $char(exp) 
  /varset aaexp $char(aa,exp) 
  /stopsong 
  /tar npc 
  /varset cursong @a(1) 
  /varset songtimer 0 
  /call circ @cirx @ciry @cirr 
  /doevents 
/return 

Sub Event_OOR 
  /varcalc rangecalc @rangecalc+1 
  /if n @rangecalc>=10 { 
      /press esc 
      /varset rangecalc 0 
      /tar npc 
      /call circ @cirx @ciry @cirr 
      /doevents 
  } 
/return 

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Apr 21, 2004 7:37 pm

Gee I don't see anything wrong.