• 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

hitall.mac for DSPL

Joined
May 17, 2015
RedCents
6,058¢
Rich (BB code):
|**
    hitall.mac - http://www.macroquest2.com/phpBB3/viewtopic.php?f=49&t=20205
        Will try to hit everything nearby once until they are all gone!
        Will throw stone if you have it
        Will use spell in specified gem if it is detremental
        Will /melody if BRD and not mq2twisting something and you have Chords of Dissonance 
        Will "/twist once" if BRD and you have Chords of Dissonance (so you can keep a /twist to level your skills)
        
    Usage:
        /mac hitall
            Hit everything near once, repeat till no mobs near, then end.
            
        /mac hitall watch
            Hit everything near once, repeat till no mobs near, then wait.
            Wait and watch for more mobs to show up close enough to engage
    
    Requirements:
        MQ2Melee    
        
    Stolen/Borrowed/Referenced: http://macroquest2.com/wiki/index.php/Main_Page
        (harden) http://www.macroquest2.com/phpBB3/viewtopic.php?f=45&t=13465
        (dannuic) https://www.redguides.com/community/threads/27284-DS-PLing-a-class-without-PBAE
        
    1701a (LamahHerder)
        Initial Release 


    1701b (LamahHerder)
        dewey2461 recomended to avoid using spawncount in /for as it changes. Decided to use an array
    
    1702a (LamahHerder)
        added /bc to announce when done
    
    1702b (LamahHerder)
        +Spellcasting, Use specified gem# (default 1) if within # (default 10) levels and its detrimental.
**|


| hitsmode Normal
#Event hitSuccess         "You backstab |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You bash |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You bite |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You claw |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You crush |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You frenzy on |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You gore |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You hit |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You kick |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You maul |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You pierce |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You punch |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You rend |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You shoot |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You slash |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You slice |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You smash |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You stab |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You sting |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You strike |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "You sweep |${Target.CleanName}| for #1# #*# of damage."


| hitsmode Abbreviated
#Event hitSuccess         "backstab |${Target.CleanName}| for #1#"
#Event hitSuccess         "bash |${Target.CleanName}| for #1#"
#Event hitSuccess         "bite |${Target.CleanName}| for #1#"
#Event hitSuccess         "claw |${Target.CleanName}| for #1#"
#Event hitSuccess         "crush |${Target.CleanName}| for #1#"
#Event hitSuccess         "frenzy on |${Target.CleanName}| for #1#"
#Event hitSuccess         "gore |${Target.CleanName}| for #1#"
#Event hitSuccess         "hit |${Target.CleanName}| for #1#"
#Event hitSuccess         "kick |${Target.CleanName}| for #1#"
#Event hitSuccess         "maul |${Target.CleanName}| for #1#"
#Event hitSuccess         "pierce |${Target.CleanName}| for #1#"
#Event hitSuccess         "punch |${Target.CleanName}| for #1#"
#Event hitSuccess         "rend |${Target.CleanName}| for #1#"
#Event hitSuccess         "shoot |${Target.CleanName}| for #1#"
#Event hitSuccess         "slash |${Target.CleanName}| for #1#"
#Event hitSuccess         "slice |${Target.CleanName}| for #1#"
#Event hitSuccess         "smash |${Target.CleanName}| for #1#"
#Event hitSuccess         "stab |${Target.CleanName}| for #1#"
#Event hitSuccess         "sting |${Target.CleanName}| for #1#"
#Event hitSuccess         "strike |${Target.CleanName}| for #1#"
#Event hitSuccess         "sweep |${Target.CleanName}| for #1#"


| Spells and Procs
#Event hitSuccess         "|${Target.CleanName}| has taken #1# damage from your #*#"
#Event hitSuccess         "|${Target.CleanName}| was hit by non-melee for #1# #*# of damage."
#Event hitSuccess         "|${Me}| hit |${Target.CleanName}| for #1# #*# of non-melee damage."


| Pet hit's
#Event hitSuccess         "|${Me.Pet.CleanName}| backstabs |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| bashes |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| bites |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| claws |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| crushes |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| frenzies on |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| gores |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| hit |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| hits |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| kicks |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| mauls |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| pierces |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| punches |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| rends |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| shoots |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| slashes |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| slices |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| smashes |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| stabs |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| stings |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| strikes |${Target.CleanName}| for #1# #*# of damage."
#Event hitSuccess         "|${Me.Pet.CleanName}| sweeps |${Target.CleanName}| for #1# #*# of damage."


sub main
    
    | --- Personalize these Settings
        /declare spellGem int outer 1
        /declare maxLevelDiff int outer 10
        /declare radiusZ int outer 30
        /declare radiusXY int outer 75
        /declare timerWaitToHit timer outer 2s
        /declare noHitZoneShortName string outer PoKnowledge,Bazaar,Nexus
    
    | --- Leave alone
        /declare hitThisNPC int outer 1
        /declare npcHit int outer
        /declare hitNum int outer
        /declare hitTotal int outer
        
    /if (${Param0.Equal[watch]}) {
        /call checkForMobs
        } else {
            /if ( ${Bool[${SpawnCount[npc targetable los radius ${radiusXY} zradius ${radiusZ}]}]} && !${Select[${Zone.ShortName},${noHitZoneShortName}]} ) /call hitAll
            /end
            }
/end


sub checkForMobs
    /echo [${Macro.Name} @ ${Macro.CurLine}] ---> sub checkForMobs
    :loopForMobs
        /if ( ${Bool[${SpawnCount[npc targetable los radius ${radiusXY} zradius ${radiusZ}]}]} && !${Select[${Zone.ShortName},${noHitZoneShortName}]} ) /call hitAll
        /doevents
        /delay 5
    /goto :loopForMobs
/end


sub hitAll
    
    /echo [${Macro.Name} @ ${Macro.CurLine}] ---> I will hitAll in [${timerWaitToHit}]
        /if ( !${timerWaitToHit} ) /varset timerWaitToHit ${timerWaitToHit.OriginalValue}
        /delay ${timerWaitToHit}


    
    :startHitAll


        /varset hitTotal ${SpawnCount[npc targetable los radius ${radiusXY} zradius ${radiusZ}]}
        /declare hitArrayID[${hitTotal}] int local
        /varset hitNum 1
        /for hitNum 1 to ${hitTotal}
            /varset hitArrayID[${hitNum}] ${NearestSpawn[${hitNum}, npc targetable los radius ${radiusXY} zradius ${radiusZ}].ID}
            /echo ${hitNum} ${hitArrayID[${hitNum}]} of ${hitTotal}
        /next hitNum


        /varset hitNum 1
        
        /if ( ${Me.Class.ShortName.Equal[BRD]} && ${Me.Gem[Chords of Dissonance]} ) {
            /if ( ${Twist.Twisting} ) {
                /twist once ${Me.Gem[Chords of Dissonance]} ${Me.Gem[Chords of Dissonance]} ${Me.Gem[Chords of Dissonance]} ${Me.Gem[Chords of Dissonance]}
                } else {
                    /melody ${Me.Gem[Chords of Dissonance]} ${Me.Gem[Chords of Dissonance]}
                    }
            }
        
        /for hitNum 1 to ${hitTotal}
            /if ( ${Spawn[${hitArrayID[${hitNum}]}].Type.Equal[NPC]} ) {
                /target id ${hitArrayID[${hitNum}]}
                } else {
                    /next hitNum
                    }
                    
            /varset npcHit 0
            /delay 20 ${Target.ID}==${hitArrayID[${hitNum}]}
            /stick 8 uw !front


            :hitEm
                /if ( ${Me.Dead} ) /end
                /delay 1
                /if (  ${Math.Calc[${Me.Level} + ${maxLevelDiff}]}>=${Target.Level} && ${Target.Distance}<=${Target.MaxRangeTo} && ${Spell[${Me.Gem[${spellGem}]}].Mana}<=${Me.ManaCurrent} && ${Spell[${Me.Gem[${spellGem}]}].SpellType.Equal[Detrimental]} && ${Me.SpellReady[${Me.Gem[${spellGem}]}]} ) {
                        /delay 5
                        /cast ${spellGem}
                        /delay ${Spell[${Me.Gem[${spellGem}]}].CastTime.Float}s
                        /delay 5
                        }
                /if ( !${Me.Combat} ) /squelch /attack on
                /if ( ${Me.CombatAbilityReady[Throw Stone]} ) {
                    /doability "Throw Stone"
                    /delay 1
                    }
                /doevents
            /if ( !${npcHit} && ${Target.Type.Equal[NPC]} ) /goto :hitEm
                
                | Melee down if last NPC
                /while ( ${Target.Type.Equal[NPC]} && ${SpawnCount[npc targetable los radius ${radiusXY} zradius ${radiusZ}]} == 1 && !${Select[${Zone.ShortName},${noHitZoneShortName}]} ) {
                    /echo Killing last Mob
                    /delay 1s
                    /doevents flush
                    }
        /next hitNum
    
    | Cleanup
    /bc [${Macro.Name}] hitAll-Done!
    /if ( ${Bool[${SpawnCount[npc targetable los radius ${radiusXY} zradius ${radiusZ}]}]} && !${Select[${Zone.ShortName},${noHitZoneShortName}]} ) {
        /deletevar hitArrayID
        /goto :startHitAll
        }
    /if ( ${Me.Combat} ) /attack off
    /if ( ${Me.Class.ShortName.Equal[BRD]} && ${Me.Gem[Chords of Dissonance]} ) /melody off
/return




Sub Event_hitSuccess(Line, int hitDMG)
    /varset npcHit 1
    /echo [${Macro.Name}] [${hitNum} of ${hitTotal}] - [${hitDMG}] - [${Target.ID}] - [${Target.CleanName}]
    /delay 5
    /doevents flush
/return
 
Last edited:
This shit has needed a re-write since like 2006. Thanks, man.
 
Rich (BB code):
	1702b (LamahHerder)
		+Spellcasting, Use specified gem# (default 1) if within # (default 10) levels and its detrimental.

I think this is done for now, not the prettiest but it does what I need it to


If you have another macro that you use when doing reverse DSPL you can add this event to it so it can do it's DS when your noob has hit everything.

This is some sample code from one of mine

Rich (BB code):
#event hitAllDone         "#*# [hitall.mac] hitAll-Done!"


sub main
    /declare lowbieKillingMacro string outer hitall.mac watch
    /declare lowbieKillMacroDone string outer
    
    :loopWait
        /doevents
        /if ${lowbieKillMacroDone.Equal[hitAllDone]} /call doDmgShield
    /goto :loopWait
/return


sub event_hitAllDone
    /varset lowbieKillMacroDone hitAllDone
    /echo lowbieKillMacroDone ${lowbieKillMacroDone}
/return
 
hitall.mac for DSPL

Users who are viewing this thread

Back
Top
Cart