• 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

A few macros...

thez

Well-known member
Joined
Jan 9, 2006
RedCents
220¢
I actually posted this a few weeks ago, but I figured that since people didn't really seem to see it in the thread where it was (wasn't related to the original question), I'd post them again, along with some of my other more specialized macros.

The first is a modified version of AFKnecro.mac, by EQBotMan.

A few notes: I've updated this a little bit. Make sure to switch the rune from Dull Pain to whatever you use. Make sure to update your nukes and dots; I have ancients, and that is reflected in this. I've also changed the setting that does miragul's legs to activate the Tacvi dagger, Dagger of Death, instead of the pants. You'll need to change Mind Flay to Mind Wrack if you don't have MF. I added in a few things, one of these being a popup when you get a GoM proc that stays up until GoM fades. Oh, and I think that there's some MQ2Cast stuff in there from my additions...so...have that loaded. Also, as I've gone through and sliced'n'diced some stuff, bunches of that code have become obsolete...but I've been too lazy to remember to cut it out, so if you run across a sub that has no call to it...that's probably why.

I added in a few events and commands as well...yeah. Basically, if you're going to use it, read through the whole thing. I'll say this much, though: I have zero problem with leaving this macro running for hours in a group that doesn't move. If the group is moving, I'd run it and move the toon myself, and let the macro handle the casting.

Updates!
Cut down a lot of crazy code. The macro went from about 1800 lines to 960 lines...which should reduce memory usage by a huge amount.

While I was cutting down, I removed a few things...no more GMcheck, no more make pet, no more /echo invis, no more DMF by tells, etc. On the whole, I think that the changes are majorly for the better.

Updated for TSS!
With the release of the expansion, many things have changed. Thanks to the combat state regen and stuff, dynamic mana consumption is no longer needed or desirable. I also updated the spells to be new.

The biggest change is in how GoM works. Because of both Dread and Ashengate Pyre being in spell lines, GoM and GoRM procs now work like this:

If you have bigdots on...(by doing /echo bigdot) then when you get a GoM proc, you will cast DP. When you get a GoRM proc, you will cast AP.

I also updated Grave Pact -> Otherside, and removed the rune stuff, because it took up a spell slot!

Updated ONCE AGAIN

In this update, I've done a few things.

-Removed the "Curse" option for dots. Why? Because it simply wasn't being activated when I used the macro. Just swap your Curse dot into one of your other slots.

-Significantly changed the way that nuking is done to deal with using the spell Demand for Blood. The nuking subroutine now nukes until you get a Chaotic Power proc, then doesn't nuke until it wears off. It also will automatically lifetap on the next Nuke cycle if you go below 90% hp.

-You no longer need to reactivate bigdots if you restart the macro.

-Added "/echo CP" for toggling the Chaotic Power nuke feature. If CP is off (default), there will not be nuking unless your HP is low.

Rich (BB code):
|
|	AFKNecro.mac v2.1
|         Originally written by EQBotMan, Updated, Upgrades, and made much better by TheZ
|
| Usage: /Macro AFKNecro <Tank Name> <Cast Health> <Stop Casting Health>
#Event CPower "[MQ2] cp"
#Event CPowerOn "Quivering power pulses through your hands."
#Event CPowerFade "The power fades away."
#Event GoM "You have been granted a gift of mana!"
#Event GoRM "You have been granted a gift of radiant mana!"
#event Bigdot "[MQ2] bigdot"
#Event Gone "Your gift of mana fades."
#Event Gone "Your gift of radiant mana fades."
#Event FD "#*#hits you for#*#"
#Event FD "#*#kicks you for#*#"
#Event FD "#*#bites you for#*#"
#Event FD "#*#bashes you for#*#"
#Event FD "#*#slashes you for#*#"
#Event FD "#*#pierces you for#*#"
#Event FD "#*#crushes you for#*#"
#Event FD "#*#You will not evade me ${Me}!#*#"
#Event Enrage "#*#has becomed ENRAGED#*#"
#Event Enrage "#*#is infuriated!#*#"
#Event EndEnrage "#*#is no longer ENRAGED#*#"
#Event EndEnrage "#*#is no longer infuriated.#*#"
#Event follow "[MQ2] follow#*#"
#Event face "[MQ2] face"
#Event sit "[MQ2] sit"
#Event DoT1 "[MQ2] dot1"
#Event DoT2 "[MQ2] dot2"
#Event DoT3 "[MQ2] dot3"
#Event DoT4 "[MQ2] dot4"
#Event MAChange "[MQ2] ma #1#"
#Event SAChange "[MQ2] sa #1#"
#Event TAChange "[MQ2] ta #1#"
#Event DP "[MQ2] DP"
#Event Switch "[MQ2] switch"
#event slain "#*#has been slain#*#"
#event EXP "#*#gain experience!#*#"
#Event Status "[MQ2] status"
#Event LegProc "[MQ2] pyro"
#Event splurt "[MQ2] splurt"
#Event DynMana "[MQ2] dynmana"
#Event MWChange "[MQ2] MW"
#Event HighManaUseBit "[MQ2] usemoremana"
#Event StopNuke "[MQ2] Stopnuke"
#Event StartNuke "[MQ2] Startnuke"

Sub Main

/deletevar StopCastHealth
/deletevar CastHealth

/if (!${Defined[MainAssist]}) {
	/declare MainAssist string global
	/varset MainAssist ${Param0}
} else {
	/varset MainAssist ${Param0}
}

/if (!${Defined[SecondAssist]}) {
	/declare SecondAssist string global
}

/if (!${Defined[TripleAssist]}) {
	/declare TripleAssist string global
}

/if (!${Defined[CPower]}) {
	/declare CPower int global 0
}

/if (!${Defined[bigdot]}) {
	/declare bigdot int global 0
}

/if (!${Defined[DoTBit1]}) {
	/declare DoTBit1 int global
	/varset DoTBit1 0
}

/if (!${Defined[DoTBit2]}) {
	/declare DoTBit2 int global
	/varset DoTBit3 0
}

/if (!${Defined[DoTBit3]}) {
	/declare DoTBit3 int global
	/varset DoTBit3 0
}

/if (!${Defined[DoTBit4]}) {
	/declare DoTBit4 int global
	/varset DoTBit4 0
}

/if (!${Defined[FaceBit]}) {
	/declare FaceBit int global
	/varset FaceBit 0
}
/if (!${Defined[SitBit]}) {
	/declare SitBit int global
	/varset SitBit 0
}

/if (!${Defined[LegProc]}) {
	/declare LegProc int Global
	/varset LegProc 0
}
/if (!${Defined[MWBit]}) {
	/declare MWBit int Global
	/varset MWBit 0
}
/if (!${Defined[CastHealth]}) {
	/declare CastHealth int Global
	/varset CastHealth ${Param1}
}
/if (!${Defined[StopCastHealth]}) {
	/declare StopCastHealth int Global
	/varset StopCastHealth ${Param2}
}
/if (!${Defined[DP]}) {
	/declare DP int Global
	/varset DP 0
}
/if (!${Defined[FDBit]}) {
	/declare FDBit int Global
	/varset FDBit 1
}

/deletevar DoT1
/deletevar DoT2
/deletevar DoT3
/deletevar DoT4
/deletevar DoTSpell1
/deletevar DoTSpell2
/deletevar DoTSpell3
/deletevar DoTSpell4
/deletevar PetAttackTimer
/deletevar MWTimer
/deletevar gom
/deletevar gorm
/deletevar CPCount
/declare MWTimer timer global

/declare CPCount int global 0
/declare DoT1 int global
/declare DoT2 int global
/declare DoT3 int global
/declare DoT4 int global
/declare Pyro timer outer
/declare DoTSpell1 string global
/declare DoTSpell2 string global
/declare DoTSpell3 string global
/declare DoTSpell4 string global
/declare PetAttackTimer timer global
/declare CurrentTarget int outer
/declare LifetapNuke string outer
/declare CPNuke string outer
/declare MinTargetLevel int outer
/declare gom int global 0
/declare gorm int global 0
/declare CPowerOn int global 0
/varset Pyro 0
/varset PetAttackTimer 0
/varset MinTargetLevel 50

/varset DoTSpell1 "Curse of Mortality"
/varset DoTSpell2 "Chaos Venom"
/varset DoTSpell3 "Vakk`Dra's Sickly Mists Rk. II"
/varset DoTSpell4 "Corath Venom"
/varset CPNuke "Demand for Blood"
/varset LifetapNuke "Drain Life"

/if (!${Defined[CurrentNuke]}) {
	/declare CurrentNuke string Global
}
	/varset CurrentNuke ${CPNuke}
/call Event_Status
/echo waiting for initial target . . .
/if (!${Defined[${Param1}]} && !${Defined[${Param2}]}) {
} else /if (${CastHealth}<=${StopCastHealth}) {
	/echo Your Start Casting Health is elss than your and your Stop Casting Health.  Macro will not function propery.  Try setting to 90 and 10(/macro AFKNecro TANK 90 10). Ending the macro
	/endmacro
}
|MAINLOOPMAINLOOPMAINLOOPMAINLOOPMAINLOOP
|MAINLOOPMAINLOOPMAINLOOPMAINLOOPMAINLOOP
:Continue	
	/if (${Me.Buff[Otherside Rk. II].Duration}<10) /cast "Otherside Rk. II"
	/doevents
	/call GetTarget
	|After Macro gets a target this next giant line determines if its something it wants to attack.
	/if (${Target.PctHPs}>=65 && ${Target.PctHPs}<=99 && ${Target.Type.Equal["NPC"]} && ${Target.Distance}<190 && ${Target.LineOfSight} && !${Me.Moving} && !${Me.Casting.ID}) {
		|Sets the Current Target Based on the ID number of the mob spawn it the zone.  This later comes into play when deciding that the mob has died
		/varset CurrentTarget ${Target.ID}
		/popup Target Aquired >>"${Target.CleanName}"<<
		/echo Target Aquired >>"${Target.CleanName}"<<
		/goto :StartCombat
	} else {
		/goto :Continue
	}
|This loops during combat
:StartCombat
	/call GetTarget
	/call DoT1
	/call GetTarget
	/call pyro
	/call DoT2
	/call GetTarget
	/call DoT3
	/call GetTarget
	/call DoT4
	/if (${CPower}==1 && ${CPowerOn}==0 ||${Me.PctHPs}<=90) /call castnuke
	/call MW
	/doevents
	|If the Mobs name of the CurrentTarget ID number has corpse...its dead...find a new target, start over, your done
	/if (${String[${Spawn[${CurrentTarget}]}].Find["corpse"]}) {
		/call Event_exp
		/echo Current mob has Died
		/varset DoT1 0
		/varset DoT2 0
		/varset DoT3 0
		/varset DoT4 0
		/if (!${Me.State.Equal[Stand]}) /stand
		/goto :Continue
	}
/goto :StartCombat
/return

Sub GetTarget
/if (${Me.Casting.ID}) /return
/if (${Me.Moving}) /return
/if (${Spawn[${MainAssist}].ID}) {
	/assist ${MainAssist}
} else /if (${Spawn[${SecondAssist}].ID}) {
	/assist ${SecondAssist}
} else /if (${Spawn[${TripleAssist}].ID}) {
	/assist ${TripleAssist}
} else {
	/echo None of your assigned tanks are in the zone, did you spell the name wrong?, pausing for 20 seconds...
	/delay 20s
}
/return

Sub castnuke
	:Loop0
	/doevents
	/if (!${Me.SpellReady[${CurrentNuke}]}) /goto :Loop0
/if (${Me.Moving}) /return
	/if (!${Target.ID}) /return
	/if (${SitBit}==1) {
		/if (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) {
			/if (${Me.State.Equal["STAND"]}) /sit
			/delay 2s
			/return
		}
	} else {
		/stand
	}
|This next if then makes sure that you only send the pet once every 10 sec, if not it spams /pet attack..very annoying
/if (${Target.PctHPs}<=97 && !${String[${Target}].Find["corpse"]}>0 && ${Target.Type.Equal["NPC"]} && ${Target.Distance}<190 && ${PetAttackTimer}==0) {
		/pet attack
		/varset PetAttackTimer 100
	}
| Do we still want to cast on the current Target? Yes? Ok then continue
/if (${Target.PctHPs}<=${CastHealth} && ${Me.SpellReady[${CurrentNuke}]} && ${Target.PctHPs}>${StopCastHealth} && ${Target.Type.Equal["NPC"]} && ${Target.Distance}<190 && ${Target.LineOfSight}) {
	/if (${FaceBit}==1) {
		/face fast nolook
		/look 0
	}
	/echo Mob Detected, Casting ${CurrentNuke}
	/stand
	/if (${Me.PctHPs}>=90) /cast ${CurrentNuke}
	/if (${Me.PctHPs}<90) /cast ${LifetapNuke}
	/doevents
	/delay 1s
	/if (${CPower}==1 && ${CPowerOn}==0) {
	/if (${Me.PctHPs}>=90) /cast ${CurrentNuke}
	/if (${Me.PctHPs}<90) /cast ${LifetapNuke}
	/doevents
	}
	/if (${CPower}==1 && ${CPowerOn}==0) {
	/delay 1s
	/if (${Me.PctHPs}>=90) /cast ${CurrentNuke}
	/if (${Me.PctHPs}<90) /cast ${LifetapNuke}
	/doevents
	}
	/if  (${DP}==1) /call AAFD
}
/return
|procing of Miraguls legs if turned on
Sub Pyro
	/if (${LegProc}==1 && ${Target.PctHPs}>=85 && ${Target.PctHPs}<=96 && ${Target.Level}>=${MinTargetLevel} && ${Pyro}==0 && ${Target.LineOfSight}) {	
		/if ((${Raid} && ${Target.PctHPs}>=20) || (!${Raid} && ${Target.PctHPs}>=75)) {
		} else {
			/return
		}
		:PyroLoop
		/if (${Me.Casting.ID}) /goto :PyroLoop
		/stand
		/casting "Dagger of Death" item
		/delay 2s
		/varset Pyro 200
	}
/return
|Procing the AA FD after each nuke subroutine
Sub AAFD
	:DP
	/if (${Me.Casting.ID}) /goto :DP
	/alt activate 428
	/alt activate 428
	/alt activate 428
		/delay 13
	:Stand
	/if (!${Me.State.Equal["STAND"]}) {
		/stand
		/delay 2
	/goto :Stand
	}
	
/return
|--------------------------------------
| This is a semi-complicated SubRoutine..good luck following it
|Basically if you are not FD it spams the AA FD until you are FD or you are dead.
|Once you are FD you will stand up in 15 seconds regardless of anything and attempt to summon a mount.
|If your attempt to summon a mount fails... oh well.
Sub Event_FD
/if (${FDBit}==0) {
	/doevents flush
	/return
}
/echo You are being hit!  Trying to FD!
/stopcast
:top_of_FD
/if (${Me.State.Equal["FEIGN"]}) {
	/echo You are FD, pausing script.  You will automatically stand up when the mob is dead if you are above low health aggro.  Or you can stand up manually to resume the script. Or you will stand up in 15 seconds reguardless.
	:already_FD
		/if (!${Me.State.Equal["FEIGN"]}) {
			:StandUp
			/delay 5
			/stand
			/delay 2
			/echo You stood up, resuming script...
				
			/return
		} else {

			/if (${Target.ID} && ${Me.PctHPs}>=75) /stand
			/doevents flush
			/delay 5
			/goto :already_FD

		}
} else /if (!${Me.State.Equal["FEIGN"]}) {
	:not_FD_yet
	/alt activate 428
	/delay 2
	/if (!${Me.State.Equal["FEIGN"]}) {
		/goto :not_FD_yet
	} else {
		/timed 10 /stand
		/goto :top_of_FD
	}
}
/goto :top_of_FD
/return

Sub Event_exp
	/pet follow
	/pet back off
	/pet hold
/return
|=======================================
|The upcoming subroutines are called via an echo to turn on/off the options for the macro
Sub Event_bigdot
/if (${bigdot}==0) {
	/varset bigdot 1
	/echo |===================================
	/echo You will now cast Dread Pyre and Ashengate Pyre on GoM and GoRM procs
	/echo |===================================
} Else /if (${bigdot}==1) {
	/varset bigdot 0
	/echo |===================================
	/echo You will NOT cast Dread Pyre and Ashengate Pyre on GoM and GoRM procs
	/echo |===================================
}
/return
|=======================================
Sub Event_CPower
/if (${CPower}==0) {
	/varset CPower 1
	/echo |===================================
	/echo You will now cast Demand for Blood until you get a Chaotic Power Proc
	/echo |===================================
} Else /if (${CPower}==1) {
	/varset CPower 0
	/echo |===================================
	/echo You will NOT cast Demand for Blood
	/echo |===================================
}
/return
|=======================================
Sub Event_sit
/if (${SitBit}==0) {
	/varset SitBit 1
	/if (${Me.State.Equal["STAND"]}) /sit
	/echo |===================================
	/echo You will now sit when the mob reaches "${StopCastHealth}" health.  Your necro will not try to sit while moving but if he is still for more than 2 seconds he will sit.  /Stick with MQ2MoveUtils works very well I recommend: /stick 10 behind hold 
	/echo |===================================
} Else /if (${SitBit}==1) {
	/varset SitBit 0
	/stand
	/echo |===================================
	/echo You will NOT Sit anymore after casting.
	/echo |===================================
}
/return
|=======================================
Sub Event_face
/if (${FaceBit}==0) {
	/varset FaceBit 1
	/echo |===================================
	/echo You will now face the mob right before you cast on it
	/echo |===================================
} Else /if (${FaceBit}==1) {
	/varset FaceBit 0
	/stand
	/echo |===================================
	/echo You will now NOT face the mob before you cast on it
	/echo |===================================
}
/return
|=======================================
Sub Event_LegProc
/if (${LegProc}==0) {
	/varset LegProc 1
	/echo |===================================
	/echo You will proc your dagger
	/echo |===================================
} Else /if (${LegProc}==1) {
	/varset LegProc 0
	/echo |===================================
	/echo You will now NOT proc your dagger
	/echo |===================================
}
/return
|=======================================
Sub Event_DoT1
/if (${DoTBit1}==0) {
	/varset DoTBit1 1
	/echo |===================================
	/echo You will now cast ${DoTSpell1} "smartly" on a mob before chain nuking
	/echo |===================================
} Else /if (${DoTBit1}==1) {
	/varset DoTBit1 0
	/echo |===================================
	/echo You will now NOT cast ${DoTSpell1} "smartly" on a mob before chain nuking
	/echo |===================================
}
/return
|=======================================
Sub Event_DoT2
/if (${DoTBit2}==0) {
	/varset DoTBit2 1
	/echo |===================================
	/echo You will now cast ${DoTSpell2} "smartly" on a mob before chain nuking
	/echo |===================================
} Else /if (${DoTBit2}==1) {
	/varset DoTBit2 0
	/echo |===================================
	/echo You will now NOT cast ${DoTSpell2} "smartly" on a mob before chain nuking
	/echo |===================================
}
/return
|=======================================
Sub Event_DoT3
/if (${DoTBit3}==0) {
	/varset DoTBit3 1
	/echo |===================================
	/echo You will now cast ${DoTSpell3} "smartly" on a mob before chain nuking
	/echo |===================================
} Else /if (${DoTBit3}==1) {
	/varset DoTBit3 0
	/echo |===================================
	/echo You will now NOT cast ${DoTSpell3} "smartly" on a mob before chain nuking
	/echo |===================================
}
/return
|=======================================
Sub Event_DoT4
/if (${DoTBit4}==0) {
	/varset DoTBit4 1
	/echo |===================================
	/echo You will now cast ${DoTSpell4} "smartly" on a mob before chain nuking
	/echo |===================================
} Else /if (${DoTBit4}==1) {
	/varset DoTBit4 0
	/echo |===================================
	/echo You will now NOT cast ${DoTSpell4} "smartly" on a mob before chain nuking
	/echo |===================================
}
/return
|=======================================
Sub Event_MWChange
/if (${MWBit}==0) {
	/varset MWBit 1
	/echo |===================================
	/echo You will now cast mind flay on mobs
	/echo |===================================
} Else /if (${MWBit}==1) {
	/varset MWBit 0
	/echo |===================================
	/echo You will now NOT cast mind flay on mobs
	/echo |===================================
}
/return
|=======================================
Sub Event_DP
/if (${DP}==0) {
	/varset DP 1
	/echo |===================================
	/echo You will now cast your AA Death Peace in between Nukes
	/echo |===================================
} Else /if (${DP}==1) {
	/varset DP 0
	/echo |===================================
	/echo You will now NOT cast your AA Death Peace in between Nukes
	/echo |===================================
}
/return
|=======================================
Sub Event_FDSwitchd
/if (${FDBit}==0) {
	/varset FDBit 1
	/echo |===================================
	/echo Feigning when you are getting hit has been turned ON
	/echo |===================================
} Else /if (${FDBit}==1) {
	/varset FDBit 0
	/echo |===================================
	/echo Feigning when you are getting hit has been turned OFF
	/echo |===================================
}
/return
|=======================================
Sub Event_MAChange(Zero, Name)
	/echo ============================================
	/echo Changing MA to ${Name}
	/echo ============================================
	/varset MainAssist ${Name}
/return
|======================================
Sub Event_SAChange(Zero, Name)
	/echo ============================================
	/echo Changing SA to ${Name}
	/echo ============================================
	/varset SecondAssist ${Name}
/return
|======================================
Sub Event_TAChange(Zero, Name)
	/echo ============================================
	/echo Changing TA to ${Name}
	/echo ============================================
	/varset TripleAssist ${Name}
/return

|======================================
Sub Event_Switch
/if (${String[${CurrentNuke}].Find[${CPNuke}]}>0) {
	/varset CurrentNuke ${LifetapNuke}
	/echo |===================================
	/echo You will now cast ${LifetapNuke} as your nuke
	/echo |===================================
} Else /if (${String[${CurrentNuke}].Find[${LifetapNuke}]}>0) {
	/varset CurrentNuke ${CPNuke}
	/echo |===================================
	/echo You will now cast ${CPNuke} as your nuke
	/echo |===================================
}
/return
|=======================================
Sub Event_StopNuke
/varset CastHealth 0
/varset StopCastHealth 0
/echo You will not nuke anymore
/return
|=======================================
Sub Event_StartNuke
/varset CastHealth 85
/varset StopCastHealth 0
/echo You will start nuking now
/return

|=======================================
Sub DoT1
/if (${DoT1}==0 && ${DoTBit1}==1 && ${Target.PctHPs}<=97 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
	/if (${String[${Target}].Find["corpse"]}>1 || ${Target.Distance}>190 || !${Target.ID})  /return
	:Loop0
	/doevents
	/if (!${Me.SpellReady[${DoTSpell1}]}) /goto :Loop0
	/if (${SitBit}==1 && ${Me.State.Equal["STAND"]} && (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) ) {
		/sit
		/delay 2s
		/return
	}
	/if (${FaceBit}==1) {
		/face fast nolook
		/look 0
	}
	/varset DoT1 1
	/pet attack
	/stand
	/cast ${DoTSpell1}
	/delay 2s
	/cast ${DoTSpell1}
	/delay 2s
	/cast ${DoTSpell1}
	/delay 2s
	/if (${DP}==1) /call AAFD
	:Loop1
	/if (${Me.Casting.ID}) /goto :Loop1
	/if (${LegProc}==0 && ${DP}==1) /call AAFD
}
/return

Sub DoT2
/if (${DoT2}==0 && ${DoTBit2}==1 && ${Target.PctHPs}>=20 && ${Target.PctHPs}<=95 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
	/if (${String[${Target}].Find["corpse"]}>1 || ${Target.Distance}>190 || !${Target.ID})  /return	
	:Loop0
	/doevents
	/if (!${Me.SpellReady[${DoTSpell2}]}) /goto :Loop0
	/if (${SitBit}==1 && ${Me.State.Equal["STAND"]} && (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) ) {
		/sit
		/delay 2s
		/return
	}
	/if (${FaceBit}==1) {
		/face fast nolook
		/look 0
	}
	/varset DoT2 1
	/pet attack
	/stand
	/cast ${DoTSpell2}
	/delay 2s
	/cast ${DoTSpell2}
	/delay 2s
	/cast ${DoTSpell2}
	/delay 2s
	/if (${DP}==1) /call AAFD
	:Loop1
	/if (${Me.Casting.ID}) /goto :Loop1
	/if (${LegProc}==0 && ${DP}==1) /call AAFD
}
/return

Sub DoT3

/if (${DoT3}==0 && ${DoTBit3}==1 && ${Target.PctHPs}>=20 && ${Target.PctHPs}<=95 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
	/if (${String[${Target}].Find["corpse"]}>1 || ${Target.Distance}>190 || ${String[${Target}].Find["NULL"]}>0)  /return
	/if ((${Raid} && ${Target.PctHPs}>=20) || (!${Raid} && ${Target.PctHPs}>=75)) {
	} else {
		/return
	}
	
	:Loop0
	/doevents
	/if (!${Me.SpellReady[${DoTSpell3}]}) /goto :Loop0

	/if (${SitBit}==1 && ${Me.State.Equal["STAND"]} && (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) ) {
		/sit
		/delay 2s
		/return
	}
	/if (${FaceBit}==1) {
		/face fast nolook
		/look 0
	}
	/varset DoT3 1
	/pet attack
	/stand
	/cast ${DoTSpell3}
	/stand
	/delay 2s
	/cast ${DoTSpell3}
	/stand
	/delay 2s
	/cast ${DoTSpell3}
	/delay 2s
	/if (${DP}==1) /call AAFD
	:Loop1
	/if (${Me.Casting.ID}) /goto :Loop1
	/if (${LegProc}==0 && ${DP}==1) /call AAFD
}
/return
|=======================================
|This is called after casting of your curse based spell if doting is turned ON

Sub DoT4

/if (${DoT4}==0 && ${DoTBit4}==1 && ${Target.PctHPs}>=20 && ${Target.PctHPs}<=95 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
	/if (${String[${Target}].Find["corpse"]}>1 || ${Target.Distance}>190 || ${String[${Target}].Find["NULL"]}>0)  /return
	/if ((${Raid} && ${Target.PctHPs}>=20) || (!${Raid} && ${Target.PctHPs}>=75)) {
	} else {
		/return
	}
	
	:Loop0
	/doevents
	/if (!${Me.SpellReady[${DoTSpell4}]}) /goto :Loop0

	/if (${SitBit}==1 && ${Me.State.Equal["STAND"]} && (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) ) {
		/sit
		/delay 2s
		/return
	}
	/if (${FaceBit}==1) {
		/face fast nolook
		/look 0
	}
	/varset DoT4 1
	/pet attack
	/stand
	/cast ${DoTSpell4}
	/stand
	/delay 2s
	/cast ${DoTSpell4}
	/stand
	/delay 2s
	/cast ${DoTSpell4}
	/delay 2s
	/if (${DP}==1) /call AAFD
	:Loop1
	/if (${Me.Casting.ID}) /goto :Loop1
	/if (${LegProc}==0 && ${DP}==1) /call AAFD
}
/return

|===========================================
|This is called after casting of your curse based spell if doting is turned ON
Sub MW
/if (${MWTimer}==0 && ${MWBit}==1 && ${Target.PctHPs}>=25 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
	/if (${String[${Target}].Find["corpse"]}>1 || ${Target.Distance}>190 || ${String[${Target}].Find["NULL"]}>0)  /return
	:Loop0
	/doevents
	/if (!${Me.SpellReady["mind flay"]}) /goto :Loop0
	/if (${SitBit}==1 && ${Me.State.Equal["STAND"]} && (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) ) {
		/sit
		/delay 2s
		/return
	}
	/varset MWTimer ${Math.Calc[(${Spell["mind flay"].RecastTime}+${Spell["mind flay"].MyCastTime})*10+120]}
	/if (${FaceBit}==1) {
		/face fast nolook
		/look 0
	}
	/pet attack
	/stand
	/cast "mind flay"
	:Loop1
	/if (${Me.Casting.ID}) /goto :Loop1
}
/return
Sub Event_Enrage
	/echo a Mob has become enraged, backing pet off
	/pet follow
	/pet back off
	/pet hold
	/return
|====================================================
Sub Event_EndEnrage
	/pet attack	
/return
|=============================================
|This is called whenever you type /echo status..a very handy subroutine to keep track of what options you have on/off
Sub Event_Status
/declare x int local
/echo ~~~~~~   AFKNecro.mac   ~~~~~~~~~~~~
/echo /macro AFKNecro <Tank Name> <Cast Health> <Stop Casting Health>
/echo You will cast "${CurrentNuke}" between ${CastHealth} and ${StopCastHealth}
/echo Primary assist is set to: "${MainAssist}"
/if (!${Defined[SecondAssist]} && !${Defined[TripleAssist]}) {
	/echo You do not have an SA and TA set
} else /if (${Defined[SecondAssist]}) {
	/echo Secondary assist is set to: "${SecondAssist}"
} else /if (${Defined[TripleAssist]}) {
	/echo Tertiary assist is set to: "${TripleAssist}"
}
/for x 1 to 4
/echo Casting of DoT${x}(${DoTSpell${x}}) is: ${Bool[${DoTBit${x}}]}
/next x
/echo Casting of Big Dots on GoM procs is: ${Bool[${bigdot}]}
/echo Casting of Demand For Blood for Chaotic Power procs is: ${Bool[${CPower}]}
/echo Casting of a mind flay is: "${Bool[${MWBit}]}"
/echo Procing of dagger is: "${Bool[${LegProc}]}"
/echo Facing is: "${Bool[${FaceBit}]}" || Sitting is: "${Bool[${SitBit}]}"
/echo Casting of DP is: "${Bool[${DP}]}"
/echo FDing if you get hit is: "${Bool[${FDBit}]}"
/echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/return

Sub Event_slain
/if (${Target.CurrentHPs}>=0) /return 
Sub Event_EXP
/if (${Target.CurrentHPs}>=0) /return 

Sub Event_GoM
/varset gom 1
:gom
/if (${gom}==0) /return
/popup Gift of Mana Active
/doevents
/if (${bigdot}==1 && ${Target.PctHPs}<=95 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
/stand
/delay 1s
/cast "Dread Pyre"
/delay 1s
/doevents
/cast "Dread Pyre"
/delay 1s
/doevents
/cast "Dread Pyre"
/delay 1s
/doevents
}
/goto :gom
/return

Sub Event_GoRM
/varset gorm 1
:gorm
/if (${gorm}==0) /return
/popup Gift of Radiant Mana Active
/doevents
/if (${bigdot}==1 && ${Target.PctHPs}<=95 && ${Target.Level}>=${MinTargetLevel} && ${Target.Type.Equal["NPC"]} && ${Target.LineOfSight}) {
/cast "Ashengate Pyre"
/delay 1s
/doevents
/cast "Ashengate Pyre"
/delay 1s
/doevents
/cast "Ashengate Pyre"
/delay 1s
/doevents
}
/goto :gorm
/return

Sub Event_Gone
/if (${gom}==1) /varset gom 0
/if (${gorm}==1) /varset gorm 0
/popup Gift of Mana faded, Hope you used it well
/return

Sub Event_CPowerOn
/varset CPowerOn 1
/popup Chaotic Power Active
/return

Sub Event_CPowerFade
/varset CPowerOn 0
/popup Chaotic Power Faded
/return
 
Last edited:
The next macro is one that I wrote because I hate summoning pets and all that. It summons a pet, shrinks it 2x, and hastes it. For the non-necros, make sure that you edit the petspell/pethaste/petshrink defines.

Rich (BB code):
Sub main
/declare petspell string global
/declare pethaste string global
/declare petshrink string global
|=============Spells Define============|
/varset petspell Lost Soul
/varset pethaste Glyph of Darkness
/varset petshrink Tiny Companion

/if (${Me.Pet.ID}) {
	/echo Already have a pet!!!
	/return
	}
/echo Makepet online...
/sss temp 456
/memorize "${pethaste}|3" "${petspell}|5" "${petshrink}|6"

:pet
/if (!${Me.SpellReady[${petspell}]}) {
	/delay 1s
	/goto :pet
	}
/if (${Me.SpellReady[${petspell}]}) /casting "${petspell}|5" -maxtries|3 -setin|petfocus

:castingpet
/delay 1s
/if (!${Me.Pet.ID} && !${Me.Casting.ID}) /goto :pet
/if (!${Me.Pet.ID} && ${Me.Casting.ID}) /goto :castingpet

:shrink
/if (!${Me.SpellReady[${petshrink}]}) {
	/delay 1s
	/goto :shrink
	}
/if (${Me.SpellReady[${petshrink}]}) /casting "${petshrink}|6" -recast|1 -maxtries|3

:castingshrink
/delay 1s
/if ((!${Me.Pet.Height}==0.96) && (!${Me.Casting.ID})) /goto :shrink
/if ((!${Me.Pet.Height}==0.96) && (${Me.Casting.ID})) /goto :castingshrink

:haste
/if (!${Me.SpellReady[${pethaste}]}) {
	/delay 1s
	/goto :haste
	}
/if (${Me.SpellReady[${pethaste}]} && !${Me.PetBuff[${pethaste}]}) /casting "${pethaste}|3" -maxtries|3

:castinghaste
/delay 1s
/if (!${Me.PetBuff[${pethaste}]} && !${Me.Casting.ID}) /goto :haste
/if (!${Me.PetBuff[${pethaste}]} && ${Me.Casting.ID}) /goto :castinghaste

:testit
/if (!${Me.Pet.ID}) {
	/echo Pet failed
	/mac pet
	}
/if (!${Me.Pet.Height}==0.96) /echo Shrink Failed
/if (!${Me.PetBuff[${pethaste}]}) /echo Haste Failed
/ssm temp
/ssd temp
/return
 
For when I'm not really looking to have an afk macro running, but still want a few things automated for me, here's the macro I run. I call it basic.mac. It has a /popup when I get a GoM proc, spams FD when I get hit or summoned, etc. It also refreshes lich and rune. I use MQ2Events to keep my self-buffs up, but this can easily be modified to have that stuff added in.

Rich (BB code):
||basic.mac


#Event GoM "You have been granted a gift of mana!"
#Event Gone "Your gift of mana fades."
#Event FD "#*#hits you for#*#"
#Event FD "#*#kicks you for#*#"
#Event FD "#*#bites you for#*#"
#Event FD "#*#bashes you for#*#"
#Event FD "#*#slashes you for#*#"
#Event FD "#*#pierces you for#*#"
#Event FD "#*#crushes you for#*#"
#Event FD "#*#You will not evade me, ${Me}!#*#"
#Event distract "You are too distracted to cast a spell now!"
#Event lich "[MQ2] lich"
#Event fs "[MQ2] fs"

Sub Main

/declare lichspell string global
/declare rune string global
|=============Spells Define============|
/varset lichspell Dark Possession
/varset rune Dull Pain
|==========Spells Define end===========|
	/deletevar gom
	/if (!${Defined[FDBit]}) {
		/declare FDBit int Global
		/varset FDBit 1
		}
	/if (!${Defined[gom]}) {
		/declare gom int Global
		/varset gom 0
		}
	/if (!${Defined[fs]}) {
			/declare fs int Global
			/varset fs 0
		}
	/if (!${Defined[lich]}) {
		/declare lich int Global
		/varset lich 1
		}	
		
		
	/echo Basic Background Macro Running
	:loop1
	/doevents
	/call fs
	/call Lich
	/goto :loop1
/return


Sub Event_GoM
/varset gom 1
:gom
/if (${gom}==0) /return
/popup Gift of Mana Active
/doevents
/delay 1s
/goto :gom
/return

Sub Event_Gone
/varset gom 0
/popup Gift of Mana faded, Hope you used it well
/return

Sub Event_FD
	/if (${FDBit}==0) {
		/doevents flush
		/return
	}
	/echo You are being hit!  Trying to FD!
	/stopcast
	:top_of_FD

	/if (${String[${Me.State.}].Find["FEIGN"]}) {
		/echo You are FD, pausing script.  You will automatically stand up when the mob is dead if you are above low health aggro.  Or you can stand up manually to resume the script. Or you will stand up in 15 seconds reguardless.
		:already_FD
			/if (!${String[${Me.State.}].Find["FEIGN"]}) {
				:StandUp
				/delay 5
				/stand
				/delay 2
				/stand
				/echo You stood up, resuming script...
				
				/return
			} else {

				/if (${String[${Target.Name}].Find["NULL"]} && ${Me.PctHPs}>=45) /stand
				/doevents flush
				/delay 5
				/goto :already_FD

			}
	} else /if (!${String[${Me.State.}].Find["FEIGN"]}) {
		:not_FD_yet
		/alt activate 428
		/delay 2
		/if (!${String[${Me.State.}].Find["FEIGN"]}) {
			/goto :not_FD_yet
		} else {
			/timed 10 /stand
			/goto :top_of_FD
		}
	}
	/goto :top_of_FD
/return


Sub fs
:Loop
	/if (${fs}==0) /return
	/if (${Me.Casting.ID}) /goto :Loop
	/if (${Me.Buff["${rune}"].Duration}<5) /casting "${rune}"
/return


Sub Lich
:Loop
	/if (${lich}==0) /return
	/if (${Me.Buff["${lichspell}"].Duration}<30) /casting "${lichspell}" gem3
/return

Sub Event_distract
	/keypress esc
	/return
/return

Sub Event_lich
/if (${lich}==0) {
	/varset lich 1
	/echo Autolich engaged
	/return
	}
/if (${lich}==1) {
	/varset lich 0
	/echo Autolich disengaged
	/return
	}
/echo Autolich Error
/return

Sub Event_fs
/if (${fs}==0) {
	/varset fs 1
	/echo Autorune engaged
	/return
	}
/if (${fs}==1) {
	/varset fs 0
	/echo Autorune disengaged
	/return
	}
/echo Autorune Error
/return
 
This last one is the real pearl, and the only reason that I'm sharing it is that a) it's not perfect, and b) I don't need to farm for any more AAAA parts.

Basically, this is a modified hunter.mac, turned into nechunter.mac...but this one is tuned specifically to farm the reaper camp in corathus creep for those nasty little AAAA parts. I must stress that it is NOT an AFK macro. It's more of a "doing some other work on the computer or at your desk so that you can watch occasionally, but not actually have to step in unless needed" type macro. Make sure you modify your spells. Enjoy.

Rich (BB code):
| Hunter Macro
| Hunter.mac
| Author      : robdawg
| Version     : v1.2 2004-05-13 10:06pm PST
| Useage      : /macro Hunter
| Description : This macro will run your character around killing any mobs in your
|      RV_MobArray.  Then it will attempt to loot all items in your
|      RV_LootArray.  This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
|------------------------------------------------------------------------------------

#turbo 10
#include spell_routines.inc

Sub Main

   |------------------------------------------------------------
   |How many times should aquire target fail before delaying?
   |------------------------------------------------------------
   /declare RV_FailMax          int outer  3
   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  300
   |------------------------------------------------------------
   |How far is the combat range?
   |------------------------------------------------------------
   /declare RV_Range            int outer 10
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MinZRange        int outer  -1000
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MaxZRange        int outer  1000
   |------------------------------------------------------------
   |Should I loot all items?
   |------------------------------------------------------------
   /declare RV_LootAllItems     int outer  0
   |------------------------------------------------------------
   |Should I display stats?
   |------------------------------------------------------------
   /declare RV_DisplayStats     int outer  1

   |------------------------------------------------------------
   |Loot Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterMob.ini "${Zone.Name}" Mob
   /if (!${Defined[RV_MobArray]}) {
      /echo Mob Array Creation Error, ending macro...
      /endmacro
   }

   |------------------------------------------------------------
   |Mob Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterLoot.ini "${Zone.Name}" Loot
   /if (!${Defined[RV_LootArray]}) {
      /echo No Loot Array Created...
   }

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_FailCounter      int outer  0
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   
   /declare RV_FastRange        int outer
   /declare RV_RangeMax         int outer
   /declare RV_RangeMin         int outer
   /varcalc RV_FastRange ${RV_Range}+3
   /varcalc RV_RangeMax ${RV_Range}+1
   /varcalc RV_RangeMin ${RV_Range}-1

   :Start
   /doevents
   /moveto loc -605 912
   /delay 3s
   /keypress esc
   /tar radius 200 corpse
   /if (${Target.Type.Equal["Corpse"]}) {
   /stick 10
   /delay 5s
   /call Lootmob
   /goto :start
   }
   :loop
   /if (${Me.PctMana}<60) {
   /delay 15s
   /goto :loop
   }
   /call Rebuff
   /if (${Me.Casting.ID}) /delay 3s
   /call GMCheck
   /call GetTarget
   /call Dead

   :KillAdds
   /if (${RV_HasTarget}) /call MoveToMob
   /if (${RV_HasTarget}) /call CombatSub
   /if (${RV_HasTarget}) /call MoveToMob
   /if (${RV_HasTarget} && (${Defined[RV_LootArray]} || ${RV_LootAllItems})) /call LootMob
   /if (${RV_DisplayStats}) /call DisplayStats
   /call ResetSub

   /varset RV_RandomWait ${Math.Rand[5]}
   /varcalc RV_RandomWait ${RV_RandomWait}+1
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming
   /delay ${RV_RandomWait}s
   
   /if (${Target.ID}) {
      /echo Looks like something is attacking us, killing it...
      /delay 1s
      /varset RV_HasTarget 1
      /varset RV_Fighting 1
      /goto :KillAdds
   }
   
   /goto :Start
   
/return

|--------------------------------------------------------------------------------
|SUB: Aquire Target
|--------------------------------------------------------------------------------
Sub GetTarget

   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub   int local
   :Acquire
   /for RV_CurrentRadius 20 to ${RV_MaxRadius} step 100
      /for RV_TargetSub 1 to ${RV_MobArray.Size}
         /squelch /target radius ${RV_CurrentRadius} nopcnear notid ${RV_InvalidTargetID} npc "${RV_MobArray[${RV_TargetSub}]}"
         /varset RV_MyTargetID ${Target.ID}
         /varset RV_MyTargetDead 0
         /if (${Target.ID}) {
            /if (${Int[${Target.PctHPs}]}<92) {
               /echo Mob NOT a Full Health, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
               /echo Mob is BELOW Min Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
               /echo Mob is ABOVE Max Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /varset RV_HasTarget 1
            /varset RV_MyTargetName ${Target.CleanName}
            /echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
            /return
         }
      /next RV_TargetSub
      /delay 2
   /next RV_CurrentRadius

   /if (!${Target.ID}) {
      /delay 2s
      /varcalc RV_FailCounter ${RV_FailCounter}+1
      /echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
      /if (${RV_FailCounter}>=${RV_FailMax}) {
         /echo Waiting for Respawns, Resetting Failure Counter...
         /delay 60s
         /varset RV_FailCounter 0
      }
      /goto :Acquire
   }
/return

|--------------------------------------------------------------------------------
|SUB: Moving
|--------------------------------------------------------------------------------
Sub MoveToMob

   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /declare RV_DistanceTimer timer 15
   
   /doevents
   
   :MovementLoop

   /if ((!${RV_Fighting})&&(!${RV_TargetDead})&&(${Target.PctHPs}<100)) {
      /echo Mob not at full health, picking another...
      /varset RV_InvalidTargetID ${Target.ID}
      /varset RV_HasTarget 0
      /call ResetSub
      /return
   }

  /stick 15 hold
  
   /if (!${RV_DistanceTimer}) {
      /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
      /varset RV_MyXLOC ${Int[${Me.X}]}
      /varset RV_MyYLOC ${Int[${Me.Y}]}
      /varset RV_DistanceTimer 15
      /goto :Movementloop
   }
   /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop

/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub

   /echo Attacking Mob NOW!
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /pet attack
   /casting "Desecrating Darkness" -maxtries|4
   
   :CombatLoop
   /doevents
   /attack on
   /casting "Deathwhisper|mainhand"
   /if (${Target.PctHPs}<20) /cast "Ancient: Touch of Orshilak"
   /if (${Target.PctHPs}>80 && ${Me.PctHPs}>70) /casting "Miragul's Greaves of Risen Souls|legs"
   /if (${Me.PctHPs}>70) /cast "Acikin"
   /if (${Me.PctHPs}<70) /cast "Ancient: Touch of Orshilak"
   /casting "Dagger of Death|item"
   /delay 1s
   /if (${Target.Distance}>30) /call MoveToMob
   /call SpecialIT

   /if (!${Target.ID}) {
      /attack off
      /keypress forward
      /keypress back
     
      /varset RV_TargetDead 1
      /varset RV_Fighting 0
      /delay 1s
      /target radius 30 corpse
      /delay 1s
      /if (!${Target.ID}) {
         /call ResetSub
         /return
      }
      /face
   }
   /if (!${RV_TargetDead}) {
      /goto :CombatLoop
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Special Combat
|--------------------------------------------------------------------------------
Sub SpecialIt

   /declare TempID    int inner  0

   /if ((${Target.Distance}<11)&&(${Me.AbilityReady["Bash"]})) /doability "Bash"
   
   /if ((${Int[${Me.PctHPs}]}<50)&&(${Me.Gem["Light of Nife"]})&&(${Me.SpellReady["Light of Nife"]})) {
      /varset TempID ${Target.ID}
      /keypress forward
      /keypress back
      /keypress F1
      /echo Casting Heal Spell because of low health...
      /cast "Light of Nife"
      /delay 3s
      /target id ${TempID}
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob

   /declare LootSlot    int inner  0
   /declare LootCheck   int inner  0
   /declare LootTotal   int inner  0
   
   /face
   
   /keypress forward
   /keypress back
   
   /fastdrop on
   /lootn never
   /delay 2s
   /loot
   /delay 2s
   /if (!${Corpse.Items}) {
      /echo NO LOOT! Cheap Bastard!
      /return
   }

   /varset LootTotal ${Corpse.Items}
   /for LootSlot 1 to ${LootTotal}
      /itemnotify loot${LootSlot} leftmouseup
      /delay 1s
      /if (${RV_LootAllItems}) {
         /echo Keeping a ${Cursor.Name}... WOOT!
         /autoinventory
         /delay 1s
      } else {
         /for LootCheck 1 to ${RV_LootArray.Size}
            /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
               /echo Keeping a ${Cursor.Name}... WOOT!
               /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
               /autoinventory
               /delay 1s
            }
         /next LootCheck
      }
      /if (${Cursor.ID}) {
         /echo Destroying a ${Cursor.Name}...
         /destroy
         /delay 1s
      }
   /next LootSlot
   
   /notify LootWnd DoneButton leftmouseup
   /delay 2
   
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub

   /keypress esc
   /keypress esc
   /keypress esc
   /keypress esc
   
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
   
/return

|--------------------------------------------------------------------------------
|SUB: Obstacle Avoidance
|--------------------------------------------------------------------------------
Sub HitObstacle

   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[100]}+1>50) {
     /keypress strafe_right hold
   } else {
     /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
   
/return

|--------------------------------------------------------------------------------
|SUB: GM Check
|--------------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
     
      /echo GM has entered the zone!
      /echo FUCK HIM but ending the macro...

      /keypress forward
      /keypress back

      /quit
      /endmacro
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Reading from an INI File
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName,ArrayType)

   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
   /delay 1s
   
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
      /delay 1s
      /return
   }
   /declare nValues     int local  1
   /declare nArray      int local  0
   /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}

   :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
   /goto :CounterLoop 

   :MakeArray
   /if (!${nValues}) /return
   /if (${FileName.Equal["HunterMob.ini"]}&&${nValues}>0) {
      /echo Declaring Mob Array...
      /declare RV_MobArray[${nValues}]   string outer
      /declare RV_MobStats[${nValues}]   string outer
   }
   /if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HunterMob.ini"]}) {
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_MobStats[${nArray}] 0
      }
      /if (${FileName.Equal["HunterLoot.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
   
/return

|--------------------------------------------------------------------------------
|SUB: Display Stats
|--------------------------------------------------------------------------------
Sub DisplayStats

   /declare nArray  int local
   
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo ${Int[${RV_LootStats[${nArray}]}]} ${RV_LootArray[${nArray}]}'s
      /next nArray
   }
   
/return

Sub Dead
/if (${String[${Zone.ShortName}].Find["guildlobby"]}>0) {
		/delay 5s
		/echo You died, WTG . . .
		/exit
		/endmac
		}
		
/return

Sub Rebuff

/docrack dostuffwhilecasting off
      /if (!${Me.Buff["Grave Pact"].Duration}) /call cast "Grave Pact" gem3
      /if (${Me.Buff["Frostreaver's Blessing"].Duration}<5) /call SwapCast "ring of dain" "${p1}"
      /if (${Me.Buff["Form of Endurance II"].Duration}<5) /call SwapCast "veil of the inferno" "${p1}"
      /if (${Me.Buff["Aura of Eternity"].Duration}<5) /call SwapCast "celestial cloak" "${p1}"
      /if (${Me.Buff["Reyfin's Racing Thoughts"].Duration}<5) /call SwapCast "Xxeric's Matted-Fur Mask" "${p1}"
      /delay 3
      /autoinv
   /delay 3
   /docrack dostuffwhilecasting on
   /return

Sub SwapCast(item,equipslot)
   /declare inventoryslot int local
   /declare pack local
   /declare packslot int local
   /declare leaveopen int local 1
   /declare packnumber int local 0
   /declare leavetwisting int local 0

   /if (!${Defined[item]}) /goto :end
   /if (${Twist}) {
      /twist stop
      /varset leavetwisting 1
   }
   :stopsingingdelay
   /if (${Me.Casting.ID}>0) {
      /stopsong
      /goto :stopsingingdelay
      }
   /varset inventoryslot ${FindItem[${item}].InvSlot}
   /if (!${inventoryslot}) /goto :notfound
   :packcountloop
   /if (${inventoryslot}>250 && ${inventoryslot}<331) {
      /varset packnumber ${Math.Calc[${packnumber}+1]}
      /varset inventoryslot ${Math.Calc[${inventoryslot}-10]}
      /goto :packcountloop
      }
   /if (${packnumber} > 0) {
      /varset pack pack${packnumber}
      /varset packslot ${Math.Calc[${inventoryslot}-240]}
      /goto :foundit
      }
   :notinpack
      /call CastItem ${inventoryslot}
      /goto :end
   :foundit
      /if (!${Window[${pack}].Open}) {
         /nomod /itemnotify ${pack} rightmouseup
         /varset leaveopen 0
         }
      /call WaitCursor ${packslot} ${pack}
      /if (${equipslot.Find[null]}) {
         /if (${Cursor.WornSlots}>0) {
            /varset equipslot ${Cursor.WornSlot[1]}
         } else {
               /varset equipslot pack1
         }
      }
      /call WaitCursor ${equipslot}
      /call CastItem ${equipslot}
      /call WaitCursor ${equipslot}
      /call WaitCursor ${packslot} ${pack}
      /if (${leaveopen} == 0) /nomod /itemnotify ${pack} rightmouseup
      /goto :end
   :notfound
      /echo ${item} not found in inventory.
   :end
   /if (${leavetwisting} == 1) /twist start
/return

Sub CastItem(slot)
   /nomod /itemnotify ${slot} rightmouseup
   /echo Swapcast::Casting the effect on your ${InvSlot[${slot}].Item.Name}
   :castloop
|| special case composer greaves don't ever stop casting
      /if (${InvSlot[${slot}].Item.Name.Find["Composers Greaves"]}) {
         /delay 12
         /stopsong
      }
|| special cases for epics and other items that don't seem to cast proper with default cast times
       /if (${InvSlot[${slot}].Item.Name.Find["Blade of Vesagran"]}) {
         /delay 10
         /stopsong
      }
      /if (${InvSlot[${slot}].Item.Name.Find["Prismatic Dragon Blade"]}) {
         /delay 10
         /stopsong
      }
      /if (${Me.Casting.ID}>0) /goto :castloop
/return

Sub WaitCursor(slot, pack)
   /declare item local
   /declare timeout timer 30
   /varset item ${Cursor.ID}
   /if (${Defined[pack]}) /goto :waitloop2
   :waitloop1
      /nomod /itemnotify ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop1
   /goto :donewaiting
   :waitloop2
      /nomod /itemnotify in ${pack} ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop2
   :donewaiting
/return

huntermob.ini
Rich (BB code):
[Corathus Creep]
mob1=a creep reaper
mob2=a corathus squirmer
mob3=a slithering corathus
mob4=Vernon
mob5=creeper

hunterloot.ini
Rich (BB code):
[Corathus Creep]
loot1=clockwork gnome bolts
loot2=small clockwork screws
loot3=clockwork pinion gear
loot4=tiny clockwork shaft
loot5=clockwork gnome shaft
loot6=clockwork gnome gear
loot7=small clockwork gnome shaft
loot8=saltpeter
loot9=clockwork gnome spring
loot10=small clockwork shaft
 
Well, this is going to sound sorta random...but whoever sent me the redcent saying that they had some ideas for the macros...your name isn't attached to that, so either send me a PM, or post here =p
 
btw gnomework bolts drop off of the green gnomes in CC aswell, the super-plated gnome's even. Seem to have a higher drop rate aswell for me atleast
 
*bump*

Updated the AFKnecro.mac to a newer, sleeker, sexier version!
 
Last edited:
My macro is of my own modification from the original Hunter.mac, and intended specifically for farming AAAA parts in CC.
 
Would you like me to remove that post Thez? I just thought maybe you might have overlooked it. Thank You Thez for your great dedication to help us all.
 
OK I am not to bright when it comes to changing things in macros, I am trying to use the hunter mac for my necro. I changed the spells to my necros lvl and I keep getting many error messages. I have no clue as to what to do here. Only thing I have done, (as far as I know) is changed spells to my lvl. I would really enjoy using this but I have no idea what I am doing. Been working on this for the past three hours. :confused:

[MQ2] attempting to read section "zone" zone information from huntermob.ini...MQ2 declaring mob array
DoCommand-couldn't parse
'${INI[${filename},${sectionname},${arraytype}${${NArray}]}'
Necohunter.mac@499
(readini(filename,sectionname,arraytype)):Necrohunter.mac@55(main):/call readini huntermob "${zone.names}" this repeats four times and [MQ2]"zone I'm in" zone information read successfully from huntermob.ini Then repeats above with @505,@140,@229,@267

At the end it reads [MQ2] "zone" zone information read successfully from hunterloot.ini
Then macro ends

Any help would be greatly appreciated
 
I'm not sure if I am reading your post right or not. Is the error actually giving "zone" literally or did you replace say "Corrathus Creep" with "zone"?

Might try this for debugging. Find this line...

Rich (BB code):
/if (${FileName.Equal["HunterMob.ini"]}) /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]}

and change it to...

Rich (BB code):
      /if (${FileName.Equal["HunterMob.ini"]}) {
      	/varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]} 
      	/echo ${RV_MobArray[${nArray}]} - ${nArray}
      }

That way you can see what your mob array is being set to.
 
You don't have your other files set up correctly for your zone of choice.
 
Updated ONCE AGAIN

In this update, I've done a few things.

-Removed the "Curse" option for dots. Why? Because it simply wasn't being activated when I used the macro. Just swap your Curse dot into one of your other slots.

-Significantly changed the way that nuking is done to deal with using the spell Demand for Blood. The nuking subroutine now nukes until you get a Chaotic Power proc, then doesn't nuke until it wears off. It also will automatically lifetap on the next Nuke cycle if you go below 90% hp.

-You no longer need to reactivate bigdots if you restart the macro.

-Added "/echo CP" for toggling the Chaotic Power nuke feature. If CP is off (default), there will not be nuking unless your HP is low.
 
Very nice, edited the necro hunter to use my lowlvl spells + a loop for sitting while hp is below x %..using it to lvl my 5 necro in FoB atm while working on the comp :D
 
I am getting this spamming message with hunter.mac Top level object, it has been removed do to complete misuse of the string. any help would be awesome thank you. This is what I have:

PHP:
| Hunter Macro
| Hunter.mac
| Author      : robdawg
| Version     : v1.2 2004-05-13 10:06pm PST
| Useage      : /macro Hunter
| Description : This macro will run your character around killing any mobs in your
|      RV_MobArray.  Then it will attempt to loot all items in your
|      RV_LootArray.  This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
|------------------------------------------------------------------------------------

#turbo 10
#include spell_routines.inc

Sub Main

   |------------------------------------------------------------
   |How many times should aquire target fail before delaying?
   |------------------------------------------------------------
   /declare RV_FailMax          int outer  3
   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  300
   |------------------------------------------------------------
   |How far is the combat range?
   |------------------------------------------------------------
   /declare RV_Range            int outer 10
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MinZRange        int outer  -1000
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MaxZRange        int outer  1000
   |------------------------------------------------------------
   |Should I loot all items?
   |------------------------------------------------------------
   /declare RV_LootAllItems     int outer  0
   |------------------------------------------------------------
   |Should I display stats?
   |------------------------------------------------------------
   /declare RV_DisplayStats     int outer  1

   |------------------------------------------------------------
   |Loot Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterMob.ini "${Zone.Name}" Mob
   /if (!${Defined[RV_MobArray]}) {
      /echo Mob Array Creation Error, ending macro...
      /endmacro
   }

   |------------------------------------------------------------
   |Mob Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterLoot.ini "${Zone.Name}" Loot
   /if (!${Defined[RV_LootArray]}) {
      /echo No Loot Array Created...
   }

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_FailCounter      int outer  0
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   
   /declare RV_FastRange        int outer
   /declare RV_RangeMax         int outer
   /declare RV_RangeMin         int outer
   /varcalc RV_FastRange ${RV_Range}+3
   /varcalc RV_RangeMax ${RV_Range}+1
   /varcalc RV_RangeMin ${RV_Range}-1

   :Start
   /doevents
   /delay 3s
   /keypress esc
   /tar radius 200 corpse
   /if (${Target.Type.Equal["Corpse"]}) {
   /stick 10
   /delay 5s
   /call Lootmob
   /goto :start
   }
   :loop
   /if (${Me.PctMana}<60) {
   /delay 15s
   /goto :loop
   }
   /if (${Me.Casting.ID}) /delay 3s
   /call GMCheck
   /call GetTarget
   /call Dead

   :KillAdds
   /if (${RV_HasTarget}) /call MoveToMob
   /if (${RV_HasTarget}) /call CombatSub
   /if (${RV_HasTarget}) /call MoveToMob
   /if (${RV_HasTarget} && (${Defined[RV_LootArray]} || ${RV_LootAllItems})) /call LootMob
   /if (${RV_DisplayStats}) /call DisplayStats
   /call ResetSub

   /varset RV_RandomWait ${Math.Rand[5]}
   /varcalc RV_RandomWait ${RV_RandomWait}+1
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming
   /delay ${RV_RandomWait}s
   
   /if (${Target.ID}) {
      /echo Looks like something is attacking us, killing it...
      /delay 1s
      /varset RV_HasTarget 1
      /varset RV_Fighting 1
      /goto :KillAdds
   }
   
   /goto :Start
   
/return

|--------------------------------------------------------------------------------
|SUB: Aquire Target
|--------------------------------------------------------------------------------
Sub GetTarget

   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub   int local
   :Acquire
   /for RV_CurrentRadius 20 to ${RV_MaxRadius} step 100
      /for RV_TargetSub 1 to ${RV_MobArray.Size}
         /squelch /target radius ${RV_CurrentRadius} nopcnear notid ${RV_InvalidTargetID} npc "${RV_MobArray[${RV_TargetSub}]}"
         /varset RV_MyTargetID ${Target.ID}
         /varset RV_MyTargetDead 0
         /if (${Target.ID}) {
            /if (${Int[${Target.PctHPs}]}<92) {
               /echo Mob NOT a Full Health, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
               /echo Mob is BELOW Min Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
               /echo Mob is ABOVE Max Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /varset RV_HasTarget 1
            /varset RV_MyTargetName ${Target.CleanName}
            /echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
            /return
         }
      /next RV_TargetSub
      /delay 2
   /next RV_CurrentRadius

   /if (!${Target.ID}) {
      /delay 2s
      /varcalc RV_FailCounter ${RV_FailCounter}+1
      /echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
      /if (${RV_FailCounter}>=${RV_FailMax}) {
         /echo Waiting for Respawns, Resetting Failure Counter...
         /delay 60s
         /varset RV_FailCounter 0
      }
      /goto :Acquire
   }
/return

|--------------------------------------------------------------------------------
|SUB: Moving
|--------------------------------------------------------------------------------
Sub MoveToMob

   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /declare RV_DistanceTimer timer 15
   
   /doevents
   
   :MovementLoop

   /if ((!${RV_Fighting})&&(!${RV_TargetDead})&&(${Target.PctHPs}<100)) {
      /echo Mob not at full health, picking another...
      /varset RV_InvalidTargetID ${Target.ID}
      /varset RV_HasTarget 0
      /call ResetSub
      /return
   }

  /stick 15 hold
  
   /if (!${RV_DistanceTimer}) {
      /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
      /varset RV_MyXLOC ${Int[${Me.X}]}
      /varset RV_MyYLOC ${Int[${Me.Y}]}
      /varset RV_DistanceTimer 15
      /goto :Movementloop
   }
   /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop

/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub

   /echo Attacking Mob NOW!
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /pet attack
   /casting "Dooming Darkness" -maxtries|4
   
   :CombatLoop
   /doevents
   /attack on
   /if (${Target.PctHPs}<20) /cast "Spirit Tap"
   /if (${Target.PctHPs}>80 && ${Me.PctHPs}>70) /casting "Boil Blood"
   /if (${Me.PctHPs}>70) /cast "Torbas' Acid Blast"
   /if (${Me.PctHPs}<70) /cast "Spirit Tap"
   /if (${Target.Distance}>30) /call MoveToMob
   /call SpecialIT

   /if (!${Target.ID}) {
      /attack off
      /keypress forward
      /keypress back
     
      /varset RV_TargetDead 1
      /varset RV_Fighting 0
      /delay 1s
      /target radius 30 corpse
      /delay 1s
      /if (!${Target.ID}) {
         /call ResetSub
         /return
      }
      /face
   }
   /if (!${RV_TargetDead}) {
      /goto :CombatLoop
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Special Combat
|--------------------------------------------------------------------------------
Sub SpecialIt

   /declare TempID    int inner  0

   /if ((${Int[${Me.PctHPs}]}<50)&&(${Me.Gem["Greater Shielding"]})&&(${Me.SpellReady["Greater Shielding"]})) {
      /varset TempID ${Target.ID}
      /keypress forward
      /keypress back
      /keypress F1
      /echo Casting Heal Spell because of low health...
      /cast "Greater Shielding"
      /delay 3s
      /target id ${TempID}
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob

   /declare LootSlot    int inner  0
   /declare LootCheck   int inner  0
   /declare LootTotal   int inner  0
   
   /face
   
   /keypress forward
   /keypress back
   
   /fastdrop on
   /lootn never
   /delay 2s
   /loot
   /delay 2s
   /if (!${Corpse.Items}) {
      /echo NO LOOT! Cheap Bastard!
      /return
   }

   /varset LootTotal ${Corpse.Items}
   /for LootSlot 1 to ${LootTotal}
      /itemnotify loot${LootSlot} leftmouseup
      /delay 1s
      /if (${RV_LootAllItems}) {
         /echo Keeping a ${Cursor.Name}... WOOT!
         /autoinventory
         /delay 1s
      } else {
         /for LootCheck 1 to ${RV_LootArray.Size}
            /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
               /echo Keeping a ${Cursor.Name}... WOOT!
               /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
               /autoinventory
               /delay 1s
            }
         /next LootCheck
      }
      /if (${Cursor.ID}) {
         /echo Destroying a ${Cursor.Name}...
         /destroy
         /delay 1s
      }
   /next LootSlot
   
   /notify LootWnd DoneButton leftmouseup
   /delay 2
   
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub

   /keypress esc
   /keypress esc
   /keypress esc
   /keypress esc
   
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
   
/return

|--------------------------------------------------------------------------------
|SUB: Obstacle Avoidance
|--------------------------------------------------------------------------------
Sub HitObstacle

   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[100]}+1>50) {
     /keypress strafe_right hold
   } else {
     /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
   
/return

|--------------------------------------------------------------------------------
|SUB: GM Check
|--------------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
     
      /echo GM has entered the zone!
      /echo SCREW HIM!!! but ending the macro...

      /keypress forward
      /keypress back

      /quit
      /endmacro
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Reading from an INI File
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName,ArrayType)

   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
   /delay 1s
   
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
      /delay 1s
      /return
   }
   /declare nValues     int local  1
   /declare nArray      int local  0
   /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}

   :CounterLoop
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
   /goto :CounterLoop 

   :MakeArray
   /if (!${nValues}) /return
   /if (${FileName.Equal["HunterMob.ini"]}&&${nValues}>0) {
      /echo Declaring Mob Array...
      /declare RV_MobArray[${nValues}]   string outer
      /declare RV_MobStats[${nValues}]   string outer
   }
   /if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HunterMob.ini"]}) {
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_MobStats[${nArray}] 0
      }
      /if (${FileName.Equal["HunterLoot.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
   
/return

|--------------------------------------------------------------------------------
|SUB: Display Stats
|--------------------------------------------------------------------------------
Sub DisplayStats

   /declare nArray  int local
   
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo ${Int[${RV_LootStats[${nArray}]}]} ${RV_LootArray[${nArray}]}'s
      /next nArray
   }
   
/return

Sub Dead
/if (${String[${Zone.ShortName}].Find["guildlobby"]}>0) {
		/delay 5s
		/echo You died, WTG . . .
		/exit
		/endmac
		}
		
/return

Sub SwapCast(item,equipslot)
   /declare inventoryslot int local
   /declare pack local
   /declare packslot int local
   /declare leaveopen int local 1
   /declare packnumber int local 0
   /declare leavetwisting int local 0

   /if (!${Defined[item]}) /goto :end
   /if (${Twist}) {
      /twist stop
      /varset leavetwisting 1
   }
   :stopsingingdelay
   /if (${Me.Casting.ID}>0) {
      /stopsong
      /goto :stopsingingdelay
      }
   /varset inventoryslot ${FindItem[${item}].InvSlot}
   /if (!${inventoryslot}) /goto :notfound
   :packcountloop
   /if (${inventoryslot}>250 && ${inventoryslot}<331) {
      /varset packnumber ${Math.Calc[${packnumber}+1]}
      /varset inventoryslot ${Math.Calc[${inventoryslot}-10]}
      /goto :packcountloop
      }
   /if (${packnumber} > 0) {
      /varset pack pack${packnumber}
      /varset packslot ${Math.Calc[${inventoryslot}-240]}
      /goto :foundit
      }
   :notinpack
      /call CastItem ${inventoryslot}
      /goto :end
   :foundit
      /if (!${Window[${pack}].Open}) {
         /nomod /itemnotify ${pack} rightmouseup
         /varset leaveopen 0
         }
      /call WaitCursor ${packslot} ${pack}
      /if (${equipslot.Find[null]}) {
         /if (${Cursor.WornSlots}>0) {
            /varset equipslot ${Cursor.WornSlot[1]}
         } else {
               /varset equipslot pack1
         }
      }
      /call WaitCursor ${equipslot}
      /call CastItem ${equipslot}
      /call WaitCursor ${equipslot}
      /call WaitCursor ${packslot} ${pack}
      /if (${leaveopen} == 0) /nomod /itemnotify ${pack} rightmouseup
      /goto :end
   :notfound
      /echo ${item} not found in inventory.
   :end
   /if (${leavetwisting} == 1) /twist start
/return

Sub CastItem(slot)
   /nomod /itemnotify ${slot} rightmouseup
   /echo Swapcast::Casting the effect on your ${InvSlot[${slot}].Item.Name}
   :castloop
|| special case composer greaves don't ever stop casting
      /if (${InvSlot[${slot}].Item.Name.Find["Composers Greaves"]}) {
         /delay 12
         /stopsong
      }
|| special cases for epics and other items that don't seem to cast proper with default cast times
       /if (${InvSlot[${slot}].Item.Name.Find["Blade of Vesagran"]}) {
         /delay 10
         /stopsong
      }
      /if (${InvSlot[${slot}].Item.Name.Find["Prismatic Dragon Blade"]}) {
         /delay 10
         /stopsong
      }
      /if (${Me.Casting.ID}>0) /goto :castloop
/return

Sub WaitCursor(slot, pack)
   /declare item local
   /declare timeout timer 30
   /varset item ${Cursor.ID}
   /if (${Defined[pack]}) /goto :waitloop2
   :waitloop1
      /nomod /itemnotify ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop1
   /goto :donewaiting
   :waitloop2
      /nomod /itemnotify in ${pack} ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop2
   :donewaiting
/return
 
Hey Liestol could you post that macro? I think many of us have low lvl ones that would love to play with it a bit? I couldn't get mine working for low lvl either... guess i haven't learned as much as i thought yet hehe...
 
I am getting this spamming message with hunter.mac Top level object, it has been removed do to complete misuse of the string. any help would be awesome thank you.

You must be using your own compile. I suggest you follow these instructions to re-add the string TLO. Go to this link, and scroll down to the line "Putting string back in:", then read from there.
 
One thing that would really help non programmer types is if programmers would document in their macros thing like

| Start macro by doing abc

|Change this section to YOUR SPELLS

| CHANGE THIS SECTION on / off 1 / 0 true / false TO Make your spells cast

I have been trying to get the afk necro to work now for 2 hours and have had no luck. It targets the MA mob but just stands there and doesnt cast anything. My necro is level 30 and when i type /status it says all my stuff is set to FALSE i have no clue where to make them true or how to do it.
 
Well, okay. Assuming that you've set all your spells correctly, here's what you do to get spells working:

These are the relevant events. By saying the text in each of them with a "/echo <whatever>" command, you can activate different things in the macro.

To activate the dot in Dot1, /echo dot1 . To activate dot2, /echo dot2 . etc, etc. To turn on casting the "big dots", Ashengate Pyre and Dread Pyre, type /echo bigdot. To enable nuking for Chaotic Power procs, which is what this macro is designed to do, /echo CP . To sit after casting, /echo sit, etc.

Rich (BB code):
#Event CPower "[MQ2] cp"
#event Bigdot "[MQ2] bigdot"
#Event face "[MQ2] face"
#Event sit "[MQ2] sit"
#Event DoT1 "[MQ2] dot1"
#Event DoT2 "[MQ2] dot2"
#Event DoT3 "[MQ2] dot3"
#Event DoT4 "[MQ2] dot4"
#Event MAChange "[MQ2] ma #1#"
#Event SAChange "[MQ2] sa #1#"
#Event TAChange "[MQ2] ta #1#"
#Event DP "[MQ2] DP"
#Event Status "[MQ2] status"
#Event LegProc "[MQ2] pyro"
#Event MWChange "[MQ2] MW"
 
A few macros...

Users who are viewing this thread

Back
Top
Cart