INI documentation is in the eighth post in this thread - updated 10/28
(11/18) - Finally converted over to spell_routines.inc. I should have done this a long time ago. I still use my own item code, but all the casting is now handled by spell_routines.inc. Fixed a bug in noassist mode that I created last update.
(11/13) - Pretty significant overhaul for speed optimization. I moved casting announcements from the main macro to spellcast.inc, which allowed me to remove alot of unnecessary waiting the macro had been doing. Changed autoTL - it will now only respond to someone on the Master List. (/addmaster name). To invoke the translocate, type "/tl name" yourself, or send a tell to the wizard "/tl name" if on the Master list. Also added an evac command. Type /evac or send a tell to the wizard "/evac" if on the Master list. If the wizard is casting a spell he'll interrupt it and evacuate. Uses exodus first, and evacuate if exodus is not available.
(11/09) - Various fixes, the concussion 'issue' should be gone now. Removed preconcperc as it was no longer needed. Got rid of the animation checks for now since they were causing problems.
(10/29) - Workaround for AltAbilityReady. Should fix any issues with AltAbilityReady reporting TRUE on AA's for your class you don't yet have.
(10/28) - Updated the macro as well as spellcast.inc - thanks to ideas I stole from Rusty's spell_routines.inc. The interrupt code for spells (if enabled with the checktarget option in your nuke_name.ini) is now much more responsive and accurate. I removed alot of delays from the macro and it runs alot faster now, you have been warned. Snare resist code should work now, but I haven't tested it. The mod rod item charge bug is also fixed. Added alias: /modrod.
(10/24) - Added PreConcussion option. Defaults to off. If enabled, it will concussion mobs before you nuke the number of times you specify. You can also specify what percentage to preconcussion. Added aliases: /preconc, /preconcnum, /preconcperc, /harvest, /harvestperc,
/medtoggle. Made the macro even more mez-friendly.
(10/22) - Fixed a typo in Ether Skin code. Only need to grab afnuke2.inc for the fix.
(10/15) - Added line of sight checks to autosit and meditate code.
(10/11) - Fixed Maelin/Ether Shield so the macro won't try to cast them if you have Wunshi's. Reduced the range that triggers autostand while meditating (for real this time). Added aliases: /epic, /timewand. Added some code to prevent breaking mez.
(10/09) - Added support for Ether Skin and Ether Shield. Reduced the range that triggers autostand while meditating.
(09/26) - Added new oow familiars, and support for up to 20 buffs. I know, I'm a slacker.
(09/22) - Mostly this is just the addition of Wrath of Xuzl to the macro. If you have Wrath of Xuzl, it will be used instead of Call of Xuzl. If you don't have Wrath of Xuzl, the macro will continue to use Call of Xuzl. Todo list includes addition of exodus/evac on command, more TL destinations, and possibly a snare overhaul. I'll also be updating the buffslot stuff to 20 and try to add OOW aa's as well.
(09/19) - Two updates today. I can't come up with an elegant solution for AE snare. As such I'm going to have it ignore resists for now and leave the distance check out. I made automated translocate better - it will now only translocate if "tl" are the first two letters in the tell, or "translocate" is the first word in the tell. I also added a toggle for it, called autoTL. Added on the fly force shield toggle. Added version checking (hopefully will make the macro load faster for those who have slow computers). Made adjustments to snare. Fixed a bug that made temp staff setting in assist mode too verbose. ;) Made various other improvements and tweaks. More to come.
I've been playtesting it and I like the macro alot better now overall. If you haven't yet given it a try, check it out.
Warning - If you try to /leash to a mounted player, it can screw the following routine up. I have no idea why (works fine on unmounted players).
And the macro code:
Code: Select all
|----------------------------------------------------------------------------|
| AFNuke.mac MQ2Data compliant and created by Azum
| 12/02/04 7:00pm
| Original Nuke sub 'borrowed' from Yalp
| INI and Exclude code shamelessly stolen from ml2517
| Original Manarobe code mostly stolen from ieatacid, refined by Azum
| Leash and /iclick routines taken from Jerle's Rogue Helper macro
| When you first run the macro start it with /mac afnuke tankname and
| an .INI file will be generated (nuke_yourname.ini).
| To change the tankname, simply restart with /mac afnuke tankname again.
| Otherwise, /mac afnuke will start the macro with the tankname specified in
| the ini file.
| Useage /mac afnuke tankname1 tankname2 tankname3 or
| /mac afnuke tankname1 tankname2 or /mac afnuke tankname1 or /mac afnuke
| TIP: The easiest way to exclude/include mobs is to set up a hotkey:
| For Excludes:
| /exclude ${Target.CleanName}
| To Remove an Exclude:
| /include ${Target.CleanName}
#include spell_routines.inc
#include afnuke.inc
#include afnuke2.inc
#chat tell
#Event mezbreak "#*#awakened by #1#"
#event stunned "#*#while stunned#*#"
#event slain "#*#has been slain#*#"
#event EXP "#*#gain experience!#*#"
#event oom "#*#Insufficient mana#*#"
#event range "#*#target is out of range#*#"
#event cantsee "You cannot see#*#"
#event died "#*#Returning to home point, please wait...#*#"
#event died "#*#you have been slain#*#"
#event zoned "#*#You have entered#*#"
#event force "The shield fades away."
#event force "The maelstrom dissipates."
#event summon "You have been summoned!"
#event hit "#*# YOU for #*#"
#event hit "#*# YOU, but #*#"
#event togglemain "[MQ2] nuke1 #1#"
#event toggleend "[MQ2] nuke2 #1#"
#event togglemodrod "[MQ2] domodrod"
#event toggleconc "[MQ2] conc"
#event concnum "[MQ2] concnum #1#"
#event familiar "[MQ2] myfamiliar #1#"
#event togglemainnukenum "[MQ2] mainnukenum #1#"
#event toggleendnukenum "[MQ2] endnukenum #1#"
#event togglemaxbuffs "[MQ2] maxbuffs #1#"
#event togglemobhealth "[MQ2] mobhealth #1#"
#event togglestaffhealth "[MQ2] staffhealth #1#"
#event togglestopnuke "[MQ2] stopnuke #1#"
#event togglestopnuke2 "[MQ2] stopnuke2 #1#"
#event toggledistance "[MQ2] engagedistance #1#"
#event toggleass "[MQ2] assist"
#event togglexuzl "[MQ2] doxuzl"
#event togglemanarobe "[MQ2] manarobe"
#event togglexuzlperc "[MQ2] xuzlperc #1#"
#event toggletemp "[MQ2] temp"
#event togglesnare "[MQ2] dosnare"
#event togglesnareperc "[MQ2] snareperc #1#"
#event toggless "[MQ2] ss"
#event togglemanaward "[MQ2] mw"
#event toggletimewand "[MQ2] timewand"
#event toggleepic "[MQ2] epic"
#event toggleforceshield "[MQ2] forceshield"
#event toggleautosit "[MQ2] autosit"
#event togglemaelin "[MQ2] som"
#event togglema "[MQ2] ma #1#"
#event togglesa "[MQ2] sa #1#"
#event toggleta "[MQ2] ta #1#"
#event cycleassist "[MQ2] cycle"
#event spellshield "The magical barrier fades #*#"
#event manaward "The blue aura fades #*#"
#event exclude "[MQ2] exclude #*#"
#event include "[MQ2] include #*#"
#event addmaster "[MQ2] addmaster #*#"
#event delmaster "[MQ2] delmaster #*#"
#event addjunk "[MQ2] addjunk #*#"
#event deljunk "[MQ2] deljunk #*#"
#event pause "[MQ2] pause"
#event itemset "[MQ2] itemset #1# #2# #3#"
#event itembounce "[MQ2] itembounce #1# #2#"
#event itemcast "[MQ2] itemcast #1#"
#event togleash "[MQ2] leash#*#"
#event autofollow "[MQ2] autofollow#*#"
#event stopfollow "[MQ2] stopfollow#*#"
#event afhelp "[MQ2] afhelp"
#event nukepause "[MQ2] nukepause #*#
#event toggleharvest "[MQ2] doharvest"
#event toggleharvestperc "[MQ2] harvestperc #1#"
#event togglemeditate "[MQ2] medtoggle"
#event togglepreconc "[MQ2] dopreconc"
#event togglepreconcnum "[MQ2] preconcnum #1#"
#event translocate "[MQ2] tlocate #*#"
#event getout "[MQ2] getout"
sub main
/declare noInterrupt int outer 1
/declare noInvis int outer 1
/declare pcid int outer
/declare preconc int outer
/declare preconcnum int outer
/declare npcnum int outer
/declare forcespell string outer
/declare shieldspell string outer
/declare version string outer 120204
/declare autoTL int outer
/declare autositmana int outer
/declare autosit int outer
/declare sittimer timer outer 0
/declare Y float outer
/declare X float outer
/declare pausetimer timer outer 0
/declare nukepause string outer None
/declare followdistance int outer
/declare leashlength int outer 0
/declare stakeX int outer
/declare stakeY int outer
/declare leashholder string outer Nobody
/declare doleash int outer
/declare wornslot string outer NULL
/declare dopause int outer
/declare AlertList int outer 20
/declare buffslot int outer
/declare maxbuffs int outer
/declare retry int outer
/declare retrycount int outer 0
/declare olditem string outer NULL
/declare snarespell string outer
/declare snaretimer timer outer 0
/declare bag int outer
/declare slot int outer
/declare snareperc int outer
/declare dosnare int outer
/declare snaregem string outer
/declare modrod int outer
/declare rodpercent int outer
/declare hasrod int outer 1
/declare asstimer timer outer 0
/declare rodtimer timer outer 0
/declare nukecount int outer 0
/declare endnukenum int outer
/declare mainnukenum int outer
/declare checktarget string outer
/declare conccount int outer 0
/declare concnum int outer
/declare IniFile string outer
/declare INIFlag int outer
/declare TempStr string outer
/declare TempSpell string outer
/declare medtoggle int outer
/declare medpercent int outer
/declare doharvest int outer
/declare harvestpercent int outer
/declare manatomedup int outer
/declare checkfamiliar int outer
/declare myfamiliar int outer
/declare m int outer
/declare n int outer
/declare concuss int outer
/declare shieldofmaelin int outer
/declare stopnuke int outer
/declare tankname string outer
/declare engagedistance int outer
/declare engagedmob int outer 0
/declare mobhealth int outer
/declare mobid int outer 0
/declare forceshield int outer
/declare manarobe int outer
/declare beginrobe int outer
/declare hasrobe int outer 1
/declare donerobe int outer
/declare tempstaff int outer
/declare staffhealth int outer
/declare stopnuke2 int outer
/declare mainnuke string outer
/declare endnuke string outer
/declare mainnukegem string outer
/declare endnukegem string outer
/declare forcegem string outer
/declare harvestgem string outer
/declare maelingem string outer
/declare spellshield int outer
/declare manaward int outer
/declare ssgem string outer
/declare manawardgem string outer
/declare hasele int outer
/declare myconc string outer NULL
/declare myconcgem string outer
/declare usetimewand int outer
/declare useepic int outer
/declare doxuzl int outer
/declare xuzlperc int outer
/declare mainassist1 string outer
/declare mainassist2 string outer
/declare mainassist3 string outer
/declare doassist int outer
/declare ialias string outer None
/declare doiclick int outer
/declare bouncenum int outer 1
/declare ibounce string outer None
/declare itemspellname string outer None
/declare clicktimer timer outer 0
/varset IniFile nuke_${Me.Name}.ini
/if (${Defined[Param2]}) {
/ini "${IniFile}" Settings tankname ${Param0}
/ini "${IniFile}" Settings mainassist1 ${Param0}
/varset mainassist1 ${Param0}
/varset tankname ${Param0}
/ini "${IniFile}" Settings mainassist2 ${Param1}
/varset mainassist2 ${Param1}
/ini "${IniFile}" Settings mainassist3 ${Param2}
/varset mainassist3 ${Param2}
} else /if (${Defined[Param1]}) {
/ini "${IniFile}" Settings tankname ${Param0}
/ini "${IniFile}" Settings mainassist1 ${Param0}
/varset mainassist1 ${Param0}
/varset tankname ${Param0}
/ini "${IniFile}" Settings mainassist2 ${Param1}
/varset mainassist2 ${Param1}
} else /if (${Defined[Param0]}) {
/ini "${IniFile}" Settings tankname ${Param0}
/ini "${IniFile}" Settings mainassist1 ${Param0}
/varset mainassist1 ${Param0}
/varset tankname ${Param0}
} else /if (!${Defined[Param0]}) {
/varset TempStr ${Ini[${IniFile},Settings,tankname,NOTFOUND]}
/varset tankname ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/echo You need to start the macro with /mac afnuke tankname and generate your .INI file.
/endmacro
}
}
/call LoadINI
/call AntiRetard
/cleanup
/Echo =+= Azum's AutoNuke Macro Enabled =+=
/Echo =+= Type /afhelp for command list =+=
/if (${Spawn[${tankname}].ID} && ${doassist}>0) {
/Echo Your Main Assist is ${tankname}
/echo Your SA is ${mainassist2} and TA is ${mainassist3}
} else /if (!${Spawn[${tankname}].ID} && ${doassist}>0) {
/Echo Your Main Assist is ${tankname}, but they are not currently in the zone.
/echo Your SA is ${mainassist2} and TA is ${mainassist3}
}
/if (${doassist}<1) /echo Auto-Acquire Target Mode
/if (${Me.Sitting}) /sit off
/doevents flush
/call LoadExcludes
/if (${hasele}>0) {
/call ItemFinder "Maelin's Leggings of Lore" "Leg"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/varset hasele 0
/ini "${IniFile}" Settings hasele 0
}
}
:mainloop
/doevents
/delay 0
/if (${doleash}>0) /call Leash
/if (${dopause}>0) /goto :mainloop
/if (${tempstaff}>0) {
/call ItemFinder "Staff of Temperate Flux"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/varset tempstaff 0
/echo You don't appear to have a Staff of Temperate Flux
}
}
/if (${modrod}>0) {
/call ItemFinder "Rod of Mystical Transvergance"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/varset hasrod 0
} else {
/varset hasrod 1
}
}
/if (${Me.Pet.ID} && ${Me.Pet.Name.Find[familiar]}) /pet get lost
/if (${Cursor.ID} && ${Cursor.Name.Equal[Rod of Mystical Transvergance]}) /autoinv
/if (${doharvest}>0) /call Harvestcheck
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/if (!${clicktimer}) /call ClickBuffcheck
/call Buffcheck
/if (${modrod}>0 && ${Me.PctMana}<=${rodpercent} && ${hasrod}>0 && !${rodtimer}) /call Modrod
/if (${manarobe}>0 && ${hasrobe}>0 && ${Me.PctMana}<=${beginrobe}) /call Manarobe
/if (${medtoggle}>0) /call Medcheck
/if (${autosit}>0 && ${engagedmob}==0 && !${sittimer} && !${Me.Moving}) /call Autosit
/if (${doassist}>0) /call Assistcheck
/if (${doassist}<1) /call NoAssist
/if (${engagedmob}==1 && ${Target.ID}==${mobid} && ${preconc}>0 && ${Target.LineOfSight} && ${pcid}!=${mobid}) /call Preconc
/if (${engagedmob}==1 && ${Target.ID}==${mobid} && ${Target.LineOfSight}) /call Nuke
/goto :mainloop
/endmacro
Sub Event_slain
/if (${Target.CurrentHPs}>=0) /return
/varset engagedmob 0
/varset mobid 0
/varset conccount 0
/varset nukecount 0
/varset snaretimer 0
/varset pausetimer 0
/return
Sub Event_EXP
/if (${Target.CurrentHPs}>=0) /return
/varset engagedmob 0
/varset mobid 0
/varset conccount 0
/varset nukecount 0
/varset snaretimer 0
/varset pausetimer 0
/return
sub event_stunned
:stunloop
/if (!${Me.Stunned}) /return
/delay 1s !${Me.Stunned}
/if (${Me.Stunned}) /goto :stunloop
/return
sub event_cantsee
/varset engagedmob 0
/varset mobid 0
/varset conccount 0
/varset nukecount 0
/varset snaretimer 0
/varset pausetimer 0
/return
sub event_range
/varset engagedmob 0
/varset mobid 0
/varset conccount 0
/varset nukecount 0
/varset snaretimer 0
/varset pausetimer 0
/return
sub event_oom
/if (${Me.PctMana}<10 && !${Me.Moving} && !${Me.Casting.ID}) {
/echo Mana too low, medding to 15 mana.
} else {
/goto :end
}
:Medloop
/doevents
/if (${doleash}>0) /call Leash
/if (${Cursor.ID} && ${Cursor.Name.Equal[Rod of Mystical Transvergance]}) /autoinv
/if (${modrod}>0 && ${Me.PctMana}<=${rodpercent} && ${hasrod}>0 && !${rodtimer}) /call Modrod
/if (${forceshield}>0) /call Forceshield
/if (!${clicktimer}) /call ClickBuffcheck
/if (${doharvest}>0 && ${Me.PctMana}<=${harvestpercent}) {
/if ((${Me.AltAbilityReady["Harvest of Druzzil"]} && ${Me.AltAbility["Harvest of Druzzil"]}>0) || ${Me.SpellReady["Harvest"]}) {
/echo Harvest Ready, stopping meditation and casting.
/if (${Me.Sitting}) /sit off
/call Harvestcheck
/echo Resuming Quick Meditation
}
}
/if (${Cursor.ID} && ${Cursor.Name.Equal[Rod of Mystical Transvergance]}) /autoinv
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/if (${SpawnCount[npc radius 40 zradius 20 noalert ${AlertList}]}>0) {
/varset npcnum ${SpawnCount[npc radius 40 zradius 20 noalert ${AlertList}]}
/for m 1 to ${npcnum} step 1
/if (${NearestSpawn[${m}, npc noalert ${AlertList}].LineOfSight}) {
/if (!${Me.Mount.ID} && ${Me.Sitting}) /sit off
}
} else {
/next m
/if (!${Me.Mount.ID} && !${Me.Sitting} && !${Me.Moving} && ${Me.PctMana}<15) /sit on
}
/if (${Me.PctMana}<15) /goto :Medloop
/if (${Me.Sitting}) /sit off
/echo Finished Quick Medding at ${Me.PctMana} mana.
:end
/return
Sub event_force
/call Forceshield
/return
Sub event_spellshield
/call Spellshield
/return
Sub event_manaward
/call Manaward
/return
sub event_togglemain(Line, Command)
/if (!${Int[${Command.Length}]}) /return
/if (!${Me.Book[${Command}]}) {
/echo You dont appear to have ${Command} in your spellbook.
/goto :end
} else /if (${Me.Book[${Command}]}) {
/ini "${IniFile}" Settings mainnuke "${Command}"
/varset TempStr ${Ini[${IniFile},Settings,mainnuke,NOTFOUND]}
/varset mainnuke ${TempStr}
/if (${mainnuke.Equal[${endnuke}]} && ${endnukegem.Right[1]}!=${mainnukegem.Right[1]}) {
/varset endnukegem ${mainnukegem}
} else /if (!${mainnuke.Equal[${endnuke}]}) {
/varset TempStr ${Ini[${IniFile},Settings,endnukegem,NOTFOUND]}
/varset endnukegem ${TempStr}
}
/echo Your main nuke is now ${mainnuke}
/if (${Me.Gem[${mainnuke}]}) /return
/if (!${Me.Gem[${mainnuke}]}) {
/memspell ${mainnukegem.Right[1]} "${mainnuke}"
/delay 4s
}
}
:end
/return
sub event_toggleend(Line, Command)
/if (!${Int[${Command.Length}]}) /return
/if (!${Me.Book[${Command}]}) {
/echo You dont appear to
have ${Command} in your spellbook.
/goto :end
} else /if (${Me.Book[${Command}]}) {
/ini "${IniFile}" Settings endnuke "${Command}"
/varset TempStr ${Ini[${IniFile},Settings,endnuke,NOTFOUND]}
/varset endnuke ${TempStr}
/if (${mainnuke.Equal[${endnuke}]} && ${endnukegem.Right[1]}!=${mainnukegem.Right[1]}) {
/varset endnukegem ${mainnukegem}
} else /if (!${mainnuke.Equal[${endnuke}]}) {
/varset TempStr ${Ini[${IniFile},Settings,endnukegem,NOTFOUND]}
/varset endnukegem ${TempStr}
}
/echo Your end nuke is now ${endnuke}
/if (!${Me.Gem[${endnuke}]}) {
/memspell ${endnukegem.Right[1]} "${endnuke}"
/delay 4s
}
}
:end
/return
sub event_toggleconc
/if (${concuss}>0) {
/varset concuss 0
/echo Concussion Disabled
} else /if (${concuss}<1) {
/varset concuss 1
/echo Concussion Enabled
}
/ini "${IniFile}" Settings concuss ${concuss}
/return
sub event_togglemodrod
/if (${modrod}>0) {
/varset modrod 0
/echo Mod Rodding Disabled
} else /if (${modrod}<1) {
/varset modrod 1
/echo Mod Rodding Enabled
}
/ini "${IniFile}" Settings modrod ${concuss}
/return
sub event_toggleharvest
/if (${doharvest}>0) {
/varset doharvest 0
/echo Harvesting Disabled
} else /if (${doharvest}<1) {
/varset doharvest 1
/echo Harvesting Enabled
}
/ini "${IniFile}" Settings doharvest ${doharvest}
/return
sub event_togglemeditate
/if (${medtoggle}>0) {
/varset medtoggle 0
/echo Meditation Disabled
} else /if (${medtoggle}<1) {
/varset medtoggle 1
/echo Meditation Enabled
}
/ini "${IniFile}" Settings medtoggle ${medtoggle}
/return
sub event_togglepreconc
/if (${preconc}>0) {
/varset preconc 0
/echo Pre-Concussion Disabled
} else /if (${preconc}<1) {
/varset preconc 1
/echo Pre-Concussion Enabled
}
/ini "${IniFile}" Settings preconc ${preconc}
/return
sub event_toggleforceshield
/if (${forceshield}>0) {
/varset forceshield 0
/echo Force Shield Disabled
} else /if (${forceshield}<1) {
/varset forceshield 1
/echo Force Shield Enabled
}
/ini "${IniFile}" Settings forceshield ${forceshield}
/return
sub event_toggleepic
/if (${useepic}>0) {
/varset useepic 0
/echo Staff of the Four Disabled
} else /if (${useepic}<1) {
/varset useepic 1
/echo Staff of the Four Enabled
}
/ini "${IniFile}" Settings useepic ${useepic}
/return
sub event_toggletimewand
/if (${usetimewand}>0) {
/varset usetimewand 0
/echo Wand of Impenetrable Force Disabled
} else /if (${usetimewand}<1) {
/varset usetimewand 1
/echo Wand of Impenetrable Force Enabled
}
/ini "${IniFile}" Settings usetimewand ${usetimewand}
/return
sub event_togglesnare
/if (${dosnare}>0) {
/varset dosnare 0
/echo Snare Disabled
} else /if (${dosnare}<1) {
/varset dosnare 1
/echo Snare Enabled
}
/ini "${IniFile}" Settings dosnare ${dosnare}
/return
sub event_toggleass
/if (${doassist}>0) {
/varset doassist 0
/echo Auto-Acquire Targets Enabled.
/goto :done
} else /if (${doassist}<1) {
/varset doassist 1
/echo Auto-Assist Enabled
/if (${Spawn[${tankname}].ID}) {
/Echo Your Main Assist is ${tankname}
/echo Your SA is ${mainassist2} and TA is ${mainassist3}
} else /if (!${Spawn[${tankname}].ID}) {
/Echo Your Main Assist is ${tankname}, but they are not currently in the zone.
/echo Your SA is ${mainassist2} and TA is ${mainassist3}
}
}
}
:done
/ini "${IniFile}" Settings doassist ${doassist}
/return
sub event_toggletemp
/if (${tempstaff}>0) {
/varset tempstaff 0
/echo Temp Staff Debuff Disabled
} else /if (${tempstaff}<1) {
/varset tempstaff 1
/echo Temp Staff Debuff Enabled
}
/ini "${IniFile}" Settings tempstaff ${tempstaff}
/return
sub event_togglexuzl
/if (${doxuzl}>0) {
/varset doxuzl 0
/echo Call of Xuzl Disabled
} else /if (${doxuzl}<1) {
/varset doxuzl 1
/echo Call of Xuzl Enabled
}
/ini "${IniFile}" Settings doxuzl ${doxuzl}
/return
sub event_togglemanarobe
/if (${manarobe}>0) {
/varset manarobe 0
/echo Mana Robing Disabled
} else /if (${manarobe}<1) {
/varset manarobe 1
/echo Mana Robing Enabled
}
/ini "${IniFile}" Settings manarobe ${manarobe}
/return
sub event_toggless
/if (${spellshield}>0) {
/varset spellshield 0
/echo Spellshield Disabled
} else /if (${spellshield}<1) {
/varset spellshield 1
/echo Spellshield Enabled
}
/ini "${IniFile}" Settings spellshield ${spellshield}
/return
sub event_togglemaelin
/if (${shieldofmaelin}>0) {
/varset shieldofmaelin 0
/echo ${shieldspell} Disabled
} else /if (${shieldofmaelin}<1) {
/varset shieldofmaelin 1
/echo ${shieldspell} Enabled
}
/ini "${IniFile}" Settings shieldofmaelin ${shieldofmaelin}
/return
sub event_toggleautosit
/if (${autosit}>0) {
/varset autosit 0
/echo Autosit Disabled
} else /if (${autosit}<1) {
/varset autosit 1
/echo Autosit Enabled
}
/ini "${IniFile}" Settings autosit ${autosit}
/return
sub event_cycleassist
/if (${doassist}<1) /return
/if (${tankname.Equal[${mainassist1}]}) {
/if (${Spawn[${mainassist2}].ID}) {
/varset tankname ${mainassist2}
/Echo Your Main Assist changed to ${tankname}
/goto :done
} else /if (!${Spawn[${mainassist2}].ID} && ${Spawn[${mainassist3}].ID}) {
/varset tankname ${mainassist3}
/Echo Your Main Assist changed to ${tankname}
/goto :done
} else /if (!${Spawn[${mainassist2}].ID} && !${Spawn[${mainassist3}].ID} && ${Spawn[${mainassist1}].ID}) {
/varset tankname ${mainassist1}
/Echo Your Main Assist is still ${tankname}, because ${mainassist2} and ${mainassist3} are not in the zone.
/goto :done
} else /if (!${Spawn[${mainassist2}].ID} && !${Spawn[${mainassist3}].ID} && !${Spawn[${mainassist1}].ID}) {
/echo All Assists dead or zoned, assist cycle failed
/goto :done
}
}
/if (${tankname.Equal[${mainassist2}]}) {
/if (${Spawn[${mainassist3}].ID}) {
/varset tankname ${mainassist3}
/Echo Your Main Assist changed to ${tankname}
/goto :done
} else /if (!${Spawn[${mainassist3}].ID} && ${Spawn[${mainassist1}].ID}) {
/varset tankname ${mainassist1}
/Echo Your Main Assist changed to ${tankname}
/goto :done
} else /if (!${Spawn[${mainassist3}].ID} && !${Spawn[${mainassist1}].ID} && ${Spawn[${mainassist2}].ID}) {
/varset tankname ${mainassist2}
/Echo Your Main Assist is still ${tankname}, because ${mainassist1} and ${mainassist3} are not in the zone.
/goto :done
} else /if (!${Spawn[${mainassist3}].ID} && !${Spawn[${mainassist1}].ID} && !${Spawn[${mainassist2}].ID}) {
/echo All Assists dead or zoned, assist cycle failed
/goto :done
}
}
/if (${tankname.Equal[${mainassist3}]}) {
/if (${Spawn[${mainassist1}].ID}) {
/varset tankname ${mainassist1}
/Echo Your Main Assist changed to ${tankname}
/goto :done
} else /if (!${Spawn[${mainassist1}].ID} && ${Spawn[${mainassist2}].ID}) {
/varset tankname ${mainassist2}
/Echo Your Main Assist changed to ${tankname}
/goto :done
} else /if (!${Spawn[${mainassist1}].ID} && !${Spawn[${mainassist2}].ID} && ${Spawn[${mainassist3}].ID}) {
/varset tankname ${mainassist3}
/Echo Your Main Assist is still ${tankname}, because ${mainassist1} and ${mainassist2} are not in the zone.
/goto :done
} else /if (!${Spawn[${mainassist3}].ID} && !${Spawn[${mainassist1}].ID} && !${Spawn[${mainassist2}].ID}) {
/echo All Assists dead or zoned, assist cycle failed
}
}
:done
/return
sub event_togglema(Line, Command)
/if (!${Command.Length}) /return
/ini "${IniFile}" Settings tankname ${Command}
/ini "${IniFile}" Settings mainassist1 ${Command}
/varset mainassist1 ${Command}
/varset tankname ${Command}
/echo Your Main Assist is ${tankname}
/return
sub event_togglesa(Line, Command)
/if (!${Command.Length}) /return
/ini "${IniFile}" Settings mainassist2 ${Command}
/varset mainassist2 ${Command}
/echo Your SA is ${mainassist2}
/return
sub event_toggleta(Line, Command)
/if (!${Command.Length}) /return
/ini "${IniFile}" Settings mainassist3 ${Command}
/varset mainassist3 ${Command}
/echo Your TA is ${mainassist3}
/return
sub event_pause
/if (${dopause}>0) {
/varset dopause 0
/echo - Afnuke Unpaused -
} else /if (${dopause}<1) {
/varset dopause 1
/if (${Target.ID}) /squelch /target clear
/delay 2
/echo - Afnuke Paused -
}
/return
sub event_togglemanaward
/if (${manaward}>0) {
/varset manaward 0
/echo Mana Ward Disabled
} else /if (${manaward}<1) {
/varset manaward 1
/echo Mana Ward Enabled
/if (!${Me.Gem["Mana Ward"]} && ${manaward}>0) {
/memspell ${manawardgem.Right[1]} "Mana Ward"
/delay 4s
}
}
/ini "${IniFile}" Settings manaward ${manaward}
/return
sub event_concnum(Line,int Command)
/if (${Command}>0) {
/varset concnum ${Command}
/ini "${IniFile}" Settings concnum ${Command}
/varset concnum ${Command}
/echo Concussion Number set to ${concnum}
}
/return
sub event_toggleharvestperc(Line,int Command)
/if (${Command}>0) {
/varset harvestpercent ${Command}
/ini "${IniFile}" Settings harvestpercent ${Command}
/varset harvestpercent ${Command}
/echo Harvest Percent set to ${harvestpercent}
}
/return
sub event_togglepreconcnum(Line,int Command)
/if (${Command}>0) {
/varset preconcnum ${Command}
/ini "${IniFile}" Settings preconcnum ${Command}
/varset preconcnum ${Command}
/echo PreConc Num set to ${preconcnum}
}
/return
sub event_familiar(Line,int Command)
/declare oldfamiliar int local
/varset oldfamiliar ${myfamiliar}
/if ((${Command}==52)||(${Command}==179)||(${Command}==303)||(${Command}==304)||(${Command}==305)||(${Command}==453)||(${Command}==454)||(${Command}==455)||(${Command}==457)) {
/ini "${IniFile}" Settings myfamiliar ${Command}
/varset myfamiliar ${Command}
/echo Familiar Type successfully switched.
/if (${myfamiliar}!=${oldfamiliar}) {
/for m 1 to 20 step 1
/if (${Me.Buff[${m}].ID}>0) {
/if (${Me.Buff[${m}].Name.Find["familiar"]}) /varset buffslot ${Math.Calc[${Me.Buff[${m}].ID}-1]}
}
/next m
/notify BuffWindow Buff${buffslot} leftmouseup
/delay 1
/if (${Me.AltAbilityReady["${myfamiliar}"]} && ${Me.AltAbility["${myfamiliar}"]}>0 && !${Me.Casting.ID} && !${Me.Moving}) {
/call cast "${myfamiliar}" alt 7s
/delay 2
/if (${Me.Pet.ID} && ${Me.Pet.Name.Find[familiar]}) /pet get lost
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
}
}
} else {
/echo Invalid Familiar. 52=improved,179=allegiant,303=Ro,304=E'ci,305=Druzzil,453=Greater Ro,453=Greater E`ci,455=Greater Druzzil,457=Devoted
}
/return
sub event_togglemobhealth(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings mobhealth ${Command}
/varset mobhealth ${Command}
/echo Mob Health is now ${mobhealth}
} else {
/echo Invalid Mob Health specified.
}
/return
sub event_togglemaxbuffs(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings maxbuffs ${Command}
/varset maxbuffs ${Command}
/echo Max Buffs is now ${maxbuffs}
} else {
/echo Invalid Max Buffs specified.
}
/return
sub event_togglestaffhealth(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings staffhealth ${Command}
/varset staffhealth ${Command}
/echo Staff Health is now ${staffhealth}
} else {
/echo Invalid Staff Health specified.
}
/return
sub event_togglesnareperc(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings snareperc ${Command}
/varset snareperc ${Command}
/echo Snare Percent is now ${snareperc}
} else {
/echo Invalid Snare Percent specified.
}
/return
sub event_togglexuzlperc(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings xuzlperc ${Command}
/varset xuzlperc ${Command}
/echo Xuzl Percent is now ${xuzlperc}
} else {
/echo Invalid Xuzl Percent specified.
}
/return
sub event_togglestopnuke(Line,int Command)
/if (${Command}>0 || ${Command}<0) {
/ini "${IniFile}" Settings stopnuke ${Command}
/varset stopnuke ${Command}
/echo Stop Nuke is now ${stopnuke}
} else {
/echo Invalid Stop Nuke specified.
}
/return
sub event_togglestopnuke2(Line,int Command)
/if (${Command}>0 || ${Command}<0) {
/ini "${IniFile}" Settings stopnuke2 ${Command}
/varset stopnuke2 ${Command}
/echo Stop Nuke2 is now ${stopnuke2}
} else {
/echo Invalid Stop Nuke2 specified.
}
/return
sub event_toggledistance(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings engagedistance ${Command}
/varset engagedistance ${Command}
/echo Engage Distance is now ${engagedistance}
} else {
/echo Invalid Engage Distance specified.
}
/return
sub event_togglemainnukenum(Line,int Command)
/if (${Command}>0) {
/varset mainnukenum ${Command}
/ini "${IniFile}" Settings mainnukenum ${Command}
/varset mainnukenum ${Command}
/echo Number of main nukes before concussion set to ${mainnukenum}
} else {
/echo Invalid number of main nukes before concussion specified.
}
/return
sub event_toggleendnukenum(Line,int Command)
/if (${Command}>0) {
/ini "${IniFile}" Settings endnukenum ${Command}
/varset endnukenum ${Command}
/echo Number of end nukes before concussion set to ${endnukenum}
} else {
/echo Invalid number of end nukes before concussion specified.
}
/return
Sub Event_nukepause(EvtText)
/varset EvtText ${EvtText.Right[-16]}
/if (${EvtText.Length}>0) {
/if (${EvtText.Equal["None"]} || ${EvtText.Equal["0"]}) {
/varset nukepause None
/varset pausetimer 0
/echo - Nuke Pause set to ${nukepause}
} else {
/varset nukepause ${EvtText}
/echo - Nuke Pause set to ${nukepause}
}
}
/ini "${IniFile}" Settings nukepause ${nukepause}
/return
Sub Event_addmaster(EvtText)
/varset EvtText ${EvtText.Right[-16]}
/if (${EvtText.Length}>0) {
/call AddMaster "${EvtText}"
}
/return
Sub Event_delmaster(EvtText)
/varset EvtText ${EvtText.Right[-16]}
/if (${EvtText.Length}>0) {
/call DelMaster "${EvtText}"
}
/return
Sub Event_addjunk(EvtText)
/varset EvtText ${EvtText.Right[-14]}
/if (${EvtText.Length}>0) {
/call AddJunkBuff "${EvtText}"
}
/return
Sub Event_deljunk(EvtText)
/varset EvtText ${EvtText.Right[-14]}
/if (${EvtText.Length}>0) {
/call DelJunkBuff "${EvtText}"
}
/return
Sub Event_exclude(EvtText)
/varset EvtText ${EvtText.Right[-14]}
/if (${EvtText.Length}>0) {
/call AddExclude "${EvtText}"
}
/return
Sub Event_include(EvtText)
/varset EvtText ${EvtText.Right[-14]}
/if (${EvtText.Length}>0) {
/call DelExclude "${EvtText}"
}
/return
Sub Event_mezbreak(string line,string name)
/if ( ${name.Equal[${Me.Name}]} ) {
/echo Mez break detected, getting a new target.
/varset engagedmob 0
/varset mobid 0
/varset conccount 0
/varset nukecount 0
/varset snaretimer 0
/varset pausetimer 0
/if (${Target.ID}) /squelch /target clear
}
/return
Sub Event_itemset(string Line, Command1, Command2, Command3)
/ini ${IniFile} "${Command1}" "FullName" "${Command3}"
/ini ${IniFile} "${Command1}" "KeepUp" "${If[${Command2.Equal[keepup]},TRUE,FALSE]}"
/echo ${Command3} (KeepUp=${If[${Command2.Equal[keepup]},TRUE,FALSE]}) updated in INI!
}
/return
Sub Event_itembounce(string Line, Command1, Command2)
/if (!${Command2.Length}) {
/echo Improper use of /ibounce
/echo /ibounce <itemalias> Some Spell Name
/echo For example:
/echo /ibounce gobby Strength of Tunare
/return
}
/if (!${Ini[${IniFile},${Command1}].Length}) {
/echo [${Command1}] not in INI file!
/return
}
/declare bindex int local 1
:CheckNextKey
/if (${Ini[${IniFile},${Command1},BounceOff${bindex}].Length}) {
|- This one is in use...
/varcalc bindex ${bindex}+1
/goto :CheckNextKey
} else {
/ini ${IniFile} "${Command1}" "BounceOff${bindex}" "${Command2}"
/echo Added "${Command2}" to [${Command1}]'s bounce list
}
/return
Sub Event_itemcast(string Line, Command)
/if (!${Command.Length}) {
/echo Improper use of /icast
/echo /icast <itemalias>
/echo For example:
/echo /icast gobby
/return
}
/if (!${Ini[${IniFile},${Command}].Length}) {
/echo "[${Command}] not in INI file!
/return
}
/declare fullname string local ${Ini[${IniFile},${Command},FullName]}
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/call ItemFinder "${fullname}"
/if (${Macro.Return.Equal["NOTFOUND"]}) /return
/varset itemspellname ${FindItem[${Ini[${IniFile},${Command},FullName]}].Spell}
| /echo Casting ${itemspellname}
/if (${Macro.Return.Equal["INVENTORY"]}) /call IteminInvSlot "${fullname}"
/if (${Macro.Return.Equal["BAGGED"]}) /call IteminBag "${fullname}"
/if (${Macro.Return.Equal["EQUIPPED"]}) /call RightClickItem "${fullname}"
/return
Sub Event_togleash(string Line)
/if (${Line.Arg[3].Equal[OFF]} || (${Int[${Line.Arg[3]}]}<=0)) {
/varset doleash 0
/varset leashholder Nobody
/echo - Leashing is now OFF!
/ini "${IniFile}" "Settings" "doleash" "${doleash}"
} else {
/if (${Line.Arg[4].Length}) {
/varset leashholder ${Line.Arg[4]}
/if (${Spawn[${leashholder}].ID}) {
/varset doleash 1
/varset leashlength ${Int[${Line.Arg[3]}]}
/echo - Leashing is now ON! Leashlength: ${leashlength} ft.
/echo - Leash-holding master is: ${leashholder}
/ini "${IniFile}" "Settings" "doleash" "${doleash}"
} else {
|- This spawn/thing/target doesn't exist
/echo - Can't find "${leashholder}" -- Who is that?!
/echo - Leashing is now OFF!
/varset doleash 0
/varset leashholder Nobody
}
} else {
/varset doleash 1
/varset leashholder Nobody
/varset leashlength ${Int[${Line.Arg[3]}]}
/varset stakeX ${Me.X}
/varset stakeY ${Me.Y}
/echo - Leashing is now ON! Leashlength: ${leashlength} ft.
/echo - Stake planted at X:${stakeX}, Y:${stakeY}
}
}
/ini "${IniFile}" "Settings" "leashholder" "${leashholder}"
/ini "${IniFile}" "Settings" "leashlength" "${leashlength}"
/return
Sub Event_autofollow(string Line)
/declare distance int local 15
/if (${Ini[${IniFile},Settings,followdistance].NotEqual[NULL]}) {
/varset distance ${Ini[${IniFile},Settings,followdistance]}
}
/if (${Line.Arg[3].Length}) /target ${Line.Arg[3]}
/if (${Line.Arg[4].Length}) /varset distance ${Line.Arg[4]}
/if (${distance}<10) /varset distance 10
/ini "${IniFile}" "Settings" "followdistance" "${distance}"
/if (${Target.ID}) {
/echo - Autofollow on: ${Target.CleanName} (${distance} ft.)
/echo - Change targets to stop autofollowing.
} else {
/echo - Can't activate Autofollow -- no valid target!
/return
}
/declare followID int local ${Target.ID}
:FollowingLoop
/varset X ${Me.X}
/varset Y ${Me.Y}
/doevents
/if (${Target.ID}) /face fast nolook
/if ((${Target.Distance}>${distance})&&(${Target.ID}==${followID})) {
/keypress forward hold
/delay 2
/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) /call Obstacle
}
/if ((${Target.Distance}<=${distance})&&(${Target.ID}==${followID})) /keypress back
/if (${Target.ID}==${followID}) {
/goto :FollowingLoop
} else {
/keypress forward
/keypress back
}
/echo - Autofollow ended.
/return
Sub Event_stopfollow(string Line)
/if (${Target.ID}) /squelch /target clear
/return
Sub Event_Chat(ChatType, Sender, ChatText)
/if (${ChatText.Left[1].Equal[/]}) {
/call LoadMasters "${Sender}" "${ChatText}"
/goto :done
}
:done
/return
Sub Event_hit
/doevents died
/return
sub event_died
/echo You died, ending macro
/endmacro
Sub Event_summon
/call Event_hit
/return
Sub Event_getout
/if (${Me.Casting.ID}) /call Interrupt
/if (${Target.ID}) /squelch /target clear
/if (${Me.AltAbilityReady["43"]} && ${Me.AltAbility["43"]}>0 && !${Me.Casting.ID}) {
/call Cast "43" alt 7s
} else {
/call Cast "Evacuate" gem5 7s
/delay 8
}
/return
Sub Event_translocate(string Line)
/if (!${Line.Arg[3].Length} || ${autoTL}<1) /return
/declare Person string local
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/varset Person ${Line.Arg[3]}
/if (${Spawn[${Person}].ID} && ${Spawn[${Person}].Distance}<=100) {
/squelch /target id ${Spawn[${Person}].ID}
/delay 2s
/call ItemFinder "Time Traveler's Abandoned Notebook"
/if (${Macro.Return.Equal["NOTFOUND"]}) /goto :nobook
/if (${Macro.Return.Equal["INVENTORY"]}) /call IteminInvSlot "Time Traveler's Abandoned Notebook"
/if (${Macro.Return.Equal["BAGGED"]}) /call IteminBag "Time Traveler's Abandoned Notebook"
/if (${Macro.Return.Equal["EQUIPPED"]}) /call RightClickItem "Time Traveler's Abandoned Notebook"
/goto :done
:nobook
/call cast "Translocate" gem5 7s
} else {
/echo Translocate failed - ${Person} too far away or not in zone.
}
:done
/return
Sub Event_afhelp
/echo -(AFNuke Help)-
/echo /tl <name> - Translocate someone to bind
/echo /evac - Exodus or Evac immediately
/echo /harvest - Harvest toggle
/echo /harvestperc - Harvest Percent
/echo /medtoggle - Meditation toggle
/echo /modrod - Mod Rod Toggle
/echo /timewand - Wand of Impenetrable Force toggle
/echo /epic - Staff of the Four toggle
/echo /force - Force Shield Enable/Disable
/echo /temp - Temp Staff Enable/Disable
/echo /staffhealth <number> - Temp Staff Health
/echo /nuke1 <name of nuke> - Main Nuke
/echo /nuke2 <name of nuke> - End Nuke
/echo /preconc - PreConcussion toggle
/echo /preconcnum - Number of PreConcussions
/echo /conc - Concussion Enable/Disable
/echo /concnum <number> - Number of Concussions to cast
/echo /myfamiliar <number> - 52=improved,179=allegiant,303=Ro's,304=E'ci's,305=Druzzil,453=Greater Ro,453=Greater E`ci,455=Greater Druzzil,457=Devoted
/echo /mainnukenum <number> - Number of Main Nukes before concussion
/echo /endnukenum <number> - Number of End Nukes before concussion
/echo /maxbuffs <number> - Max Buffs before auto-clicking junk buffs
/echo /mobhealth <number> - Mob Health (Minimum health before engaging)
/echo /stopnuke <number> - Stop Nuke Amount (Switch to endnuke at this amount)
/echo /stopnuke2 <number> - Stop Nuke2 Amount (Stop nuking at this amount)
/echo /engagedistance <number> - Engage Distance
/echo /addjunk <name of buff> - Add Buff to Junk Buffs List
/echo /deljunk <name of buff> - Remove Buff from Junk Buffs List
/echo /addmaster <name> - Add Master to Masters List
/echo /delmaster <name> - Remove Master from Masters List
/echo /exclude <name> - Add NPC to Exclude List
/echo /include <name> - Remove NPC from Exclude List
/echo /manarobe - Mana Robe Enable/Disable
/echo /doassist - Toggle Assist/Auto-Acquire Targets
/echo /cycle - Cycle through your three assists
/echo /ma - Set Primary Main Assist
/echo /sa - Set Secondary Main Assist
/echo /ta - Set Tertiary Main Assist
/echo /doxuzl - Xuzl Toggle
/echo /xuzlperc <number> - Xuzl Percent Health
/echo /temp - Temp Staff Toggle
/echo /dosnare - Snare Toggle
/echo /snareperc <number> - Snare Percentage
/echo /ss - Spellshield Toggle
/echo /mw - Mana Ward Toggle
/echo /som - Shield of Maelin Toggle
/echo /pause - Pause Toggle
/echo /leash <distance> or /leash <distance> <player> - Set an anchor
/echo /autofollow <name> <distance> or /autofollow <name> - Autofollow Player, ends when target is cleared
/echo /stopfollow - Cancel autofollow
/echo /maxbuffs <number> - Max Amount of Buffs before autoclicking off junk buffs
/echo /nukepause <pausetime> or /nukepause None - Pause time between nukes
/echo /autosit - Autosit Toggle
/echo /iset <alias> nokeepup|keepup Full Item Name - Creates/modifies an item alias
/echo /iclick <alias> - Clicks Aliased Item
/echo /ibounce <alias> <name of buff> - Add an unstackable buff to the alias (Don't click alias if this buff is on you)
/return
sub Event_zoned
/if (${doleash}>0) {
/echo - Zoned... Setting Leash to OFF!
/varset doleash 0
/ini "${IniFile}" "Settings" "doleash" "${doleash}"
}
/return


