| - healer.mac Revised Editon Beta V 1.0
| - Revised Edition by Emperor
| - Author: Alatyami NotAddicted.com
| - Original healing code fantum409
| - Major revisions Credits: Crystane
| - This macro made for www.NotAddicted.com
| - Don't steal it or we'll punch your fase!
| - Uses spell_routines.inc
| ------------------------------------------------------------------------------|
#turbo 40
#include spell_routines.inc
#include healer_settings.inc
#event GoMana "You have been granted a gift of#*#"
#event GoMoff "Your gift of#*#mana fades."
#event OutofFood "You are out of #1#."
#Event WornOff "Your #1# spell has worn off of #2#."
#Event WornOff2 "#*# fades."
#Event GainExp "You gain#*#experience!#*#"
#Event HotonInc "#1# tells you#*#Incoming pull.#*#"
#Event nomount "#*#You can not summon a mount#*#"
#Event nomount "#*#You can only cast this spell in the outdoors#*#"
#event GainExp "#*#has been slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Chat Chat
#Chat tell
#Chat group
Sub Main
|----------------------------------------------------------------------------
| Healing Variables
|----------------------------------------------------------------------------
/declare complete_heal string outer
/declare patch_heal string outer
/declare heal_over_time string outer
/declare group_heal string outer
/declare group_heal_use int outer
/declare remove_curse string outer
/declare pure_blood string outer
/declare heal_self_% int outer
/declare divine_arbitration_interrupt_at_% int outer
/declare interrupt_heal_self_hp_% int outer
/declare stop_healing_point_% int outer
/declare heal_tank_% int outer
/declare heal_over_time_caster_% int outer
/declare heal_caster_% int outer
/declare heal_nec_shm_% int outer
/declare heal_default_% int outer
/declare autohealmode int outer
/declare interrupt_use int outer
/declare heal_only_while_fd int outer
/declare interrupt_heal_self int outer
/declare divine_arbitration_use int outer
/declare divine_arbitration_heal_% int outer
/declare divine_arbitration_group_heal_after_use int outer
|----------------------------------------------------------------------------
| Attack Spell Variables
|----------------------------------------------------------------------------
/declare hammer_pet string outer
/declare hammer_pet_use int outer
/declare hammer_pet_mob_health_% int outer
/declare hammer_pet_cast_% int outer
/declare reverse_damage_shield string outer
/declare reverse_damage_shield_use int outer
/declare reverse_damage_shield_mob_health_max_% int outer
/declare reverse_damage_shield_mob_health_min_% int outer
/declare reverse_damage_shield_cast_% int outer
/declare direct_damage_magic string outer
/declare direct_damage_magic_use int outer
/declare direct_damage_magic_mob_health_% int outer
/declare direct_damage_magic_cast_% int outer
/declare direct_damage_stun string outer
/declare direct_damage_stun_use int outer
/declare direct_damage_stun_mob_health_% int outer
/declare direct_damage_stun_cast_% int outer
/declare direct_damage_undead string outer
/declare direct_damage_undead_use int outer
/declare direct_damage_undead_mob_health_% int outer
/declare direct_damage_undead_cast_% int outer
/declare direct_damage_AoE string outer
/declare direct_damage_delay int outer
/declare direct_damage_timer timer outer
| ----------------------------------------------------------------------------
| Buff Spell Variables
| ----------------------------------------------------------------------------
/declare spell_haste_buff string outer
/declare spell_haste_group_buff string outer
/declare armor_class_buff string outer
/declare hit_point_aego_buff string outer
/declare hit_point_aego_group_buff string outer
/declare hit_point_symbol_buff string outer
/declare hit_point_symbol_group_buff string outer
/declare melee_guard_buff string outer
/declare melee_guard_group_buff string outer
/declare healer_buff_use outer
/declare healer_rebuff_use outer
/declare healer_rebuff_state outer
/declare healer_buff[9] string outer
/declare TankBufftodo[5] string outer
/declare clicky_item_use int outer
/declare clicky_item[5] string outer
/declare clicky_item_buff[5] string outer
| ----------------------------------------------------------------------------
| Misc Spells and AA's
| ----------------------------------------------------------------------------
/declare daspell string outer
/declare yaulpspell string outer
/declare aura_spell string outer
/declare aura_spell_use int outer
/declare slot10 string outer
/declare mount_use int outer
/declare mount_item_name string outer
/declare auto_sit int outer
/declare auto_sit_mob_distance int outer
| ----------------------------------------------------------------------------
| ChatoMatic Variables
| ----------------------------------------------------------------------------
/declare announce int outer
/declare my_channel string outer
/declare leave_all_channels_use int outer
/declare say_where string outer
/declare tell_who string outer
/declare tank_start_message string outer
| - Heal Spells
/declare complete_heal_ChatoMatic string outer
/declare patch_heal_ChatoMatic string outer
/declare heal_over_time_ChatoMatic string outer
/declare group_heal_ChatoMatic string outer
/declare remove_curse_ChatoMatic string outer
/declare pure_blood_ChatoMatic string outer
/declare resurrection_ChatoMatic string outer
/declare divine_arbitration_ChatoMatic string outer
| - Attack Spells
/declare hammer_pet_ChatoMatic string outer
/declare reverse_damage_shield_ChatoMatic string outer
/declare direct_damage_magic_ChatoMatic string outer
/declare direct_damage_stun_ChatoMatic string outer
/declare direct_damage_undead_ChatoMatic string outer
| - Buff Spells
/declare hit_point_symbol_buff_ChatoMatic string outer
/declare hit_point_symbol_group_buff_ChatoMatic string outer
/declare armor_class_buff_ChatoMatic string outer
/declare hit_point_aego_buff_ChatoMatic string outer
/declare hit_point_aego_group_buff_ChatoMatic string outer
/declare spell_haste_buff_ChatoMatic string outer
/declare spell_haste_group_buff_ChatoMatic string outer
/declare melee_guard_buff_ChatoMatic string outer
/declare melee_guard_group_buff_ChatoMatic string outer
/declare debug_ChatoMatic string outer
/declare aura_spell_ChatoMatic string outer
/declare announce_ChatoMatic string outer
/declare CastoMatic_ON int outer
/declare group_heal_over_time_use int outer
| ----------------------------------------------------------------------------
| Reporting Variables
| ----------------------------------------------------------------------------
/declare low_mana_reporting int outer
/declare out_of_mana_reporting int outer
/declare no_tank_reporting int outer
/declare debug int outer 0
| ----- Call user defined INC file
/call Healer_Variables
| ----- Load Variables not in INC file
/if (${debug}) /echo declaring variables
/declare epic_timer timer outer 0s
/declare zoned_timer timer outer 0s
/declare target_checked int outer
/declare noInvis int outer 1
/declare reverse_ds_use_mob int outer 0
/declare PossibleIncom outer FALSE
/declare BigHealtimer timer outer
/declare BigHealtimer2 timer outer
/declare Bighealtimeramount int outer
/declare promised_heal_use int outer 0
/declare complete_healrange int outer ${Spell[${complete_heal}].Range}
/declare patch_healrange int outer ${Spell[${patch_heal}].Range}
/declare heal_over_timerange int outer ${Spell[${heal_over_time}].Range}
/declare group_healrange int outer ${Spell[${group_heal}].AERange}
/declare tank_name string outer ${Target.Name}
/declare tank_name_id int outer
/declare tank_class string outer
/declare tank_merc int outer
/declare default_heal_% int outer
/if (${Select[${Spawn[${tank_name}].Class},Warrior,Paladin,ShadowKnight]}>=1) /varset default_heal_% 78
/if (${Select[${Spawn[${tank_name}].Class},Wizard,Druid,Mage]}>=1) {
/varset default_heal_% 90
} else /varset default_heal_% 75
/if (${heal_tank_%}<${default_heal_%}) /varset heal_tank_% ${default_heal_%}
/declare minor_hurt int outer 0
/declare major_hurt int outer 0
/declare worst_hurt string outer NULL
/declare worst_hurtid int outer
/declare worst_hp int outer 100
/declare worst_class string outer NULL
/declare group_member int outer
/declare spell_to_mem string outer
/declare Find_Spell[25] string outer
/declare nohotforua string outer NULL
/declare nohotforub string outer NULL
/declare nohotforuc string outer NULL
/declare following int outer 0
/declare follow_name string outer NULL
/declare mount_use_save_var int outer 0
/declare pallycount int outer 0
/declare stophealpoint int outer ${stop_healing_point_%}
/declare nomtspam int outer 1
/declare group_heal_hurt_count int outer 0
/declare divarboor int outer 0
/declare aetime int outer 0
/declare autonuke int outer 1
/declare GrpHealonGoM int outer 1
/declare GoMana int outer 0
/declare Casttimer timer outer
| ----- Macro starting statements
/call ChatoMatic
/if ((!${Target.ID})||(!${Group.Member[${Target}]})) {
/echo Target the Tank when you run this macro to designate him as MT
/echo He needs to be in the group as well.
/end
} else {
/varset tank_name_id ${Target.ID}
/varset tank_class ${Target.Class.Name}
}
/if (${Defined[Param0]}) {
/varset default_heal_% ${Param0}
} else {
/echo No Heal% specified, defaulting to ${default_heal_%}
}
/if (!${Defined[Param1]}) {
/echo Usage: /mac Healer % heal
/echo Example: /mac Healer 40 Complete Heal
/echo Defaulting to ${complete_heal} at ${default_heal_%}%
}
/call MemSpells
/echo AutoHealer Active, running in Autohealmode ${autohealmode}
/echo Casting ${complete_heal} on ${Spawn[${tank_name}].CleanName} at ${default_heal_%}% HP
/delay 2s
/if (${autohealmode}==0) /echo ONLY ${Spawn[${tank_name}].CleanName} will be healed
/if (${autohealmode}==1) /echo ONLY ${Spawn[${tank_name}].CleanName} and myself will be healed
/if (${autohealmode}==2) /echo ${Spawn[${tank_name}].CleanName}, myself and my group will be healed
/if (${autohealmode}==3) /echo ${Spawn[${tank_name}].CleanName} and myself will be healed before the rest of the group
/if (${Spawn[${Target}].Type.Equal[Mercenary]}) {
/varset tank_merc 1
/echo ${Spawn[${tank_name}].CleanName} is a Mercenary setting necessary parameters.
}
/call CheckEvents
/echo ${tank_start_message}
/if (${announce}) /${say_where} ${tank_start_message}
:tankwatchloop
/if (${debug}) /echo tankwatch begin
/if (${Spawn[${tank_name_id}].Name.NotEqual[${tank_name}]}) /varset tank_name_id 0
/if (!${Spawn[${tank_name_id}].ID} && ${Spawn[${tank_name}].ID}) {
/if (${SpawnCount[${tank_name} ${tank_class}]}==1) {
/varset tank_name_id ${Spawn[${tank_name} ${tank_class}].ID}
/echo ${Spawn[${tank_name} ${tank_class}].CleanName} is the designated MT and has ID# ${tank_name_id}
} else {
/beep
/echo Need to restart macro to correctly identify the MT
}
}
/if (${debug}) /echo tankwatch 2
/if (${Spawn[${tank_name_id}].ID}) {
/if (${debug}) /echo tankwatch 2 a
/if (${Spawn[${tank_name_id}].Type.Equal[Corpse]} && (${SpawnCount[${tank_name} ${tank_class}]} == 1) ) {
/varset tank_name_id ${Spawn[${tank_name} ${tank_class}].ID}
/echo ${Spawn[${tank_name} ${tank_class}].CleanName} is MT and has ID# ${tank_name_id}. If incorrect, please restart macro
}
}
/if ((!${Target.ID} || ${Target.ID} != ${tank_name_id} ) && ${Spawn[${tank_name_id}].ID} && ${Spawn[${tank_name_id}].Type.NotEqual[Corpse]}) {
/if (${debug}) /echo tankwatch 2b
/target id ${tank_name_id}
/delay 6 ${Target.ID} == ${tank_name_id}
} else {
/if (!${Spawn[${tank_name_id}].ID} && ${no_tank_reporting}) {
/if (${debug}) /echo tankwatch 2c
/echo Warning No Designated MT is available
/timed 300 /varset no_tank_reporting 1
/varset no_tank_reporting 0
}
}
/doevents HotonInc
/call Attack_Spells
/if ((${mount_use}) && (!${Me.Mount.ID})) /call mount
| ----- Mana watch
/if (${Me.PctMana}<=50 && ${announce} && ${low_mana_reporting}==1) {
/if (${announce}) /${say_where} I have ${Me.PctMana} m
/timed 300 /varset low_mana_reporting 1
/varset low_mana_reporting 0
}
/if (${Me.PctMana}<=7 && ${announce} && ${out_of_mana_reporting}==1) {
/if (${announce}) /${say_where} I am Out of Mana going to Med.
/timed 300 /varset out_of_mana_reporting 1
/varset out_of_mana_reporting 0
/call MedTime
}
/if (${GameState.Equal[CHARSELECT]}) /end
/if (${Target.ID}==${tank_name_id}) {
/varset stophealpoint ${Math.Calc[${default_heal_%}*1.1]}
/if ((${Target.Distance}<=${patch_healrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${default_heal_%}]})&&(${Target.PctHPs}>=1)) {
/if (${announce}) /${say_where} ${patch_heal} --- %T ---1
/if (${debug}) /echo trying to patch heal from tankwatch loop
/call Cast "${patch_heal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patch_heal}]}
}
/if ((${Target.Distance}<=${complete_healrange})&&(${Target.PctHPs}<=${default_heal_%})&&(${Target.PctHPs}>=${Math.Calc[0.7*${default_heal_%}]})&&${BigHealtimer}<1) {
/if (${announce}) /${say_where} ${complete_heal} --- %T --- 1
/call Cast "${complete_heal}" gem1 1s CheckHP
/delay 15 ${Me.SpellReady[${complete_heal}]}
/if (${promised_heal_use} && ${Macro.Return.Equal[CAST_SUCCESS]}) /varset BigHealtimer ${Bighealtimeramount}
}
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
}
/if ((${auto_sit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
/if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
}
/if ((${auto_sit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
/if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${auto_sit_mob_distance}/3]}]}) /stand
}
/if (${autohealmode}==0) {
/call CheckEvents
/goto :tankwatchloop
}
/if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${heal_self_%})) /call Healself
/if (${autohealmode}>=2) {
/if ((${Target.PctHPs}>${default_heal_%})||(${Target.Distance}>${complete_healrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tank_name_id} )) {
/call Healgroup
}
}
/if ((${autohealmode}<2)&&(${Me.PctHPs}>${heal_self_%})&&(${Me.PctMana}<=98)) /call MedTime
/call CheckEvents
/goto :tankwatchloop
/return
|----------------------------------------------------------------------------
| SUB: Mem Spells
|----------------------------------------------------------------------------
Sub MemSpells
/echo Memming spells. Hang on.
/if (${CastoMatic_ON}) {
/call Assign_Spell_Complete_Heal
/varset complete_heal ${Me.Gem[1]}
} else {
/if ( !${Me.Gem[${complete_heal}]} ) {
/echo Memming Spell ${complete_heal}
/memspell 1 "${complete_heal}"
/delay 25
}
}
| - Check for complete heal/promised heal then if cleric has Spell Casting Reinforcement AA
/if (${complete_heal.Find[complete]}) {
/varset Bighealtimeramount 0
} else {
/if (${AltAbility[Spell Casting Reinforcement].ID}) {
/varset Bighealtimeramount 240
} else {
/varset Bighealtimeramount 180
}
/varset promised_heal_use 1
}
/if (${CastoMatic_ON}) {
/call Assign_Spell_Patch_Heal
} else {
/if ( !${Me.Gem[${patch_heal}]} ) {
/echo Memming Spell ${patch_heal}
/memspell 2 "${patch_heal}"
/delay 25
}
}
/if (${CastoMatic_ON}) {
/call Assign_Spell_Heal_Over_Time
} else {
/if ( !${Me.Gem[${heal_over_time}]} ) {
/echo Memming Spell ${heal_over_time}
/memspell 3 "${heal_over_time}"
/delay 25
}
}
/if (${CastoMatic_ON} && ${group_heal_over_time_use}) {
/call Assign_Spell_Group_Heal_Over_Time
} else {
/if (${CastoMatic_ON}) /call Assign_Spell_Group_Heal
} else {
/if ( !${Me.Gem[${group_heal}]} ) {
/echo Memming Spell ${group_heal}
/memspell 4 "${group_heal}"
/delay 25
}
}
/if ( !${Me.Gem[${hammer_pet}]} ) {
/echo Memming Spell ${hammer_pet}
/memspell 5 "${hammer_pet}"
/delay 20
}
/if ( !${Me.Gem[${direct_damage_magic}]} ) {
/echo Memming Spell ${direct_damage_magic}
/memspell 6 "${direct_damage_magic}"
/delay 30
}
/if ( !${Me.Gem[${daspell}]} ) {
/echo Memming Spell ${daspell}
/memspell 7 "${daspell}"
/delay 20
}
/if ( !${Me.Gem[${reverse_damage_shield}]} ) {
/echo Memming Spell ${reverse_damage_shield}
/memspell 8 "${reverse_damage_shield}"
/delay 30
}
/if ( !${Me.Gem[${direct_damage_stun}]} ) {
/echo Memming Spell ${direct_damage_stun}
/memspell 9 "${direct_damage_stun}"
/delay 30
}
/if ( !${Me.Gem[${slot10}]} ) {
/echo Memming Spell ${slot10}
/memspell 10 "${slot10}"
/delay 30
}
/echo Spells are memmed.
/if (${Window[SpellBookWnd].Open}) /cleanup
/return
|----------------------------------------------------------------------------
| SUB: Heal over Time on INC
|----------------------------------------------------------------------------
Sub Event_HotonInc(line, SenderName)
/if (!${Group.Member[${SenderName.Arg[1]}]}) /return
/if (${Target.ID}!=${Spawn[${tank_name}].ID}) {
/target ${tank_name}
/delay 1s ${Target.ID}==${Spawn[${tank_name}].ID}
}
/if (${Me.SpellReady[${heal_over_time}]} && !${Me.Casting.ID} && ${Target.Distance}<${Spell[${heal_over_time}].Range}) {
/call Cast "${heal_over_time}" gem3 5s
}
/return
|----------------------------------------------------------------------------
| SUB: Attack Spells
|----------------------------------------------------------------------------
Sub Attack_Spells
/if (${Spawn[${tank_name}].PctHPs}>${heal_tank_%} && ${Spawn[${tank_name}].NearestSpawn[npc radius 30 zradius 15].ID}) {
/if (${debug}) /echo Begin Sub Attack_Spells
/assist ${tank_name}
/delay 1s
/call Check_Target
/if (!${target_checked}) /goto :skip_attack_spells
/if (${debug}) /echo assisting tank my target is ${Target}
/if (${hammer_pet_use} && !${Me.Pet.ID} && ${Me.PctMana}>=${hammer_pet_cast_%} && ${Target.PctHPs}<${hammer_pet_mob_health_%}) {
/if (${debug}) /echo call hammer pet
/if (${announce}) /${say_where} Casting ${hammer_pet} on ${Spawn[${Target}].CleanName}
/call Hammer_Pet_Cast
/goto :attack_spells_done
}
/if (${reverse_damage_shield_use} && ${Me.PctMana}>=${reverse_damage_shield_cast_%} && !${reverse_ds_use_mob} && ${Target.PctHPs}>${reverse_damage_shield_mob_health_min_%}) {
/if (${debug}) /echo calling Sub Reverse DS
/if (${announce}) /${say_where} Casting ${reverse_damage_shield} on ${Spawn[${Target}].CleanName}
/call Reverse_Damage_Shield_Cast
/goto :attack_spells_done
}
/if (${direct_damage_magic_use} && !${direct_damage_timer}>0 && ${Me.PctMana}>=${direct_damage_magic_cast_%} && ${Target.PctHPs}<${direct_damage_magic_mob_health_%}) {
/varset direct_damage_timer ${direct_damage_delay}s
/if (${debug}) /echo Cast direct_damage_magic
/if (${announce}) /${say_where} Casting ${direct_damage_magic} on ${Spawn[${Target}].CleanName}
/call Direct_Damage_Cast "${direct_damage_magic}"
/goto :attack_spells_done
}
/if (${direct_damage_stun_use} && ${Me.PctMana}>=${direct_damage_stun_cast_%} && ${Target.PctHPs}<${direct_damage_stun_mob_health_%}) {
/if (${debug}) /echo calling Sub Direct_Damage
/call Direct_Damage_Cast "${direct_damage_stun}"
/goto :attack_spells_done
}
:attack_spells_done
/doevents GoMana
:skip_attack_spells
/if (${debug}) /echo Leaving attack spells sub
/target ${tank_name}
/if (${debug}) /echo Targeting ${tank_name}
/delay 1s ${Target.Type.Equal[PC]}
}
/return
|----------------------------------------------------------------------------
| SUB: Heal self
|----------------------------------------------------------------------------
Sub Healself
/if (${Me.PctHPs}>${heal_self_%}) /return
/varset stophealpoint ${Math.Calc[${heal_self_%}+5]}
/if ((!${Target.ID})||(${Target.PctHPs}>=${Math.Calc[1.1*${default_heal_%}]})||(${Target.PctHPs}<=1)||(${Target.ID}!=${tank_name_id})) {
/if ((${Me.PctHPs}<=${heal_self_%})&&(${Me.PctHPs}>${dacastpoint})) {
/target myself
/delay 6 ${Target.Name.Equal[${Me}]}
/if (${Target.Name.Equal[${Me}]}) {
/if (${announce}) /${say_where} (${patch_heal}) --- %T ---2
/call Cast "${patch_heal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patch_heal}]}
}
}
}
/if (${Me.PctHPs}<=${Math.Calc[${heal_self_%}*0.7]}) {
/target myself
/delay 6 ${Target.Name.Equal[${Me}]}
/if (${Target.Name.Equal[${Me}]}) {
/if (${announce}) /${say_where} (${patch_heal}) --- %T ---3
/varset stophealpoint ${Math.Calc[${heal_self_%}+5]}
/if (${debug}) /echo trying to patch heal from Sub Healself
/call Cast "${patch_heal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patch_heal}]}
}
}
/varset stophealpoint ${stop_healing_point_%}
/return
|----------------------------------------------------------------------------
| SUB: Heal Group
|----------------------------------------------------------------------------
Sub Healgroup
:healgroup
/varset worst_hurt NULL
/varset worst_hp 100
/varset worst_class NULL
/varset minor_hurt 0
/varset major_hurt 0
/varset group_heal_hurt_count 0
/for group_member 0 to ${Group}
/if (${heal_only_while_fd}==0) {
/if (${Group.Member[${group_member}].Distance}<=${patch_healrange} && ${Group.Member[${group_member}].Type.NotEqual[Corpse]}) {
/if (${Group.Member[${group_member}].PctHPs}<=${worst_hp}) {
/varset worst_hurt ${Group.Member[${group_member}].Name}
/varset worst_hurtid ${Group.Member[${group_member}].ID}
/varset worst_hp ${Group.Member[${group_member}].PctHPs}
/varset worst_class ${Group.Member[${group_member}].Class.Name}
}
}
}
/if (${heal_only_while_fd}==1) {
/if (${Group.Member[${group_member}].Distance}<=${patch_healrange} && ${Group.Member[${group_member}].Type.NotEqual[Corpse]}) {
/if ((${Group.Member[${group_member}].Class.Name.NotEqual[Monk]})&&(${Group.Member[${group_member}].Class.Name.NotEqual[Necromancer]})&&(${Group.Member[${group_member}].PctHPs}<=${worst_hp})) {
/varset worst_hurt ${Group.Member[${group_member}].Name}
/varset worst_hurtid ${Group.Member[${group_member}].ID}
/varset worst_hp ${Group.Member[${group_member}].PctHPs}
/varset worst_class ${Group.Member[${group_member}].Class.Name}
}
/if ((${Group.Member[${group_member}].Class.Name.Equal[Monk]})||(${Group.Member[${group_member}].Class.Name.Equal[Necromancer]})) {
/if ((${Group.Member[${group_member}].State.Equal[feign]})&&(${Group.Member[${group_member}].PctHPs}<=${worst_hp})) {
/varset worst_hurt ${Group.Member[${group_member}].Name}
/varset worst_hurtid ${Group.Member[${group_member}].ID}
/varset worst_hp ${Group.Member[${group_member}].PctHPs}
/varset worst_class ${Group.Member[${group_member}].Class.Name}
}
}
}
}
/if ((${Group.Member[${group_member}].Distance}<=${group_healrange})&&(${Group.Member[${group_member}].PctHPs}<=85)) /varcalc group_heal_hurt_count ${group_heal_hurt_count}+1
/if ((${Group.Member[${group_member}].PctHPs}<=75)&&(${Group.Member[${group_member}].PctHPs}>=55)) /varcalc minor_hurt ${minor_hurt}+1
/if ((${Group.Member[${group_member}].PctHPs}<=55)&&(${Group.Member[${group_member}].PctHPs}>=1)) /varcalc major_hurt ${major_hurt}+1
/next group_member
/if (${autohealmode}==3) {
/if ((!${Target.ID})||(${Target.Name.NotEqual[${tank_name}]})) /if (${Spawn[${tank_name_id}].ID}) {
/target id ${tank_name_id}
/delay 6 ${Target.ID}==${tank_name_id}
/delay 1
/if ((${Target.ID}==${tank_name_id})&&((${Target.PctHPs}<=${default_heal_%})||(${GoMana}>0))&&(${Target.Distance}<=${complete_healrange})) /return
}
/if (${Me.PctHPs}<=${heal_self_%}) /return
}
/if ((${major_hurt}==0)&&(${minor_hurt}==0)&&(${GoMana}==0)) {
/if (${Spawn[${tank_name_id}].ID}) {
/target id ${tank_name_id}
/delay 6 ${Target.ID}==${tank_name_id}
/delay 1
}
/if (((${Target.ID}==${tank_name_id})&&(${Target.PctHPs}>${default_heal_%}))||(!${Spawn[${tank_name_id}].ID})||(${Spawn[${tank_name_id}].Type.Equal[corpse]})) {
/if (${Me.PctMana}<=98) /call MedTime
}
/call CheckEvents
/return
}
/if (${divine_arbitration_use} && ${worst_hp}<=${divine_arbitration_heal_%} && (${Me.AltAbilityReady[divine arbitration]} || (${epic_timer}==0))) /call divine_arbitration_cast
/if ( ((${Math.Calc[${major_hurt}+${minor_hurt}]}>=3)&&(${group_heal_use}==1))||((${GoMana}==1)&&(${group_heal_use}==1)) ) {
/if (${announce}) /${say_where} Inc Grp Heal, get close
/call Cast "${group_heal}" gem4 1s
/delay 15 ${Me.SpellReady[${group_heal}]}
/call CheckEvents
/return
}
/if (${worst_hurtid}==${tank_name_id}) /return
/if (${worst_hurtid}==${Me.ID}) {
/call Healself
/call CheckEvents
/return
}
/if (${Select[${worst_class},Warrior,Paladin,Shadow Knight]}>0) {
/if ((${worst_hp}<=${heal_tank_%})&&(${worst_hp}>=${Math.Calc[0.7*${heal_tank_%}]})&&(${major_hurt}<=1)&&(${minor_hurt}<=1)&&${BigHealtimer2}<1) {
/target id ${worst_hurtid}
| /echo ${worst_class}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
| /echo ${Target.Name}
/varset stophealpoint ${Math.Calc[${heal_tank_%}+5]}
/if (${announce}) /${say_where} ${complete_heal} --- %T --- 2
/echo Casting ${complete_heal}
/call Cast "${complete_heal}" gem1 1s CheckHP
/delay 15 ${Me.SpellReady[${complete_heal}]}
/if (${promised_heal_use} && ${Macro.Return.Equal[CAST_SUCCESS]}) /varset BigHealtimer2 ${Bighealtimeramount}
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
/return
}
/if (${worst_hp}<=${heal_tank_%}) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/varset stophealpoint ${Math.Calc[${heal_tank_%}+5]}
/if (${announce}) /${say_where} (${patch_heal}) --- %T ---4
/if (${debug}) /echo trying to patch heal from worst hps line 547
/call Cast "${patch_heal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patch_heal}]}
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
/return
}
} else /if (${Select[${worst_class},Magician,Wizard,Enchanter,Druid]}>0) {
/if ((${worst_hp}<=${heal_over_time_caster_%})&&(${worst_hp}>${heal_caster_%})) {
/if (${Select[${worst_hurt},${nohotforua},${nohotforub},${nohotforuc},${nohotforud}]}>=1) /return
/if (${Select[${nohotforua},NULL]}>=1) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/varset nohotforua ${Target.Name}
/if (${announce}) /${say_where} (${heal_over_time}) --- %T ---
/varset stophealpoint ${Math.Calc[${heal_over_time_caster_%}+5]}
/call Cast "${heal_over_time}" gem3 1s CheckHP
/timed 200 /varset nohotforua NULL
/delay 15 ${Me.SpellReady[${heal_over_time}]}
} else /if (${Select[${nohotforub},NULL]}>=1) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/varset nohotforub ${Target.Name}
/if (${announce}) /${say_where} (${heal_over_time}) --- %T ---
/varset stophealpoint ${Math.Calc[${heal_over_time_caster_%}+5]}
/call Cast "${heal_over_time}" gem3 1s CheckHP
/timed 200 /varset nohotforub NULL
/delay 15 ${Me.SpellReady[${heal_over_time}]}
} else /if (${Select[${nohotforuc},NULL]}>=1) {
/target id${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/varset nohotforuc ${Target.Name}
/if (${announce}) /${say_where} (${heal_over_time}) --- %T ---
/varset stophealpoint ${Math.Calc[${heal_over_time_caster_%}+5]}
/call Cast "${heal_over_time}" gem3 1s CheckHP
/timed 200 /varset nohotforuc NULL
/delay 15 ${Me.SpellReady[${heal_over_time}]}
} else /if (${Select[${nohotforud},NULL]}>=1) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/varset nohotforud ${Target.Name}
/if (${announce}) /${say_where} (${heal_over_time}) --- %T ---
/varset stophealpoint ${Math.Calc[${heal_over_time_caster_%}+5]}
/call Cast "${heal_over_time}" gem3 1s CheckHP
/timed 200 /varset nohotforud NULL
/delay 15 ${Me.SpellReady[${heal_over_time}]}
}
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
/return
}
/if ((${worst_hp}<=${heal_caster_%})&&(${worst_hp}>=1)) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/if (${announce}) /${say_where} (${patch_heal}) --- %T ---5
/if (${debug}) /echo trying to patch heal from worst_hp caster
/call Cast "${patch_heal}" gem2 1s CheckHP
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
/delay 15 ${Me.SpellReady[${patch_heal}]}
/return
}
/varset stophealpoint ${stop_healing_point_%}
} else /if (${Select[${worst_class},Necromancer,Shaman]}>0) {
/if ((${worst_hp}<=${heal_nec_shm_%})&&(${worst_hp}>=1)) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/varset stophealpoint ${Math.Calc[${heal_nec_shm_%}+5]}
/if (${announce}) /${say_where} (${patch_heal}) --- %T ---6
/call Cast "${patch_heal}" gem2 1s CheckHP
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
/delay 15 ${Me.SpellReady[${patch_heal}]}
/return
}
} else /if ((${worst_hp}<=${heal_default_%})&&(${worst_hp}>=1)) {
/target id ${worst_hurtid}
/delay 5 ${Target.ID}==${worst_hurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worst_hurtid}) /return
/if (${announce}) /${say_where} (${patch_heal}) --- %T ---7
/varset stophealpoint ${Math.Calc[${heal_default_%}+5]}
/call Cast "${patch_heal}" gem2 1s CheckHP
/varset stophealpoint ${stop_healing_point_%}
/call CheckEvents
/delay 15 ${Me.SpellReady[${patch_heal}]}
/return
}
/varset stophealpoint ${stop_healing_point_%}
/return
|----------------------------------------------------------------------------
| SUB: Divine Arbitration
|----------------------------------------------------------------------------
Sub divine_arbitration_cast
/if (${zoned_timer}>0) /return
/varset divarboor 0
/for group_member 0 to ${Group}
/if (${Group.Member[${group_member}].Distance}>200) /varcalc divarboor ${divarboor}+1
/next group_member
/if (${Math.Calc[${Group}-${divarboor}]}>=2) {
/if (${announce}) /${say_where} Inc Divine Arbitration
/if (${debug}) /echo Start Sub Divine_Arbitration
/if (${epic_timer}==0) {
/if (${debug}) /echo Divine_Arbitration AA
/if (!${Me.AltAbilityReady[Divine Arbitration]}) /goto :epic_check_1.5
/call Cast "Divine Arbitration" alt 2s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /goto :divine_arbitration_cast
} else {
:epic_check_1.5
/if (${debug}) /echo Divine_Arbitration epic 1.5
/call cast "Harmony of the Soul" item
/if (${Macro.Return.Equal[CAST_UNKNOWNSPELL]}) /goto :epic_check_2.0
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset epic_timer 360s
/goto :divine_arbitration_cast
}
} else {
:epic_check_2.0
/if (${debug}) /echo Divine_Arbitration epic 2.0
/call cast "Aegis of Superior Divinity" item
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset epic_timer 180s
/goto :divine_arbitration_cast
}
}
:divine_arbitration_cast
/if (${divine_arbitration_group_heal_after_use} && ${Me.PctMana}>40 || ${Me.PctMana}>20 && !${GoMana}) {
/if (${announce}) /${say_where} Inc Grp Heal, get close
/call Cast "${group_heal}" gem4 2s
/delay 15 ${Me.SpellReady[${group_heal}]}
}
}
/if (${debug}) /echo Leaving Divine_Arbitration
/return
|----------------------------------------------------------------------------
| SUB: Check Events
|----------------------------------------------------------------------------
Sub CheckEvents
/delay 1
/doevents GainExp
/doevents GoMoff
/doevents GoMana
/doevents Chat
/doevents tell
/doevents
/doevents flush
/call Checkbuffs
/call CheckAura
/call Check_Clicky
/return
|----------------------------------------------------------------------------
| SUB: Med Time
|----------------------------------------------------------------------------
Sub MedTime
:oomwait
/call CheckEvents
/doevents HotonInc
/if ((${mount_use}) && (!${Me.Mount.ID})) /call mount
/if ((${auto_sit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) {
/if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${auto_sit_mob_distance}]})&&(${Me.PctHPs}>90)) /sit
/if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${auto_sit_mob_distance}/3]}]})) /stand
}
/if ((${Bool[${Me.Standing}]})&&(${auto_sit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit
/if ((${Bool[${Me.Sitting}]})&&(${auto_sit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand
/if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID}) && (${Spell[${yaulpspell}].Stacks})) {
/call Cast "${yaulpspell}"
}
/if (${Me.PctHPs}<=${heal_self_%}) /return
/if (${Me.PctMana}<=8) /goto :oomwait
/return
|----------------------------------------------------------------------------
| SUB: Check HP
|----------------------------------------------------------------------------
Sub CheckHP
/if (!${Window[CastingWindow].Open}) /return
/if (${debug}) /echo Entering Sub CheckHP
/if (${interrupt_use} && ${Target.PctHPs}>=${stophealpoint} && ${Target.Type.Equal[PC]} && !${healer_rebuff_use}) {
/if (${announce}) {
/echo Ducking heal on ${Target.Name}
}
/call Interrupt
/return
}
/if (${debug}) /echo Sub CheckHP passing Interrupt 1
/if (${interrupt_heal_self} && ${Target.Name.NotEqual[${Me}]} && ${Me.PctHPs}<${interrupt_heal_self_hp_%}) {
/if (${divine_arbitration_use} && ${Me.PctHPs}<=${divine_arbitration_heal_%} && (${Me.AltAbilityReady[Divine Arbitration]} || (${epic_timer}==0))) {
/call Interrupt
/call divine_arbitration_cast
/return
}
/if (${announce}) {
/echo Ducking heal or buffspell on ${Target} so I can heal myself
}
/call Interrupt
/return
}
/if (${debug}) /echo Sub CheckHP passing Interrupt self
/if (${heal_only_while_fd}) {
/if (${Select[${Target.Class.ShortName},NEC,MNK]} && (${Target.Name.NotEqual[${tank_name}]} || ${Target.Type.NotEqual[NPC]})) {
/if (${Target.State.NotEqual[feign]}) {
/if (${announce}) {
/echo Ducking heal on ${Target.Name} because he isn't staying FD
}
/call Interrupt
/return
}
}
}
/if (${debug}) /echo Sub CheckHP passing Interrupt FD
/for group_member 0 to ${Group}
/if (${divine_arbitration_use} && ${Spawn[${Group.Member[${group_member}]}].PctHPs}<=${divine_arbitration_heal_%} && ${Spawn[${Group.Member[${group_member}]}].Distance}<=200 && ${Me.AltAbilityReady[Divine Arbitration]} && ${castEndTime}>=${divine_arbitration_interrupt_at_%}) {
/call Interrupt
/call divine_arbitration_cast
/return
}
/next group_member
/if (${debug}) /echo Sub CheckHP passing Interrupt group_member
/return
|----------------------------------------------------------------------------
| SUB: Event_Chat - commands that can be given to the cleric via chat or tells
|----------------------------------------------------------------------------
Sub Event_Chat(string ChatType,string Sender,string ChatText)
/if (${debug}) /echo entering Event_Chat
/if (!${ChatType.Equal[${my_channel.Arg[1,:]}]} && !${ChatType.Equal[TELL]} && !${ChatType.Equal[GROUP]}) /return
/if (!${Spawn[${Sender}].ID}) {
/echo ${Sender} is not in the zone
/return
}
| - Chat Attack Spells --------------------------------------------------------
| ----- Hammer Pet
/if (${ChatText.Equal[${hammer_pet_ChatoMatic}]}) {
/pet leave
/call CastoMatic "${Sender}" "${hammer_pet}" "other" "attack" "hammer_pet_use"
}
| ----- Reverse DS
/if (${ChatText.Equal[${reverse_damage_shield_ChatoMatic}]}) {
/if (${debug}) /echo Event_Chat Reverse DS
/if (!${Group.Member[${Sender}]}) /return
/assist ${Sender}
/delay 1s
/call Check_Target
/if (${target_checked})/call Reverse_Damage_Shield_Cast
}
| ----- Nuke
/if (${ChatText.Equal[${direct_damage_magic_ChatoMatic3}]}) {
/if (${debug}) /echo Event_Chat nuke
/if (!${Group.Member[${Sender}]}) /return
/assist ${Sender}
/delay 1s
/call Check_Target
/if (${target_checked}) /call Direct_Damage_Cast "${direct_damage_magic}"
}
| ----- Nuke
/if (${ChatText.Find[${direct_damage_magic_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${direct_damage_magic}" "other" "attack" "direct_damage_magic_use"
| ----- AoE
/if (${ChatText.Equal[direct_damage_AoE]}) {
/if (${debug}) /echo entering Event_Chat nuke Aoe
/if (!${Group.Member[${Sender}]}) /return
/target ${Me.NearestSpawn[npc radius 35 zradius 25]}
/delay 8
/if (${Target.Type.NotEqual[NPC]}) {
/assist ${Sender}
/delay 8 ${Target.Type.Equal[NPC]}
}
/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
/if (${Me.SpellReady[${direct_damage_AoE}]}) {
/if (${announce}) /${say_where} ${Sender} Casting ${direct_damage_AoE} on %T
/call Cast "${direct_damage_AoE}" spell 3s
} else /${say_where} ${Sender} ${direct_damage_AoE} not ready.
} else /${say_where} ${Sender} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
}
| - Chat Heals ---------------------------------------------------------------
/if (${ChatText.Find[${complete_heal_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${complete_heal}" "me "heal"
/if (${ChatText.Find[${patch_heal_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${patch_heal}" "me" "heal"
/if (${ChatText.Find[${heal_over_time_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${heal_over_time}" "me" "heal"
/if (${ChatText.Find[${group_heal_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${group_heal}" "me" "heal"
/if (${ChatText.Find[${remove_curse_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${remove_curse}" "me" "heal"
/if (${ChatText.Find[${pure_blood_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${pure_blood}" "me" "heal"
/if (${ChatText.Equal[${divine_arbitration_ChatoMatic}]}) /call divine_arbitration_cast
| ----- GrpHealonGoM - toggle group heal on gift of mana
/if (${ChatText.Equal[GrpHealonGoM]}) {
/if (!${Group.Member[${Sender}]}) /return
/if (${GrpHealonGoM}>0) {
/varset GrpHealonGoM 0
/echo Grpheal on GoM off!
/${say_where} ${Sender} Group Heal on GoM off!
} else /if (${GrpHealonGoM}<1) {
/varset GrpHealonGoM 1
/echo Grpheal on GoM on!
/${say_where} ${Sender} Group Heal on GoM on!
}
}
| ----- resurrection
/if (${ChatText.Equal[${resurrection_ChatoMatic}]} && ${Spawn[${Sender}].Type.Find[Corpse]}) {
/squelch /target ${Sender}'s Corpse
/if (${Target.ID} && ${Target.Distance}>20) /corpse
/if (!${Target.ID} && ${Announce}) /${say_where} I can't target ${Sender}'s corpse
/if (${Target.Type.Equal[Corpse]}) {
/if (${Announce}) /${say_where} I am attempting to resurrect ${Sender}
/if (${Me.AltAbility[Blessing of Resurrection]} && ${Me.AltAbilityReady[Blessing of Resurrection]}) {
/call Cast "Blessing of Resurrection" alt 10s
} else /if (${FindItem[Water Sprinkler of Nem Ankh].ID}) {
/call Cast "Water Sprinkler of Nem Ankh" item 6s
} else {
/call Cast "Reviviscence" gem8 3s
}
}
/return
}
| - Chat Buffs -------------------------------------------------------------------
| ----- Group Buffs
/if (${ChatText.Equal[Gbuff now!]}) {
/if (!${Group.Member[${Sender}]}) /return
/varset pallycount 0
/target myself
/call Cast "${armor_class_buff}" gem8 7s
/call Cast "${spell_haste_buff}" gem8 5s
/for group_member 1 to ${Group}
/target id ${Group.Member[${group_member}].ID}
/delay 1s ${Target.ID}==${Group.Member[${group_member}].ID}
/if (${Target.ID}==${Group.Member[${group_member}].ID}) {
/if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${hit_point_aego_buff}" gem8 7s
/if (${Target.Class.Name.Equal[Paladin]}) {
/call Cast "${hit_point_aego_buff}" gem8 10s
/varcalc pallycount ${pallycount}+1
}
/if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
/call Cast "${spell_haste_buff}" gem8 5s
}
}
/next group_member
/if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(!${Bool[${hit_point_symbo_groupl_buff}]})) /call Cast "${hit_point_symbo_groupl_buff}" gem8 10s
/if ((${Math.Calc[${Group}-${pallycount}]}<2)||(${Bool[${hit_point_symbo_groupl_buff}]})) {
/for group_member 0 to ${Group}
/target id ${Group.Member[${group_member}].ID}
/delay 1s ${Target.ID}==${Group.Member[${group_member}].ID}
/if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${hit_point_symbol_buff}" gem8 7s
/next group_member
}
}
| ----- Buff me Single Buffs
/if (${ChatText.Equal[buffme]}) {
/if (!${Group.Member[${Sender}]}) /return
/call CastoMatic "${Sender}" "${melee_guard_buff}" "me" "buff"
/call CastoMatic "${Sender}" "${hit_point_aego_buff}" "me" "buff"
/if (${Select[${Target.Class.ShortName},WAR,BER,BRD,MNK,ROG]}<1) /call CastoMatic "${Sender}" "${spell_haste_buff}" "me" "buff"
}
| ----- Spell Haste
/if (${ChatText.Equal[BoR now!]}) {
/if (!${Group.Member[${Sender}]}) /return
/target myself
/delay 5 ${Target.Name.Equal[${Me}]}
/call Cast "${spell_haste_buff}" gem8 5s
/for group_member 1 to ${Group}
/target id ${Group.Member[${group_member}].ID}
/delay 1s ${Target.ID}==${Group.Member[${group_member}].ID}
/if (${Target.ID}==${Group.Member[${group_member}].ID}) {
/if (${Select[!${Target.Class.ShortName},WAR,BER,BRD,MNK,ROG]}) {
/call Cast "${spell_haste_buff}" gem8 5s
}
}
/next group_member
}
/if (${ChatText.Find[${hit_point_symbol_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${hit_point_symbol_group_buff}" "me" "buff"
/if (${ChatText.Find[${hit_point_symbol_group_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${hit_point_symbol_group_buff}" "me" "buff"
/if (${ChatText.Find[${armor_class_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${armor_class_buff}" "me" "buff"
/if (${ChatText.Find[${hit_point_aego_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${hit_point_aego_buff}" "me" "buff"
/if (${ChatText.Find[${hit_point_aego_group_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${hit_point_aego_group_buff}" "me" "buff"
/if (${ChatText.Find[${spell_haste_buff_ChatoMatic}]}) {
/if (${Select[${Target.Class.ShortName},WAR,BER,BRD,MNK,ROG]}<1) /call CastoMatic "${Sender}" "${ChatText}" "${spell_haste_buff}" "me" "buff"
}
/if (${ChatText.Find[${spell_haste_group_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${spell_haste_group_buff}" "me" "buff"
/if (${ChatText.Find[${melee_guard_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${melee_guard_buff}" "me" "buff"
/if (${ChatText.Find[${melee_guard_group_buff_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${melee_guard_group_buff}" "me" "buff"
| ----- Buff Pet
/if (${ChatText.Equal[buff pet]}) {
/if (!${Group.Member[${Sender}]}) /return
/target ${Spawn[${Sender}].Pet}
/delay 8
/target ${Spawn[${Sender}].Pet}
/call Cast "${armor_class_buff}" gem8 7s
/call Cast "${hit_point_symbol_buff}" gem8 7s
}
| ----- DA Pet - requires AA
/if (${ChatText.Equal[da pet]}) {
/if (!${Group.Member[${Sender}]}) /return
/target ${Spawn[${Sender}].Pet}
/delay 6
/target ${Spawn[${Sender}].Pet}
/if (${Me.AltAbilityReady[39]}) /if (${Target.Name}.Equal[${Spawn[${Sender}].Pet.Name}]}) {
/call Cast "39" alt
} else {
/chat #${my_channel} Bestow Divine Aura is not ready, or Target ( %T ) OOR or wrong target
}
}
| - Chat Misc --------------------------------------------------------------------
/if (${ChatText.Find[${aura_spell_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "${aura_spell}" "me" "buff" "aura_spell_use"
/if (${ChatText.Find[${debug_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "debug" "me" "buff" "debug"
/if (${ChatText.Find[${announce_ChatoMatic}]}) /call CastoMatic "${Sender}" "${ChatText}" "announce" "me" "buff" "announce"
| ----- Command List
/if (${ChatText.Equal[Commands]}) {
/declare temp_announce local ${announce}
/if (!${Group.Member[${Sender}]}) /return
/varset announce 1
/declare temp_say_where local ${say_where}
/varset say_where echo
/if (${announce}) /${say_where} List of Commands:
/if (${announce}) /${say_where} - Heals --------------------------------------
/if (${announce}) /${say_where} ${complete_heal} = ${complete_heal_ChatoMatic}
/if (${announce}) /${say_where} ${patch_heal} = ${patch_heal_ChatoMatic}
/if (${announce}) /${say_where} ${heal_over_time} = ${heal_over_time_ChatoMatic}
/if (${announce}) /${say_where} ${group_heal} = ${group_heal_ChatoMatic}
/if (${announce}) /${say_where} ${remove_curse} = ${remove_curse_ChatoMatic}
/if (${announce}) /${say_where} ${pure_blood} = ${pure_blood_ChatoMatic}
/if (${announce}) /${say_where} Resurrection = ${resurrection_ChatoMatic}
/if (${announce}) /${say_where} Divine Arbitration/Epic = ${divine_arbitration_ChatoMatic}
/if (${announce}) /${say_where} - Attack Spells -------------------------------
/if (${announce}) /${say_where} ${hammer_pet} = ${hammer_pet_ChatoMatic}
/if (${announce}) /${say_where} ${reverse_damage_shield} = ${reverse_damage_shield_ChatoMatic}
/if (${announce}) /${say_where} ${direct_damage_magic} = ${direct_damage_magic_ChatoMatic}
/if (${announce}) /${say_where} ${direct_damage_stun} = ${direct_damage_stun_ChatoMatic}
/if (${announce}) /${say_where} ${direct_damage_undead} = ${direct_damage_undead_ChatoMatic}
/if (${announce}) /${say_where} - Buff Spells ---------------------------------
/if (${announce}) /${say_where} ${hit_point_symbol_buff} = ${hit_point_symbol_buff_ChatoMatic}
/if (${announce}) /${say_where} ${hit_point_symbol_group_buff} = ${hit_point_symbol_group_buff_ChatoMatic}
/if (${announce}) /${say_where} ${armor_class_buff} = ${armor_class_buff_ChatoMatic}
/if (${announce}) /${say_where} ${hit_point_aego_buff} = ${hit_point_aego_buff_ChatoMatic}
/if (${announce}) /${say_where} ${hit_point_aego_group_buff} = ${hit_point_aego_group_buff_ChatoMatic}
/if (${announce}) /${say_where} ${spell_haste_buff} = ${spell_haste_buff_ChatoMatic}
/if (${announce}) /${say_where} ${spell_haste_group_buff} = ${spell_haste_group_buff_ChatoMatic}
/if (${announce}) /${say_where} ${melee_guard_buff} = ${melee_guard_buff_ChatoMatic}
/if (${announce}) /${say_where} ${melee_guard_group_buff} = ${melee_guard_group_buff_ChatoMatic}
/if (${announce}) /${say_where} - Misc ---------------------------------
/if (${announce}) /${say_where} Debug messages = ${debug_ChatoMatic} toggle
/if (${announce}) /${say_where} Aura spell On/Off = ${aura_spell_ChatoMatic} toggle
/if (${announce}) /${say_where} Use Mount = Use Mount
/if (${announce}) /${say_where} Follow Me On/Off = Follow Me/Stop Follow
/varset announce ${temp_announce}
/varset say_where ${temp_say_where}
}
| ----- Follow Me
/if (${ChatText.Equal[Follow me]}) {
/if (!${Group.Member[${Sender}]}) /return
/delay 5
/if (!${Spawn[${Sender}].ID}) {
/echo ${Sender} is not in zone for me to follow!
/return
}
/varset follow_name ${Sender}
/varset following 1
/if (${Me.Mount.ID}) {
/dismount
/if (${mount_use}) {
/varset mount_use 0
/varset mount_use_save_var 1
}
}
:targetfoll
/target pc ${follow_name}
/delay 1s ${Target.Name.Equal[${follow_name}]}
/if (${Target.Name.Equal[${follow_name}]}) {
/goto :Loop
} else /goto :targetfoll
:Loop
/face fast
/if (${Target.Distance}>10) /keypress forward hold
/if (${Target.Distance}<9) /keypress back
/if (!${Target.ID}) /varset following 0
/call CheckEvents
/if ((${Target.Name.Equal[${follow_name}]})&&(${following}>0)) {
/goto :Loop
} else {
/keypress forward
/keypress back
}
}
| ----- Stop Following
/if (${ChatText.Equal[Follow off]}) {
/if (!${Group.Member[${Sender}]}) /return
/varset following 0
/keypress forward
/keypress back
/if (${mount_use_save_var}) {
/varset mount_use 1
/varset mount_use_save_var 0
}
/timed 50 /face pc ${follow_name}
}
/if (${ChatText.Equal[mana check]}) {
/if (!${Group.Member[${Sender}]}) /return
/${say_where} ${Sender} Cleric Mana ${Me.PctMana}%
}
| ----- Slow Camp out of game
/if (${ChatText.Equal[slowcamp]}) {
/if (!${Group.Member[${Sender}]}) /return
/if (${Me.Standing}) /sit
/delay 5m ${Me.PctMana}>=98
/camp
/end
}
| ----- Use Mount - Toggle mount use
/if (${ChatText.Equal[Use Mount]}) {
/if (!${Group.Member[${Sender}]}) /return
/if (${mount_use}) {
/varset mount_use 0
/dismount
/echo I will no longer use my mount!
/if (${announce}) /${say_where} ${Sender} I will no longer use my mount!
} else /if (${mount_use}<1) {
/varset mount_use 1
/echo I will now use my mount!
/if (${announce}) /${say_where} ${Sender} I will now use my mount!
}
}
/doevents GoMana
/return
|----------------------------------------------------------------------------
| SUB: Gain Xp
|----------------------------------------------------------------------------
Sub Event_GainExp
/varset reverse_ds_use_mob 0
/return
|----------------------------------------------------------------------------
| SUB: Event_GoMan
|----------------------------------------------------------------------------
Sub Event_GoMana
/varset GoMana 1
/timed 180 /varset GoMana 0
/call Healgroup
/return
|----------------------------------------------------------------------------
| SUB: Event Out of Food or Drink
|----------------------------------------------------------------------------
Sub Event_OutofFood(Line, MissFoodorDrink)
/if (${NearestSpawn[NPC].Distance}>${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${auto_sit_mob_distance}/3]}]} && ${Me.PctMana}>40) {
/if (${MissFoodorDrink.Arg[1].Equal[food]}) {
/call cast "Abundant Food" gem8 1s
/delay 5 ${Cursor.ID}
/if (${Cursor.ID}) /autoinv
}
/if (${MissFoodorDrink.Arg[1].Equal[drink]}) {
/call cast "Abundant Drink" gem8 1s
/delay 5 ${Cursor.ID}
/if (${Cursor.ID}) /autoinv
}
}
/return
|----------------------------------------------------------------------------
| SUB: Event_GoMoff
|----------------------------------------------------------------------------
Sub Event_GoMoff
/varset GoMana 0
/return
|----------------------------------------------------------------------------
| SUB: Event_Zoned
|----------------------------------------------------------------------------
Sub Event_Zoned
/if (${debug}) /echo You have zoned.
/varset zoned_timer 20s
/return
|----------------------------------------------------------------------------
| SUB: Incoming
|----------------------------------------------------------------------------
Sub Incoming
/if (!${Window[CastingWindow].Open}||${Casttimer}<20) /return
/declare Spawncounter int local
/declare SpawnTempID int local
/for Spawncounter 1 to ${SpawnCount[NPC radius 450 zradius 30]}
/if (${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].Speed}>150) {
/if (${SpawnTempID}) {
/if (${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].Distance}<${Spawn[ID ${SpawnTempID}].Distance}) /varset SpawnTempID ${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].ID}
} else {
/varset SpawnTempID ${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].ID}
}
/varset PossibleIncom TRUE
}
/next Spawncounter
/if (${PossibleIncom}) {
/if (${CastTimer}>${Math.Calc[${Spawn[ID ${SpawnTempID}].Distance}/10]}) {
/echo Interrupting cast.
/call Interrupt
}
/varset PossibleIncom FALSE
}
/return
|----------------------------------------------------------------------------
| SUB: CheckBuffs
|----------------------------------------------------------------------------
Sub CheckBuffs
/if (${healer_rebuff_state} && ${healer_buff_use} && ${NearestSpawn[NPC].Distance}>=75 && ${Me.PctMana}>50) {
/declare i int local 1
/for i 1 to ${healer_buff.Size}
/doevents
/if (${Spell[${healer_buff[${i}]}].Mana}>${Me.CurrentMana}) /goto :skipbuff
/if (${Me.Book[${healer_buff[${i}]}]}==0) /goto :skipbuff
/if (!${Me.Buff[${healer_buff[${i}]}].ID} && ${Spell[${healer_buff[${i}]}].Stacks}) {
/keypress TAB
/delay 3
/target myself
/delay 3
/varset healer_rebuff_use TRUE
/varset Casttimer ${Math.Calc[${Spell[${healer_buff[${i}]}].MyCastTime}*10]}
/call cast "${healer_buff[${i}]}" gem8 5s Incoming
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset healer_rebuff_state FALSE
/keypress TAB
/varset healer_rebuff_use FALSE
}
:skipbuff
/next i
/for i 1 to ${TankBufftodo.Size}
/doevents
/if (${Spell[${TankBufftodo[${i}]}].Mana}>${Me.CurrentMana}) /goto :skipbuff2
/if (${Me.Book[${TankBufftodo[${i}]}]}==0) /goto :skipbuff2
/if (${TankWornOff[${i}]}) {
/target ${tank_name}
/delay 3
/varset healer_rebuff_use TRUE
/varset Casttimer ${Math.Calc[${Spell[${TankBufftodo[${i}]}].MyCastTime}*10]}
/call cast "${TankBufftodo[${i}]}" gem8 5s Incoming
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset TankWornOff[${i}] FALSE
/varset healer_rebuff_state FALSE
}
/varset healer_rebuff_use FALSE
} else /varset healer_rebuff_state FALSE
:skipbuff2
/next i
}
/if (${Me.Gem[${reverse_damage_shield}]}!=8) {
/memspell 8 "${reverse_damage_shield}"
/delay 4s
}
/return
|----------------------------------------------------------------------------
| SUB: Event_WornOff
|----------------------------------------------------------------------------
Sub Event_WornOff(string line, TempSpellname, TempName)
/declare i int local 1
/for i 1 to ${TankBufftodo.Size}
/if (${TempSpellname.Equal[${TankBufftodo[${i}]}]} && ${TempName.Equal[${tank_name}]}) {
/varset healer_rebuff_state TRUE
/varset TankWornOff[${i}] TRUE
}
/next i
/return
|----------------------------------------------------------------------------
| SUB: Event_WornOff2
|----------------------------------------------------------------------------
Sub Event_WornOff2
/declare i int local 1
/for i 1 to ${healer_buff.Size}
/if (!${Me.Buff[${healer_buff[${i}]}].ID} && ${Spell[${healer_buff[${i}]}].Stacks}) /varset healer_rebuff_state TRUE
/next i
/return
|----------------------------------------------------------------------------
| SUB: No Mount
|----------------------------------------------------------------------------
Sub Event_nomount
/declare mount_use int outer 0
/echo We can't use a mount here
/return
|----------------------------------------------------------------------------
| SUB: Mount
|----------------------------------------------------------------------------
Sub Mount
/if (!${Me.Mount.ID} && ${mount_use} && ${NearestSpawn[NPC].Distance}>=75) {
/call Cast "${mount_item_name}" item
}
/return
|----------------------------------------------------------------------------
| SUB: Hammer Pet
|----------------------------------------------------------------------------
Sub Hammer_Pet_Cast
/if (${Me.Pet.ID}) /return
/if (${debug}) /echo Casting hammer pet
/call cast "${hammer_pet}" gem5 3s
/return
|----------------------------------------------------------------------------
| SUB: Direct_Damage
|----------------------------------------------------------------------------
Sub Direct_Damage_Cast(string direct_damage_spell)
/if (${debug}) /echo Sub Direct_Damage Casting ${direct_damage_spell}
/call cast "${direct_damage_spell}" gem6 1s
/delay 5
/return
|----------------------------------------------------------------------------
| SUB: Reverse Damage Shield
|----------------------------------------------------------------------------
Sub Reverse_Damage_Shield_Cast
/if (${debug}) /echo Casting RevDS
/call cast "${reverse_damage_shield}" gem8 3s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset reverse_ds_use_mob 1
/return
|----------------------------------------------------------------------------
| SUB: Check_Clicky
|----------------------------------------------------------------------------
Sub Check_Clicky
/if (!${clicky_item_use}) /return
/declare i int local 1
/for i 1 to ${clicky_item.Size}
/doevents
/if (${Spell[${clicky_item_buff[${i}]}].Stacks} && !${Me.Buff[${clicky_item_buff[${i}]}].ID} && ${NearestSpawn[NPC].Distance}>=75) {
/target myself
/delay 3
/call Cast "${clicky_item[${i}]}" item
}
/next i
/return
|----------------------------------------------------------------------------
| SUB: CheckAura
|----------------------------------------------------------------------------
Sub CheckAura
/if (${aura_spell_use} && ${Me.Aura.Length}==NULL && ${Me.Book[${aura_spell}]}>0 && ${NearestSpawn[NPC].Distance}>=75) {
/if (${announce}) /${say_where} Casting ${aura_spell}
/call cast "${aura_spell}" gem8 3s
}
/return
| ----------------------------------------------------------------------------
| Sub Attack or not
| ----------------------------------------------------------------------------
Sub Attack_or_Not
/return
| ----------------------------------------------------------------------------
| Sub ChatoMatic
| ----------------------------------------------------------------------------
Sub ChatoMatic
/if (${announce} && ${my_channel.Length}>0) {
/if (${leave_all_channels_use}) {
/leaveall
/echo Leaving all channels to reset for chat
}
/join "${my_channel}"
}
/if (${say_where.Equal[my_channel]}) {
/varset say_where chat #${my_channel.Arg[1,:]}
}
/if (${say_where.Equal[/tell]}) {
/varset say_where tell ${tell_who}
}
/delay 5
/return
|----------------------------------------------------------------------------
| SUB: Find Exact Character
|----------------------------------------------------------------------------
Sub FindExactPC(string name)
/declare nameid int local
/declare counter int local 1
:FindNext
/if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return 2
/varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
/if (${debug}) /echo ${NearestSpawn[${counter}, pc ${name}].ID}
/if (${Spawn[${nameid}].CleanName.Equal[${name}]}) {
/target id ${nameid}
/delay 1s ${Target.ID}==${nameid}
/if (${Target.ID}==${nameid}) /return 1
}
/varcalc counter ${counter}+1
/if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return 2
|----------------------------------------------------------------------------
| SUB: Check Target
|----------------------------------------------------------------------------
Sub Check_Target
/varset target_checked 0
/if (!${Target.ID}) /return
/if (${Select[${Target.Type},PC,CORPSE,CHEST,TRIGGER,TRAP,TIMER,ITEM,MOUNT,Mercenary]}) /return
/varset target_checked 19
/return
|----------------------------------------------------------------------------
| SUB: CastoMatic TM
|----------------------------------------------------------------------------
Sub CastoMatic(string Sender,string CastoMatic_chat_text,string CastoMatic_spell,string CastoMatic_target,string CastoMatic_spell_type,string CastoMatic_switch)
/if (!${Group.Member[${Sender}]}) /return
/call FindExactPC ${Sender}
/if (${Macro.Return}!=1) /return
| - Send toggle commands to Toggle_It
/if (${CastoMatic_chat_text.Find[toggle]}) {
/if (${debug}) /echo CastoMatic sending '${CastoMatic_switch} to Sub Toggle_It.
/call Toggle_It ${CastoMatic_switch}
/return
}
| - Looks for the word "them" in chat to target senders target for spell casting.
/if (${CastoMatic_chat_text.Find[them]}) /varset CastoMatic_target other
/if (${CastoMatic_target.Equal[other]}) {
/assist ${Sender}
/delay 1s
}
| - Looks for "attack" key word in spell_type_string to validate targets for attack spells
/if (${CastoMatic_spell_type.Equal[attack]}) {
/call Check_Target
/if (!${target_checked}) /return
}
| - Spell casting and message r
/if (${announce}) /${say_where} Casting ${CastoMatic_spell} on ${Spawn[${Target}].CleanName}
/call cast "${CastoMatic_spell}" gem8 6s
/delay 5
/return
|----------------------------------------------------------------------------
| SUB: Toggle it
|----------------------------------------------------------------------------
Sub Toggle_It(string Toggle_It_Switch)
/if (${Defined[${Toggle_It_Switch}]}) {
/if (${${Toggle_It_Switch}}) {
/varset ${Toggle_It_Switch} 0
/echo Set ${Toggle_It_Switch}: ${${Toggle_It_Switch}}
/if (${announce}) /${say_where} ${Toggle_It_Switch} - Off
} else {
/varset ${Toggle_It_Switch} 1
/echo Set ${Toggle_It_Switch}: ${${Toggle_It_Switch}}
/if (${announce}) /${say_where} ${Toggle_It_Switch} - On
}
}
/return
|----------------------------------------------------------------------------
| SUB: Assign_Spell_Complete_Heal
|----------------------------------------------------------------------------
Sub Assign_Spell_Complete_Heal
/varset Find_Spell[10] string outer
/varset Find_Spell[1] Promised Recuperation Rk. III
/varset Find_Spell[2] Promised Recuperation Rk. II
/varset Find_Spell[3] Promised Recuperation
/varset Find_Spell[4] Promised Restoration Rk. III
/varset Find_Spell[5] Promised Restoration Rk. II
/varset Find_Spell[6] Promised Restoration
/varset Find_Spell[7] Promised Renewal Rk. III
/varset Find_Spell[8] Promised Renewal Rk. II
/varset Find_Spell[9] Promised Renewal
/varset Find_Spell[10] Complete Heal
/call Find_Memorize_Spell "complete_heal" 1
/return
|----------------------------------------------------------------------------
| SUB: Assign_Spell_Patch_Heal
|----------------------------------------------------------------------------
Sub Assign_Spell_Patch_Heal
/varset Find_Spell[20]
/varset Find_Spell[1] Devout Light Rk. III
/varset Find_Spell[2] Devout Light Rk. II
/varset Find_Spell[3] Devout Light
/varset Find_Spell[4] Solemn Light Rk. III
/varset Find_Spell[5] Solemn Light Rk. II
/varset Find_Spell[6] Solemn Light Rk
/varset Find_Spell[7] Sacred Light Rk. III
/varset Find_Spell[8] Sacred Light Rk. II
/varset Find_Spell[9] Sacred Light Rk
/varset Find_Spell[10] Ancient Hallowed Light
/varset Find_Spell[11] Pious Light
/varset Find_Spell[12] Holy Light
/varset Find_Spell[13] Supernal Light
/varset Find_Spell[14] Ethereal Light
/varset Find_Spell[15] Divine Light
/varset Find_Spell[16] Superior Healing
/varset Find_Spell[17] Greater Healing
/varset Find_Spell[18] Healing
/varset Find_Spell[19] Light Healing
/varset Find_Spell[20] Minor Healing
/call Find_Memorize_Spell "patch_heal" 2
/return
|----------------------------------------------------------------------------
| SUB: Assign_Spell_Heal_Over_Time
|----------------------------------------------------------------------------
Sub Assign_Spell_Heal_Over_Time
/varset Find_Spell[17] string outer
/varset Find_Spell[1] Devout Elixir Rk. III
/varset Find_Spell[2] Devout Elixir Rk. II
/varset Find_Spell[3] Devout Elixir
/varset Find_Spell[4] Solemn Elixir Rk. III
/varset Find_Spell[5] Solemn Elixir Rk. II
/varset Find_Spell[6] Solemn Elixir
/varset Find_Spell[7] Sacred Elixir Rk. III
/varset Find_Spell[8] Sacred Elixir Rk. II
/varset Find_Spell[9] Sacred Elixir
/varset Find_Spell[10] Pious Elixir
/varset Find_Spell[11] Holy Elixir
/varset Find_Spell[12] Supernal Elixir
/varset Find_Spell[13] Ethereal Elixir
/varset Find_Spell[14] Celestial Elixir
/varset Find_Spell[15] Celestial Healing
/varset Find_Spell[16] Celestial Health
/varset Find_Spell[17] Celestial Remedy
/call Find_Memorize_Spell "heal_over_time" 3
/return
|----------------------------------------------------------------------------
| SUB: Assign_Spell_Group_Heal
|----------------------------------------------------------------------------
Sub Assign_Spell_Group_Heal
/varset Find_Spell[12] string outer
/varset Find_Spell[1] Word of Recovery Rk. III
/varset Find_Spell[2] Word of Recovery Rk. II
/varset Find_Spell[3] Word of Recovery
/varset Find_Spell[4] Word of Vivacity Rk. III
/varset Find_Spell[5] Word of Vivacity Rk. II
/varset Find_Spell[6] Word of Vivacity
/varset Find_Spell[7] Word of Vivification
/varset Find_Spell[8] Word of Redemption
/varset Find_Spell[9] Word of Restoration
/varset Find_Spell[10] Word of Vigor
/varset Find_Spell[11] Word of Healing
/varset Find_Spell[12] Word of Health
/call Find_Memorize_Spell "group_heal" 4
/return
|----------------------------------------------------------------------------
| SUB: Assign_Spell_Group_Heal_Over_Time
|----------------------------------------------------------------------------
Sub Assign_Spell_Group_Heal_Over_Time
/varset Find_Spell[15] string outer
/varset Find_Spell[1] Elixir of Expiation Rk. III
/varset Find_Spell[2] Elixir of Expiation Rk. II
/varset Find_Spell[3] Elixir of Expiation
/varset Find_Spell[4] Elixir of Atonement Rk. III
/varset Find_Spell[5] Elixir of Atonement Rk. II
/varset Find_Spell[6] Elixir of Atonement
/varset Find_Spell[7] Elixir of Redemption Rk. III
/varset Find_Spell[8] Elixir of Redemption Rk. II
/varset Find_Spell[9] Elixir of Redemption
/varset Find_Spell[10] Elixir of Divinity
/varset Find_Spell[11] Ethereal Elixir
/varset Find_Spell[12] Word of Restoration
/varset Find_Spell[13] Word of Vigor
/varset Find_Spell[14] Word of Healing
/varset Find_Spell[15] Word of Health
/call Find_Memorize_Spell "group_heal" 4
/return
|----------------------------------------------------------------------------
| SUB: Find_Memorize_Spell
|----------------------------------------------------------------------------
Sub Find_Memorize_Spell(string spell_desc,int spell_gem)
/declare r int local
/for r 1 to ${Find_Spell.Size}
/if (${Me.Book[${Find_Spell[${r}]}]}) {
/varset spell_to_mem ${Find_Spell[${r}]}
/if (${Me.Gem[${spell_gem}].Name.NotEqual[${spell_to_mem}]} || ${Me.Gem[${spell_gem}].ID}<1) {
/echo My ${spell_desc} spell is >> ${spell_to_mem} <<
/memspell ${spell_gem} "${spell_to_mem}"
}
/delay 25
/return
}
/next r
/return