chant.mac

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

Moderator: MacroQuest Developers

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

chant.mac

Post by insanitywiz » Sat Oct 11, 2003 6:59 pm

Here's an ugly 4 chant, 49 Selo's, Angstlich Assonance, Below, Puretone using version. Mostly hacked together from DKAA's above, and some random sources from the old twist1.mac plus some divine inspiration in the form of alcoholic beverage and lack of sleep.

I’m sure this can be made more reliable and or faster, so it’s a work in progress as people come back with feedback or I manage to get time to spend on it.

Edit: A whole mess of fine tuning, invcluding a better stun recovery, and a redundent check to make sure selo's is on. Still have an issue that I haven't looked into yet about why the arrays aren't incrementing the songs they are supposed too.

Code: Select all

| 
| - chant.mac - 
| Hacked together by Insanitywiz to support 4 chants, 49 Selo's,
| Angstlich Assonance, and Bellow from DKAA's chantkite mac.
| 
| chant <dot1> <dot2> <dot3> <dot4> <angstlich> <selo> <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.
|
| Example of calling the macro with the 49 selo's and Angstlich Assonance
| Example:/macro chant <dot> <dot> <dot> <dot> <angst> <selo> <xloc> <yloc> <radius>
|
| Example of calling the macro with the 49 selo's, but without Angstlich
| Example:/macro chant <dot> <dot> <dot> <dot> <0> <selo> <xloc> <yloc> <radius>
|
| Example of calling the macro without the 49 selo's, or Angstlich
| Example:/macro chant <dot> <dot> <dot> <selo> <0> <0> <xloc> <yloc> <radius>

#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,p7,p8) 

/declare cirx global 
/declare ciry global 
/declare cirr global 
| array of songs 
/declare a array 
| number of songs 
/declare nsongs global 
| current song 1-5 
/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 

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

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

  /varset nsongs 4 

| 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) 
      } 

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

|Angstlich Assonance (Only use if the X Y and radius was set) 
  /if $defined(p4)!=false { 
            /varset a(5) @p4 
            /echo Song 5: $char(gem,@p4) 
      } 

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

| 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(p4)==false { 
      /varset angstimer 15000
  }
   /if $defined(p5)==false { 
      /varset selotimer 15000
  }
  /if $defined(p5)!=false { 
    /if $char(speed)<=1 /varset cursong @a(6)
    /call circ @cirx @ciry @cirr
  }
    /if n @bellowtimer<=0  {
      /alt activate 199
      /varset bellowtimer 186 
  }
    /if n @selotimer<=0 {
      /varset cursong @a(6)
      /varset selotimer 1500
      /call Sing
  }
    /if n @puretonetimer<=0  {
      /varset angstimer 0
      /disc puretone
      /varset puretonetimer 43200
  }
    /if n @angstimer<=0 {
      /varset cursong @a(5)
      /varset angstimer 600
      /call Sing
  }
    /if n @songtimer<=0 /call Sing
    /call circ @cirx @ciry @cirr
    /doevents
/goto :Loop 
/return 

Sub Sing
   /stopsong
   /cast @cursong
|   /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
   /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
Last edited by insanitywiz on Wed Oct 15, 2003 6:39 pm, edited 1 time in total.

Guest

Post by Guest » Sun Oct 12, 2003 1:09 pm

The Selo's doesn't work quiet right, hit about every other 2.5 minute block, I don't see the error either.

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

Post by insanitywiz » Sun Oct 12, 2003 1:41 pm

It hits every one for me, though I run with absolutely no lag. Try changing it down from 1500 timer to give more room for error. I'll take a closer look at it over the next couple days and see if I can see anything else that may cause it.

mamba666
a lesser mummy
a lesser mummy
Posts: 49
Joined: Fri Aug 15, 2003 11:47 am

Post by mamba666 » Tue Oct 14, 2003 12:52 pm

I have been having problems with this and am trying to get the songs to go in the correct order.

Shouldn't this


"Sub Sing
/stopsong
/cast @cursong
| /echo casting @cursong
/varset prevsong @cursong
/varadd cursong @a(1)
/if n @cursong>@nsongs /varset cursong @a(1)
/varset songtimer 32
/call circ @cirx @ciry @cirr
/doevents
/return "


actually be this?

"Sub Sing
/stopsong
/cast @a(@cursong)
| /echo casting @cursong
/varset prevsong @cursong
/varadd cursong 1
/if n @cursong>@nsongs /varset cursong 1
/varset songtimer 32
/call circ @cirx @ciry @cirr
/doevents
/return "


The problem i have been having is that the songs jump to cast 1 and go up to nsongs which are not the songs I wanted. This happens after the selos timer. It seems to reset the songs to 1 instead of @a(1)

Anyways tell me if anyone else has fixed this yet, when I have time to monkey around with it I am sure to get it right.

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

Post by insanitywiz » Tue Oct 14, 2003 5:28 pm

I've made several improvements and logic upgrades which I'll post when I get a chance.

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

Post by TheColonel » Tue Oct 14, 2003 10:23 pm

Hehe... nice! I just tried it today.. I also made the big mistake of turning in my Tome of Discord... so I think I'm done with EQ for a while... good luck! I'll still be around, not really able to help with anything, or work on anything.... so. =/ Anyhow. Peace.
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

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

Post by insanitywiz » Wed Oct 15, 2003 6:43 pm

Newer, better, yellow. I still have an issue that I haven't looked into, the songs in the Array are incrementing wrong, it's just incrementing songs 1-4 for the chants rather then by the set paramaters.

tac8357

?

Post by tac8357 » Wed Oct 15, 2003 8:44 pm

Iam very to this tuff so bare with me. Do i need to set the song delays my self? Havent been able to get it to run not sure what iam doing wrong.

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

Post by insanitywiz » Wed Oct 15, 2003 9:23 pm

No, all song delays are 3 seconds, so they are hardcoded into the macro. The only other delays that matter are the refresh delays on Angstlich assonance, but that is hardcoded as well.

As I posted, there are a couple errors in the /varradd for the array that I haven't looked at yet, so right now it will mem your chants in gems 1 2 3 4, angstlich and selo's can be in any other gem.

So, to use the macro it should be /macro chant 1 2 3 4 <5 ansgtlich> <8 selo> xloc yloc radius

xviisualx
orc pawn
orc pawn
Posts: 22
Joined: Mon Nov 18, 2002 3:08 pm
Contact:

suggestion

Post by xviisualx » Thu Oct 16, 2003 3:57 am

I highly suggest this if you plan on using this and walking away or moving around the room.

Code: Select all

/declare rangecalc global 
/declare lastmobid global
/varset rangecalc 0
after the declares and parameter check:

Code: Select all

  /if $target(id)!=0 {
    /varset lastmobid $target(id)
    /echo You have a target currently selected.  Make sure your not kiting yourself please. 
  } 
within "Sub Sing" BEFORE "/cast @cursong" is called:

Code: Select all

   /if n $target(id)!=@lastmobid /if n @rangecalc!=0 /varset rangecalc 0
within "Event_NeedTarget" AFTER /tar npc is called:

Code: Select all

/varset lastmobid $target(id)
within "Event_Exp" AFTER /tarnpc is called:

Code: Select all

/varset lastmobid $target(id)

Code: Select all

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 
Also let it be noted, I have added a /doevents at the start of the :loop in sub main but im not sure if it is necisariy to the code at this time.

Now for the explenation of why to add it. Simply, if your mob walks out of range or leaves your range after 10 tries of casting on him, and believe me after 10 he wont be back for a while, it will pick a new target. It also works well when mobs are not up and you have some mob targed that is far away and the macro wont switch to mobs that pop. As a final touch, I made it so when a given target goes out of range and come back within range it will reset the out of range check when a new mob is targeted. This is because if a new target goes out of range, and previously the mob wentout of range 10 times it would not switch targetrs.

Also, to who ever is working on this code, you may want to put in some form of heal detection i.e. if your life ends up below 50% toss in wind of marr or any heal chant in replace of the last dot.

There should not be any erros with my code seems to work fine for me please let me know if something goes wrong or seem to be working improperly.
Last edited by xviisualx on Thu Oct 16, 2003 11:50 pm, edited 3 times in total.
Hoodallali!

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

Post by insanitywiz » Thu Oct 16, 2003 9:15 am

Thanks Xvi, I haven't needed an oor calculator so I haven't bothered to put one in. I'll slip it in and make sure it works (though it looks solid like you said) and then post a new version.

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

Post by morpheous531 » Thu Oct 16, 2003 10:27 am

This is going to be a great chant macro once its done

cudos to all of you

tac8357

thanx for answering my question

Post by tac8357 » Thu Oct 16, 2003 10:27 am

My character is only 44 atm and only has selo's accellerando, tuyen's chant of flame and fufils curtailing chant. If i may ask how would go about changing what songs it use? If i may ask. I know iam a newbie at this stuff so if you dont want to reply thats kewl. Trying to take a crash course on this stuff. Thanx again

Wendel
a lesser mummy
a lesser mummy
Posts: 58
Joined: Wed Jul 24, 2002 1:48 am

Re: thanx for answering my question

Post by Wendel » Thu Oct 16, 2003 11:22 am

tac8357 wrote:My character is only 44 atm and only has selo's accellerando, tuyen's chant of flame and fufils curtailing chant. If i may ask how would go about changing what songs it use? If i may ask. I know iam a newbie at this stuff so if you dont want to reply thats kewl. Trying to take a crash course on this stuff. Thanx again
There is another macro that works well if you don't have the 49 Selos. What I did was get some sow potions and just twist it with three dots. Being a bard you can cast spells while moving so if you were really motivated you could put a timer on your sow potions and cast a new potion as required.

Here is a link to the other macro:

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

Hope this helps, just keep away from me when I'm trying to run it :D

Guest

Post by Guest » Thu Oct 16, 2003 5:42 pm

Insanitywiz - Im working on a new revamped version of a way to chantkite thats not nearly as detectable as this and I think it will work fiarly well but im not sure if you wanna hlep send me a pm or an aim ill let ya know how it's gunna work. Im also gunna try to make a twist macro that uses no delay or timers and I think I can do it and it will be much more effective for everyone that plays a bard if I get it to work.