• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Macro - chrot & Donal's Chestplate of Mourning

FredBeans

Member
Joined
Aug 12, 2022
RedCents
285¢
I'm looking to integrate the Donal's Chestplate of Mourning in the chrot.mac. Thanks for the help ahead of time!
Code:
|3.3
|
|Available Commands
|/chdelay - modify the current delay
|/chstophp - modify the %hp to interrupt ch at
|/chinterrupt - modify if you interrupt ch or not
|/chtanklist - modify (add/remove) tanks to the set list
|/chclrlist - modify (add/remove) clerics to the set list
|/chinfo - display macro data
|/chtankswap - Set a specific player name as the tank (does not have to be in list)
|"/rs TANKSWAP: Tankname" - Set a specific player name as the tank (does not have to be in list)


#event CH "#*# tells #*#, '>> #1# GO NOW!#*#'
#event CH "#*# tell #*#, '>> #1# GO NOW!#*#'
#event CHETankSwap "#*# tells #*#, 'TANKSWAP: #1#'
#event CHETankSwap "#*# tell #*#, 'TANKSWAP: #1#'
#bind Variable_Change /Variable_Change
#bind TankChange /TankChange
#bind ClericChange /ClericChange
#bind TankSwap /TankSwap
#bind CHInfo /CHInfo


Sub Main

|Edit this line to include the names of your clerics in the chain
/declare Cleric_List string outer Cleric1 Cleric2 Cleric3 Cleric4 Cleric5

|Edit this line to include the names of your tanks in rotation
/declare Tank_List string outer Tank1 Tank2 Tank3

|Edit this to change the default delay that macro starts on
/declare CHDelay int outer 6

|Edit this to change to ignore interrupts on CH
/declare CHInterrupt int outer 1

|Edit this to change what hp% to stop casts if tank is above (will alway wait until 1.5s from completed cast)
/declare StopHP int outer 95

|----------------------------DO NOT EDIT BELOW THIS LINE-------------------------------------|
|--------------------------------------------------------------------------------------------|
|--------------------------------------------------------------------------------------------|
/squelch /alias /chdelay /Variable_Change CHDelay
/squelch /alias /chstophp /Variable_Change StopHP
/squelch /alias /chinterrupt /Variable_Change CHInterrupt
/squelch /alias /chtanklist /TankChange
/squelch /alias /chclrlist /ClericChange
/squelch /alias /chtankswap /TankSwap
/squelch /alias /chinfo /CHInfo


/declare Cleric_Int int outer 0
/declare MaxCLR int outer ${Math.Calc[${Cleric_List.Count[ ]}+1]}
/declare NextClr string outer NULL
/declare FindCleric int outer 0
/declare NewClericName string outer NULL
/declare ClericRebuild_Int int outer 0
/declare NewCleric_List string outer

/declare Tank_Int int outer 0
/declare MaxTNK int outer ${Math.Calc[${Tank_List.Count[ ]}+1]}
/declare TankID int outer 0
/declare NewTankName string outer NULL
/declare TankRebuild_Int int outer 0
/declare NewTank_List string outer

/call DetermineNextClr
/call DetermineTank

/echo \agStarting CH Rotation!
/echo \aoThis Cleric: \ap${Me.CleanName}
/echo \arRotation Time: \ap${CHDelay}s
/echo \agInterrupt CH (1/0): \ap${CHInterrupt}
/echo \agInterrupt HP Threshold: \ap${StopHP}
/echo \at Cleric Chain: \ap${Cleric_List}
/echo \at Next Cleric: \ap${NextClr}
/echo \ayTank Line: \ap ${Tank_List}
/echo \ay Next Tank: \ap${Spawn[pc id ${TankID}].CleanName}

:MainLoop
    /doevents
    /delay 5
    /call CheckInterrupt
    /call CheckSit
    /call DetermineNextClr
    /if (!${Target.ID}) /call DetermineTank
    /goto :MainLoop
/return

Sub CheckInterrupt
    /if (${CHInterrupt} && ${Cast.Effect.Name.Equal[Complete Heal]} && ${Target.PctHPs} > ${StopHP} && ${Me.CastTimeLeft} < 2300) {
        /rs Canceling ${Cast.Effect.Name} on ${Target.Name}, HP > ${StopHP}
        /stopcast
        /delay 10 !${Me.CastTimeLeft}
    }
    /if (!${Target.ID}) {
        /rs Canceling ${Cast.Effect.Name}! No Target!!
        /stopcast
        /delay 10 !${Me.CastTimeLeft}
    }
/return

Sub CheckSit
    /if (${Me.PctMana} < 99 && !${Me.Casting.ID} && !${Me.Sitting} && !${Me.Moving}) /sit
    /if (${Me.PctMana} > 99 && ${Me.Sitting}) /stand
/return


Sub Bind_Variable_Change(string VName, int VVar)
    /echo Changing CHRot Variable: ${VName} to value: ${VVar}
    /varset ${VName} ${VVar}
/return

Sub Bind_TankChange(string TName)
/echo Changing CHRot Variable: Tank_List to add/remove: ${TName}
/for Tank_Int 1 to ${MaxTNK}
|Look for the new/remove tank first, if found, assume we are removing
    /if (${Tank_List.Arg[${Tank_Int}].Equal[${TName}]}) {
        /for TankRebuild_Int 1 to ${MaxTNK}
            /if (${Tank_Int}!=${TankRebuild_Int}) {
                /varset NewTank_List ${NewTank_List} ${Tank_List.Arg[${TankRebuild_Int}]}
            }
            /next TankRebuild_Int
        /varset Tank_List ${NewTank_List}
        /varset MaxTNK ${Math.Calc[${Tank_List.Count[ ]}+1]}
        /varset NewTank_List
        /echo \arRemoved \ap${TName}\ar from Tank_List: \ay${Tank_List}
        /return          
    }
    /next Tank_Int
|We've looked through all tanks, no removes found, assume we are adding
    /varset Tank_List ${Tank_List} ${TName}
    /varset MaxTNK ${Math.Calc[${Tank_List.Count[ ]}+1]}
    /varset NewTank_List
    /echo \agAdded \ap${TName}\ag to Tank_List: \ay${Tank_List}
/return

Sub Bind_TankSwap(string TSName)
/echo Changing CHRot Tank to: ${TSName}
/if (${Spawn[pc ${TSName}].ID} && !${Spawn[pc ${TSName}].Dead} && !${Spawn[pc ${TSName}].Linkdead}) {
    /varset TankID ${Spawn[pc ${TSName}].ID}
} else {
    /echo \ar[WARNING] Tank Swap Failed, \ap${TSName}\ar [WARNING]
}
/return

Sub Bind_ClericChange(string CName)
/echo Changing CHRot Variable: Cleric_List to add/remove: ${CName}
/for Cleric_Int 1 to ${MaxCLR}
|Look for the new/remove cleric first, if found, assume we are removing
    /if (${Cleric_List.Arg[${Cleric_Int}].Equal[${CName}]}) {
        /for ClericRebuild_Int 1 to ${MaxCLR}
            /if (${Cleric_Int}!=${ClericRebuild_Int}) {
                /varset NewCleric_List ${NewCleric_List} ${Cleric_List.Arg[${ClericRebuild_Int}]}
            }
            /next ClericRebuild_Int
        /varset Cleric_List ${NewCleric_List}
        /varset MaxCLR ${Math.Calc[${Cleric_List.Count[ ]}+1]}
        /varset NewCleric_List
        /echo \arRemoved \ap${CName}\ar from Cleric_List: \ay${Cleric_List}
        /return          
    }
    /next Cleric_Int
|We've looked through all Cleric, no removes found, assume we are adding
    /varset Cleric_List ${Cleric_List} ${CName}
    /varset MaxCLR ${Math.Calc[${Cleric_List.Count[ ]}+1]}
    /varset NewCleric_List
    /echo \agAdded \ap${CName}\ag to Cleric_List: \ay${Cleric_List}
/return

Sub Bind_CHInfo(string line)
/echo ====================================
/call DetermineNextClr
/if (!${Target.ID}) /call DetermineTank
/echo \aoThis Cleric: \ap${Me.CleanName}
/echo \arRotation Time: \ap${CHDelay}s
/echo \agInterrupt CHs: \ap${CHInterrupt}
/echo \agInterrupt HP Threshold: \ap${StopHP}
/echo \at Cleric Chain: \ap${Cleric_List}
/echo \at Next Cleric: \ap${NextClr}
/echo \ayTank Line: \ap ${Tank_List}
/echo \ay Next Tank: \ap${Spawn[pc id ${TankID}].CleanName}
/echo ====================================
/return


Sub DetermineNextClr
/for Cleric_Int 1 to ${MaxCLR}
|Find this clerics name in the list
    /if (${Spawn[pc ${Cleric_List.Arg[${Cleric_Int}]}].CleanName.Equal[${Me.CleanName}]}) {
|Determine next cleric in the list
:Find_Cleric
        /varset FindCleric ${Math.Calc[${FindCleric}+1]}
        /if (${Math.Calc[${Cleric_Int}+1]} > ${MaxCLR}) {
            /varset Cleric_Int 1
        } else {
            /varset Cleric_Int ${Math.Calc[${Cleric_Int}+1]}
        }
|Confirm that the next cleric in chain is available, cannot be you (if this is the case then it will reset down below in failed find checks)
        /if (${Spawn[pc ${Cleric_List.Arg[${Cleric_Int}]}].ID} && !${Spawn[pc ${Cleric_List.Arg[${Cleric_Int}]}].Dead} && !${Spawn[pc ${Cleric_List.Arg[${Cleric_Int}]}].Linkdead}) {
            /varset NextClr ${Spawn[pc ${Cleric_List.Arg[${Cleric_Int}]}].CleanName}
            /if (${Spawn[pc ${Cleric_List.Arg[${Cleric_Int}]}].ID} == ${Me.ID}) {
                /varset CHDelay 13
                /varset CHInterrupt 0
                /echo \ar[WARNING] No other Cleric on list alive in zone! [WARNING]
            }
            /return
        } else {
            /goto :Find_Cleric
        }
    }
    /next Cleric_Int
/varset NextClr NULL
/echo \ar[WARNING] No Cleric on list alive in zone! [WARNING]
/return

Sub DetermineTank
/for Tank_Int 1 to ${MaxTNK}
|Determine next tank in the list
    /if (${Math.Calc[${Tank_Int}]} > ${MaxTNK}) {
        /varset Tank_Int 1
    }
|Confirm that the next Tank is available
    /if (${Spawn[pc ${Tank_List.Arg[${Tank_Int}]}].ID} && !${Spawn[pc ${Tank_List.Arg[${Tank_Int}]}].Dead} && !${Spawn[pc ${Tank_List.Arg[${Tank_Int}]}].Linkdead}) {
        /varset TankID ${Spawn[pc ${Tank_List.Arg[${Tank_Int}]}].ID}
        /if (!${Target.ID} || ${Target.ID} != ${Spawn[pc ${Tank_List.Arg[${Tank_Int}]}].ID}) {
            /target id ${Spawn[pc ${Tank_List.Arg[${Tank_Int}]}].ID}
        }
        /return
    } else {
        /next Tank_Int
    }
/varset TankID 0
/echo \ar[WARNING] No Tank on list alive in zone! [WARNING]
/return

Sub Event_CHETankSwap(string line, string CHTSName)
/echo Changing CHRot Tank to: ${CHTSName}
/if (${Spawn[pc ${CHTSName}].ID} && !${Spawn[pc ${CHTSName}].Dead} && !${Spawn[pc ${CHTSName}].Linkdead}) {
    /varset TankID ${Spawn[pc ${CHTSName}].ID}
} else {
    /echo \ar[WARNING] Tank Swap Failed, \ap${CHTSName}\ar [WARNING]
}
/return

Sub Event_CH(string line, string who)
|Are we the right cleric being called?
/if (${who.Equal[${Me.CleanName}]}) {
|Do we pass the sanity checks to cast? if not, then lets move to next cleric
|Prioritize CH if it is your turn
    /if (${Me.CastTimeLeft} && ${Me.Casting.ID} != 13) {
        /stopcast
        /delay 15 !${Me.CastTimeLeft}
        /delay 15 ${Cast.Ready[Complete Heal]}
    }
    /if (!${Me.CastTimeLeft} && !${Me.Moving} && ${Cast.Ready[Complete Heal]}) {
|Determine our tank based on who is up if we do not already have a Tank saved as our current tank
        /if (!${Target.ID}) /call DetermineTank
        /call DetermineNextClr
        /if (${Spawn[pc id ${TankID}].ID} && !${Spawn[pc id ${TankID}].Dead} && !${Spawn[pc id ${TankID}].Linkdead}) {
            /if (${Spawn[pc ${NextClr}].ID} && !${Spawn[pc ${NextClr}].Dead} && !${Spawn[pc ${NextClr}].Linkdead}) {
                /if (${Spawn[pc id ${TankID}].Distance} > ${Spell[Complete Heal].Range}) {
                    /rs >> ${NextClr} GO NOW! Could not cast (Out of Range)!
                    /return
                }
                /if (${Me.CurrentMana} < ${Spell[Complete Heal].Mana}) {
                    /rs >> ${NextClr} GO NOW! Could not cast (Out of Mana)!
                    /return
                }
                /if (!${Target.ID} || ${Target.ID} != ${Spawn[pc id ${TankID}].ID}) {
                    /target id ${Spawn[pc id ${TankID}].ID}
                }
                /casting "Complete Heal" -targetid|${TankID}
                /rs CH >>> ${Spawn[pc id ${TankID}].CleanName} <<<
                /delay 5 ${Me.CastTimeLeft}
                /if (!${Me.CastTimeLeft}) /casting "Complete Heal" -targetid|${TankID}
                /delay 5 ${Me.CastTimeLeft}
                /if (!${Me.CastTimeLeft}) /casting "Complete Heal" -targetid|${TankID}
                /if (!${Target.ID}) {
                    /rs >> ${NextClr} GO NOW! Could not cast (Tank not found)!
                    /stopcast
                    /delay 10 !${Me.CastTimeLeft}
                    /return
                }
                /delay ${Math.Calc[${CHDelay}*10-10]}
                /rs >> ${NextClr} GO NOW!
                /return
            } else {
                /rs >> ${NextClr} GO NOW! Could not cast (Next cleric not found)!
                /return
            }
        } else  {
            /rs >> ${NextClr} GO NOW! Could not cast (Tank not found)!
            /stopcast
            /delay 10 !${Me.CastTimeLeft}
            /return
        }
    } else {
        /rs >> ${NextClr} GO NOW! Could not cast (Spell not ready)!
        /return
    }
}
/return
 
Last edited by a moderator:
Bumping the OP.
Willing to donate.
I would also like to add that the BP has a 20sec cast time and no refresh.
 
Bumping the OP.
Willing to donate.
I would also like to add that the BP has a 20sec cast time and no refresh.
I am the original author of this macro and can help you add in the BP.

Few things that will help clarify what you desire.

1) Are you wanting the BP to be casted when the cleric is out of mana? if so do you want the cleric to use spell casting CH as default and BP as back up or vice versa?
2) Are you wanting the BP to be rotated in after x number of CH's?
3) Are you wanting to have a toggle option to use the BP instead of spell casting CH?

Think that would probably cover the majority of the necessities to add support.
 
I am the original author of this macro and can help you add in the BP.

Few things that will help clarify what you desire.

1) Are you wanting the BP to be casted when the cleric is out of mana? if so do you want the cleric to use spell casting CH as default and BP as back up or vice versa?
2) Are you wanting the BP to be rotated in after x number of CH's?
3) Are you wanting to have a toggle option to use the BP instead of spell casting CH?

Think that would probably cover the majority of the necessities to add support.
Thank you for responding!
1) No, I think...
2) I would like this to be an option.
3) Yes
 
Sent ya a PM. Had some life craziness pop up over last week and had to head out of town for a bit. Will be back at it sunday/monday next week and should be able to get an update pushed
 
Macro - chrot & Donal's Chestplate of Mourning

Users who are viewing this thread

Back
Top
Cart