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

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

Post by ml2517 » Mon Dec 22, 2003 3:40 pm

The target syntax would probably be this:

Code: Select all

/if n $target(hp,pct)<=15 /if n $target(distance)>2000 {
   /cleanup
   /call gettarget
}

User avatar
wilso132
Contributing Member
Contributing Member
Posts: 106
Joined: Thu Oct 17, 2002 11:53 am

Post by wilso132 » Mon Dec 22, 2003 4:26 pm

The above code seems to work perfectly, I just added in an echo command on mine to test it.

Code: Select all

/if n $target(hp,pct)<=15 /if n $target(distance)>2000 { 
/cleanup 
/echo Target warped, acquiring another
/call gettarget 
   } 

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

Post by Raebis » Mon Dec 22, 2003 4:40 pm

do you encounter any problems with the mob commin back to get ya?

also does it seem that every mob that warps across the zone ends up in the same place? ie the mob fell through the ground and was returned to safepoint type thing?
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

User avatar
wilso132
Contributing Member
Contributing Member
Posts: 106
Joined: Thu Oct 17, 2002 11:53 am

Post by wilso132 » Mon Dec 22, 2003 5:07 pm

They tend to warp to one of three spots, but lose aggro in doing so.

Edit: Also if you want to use in a hill with zones, you can either build a timer for levitate (pretty easy) or just take the really easy way out and twist it in as one of your songs.

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

Post by Raebis » Mon Dec 22, 2003 6:25 pm

levi is a 3 second song so it would make sense to put it in the dot block

however i wouldn't reccoment putting level 6 helos or levi song in dotslot 1 if you have a healsong specified... healsong will replace whatever song is in dotslot 1 when health gets too low
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

User avatar
wilso132
Contributing Member
Contributing Member
Posts: 106
Joined: Thu Oct 17, 2002 11:53 am

Post by wilso132 » Mon Dec 22, 2003 9:03 pm

After the servers went down today mobs are no longer warping on me, but I did noticed one problem. The heal function. It works correctly in that it starts healing... but it seems like it forgets to go all the way back up to 85, because it only does one tic of it.

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

Post by Raebis » Mon Dec 22, 2003 9:21 pm

I will take a look into that a little later... need some sleep now..... check in game make a hotbutton with /echo $char(health,pct) and start tapping it and see what kind of resultsyou get form it


somone told me that charinfo was messed up but i don't remember who
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

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

Post by ml2517 » Mon Dec 22, 2003 9:26 pm

Hmm I was looking at the healing portion of your code. Not totally sure but I think you could simplify it a bit like this:

From this:

Code: Select all

   /if $defined(HealSong)!=false /if n @SeloTimer<1460 {
      /if n $char(hp,pct)<@HealthMin {
         /varadd HealthCount 1
         /varset HealthCountt 0
         /if n @HealthCount>=5 {
            /varset HealthCount 5
            /if n @Songs(1)!=@HealSong {
               /echo Healing On - Health: $char(hp,pct)% to @HealthMax%
               /varset Songs(1) @HealSong
            }
         }
      } else {
         /varadd HealthCountt 1
         /varset HealthCount 0
         /if n @HealthCountt>=5 {
            /varset HealthCountt 5
            /if n @Songs(1)!=@OrigSong {
               /echo Healing Off
               /varset Songs(1) @OrigSong
            }
         }
      }
   }
To this:

Code: Select all

   /if $defined(HealSong)!=false /if n @SeloTimer<1460 {
      /if n $char(hp,pct)<@HealthMin {
            /if n @Songs(1)!=@HealSong {
               /echo Healing On - Health: $char(hp,pct)% to @HealthMax%
               /varset Songs(1) @HealSong
            }
      } else /if n $char(hp,pct)>@HealthMax {
            /if n @Songs(1)!=@OrigSong {
               /echo Healing Off
               /varset Songs(1) @OrigSong
            }
         }
      }

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

Post by Raebis » Tue Dec 23, 2003 12:33 am

ml2517 - at first i used code very very similar to your code until i discovered a MQ2 bug:

Every once in a while (maybe 1 in 4) that $char(hp,pct) was read, it would give a bogus value that was very much lower than the actual health.

I couldn't have the mac switching out the healsong everytime a bogus # was thrown out so i wrote a counter to make sure that if the health was low, it would have to be low 5 times in a row before it would turn on the healing... same way while regenerating... the mac has to have 5 sequential $char(hp,pct) above 85 to turn off the healsong

I talked to lax a little about it and he said that he would get on a dev to look into it and get it fixed so the short version of this code would work


i am thinking about implementing the pct formula from curr and max, like this:

Code: Select all

   /if $defined(HealSong)!=false /if n @SeloTimer<1460 { 
      /if n $calc($calc($char(hp,cur)/$char(hp,max))*100)<@HealthMin { 
         /if n @Songs(1)!=@HealSong { 
            /echo Healing On - Health: $char(hp,pct)% to @HealthMax% 
            /varset Songs(1) @HealSong 
         } 
      } else /if n $calc($calc($char(hp,cur)/$char(hp,max))*100)>@HealthMax { 
         /if n @Songs(1)!=@OrigSong { 
            /echo Healing Off 
            /varset Songs(1) @OrigSong 
         } 
      } 
   } 
Last edited by Raebis on Tue Dec 23, 2003 12:37 am, edited 1 time in total.
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

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

Post by ml2517 » Tue Dec 23, 2003 12:36 am

Ok instead of:

Code: Select all

$char(hp,pct)
We should be able to use:

Code: Select all

$calc($calc($char(hp,cur)/$char(hp,max))*100)

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

Post by Raebis » Tue Dec 23, 2003 12:48 am

Ok thanks ml2571 for the help with that and helping me make this health issue idea become a reality.

I updated the macro with the code above - elminating the need for 2 variables. Nice little enhancement.

The newest REV version is: (and yes i know i've had plenty of time to test it but holiday seasons are upon us)

REV4nt Dec 22 22:45 - plz check and if your version is earler, please update.
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

MrSmallie
a hill giant
a hill giant
Posts: 167
Joined: Fri Oct 11, 2002 11:18 am

Post by MrSmallie » Sat Dec 27, 2003 12:12 am

I'm a little confused. This is my first time playing a Bard, so I'm sure that's the problem....

I have the lvl2 DoT in gem 2, Selos in gem 5, healing in gem 6.

/mac chant 25 0 55 6

It chooses a mob, and then stands in one place repeatedly changing songs.

What should I look for, or what else can I tell you?
Me
[img]http://home.comcast.net/~mrsmallie/ches.JPG[/img]

nokternal
orc pawn
orc pawn
Posts: 18
Joined: Sun Dec 21, 2003 10:07 pm

Post by nokternal » Sat Dec 27, 2003 12:15 am

Hit the AutoRun button or press forward, the macro will change songs for you on the mobs.

MrSmallie
a hill giant
a hill giant
Posts: 167
Joined: Fri Oct 11, 2002 11:18 am

Post by MrSmallie » Sat Dec 27, 2003 12:41 am

Thanks. Got it working somewhat. This isn't real useful with only one DoT though :) But I look forward to trying it again at 18th.
Me
[img]http://home.comcast.net/~mrsmallie/ches.JPG[/img]

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

Post by ml2517 » Sat Dec 27, 2003 12:48 am

Btw: $char(hp,pct) was fixed recently by Lax to report correct. So that funky workaround can be changed back.