• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

zerker mac add-on request (1 Viewer)

zippy42167

New member
Joined
Jan 31, 2006
RedCents
I use this mac provided by Eryi. This pretty much does everything I want my zerker to be able to do. The way it is, you can just target anything and press attack, and it will do the rest for ya.

My request(s):

-Add an auto-assist feature so you can target a member of the group, and type /autoassist, so when a mob being pulled hits 98% health, the zerker will automatically engage the target, and proceed to use the rest of the mac, the way it's set up.

-(Optional)-Add a feature so it will snare mobs at 30%

My main concern is that the rest of the macro's functionability doesn't change. As I said, it works perfectly with exception to the autoassist and snare requests.

Rich (BB code):
|zerker.mac 
|By Eryi 
| 
| This is a Berzerker "Wrapper" Macro.  This macro contains the Close-Combat code from m0nk's Stick.mac, altered 
| slightly to work in this setting.  For existing Stick.mac users, this macro will continue to use all previous 
| settings used under Stick.mac (and the same INI files to boot). 
| Also modified the Stick.mac code to work with Ranged-Only attacks, with Auto-summoning of Throwing Axes if you 
| run out.  It should Auto-Inv the axes and continue with the combat. It does it's best to determine your highest 
| level throwing axe and will use that one. 
| 
| Currently, the Macro is defaulted to a Throwing range of 120, this can be tweaked at your leisure with the 
| RangedDistance Variable below.  As best I can, I've forward-compatible'd the macro to meet the level change 
| in the upcoming expansion, listed in the pMax_Level variable.  When the expansion comes out live, you should 
| just have to update that variable and the Axes INI file. 
| 
| 
| 
| USAGE: /macro zerker.mac Close <OpenCorpse> <Melee_Ability1> <Melee_Ability2> <Melee_Ability3> 
| 
| Example:  /macro zerker.mac close 0 "Frenzy" 
|           Will Engage Close Combat, Not Auto-Open Corpses and will Use Frenzy as often as Possible 
| 
| 
| 
| USAGE: /macro zerker.mace Ranged <AutoFollow NPC> 
| 
| Example:  /macro zerker.mac Ranged 1 
|           Will Engaged Ranged Combat and attempt to keep you at the RangedDistance 
| 
| Will Turn on the Ranged Attacks ONLY - Use your Auto-Attack Key to Toggle It Engaged/Disengaged.  Has a 
| Max "Distance" of 300.  I figure if its over that, you probably want to move closer on your own. 
| 
| Please Note: The Ranged Attacks Will Attempt to Keep at the RangedDistance unless you tell it not too as 
| the AutoFollow NPC is turned *ON* by Default 

#turbo 40 
#Event DiscInter "#*#Your Combat ability is interrupted.#*#" 
#Event NoComps "#*#You are missing some #*# Axe Components" 
#Event NoRanged "#*#You do not have a ranged weapon equipped#*#" 
#Event slain "#*#You have slain#*#" 
#Event slain "#*#has been slain by#*#" 
#Event RageON "#*#has become ENRAGED.#*#" 
#Event RageOFF "#*#is no longer enraged#*#" 
#Event MobGate "#*# Gates.#*#" 
#Event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#" 
#Event StunON "#*#You are stunned#*#" 
#Event StunON "#*#You lose control of yourself!#*#" 
#Event StunOFF "#*#You are unstunned#*#" 
#Event StunOFF "#*#You have control of yourself again.#*#" 

Sub Main 

   /declare axeType outer 
   /declare pLevel int outer ${Me.Level} 
   /declare pMax_Level int outer 65 
   /declare ini_file outer    
   /declare newpMax_Level int outer 
   /declare combat_type string outer 
   /declare MeleeAttack_1 string outer 
   /declare MeleeAttack_2 string outer 
   /declare MeleeAttack_3 string outer 
   /declare OpenCorpse outer 
   /declare MobID outer 
        /declare RangedDistance outer 
   /declare Use_Follow outer 

   | Set this to the Maximum Level you can obtain (as controlled by expansions you have) 
   /varset pMax_Level 70 
        /varset RangedDistance 120 

   /echo Toggling Auto-Attack on Assist Off - We Really don't Want you jumping the Gun 
   /assist off 

   /if (!${Defined[Param0]}) { 
      /echo Please choose your Combat Type: Ranged or Close 
      /echo USAGE: /macro zerker.mac Close <OpenCorpse> <Melee_Ability1> <Melee_Ability2> <Melee_Ability3> 
      /echo USAGE: /macro zerker.mace Ranged <AutoFollow NPC> 
      /echo NOTE: AutoFollow NPC is *ON* By Default 
      /endmacro 
   } else { 
      /if (${Param0.Equal["Ranged"]}) { 
         /echo Range Attacks Selected 
         /if (!${Defined[Param1]}) { 
            /declare CCParam1 outer 
            /varset CCParam1 1    
         } else { 
            /declare CCParam1 outer 
            /varset CCParam1 ${Param1} 
         }    
         /call Find_Axe 
         /call Ranged_Entry 
      } else { 
         /if (${Param0.Equal["Close"]}) { 
         /echo Close Combat Selected 
         /if (${Defined[Param1]}) { 
            /declare CCParam1 outer 
            /varset CCParam1 ${Param1} 
         } 
         /if (${Defined[Param2]}) { 
            /declare CCParam2 outer 
            /varset CCParam2 ${Param2} 
         } 
         /if (${Defined[Param3]}) { 
            /declare CCParam3 outer 
            /varset CCParam3 ${Param3} 
         } 
         /if (${Defined[Param4]}) { 
            /declare CCParam4 outer 
            /varset CCParam4 ${Param4} 
         } 
         /call Close_combat 
      } 
   } 

          
/endmacro 

Sub Find_Axe 
| Find the Highest Level Throwing Axe you current Can both use AND Have. 
| Compensates for the 2 level 65 Axes by seeing if you have the Tainted 
| Axe of Hatred first, and if you do, will use it over the Deathfury's 
| Axe 
| This should be Frontwards Compatible with OoW and Future Expansions 

   :pMax_LevelLoop 
   /if (${pLevel}>=${pMax_Level}) { 
      /if (${pMax_Level}==65) { 
         /if (!${Me.CombatAbility[Tainted Axe of Hatred].Equal[NULL]}) { 
            /varset pMax_Level 651 
         } else { 
            /varset pMax_Level 652 
         } 
      } 
      /varset axeType ${Ini["zerker_axes.ini","Axes",${pMax_Level},1]} 
      /if (${axeType.Equal[NULL]}) { 
         /echo Screwed Something Up 
         /endmacro 
      } 

      /if (${Me.CombatAbility[${axeType}]}==NULL) { 
         /varset newpMax_Level ${Math.Calc[${pMax_Level}-5]} 
         /varset pMax_Level ${newpMax_Level} 
         /goto :pMax_LevelLoop 
      } 
   } else { 
      /varset newpMax_Level ${Math.Calc[${pMax_Level}-5]} 
      /varset pMax_Level ${newpMax_Level} 
      /goto :pMax_LevelLoop 
   } 
   /echo Highest Level Axe Found was ${axeType} 
/return 


Sub Close_Combat 
  :setDeclares 
    /declare PCini outer 
    /declare NPCini outer 
    /declare MA_SB outer 
    /declare CharX outer 
    /declare CharY outer 
    /declare MOBini outer 
    /declare AutoLoot outer 
    /declare TankToggle outer 
    /declare MeleeDistance outer 
    /declare DefaultMeleeDistance outer 

  :setGenericVars 
    /varset MA_SB NULL 
    /varset TankToggle NULL 
    /varset PCini stick-pc.ini 
    /varset NPCini stick-npc.ini 
  
  :NewCharacterCheck 
    /varset OpenCorpse ${Ini[${PCini},${Me.Name},OpenCorpse]} 
    /if (${OpenCorpse.Equal[NULL]}) /goto :NewCharacter 

  :setParams 
   /if (${Defined[CCParam1]}) { 
      /varset OpenCorpse ${CCParam1} 
        } else { 
      /varset OpenCorpse ${Ini[${PCini},${Me.Name},OpenCorpse]} 
        } 

   /if (${Defined[CCParam2]}) { 
      /varset MeleeAttack_1 ${CCParam2} 
   } else { 
          /varset MeleeAttack_1 ${Ini[${PCini},${Me.Name},MeleeAttack_1]} 
       } 

   /if (${Defined[CCParam3]}) { 
      /varset MeleeAttack_2 ${CCParam3} 
   } else { 
           /varset MeleeAttack_2 ${Ini[${PCini},${Me.Name},MeleeAttack_2]} 
        } 
          
   /if (${Defined[CCParam4]}) { 
            /varset MeleeAttack_3 ${CCParam4} 
        } else { 
           /varset MeleeAttack_3 ${Ini[${PCini},${Me.Name},MeleeAttack_3]} 
        } 



  :setINIvalues 
    /if (${OpenCorpse.Equal[NULL]}) /varset OpenCorpse ${Ini[${PCini},${Me.Name},OpenCorpse]} 
    /if (${MeleeAttack_1.Equal[NULL]}) /varset MeleeAttack_1 ${Ini[${PCini},${Me.Name},MeleeAttack_1]} 
    /if (${MeleeAttack_2.Equal[NULL]}) /varset MeleeAttack_2 ${Ini[${PCini},${Me.Name},MeleeAttack_2]} 
    /if (${MeleeAttack_3.Equal[NULL]}) /varset MeleeAttack_3 ${Ini[${PCini},${Me.Name},MeleeAttack_3]} 
    /varset DefaultMeleeDistance ${Ini[${PCini},${Me.Name},DefaultMeleeDistance]} 

  :StickBegin 
    /if (!${MeleeAttack_1.Equal[NONE]}) /echo Auto ${MeleeAttack_1} when available. 
    /if (!${MeleeAttack_2.Equal[NONE]}) /echo Auto ${MeleeAttack_2} when available. 
    /if (!${MeleeAttack_3.Equal[NONE]}) /echo Auto ${MeleeAttack_3} when available. 
    /if (!${OpenCorpse.Equal[0]}) /echo Auto Open Corpse 
  /goto :sub_combat_loop 
  
  :NewCharacter 
    /ini "${PCini}" ${Me.Name} AutoLoot 0 
    /ini "${PCini}" ${Me.Name} OpenCorpse 0 
    /ini "${PCini}" ${Me.Name} DefaultMeleeDistance 11 
      
    /ini "${PCini}" ${Me.Name} MeleeAttack_1 NONE 
    /ini "${PCini}" ${Me.Name} MeleeAttack_2 NONE 
    /ini "${PCini}" ${Me.Name} MeleeAttack_3 NONE 

    /ini "${PCini}" ${Me.Name} ClickItem_1 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_1 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_1 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_2 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_2 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_2 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_3 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_3 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_3 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_4 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_4 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_4 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_5 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_5 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_5 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_6 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_6 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_6 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_7 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_7 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_7 NONE 
    /ini "${PCini}" ${Me.Name} ClickItem_8 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSlot_8 NONE 
    /ini "${PCini}" ${Me.Name} ClickItemSpell_8 NONE 
    
    /ini "${PCini}" ${Me.Name} RestSpellName_1 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_1 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_2 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_2 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_3 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_3 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_4 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_4 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_5 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_5 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_6 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_6 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_7 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_7 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellName_8 NONE 
    /ini "${PCini}" ${Me.Name} RestSpellBuff_8 NONE 
    
    /ini "${PCini}" ${Me.Name} InstantClickItem_1 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_1 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_1 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_2 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_2 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_2 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_3 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_3 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_3 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_4 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_4 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_4 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_5 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_5 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_5 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_6 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_6 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_6 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_7 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_7 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_7 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItem_8 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSlot_8 NONE 
    /ini "${PCini}" ${Me.Name} InstantClickItemSpell_8 NONE 

  /echo ${Me.Name} has been added to ${PCini}. Please re-run macro (also go edit ${PCini}) 
/endmacro 
  
:sub_combat_loop 
   /if (${Me.Combat}) /call Attack 
   /doevents 
     /goto :sub_combat_loop 

/return 

Sub attack 
  :attackCheck 
    /if (!${Target.Type.Equal["NPC"]}) { 
      /attack off 
      /return 
      } 

    /if (${Target.Distance}>150) /attack off 

  :attackSetup 
    /varset MobID ${Target.ID} 

  :attackPreFight 
    /call ClearReturn 
    /if (${Me.Pet.ID}) /pet attack 

    /varset MeleeDistance ${Ini[${NPCini},${Zone.ShortName},${Target.CleanName}.DistanceMelee]} 
    /if (${MeleeDistance.Equal[NULL]}) { 
      /ini "${NPCini}" "${Zone.ShortName}" "${Target.CleanName}.DistanceMelee" "${DefaultMeleeDistance}" 
      /varset MeleeDistance ${Ini[${NPCini},${Zone.ShortName},${Target.CleanName}.DistanceMelee]} 
      } 

  :attackMeleeLoop 
    /doevents slain 
    /doevents RageOn 
    /doevents MobGate 
    /doevents StunON 
    /doevents ToggleTank 
    /doevents TankThisRound 
    /if (${Target.ID}!=${MobID}) /goto :attackend 
    /if (${Macro.Return.Equal["EndATK"]}) /goto :attackend 
    /if (!${Me.Combat}) /goto :attackend 
    /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID} && ${Me.FeetWet})  /face fast 
    /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID} && !${Me.FeetWet}) /face fast nolook 
    /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}>${MeleeDistance}) /keypress FORWARD HOLD 
    /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /keypress FORWARD 
    /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}<=${Math.Calc[${MeleeDistance}-5]}) /keypress BACK HOLD 
    /if (!${MeleeAttack_1.Equal[NONE]}) /if (!${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /if (${Me.AbilityReady[${MeleeAttack_1}]}) /doability ${MeleeAttack_1} 
    /if (!${MeleeAttack_2.Equal[NONE]}) /if (!${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /if (${Me.AbilityReady[${MeleeAttack_2}]}) /doability ${MeleeAttack_2} 
    /if (!${MeleeAttack_3.Equal[NONE]}) /if (!${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /if (${Me.AbilityReady[${MeleeAttack_2}]}) /doability ${MeleeAttack_3} 
    /if (${TankToggle.NotEqual[NULL]}) /if (!${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /if (${Me.AbilityReady[Tank]}) /doability "Tank" 

    |/if (${Me.Class.Name.Equal[Shadow Knight]}) /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /goto :attackSpellsSK 
  /goto :attackMeleeLoop 

  :attackSpellsSK 
    /if (${Me.Gem[Zevfeer's Bite]}>0) /if (${Me.PctMana}>20) /if (${Target.PctHPs}<90) /call cast "Zevfeer's Bite" 
    /if (${Me.Gem[Aura of Hate]}>0) /if (${Me.PctMana}>20) /if (${Target.PctHPs}<90) /call cast "Aura of Hate" 
    /if (${Me.Gem[Spear of Decay]}>0) /if (${Me.PctMana}>50) /if (${Target.PctHPs}<90) /call cast "Spear of Decay" 
    /if (${Me.Gem[Spear of Plague]}>0) /if (${Me.PctMana}>50) /if (${Target.PctHPs}<90) /call cast "Spear of Plague" 
    /if (${Me.PctHPs}<90) /if (!${Me.Buff[Bond of Death Recourse]}) /if (${Me.Gem[Bond of Death]}>0)  /if (${Me.PctMana}>20) /if (${Target.PctHPs}<90) /call cast "Bond of Death" 
  /goto :attackMeleeLoop 

  :attackend 
    /if (${OpenCorpse}==1) { 
    /doevents slain 
      } 
    /varset MobID 0 
    /if (${TankToggle.NotEqual[NULL]}) /varset TankToggle NULL 
    /attack off 
    /pet backoff 
    /pet hold 
    /keypress FORWARD 
/return 

Sub ClearReturn 
/return NULL 

Sub event_slain 
  /if (${Target.CurrentHPs}>0) /return 
  /if (${OpenCorpse}==0) /return EndATK 
  |/if (${Target.Type.NotEqual[Corpse]}) 
  /target id ${MobID} 
  /loot 
  /keypress FORWARD 
  /loot 
  /loot 
  /loot 
/return EndATK 

Sub event_RageOn 
  /if (${Target.CurrentHPs}>15) /return 
  /if (${Target.CurrentHPs}==0) /return 
  /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID}) /keypress FORWARD 
  /call ClearReturn 
  /echo Rage On 
  /attack off 
  /pet back off 
  /pet hold 
  /call ClearReturn 

  :waitRage 
    /doevents 
    /if (${Target.ID}!=${MobID}) /return EndATK 
    /if (${Macro.Return.Equal["EndATK"]}) /return EndATK 
    /if (${Macro.Return.Equal["RageOFF"]}) /return 
/goto :waitRage 

Sub event_RageOFF 
  /echo Rage OFF 
  /attack on 
/return RageOFF 

Sub event_MobGate 
  /if (${Target.Distance}<100) /return 
  /echo MOB GATED! 
  /attack off 
/return EndATK 

Sub event_Invited 
  /invite 
/return 

Sub event_StunON 
  /doevents flush StunOFF 
  /call ClearReturn 

  :LoopStunOFF 
    /doevents StunOFF 
    /if (${Macro.Return.Equal["StunOFF"]}) { 
    /call ClearReturn 
    /return 
      } 
/goto :LoopStunOFF 

Sub event_StunOFF 
/return StunOFF 

Sub event_TankThisRound 
  /if (${TankToggle.NotEqual[Yes]}) /if (${MeleeAttack_1.NotEqual[Tank]}) /if (${MeleeAttack_2.NotEqual[Tank]}) /if (${MeleeAttack_3.NotEqual[Tank]) { 
  /echo Tanking this round against %t 
  /varset TankToggle Yes 
    } 
/return 

Sub event_ToggleTank 
  /if (${MeleeAttack_1.Equal[Tank]}) { 
    /varset MeleeAttack_1 NULL 
    /echo Will no longer Tank. 
    /return 
    } 
  /if (${MeleeAttack_2.Equal[Tank]}) { 
    /varset MeleeAttack_2 NULL 
    /echo Will no longer Tank. 
    /return 
    } 
  /if (${MeleeAttack_3.Equal[Tank]}) { 
    /varset MeleeAttack_3 NULL 
    /echo Will no longer Tank. 
    /return 
    } 
  /if (${MeleeAttack_1.Equal[NULL]}) { 
    /varset MeleeAttack_1 Tank 
    /echo Auto ${MeleeAttack_1} when availiable. 
    /return 
    } 
  /if (${MeleeAttack_2.Equal[NULL]}) { 
    /varset MeleeAttack_2 Tank 
    /echo Auto ${MeleeAttack_2} when availiable. 
    /return 
    } 
  /if (${MeleeAttack_3.Equal[NULL]}) { 
    /varset MeleeAttack_3 Tank 
    /echo Auto ${MeleeAttack_3} when availiable. 
    /return 
    } 
/return 

Sub event_ToggleOpenCorpse 
  /if (${OpenCorpse}==0) { 
    /varset OpenCorpse 1 
    /echo OpenCorpse On 
    /return 
    } 
  /if (${OpenCorpse}==1) { 
  /varset OpenCorpse 0 
    /echo OpenCorpse Off 
    } 
/return 

Sub Event_NoRanged 
   /declare going_back int local 1 
   /popup Out Of Axes - Attempting to Make ${axeType} and Carry On 
   /echo Attempting to Make ${axeType} 
   /attack off 
   /delay 1s 
   /disc ${axeType} 
   /delay 5s 
                /doevents NoComps 
   /if (${Cursor.ID}) /autoinv 
   /call Ranged_Attack $(going_back) 
/return 

Sub Ranged_Combat 

:sub_combat_loop 
   /if (${Me.Combat}) /call Ranged_Attack 
   /doevents 
    /goto :sub_combat_loop 

/return 

Sub Ranged_Entry 

   /echo Setting Minimum Ranged Combat Distance at ${RangedDistance} 
   /if (${Defined[CCParam1]}) { 
   /if (${CCParam1}==TRUE) { 
      /echo Set to Auto-Follow NPC to Keep Distance 
      /varset Use_Follow TRUE 
   } else { 
      /echo Set to Not Auto-Follow NPC to Keep Distance 
      /varset Use_Follow FALSE 
   } 


   :main_ranged_loop 
    /if (${Me.Combat}) /goto :Call_Ranged_Attack 
   /goto :main_ranged_loop 

   :Call_Ranged_Attack 
    /call Ranged_Attack 

    /if (${Macro.Return.Equal["EndATK"]}) /goto :main_ranged_loop 
/return 


Sub Ranged_Attack 

   /if (${Defined[Param0]}) /goto :attackMeleeLoop 

   /attack off 

  :attackCheck 
    /if (!${Target.Type.Equal["NPC"]}) { 
      /attack off 
      /return EndATK 
      } 

    /if (${Target.Distance}>300) /return EndATK 

  :attackSetup 
    /varset MobID ${Target.ID} 

  :attackPreFight 
    /call ClearReturn 
    /if (${Me.Pet.ID}) /pet attack 

  :attackMeleeLoop 
    /doevents StunON 
    /doevents NoRanged 
    /if (!${Target.ID}) /goto :attackend 
    /if (${Target.ID}!=${MobID}) /goto :attackend 
    /if (${Me.Combat}) { 
   /attack off 
   /goto :attackend 
    } 
    /if (${Macro.Return.Equal["EndATK"]}) /goto :attackend 
    /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID} && ${Me.FeetWet})  /face fast 
    /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID} && !${Me.FeetWet}) /face fast nolook 
    /if (${Use_Follow}) { 
       /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}>${RangedDistance}) /keypress FORWARD HOLD 
       /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}<=${RangedDistance}) /keypress FORWARD 
       /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}<=30) /keypress BACK HOLD 
       /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}>35 && ${Target.Distance}<${RangedDistance}) /keypress BACK 
    } 
    /if (${Me.RangedReady}) { 
   /face 
   /ranged 
|   /delay 4s 
    } 
  /goto :attackMeleeLoop 

  :attackend 
    /keypress FORWARD 
    /return EndATK  

/return EndATK 

Sub Event_NoComps 
   /echo Out of Axe Supplies. 
   /endmacro 
/return 

Sub Event_DiscInter 
   /echo Trying again to make more Axes.. 
   /call Event_NoRanged 
/return

Thank you
 
here's the assist sub for you
Rich (BB code):
Sub Assist
/assist ${TankName}
/delay 5
/if (${Target.Type.Equal[PC]} || ${Target.Type.Equal[Corpse]}) /squelch /target clear
/if (!${Target.ID}) /return
/if ${Target.PctHPs}<= ${EngagePct}) {
/attack on
} else {
/squelch /target clear
/return
}
/return
put these into the sub main
Rich (BB code):
/declare TankName String Outer ${Target.CleanName}
/declare EngagePct Int Outer 98
/declare Snare Int Outer 0

put these above sub main
Rich (BB code):
#event Exp "#*#You gain party experience#*#"
#event Exp "#*#You gain experience#*#"
#event Snare "Put whatever the text is on a successful snare"
and for the snare...
Rich (BB code):
Sub Snare
/if (${Me.Target.Type.NotEqual[NPC]) {
/squelch /target clear
/return
}
/if (${Target.PctHps}<=30 && ${Snare}<=0 && ${Me.AbilityReady[Berserker's Snare Ability here]}) {
|don't know how berserkers snare, so put how you snare here
}
/return
 
Sub Event_Snare
/varset Snare 1
/return
 
Sub Event_Exp
/varset Snare 0
/return
 
Could i ask one of you guys to please post the snare sub like above BUT to doing using a spell rather than and ability please. I am trying to get Crystane's pallytank.mac to work for am SK.

Thanks so much
 
took a little tweaking of the code given above, but finally got auto assist to work. still haven't gotten snare to work, and the assist is buggy still. it's my first time working on code, so might take ages to figure out how to fix it =p
 
Muffinnutz said:
Could i ask one of you guys to please post the snare sub like above BUT to doing using a spell rather than and ability please. I am trying to get Crystane's pallytank.mac to work for am SK.

Thanks so much
Rich (BB code):
Sub Snare
/if (${Me.Target.Type.NotEqual[NPC]) {
/squelch /target clear
/return
}
/if (${Target.PctHps}<=30 && ${Snare}<=0 && ${Me.SpellReady[${SnareSpell}]}) {
/call cast ${SnareSpell} ${SnareSpellGem}
}
/return
 
Sub Event_Snare
/varset Snare 1
/return
 
Sub Event_Exp
/varset Snare 0
/return
add this into sub main

Rich (BB code):
/declare SnareSpell string outer "Put Snare Spell Here with quotes"
/declare SnareSpellGem string outer "Gem# you have snare spell in here. with gem in front, ie Gem3 or Gem5"
 
Here it is all in one shot, a zerker helper if you will. The only thing it's missing is a leash function. It's set to assist at 94%, which you can change easily. Also, I added Destroyer's Volley/Rage Volley in there, for a little more dps/throwing skill ups, whatever you wanna use it for. This is Golden for me.
The code is pretty dirty, I just /mac zerker "Frenzy" and this works great, don't use the loot or anything else, just a dps add on. Credit goes to original poster of this macro, zippy for adding assist. All I really did was throw in volley, and changed it to assist at 94, as it has no range check, and will often run out before it should. If someone would like to add a leash to it, I think that would be great, but I'm taking a break. Notepad is making me blind.

PHP:
| Startup: 
|  /mac stick (will use stick-pc.ini settings) 
|  /mac stick disarm kick taunt  (will set your 3 melee actions.) 
| 
| To loot your own corpe: 
|  /echo LootMe 
| 

#turbo 
#event RageON "#*#has become ENRAGED.#*#" 
#event RageOFF "#*#is no longer enraged#*#" 
#event MobGate "#*# Gates.#*#" 
#event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#" 
#event StunON "#*#You are stunned#*#" 
#event StunON "#*#You lose control of yourself!#*#" 
#event StunOFF "#*#You are unstunned#*#" 
#event StunOFF "#*#You have control of yourself again.#*#" 
#event LootMyCorpse "#*#LootMe#*#" 
#event OOR "#*#Your target is too far away, get closer!#*#" 
#event Miss "#*#You try to#*#but miss#*#" 
#event Hit "#*#You#*#for#*#points of damage#*#" 
|#include expreport.inc 

Sub main 
  :setDeclares 
    /declare tankname string outer ${Target}
    /declare PCini outer 
    /declare NPCini outer 
    /declare MA_SB outer 
    /declare MobID outer 
    /declare CharX outer 
    /declare CharY outer 
    /declare MOBini outer 
    /declare MeleeAttack_1 outer 
    /declare MeleeAttack_2 outer 
    /declare MeleeAttack_3 outer 
    /declare MeleeDistance outer 
    /declare DefaultMeleeDistance outer 
    /declare TankToggle outer 
    /declare TargetOOR outer 
        
  :setGenericVars 
    /varset MA_SB NULL 
    /varset TankToggle NULL 
    /varset PCini stick-pc.ini 
    /varset NPCini stick-npc.ini 
  
  :NewCharacterCheck 
    /varset DefaultMeleeDistance ${Ini[${PCini},${Me.Name},DefaultMeleeDistance]} 
    /if (${DefaultMeleeDistance.Equal[NULL]}) /goto :NewCharacter 

  :setParams 
    /if (${Defined[Param0]}) { 
      /varset MeleeAttack_1 ${Param0} 
        } else { 
          /varset MeleeAttack_1 ${Ini[${PCini},${Me.Name},MeleeAttack_1]} 
          } 
        } 
    /if (${Defined[Param1]}) { 
      /varset MeleeAttack_2 ${Param1} 
        } else { 
          /varset MeleeAttack_2 ${Ini[${PCini},${Me.Name},MeleeAttack_2]} 
          } 
        } 
    /if (!${Defined[Param2]}) { 
      /varset MeleeAttack_3 ${Param2} 
        } else { 
          /varset MeleeAttack_3 ${Ini[${PCini},${Me.Name},MeleeAttack_3]} 
          } 
        } 

  :setINIvalues 
    /if (${OpenCorpse.Equal[NULL]}) /varset OpenCorpse ${Ini[${PCini},${Me.Name},OpenCorpse]} 
    /if (${MeleeAttack_1.Equal[NULL]}) /varset MeleeAttack_1 ${Ini[${PCini},${Me.Name},MeleeAttack_1]} 
    /if (${MeleeAttack_2.Equal[NULL]}) /varset MeleeAttack_2 ${Ini[${PCini},${Me.Name},MeleeAttack_2]} 
    /if (${MeleeAttack_3.Equal[NULL]}) /varset MeleeAttack_3 ${Ini[${PCini},${Me.Name},MeleeAttack_3]} 
    /varset DefaultMeleeDistance ${Ini[${PCini},${Me.Name},DefaultMeleeDistance]} 

  :StickBegin 
    |/echo Starting Experience Tracking 
    |/call StartExpTrack 

    /if (!${MeleeAttack_1.Equal[NONE]}) /echo Auto ${MeleeAttack_1} when available. 
    /if (!${MeleeAttack_2.Equal[NONE]}) /echo Auto ${MeleeAttack_2} when available. 
    /if (!${MeleeAttack_3.Equal[NONE]}) /echo Auto ${MeleeAttack_3} when available. 
  /goto :mainloop 
  
  :NewCharacter 
    /ini "${PCini}" ${Me.Name} DefaultMeleeDistance 11 
    /ini "${PCini}" ${Me.Name} MeleeAttack_1 NONE 
    /ini "${PCini}" ${Me.Name} MeleeAttack_2 NONE 
    /ini "${PCini}" ${Me.Name} MeleeAttack_3 NONE 
    /echo ${Me.Name} has been added to ${PCini}. Please re-run macro (also go edit ${PCini}) 
/endmacro 
  
  :mainloop 
    /assist ${tankname}
    /delay 5
    /if (${Target.CurrentHPs}<=94) /attack on
    /if (${Me.Combat}) /call Attack 
    /doevents Invited 
    /doevents LootMyCorpse 
  /goto :mainloop 
/endmacro 

Sub attack 
  :attackCheck 
    /if (!${Target.Type.Equal["NPC"]}) { 
      /if (!${Target.Type.Equal["PET"]} && !${Target.Master.Type.Equal["NPC"]}) { 
        /echo Not an NPC or NPC pet! 
        /attack off 
        /return 
        } 
      } 
    /if (${Target.Distance}>250) { 
      /attack off 
      /echo Target too far: ${Target.Distance} 
      } 

  :attackSetup 
    /varset MobID ${Target.ID} 
  
    
  :attackPreFight 
    /call ClearReturn 
    /if (${Me.Pet.ID}) /pet attack 

    /varset MeleeDistance ${Ini[${NPCini},${Zone.ShortName},${Target.CleanName}.DistanceMelee]} 
    /if (${MeleeDistance.Equal[NULL]}) { 
      /ini "${NPCini}" "${Zone.ShortName}" "${Target.CleanName}.DistanceMelee" "${DefaultMeleeDistance}" 
      /varset MeleeDistance ${Ini[${NPCini},${Zone.ShortName},${Target.CleanName}.DistanceMelee]} 
      } 
    /stick behind

  :attackMeleeLoop 
    /doevents slain 
    /doevents RageOn 
    /doevents RageOff
    /doevents MobGate 
    /doevents StunON 
    /doevents ToggleTank 
    /doevents TankThisRound 
    /doevents Lootmycorpse
} 
      /if (${Me.CombatAbilityReady["Destroyer's Volley"]} && ${Me.PctEndurance} > 25 && ${Target.Distance}<=${Spell["Destroyer's Volley"].Range})   { 
         /doability "Destroyer's Volley" 
      } 
	/if (${Me.CombatAbilityReady["Rage Volley"]} && ${Me.PctEndurance} > 25 && ${Target.Distance}<=${Spell["Destroyer's Volley"].Range})   { 
         /doability "Rage Volley" 
	}         
/if (${Target.ID}!=${MobID}) /goto :attackend 
    /if (${Macro.Return.Equal["EndATK"]}) /goto :attackend 
    /if (!${Me.Combat}) /goto :attackend 
    /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID} && ${Me.FeetWet})  /face fast 
    /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID} && !${Me.FeetWet}) /face fast nolook 
    /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}>${MeleeDistance}) /keypress FORWARD HOLD 
    /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /keypress FORWARD 
    /if (${Target.ID}==${MobID} && !${Me.Casting.ID}) /if (${Target.Distance}<=${Math.Calc[${MeleeDistance}-5]}) /keypress BACK HOLD 
        } 
      } 
          
    /if (!${Me.Casting.ID} && ${Target.Distance}<=${MeleeDistance} && ${Me.AbilityReady[${MeleeAttack_1}]}) { 
      /if (!${MeleeAttack_1.Equal[NONE]}) { 
        /doability "${MeleeAttack_1}" 
        } 
      /if (!${MeleeAttack_2.Equal[NONE]}) { 
        /doability "${MeleeAttack_2}" 
        } 
      /if (!${MeleeAttack_3.Equal[NONE]}) { 
        /doability "${MeleeAttack_3}" 
        } 
      } 
  
  /goto :attackMeleeLoop 

  :attackend 
    
    /varset MobID 0 
    /attack off 
    /pet backoff 
    /pet hold 
    /keypress FORWARD 
/return 

Sub ClearReturn 
/return NULL 

Sub event_Hit 
  /varset TargetOOR ${Bool[NULL]} 
  /doevents flush OOR 
/return 
  
Sub event_Miss 
  /varset TargetOOR ${Bool[NULL]} 
  /doevents flush OOR 
/return 

Sub event_OOR 
  /varset TargetOOR ${Bool[True]} 
  /doevents flush Hit 
  /doevents flush Miss 
/return 

Sub event_RageOn 
  /if (${Target.CurrentHPs}>15) /return 
  /if (${Target.CurrentHPs}==0) /return 
  /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID}) /keypress FORWARD 
  /call ClearReturn 
  /popup MOB ENRAGE 
  /echo Rage On 
  /attack off 
  /pet back off 
  /pet hold 
  /call ClearReturn 

  :waitRage 
    /doevents 
    /if (${Target.ID}!=${MobID}) /return EndATK 
    /if (${Macro.Return.Equal["EndATK"]}) /return EndATK 
    /if (${Macro.Return.Equal["RageOFF"]}) /return 
/goto :waitRage 

Sub event_RageOFF 
  /echo Rage OFF 
  /popup MOB ENRAGE DONE 
  /attack on 
/return RageOFF 


Sub event_MobGate 
  /if (${Target.Distance}<100) /return 
  /echo MOB GATED! 
  /attack off 
/return EndATK 

Sub event_Invited 
  /delay 10 
  /invite 
/return 

Sub event_StunON 
  /doevents flush StunOFF 
  /call ClearReturn 

  :LoopStunOFF 
    /doevents StunOFF 
    /if (${Macro.Return.Equal["StunOFF"]}) { 
    /call ClearReturn 
    /return 
      } 
/goto :LoopStunOFF 

Sub event_StunOFF 
/return StunOFF 

Sub event_LootMyCorpse 
   /declare t int outer 0 
   /declare loottotal int outer 
   /declare lootslot int outer 
   /declare lootleft int outer 1 

  /echo "Looting My Corpse" 

   :corpsepull 
   /target mycorpse 
   /delay 5 ${Target.CleanName.Equal[${Me}'s corpse]} 

   /if (${Target.CleanName.NotEqual[${Me}'s corpse]}) { 
      /echo No corpse in this zone 
      /return 
   } 

   /delay 3s 
   /corpse 
   /delay 1s ${Target.Distance}<20 

   /if (${Target.Distance}>20) { 
      /echo Corpse is too far away 
      /return 
   } 

   /if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
      /loot 
   } 

   /delay 5s ${Me.State.Equal[BIND]} 
   /if (${Me.State.NotEqual[BIND]}) /goto :corpsepull 

   /varset loottotal 0 
   :LootLag 
   /if (${loottotal}!=${Corpse.Items}) { 
      /varset loottotal ${Corpse.Items} 
      /delay 1s 
      /goto :LootLag 
   } 

   /if (${loottotal}<=${lootleft}) { 
      /echo Looting aborted.  Error in number items to be left on corpse. 
      /notify LootWnd DoneButton leftmouseup 
      /return 
   } 

   /for lootslot 1 to ${loottotal} 
   :LootItem 
   /itemnotify loot${lootslot} rightmouseup 
   /delay 5 !${Corpse.Item[${lootslot}].ID} 
   /if (!${Corpse.Item[${lootslot}].ID}) { 
      /next lootslot 
   } else /goto :LootItem 

   /if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag 
   :DoneLooting 
   /notify LootWnd DoneButton leftmouseup 
   /echo Done looting.  
/return
 
zerker mac add-on request

Users who are viewing this thread

Back
Top