Berzerker Combat

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Eryi
orc pawn
orc pawn
Posts: 19
Joined: Sat Feb 28, 2004 11:24 am

Berzerker Combat

Post by Eryi » Sun Sep 05, 2004 9:40 am

This is my first Macro Attempt.. Works well for me.

Code: Select all

|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 65
        /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 13 
      
    /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
Last edited by Eryi on Sun Sep 05, 2004 10:09 am, edited 5 times in total.

Eryi
orc pawn
orc pawn
Posts: 19
Joined: Sat Feb 28, 2004 11:24 am

Post by Eryi » Sun Sep 05, 2004 9:42 am

zerker_axes.ini

INI File for the Zerker.mac

Code: Select all

[Axes]
651=Tainted Axe of Hatred
652=Deathfury Axe
60=Battlerage Axe
55=Bloodseekers Axe
50=Rage Axe
45=Mithril Bloodaxe
40=Cold Steel Cleaving Axe
35=Fleshtear Axe
30=Bonesplicer Axe
25=Balanced War Axe
20=Mithril Axe
15=Bearded Axe
10=Steel Axe
5=Blunt Axe
1=Corroded Axe

Yudanja
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Oct 16, 2004 3:13 pm

Post by Yudanja » Mon Oct 18, 2004 2:27 pm

thanks, very nice for us Berserkers.

marcissexah
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Oct 05, 2004 8:54 pm

Post by marcissexah » Mon Oct 18, 2004 2:53 pm

Very nice!

If i'm reading this right, this is designed specifically to be executed with every mob we fight?

I could probably implement this into botting a berserker, correct? Something like... /tell Berserker /macro zerker.mac close 0 "Frenzy" and it should work, correct? Or would I need to modify this somehow?

Thanks again :)

Yudanja
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Oct 16, 2004 3:13 pm

Post by Yudanja » Mon Oct 18, 2004 2:59 pm

All i am doing is starting the macro with /mac zerker close 0 "frenzy"

Then target mob and attack, it runs up attacks, frenzies and follows him till he is ded. I am a noob at macros, Looking for a way to automate this, like have him assist the leader and be leashed to a certain area.

any help would be nice =)

marcissexah
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Oct 05, 2004 8:54 pm

Post by marcissexah » Mon Oct 18, 2004 3:02 pm

Just thought of something to add (if you get time, by no means, since I wouldnt know how to code this)...


... at a certain percent of life, say, 30%, have the Berserker use the snare line, have it /echo "Unsnareable!" if not, and voila.

Eryi
orc pawn
orc pawn
Posts: 19
Joined: Sat Feb 28, 2004 11:24 am

Post by Eryi » Sun Oct 31, 2004 1:40 pm

Teaches me to go away for a while ;c)

Right now, the way its set up is that it'll hang-tight on the NPC when Auto-attack is turned on, so it only needs to be run once (Unless your switching from melee to ranged, in which case, it needs to be rerun.. I'm going to try and find a way to work it so you can switch without restarted it.)

Meaning, yes, you have to turn Auto-attack on, however, I'll see about putting in an automated routine or two for remote-botting

Same goes for the Snare idea, shouldn't be too overly difficult.

I'm still trying to find a way to re-work the ugly ranged combat part, but *shrug* I've not had a huge amount of success with it. its still a work in progress.

Skate4mindgame
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Mar 06, 2004 11:51 pm

Having a problem with it

Post by Skate4mindgame » Tue Dec 14, 2004 3:39 am

Great macro only problem i am having is with the ranged aspect of it, i cant get it to summon axes when im out, any suggestions?

3ball
a lesser mummy
a lesser mummy
Posts: 65
Joined: Fri Dec 17, 2004 10:43 am
Location: Florida
Contact:

Post by 3ball » Fri Dec 17, 2004 10:48 am

Make sure that you:

1. set up "zerker_axes.ini" as a separate file in the same folder as your zerker.mac.
2. make sure your axe type is listed in the zerker_axes.ini file. Add it if necessary.
3. When you use an ability or ranged combat and don't have an axe, it will summon the best axe available. I'm not sure if this helps, but stick whatever axe hoetkey you want summoned on the combat abilities bar. You never know.

Prostetic Head
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sun Feb 06, 2005 8:26 pm

Post by Prostetic Head » Sun Feb 06, 2005 8:28 pm

I love this macro - Having one problem, It wont frenzy. I type /macro zerker close 1 "frenzy"

it auto attacks and works great, just will not frenzy

Any insight would be great

Thanks

Hiidan
a ghoul
a ghoul
Posts: 89
Joined: Wed Oct 06, 2004 10:13 pm

Post by Hiidan » Mon Feb 07, 2005 12:04 am

Do you have, under your combat abilities window or your action window, frenzy listed? (Ctrl + C) (Ctrl + A). If not, click one of the empty buttons, then click frenzy from the skill list.