advchant.mac - Advanced Chant REV7

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

Moderator: MacroQuest Developers

Glytch
a lesser mummy
a lesser mummy
Posts: 36
Joined: Sat Dec 27, 2003 9:22 am

Post by Glytch » Thu Jan 29, 2004 2:57 am

I love the idea of this macro and started a bard just to test it out and have alittle fun playing with it . On every occassion i try to kite my dots dont seem to reach them. my radious is set at 40 but have exparimented with 10 - 70 i am a lvl 23 at this point and have been kiteing rock hoppers with very little success. I would debug the macro but it works fine. It might be that i dont know enough obout the bard class. How can you increase your range? i have read above and know that 40 seems to be the optimum radius. I have created a half -elf so some of the problems that have been mentioned above have not applied to me ( or atleast i havent goten to the point to actually see) Is there any advise from the more experienced advchant macro runners out there. I have been useing cod, and ddd for my Dots with a brass instrument. Im sure its just me over looking something small. But any help would be greatly appriciated .




P.S.
I blame my horrible spelling on my keyboard :lol:

El
a ghoul
a ghoul
Posts: 108
Joined: Mon Dec 29, 2003 12:34 pm

Post by El » Thu Jan 29, 2004 11:35 am

I've not gotten 6a to work, personally. I've been using 5c. I've included it here.

Note that the calling syntax is different than 6a, and I never really got it to work reliably with lvl 6 selos. I just used sow potions and things were fine.

My calling syntax was:

Code: Select all

/macro advchant 123 0 40 4
where 1 & 2 were my ae dots, 3 was selos, 40 was the radius, and 4 is my hymn. Even so, you can't just run this macro unattended when ae kiting, I would typically start and stop it to adjust my position regularly so that I didn't run into things. Also, I had several versions of this hotkeyed: one with 30 radius, one with 35 and the one with 40. I switched between them as needed, although I used 40 for most things.

Code: Select all

| - chant.mac - By Raebis 
| Version: REV5c Jan 03 15:00 
| 
| This mac is used mostly for big open zones with not a lot of 
| big hills (cause hills cause pain - unless you have levitate) 
| 
| Features:------------------------------------------------------------------------ 
| 
| * Automatically selects high light blue, dark blue, or white mob 
| * Runs to mob before targeting it (Stealth! No cross-zone targeting!) 
| * Aggro/Add Detection: Automatically targets and kites aggroed mobs (adds) 
| * Ignores greens and low light blues unless they are aggroed (adds) 
| * Caster Detection: Automatically will switch target to aggroed casting mobs 
| * Compatible with level 49 and level 6 selos 
| * Auto Healing: If health gets low, it will automatically heal 
| * Fleeing Mob Catcher: If mob runs away, macro keeps you in range! 
| * Detects WMS (Warping Mob Syndrom) and gets a new target if a mob warps away! 
| * NEW: Rubber Anchor: kites mobs closest to macro starting point - no wandering! 
| 
| --------------------------------------------------------------------------------- 
| 
| usage: chant.mac <DOTs/LVL6 Selos> <49selo> <radius> [<heal song>] 
| 
| 
| Usage Examples: 
|  -Scenario 1: If you are using... 
|   ...DOTs in Gems 4, 5, 6, and 7 
|   ...Level 49 Selo in Gem 2 
|   ...Hymn of Restoration in Gem 1 
|   ...Radius of 55 
|   syntax: /mac chant 4567 2 55 1 
| 
|  -Scenario 2: If you are using... 
|   ...DOTs in Gems 6 and 7 
|   ...Level 6 Selo in gem 3 
|   ...Hymn of Restoration in gem 8 
|   ...Radius of 80 
|   syntax: /mac chant 673 0 80 8 
|  
| 
| If <heal song> is defined then when health goes below @HealthMin (default is 70%) 
| it will replace the first song in <DOTs> with <heal song> until health is above 
| @HealthMax (default is 85%) 
| 
| If <selo> is 0 then the macro will not try to cast selos every 150 seconds 
| 
| Note about the rubber anchor: 
|   The macro will target the mob closest to the RubberAnchor (your /loc when first 
|   starting the macro) 
| 
| REV5b was Tested in EW for bout an hour 
| 
| Warning: You may wander from your starting point but after killing a mob, the 
|          next mob that the macro targets will be closest to your starting point 
| 
| Note: Rev information moved to the top 
| 

#event NeedTarget "You must first select a target for this spell!" 
#event Exp        "You gain " 
#event Died       "You have entered" 
#event Caster     " begins to cast a spell." 

#turbo 

Sub Main(DOTs,Selos,CRadius,Health) 
   /zapvars 

   /if $defined(CRadius)==false { 
      /echo usage: chant.mac <DOTs, LVL6 Selos> <49selo> <radius> [<heal song>]  
      /return 
   } 

   /declare CirR global 

   /declare Songs array 
   /declare nSongs global 
   /declare CurSong global 
   /declare PrevSong global 

   /declare Exper global 
   /declare AAExp global 

   /declare SongTimer timer 
   /declare SeloSong global 

   /declare HealSong global 
   /declare OrigSong global 

   /declare HealthMin global 
   /declare HealthMax global 

   /declare DBLevel global 

   /declare TargetUpNext global 

   /declare RubberX global 
   /declare RubberY global 

   /declare EachSong local 

   /varset nSongs $strlen(@DOTs) 
   /for EachSong 1 to @nSongs 
      /varset Songs(@EachSong) $mid($calc(@EachSong-1),1,@DOTs) 
      /echo Song @EachSong: $char(gem,@Songs(@EachSong)) 
   /next EachSong 

   /if n @Selos!=0 { 
      /varset SeloSong @Selos 
      /echo Selo's: $char(gem,@SeloSong) 
   } else { 
      /varset SeloSong 0 
      /echo Not using level 49 Selos. 
   } 

   /if $defined(Health)!=false { 
      /varset HealSong @Health 
      /echo Healsong: $char(gem,@HealSong) 
   } else { 
      /echo No HealSong. Please watch your health. 
      /varset HealSong 0 
   } 

   /varset CirR @CRadius 
   /echo Radius: @CRadius 

   /varset OrigSong @Songs(1) 
   /varset CurSong 1 
   /varset Exper $char(exp) 
   /varset AAExp $char(aa,exp) 
   /varset SongTimer 1 

   /varset DBLevel $int($calc($calc($char(level)*.7)+1)) 

   /varset HealthMin 70 
   /varset HealthMax 85 

   /varset TargetUpNext 0    
  
   /varset RubberX $char(x) 
   /varset RubberY $char(y) 

   /echo Rubber Anchor dropped at @RubberX,@RubberY 

:Loop 

   /if n @TargetUpNext<=0 /if n $target(id)<=0 { 
      /call gettarget 
   } 

   /if n @TargetUpNext>0 /if n $target(id)>0 { 
      /echo User Selected Target or Aggroed while running 
      /varset TargetUpNext 0 
   } 

   /if n $target(distance)>1000 /if n $target(hp,pct)<=50 { 
      /cleanup 
      /echo Target Warped... Getting a new target 
      /call GetTarget 
   } 

   /if n @HealSong!=0 /if n $char(hp,pct)<@HealthMin { 
      /if n @Songs(1)!=@HealSong { 
         /echo Healing On - Health: $char(hp,pct)% to @HealthMax% 
         /varset Songs(1) @HealSong 
      } 
   } 

   /if n @HealSong!=0 /if n $char(hp,pct)>=@HealthMax { 
      /if n @Songs(1)!=@OrigSong { 
         /echo Healing Off 
         /varset Songs(1) @OrigSong 
      } 
   } 
   /if n @SeloSong!=0 /if $char(casting)==FALSE /if n $char(buff,"$char(gem,@SeloSong)")==0 /varset SongTimer 1 
   /if n @SongTimer>0 /if $char(casting)==FALSE /call SongFailed 
   /call Circ 
   /doevents 
   /delay 0 
   /goto :Loop 
/return 

Sub Event_Timer(TimerName) 
   /if @TimerName==SongTimer { 
      /if n @SeloSong!=0 /if n $char(buff,"$char(gem,@SeloSong)")==0 { 
         /delay 2 
         /stopsong 
         /cast @SeloSong 
         /varset PrevSong 0 
         /varset SongTimer 30 
         /call Circ 
         /doevents 
         /return 
      } 

      /if n @SeloSong!=0 /if n $char(buff,"$char(gem,@SeloSong)")!=0 /if n $char(buff,$char(buff,"$char(gem,@SeloSong)"),duration)<=6 { 
         /delay 2 
         /stopsong 
         /cast @SeloSong 
         /varset PrevSong 0 
         /varset SongTimer 30 
         /call Circ 
         /doevents 
         /return 
      } 

      /delay 2 
      /stopsong 
      /cast @Songs(@CurSong) 
      /varset PrevSong @CurSong 
      /varadd CurSong 1 
      /varset SongTimer 30 
      /call Circ 
      /doevents 
      /if n @CurSong>@nSongs /varset CurSong 1 
   } 
/return 

Sub Circ 
   /declare CirX local 
   /declare CirY local 

   /if n @TargetUpNext!=0 { 

      /varset CirX $spawn(@TargetUpNext,y) 
      /varset CirY $spawn(@TargetUpNext,x) 

      /if n $spawn(@TargetUpNext,distance)<=$calc(@CirR*2) { 
         /target id @TargetUpNext 
         /varset TargetUpNext 0 
      } 
   } 

   /if n $target(id)>0 { 
      /varset CirX $target(y) 
      /varset CirY $target(x) 
   } 

   /if n $distance(@CirX,@CirY)<$calc(@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 SongFailed 
   /if n @PrevSong==0 { 
      /varset SongTimer 1 
      /return 
   } 
   /varset CurSong @PrevSong 
   /varset SongTimer 1 
/return 

Sub Event_NeedTarget 
   /if n @TargetUpNext<=0 /call GetTarget 
/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 EXP: @Exper%:$char(exp)% - AAXP: @AAExp%:$char(aa,exp)% - $calc($running/60) minutes 

   /varset Exper $char(exp) 
   /varset AAExp $char(aa,exp) 

   /varset DBLevel $int($calc($calc($char(level)*.7)+1)) 

   /if n @TargetUpNext==0 /if n $target(id)==0 /call gettarget 
/return 

Sub GetTarget 
   /declare MobID local 
   /declare SRadius local 
   /varset MobID $searchspawn(npc,radius:$calc(@CirR*2)) 
   /if n @MobID!=0 /if n $spawn(@MobID,speed)>100 { 
      /target id @MobID 
      /echo Kiting aggro'd mob: $target(name,clean) 
      /return 
   } 
   /varset MobID 0 
   /for SRadius 0 to 10000 step 100 
      /varset MobID $searchspawn(npc,range:@DBLevel:$char(level),loc:@RubberX:@RubberY,radius:@SRadius) 
      /if n @MobID!=0 { 
         /goto :Done 
      } 
   /next SRadius 
   /echo No mobs found, action required! 
   /beep 
   /echo Ending Macro 
   /beep 
   /endmac 
:Done 
   /varset TargetUpNext @MobID 
   /echo Next: $spawn(@MobID,level) $spawn(@MobID,name,clean) - Distance: $spawn(@MobID,distance) 
/return  

Sub Event_Caster(CastText) 
   /declare CasterID local 
   /varset CasterID $searchspawn(name,"$left($calc($strlen("@CastText")-24),"@CastText")") 
   /if $spawn(@CasterID,type)!=NPC /return 
   /if n $target(id)==@CasterID /return 
   /if n $spawn(@CasterID,distance)<=$calc(@CirR*2) { 
      /target id @CasterID 
      /echo Targeting Caster: $spawn(@CasterID,name,clean) 
   } 
/return

Jabber
a lesser mummy
a lesser mummy
Posts: 32
Joined: Sat Aug 23, 2003 2:45 pm

Post by Jabber » Fri Jan 30, 2004 10:11 am

This macro is quite good, but the only problem i have with it is that it seems to wander still. It would be nice if the macro pulled the mob(s) back to the rubber point and started kiting it there.

Jab.

Space-Boy
a hill giant
a hill giant
Posts: 242
Joined: Wed Dec 04, 2002 12:53 pm
Contact:

Post by Space-Boy » Mon Feb 09, 2004 10:44 am

this is just such a good macro that i had to bump it
You have gotten better at Carpal Tunnel! (247)

BrainDozer
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sun Aug 03, 2003 2:10 pm

Post by BrainDozer » Mon Feb 09, 2004 11:48 pm

I used REV5c, but usually wiped out within an hour when kiting high level zones. So, I spent this weekend making some pretty big changes to REV6a.

My last chanting session finished without crash, death, or user intervention in any way for 18 hours straight. It finally quit when the servers came down.

El
a ghoul
a ghoul
Posts: 108
Joined: Mon Dec 29, 2003 12:34 pm

Post by El » Tue Feb 10, 2004 12:31 pm

So, what did you change?

I found 3 fundamental problems with this script:

1. It wanders too much, and has no collision detection for objects and zonelines. If I'm not watching closely, I'll either get hung up on something or wander into areas where I don't want to be.

2. Although it has exclusion routines, there are times when something agros and I want to drop everything and kill that specific thing. Goranga hunters are a good example in ME... one root can really ruin your day.

3. Level 6 Selos never really did work correctly. Too often it would drop at inopportune moments. I've leveled past that point now, but for any bard less than 49th level, you'd be wise not to rely on Selos.

BrainDozer
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sun Aug 03, 2003 2:10 pm

Post by BrainDozer » Tue Feb 10, 2004 1:40 pm

In addition to some debugging and logic fixes, my version has three main additions:

Auto Dislodge: Attempts to jolt free if stuck in a tree or rock.
Static Anchor: Kites around a static point - zero wandering .
Mob Avoidance: Dodges most damage and stuns from wandering mobs.

With some other stuff for changing settings on the fly, as well as debugging and logging options. Needs more polish, and there are still bugs, but it's quite stable atm. I'll be posting it soon.

Glytch
a lesser mummy
a lesser mummy
Posts: 36
Joined: Sat Dec 27, 2003 9:22 am

Post by Glytch » Tue Feb 10, 2004 10:34 pm

Can you post the code you use now Brain.

PhoenixZorn
Macro Czar
Posts: 127
Joined: Fri Dec 12, 2003 2:20 pm
Contact:

Post by PhoenixZorn » Wed Feb 11, 2004 2:12 am

BrainDozer, I'm sure all of us ChantCrack whores would love to see your code. If you aren't too shy about sharing it, do feel free to post it here, and do comment out your additions so we know where to give you credit...

I know I'm looking forward to seeing it... an 18 hour kite would be nice for my 35 bard playing in TD on spiroks. =)

PhoenixZorn
Macro Czar
Posts: 127
Joined: Fri Dec 12, 2003 2:20 pm
Contact:

Post by PhoenixZorn » Wed Feb 18, 2004 2:39 am

bump... cuz it's too damn far down...

Raebis
a ghoul
a ghoul
Posts: 81
Joined: Fri Dec 12, 2003 6:23 am

rev7

Post by Raebis » Wed Feb 18, 2004 2:44 am

rev 7

posted feb 18 2004 23:45

Changelog:
i don't remember

test it out see if people get bugs... i think it has a better singing and selos' handling, but make note of any wierd targetting issues
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

El
a ghoul
a ghoul
Posts: 108
Joined: Mon Dec 29, 2003 12:34 pm

Post by El » Wed Feb 18, 2004 10:13 am

He's back! Welcome back!

Advari
decaying skeleton
decaying skeleton
Posts: 9
Joined: Thu Feb 19, 2004 1:03 pm

AE?

Post by Advari » Thu Feb 19, 2004 7:57 pm

Has anyone tested this with AE songs? Did the nerf bat hit too hard and make em useless for these purposes? When I get home tonight I will try running this new version for a few hours and post my findings. Any suggestions on a good spot to run at 47-50, E wastes is getting very light blue.

Advari

kasodo
a lesser mummy
a lesser mummy
Posts: 64
Joined: Fri Feb 13, 2004 9:41 am

47-50

Post by kasodo » Fri Feb 20, 2004 2:30 am

I'm finding 47-50 in BW is going fairly fast. Chant of Flame resists a lot so put that as first dot so when you heal its the one thats dropped and not an important one.

AE songs are very hard to get to work in either BW or EW because the animals have a large hit range whereas your AE dots do not....

kasodo
a lesser mummy
a lesser mummy
Posts: 64
Joined: Fri Feb 13, 2004 9:41 am

Few minor things

Post by kasodo » Fri Feb 20, 2004 8:46 pm

Sometimes it will target the mobs corpse and try to kill it then it finds a new target eventually...

It did try to kite a lvl 61 PC once had to endmac and restart...

SSB functionability would be nice to have....

still wanders a lil bit from rubber anchor, other than that ive had 8 hour runs without a problem.

Very good lvl 5 Selos handling very good...