Moderator: MacroQuest Developers



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
}
}
/returnCode: 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
}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
}

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 ..aChallenged1 wrote:Nice work. Even if I can't use it. My poor cleric has been lvl 36 for a long long time. lol



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.