chantkite.mac -- bard chant kiting 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

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

chantkite.mac -- bard chant kiting macro

Post by dont_know_at_all » Sat Oct 04, 2003 4:42 pm

Code: Select all

|
| - chantkite.mac -
| this is orignally from twist.mac or twist1.mac -- sorry, I
| didn't keep that attribution
|
| chantkite <selo's gem> [<dot1 gem> <dot2 gem> [<loc x> <loc y> <radius>]]
| run around in a cirle while twisting selos and two DOT chants.  If x,
| y, and radius are not supplied, use the current position and a radius
| of 80.  This uses the short-lasting selos.
|
#event MissedNote "You miss a note, bringing your song to a close!"
#event Recovered  "You haven't recovered yet..."
#event NeedTarget "You must first select a target for this spell!"
#event Slow       "You slow down"
#event Exp        "You gain "
#event Outof      "out of range"

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

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

/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 exper global
| selo's coming for slow down processing
/declare selocoming global          
/declare t0 timer
/declare mytarg global
/declare v6 local

  /if $defined(p0)==false {
    /echo usage: zero string
    /return
  }

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

  /varset nsongs 1

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

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

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

| always incremented before starting a new
| song.  songs start at 1 so we can make
| cursong = 0 to restart the list
  /varset cursong 0             
  /varset exper $char(exp)
  /varset selocoming 0
  /varset t0 0

:Loop
  /if n @t0<=0 {
    | inline /call sing $int(@a(@cursong))
    /stopsong
    /if n @cursong==1 {
      /varset selocoming 1
    } else {
      /varset selocoming 0
    }
    /delay 1
    /varset t0 32
    /varadd cursong 1
    /if n @cursong>@nsongs /varset cursong 1
    /echo starting song @a(@cursong)
    /cast @a(@cursong)
    /if "$target()"=="true" /varset mytarg $target(name,clean)
  }
  /delay 2

  | inline /call circ @cirx @ciry @cirr
  | do the circle calculations....
  /varset v6 $calc(@cirr-$distance(@cirx,@ciry))
  /if n @v6>10 {
        | head out
        /face fast heading $calc($heading(@cirx,@ciry)+180)         
    } else /if n @v6<-10 {
        /if n @v6<-180 /varset v6 -180
        | head in
        /face fast heading $calc($heading(@cirx,@ciry)+90+@v6/2)    
    } else {
        | head tang
        /face fast heading $calc($heading(@cirx,@ciry)+90)      
    } 

  /delay 4
  /doevents
  /delay 1
/goto :Loop

/return


Sub Event_MissedNote
  | restart song
  /varcalc cursong @cursong-1       
  /varset t0 0
/return

Sub Event_Slow
  /if n @selocoming!=1 {
    | restart list
    /varset cursong 0               
    /varset t0 0
  }
/return

Sub Event_Outof
  /varset t0 0
/return

Sub Event_Recovered
  | restart song
  /varcalc cursong @cursong-1       
  /varset t0 0
/return

Sub Event_NeedTarget
  | get target
  /tar npc @mytarg                  
/return

Sub Event_Exp
  /varcalc exper $char(exp)-@exper
  /echo @exper%
  /varset exper $char(exp)
  /tar npc @mytarg
/return 
Edit: remove the end of line comments.
Last edited by dont_know_at_all on Tue Oct 07, 2003 3:16 am, edited 1 time in total.

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

chant.mac

Post by insanitywiz » Sat Oct 04, 2003 6:03 pm

I've gone ahead and completed my 49 Selo's version, with support for Below, Angstlich Assonance, and Puretone.

http://macroquest2.com/phpBB2/viewtopic ... 3034#23034
Last edited by insanitywiz on Sat Oct 11, 2003 7:00 pm, edited 3 times in total.

billjimson

Post by billjimson » Sun Oct 05, 2003 4:54 pm

Hm, having trouble getting this macro to run properly.

I enter the variables for selo's and the DoT songs, and leave the X Y and Radius blank; the songs begin twisting, but my bard just ends up standing there and then facing different directions, continuing to twist. After about 20 seconds of this, I get the "Everquest has crashed" error box that SoE recently implemented.

Any ideas why this is occurring?

Random()
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Aug 29, 2003 11:31 am

Post by Random() » Sun Oct 05, 2003 6:34 pm

Don't have a bard to check with, but just from reading it - it appears to be Working As Intended[tm]. I'm guessing DKAA might be tagging his mobs with autorun on & then firing the macro. You may want to put in a "/sendkey down up" in there for testing this while standing still - but I don't think it's the way DKAA uses it.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Sun Oct 05, 2003 7:44 pm

Yes, you have to mash NumLock with this macro.

If you are crashing, get the latest source and recompile. There was a memory leak that was causing the crash.

Guest

Post by Guest » Mon Oct 06, 2003 4:01 am

I was wondering...does this thing check to make sure the PC is in range?

If not, how would I go by doing that?

Guest

Post by Guest » Mon Oct 06, 2003 5:20 am

I seem to be having an issue with the sub event missed_note


whenever my bard misses a note, the computer crashes

Guest

Post by Guest » Mon Oct 06, 2003 5:24 am

...and I did download the most recent zip file.

TheColonel
of what?
of what?
Posts: 164
Joined: Thu Oct 10, 2002 6:34 pm
Location: Golden, CO
Contact:

Post by TheColonel » Mon Oct 06, 2003 2:33 pm

The wonders of an edit button.... I just finished converting mine over and I got to Sub Event_Timer... /em is confused gonna post in General about this, just wanted to comment on Edit probably can't a a guest, all the more reason to make a real account.
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

Neoplex
a lesser mummy
a lesser mummy
Posts: 45
Joined: Wed Nov 06, 2002 12:27 pm

Post by Neoplex » Mon Oct 06, 2003 6:17 pm

Hmm recompiled Mq this morning (As I do every monday hehe), and it still seems to crash a min or so into running the macro.
Noobmonk01 says "Your kung fu is no match for me The tribunal!"
Autoattack on
The Tribunal begins to cast a spell
LOADING PLEASE WAIT ;)

morpheous531
orc pawn
orc pawn
Posts: 18
Joined: Sun Oct 06, 2002 10:52 pm

Post by morpheous531 » Mon Oct 06, 2003 9:20 pm

It seems to be the missed note event


I took it out and seems to work fine afterwards.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Mon Oct 06, 2003 9:23 pm

morpheous531 wrote:It seems to be the missed note event


I took it out and seems to work fine afterwards.
The only difference between this macro and one I use constantly is comments. I will check out the comments this evening if I get a chance.

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Post by MacroFiend » Mon Oct 06, 2003 10:07 pm

Comments at the end of a valid line of code used to cause an error. Not sure if that is still the case.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Oct 07, 2003 3:13 am

Still the case.

In EQLib_MacroCommands.cpp, line 218, szResult is non-zero and bogus. The crash is in the sprintf.

In VarCalc
szVar ="cursong 3.00-1 | restart song"

keflex
Contributing Member
Contributing Member
Posts: 11
Joined: Tue Mar 25, 2003 1:27 pm

Post by keflex » Tue Oct 07, 2003 11:02 pm

Hm, I seem to have a problem adjusting the radius low enough to use very short range songs (AE PB songs, in particular).

Anyone have the same problem?