- Joined
- Jan 9, 2006
- Messages
- 826
- Reaction score
- 0
- Points
- 16
Plugin's
AFCleric.mac
AFCleric.ini
Code:
will update soon
AFCleric.mac
Code:
#Event GotHit "#*# YOU for#*#"
#Event MobDead "#*#You have slain#*#"
#Event MobDead "#*#has been slain by#*#"
#Event Zoned "#*#You have entered#*#"
#Event ImDead "You have been slain by#*#"
#Chat Chat
#Chat Tell
#Chat Group
#include spell_routines.inc
#include wait4rez.inc
#include irc.inc
Sub Main
|------------READ THIS SECTION AND EDIT IF NEEDED-----------|
/declare MasterList string outer "MASTERLIST"
/declare MasterOnly outer TRUE
/call IRCDeclares
/declare spellset string outer spells
/declare patchheal string outer Ancient: Hallowed Light
/declare patchhealgem string outer gem1
/declare healspell string outer Complete Healing
/declare healspellgem string outer gem2
/declare hotspell string outer Pious Elixir
/declare hotspellgem string outer gem3
/declare groupheal string outer Word of Replenishment
/declare grouphealgem string outer gem4
/declare daspell string outer Divine Barrier
/declare daspellgem string outer gem5
/declare yaulpspell string outer Yaulp VII
/declare yaulpspellgem string outer gem6
/declare mitigationspell string outer Panoply of Vie
/declare mitigationspellgem string outer gem7
/declare selfbuff string outer Armor of the Pious
/declare selfbuffgem string outer gem8
/declare grouplonghpbuff string outer Hand of Conviction
/declare grouplonghpbuffgem string outer gem9
/declare nukeone string outer Reproach
/declare nuketwo string outer Order
/declare stunone string outer Sound of Divinity
/declare stuntwo string outer Shock of Wonder
/declare spellhaste string outer Blessing of Devotion
/declare acbuff string outer Ward of Valiance
/declare longhpbuff string outer Conviction
/declare singlesymbuff string outer Symbol of Balikor
/declare groupsymbuff string outer Balikor's Mark
/declare spellhastebuff string outer Blessing of Devotion
/declare rgcspell string outer Remove Greater Curse
/declare AnnounceChannel string outer i say
/declare Verbose outer FALSE
/declare autohealmode int outer 3
/declare lootleft int outer 0
/declare healspellrange int outer 120
/declare patchhealrange int outer 200
/declare hotspellrange int outer 120
/declare groupspellrange int outer 100
/declare usegroupheal int outer 1
/declare usedivarb int outer 1
/declare healafterdivarb int outer 0
/declare announce int outer 1
/declare autosit int outer 1
/declare distancetosit int outer 40
/declare autointerrupt int outer 1
/declare onlyhealfd int outer 0
/declare interrupt2healself int outer 1
/declare interrupt2healselfhp int outer 40
/declare noInvis int outer 1
/declare defaultstophealpoint int outer 80
/declare healpetmode int outer 0
/declare pethealpoint int outer 65
/declare manatohealpet int outer 90
/declare pethealspell string outer Pious Light
/declare pethealspellrange int outer 200
/declare followid int outer
/declare meleeClasses string outer "Warrior/Shadow Knight/Paladin"
/declare casterClasses string outer "Cleric/Druid/Enchanter/Wizard/Magician"
/declare dpsClasses string outer "Rogue/Monk/Beastlord/Berserker"
/declare canniClasses string outer "Necromancer/Shaman"
/declare NoHotID[6] int outer 0
| Tweak Heals Here - tankhealpoint is for War/Pal/SK other
| than MT, casterhotpoint and casterpatchpoint refer to
| wiz/mag/enc/dru, necshmpatchpoint refers to necros and
| shamans, defaultpatchpoint refers to all other classes.
/declare selfhealpoint int outer 70
/declare dacastpoint int outer 29
/declare divarbpoint int outer 25
/declare interrupt2divarb int outer 20
/declare tankhealpoint int outer 65
/declare casterhotpoint int outer 85
/declare casterpatchpoint int outer 70
/declare necshmpatchpoint int outer 60
/declare defaultpatchpoint int outer 70
| ############ Self Buff List.
/declare SelfBuffRecheck int outer 600
/declare SelfBuffTimer timer outer 0
/declare SelfBuffTotal int outer 4
/declare SelfBuffMax1 int outer 20
/declare SelfBuff1 string outer Blessing of Devotion
/declare SelfBuffGem1 string outer gem9
/declare SelfBuffIcon1 string outer Blessing of Devotion
/declare SelfBuffMax2 int outer 20
/declare SelfBuff2 string outer Conviction
/declare SelfBuffGem2 string outer gem9
/declare SelfBuffIcon2 string outer Conviction
/declare SelfBuffMax3 int outer 20
/declare SelfBuff3 string outer Symbol of Balikor
/declare SelfBuffGem3 string outer gem9
/declare SelfBuffIcon3 string outer Symbol of Balikor
/declare SelfBuffMax4 int outer 20
/declare SelfBuff4 string outer Armor of the Pious
/declare SelfBuffGem4 string outer gem9
/declare SelfBuffIcon4 string outer Armor of the Pious
|**---------------------TrickyDA Config---------------------|
The following are HP buffs cleric will click off, in order,
to get above 40% HP and avoid low HP aggro. Clr will then
click off DA and resume duties, beg new buffs, etc. To
enable, set trickyda to 1, 0 will disable
|---------------------------------------------------------**|
/declare trickyda int outer 1
/if (${trickyda}) {
/declare intcount int outer 0
/declare trickybuff[20] string outer
/varset trickybuff[1] Virtue
/varset trickybuff[2] Hand of Virtue
/varset trickybuff[3] Conviction
/varset trickybuff[4] Hand of Conviction
/varset trickybuff[5] Focus of Soul
/varset trickybuff[6] Focus of the Seventh
/varset trickybuff[7] Wunshi's Focusing
/varset trickybuff[8] Talisman of Wunshi
/varset trickybuff[9] Protection of the 9
/varset trickybuff[10] Blessing of the Nine
/varset trickybuff[11] Steeloak Skin
/varset trickybuff[12] Blessing of Steeloak
/varset trickybuff[13] Symbol of Kazad
/varset trickybuff[14] Kazad`s Mark
/varset trickybuff[15] Symbol of Balikor
/varset trickybuff[16] Balikor's Mark
/varset trickybuff[17] Brell's Stalwart Shield
/varset trickybuff[18] Brell's Brawny Bulwark
/varset trickybuff[19] Spiritual Vigor
/varset trickybuff[20] Spiritual Vitality
}
|-------------------End TrickyDA Config---------------------|
/declare MovingCamp outer FALSE
/declare Following outer FALSE
/declare FollowName string outer
/declare StaticCamp outer TRUE
/declare askforbuffs outer TRUE
/declare HomeX int outer ${Me.X}
/declare HomeY int outer ${Me.Y}
/declare healpct int outer 50
/declare tanknameid int outer 0
/declare minorhurt int outer 0
/declare majorhurt int outer 0
/declare worsthurtid int outer 0
/declare worsthp int outer 100
/declare gmember int outer 0
/declare worsthurt string outer NULL
/declare worstclass string outer NULL
/declare nohotforua string outer NoOne
/declare nohotforub string outer NoOne
/declare nohotforuc string outer NoOne
/declare nohotforud string outer NoOne
/declare tankname string outer ${Target}
/declare DefaultMT string outer DEFAULTMT
/declare tankclass string outer
/declare rodwait int outer 0
/declare pallycount int outer 0
/declare stophealpoint int outer ${defaultstophealpoint}
/declare oomspam timer outer 600
/declare duckspam timer outer 100
/declare duckfdspam timer outer 400
/declare duckselfspam int outer 1
/declare nomtspam timer outer 300
/declare aetime int outer 0
/declare helpspam timer outer 50
/if (!${Target.ID} && ${Spawn[pc ${DefaultMT}].ID}) {
/varset tanknameid ${Spawn[pc ${DefaultMT}].ID}
/varset tankclass ${Spawn[pc ${DefaultMT}].Class.Name}
} else {
/varset tanknameid ${Target.ID}
/varset tankclass ${Target.Class.Name}
}
/if (${Defined[Param0]}) {
/varset healpct ${Param0}
} else {
/echo No Heal% specified, defaulting to 60%
}
/if (!${Defined[Param1]}) {
/echo Usage: /mac AFCleric % healspell
/echo Example: /mac AFCleric 40 Complete Heal
/echo Defaulting to ${healspell} at ${healpct}%
} else {
/if (!${Defined[Param2]}) {
/varset healspell ${Param1}
} else /if (!${Defined[Param3]}) {
/varset healspell ${Param1} ${Param2}
} else /if (!${Defined[Param4]}) {
/varset healspell ${Param1} ${Param2} ${Param3}
} else {
/varset healspell ${Param1} ${Param2} ${Param3} ${Param4}
}
}
/echo AFCleric Active, running in Autohealmode ${autohealmode}
/echo Casting ${healspell} on ${tankname} at ${healpct}% HP
/if (${autohealmode}==0) /echo ONLY ${tankname} will be healed
/if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed
/if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed
/if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group
/if (!${InvSlot[charm].Item.Name.Length} && !${InvSlot[chest].Item.Name.Length} && !${InvSlot[head].Item.Name.Length} ) /call Event_ImDead
/memspellset ${spellset}
:loop
/if (${GameState.Equal[CHARSELECT]}) /end
/if (!${Spawn[${tanknameid}].ID} || ${Spawn[${tanknameid}].Type.Equal[NPC]}) /call TankCheck
/if (!${Target.ID} || ${Target.ID}!=${tanknameid} && ${Spawn[${tanknameid}].Type.NotEqual[Corpse]} && ${Spawn[${tanknameid}].ID} && !${Spawn[${tanknameid}].Type.Equal[NPC]}) {
/target id ${tanknameid}
/delay 5 ${Target.ID} == ${tanknameid}
}
/doevents
/if (${Me.Invis} || ${Following} || ${Me.Buff[Divine Aura].ID} || ${Me.Buff[Sacred Barrier].ID} || ${Me.Buff[Divine Barrier].ID}) /goto :loop
/if (${Me.PctHPs} > ${selfhealpoint} && ${Me.PctMana} < 95) /call MedTime
/if (${Target.ID}==${tanknameid} && ${Target.Type.NotEqual[corpse]}) {
/if (${Target.Distance} <= ${patchhealrange} && ${Target.PctHPs} <= ${healpct}*.7 && ${Me.SpellReady[${patchheal}]}) {
/if (${announce}) /${AnnounceChannel} Casting "${patchheal}" on ${Target.CleanName} in ${Spell[${patchheal}].CastTime} seconds!
/call Cast "${patchheal}" ${patchhealgem} 0 CheckHP
}
/if (${Target.Distance} <= ${healspellrange} && ${Target.PctHPs}<= ${healpct} && ${Target.PctHPs} >= ${healpct}*.7 && ${Me.SpellReady[${healspell}]}) {
/if (${announce}) /${AnnounceChannel} Casting "${healspell}" on ${Target.CleanName} in ${Spell[${healspell}].CastTime} seconds!
/call Cast "${healspell}" ${healspellgem} 0 CheckHP
}
}
/if (!${autohealmode}) /goto :loop
/if (${autohealmode} == 1 && ${Me.PctHPs} <= ${selfhealpoint}) {
/call Healself
/goto :loop
}
/if (${autohealmode} >= 2) {
/if (${Me.PctHPs} <= ${selfhealpoint}) /call Healself
/call Healgroup
}
/if (${NearestSpawn[npc].Distance} > ${distancetosit} && !${SelfBuffTimer}) /call BuffSelf
/goto :loop
/return
Sub TankCheck
/if (${Spawn[${tanknameid}].Name.NotEqual[${tankname}]}) /varset tanknameid 0
/if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
/if (${SpawnCount[${tankname} ${tankclass}]}) {
/varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
/echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
}
/if (${SpawnCount[${tankname} ${tankclass}]}>1) {
/if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
/beep
/varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
/echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro
} else {
/beep
/echo Need to restart macro to correctly identify the MT
}
}
}
/if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) {
/if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
/varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
/echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro
}
}
/if (!${Spawn[${tanknameid}].ID} && !${nomtspam}) {
/e Warning No Designated MT is available
/varset nomtspam 300
}
/return
Sub Healself
/if (${usedivarb} && ${Me.PctHPs} <= ${divarbpoint}) /call Divarbcast
/if (${Me.PctHPs} > ${selfhealpoint} || ${Me.Buff[Divine Aura].ID} || ${Me.Buff[Sacred Barrier].ID} || ${Me.Buff[Divine Barrier].ID}) /return
/target myself
/delay 1s ${Target.ID} == ${Me.ID}
/if (${Me.PctHPs} < ${selfhealpoint} && ${Me.PctHPs} > ${dacastpoint}) {
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 0
}
/if (${Me.PctHPs} <= ${dacastpoint} && ${Me.AltAbilityReady[Sanctuary]}) {
/if (${announce}) /${AnnounceChannel} Sanctuary! Sanctuary!
/call cast "Sanctuary" alt
/delay 1s
/if (${Me.Buff[Sanctuary].ID}) {
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 0
}
} else /if (${Me.AltAbilityReady[Bestow Divine Aura]} && ${Me.PctHPs} <= ${dacastpoint}) {
/if (${announce}) /${AnnounceChannel} Bestowing Divine Aura on myself! NO HEALS FOR 30 SECONDS!
/call cast "Bestow Divine Aura" alt
} else /if (${Me.SpellReady[${daspell}]} && !${Me.Buff[Divine Aura].ID} && !${Me.Buff[Sacred Barrier].ID} && !${Me.Buff[Divine Barrier].ID} && ${Me.PctHPs} <= ${dacastpoint}) {
/if (${announce}) /${AnnounceChannel} Casting DA!! <<WARNING>> DA!! No Heals for 18 SECONDS
:retryda
/call Cast "${daspell}" 1s
/if (${Macro.Return.Equal[CAST_INTERRUPTED]}) /goto :retryda
/if ((${trickyda}==1)&&(${Me.Buff[${daspell}].ID})) /call TrickyDA
:dawait
/if (${Me.Buff[${daspell}].ID}) {
/delay 1s !${Me.Buff[${daspell}].ID}
/doevents
/goto :dawait
}
}
/return
Sub Healgroup
:healgroup
/varset worsthurt NULL
/varset worsthp 100
/varset worstclass NULL
/varset minorhurt 0
/varset majorhurt 0
/for gmember 0 to ${Group.Members}
/if (!${onlyhealfd}) {
/if (${Group.Member[${gmember}].Distance}<=${patchhealrange} && ${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
/varset worsthurt ${Group.Member[${gmember}].Name}
/varset worsthurtid ${Group.Member[${gmember}].ID}
/varset worsthp ${Group.Member[${gmember}].PctHPs}
/varset worstclass ${Group.Member[${gmember}].Class.Name}
}
} else {
/if (${Group.Member[${gmember}].Distance}<=${patchhealrange} && ${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
/if (!${Select[${Group.Member[${gmember]}.Class.ShortName}],MNK,NEC}) {
/varset worsthurt ${Group.Member[${gmember}].Name}
/varset worsthurtid ${Group.Member[${gmember}].ID}
/varset worsthp ${Group.Member[${gmember}].PctHPs}
/varset worstclass ${Group.Member[${gmember}].Class.Name}
} else /if (${Group.Member[${gmember}].State.Equal[feign]}) {
/varset worsthurt ${Group.Member[${gmember}].Name}
/varset worsthurtid ${Group.Member[${gmember}].ID}
/varset worsthp ${Group.Member[${gmember}].PctHPs}
/varset worstclass ${Group.Member[${gmember}].Class.Name}
}
}
}
/if (${Group.Member[${gmember}].PctHPs} < 80 && ${Group.Member[${gmember}].PctHPs} > 60 && ${Group.Member[${gmember}].Distance} < ${groupspellrange}) /varcalc minorhurt ${minorhurt}+1
/if (${Group.Member[${gmember}].PctHPs} < 60 && ${Group.Member[${gmember}].PctHPs} > 1 && ${Group.Member[${gmember}].Distance} < ${groupspellrange}) /varcalc majorhurt ${majorhurt}+1
/next gmember
/if (${autohealmode}==3) {
/if (${Spawn[${tanknameid}].ID} && ${Spawn[${tanknameid}].PctHPs} < ${tankhealpoint} && ${Spawn[${tanknameid}].Distance} < ${healspellrange}) /return
/if (${Me.PctHPs} <= ${selfhealpoint}) /return
}
/if (!${majorhurt} && !${minorhurt}) /return
/if (${usedivarb} && ${worsthp} && ${worsthp} <= ${divarbpoint}) /call Divarbcast
/if (${majorhurt}+${minorhurt} >= 3 && ${usegroupheal} && ${Me.SpellReady[${groupheal}]}) {
/if (${announce}==1) /${AnnounceChannel} Inc Grp Heal, get close
/call Cast "${groupheal}" ${grouphealgem} 1s
/return
}
/if (${meleeClasses.Find[${worstclass}]} && ${Spawn[${worsthurtid}].ID}) {
/if (${worsthp} <= ${tankhealpoint} && ${worsthp} >= ${tankhealpoint}*.7 && ${majorhurt} <= 1 && ${Me.SpellReady[${healspell}]}&& ${Spawn[${worsthurtid}].Distance} < ${healspellrange}) {
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (${announce}) /${AnnounceChannel} Casting ${healspell} on ${Target.CleanName}
/call Cast "${healspell}" ${healspellgem} 0 CheckHP
/return
} else /if (${worsthp} <= ${tankhealpoint}*.7 && ${majorhurt} <= 1 && ${Me.SpellReady[${patchheal}]} && ${Spawn[${worsthurtid}].Distance} < ${patchhealrange}) {
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 4s CheckHP
/return
}
} else /if (${casterClasses.Find[${worstclass}]} && ${Spawn[${worsthurtid}].ID} && ${worsthurtid} != ${Me.ID}) {
/if (${worsthp} < ${casterhotpoint} && ${worsthp} > ${casterpatchpoint} && ${worsthp} && ${Me.SpellReady[${hotspell}]} && ${Spawn[${worsthurtid}].Distance} < ${hotspellrange} && !${NoHotID[${Group.Member[${worsthurt}]}]}) {
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (${announce}) /${AnnounceChannel} Casting ${hotspell} on ${Target.CleanName}
/call Cast "${hotspell}" ${hotspellgem} 0 CheckHP
/varset NoHotID[${Group.Member[${worsthurt}]}] ${worsthurtid}
/timed 400 NoHotID[${Group.Member[${worsthurt}]}] 0
/return
} else /if (${worsthp} < ${casterpatchpoint} && ${worsthp} && ${Me.SpellReady[${patchheal}]} && ${Spawn[${worsthurtid}].Distance} < ${patchhealrange}) {
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 0 CheckHP
/return
}
} else /if (${canniClasses.Find[${worstclass}]} && ${Me.SpellReady[${patchheal}]} && ${Spawn[${worsthurtid}].ID}&& ${Spawn[${worsthurtid}].Distance} < ${patchhealrange}) {
/if (${worsthp} <= ${necshmpatchpoint} && ${worsthp}) {
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 0 CheckHP
/return
}
} else /if (${worsthp} <= ${defaultpatchpoint} && ${worsthp} && ${Spawn[${worsthurtid}].ID} && ${Me.SpellReady[${patchheal}]}&& ${Spawn[${worsthurtid}].Distance} < ${patchhealrange}) {
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 0 CheckHP
/return
}
/if (${Spawn[${tanknameid}].PctHPs} > ${healpct} || !${Spawn[${tanknameid}].ID} || ${Spawn[${tanknameid}].Type.Equal[corpse]} && ${healpetmode} && ${Me.PctMana} > ${manatohealpet}) /call HealPet
/return
Sub Divarbcast
/if (${Me.Casting.ID}) /call Interrupt
/if (${announce}) /${AnnounceChannel} Inc Divine Arbitration / Epic
/if (${FindItem[Aegis of Superior Divinity].InvSlot} && !${FindItem[Aegis of Superior Divinity].Timer}) {
/call Cast "Aegis of Superior Divinity" item 0
/return
} else /if (${FindItem[Harmony of the Soul].InvSlot} && !${FindItem[Harmony of the Soul].Timer}) {
/call Cast "Harmony of the Soul" item 0
/return
} else /if (${Me.AltAbilityReady[Divine Arbitration]}) {
/call Cast "Divine Arbitration" alt 0
/return
}
/declare q int local
/for q 0 to ${Group}
/if (${Group.Member[${q}].PctHPs}<=${DivArbHPs} && ${Me.AltAbilityReady[Bestow Divine Aura]} && ${Group.Member[${q}].ID}!=${tanknameid} && ${Group.Member[${q}].Distance} < 200) {
/if (${Me.Casting.ID}) /call Interrupt
/squelch /target id ${Group.Member[${q}].ID}
/delay 1s ${Target.ID}==${Group.Member[${q}].ID}
/if (${announce}) /${AnnounceChannel} Bestowing Divine Aura on: ${Target.CleanName}
/call Cast "Bestow Divine Aura" alt 5s
}
/next q
/return
Sub HealPet
/if (${Me.Invis}) /return
/varset worsthurt NULL
/varset worsthp 100
/for gmember 0 to ${Group}
/if (${Group.Member[${gmember}].Pet.ID}) {
/if (${Group.Member[${gmember}].Pet.Distance}<=${pethealspellrange}) {
/if ((${Group.Member[${gmember}].Pet.PctHPs}<=${worsthp})&&(${Group.Member[${gmember}].Pet.PctHPs}<=${pethealpoint})) {
/varset worsthurt ${Group.Member[${gmember}].Pet.Name}
/varset worsthurtid ${Group.Member[${gmember}].Pet.ID}
/varset worsthp ${Group.Member[${gmember}].Pet.PctHPs}
}
}
}
/next gmember
/if (${worsthurt.Length}) {
/if (${Spawn[${worsthurtid}].Type.NotEqual[Pet]}) /return
/squelch /target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/delay 3
/if (${Target.PctHPs} < ${pethealpoint}) {
/if (${announce}==1) /${AnnounceChannel} Casting ${pethealspell} on ${Target.CleanName}
/varcalc stophealpoint ${pethealpoint}+5
/call Cast "${pethealspell}" spell 0 CheckHP
/varset stophealpoint ${defaultstophealpoint}
/delay 15 ${Me.SpellReady[${pethealspell}]}
}
}
/return
Sub MedTime
/if (${FindItem["Rod of Mystical Transvergance"].InvSlot} && ${Me.PctMana}<=70 && ${Me.PctHPs} > 70 && !${FindItem["Rod of Mystical Transvergance"].Timer}) /call Cast "Rod of Mystical Transvergance" item
/if (${autosit} && ${Me.PctMana}<=98 && !${Me.Casting.ID} && ${Me.Standing} && !${Following} && !${NearestSpawn[1,npc radius ${distancetosit} zradius 30].Distance} && !${Me.Buff[${yaulpspell}].ID} && !${Me.Moving}) /sit
/if (${Me.Standing} && !${Me.Mount.ID} && ${Me.SpellReady[${yaulpspell}]} && !${Me.Buff[${yaulpspell}].ID} && !${Me.Buff[Spiritual Vigor].ID} && !${Me.Buff[Strength of Tunare].ID} && !${Me.Buff[Spiritual Vitality].ID}) /call Cast "${yaulpspell}" ${yaulpgem}
/if (${Me.Sitting} && !${Window[SpellBookWnd].Open} && (${NearestSpawn[1,npc radius ${distancetosit} zradius 30].Distance} || ${Me.PctMana} > 95)) /stand
/if (${Me.PctMana} < 20 && ${announce} && !${oomspam}) {
/${AnnounceChannel} ${Me.PctMana} Mana
/varset oomspam 600
}
/return
Sub BuffSelf
/if (${Me.Invis}) /return
/declare i int local
/for i 1 to ${SelfBuffTotal}
/if (${Spell[${SelfBuffIcon${i}}].Stacks} && ((${SelfBuffGem${i}.Find[gem]} && ${Me.CurrentMana} > ${Spell[SelfBuff${i}].Mana}) || (${SelfBuffGem${i}.Equal[item]} && !${FindItem[${SelfBuff${i}}].Timer}) || (${SelfBuffGem${i}.Equal[alt]} && ${Me.AltAbilityReady[${SelfBuff${i}}]}))) {
/if (${SelfBuffGem${i}.Find[gem]} && ${Me.Gem[${SelfBuff${i}}]} && (!${Me.SpellReady[${SelfBuff${i}}]} || ${Me.CurrentMana} < ${Spell[${SeflBuff${i}}].Mana})) /next i
/squelch /target id ${Me.ID}
/delay 1s ${Target.ID}==${Me.ID}
/if (${Verbose}) /${AnnounceChannel} Buffing myself with ${SelfBuffIcon${i}}
/call Cast "${SelfBuff${i}}" ${SelfBuffGem${i}} 6s
/squelch /target clear
}
/next i
/varset SelfBuffTimer 10
/return
Sub CheckHP
/if (${autointerrupt} && ${Target.PctHPs} >= ${stophealpoint} && (${Me.Casting.Name.Equal[${healspell}]} || ${Me.Casting.Name.Equal[${patchheal}]} || ${Me.Casting.Name.Equal[${hotspell}]})) {
/if (${announce} && !${duckspam}) /${AnnounceChannel} Ducking heal on ${Target.CleanName}
/if (!${duckspam}) /varset duckspam 100
/call Interrupt
/return
}
/if (${interrupt2healself} && ${Me.PctHPs} < ${interrupt2healselfhp}) {
/if (${usedivarb} && ${Me.PctHPs} < ${divarbpoint} && ((${FindItem[Aegis of Superior Divinity].InvSlot} && !${FindItem[Aegis of Superior Divinity].Timer}) || (${FindItem[Harmony of the Soul].InvSlot} && !${FindItem[Harmony of the Soul].Timer}) || (${Me.AltAbilityReady[Divine Arbitration]}))) {
/call Interrupt
/call Divarbcast
/return
} else {
/if (!${duckselfspam}) /docommand /${AnnounceChannel} Ducking heal on ${Target.CleanName} so I can heal myself
/varset duckselfspam 100
/call Interrupt
/call HealSelf
/return
}
}
/if (${onlyhealfd} && ${Select[${Target.Class.ShortName}],MNK,NEC} && ${Target.State.NotEqual[feign]}) {
/if (${announce} && !${duckfdspam}) /${AnnounceChannel} Ducking heal on ${Target.CleanName} because they won't stay down!
/if (!${duckfdspam}) /varset duckfdspam 400
/call Interrupt
/return
}
/if (${Me.Casting.Name.Equal[${hotspell}]} && ${casterClasses.Find[${worstclass}]} && ${Spawn[${worsthurtid}].PctHPs} < ${casterpatchpoint}) {
/if (${announce} && !${duckspam}) /${AnnounceChannel} Ducking HoT on ${Target.CleanName} to patch heal!
/if (!${duckfdspam}) /varset duckfdspam 400
/call Interrupt
/return
}
/if (${usedivarb} && ${castEndTime}>=${interrupt2divarb} && ((${FindItem[Aegis of Superior Divinity].InvSlot} && !${FindItem[Aegis of Superior Divinity].Timer}) || (${FindItem[Harmony of the Soul].InvSlot} && !${FindItem[Harmony of the Soul].Timer}) || (${Me.AltAbilityReady[Divine Arbitration]}))) {
/for gmember 0 to ${Group}
/if (${Group.Member[${gmember}].PctHPs} < ${divarbpoint} && ${Group.Member[${gmember}].Distance} < 200 && ${Spawn[${Group.Member[${gmember}].ID}].ID}) {
/call Interrupt
/call Divarbcast
/return
}
/next gmember
}
/return
Sub TrickyDA
/for intcount 1 to 20
/if ((${Me.PctHPs}<40)&&(${Me.Buff[${trickybuff[${intcount}]}].ID})) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${trickybuff[${intcount}]}].ID}-1].Int} leftmouseup
/next intcount
/if (${Me.Buff[${daspell}].ID}) {
:waitalittle
/delay 1s ${Me.Buff[${daspell}].Duration}<2
/if (${Me.Buff[${daspell}].Duration}>=2) /goto :waitalittle
}
/return
Sub FindExactPC(string name)
/declare nameid int local
/declare counter int local 1
:FindNext
/if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return NOT_FOUND
/varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
/if (${Spawn[${nameid}].CleanName.Equal[${name}]}) {
/squelch /target id ${nameid}
/delay 1s ${Target.ID}==${nameid}
/if (${Target.ID}==${nameid}) /return TARGET_SUCCESS
}
/varcalc counter ${counter}+1
/if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return NOT_FOUND
Sub Event_Chat(string ChatType,string Sender,string ChatText)
/if (${MasterOnly}) /if (!${MasterList.Find[${Sender}]} ) /return
/if (!${Spawn[${Sender}].ID}) {
/e ${Sender} is not in the zone
/return
}
/if (${ChatText.Equal[Follow me]}) {
/target ${Sender}
/delay 3
/varset followid ${Target.ID}
/varset Following TRUE
/varset FollowName ${ChatSender}
/squelch /stick 20 hold
/doevents
}
/if (${ChatText.Equal[Stay Here]}) {
/varset FollowTank FALSE
/varset StaticCamp FALSE
/squelch /stick off
/timed 50 /face pc ${follname}
}
/if (${ChatText.Equal[Make Camp]}) {
/varset MovingCamp FALSE
/varset Following FALSE
/squelch /stick off
/varset HomeX ${Me.X}
/varset HomeY ${Me.Y}
}
/if (${ChatText.Equal[nuke]}) {
/if (${Me.PctMana}<30) {
/${AnnounceChannel} Cleric Mana ${Me.PctMana}%, holding on nukes!
} else {
/assist ${Sender}
/delay 5
/if (${Target.Type.NotEqual[NPC]}) {
/assist ${Sender}
/delay 5 ${Target.Type.Equal[NPC]}
}
/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
/if (${Me.SpellReady[${nukeone}]}) {
/if (${announce}==1) /${AnnounceChannel} Casting ${nukeone} on ${Target.CleanName}
/call Cast "${nukeone}" spell 3s
} else /if (${Me.SpellReady[${nuketwo}]}) {
/if (${announce}==1) /${AnnounceChannel} Casting ${nuketwo} on ${Target.CleanName}
/call Cast "${nuketwo}" spell 3s
} else {
/${AnnounceChannel} nukes not ready
}
/if (${Me.PctMana}<=60) /${AnnounceChannel} FYI Cleric Mana ${Me.PctMana}%
} else {
/${AnnounceChannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
}
}
}
/if (${ChatText.Equal[stun]}) {
/assist ${Sender}
/delay 5
/if (${Target.Type.NotEqual[NPC]}) {
/assist ${Sender}
/delay 5 ${Target.Type.Equal[NPC]}
}
/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
/if (${Me.SpellReady[${stunone}]}) {
/if (${announce}==1) /${AnnounceChannel} Casting ${stunone} on ${Target.CleanName}
/call Cast "${stunone}" spell 3s
} else /if (${Me.SpellReady[${stuntwo}]}) {
/if (${announce}==1) /${AnnounceChannel} Casting ${stuntwo} on ${Target.CleanName}
/call Cast "${stuntwo}" spell 3s
} else {
/${AnnounceChannel} stuns not ready
}
} else {
/${AnnounceChannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
}
}
/if (${ChatText.Equal[wov]}) {
/call FindExactPC ${Sender}
/if (${Macro.Return.NotEqual[TARGET_SUCCESS]}) /return
/if (${announce}) /${AnnounceChannel} Casting ${acbuff} on ${Target.CleanName}
/call Cast "${acbuff}" gem9 0 CheckHP
}
/if ((${ChatText.Equal[patch me]})||(${ChatText.Equal[heal]})||(${ChatText.Equal[heal me]})||(${ChatText.Equal[heal plz]})||(${ChatText.Equal[heal me plz]})||(${ChatText.Equal[need heal]})) {
/call FindExactPC ${Sender}
/if (${Macro.Return.NotEqual[TARGET_SUCCESS]}) /return
/if (${Target.Distance}<=${patchhealrange}) {
/if (${announce}) /${AnnounceChannel} Casting ${patchheal} on ${Target.CleanName}
/call Cast "${patchheal}" ${patchhealgem} 2s
/delay 15 ${Me.SpellReady[${patchheal}]}
} else {
/tell ${Sender} you're out of range
}
}
/if ((${ChatText.Equal[balikor]})||(${ChatText.Equal[conviction]})||(${ChatText.Equal[devotion]})||(${ChatText.Equal[rgc]})||(${ChatText.Equal[hot me]})||(${ChatText.Equal[ch me]})||(${ChatText.Equal[pb]})) {
/if (${Spawn[pc ${Sender}].Distance}>200) /return
/call FindExactPC ${Sender}
/if (${Macro.Return.NotEqual[TARGET_SUCCESS]}) /return
}
/if (${ChatText.Equal[balikor]}) {
/if (${announce}) /${AnnounceChannel} Casting ${singlesymbuff} on ${Target.CleanName}
/call Cast "${singlesymbuff}" gem9 0 CheckHP
}
/if (${ChatText.Equal[conviction]}) {
/if (${announce}) /${AnnounceChannel} Casting ${longhpbuff} on ${Target.CleanName}
/call Cast "${longhpbuff}" gem9 0 CheckHP
}
/if (${ChatText.Equal[devotion]} || ${ChatText.Find[spell haste]}) {
/call Cast "${spellhastebuff}" gem9 0 CheckHP
}
/if (${ChatText.Equal[rgc]}) {
/if (${FindItem[Blackflame Sphere].ID}) {
/call Cast "Blackflame Sphere" item
} else /if (${FindItem[Wand of Casual Blessings].ID}) {
/call Cast "Wand of Casual Blessings" item
} else {
/call Cast "${rgcspell}" gem7 0 CheckHP
}
}
/if (${ChatText.Equal[buff pet]}) {
/target ${Spawn[pc ${Sender}].Pet}
/delay 8
/target ${Spawn[pc ${Sender}].Pet}
/if (${announce}) /${AnnounceChannel} Casting ${acbuff} on ${Target.CleanName}
/call Cast "${acbuff}" gem9 0 CheckHP
/if (${announce}) /${AnnounceChannel} Casting ${singlesymbuff} on ${Target.CleanName}
/call Cast "${singlesymbuff}" gem9 0 CheckHP
}
/if (${ChatText.Equal[da pet]}) {
/if (${DEBUG}) /echo Target 25
/target ${Spawn[pc ${Sender}].Pet}
/delay 6
/if (${DEBUG}) /echo Target 26
/target ${Spawn[pc ${Sender}].Pet}
/delay 3
/if (${Me.AltAbilityReady[Bestow Divine Aura]} && ${Target.Name.Equal[${Spawn[pc ${Sender}].Pet.Name}]}) {
/call Cast "39" alt
} else {
/${AnnounceChannel} Bestow Divine Aura is not ready, or Target (${Target.CleanName}) OOR or wrong target
}
}
/if (${ChatText.Equal[pb]}) /call Cast "Pure Blood" gem9 10s
/if (${ChatText.Equal[hot me]} && !${Me.Invis}) {
/if (${Target.Distance}<=${hotspellrange}&& ${Me.SpellReady[${hotspell}]}) {
/if (${announce}==1) /${AnnounceChannel} Casting ${hotspell} on ${Target.CleanName}
/call Cast "${hotspell}" ${patchhealgem} 2s
} else {
/tell ${Sender} You're out of range.
}
}
/if (${ChatText.Equal[ch me]} && !${Me.Invis} && ${Me.SpellReady[${healspell}]}) {
/if (${Target.Distance}<=100) {
/if (${announce}==1) /${AnnounceChannel} Casting Complete Healing on ${Target.CleanName}
/call Cast ${healspell} ${healspellgem} 0 CheckHP
} else {
/tell ${Sender} You're out of range.
}
}
/if (${ChatText.Equal[mana check]}) /${AnnounceChannel} Cleric Mana ${Me.PctMana}%
/return
Sub ReturnHome
/if (${Following} || ${MovingCamp} || !${StaticCamp}) /return
/if (${Me.Sitting}) /stand
/if (${Math.Distance[${HomeY},${HomeX}]}<10) {
/keypress back
/return
}
:MoveHome
/delay 1
/doevents
/face fast nolook loc ${HomeY},${HomeX}
/if (${Math.Distance[${HomeY},${HomeX}]}>10) /keypress forward hold
/call AreWeStuck
/if (${Math.Distance[${HomeY},${HomeX}]}<10) {
/keypress forward
/keypress back
/return
}
/goto :MoveHome
/squelch /target ${tankname}
/face fast nolook
/squelch /target clear
/return
Sub AreWeStuck
/doevents
/declare StuckXLoc int local ${Me.X}
/declare StuckYLoc int local ${Me.Y}
/delay 4
/if (${StuckXLoc}==${Me.X} && ${StuckYLoc}==${Me.Y}) /call MoveAround
/return
Sub MoveAround
/doevents
/keypress forward
/keypress back hold
/delay 3
/keypress back
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 10
/keypress strafe_right
/keypress strafe_left
/return
Sub Event_MobDead
/squelch /stick off
/keypress forward
/keypress back
/if (${Math.Distance[${HomeY},${HomeX}]}>25) /call ReturnHome
/return
Sub Event_Zoned
/varset HomeX ${Me.X}
/varset HomeY ${Me.Y}
/if (${Following}) {
:WaitForLead
/delay 10
/doevents
/squelch /target ${FollowName}
/if (!${Target.ID}) /goto :WaitForLead
/squelch /stick 20 moveback
}
/return
Sub Event_ImDead
/varset Following FALSE
/delay 20s
/memspellset ${spellset}
/call Wait4Rez
/return
Sub Event_GotHit(string line, string attacker)
/if (${Me.AltAbility[Divine Retribution]} && ${Me.AltAbilityReady[Divine Retribution]}) /call cast "Divine Retribution" alt
/if (!${helpspam}) {
/if (${announce}) /${AnnounceChannel} Help Help! I am being beaten on by ${ClosestSpawn[npc].CleanName}
/varset helpspam 100
}
/return
AFCleric.ini
Code:
will update soon
Last edited: