AFCleric.mac - Cleric automation macro (updated Aug 24th)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Thu Aug 12, 2004 1:17 pm

made some changes to spell_routines.inc recently. gonna put in a quick fix for interrupt so you can set different modes. noInterrupt 0 will intertupt if not mounted, and if mounted it will dismount only if cast time is greater than 7 seconds. if it's less than 7, it will only move to interrupt if the spell has a recast time greater than 3 seconds. gonna change it that noInterrupt 1 will only interrupts if not mounted... so in macros like this it should be fine to just keep noInterrupt set to 1 (which you would declare at the top of the macro, not in the include file)

gonna work on this now, then post the new code in the snippet forum once im done.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Aug 12, 2004 1:23 pm

Cool thanks.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Thu Aug 12, 2004 6:32 pm

fantum once again i say thanx for this macro .. but i was wondering is there any way that i can make it check for tanks target and then cast mok and retarget tank ? atm i have a hot button with :
/mqpause
/pause 1 , /assist <<tanksname>>
/pause 3 , /cast 7 << mok spell >>
/mqpause

this works but just curious where would i put in macro to do this automatically on every pull ?

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Thu Aug 12, 2004 6:56 pm

You using HoTT to know when mobs change? Or you would want to /assist tank every so many seconds and in between heals to see if its a new mob and within range? It would also be possible to lay MoK on ${NearestSpawn[npc radius 100]} or something. You'd have to be careful of it either way.
Other way to do it would be make it respond to a hotkey or chat command to assist tank, verify target, mok, then resume duties.

Any number of ways is possible.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Fri Aug 13, 2004 1:20 am

not useing hott . just basically wanted to make it cast when mt has a target i have the breastplate from pog i forget the name.

i tried to night to make a hot button that would cast the bp after pauseing macro it didnt work . what i ended up doing was :

/mqpause
/assist Tank
/g casting Mok on %t
/pause 93
/mqpause

that was hot button 1 and hot buttun 2 was the bp ..

i hit button 1 then button 2 it worked .,. good enough but was still iffy .

i tried to put /casll cast "chestplat of bla bla bla" item and
/cast item "chestplat of bla bla bla"
but it didnt work oh well ..

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Sat Aug 14, 2004 3:07 am

OK, DumbStruck. I had some idle time while servers went down today, and I wanted to do something different, so I made an optional inc file that you can "plug-in" to AFCleric.mac to make it automatically MOK mobs for you. Here it is:

Code: Select all

|** mokaddon.inc (for AFCleric.mac)

NEEDS THESE FOUR LINES ADDED TO AFCleric.mac:

1)beginning of mac, before Sub Main put:
#include mokaddon.inc

2)beginning of mac, in the declares section put:
   /declare mokaddon int outer 1

3)middle of Sub Healgroup, right below the line that is <         /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet>
         /if (${mokaddon}==1) /if (${Target.ID}==${tanknameid}) /call AutoMOK

4)end of Sub Healgroup, right above the /return line put:
   /if (${mokaddon}==1) /call AutoMOK


Configuration/variable definitions:
   mokspell is item that casts MOK. To use a spell instead, replace <"Chestplate of Stability" item> with <"Mark of Kings" spell> or whatever you're using
   mokmaxrange is max distance a mob can be to cast MOK
   mokduration (seconds x10) before cleric will re-MOK a given mob
   mokmaxcount is max number of mobs, within mokaddrange radius. If more than specified number of mobs within specified radius, cleric will skip MOK and just heal
   mokmaxhealth is max HP mob can have to trigger MOK, mokminhealth is minimum
   mokminmana is min mana cleric must have before casting MOK
   mokretrylimit is number of casts before giving up MOK
Once you've added those 4 lines to the main macro, then reviewed/edited variables in this inc as above, your GTG 

FaNTuM's mokaddon.inc v1.0  **|




Sub AutoMOK
|EDIT THESE VARIABLES AS NEEDED
   /if (!${Defined[mokspell]}) /declare mokspell string outer "Chestplate of Stability" item
   /if (!${Defined[mokmaxrange]}) /declare mokmaxrange int outer 100
   /if (!${Defined[mokduration]}) /declare mokduration int outer 1800
   /if (!${Defined[mokmaxcount]}) /declare mokmaxcount int outer 5
   /if (!${Defined[mokaddrange]}) /declare mokaddrange int outer 50
   /if (!${Defined[mokmaxhealth]}) /declare mokmaxhealth int outer 95
   /if (!${Defined[mokminhealth]}) /declare mokminhealth int outer 30
   /if (!${Defined[mokminmana]}) /declare mokminmana int outer 50
   /if (!${Defined[mokretrylimit]}) /declare mokretrylimit int outer 5
|END EDITING


|Internal use defines
   /if (!${Defined[mokretrycount]}) /declare mokretrycount int outer 0
   /if (!${Defined[mokmobida]}) /declare mokmobida int outer 0
   /if (!${Defined[mokmobidb]}) /declare mokmobidb int outer 0
   /if (!${Defined[mokmobidc]}) /declare mokmobidc int outer 0
   /if (!${Defined[mokmobidd]}) /declare mokmobidd int outer 0
   /if (!${Defined[mokmobide]}) /declare mokmobide int outer 0
   /if (!${Defined[moktemptargetid]}) /declare moktemptargetid int outer 0
   /if (!${Defined[moktemptargetname]}) /declare moktemptargetname string outer NULL
   /if (${Me.PctMana}<${mokminmana}) /return
   /if (${NearestSpawn[${Math.Calc[${mokmaxcount}+1]}, NPC].Distance}<${mokaddrange}) /return
   /if (${moktemptargetid}!=0) /if ((!${Spawn[${moktemptargetid}].ID})||(${String[${Spawn[${moktemptargetid}].Name}].NotEqual[${moktemptargetname}]})) {
      /varset moktemptargetid 0
      /varset mokretrycount 0
      /varset moktemptargetname NULL
   }
   /if ((!${Spawn[${mokmobida}].ID})||(${Spawn[${mokmobida}].Type.Equal[corpse]})) /varset mokmobida 0
   /if ((!${Spawn[${mokmobidb}].ID})||(${Spawn[${mokmobidb}].Type.Equal[corpse]})) /varset mokmobidb 0
   /if ((!${Spawn[${mokmobidc}].ID})||(${Spawn[${mokmobidc}].Type.Equal[corpse]})) /varset mokmobidc 0
   /if ((!${Spawn[${mokmobidd}].ID})||(${Spawn[${mokmobidd}].Type.Equal[corpse]})) /varset mokmobidd 0
   /if ((!${Spawn[${mokmobide}].ID})||(${Spawn[${mokmobide}].Type.Equal[corpse]})) /varset mokmobide 0
   /target id ${tanknameid}
   /if (${Target.ID}==${tanknameid}) {
      /assist
      /delay 5 ${Target.Type.Equal[NPC]}
      /if (${Target.ID}==${tanknameid}) {
         /assist
         /delay 5 ${Target.Type.Equal[NPC]}
      }
      /if (${Target.Type.NotEqual[npc]}) /return
      /if ((${Target.ID}==${mokmobida})||(${Target.ID}==${mokmobidb})||(${Target.ID}==${mokmobidc})||(${Target.ID}==${mokmobidd})||(${Target.ID}==${mokmobidd})) /return
      /if (!${Target.LineOfSight}) /return
      /if (${Target.Distance}>${mokmaxrange}) /return
      /if (${Target.Type.Equal[NPC]}) /delay 3
      /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=${mokmaxhealth})&&(${Target.PctHPs}>=${mokminhealth})) {
         /if (${Target.ID}!=${moktemptargetid}) {
            /varset moktemptargetid ${Target.ID}
            /varset moktemptargetname ${Target.Name}
            /varset mokretrycount 0
         }
         /if (${mokretrycount}>=${mokretrylimit}) /return
         /call Cast ${mokspell} 2s
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
            /varset moktemptargetid 0
            /varset moktemptargetname NULL
            /varset mokretrycount 0
            /if (${mokmobida}==0) {
               /varset mokmobida ${Target.ID}
               /timed ${mokduration} /varset mokmobida 0
            } else /if (${mokmobidb}==0) {
               /varset mokmobidb ${Target.ID}
               /timed ${mokduration} /varset mokmobidb 0
            } else /if (${mokmobidc}==0) {
               /varset mokmobidc ${Target.ID}
               /timed ${mokduration} /varset mokmobidc 0
            } else /if (${mokmobidd}==0) {
               /varset mokmobidd ${Target.ID}
               /timed ${mokduration} /varset mokmobidd 0
            } else /if (${mokmobide}==0) {
               /varset mokmobide ${Target.ID}
               /timed ${mokduration} /varset mokmobide 0
            }
            /return
         }
         /if ((${Macro.Return.Equal["CAST_NOTREADY"]})||(${Macro.Return.Equal["CAST_CANNOTSEE"]})||(${Macro.Return.Equal["CAST_INTERRUPTED"]})||(${Macro.Return.Equal["CAST_CANCELLED"]})) /return
         /varcalc mokretrycount ${mokretrycount}+1
      }
   }
/return
As explained in the beginning of it, you'll have to add those 4 lines to AFCleric.mac to get it to work. Of those 4 lines you have to add, the third is hard to read, so here it is to clarify. You will change

Code: Select all

   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
      }
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
         /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet
         /if (${Me.PctMana}<=98) /call MedTime
      }
      /call CheckEvents
      /return
   }
into this

Code: Select all

   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
      }
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
         /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet
         /if (${mokaddon}==1) /if (${Target.ID}==${tanknameid}) /call AutoMOK
         /if (${Me.PctMana}<=98) /call MedTime
      }
      /call CheckEvents
      /return
   }
Edit: fixed MOK duration variable
Last edited by fantum409 on Sat Aug 14, 2004 7:58 pm, edited 1 time in total.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Aug 14, 2004 9:04 am

Nice work. Even if I can't use it. My poor cleric has been lvl 36 for a long long time. lol
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Sat Aug 14, 2004 10:10 am

aChallenged1 wrote:Nice work. Even if I can't use it. My poor cleric has been lvl 36 for a long long time. lol
what are u talking about man .. hehe your cleric have ch yet ? then its golden just change the spell variables in the begining if changing the buff spells with in code is too much trouble leave them like that just dont use but this macro by far is one of the best macros i have used PERIOD ..

fantum im one of his biggest fans ..hehe very nice macro

Fantum Ty man .. i will test when i get home and leave ya feedback .

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Aug 14, 2004 10:20 am

Nope, not Complete Heal at 36. Think first is at 44, and he's a backburner character. May have to change that and play him more.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

TrippyTom
a lesser mummy
a lesser mummy
Posts: 75
Joined: Sun May 30, 2004 10:18 am

Post by TrippyTom » Sat Aug 14, 2004 4:44 pm

Yeah man, My cleric is only 34 and I use this macro. It rocks! All you have to do is edit it to use the spells you currently have. Change the names of the spells for your needs.

It's awesome.

I don't like playing my cleric (prefer melee chars more) but when I wanna level up my cleric and do nothing but watch the fun, I load this up and sit back and smile.
May the eclipse of your soul never fade to light!

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Sat Aug 14, 2004 9:11 pm

Fantum some feedback ..

Group make up .. 58 cleric (thank you fantum) 55 - 58 in 4 days !!
64 shaman
64 warrior
63 beastlord
60 druid and 65 monk .

monk would pull mob fd warr starts to tank CoS starts to cast lands on mob . retargets warr and switches between the mob and warr a few times specially if mob is below 40 % more or less . If it was resisted as long as tank isnt below ch threshold it will keep casting till it lands

nicely done addition ty .

dont know why it casts more then once / mob if it sticks but its a pretty effective addidtion .

Playing my main necro in time and group with cleric in pov on 1 cpu man i love mq .. and this macro .

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Sat Aug 14, 2004 10:30 pm

Thanks for the feedback DumbStruck, glad its working well for you.

My guess is that the MOK timer is running out, try setting a few more deci-seconds. Default is 1800, or 3 mins. Think default duration of MOK is 3.5mins. Maybe you dont want it to ever recast. If so, just make timer a very high number.

If you do that, and are sure it is recasting on a mob that was successfully MOK'd, post it and I'll look it over again.

Enjoy

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Sat Aug 14, 2004 11:31 pm

Got a chance to check the pet healing option this weekend. Works perfectly. I did my best to fool the script and get my pet killed, he kept him healed each time.

Thanks for new feature :)
Slice

episix
orc pawn
orc pawn
Posts: 18
Joined: Wed Aug 18, 2004 1:44 pm

Post by episix » Wed Aug 18, 2004 1:47 pm

I know it's a bit late to say it, but I love this macro, great work.

Was just wondering b/c of the recent spell interrupt issue that maybe you thought about adding something to summon mount if not mounted.

/shrug ~ just an idea ;)

Thanks again.

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Wed Aug 18, 2004 6:23 pm

episix wrote:I know it's a bit late to say it, but I love this macro, great work.

Was just wondering b/c of the recent spell interrupt issue that maybe you thought about adding something to summon mount if not mounted.

/shrug ~ just an idea ;)

Thanks again.


when i had that problem with mount fantum told me add
/declare automount int outer 1
and that fixes it when not mounted will cast mount im sure some where in code will have to change to kind of mount u have