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

not meming spells (1 Viewer)

Spanky90

New member
Joined
Feb 22, 2006
RedCents
All of a sudden non of my macos are meming spells anymore, It use to be if you sent a tells to a toon if he didnt have it memmed he would mem it. Or if he was suppose to have it memmed that he would mem it automaticlly. Anyone have any ideas on why?

Not sure if i removed something or changed something, Been trying to update all my macros with new spells.

I use various ones, afnuke.mac, Mage.mac etc.
 
Afnuke.mac

Rich (BB code):
|----------------------------------------------------------------------------|
| 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 072105
/declare autoTL           int outer 1
/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 ${modrod}
/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 shieldofthemaelin 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


afnuke.inc

Rich (BB code):
Sub LoadINI
|  INI setup variables
/varset INIFlag 0
/varset TempStr ${Ini[${IniFile},Settings,mainassist1,NOTFOUND]}
/varset mainassist1 ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings mainassist1 ${tankname}
/varset mainassist1 ${tankname}
}
/varset TempStr ${Ini[${IniFile},Settings,mainassist2,NOTFOUND]}
/varset mainassist2 ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings mainassist2 ${tankname}
/varset mainassist2 ${tankname}
}
/varset TempStr ${Ini[${IniFile},Settings,mainassist3,NOTFOUND]}
/varset mainassist3 ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings mainassist3 ${tankname}
/varset mainassist3 ${tankname}
}
/varset TempStr ${Ini[${IniFile},Settings,doassist,NOTFOUND]}
/varset doassist ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings doassist 1
/varset doassist 1
}
/varset TempStr ${Ini[${IniFile},Settings,version,NOTFOUND]}
/if (${TempStr.Equal["NOTFOUND"]} || !${TempStr.Equal["${version}"]}) {
/varset INIFlag 1
/echo Configuring aliases.
/squelch /alias /evac /echo getout
/squelch /alias /tl /echo tlocate
/squelch /alias /modrod /echo domodrod
/squelch /alias /preconcnum /echo preconcnum
/squelch /alias /preconc /echo dopreconc
/squelch /alias /harvest /echo doharvest
/squelch /alias /harvestperc /echo harvestperc
/squelch /alias /medtoggle /echo medtoggle
/squelch /alias /epic /echo epic
/squelch /alias /timewand /echo timewand
/squelch /alias /force /echo forceshield
/squelch /alias /autosit /echo autosit
/squelch /alias /addmaster /echo addmaster
/squelch /alias /delmaster /echo delmaster
/squelch /alias /autofollow /echo autofollow
/squelch /alias /stopfollow /echo stopfollow
/squelch /alias /leash /echo leash
/squelch /alias /cycle /echo cycle
/squelch /alias /ta /echo ta
/squelch /alias /sa /echo sa
/squelch /alias /ma /echo ma
/squelch /alias /nuke1 /echo nuke1
/squelch /alias /nuke2 /echo nuke2
/squelch /alias /conc /echo conc
/squelch /alias /concnum /echo concnum
/squelch /alias /myfamiliar /echo myfamiliar
/squelch /alias /mainnukenum /echo mainnukenum
/squelch /alias /endnukenum /echo endnukenum
/squelch /alias /maxbuffs /echo maxbuffs
/squelch /alias /mobhealth /echo mobhealth
/squelch /alias /staffhealth /echo staffhealth
/squelch /alias /stopnuke /echo stopnuke
/squelch /alias /stopnuke2 /echo stopnuke2
/squelch /alias /engagedistance /echo engagedistance
/squelch /alias /doassist /echo assist
/squelch /alias /doxuzl /echo doxuzl
/squelch /alias /manarobe /echo manarobe
/squelch /alias /xuzlperc /echo xuzlperc
/squelch /alias /temp /echo temp
/squelch /alias /dosnare /echo dosnare
/squelch /alias /snareperc /echo snareperc
/squelch /alias /ss /echo ss
/squelch /alias /mw /echo mw
/squelch /alias /som /echo som
/squelch /alias /pause /echo pause
/squelch /alias /exclude /echo exclude
/squelch /alias /include /echo include
/squelch /alias /iset /echo itemset
/squelch /alias /ibounce /echo itembounce
/squelch /alias /iclick /echo itemcast
/squelch /alias /addjunk /echo addjunk
/squelch /alias /deljunk /echo deljunk
/squelch /alias /afhelp /echo afhelp
/squelch /alias /nukepause /echo nukepause
/ini "${IniFile}" Settings version ${version}
}
/varset TempStr ${Ini[${IniFile},Settings,autosit,NOTFOUND]}
/varset autosit ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings autosit 0
/varset autosit 0
}
/varset TempStr ${Ini[${IniFile},Settings,autositmana,NOTFOUND]}
/varset autositmana ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings autositmana 90
/varset autositmana 90
}
/varset TempStr ${Ini[${IniFile},Settings,autoTL,NOTFOUND]}
/varset autoTL ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings autoTL 0
/varset autoTL 0
}
/varset TempStr ${Ini[${IniFile},Settings,checktarget,NOTFOUND]}
/varset checktarget ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings checktarget nocheck
/varset checktarget nocheck
}
/varset TempStr ${Ini[${IniFile},Settings,preconc,NOTFOUND]}
/varset preconc ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings preconc 0
/varset preconc 0
}
/varset TempStr ${Ini[${IniFile},Settings,preconcnum,NOTFOUND]}
/varset preconcnum ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings preconcnum 1
/varset preconcnum 1
}
/varset TempStr ${Ini[${IniFile},Settings,concuss,NOTFOUND]}
/varset concuss ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings concuss 1
/varset concuss 1
}
/varset TempStr ${Ini[${IniFile},Settings,myconcgem,NOTFOUND]}
/varset myconcgem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings myconcgem gem1
/varset myconcgem gem1
}
/varset TempStr ${Ini[${IniFile},Settings,concnum,NOTFOUND]}
/varset concnum ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings concnum 2
/varset concnum 2
}
/varset TempStr ${Ini[${IniFile},Settings,hasele,NOTFOUND]}
/varset hasele ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings hasele 1
/varset hasele 1
}
/varset TempStr ${Ini[${IniFile},Settings,checkfamiliar,NOTFOUND]}
/varset checkfamiliar ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings checkfamiliar 1
/varset checkfamiliar 1
}
/varset TempStr ${Ini[${IniFile},Settings,myfamiliar,NOTFOUND]}
/varset myfamiliar ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings myfamiliar 303
/varset myfamiliar 303
}
/varset TempStr ${Ini[${IniFile},Settings,engagedistance,NOTFOUND]}
/varset engagedistance ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings engagedistance 200
/varset engagedistance 200
}
/varset TempStr ${Ini[${IniFile},Settings,mainnuke,NOTFOUND]}
/varset mainnuke ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings mainnuke "White Fire"
/varset mainnuke White Fire
}
/varset TempStr ${Ini[${IniFile},Settings,mainnukegem,NOTFOUND]}
/varset mainnukegem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings mainnukegem gem4
/varset mainnukegem gem4
}
/varset TempStr ${Ini[${IniFile},Settings,mainnukenum,NOTFOUND]}
/varset mainnukenum ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {

/varset INIFlag 1
/ini "${IniFile}" Settings mainnukenum 1
/varset mainnukenum 1
}
/varset TempStr ${Ini[${IniFile},Settings,endnuke,NOTFOUND]}
/varset endnuke ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings endnuke "Draught of Ro"
/varset endnuke Draught of Ro
}
/varset TempStr ${Ini[${IniFile},Settings,endnukenum,NOTFOUND]}
/varset endnukenum ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings endnukenum 4
/varset endnukenum 4
}
/varset TempStr ${Ini[${IniFile},Settings,endnukegem,NOTFOUND]}
/varset endnukegem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings endnukegem gem8
/varset endnukegem gem8
}
/varset TempStr ${Ini[${IniFile},Settings,mobhealth,NOTFOUND]}
/varset mobhealth ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings mobhealth 93
/varset mobhealth 93
}
/varset TempStr ${Ini[${IniFile},Settings,stopnuke,NOTFOUND]}
/varset stopnuke ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings stopnuke 20
/varset stopnuke 23
}
/varset TempStr ${Ini[${IniFile},Settings,stopnuke2,NOTFOUND]}
/varset stopnuke2 ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings stopnuke2 -1
/varset stopnuke2 -1
}
/varset TempStr ${Ini[${IniFile},Settings,medtoggle,NOTFOUND]}
/varset medtoggle ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings medtoggle 0
/varset medtoggle 0
}
/varset TempStr ${Ini[${IniFile},Settings,medpercent,NOTFOUND]}
/varset medpercent ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings medpercent 35
/varset medpercent 35
}
/varset TempStr ${Ini[${IniFile},Settings,manatomedup,NOTFOUND]}
/varset manatomedup ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings manatomedup 70
/varset manatomedup 70
}
/varset TempStr ${Ini[${IniFile},Settings,manarobe,NOTFOUND]}
/varset manarobe ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings manarobe 0
/varset manarobe 0
}
/varset TempStr ${Ini[${IniFile},Settings,beginrobe,NOTFOUND]}
/varset beginrobe ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings beginrobe 20
/varset beginrobe 20
}
/varset TempStr ${Ini[${IniFile},Settings,donerobe,NOTFOUND]}
/varset donerobe ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings donerobe 75
/varset donerobe 75
}
/varset TempStr ${Ini[${IniFile},Settings,modrod,NOTFOUND]}
/varset modrod ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings modrod 1
/varset modrod 1
}
/varset TempStr ${Ini[${IniFile},Settings,rodpercent,NOTFOUND]}
/varset rodpercent ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings rodpercent 90
/varset rodpercent 90
}
/varset TempStr ${Ini[${IniFile},Settings,harvestpercent,NOTFOUND]}
/varset harvestpercent ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings harvestpercent 70
/varset harvestpercent 70
}
/varset TempStr ${Ini[${IniFile},Settings,doharvest,NOTFOUND]}
/varset doharvest ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings doharvest 1
/varset doharvest 1
}
/varset TempStr ${Ini[${IniFile},Settings,harvestgem,NOTFOUND]}
/varset harvestgem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings harvestgem gem7
/varset harvestgem gem7
}
/varset TempStr ${Ini[${IniFile},Settings,shieldofmaelin,NOTFOUND]}
/varset shieldofmaelin ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings shieldofmaelin 0
/varset shieldofmaelin 0
}
/varset TempStr ${Ini[${IniFile},Settings,maelingem,NOTFOUND]}
/varset maelingem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings maelingem gem6
/varset maelingem gem6
}
/varset TempStr ${Ini[${IniFile},Settings,forceshield,NOTFOUND]}
/varset forceshield ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings forceshield 1
/varset forceshield 1
}
/varset TempStr ${Ini[${IniFile},Settings,forcegem,NOTFOUND]}
/varset forcegem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings forcegem gem3
/varset forcegem gem3
}
/varset TempStr ${Ini[${IniFile},Settings,usetimewand,NOTFOUND]}
/varset usetimewand ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings usetimewand 0
/varset usetimewand 0
}
/varset TempStr ${Ini[${IniFile},Settings,useepic,NOTFOUND]}
/varset useepic ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings useepic 0
/varset useepic 0
}
/varset TempStr ${Ini[${IniFile},Settings,spellshield,NOTFOUND]}
/varset spellshield ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings spellshield 0
/varset spellshield 0
}
/varset TempStr ${Ini[${IniFile},Settings,ssgem,NOTFOUND]}
/varset ssgem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings ssgem gem5
/varset ssgem gem5
}
/varset TempStr ${Ini[${IniFile},Settings,manaward,NOTFOUND]}
/varset manaward ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings manaward 0
/varset manaward 0
}
/varset TempStr ${Ini[${IniFile},Settings,manawardgem,NOTFOUND]}
/varset manawardgem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings manawardgem gem2
/varset manawardgem gem2
}
/varset TempStr ${Ini[${IniFile},Settings,tempstaff,NOTFOUND]}
/varset tempstaff ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings tempstaff 0
/varset tempstaff 0
}
/varset TempStr ${Ini[${IniFile},Settings,staffhealth,NOTFOUND]}
/varset staffhealth ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings staffhealth 95
/varset staffhealth 95
}
/varset TempStr ${Ini[${IniFile},Settings,doxuzl,NOTFOUND]}
/varset doxuzl ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings doxuzl 0
/varset doxuzl 0
}
/varset TempStr ${Ini[${IniFile},Settings,xuzlperc,NOTFOUND]}
/varset xuzlperc ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings xuzlperc 85
/varset xuzlperc 85
}
/varset TempStr ${Ini[${IniFile},Settings,dosnare,NOTFOUND]}
/varset dosnare ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings dosnare 0
/varset dosnare 0
}
/varset TempStr ${Ini[${IniFile},Settings,snareperc,NOTFOUND]}
/varset snareperc ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings snareperc 25
/varset snareperc 25
}
/varset TempStr ${Ini[${IniFile},Settings,snaregem,NOTFOUND]}
/varset snaregem ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings snaregem gem5
/varset snaregem gem5
}
/varset TempStr ${Ini[${IniFile},Settings,retry,NOTFOUND]}
/varset retry ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings retry 3
/varset retry 3
}
/varset TempStr ${Ini[${IniFile},Settings,maxbuffs,NOTFOUND]}
/varset maxbuffs ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings maxbuffs 15
/varset maxbuffs 15
}
/varset TempStr ${Ini[${IniFile},Settings,doleash,NOTFOUND]}
/varset doleash ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings doleash 0
/varset doleash 0
}
/varset TempStr ${Ini[${IniFile},Settings,leashholder,NOTFOUND]}
/varset leashholder ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings leashholder nobody
/varset leashholder nobody
}
/varset TempStr ${Ini[${IniFile},Settings,leashlength,NOTFOUND]}
/varset leashlength ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings leashlength 40
/varset leashlength 40
}
/varset TempStr ${Ini[${IniFile},Settings,followdistance,NOTFOUND]}
/varset followdistance ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings followdistance 30
/varset followdistance 30
}
/varset TempStr ${Ini[${IniFile},Settings,nukepause,NOTFOUND]}
/varset nukepause ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) {
/varset INIFlag 1
/ini "${IniFile}" Settings nukepause None
/varset nukepause None
}
/if (${INIFlag}==1) {
/echo INI file created/appended.  Please customize ${IniFile} in your macros directory. You may now start the macro with /mac afnuke
/endmacro
}
/return

Sub TargetCheck
/declare temphealth int local
/if (${tempstaff}>0) /varset temphealth ${staffhealth}
/if (${tempstaff}<1) /varset temphealth ${mobhealth}
/if ((!${Target.ID})||(${Target.ID}!=${mobid})||(${Target.Distance}>${engagedistance})||(${Target.Type.Equal[Corpse]})||(${Target.PctHPs}<=${stopnuke2})||(${Target.PctHPs}>${temphealth})) {
/varset engagedmob 0
/varset mobid 0
/varset conccount 0
/varset nukecount 0
/varset snaretimer 0
/varset pausetimer 0
}
/return

Sub Assistcheck
/if (!${Spawn[${tankname}].ID}) {
/if (${Spawn[${mainassist1}].ID}) {
/varset tankname ${mainassist1}
/Echo Your Main Assist changed to ${tankname}
} else /if (${Spawn[${mainassist2}].ID}) {
/varset tankname ${mainassist2}
/Echo Your Main Assist changed to ${tankname}
} else /if (${Spawn[${mainassist3}].ID}) {
/varset tankname ${mainassist3}
/Echo Your Main Assist changed to ${tankname}
}
}
/if ((!${Me.Casting.ID})&&(!${Me.Moving})&&(${Spawn[${tankname}].ID})&&(${Spawn[${tankname}].Distance}<200)&&(${engagedmob}==0)&&(${mobid}==0)&&(!${asstimer})) {
/assist ${tankname}
/varset asstimer 1s
/if (${Target.ID} && !${Target.Type.Equal[PC]}) /varset mobid ${Target.ID}
} else {
/call TargetCheck
/return
}
/if (${Target.ID} && !${Target.Type.Equal[PC]}) /call CheckExcludes
/if (${tempstaff}<1) /goto :nostaff
/if ((${Target.ID}==${mobid} && ${Target.PctHPs}<=${staffhealth} && ${Target.Distance}<=${engagedistance} && ${Target.PctHPs}>${stopnuke2} && ${Target.LineOfSight} && ${Spawn[${mobid}].Type.Equal[npc]})||(${Spawn[${mobid}].Type.Equal[pet]} && !${Spawn[${mobid}].Master.Type.Equal[pc]})) {
/varset engagedmob 1
/Echo ${Target.CleanName} is at the distance of: ${Target.Distance}
/call Debuff
/return
} else {
/call TargetCheck
/return
}
:nostaff
/if ((${Target.ID}==${mobid} && ${Target.PctHPs}<=${mobhealth} && ${Target.Distance}<=${engagedistance} && ${Target.PctHPs}>${stopnuke2} && ${Target.LineOfSight} && ${Spawn[${mobid}].Type.Equal[npc]})||(${Spawn[${mobid}].Type.Equal[pet]} && !${Spawn[${mobid}].Master.Type.Equal[pc]})) {
/varset engagedmob 1
/Echo ${Target.CleanName} is at the distance of: ${Target.Distance}
/return
} else {
/call TargetCheck
/return
}

Sub NoAssist
/if (${SpawnCount[npc radius ${engagedistance} zradius 20 noalert ${AlertList}]}>0) {
/varset npcnum ${SpawnCount[npc radius ${engagedistance} zradius 20 noalert ${AlertList}]}
/for m 1 to ${npcnum} step 1
/if (${NearestSpawn[${m}, npc noalert ${AlertList}].LineOfSight}) {
/varset mobid ${NearestSpawn[${m}, npc noalert ${AlertList}].ID}
/target id ${mobid}
/delay 1s
/if (${tempstaff}<1) /goto :nostaff
/if ((${Target.ID}==${mobid})&&(${Target.PctHPs}<=${staffhealth})&&(${Target.Type.Equal[NPC]})&&(${Target.Animation}!=32)) {
/if ((${Target.Distance}<=${engagedistance})&&(${Target.PctHPs}>${stopnuke2})&&(${Target.LineOfSight})) {
/Echo ${Target.CleanName} is at the distance of: ${Target.Distance}
/varset engagedmob 1
/call Debuff
}
}
/goto :end

:nostaff
/if ((${Target.ID}==${mobid})&&(${Target.PctHPs}<=${mobhealth})&&(${Target.Type.Equal[NPC]})&&(${Target.Animation}!=32)) {
/if ((${Target.Distance}<=${engagedistance})&&(${Target.PctHPs}>${stopnuke2})&&(${Target.LineOfSight})) {
/if (${Target.PctHPs}<=${stopnuke2}) /return
/Echo ${Target.CleanName} is at the distance of: ${Target.Distance}
/varset engagedmob 1
}
}

/goto :end

}
}
/next m

:end
/return

Sub Debuff
/if (${Target.Distance}>200) {
/echo ${Target.CleanName} is too far away to debuff with Temp Staff.
/goto :done
}
/call ItemFinder "Staff of Temperate Flux"
/if (${Macro.Return.Equal["EQUIPPED"]} || ${Macro.Return.Equal["INVENTORY"]}) /goto :debuff
/if (${Macro.Return.Equal["BAGGED"]}) /call EquipFromBag "Staff of Temperate Flux"
:debuff
/varset retrycount ${Math.Calc[${retrycount}+1]}
/e Debuffing ${Target.CleanName}
/call RightClickItem "Staff of Temperate Flux"
/call RightClickItem "Staff of Temperate Flux"
/call RightClickItem "Staff of Temperate Flux"
| /if (${Macro.Return.Equal[CAST_RESISTED]} && ${retrycount}<${retry}) /goto :debuff
/if (!${olditem.Equal[NULL]}) {
/call ItemFinder "${olditem}" "${wornslot}"
/if (${Macro.Return.Equal["BAGGED"]}) /call EquipFromBag "${olditem}" "${wornslot}"
/varset olditem NULL
/varset wornslot NULL
}
:done
/varset retrycount 0
/return

Sub Autosit
/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}<${autositmana}) /sit on
}
/varset sittimer 1s
/return

Sub Nuke
/if ((${doxuzl}>0)&&(${Target.CurrentHPs}<=${xuzlperc})) {
/if (${Me.AltAbilityReady["246"]} || ${Me.AltAbilityReady["208"]}) /call Xuzl
}
:nukeloop

/doevents

/if (${doleash}>0) /call Leash
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/varset conccount 0
/if (${Cursor.ID} && ${Cursor.Name.Equal[Rod of Mystical Transvergance]}) /autoinv
/if (${forceshield}>0) /call Forceshield
/if (${dosnare}>0 && ${Target.CurrentHPs}<=${snareperc} && !${snaretimer}) /call Snare
/if (${modrod}>0 && ${Me.PctMana}<=${rodpercent} && ${hasrod}>0 && !${rodtimer}) /call Modrod
/if (${doharvest}>0 && ${Me.PctMana}<=${harvestpercent}) {
/if ((${Me.AltAbilityReady["Harvest of Druzzil"]} && ${Me.AltAbility["Harvest of Druzzil"]}>0) || ${Me.SpellReady["Harvest"]}) /call Harvestcheck
}
/if (${manaward}>0 && !${Me.Buff["Mana Ward"].ID}) /call Manaward
/call TargetCheck
/if (${engagedmob}==0) /return
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
/if (${pausetimer}) /goto :nukeloop
/if ((${Target.CurrentHPs}>${stopnuke})&&(!${Me.Moving})&&(${Target.ID}==${mobid})&&(!${Target.Type.Equal[Corpse]})&&(${Target.LineOfSight})) {
/if (!${TempSpell.Equal[${mainnuke}]}) /varset nukecount 0
/varset nukecount ${Math.Calc[${nukecount}+1]}
/echo Main Nuke Number ${nukecount}
/varset TempSpell ${mainnuke}
:mainnuke
/call cast "${mainnuke}" ${mainnukegem} 7s
/if (${Macro.Return.Equal[CAST_NOTREADY]}) /goto :mainnuke
/if (!${nukepause.Equal["None"]}) /varset pausetimer ${nukepause}
} else /if ((${Target.CurrentHPs}<=${stopnuke})&&(!${Me.Moving})&&(${Target.CurrentHPs}>${stopnuke2})&&(${Target.ID}==${mobid})&&(!${Target.Type.Equal[Corpse]})&&(${Target.LineOfSight})) {
/if (!${TempSpell.Equal[${endnuke}]}) /varset nukecount 0
/varset nukecount ${Math.Calc[${nukecount}+1]}
/echo End Nuke Number ${nukecount}
/varset TempSpell ${endnuke}
:endnuke
/call cast "${endnuke}" ${endnukegem} 7s
/if (${Macro.Return.Equal[CAST_NOTREADY]}) /goto :endnuke
/if (!${nukepause.Equal["None"]}) /varset pausetimer ${nukepause}
}
:wait3
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait3
/call TargetCheck
/if (${engagedmob}==0) /return
/if (${concuss}<1) /goto :nukeloop
/if (${TempSpell.Equal[${mainnuke}]} && ${nukecount}<${mainnukenum}) /goto :nukeloop
/if (${TempSpell.Equal[${endnuke}]} && ${nukecount}<${endnukenum}) /goto :nukeloop
/if ((${concuss}>0)&&(${conccount}<${concnum})&&(${Target.CurrentHPs}>${stopnuke2})&&(!${Me.Moving})&&(${Target.ID}==${mobid})&&(!${Target.Type.Equal[Corpse]})&&(${Target.LineOfSight})) {
/call Concussion
}

/doevents died
/doevents summon
/doevents hit
/goto :nukeloop

Sub Concussion
:concloop

/doevents

/if (${doleash}>0) /call Leash
/varset nukecount 0
/if (${Cursor.ID} && ${Cursor.Name.Equal[Rod of Mystical Transvergance]}) /autoinv
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/call TargetCheck
/if (${engagedmob}==0) /return
/if (${conccount}>=${concnum}) /return
/if (${concuss}<1) /return
/if ((${Target.CurrentHPs}>${stopnuke2})&&(!${Me.Moving})&&(${Target.ID}==${mobid})&&(!${Target.Type.Equal[Corpse]})&&(${Target.LineOfSight})) {
/if (${hasele}>0) {
/call ItemFinder "Maelin's Leggings of Lore"
/if (${Macro.Return.Equal["INVENTORY"]}) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo Concussion Number ${conccount}
/call IteminInvSlot "Maelin's Leggings of Lore"
}
/if (${Macro.Return.Equal["BAGGED"]}) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo Concussion Number ${conccount}
/call IteminBag "Maelin's Leggings of Lore"
}
/if (${Macro.Return.Equal["EQUIPPED"]}) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo Concussion Number ${conccount}
/call RightClickItem "Maelin's Leggings of Lore"
}
}
:nolegs
/if (${hasele}<1) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo Concussion Number ${conccount}
:conc
/call cast "${myconc}" ${myconcgem} 7s
/if (${Macro.Return.Equal[CAST_NOTREADY]}) /goto :conc
}
}
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
/call TargetCheck
/if (${engagedmob}==0) /return
/if (${dosnare}>0 && ${Target.CurrentHPs}<=${snareperc} && !${snaretimer}) /call Snare

/doevents died
/doevents summon
/doevents hit
/if (${conccount}>=${concnum}) /return
/if (${conccount}<${concnum}) /goto :concloop

Sub Preconc
/varset conccount 0
/varset pcid ${mobid}
:preconcloop

/doevents

/if (${doleash}>0) /call Leash
/if (${Cursor.ID} && ${Cursor.Name.Equal[Rod of Mystical Transvergance]}) /autoinv
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/call TargetCheck
/if (${engagedmob}==0) /return
/if (${conccount}>=${preconcnum}) /return
/if (${preconc}<1) /return
/if ((${Target.CurrentHPs}>${stopnuke2})&&(!${Me.Moving})&&(${Target.ID}==${mobid})&&(!${Target.Type.Equal[Corpse]})&&(${Target.LineOfSight})) {
/if (${hasele}>0) {
/call ItemFinder "Maelin's Leggings of Lore"
/if (${Macro.Return.Equal["INVENTORY"]}) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo PreConcussion Number ${conccount}
/call IteminInvSlot "Maelin's Leggings of Lore"
}
/if (${Macro.Return.Equal["BAGGED"]}) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo PreConcussion Number ${conccount}
/call IteminBag "Maelin's Leggings of Lore"
}
/if (${Macro.Return.Equal["EQUIPPED"]}) {
/varset conccount ${Math.Calc[${conccount}+1]}
/echo PreConcussion Number ${conccount}
/call RightClickItem "Maelin's Leggings of Lore"
}
}
:nolegs
/if (${hasele}<1) {
/varset conccount ${Math.Calc[${conccount}+1]}
:conc
/echo PreConcussion Number ${conccount}
/call cast "${myconc}" ${myconcgem} 7s
/if (${Macro.Return.Equal[CAST_NOTREADY]}) /goto :conc
}
}
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
/call TargetCheck
/if (${engagedmob}==0) /return

/doevents died
/doevents summon
/doevents hit
/if (${conccount}>=${preconcnum}) /return
/if (${conccount}<${preconcnum}) /goto :preconcloop

Sub AntiRetard

|  Anti Retard Code
/if (${tempstaff}>0) {
/if (${staffhealth}<${mobhealth}) {
/varset staffhealth ${mobhealth}
/ini "${IniFile}" Settings staffhealth ${mobhealth}
}
}
/if (!${Me.Book["${mainnuke}"]}) {
/echo You don't seem to have the spell ${mainnuke}
/endmacro
}
/if (!${Me.Book["${endnuke}"]}) {
/echo You don't seem to have the spell ${endnuke}
/endmacro
}
/if (${useepic}>0) {
/call ItemFinder "Staff of the Four"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/ini "${IniFile}" Settings useepic 0
/varset useepic 0
}
}
/if (${usetimewand}>0) {
/call ItemFinder "Wand of Impenetrable Force"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/ini "${IniFile}" Settings usetimewand 0
/varset usetimewand 0
}
}
/if (${useepic}>0 && ${Me.Buff["Force Shield"].ID} && !${Me.Buff["Spiritual Dominion"].ID}) {
/for m 1 to 20 step 1
/if (${Me.Buff[${m}].ID}>0) {
/if (${Me.Buff[${m}].Name.Equal["Force Shield"]}) /varset buffslot ${Math.Calc[${Me.Buff[${m}].ID}-1]}
}
/next m
/notify BuffWindow Buff${buffslot} leftmouseup
}
/if (${useepic}<1 && ${Me.Buff["Barrier of Force"].ID}) {
/for m 1 to 20 step 1
/if (${Me.Buff[${m}].ID}>0) {
/if (${Me.Buff[${m}].Name.Equal["Barrier of Force"]}) /varset buffslot ${Math.Calc[${Me.Buff[${m}].ID}-1]}
}
/next m
/notify BuffWindow Buff${buffslot} leftmouseup
}
/if (${mainnukenum}==0 || ${endnukenum}==0 ) {
/echo You set mainnukenum or endnukenum to 0, if you didn't want to nuke, why run this macro? Dumbass.
/endmacro
}
/if (${timewand}>0 && ${useepic}>0) {
/echo You enabled both Time Wand and Epic, try reading the documentation.
/endmacro
}
/if (${forceshield}<1) {
/if (${timewand}>0 || ${useepic}>0) {
/echo You enabled Time Wand or Epic, and didn't enable Force Shield. Doing it for you.
/ini "${IniFile}" Settings forceshield 1
/varset forceshield 1
}
}
/if (${hasele}<1 && ${concuss}>0 && !${Me.Book[Ancient: Greater Concussion]} && !${Me.Book[Concussion]}) {
/echo You disabled Elemental Legs, and enabled Concussion, but you dont have a concussion spell in your spellbook.
/echo Ending Macro because you're stupid.
/endmacro
}
/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}
}
/if (${Me.Gem[${mainnuke}]}!=${mainnukegem.Right[1]}) {
/memspell ${mainnukegem.Right[1]} "${mainnuke}"
/delay 4s
}
/if (${Me.Gem[${endnuke}]}!=${endnukegem.Right[1]}) {
/memspell ${endnukegem.Right[1]} "${endnuke}"
/delay 4s
}
/if (!${Me.Gem["Mana Ward"]} && ${manaward}>0) {
/memspell ${manawardgem.Right[1]} "Mana Ward"
/delay 4s
}
/if (${hasele}<1 && ${Me.Book[Ancient: Greater Concussion]} && ${Me.Book[Concussion]}) {
/varset myconc Ancient: Greater Concussion
} else /if (${hasele}<1 && ${Me.Book[Ancient: Greater Concussion]} && !${Me.Book[Concussion]}) {
/varset myconc Ancient: Greater Concussion
} else /if (${hasele}<1 && !${Me.Book[Ancient: Greater Concussion]} && ${Me.Book[Concussion]}) {
/varset myconc Concussion
}
/if (${Me.Book[Atol's Spectral Shackles]}) /varset snarespell Atol's Spectral Shackles
/if (!${Me.Book[Atol's Spectral Shackles]} && ${Me.Book[Bonds of Force]}) /varset snarespell Bonds of Force
/if (${Me.Book[Ether Shield]}) /varset shieldspell Ether Shield
/if (!${Me.Book[Ether Shield]} && ${Me.Book[Shield of Maelin]}) /varset shieldspell Shield of Maelin
/if (${Me.Book[Ether Skin]}) /varset forcespell Ether Skin
/if (!${Me.Book[Ether Skin]} && ${Me.Book[Force Shield]}) /varset forcespell Force Shield
| End Anti Retard Code
/return

afnuke2.inc

Rich (BB code):
Sub Obstacle
/echo Obstacle detected, 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 Leash
/if (${doleash}>0) {
/if (${leashholder.Equal[Nobody]}) {
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${leashlength}) {
:FollowingLoop1
/varset X ${Me.X}
/varset Y ${Me.Y}
/squelch /face fast nolook loc ${stakeY},${stakeX}
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>10) {
/keypress forward hold
/delay 2
/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) /call Obstacle
}
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<=10) /keypress back
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>10) {
/goto :FollowingLoop1
} else {
/keypress forward
/keypress back
/squelch /face fast nolook loc ${stakeY},${stakeX}
/goto :end
}
}
}
/if (!${leashholder.Equal[Nobody]}) {
/if ((${Spawn[${leashholder}].ID})&&(${Spawn[${leashholder}].Distance}>${leashlength})) {
:FollowingLoop2
/varset X ${Me.X}
/varset Y ${Me.Y}
/squelch /face fast nolook id ${Spawn[${leashholder}].ID}
/if (${Spawn[${leashholder}].Distance}>10) {
/keypress forward hold
/delay 2
/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) /call Obstacle
}
/if (${Spawn[${leashholder}].Distance}<=10) /keypress back
/if (${Spawn[${leashholder}].Distance}>10) {
/goto :FollowingLoop2
} else {
/keypress forward
/keypress back
/squelch /face fast nolook id ${Spawn[${leashholder}].ID}
/goto :end
}
/if (!${leashholder.Equal[Nobody]} && !${Spawn[${leashholder}].ID}) {
/echo - Leashholder DEAD or ZONED! Leash is BROKEN!
/varset doleash 0
/varset leashholder Nobody
/ini "${IniFile}" "Settings" "doleash" "${doleash}"
/ini "${IniFile}" "Settings" "leashholder" "${leashholder}"
}
}
}
:end
/return

Sub Xuzl
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/if (${Target.CurrentHPs}<=${Math.Calc[${xuzlperc}-15]} || ${Target.Distance}>175) /return
/if (!${Me.Moving} && ${Me.AltAbilityReady["246"]} && ${Me.AltAbility["246"]}>0 && !${Me.Casting.ID}) {
/call cast "246" alt 7s
/delay 5
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
} else if (!${Me.Moving} && ${Me.AltAbilityReady["208"]} && ${Me.AltAbility["208"]}>0 && !${Me.Casting.ID}) {
/call cast "208" alt 7s
/delay 5
:wait3
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait3
}
/return

Sub Junk
/call LoadJunkBuffs
/return

Sub Harvestcheck
/if (${doharvest}<1) /return
/if (${Me.PctMana}<=${harvestpercent} && !${Me.Moving} && ${Me.SpellReady["Harvest"]} && !${Me.Casting.ID}) {
/call Cast "Harvest" ${harvestgem} 7s
/delay 2
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/if (${Me.Stunned}) {
/delay 10s !${Me.Stunned}
}
}
/if (${Me.PctMana}<=${harvestpercent} && !${Me.Moving} && ${Me.AltAbilityReady["172"]} && ${Me.AltAbility["172"]}>0 && !${Me.Casting.ID}) {
/call Cast "172" alt 7s
/delay 8
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
}
/return

Sub Medcheck
/if (${medtoggle}<1) /return
/if (${Me.PctMana}<=${medpercent} && !${Me.Moving} && !${Me.Casting.ID} && ${medtoggle}>0) {
/echo Medding up, at ${Me.PctMana} 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 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}<${manatomedup}) /sit on
}
/if (${Me.PctMana}<${manatomedup} && ${medtoggle}>0) /goto :Medloop
/if (${Me.Sitting}) /sit off
/echo Finished Medding at ${Me.PctMana} mana.
:end
/return

sub Forceshield
/if ((${Me.Buff["Barrier of Force"].ID})||(${Me.Buff["Force Shield"].ID})||(${Me.Buff["Ether Skin"].ID})) /return
/if (${forceshield}<1) /return
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/if (${useepic}<1) /goto :forceshield
:epic
/if (${Me.Buff["Spiritual Dominion"].ID}) {
/if (!${Me.Buff["Barrier of Force"].ID} && !${Me.Buff["Force Shield"].ID} && !${Me.Buff["Ether Skin"].ID}) {
/echo Spiritual Dominion detected, using Force Shield.
/goto :forceshield
}
}
/if (!${Me.Buff["Barrier of Force"].ID} && !${Me.Buff["Force Shield"].ID} && !${Me.Buff["Ether Skin"].ID}) {
/if (!${Me.Casting.ID} && !${Me.Moving}) /call ItemFinder "Staff of the Four"
/if (${Macro.Return.Equal["INVENTORY"]}) /call IteminInvSlot "Staff of the Four"
/if (${Macro.Return.Equal["BAGGED"]}) /call IteminBag "Staff of the Four"
/if (${Macro.Return.Equal["EQUIPPED"]}) /call RightClickItem "Staff of the Four"
/goto :end
}
:forceshield
/if (${useepic}>0 && !${Me.Buff["Spiritual Dominion"].ID}) /return
/if (${forceshield}<1) /return
/if (!${Me.Buff["Force Shield"].ID} && !${Me.Buff["Rune of Zebuxoruk"].ID} && !${Me.Buff["Ether Skin"].ID}) {
/if (!${Me.Casting.ID} && !${Me.Moving}) {
/if (${usetimewand}<1) {
:force
/call Cast "${forcespell}" ${forcegem} 7s
/if (${Macro.Return.Equal[CAST_NOTREADY]}) /goto :force
}
/if (${usetimewand}>0) {
/call ItemFinder "Wand of Impenetrable Force"
/if (${Macro.Return.Equal["INVENTORY"]}) /call IteminInvSlot "Wand of Impenetrable Force"
/if (${Macro.Return.Equal["BAGGED"]}) /call IteminBag "Wand of Impenetrable Force"
/if (${Macro.Return.Equal["EQUIPPED"]}) /call RightClickItem "Wand of Impenetrable Force"
}
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
}
}
:end
/return

Sub ClickBuffcheck
/if (${Me.Casting.ID} || ${Me.Moving} || ${clicktimer}) /goto :DoneItemChecks
/varset m 1
:ItemCheckLoop
/varset ialias ${Ini[${IniFile}].Arg[${m},|]}
/if (${ialias.NotEqual[NULL]}) {
/if (${Ini[${IniFile},${ialias},KeepUp].Equal[FALSE]}) /goto :NextItem
/varset bouncenum 1
/varset doiclick 1
:BounceCheckLoop
/varset ibounce ${Ini[${IniFile},${ialias},BounceOff${bouncenum}]}
/if (${ibounce.NotEqual[NULL]}) {
/if (${ibounce.Equal[${Me.Buff[${ibounce}]}]}) /varset doiclick 0
} else /goto :DoneBounceChecks
/varcalc bouncenum ${bouncenum}+1
/goto :BounceCheckLoop
:DoneBounceChecks
/varset itemspellname ${FindItem[${Ini[${IniFile},${ialias},FullName]}].Spell}
/if (${itemspellname.Equal[${Me.Buff[${itemspellname}]}]}) /varset doiclick 0
/if (${doiclick}>0) {
/if (${Cursor.ID}) /autoinv
/if (${FindItem[${Ini[${IniFile},${ialias},FullName]}].Spell.TargetType.Equal[Self]}) /keypress F1
/docommand /iclick ${ialias}
}
/if (${clicktimer}) /goto :DoneItemChecks
:NextItem
/varcalc m ${m}+1
} else /goto :DoneItemChecks
/goto :ItemCheckLoop
:DoneItemChecks
/varset clicktimer 2s
/return

Sub Buffcheck
:forceshield
/call Forceshield
:shieldofmaelin
/if (${shieldofmaelin}<1) /goto :spellshield
/for n 1 to 20 step 1
/if (${Me.Buff[${n}].ID}>0) {
/if (${Me.Buff[${n}].Name.Find["focus of"]} || ${Me.Buff[${n}].Name.Find["wunshi"]}) /goto :spellshield
}
/next n
/if (!${Me.Buff["Shield of Maelin"].ID} && !${Me.Buff["Ether Shield"].ID} && !${Me.Casting.ID} && !${Me.Moving}) {
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/call Cast "${shieldspell}" ${maelingem} 7s
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait6
}
:spellshield
/if (${spellshield}>0) /call Spellshield
:manaward
/if (${manaward}>0) /call Manaward
:familiar
/if (${checkfamiliar}<1) /return
/for m 1 to 20 step 1
/if (${Me.Buff[${m}].ID}>0) {
/if (${Me.Buff[${m}].Name.Find["familiar"]}) /return
}
/next m
/if (${Me.AltAbilityReady["${myfamiliar}"]} && ${Me.AltAbility["${myfamiliar}"]}>0 && !${Me.Casting.ID} && !${Me.Moving}) {
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/call cast "${myfamiliar}" alt 7s
/delay 8
:wait9
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait9
/if (${Me.Pet.ID} && ${Me.Pet.Name.Find[familiar]}) /pet get lost
}
/return

Sub Snare
/call ItemFinder "Dagger of Entrapment"
/if (${Macro.Return.Equal["NOTFOUND"]}) /goto :snare
/if (${Macro.Return.Equal["EQUIPPED"]} || ${Macro.Return.Equal["INVENTORY"]}) /goto :snare2
/if (${Macro.Return.Equal["BAGGED"]}) /goto :snare3
:snare
/varset retrycount ${Math.Calc[${retrycount}+1]}
:recast
/call cast "${snarespell}" ${snaregem} 7s
/if (${Macro.Return.Equal[CAST_NOTREADY]}) /goto :recast
/if (${Macro.Return.Equal["CAST_RESISTED"]} && ${retrycount}<${retry}) /goto :snare
/varset snaretimer 2.5m
/varset retrycount 0
:wait2
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2
/goto :done
:snare2
/varset retrycount ${Math.Calc[${retrycount}+1]}
/call RightClickItem "Dagger of Entrapment"
/if (${Macro.Return.Equal["CAST_RESISTED"]} && ${retrycount}<${retry}) /goto :snare2
/varset snaretimer 2.5m
/varset retrycount 0
/goto :done
:snare3
/call EquipFromBag "Dagger of Entrapment"
/varset retrycount ${Math.Calc[${retrycount}+1]}
/call RightClickItem "Dagger of Entrapment"
/if (${Macro.Return.Equal["CAST_RESISTED"]} && ${retrycount}<${retry}) /goto :snare3
/varset snaretimer 2.5m
/varset retrycount 0
/if (!${olditem.Equal[NULL]}) {
/call ItemFinder "${olditem}" "${wornslot}"
/if (${Macro.Return.Equal["BAGGED"]}) /call EquipFromBag "${olditem}" "${wornslot}"
/varset olditem NULL
/varset wornslot NULL
}
:done
/return

Sub Modrod
/if (${Me.PctMana}>${rodpercent} || ${hasrod}<1) /return
/call ItemFinder "Rod of Mystical Transvergance"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/varset hasrod 0
/echo Unable to find your Rod of Mystical Transvergance.
}
/if (${Macro.Return.Equal["EQUIPPED"]} || ${Macro.Return.Equal["INVENTORY"]}) {
/call RightClickItem "Rod of Mystical Transvergance"
/varset rodtimer 3100
/echo Mod Rodded
}
/if (${Macro.Return.Equal["BAGGED"]}) {
/call IteminBag "Rod of Mystical Transvergance"
/varset rodtimer 3100
/echo Mod Rodded
}
/return

Sub Manaward
:manaward
/if (${manaward}<1) /return
/if (!${Me.Buff["Mana Ward"].ID} && ${Me.SpellReady["Mana Ward"]} && !${Me.Casting.ID} && !${Me.Moving}) {
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/call cast "Mana Ward" ${manawardgem} 7s
/delay 1
:wait8
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait8
}
/return

Sub Spellshield
:spellshield
/if (${spellshield}<1) /return
/if (!${Me.Buff["Spellshield"].ID} && !${Me.Casting.ID} && !${Me.Moving}) {
/keypress F1
/delay 1
:wand1
/if (${Me.CountBuffs}>=${maxbuffs}) /call Junk
/call ItemFinder "Wand of Turning"
/if (${Macro.Return.Equal["NOTFOUND"]}) /goto :wand2
/if (${Macro.Return.Equal["EQUIPPED"]} || ${Macro.Return.Equal["INVENTORY"]}) {
/call RightClickItem "Wand of Turning"
/goto :end
}
/if (${Macro.Return.Equal["BAGGED"]}) {
/call IteminBag "Wand of Turning"
/goto :end
}
:wand2
/call ItemFinder "Wand of Deflection"
/if (${Macro.Return.Equal["NOTFOUND"]}) /goto :nowand
/if (${Macro.Return.Equal["EQUIPPED"]} || ${Macro.Return.Equal["INVENTORY"]}) {
/call RightClickItem "Wand of Deflection"
/goto :end
}
/if (${Macro.Return.Equal["BAGGED"]}) {
/call IteminBag "Wand of Deflection"
/goto :end
}
:nowand
/call cast "Spellshield" ${ssgem} 7s
/delay 1
:wait7
| /if (${Me.Casting.ID} || ${Me.Moving} || !${Me.SpellReady["Spellshield"]}) /goto :wait7
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :Wait7
}
:end
/if (${mobid}!=0) /squelch /target id ${mobid}
/return

Sub Manarobe
/if (${Me.PctMana}>${beginrobe} || ${hasrobe}<1) /return
/if (${Cursor.ID}) /autoinv
/call ItemFinder "Mana Robe"
/if (${Macro.Return.Equal["NOTFOUND"]}) {
/varset hasrobe 0
/echo Unable to find your Mana Robe.
/goto :done
}
/echo Beginning to Manarobe
/call ItemFinder "Mana Robe"
/if (${Macro.Return.Equal["EQUIPPED"]}) /goto :loop
/if (${Macro.Return.Equal["INVENTORY"]}) /call EquipFromInvSlot "Mana Robe"
/if (${Macro.Return.Equal["BAGGED"]}) /call EquipFromBag "Mana Robe"
:loop

/doevents

/if (${Me.PctMana}>=${donerobe} || ${Me.PctHPs}<=30) /goto :End
/call RightClickItem "Mana Robe"
/if (${forceshield}<1) /goto :wait3
/call Forceshield
:wait3
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait3
/if (${Me.PctMana}<${donerobe}) /goto :loop
:End
:wait4
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait4
/if (!${olditem.Equal[NULL]}) {
/call ItemFinder "${olditem}" "${wornslot}"
/if (${Macro.Return.Equal["BAGGED"]}) /call EquipFromBag "${olditem}" "${wornslot}"
/if (${Macro.Return.Equal["INVENTORY"]}) /call EquipFromInvSlot "${olditem}" "${wornslot}"
/varset olditem NULL
/varset wornslot NULL
}
/echo Done Manarobing.
:done
/return

Sub AddMaster(MasterName)
/declare Category string local
/declare EachMaster int local
/declare Master string local
/declare BlankMaster int local
/varset BlankMaster 0
/varset Category Masters
/varset EachMaster 0
:NextMaster1
/varset Master ${Ini[${IniFile},${Category},Master_${Int[${EachMaster}]},NOTFOUND]}
/if (${Master.Find["NOTFOUND"]}) {
/goto :IniParsed
}
/if (${Master.Find["NONE"]}) {
/varset BlankMaster ${EachMaster}
}

/if (${Master.Find["${MasterName}"]}) {
/echo ${MasterName} already on Masters List.
/return
}
/varset EachMaster ${Math.Calc[${EachMaster}+1]}
/goto :NextMaster1
:IniParsed
/if (${BlankMaster}==0) {
/ini ${IniFile} "${Category}" Master_${Int[${EachMaster}]} "${MasterName}"
} else {
/ini ${IniFile} "${Category}" Master_${Int[${BlankMaster}]} "${MasterName}"
}
/echo Added ${MasterName} to the Masters list.
/return

Sub DelMaster(MasterName)
/declare Category string local
/declare EachMaster int local
/declare Master string local
/varset Category Masters
/if (${Ini[${IniFile},${Category},-1,NOTFOUND].Equal["NOTFOUND"]}) {
/echo No Master list exists.
/return
}
/varset EachMaster 0
:NextMaster3
/varset Master ${Ini[${IniFile},${Category},Master_${Int[${EachMaster}]},NOTFOUND]}
/if (${Master.Find["NOTFOUND"]}) {
/call LoadMasters
/return
}
/if (${Master.Find["${MasterName}"]}) {
/echo Removed ${MasterName} from the Masters list.
/ini ${IniFile} "${Category}" Master_${Int[${EachMaster}]} NONE
}
/varset EachMaster ${Math.Calc[${EachMaster}+1]}
/goto :NextMaster3
/return

Sub LoadMasters(Sender, ChatText)
/declare authorized bool local FALSE
/declare Category string local
/declare EachMaster int local
/declare Master string local
/varset Category Masters
/if (${Ini[${IniFile},${Category},-1,NOTFOUND].Find["NOTFOUND"]}) {
/return
}
/varset EachMaster 0
:NextMaster2
/varset Master ${Ini[${IniFile},${Category},Master_${Int[${EachMaster}]},NOTFOUND]}
/if (${Master.Equal["NOTFOUND"]}) {
/return
}
/if (${Master.Find["NONE"]}) {
} else {
/if (${Master.Find["${Sender}"]}) {
/goto :authorized
}
}
:next
/varset EachMaster ${Math.Calc[${EachMaster}+1]}
/goto :NextMaster2

:authorized
/echo - User ${Sender} Authenticated!
/echo Action --> "${ChatText}"
/if (${Me.AFK}) /delay 2s
/docommand ${ChatText}

/return

Sub AddJunkBuff(JunkBuffName)
/declare Category string local
/declare EachJunkBuff int local
/declare JunkBuff string local
/declare BlankJunkBuff int local
/varset BlankJunkBuff 0
/varset Category Junk Buffs
/varset EachJunkBuff 0
:NextJunkBuff1
/varset JunkBuff ${Ini[${IniFile},${Category},JunkBuff_${Int[${EachJunkBuff}]},NOTFOUND]}
/if (${JunkBuff.Find["NOTFOUND"]}) {
/goto :IniParsed
}
/if (${JunkBuff.Find["NONE"]}) {
/varset BlankJunkBuff ${EachJunkBuff}
}

/if (${JunkBuff.Find["${JunkBuffName}"]}) {
/echo ${JunkBuffName} already on JunkBuff List.
/return
}
/varset EachJunkBuff ${Math.Calc[${EachJunkBuff}+1]}
/goto :NextJunkBuff1
:IniParsed
/if (${BlankJunkBuff}==0) {
/ini ${IniFile} "${Category}" JunkBuff_${Int[${EachJunkBuff}]} "${JunkBuffName}"
} else {
/ini ${IniFile} "${Category}" JunkBuff_${Int[${BlankJunkBuff}]} "${JunkBuffName}"
}
/echo Added ${JunkBuffName} to the Junk Buffs list.
/return

Sub LoadJunkBuffs
/declare Category string local
/declare EachJunkBuff int local
/declare JunkBuff string local
/varset Category Junk Buffs
/if (${Ini[${IniFile},${Category},-1,NOTFOUND].Find["NOTFOUND"]}) {
/return
}
/varset EachJunkBuff 0
:NextJunkBuff2
/varset JunkBuff ${Ini[${IniFile},${Category},JunkBuff_${Int[${EachJunkBuff}]},NOTFOUND]}
/if (${JunkBuff.Equal["NOTFOUND"]}) {
/return
}
/if (${JunkBuff.Find["NONE"]}) {
} else {
/if (${Me.CountBuffs}<${maxbuffs}) /return
/for m 20 downto 1 step 1
/if (${Me.Buff[${m}].ID}>0) {
/if (${Me.CountBuffs}>=${maxbuffs}) {
/if (${Me.Buff[${m}].Name.Find["${JunkBuff}"]}) {
/varset buffslot ${Math.Calc[${Me.Buff[${m}].ID}-1]}
/notify BuffWindow Buff${buffslot} leftmouseup
/delay 1
/goto :next
}
}
}
/next m
}
:next
/varset EachJunkBuff ${Math.Calc[${EachJunkBuff}+1]}
/goto :NextJunkBuff2
/return

Sub DelJunkBuff(JunkBuffName)
/declare Category string local
/declare EachJunkBuff int local
/declare JunkBuff string local
/varset Category Junk Buffs
/if (${Ini[${IniFile},${Category},-1,NOTFOUND].Find["NOTFOUND"]}) {
/echo No JunkBuff list exists.
/return
}
/varset EachJunkBuff 0
:NextJunkBuff3
/varset JunkBuff ${Ini[${IniFile},${Category},JunkBuff_${Int[${EachJunkBuff}]},NOTFOUND]}
/if (${JunkBuff.Find["NOTFOUND"]}) {
/call LoadJunkBuffs
/return
}
/if (${JunkBuff.Find["${JunkBuffName}"]}) {
/echo Removed ${JunkBuffName} from the exclusions list.
/ini ${IniFile} "${Category}" JunkBuff_${Int[${EachJunkBuff}]} NONE
}
/varset EachJunkBuff ${Math.Calc[${EachJunkBuff}+1]}
/goto :NextJunkBuff3
/return

Sub AddExclude(ExcludeName)
/declare Category string local
/declare EachExclude int local
/declare Exclude string local
/declare BlankExclude int local
/varset BlankExclude 0
/varset Category Excludes
/varset EachExclude 0
:NextExclude1
/varset Exclude ${Ini[${IniFile},${Category},exclude_${Int[${EachExclude}]},NOTFOUND]}
/if (${Exclude.Find["NOTFOUND"]}) {
/goto :IniParsed
}
/if (${Exclude.Find["NONE"]}) {
/varset BlankExclude ${EachExclude}
}

/if (${Exclude.Find["${ExcludeName}"]}) {
/echo ${ExcludeName} already on Exclude List.
/return
}
/varset EachExclude ${Math.Calc[${EachExclude}+1]}
/goto :NextExclude1
:IniParsed
/if (${BlankExclude}==0) {
/ini ${IniFile} "${Category}" exclude_${Int[${EachExclude}]} "${ExcludeName}"
} else {
/ini ${IniFile} "${Category}" exclude_${Int[${BlankExclude}]} "${ExcludeName}"
}
/echo Added ${ExcludeName} to the exclusions list.
/squelch /alert add ${AlertList} NPC "${ExcludeName}"
/return

Sub LoadExcludes
/declare Category string local
/declare EachExclude int local
/declare Exclude string local
/varset Category Excludes
/squelch /alert clear ${AlertList}
/squelch /alert add ${AlertList} afnuke.mac
/squelch /alert add ${AlertList} NPC "eye of "
/if (${Ini[${IniFile},${Category},-1,NOTFOUND].Find["NOTFOUND"]}) {
/echo No Exclude list exists.
/return
}
/varset EachExclude 0
:NextExclude2
/varset Exclude ${Ini[${IniFile},${Category},exclude_${Int[${EachExclude}]},NOTFOUND]}
/if (${Exclude.Equal["NOTFOUND"]}) {
/return
}
/if (${Exclude.Find["NONE"]}) {
} else {
/squelch /alert add ${AlertList} NPC "${Exclude}"
}
/varset EachExclude ${Math.Calc[${EachExclude}+1]}
/goto :NextExclude2
/return

Sub CheckExcludes
/if (${SpawnCount[npc radius ${engagedistance} zradius 20 alert ${AlertList}]}>0) {
/varset npcnum ${SpawnCount[npc radius ${engagedistance} zradius 20 alert ${AlertList}]}
/for m 1 to ${npcnum} step 1
/if (${NearestSpawn[${m}, npc alert ${AlertList}].ID}==${mobid}) {
/varset mobid 0
/varset engagedmob 0
/goto :end
}
}
/next m
:end
/return

Sub DelExclude(ExcludeName)
/declare Category string local
/declare EachExclude int local
/declare Exclude string local
/varset Category Excludes
/if (${Ini[${IniFile},${Category},-1,NOTFOUND].Find["NOTFOUND"]}) {
/echo No Exclude list exists.
/return
}
/varset EachExclude 0
:NextExclude3
/varset Exclude ${Ini[${IniFile},${Category},exclude_${Int[${EachExclude}]},NOTFOUND]}
/if (${Exclude.Find["NOTFOUND"]}) {
/call LoadExcludes
/return
}
/if (${Exclude.Find["${ExcludeName}"]}) {
/echo Removed ${ExcludeName} from the exclusions list.
/ini ${IniFile} "${Category}" exclude_${Int[${EachExclude}]} NONE
}
/varset EachExclude ${Math.Calc[${EachExclude}+1]}
/goto :NextExclude3
/return

sub ItemFinder(item)
/varset bag ${FindItem[${item}].InvSlot.Pack}
/varset slot ${FindItem[${item}].InvSlot}
/declare equipslot string local ${FindItem[${item}].WornSlot[1].Name}
/declare equipslot2 string local ${FindItem[${item}].WornSlot[2].Name}
/declare equipslot3 string local ${FindItem[${item}].WornSlot[3].Name}
/if ((${bag}==0)&&(${slot}==0)) /return NOTFOUND
/if ((${Me.Inventory[${equipslot}].Name.Equal[${item}]})) /return EQUIPPED
/if ((${Me.Inventory[${equipslot2}].Name.Equal[${item}]})) /return EQUIPPED
/if ((${Me.Inventory[${equipslot3}].Name.Equal[${item}]})) /return EQUIPPED
/if (${bag}==0 && ${slot}>0) /return INVENTORY
/if (${bag}>0 && ${slot}>0) /return BAGGED

Sub EquipFromBag(item)
/varset bag ${FindItem[${item}].InvSlot.Pack}
/varset slot ${FindItem[${item}].InvSlot}
/declare equipslot string local ${FindItem[${item}].WornSlot[1].Name}
/if (!${Window[InventoryWindow].Open}) /keypress Inventory
/itemnotify ${InvSlot[${bag}]} rightmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/varset olditem ${Cursor.Name}
/varset wornslot ${Cursor.WornSlot[1].Name}
/delay 1
/itemnotify ${InvSlot[${slot}]} leftmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/itemnotify ${InvSlot[${bag}]} rightmouseup
/if (${Window[InventoryWindow].Open}) /keypress Inventory
/return

Sub EquipFromInvSlot(item)
/varset slot ${FindItem[${item}].InvSlot}
/declare equipslot string local ${FindItem[${item}].WornSlot[1].Name}
/if (!${Window[InventoryWindow].Open}) /keypress Inventory
/itemnotify ${equipslot} leftmouseup
/varset olditem ${Cursor.Name}
/varset wornslot ${Cursor.WornSlot[1].Name}
/delay 1
/itemnotify ${InvSlot[${slot}]} leftmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/if (${Window[InventoryWindow].Open}) /keypress Inventory
/return

Sub IteminBag(item)
/declare charges int local ${FindItem[${item}].Charges}
/varset bag ${FindItem[${item}].InvSlot.Pack}
/varset slot ${FindItem[${item}].InvSlot}
/declare equipslot string local ${FindItem[${item}].WornSlot[1].Name}
/if (!${Window[InventoryWindow].Open}) /keypress Inventory
/itemnotify ${InvSlot[${bag}]} rightmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/itemnotify ${InvSlot[${slot}]} leftmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/call RightClickItem "${item}"
/if ( ${charges}>0 ) /delay 2s ${FindItem[${item}].Charges}!=${charges}
/if ((${Me.Inventory[${equipslot}].Name.Equal[${item}]})||(${Me.Inventory[${equipslot}s].Name.Equal[${item}]})) {
/itemnotify ${equipslot} leftmouseup
/delay 1
}
/delay 1
/itemnotify ${InvSlot[${slot}]} leftmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/itemnotify ${InvSlot[${bag}]} rightmouseup
/delay 1
/if (${Window[InventoryWindow].Open}) /keypress Inventory
/return

Sub IteminInvSlot(item)
/varset slot ${FindItem[${item}].InvSlot}
/declare equipslot string local ${FindItem[${item}].WornSlot[1].Name}
/if (!${Window[InventoryWindow].Open}) /keypress Inventory
/itemnotify ${equipslot} leftmouseup
/delay 1
/itemnotify ${InvSlot[${slot}]} leftmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/call RightClickItem "${item}"
/if ((${Me.Inventory[${equipslot}].Name.Equal[${item}]})||(${Me.Inventory[${equipslot}s].Name.Equal[${item}]})) {
/itemnotify ${equipslot} leftmouseup
/delay 1
}
/itemnotify ${InvSlot[${slot}]} leftmouseup
/delay 1
/itemnotify ${equipslot} leftmouseup
/delay 1
/itemnotify ${InvSlot[${bag}]} rightmouseup
/delay 1
/if (${Window[InventoryWindow].Open}) /keypress Inventory
/return

Sub RightClickItem(item)
| /if (${FindItem[${item}].Spell.TargetType.Equal[Self]}) {
| /call cast "${item}" item nocheck
| } else {
| /call cast "${item}" item ${checktarget}
| }
/call cast "${item}" item 7s
/delay 2
/if (${Macro.Return.Equal["CAST_RESISTED"]}) /return ${Macro.Return}
:wait1
/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1
/return

Mage

Rich (BB code):
|
|
| /macro mage [ma name][sa name][radius #][nuke fire|magic|bolt][minhp #]
|
| Description:
|   Will assist the person set as main assist. If the main assist dies, it will assist the person
|   set as secondary assist if there is one. Once a target is aquired, and is varified as being aggro
|   it will then wait till the mob is engaged by the tank. It will then send in pet and debuff the mob
|   if debuffs are enabled. It will then wait till mob is under the spcified hp, or the specified time
|   has expired since the tank has engaged, then it will start nuking.
|   This will also keep self buffs up, keep pet up (with weapons, belt, and mask), and buff and rod
|   people that ask (with the spells specified in ini). Will coth people that ask for it via tells
|
|
|   After running the macro for the first time, you should open the ini file generated (Auto_Yourname.ini)
|   Most of the options are self explanatory
|   Here's an example how the ini based buffs work:
|
|      BuffList1=rod,modrod
|      BuffName1=Magi`kot's Pants of Convergence
|      BuffType1=item
|
|   BuffList is a list of words (or phrases) that will trigger the buff, separated by commas
|   BuffName is the name of the spell or item
|   BuffType is either item, gem1-9, or alt, for items, spells, or aa respectively
|
|   For each self buff and clicky buff, there's a place to put all the buffs that don't stack with it:
|
|      SelfBuff1=Phantom Shield
|      SelfBuffNoStack1=Protection of the Nine,Blessing of the Nine,Steeloak Skin
|
|   *note* To mem spells after death, save a spellset, and put the name of it in your ini under SpellSet
|
|
|----------------------------------------------------------------------------------------------------------+
|  slash commands:                                                                                         |
|----------------------------------------------------------------------------------------------------------+
|  /setma name                             - sets main assist                                              |
|  /setsa name                             - sets secondary assist                                         |
|  /buff on|off                            - turns auto buffing on or off                                  |
|  /debuff on|off                          - turns auto debuffing on or off                                |
|  /mount on|off                           - turns auto mounting on or off                                 |
|  /nukedelay #                            - sets the minimum amount of deciseconds between nukes          |
|  /engagedelay #                          - amount of deciseconds before you start nuking mob             |
|  /companion on|off                       - sets auto pet summon on or off                                |
|  /anchor #                               - sets the leash length when using an anchor                    |
|  /minhp #                                - sets the minimum hp % that you'll begin nuking at             |
|  /cleanup on|off                         - turns on auto looting of any droppable loot                   |
|  /checknamed on|off                      - turns alerts on for named in your current zone                |
|  /runehp #                               - sets the health % at which you'll cast your rune item or spell|
|  /nukemode 0, 1, 2                       - mode 0 turns nukes off completely                             |
|                                          - mode 1 uses robe if enabled, and slows nukes if low mana      |
|                                          - mode 2 chain nukes, with only delay being the set /nukedelay  |
|  /manarobe mode #|min #|max #            - mode 1 uses manrobe all the time                              |
|                                          - mode 2 uses your set % to start robing                        |
|  /radius #                               - sets the distance at which you'll engage the main assist's    |
|                                            target                                                        |
|  /nuketype fire|magic|bolt [spellname]   - sets your current nuke to the specified type                  |
|                                          - include spell name to set the nuke for that type              |
|  /ds on|off                              - turns group ds on or off                                      |
|----------------------------------------------------------------------------------------------------------+

#include spell_routines.inc
#include gen_routines.inc
#include move.inc

#turbo 40

#chat group
#chat tell
#chat chat
#chat say

#event Coth "#1# tells you, 'coth'"
#event Coth "#1# tells you, 'coth #2#'"
#event Coth "#1# told you, 'coth'"
#event Coth "#1# told you, 'coth #2#'"
#event Gate "#1# gates#*#"
#event Goto "[MQ2] goto #1#"
#event PetWeps "#1# #*#'#*#pet weps#*#'"
#event RageOff "#*#is no longer enraged#*#"
#event RageOn "#*#has become ENRAGED#*#"

Sub Main
   /call GeneralDeclares

   /call DeclareIniVar mainAssist string Settings
   /call DeclareIniVar secondAssist string Settings
   /call DeclareIniVar minRadius int Settings 150 /radius
   /call DeclareIniVar engageDelay int Settings 55 /engagedelay
   /call DeclareIniVar minHP int Settings 95 /minhp
   /call DeclareIniVar autoBuff int Settings 1 /buff
   /call DeclareIniVar useMount int Settings 1 /mount
   /call DeclareIniVar useDebuff int Settings 1 /debuff
   /call DeclareIniVar nukeMode int Settings 1 /nuke
   /call DeclareIniVar useCharm int Settings 0 /charm
   /call DeclareIniVar useDPS int Settings 0 /dps
   /call DeclareIniVar usePet int Settings 1 /companion
   /call DeclareIniVar privateChannel string Settings " "
   /call DeclareIniVar channelAnnounce int Settings 0
   /call DeclareIniVar autoAnnounce string Settings 1 
   /call DeclareIniVar noInterrupt int Settings 0
   /call DeclareIniVar useManaStone int Settings 0
   /call DeclareIniVar checkNamed int Settings 0 /checknamed
   /call DeclareIniVar noInvis int Settings 1
   /call DeclareIniVar useManaRobe int Settings 1
   /call DeclareIniVar manaRobeMode int Settings 1
   /call DeclareIniVar manaRobeMinMana int Settings 70
   /call DeclareIniVar manaRobeMaxMana int Settings 90
   /call DeclareIniVar nukeMana int Settings 25 /nukemana
   /call DeclareIniVar nukeDelay int Settings 0 /nukedelay
   /call DeclareIniVar nukeMode int Settings 1 /nukemode
   /call DeclareIniVar ignoreList string Settings
   /call DeclareIniVar runeHP int Settings 70
   /call DeclareIniVar cleanUp int Settings 0 /cleanup
   /call DeclareIniVar useGroupDS int Settings 1 /ds   
   /call DeclareIniVar clarityBitch string Settings
   /call DeclareIniVar spellSet string Settings "default"
   /call DeclareIniVar maloDuration string Settings 19m
   /call DeclareIniVar resistsTillMala int Settings 3
   /call DeclareIniVar resistsTillQuit int Settings 6

   /call DeclareIniVar nuke1 string Spells "Blade Strike"
   /call DeclareIniVar nuke2 string Spells " "
   /call DeclareIniVar magicNuke string Spells "Blade Strike"
   /call DeclareIniVar fireNuke string Spells "Sun Vortex"
   /call DeclareIniVar boltNuke string Spells "Firebolt of Talon"
   /call DeclareIniVar shielding string spells "Shield of Maelin"
   /call DeclareIniVar petSpell string Spells "Child of Water"
   /call DeclareIniVar malosiniaSpell string Spells "Veil of Lost Hopes"
   /call DeclareIniVar malosiniaType string Spells "item"
   /call DeclareIniVar malaSpell string Spells "Mala"
   /call DeclareIniVar malaType string Spells "gem5"
   /call DeclareIniVar summonedWepSpell string Spells "Summon Dagger of the Deep"
   /call DeclareIniVar summonedWepType string Spells "gem5"
   /call DeclareIniVar summonedBeltSpell string Spells "Girdle of Magi'Kot"
   /call DeclareIniVar summonedBeltType string Spells "gem5"
   /call DeclareIniVar summonedMaskSpell string Spells "Muzzle of Mardu"
   /call DeclareIniVar summonedMaskType string Spells "gem5"
   /call DeclareIniVar groupDSSpell string Spells "Maelstrom of Ro"
   /call DeclareIniVar singleDSSpell string Spells "Flameshield of Ro"
   /call DeclareIniVar siphonSpell string Spells "Elemental Siphon"
   /call DeclareIniVar runeSpell string Spells "Shield of Auras"
   /call DeclareIniVar runeType string Spells "item"
   /call DeclareIniVar petHaste string Spells "Burnout V"
   /call DeclareIniVar petShrinkSpell string Spells "Algae Covered Stiletto"
   /call DeclareIniVar petShrinkType string Spells "item"
   /call DeclareIniVar rodSpell string Spells "Magi`kot's Pants of Convergence"
   /call DeclareIniVar rodType string Spells "item"
   /call DeclareIniVar elementalType string Spells "water" /elemental

   /call DeclareIniVar selfBuff1 string Spells "Phantom Shield"
   /call DeclareIniVar selfBuffNoStack1 string Spells "Protection of the Nine,Blessing of the Nine,Steeloak Skin,Blessing of Steeloak"
   /call DeclareIniVar selfBuff2 string Spells " "
   /call DeclareIniVar selfBuffNoStack2 string Spells " "
   /call DeclareIniVar selfBuff3 string Spells " "
   /call DeclareIniVar selfBuffNoStack3 string Spells " "
   /call DeclareIniVar selfBuff4 string Spells " "
   /call DeclareIniVar selfBuffNoStack4 string Spells " "
   /call DeclareIniVar selfBuff5 string Spells " "
   /call DeclareIniVar selfBuffNoStack5 string Spells " "
   /call DeclareIniVar buffList1 string Spells "rod,modrod"
   /call DeclareIniVar buffName1 string Spells "Magi`kot's Pants of Convergence"
   /call DeclareIniVar buffType1 string Spells "item"
   /call DeclareIniVar buffList2 string Spells "ds,dmg shield,damage shield"
   /call DeclareIniVar buffName2 string Spells "ds"
   /call DeclareIniVar buffType2 string Spells "gem6"
   /call DeclareIniVar buffList3 string Spells " "
   /call DeclareIniVar buffName3 string Spells " "
   /call DeclareIniVar buffType3 string Spells " "
   /call DeclareIniVar buffList4 string Spells " "
   /call DeclareIniVar buffName4 string Spells " "
   /call DeclareIniVar buffType4 string Spells " "
   /call DeclareIniVar buffList5 string Spells " "
   /call DeclareIniVar buffName5 string Spells " "
   /call DeclareIniVar buffType5 string Spells " "

   /call DeclareIniVar hpRobe string Items "${InvSlot[chest].Item.Name}"
   /call DeclareIniVar clicky1 string Items " "
   /call DeclareIniVar clickyNoStack1 string Items " "
   /call DeclareIniVar clicky2 string Items " "
   /call DeclareIniVar clickyNoStack2 string Items " "
   /call DeclareIniVar clicky3 string Items " "
   /call DeclareIniVar clickyNoStack3 string Items " "
   /call DeclareIniVar clicky4 string Items " "
   /call DeclareIniVar clickyNoStack4 string Items " "
   /call DeclareIniVar clicky5 string Items " "
   /call DeclareIniVar clickyNoStack5 string Items " "
   /call DeclareIniVar useFood int Items 1
   /call DeclareIniVar statFood string Items "Bristlebanes Party Platter"
   /call DeclareIniVar food1 string Items "Halas 10lb Meat Pie"
   /call DeclareIniVar food2 string Items "Misty Thicket Picnic"
   /call DeclareIniVar food3 string Items "Holy Cake"
   /call DeclareIniVar food4 string Items
   /call DeclareIniVar food5 string Items
   /call DeclareIniVar meleeWep string Items "Wand of Temporal Power"
   /call DeclareIniVar invisItem string Items " "
   /call DeclareIniVar dispellItem string Items " "
   /call DeclareIniVar normalMainhand string Items "${InvSlot[mainhand].Item.Name}"
   /call DeclareIniVar normalOffhand string Items "${InvSlot[offhand].Item.Name}"

   /squelch /custombind add ma
   /squelch /custombind add sa
   /squelch /alias /anchor /echo SetAnchor
   /squelch /alias /manarobe /echo Mana Robe
   /squelch /alias /setma /custombind set ma /assist
   /squelch /alias /setsa /custombind set sa /assist
   
   /declare i int local
   /declare j int local
   /declare oldTarget int local
   /declare tempTimer timer local 0
   /declare petID2 int outer 0
   /varset castSub CheckForAdds
:check_params
   /if ( ${Defined[Param${i}]} ) {
      /if ( ${Param${i}.Equal[ma]} ) {
         /varcalc i ${i}+1
         /call SetIniVar mainAssist Settings "${Param${i}}"
      } else /if ( ${Param${i}.Equal[sa]} ) {
         /varcalc i ${i}+1
         /call SetIniVar secondAssist Settings "${Param${i}}"
      } else /if ( ${Param${i}.Equal[radius]} ) {
         /varcalc i ${i}+1
         /call SetIniVar minRadius Settings "${Param${i}}"
      } else /if ( ${Param${i}.Equal[minhp]} ) {
         /varcalc i ${i}+1
         /call SetIniVar minHP Settings "${Param${i}}"
      } else /if ( ${Param${i}.Equal[buff]} ) {
         /call SetIniVar autoBuff Settings 1
      } else /if ( ${Param${i}.Equal[nobuff]} ) {
         /call SetIniVar autoBuff Settings 0
      } else /if ( ${Param${i}.Equal[nuke]} ) {
         /call SetIniVar nukeMode Settings 1
      } else /if ( ${Param${i}.Equal[nonuke]} ) {
         /call SetIniVar nukeMode Settings 0
      } else /if ( ${Param${i}.Equal[debuff]} ) {
         /call SetIniVar useDebuff Settings 1
      } else /if ( ${Param${i}.Equal[nodebuff]} ) {
         /call SetIniVar useDebuff Settings 0
      }
      /varcalc i ${i}+1
      /goto :check_params
   }

   /call SwapStatFood 1

   /if ( ${autoAnnounce} ) /announce on

   /echo Auto Mage Mode Activated
   /if ( ${nukeMode} || ${useDebuff} ) {
      /echo Main Assist: ${mainAssist}
      /if ( ${Bool[${secondAssist}]} ) /echo Secondary Assist: ${secondAssist} (if ${mainAssist} dies)
   }
   /if ( ${nukeMode} || ${useDebuff} ) /echo Will ${If[${useDebuff},malosinia ,]}${If[${nukeMode} && ${useDebuff},then ,]}${If[${nukeMode},start nuking ,]}at ${minHP}%
   /if ( ${autoBuff} ) /echo Auto Buff is enabled.
   /if ( ${useMount} ) /echo Mount is enabled.
   /if ( ${manaRobeMode} ) /echo ManaRobe Mode: ${manaRobeMode}
:wait_for_target
   /if ( !${petSpamTimer} ) {
      /pet hold
      /varset petSpamTimer 50
   }
   /if ( ${nukeMode} || ${useDebuff} ) /echo Waiting for target...
   /varset validTarget 0
:wait_for_target2
   /if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist}].ID} ) ) {
      /varset mainTank ${secondAssist}
   } else {
      /varset mainTank ${mainAssist}
   }
   /if ( !${Corpse.Open} && ${Spawn[${mainAssist}].NearestSpawn[npc radius ${Math.Calc[${minRadius}*2]}].ID} && ( ${nukeMode} || ${useDebuff} ) ) {
      /if ( ${Me.Casting.ID} ) /call WaitCast
      /assist ${mainTank}
      /varset oldTarget ${Target.ID}
      /varset tempTimer 5
   :wait_for_assist1
      /call CheckTarget
      /if ( ${tempTimer} && !${validTarget} ) /goto :wait_for_assist1
   }
   /call CheckTarget
   /if ( !${validTarget} || ( !${nukeMode} && !${useDebuff} ) ) {
      /call CheckPet
      /call CheckPet2
      /doevents
      /call CheckBuffs
      /call CheckLoc
      /call ManaRobe
      /delay 0
      /goto :wait_for_target2
   }
   /echo Target Aquired >> ${Target.DisplayName} <<
   /varset petAttacking false
   /varset engaged 0
   /varset nukeWaitTimer 0
   /varset mobID ${Target.ID}
   /varset mobHPStart ${Target.PctHPs}
   /call UpdateMobList
   /call AddToList mobList ${mobID}
   /varset nukeWaitTimer 0
   /if ( ${Defined[waitTimer${mobID}]} ) /deletevar waitTimer${mobID}
   /declare waitTimer${mobID} int outer -1
   /varset newAdds 0
:nuke_loop
   /varset addIndex 1
:check_add_loop
   /call CheckForAdds
   /if ( ${addIndex}>1 ) /goto :check_add_loop
   /call CheckPet
   /call CheckPet2
   /if ( !${Spawn[${mobID}].Type.Equal[NPC]} && ( !${Spawn[${mobID}].Type.Equal[pet]} || ${Spawn[${mobID}].Master.Type.Equal[pc]} ) ) {
      /echo Target Dead!
      /if ( ${cleanUp} ) /call CleanUp ${mobID}
      /goto :wait_for_target
   }
   /target id ${mobID}
   /if ( ${Spawn[${mobID}].Distance3D}<=${minRadius} && ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Spawn[${mobID}].MaxRangeTo} id ${mobID}].ID} && ${waitTimer${mobID}}<0 ) {
      /deletevar waitTimer${mobID}
      /declare waitTimer${mobID} timer outer ${engageDelay}
   }
   /if ( ( ${waitTimer${mobID}}>=0 || ${engaged} ) && ${useDebuff} ) /call DebuffMobs
   /target id ${mobID}
   /if ( ( ${Target.PctHPs}>${minHP} && ${waitTimer${mobID}} ) || !${assistWaitTimer} ) {
      /if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist}].ID} ) ) {
         /varset mainTank ${secondAssist}
      } else {
         /varset mainTank ${mainAssist}
      }
      /assist ${mainTank}
      /if ( ${useManaRobe} && ${refreshTime}>2 ) /call ManaRobe
      /varset tempTimer 8
   :wait_for_assist
      /call CheckPet
      /if ( ${tempTimer} && ${Target.ID}==${mobID} ) /goto :wait_for_assist
      /if ( ${Target.ID} && ${Target.ID}!=${mobID} ) /goto :wait_for_target
      /varset assistWaitTimer 5s
      /goto :nuke_loop
   }
   /if ( !${engaged} ) {
      /varset engaged 1
      /echo Engaging >> ${Target.DisplayName} <<
   }
   /if ( ${Me.Pet.ID} && !${petAttacking} && !${Me.PetBuff[elemental silence]} ) {
      /pet attack
      /varset petAttacking true
   }
   /if ( ${useManaRobe} && ${refreshTime}>2 ) /call ManaRobe
   /if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Type.Equal[pet]} ) /goto :wait_for_target
   /doevents timer
   /if ( !${petOff} && ( ${maloTimer${mobID}}<0 || ${maloTimer${mobID}}>1 || !${useDebuff} )  ) {
      /doevents
      /call CheckBuffs
      /target id ${mobID}
      /if ( ${nukeMode} && ${Target.LineOfSight} && !${Me.TargetOfTarget.Name.Equal[${Me.Name}]} && !${nukeWaitTimer} &&  ( ${Me.PctMana}>=${nukeMana} || ${nukeMode}==2 ) && ( ${Target.Type.Equal[NPC]} || ${Target.Type.Equal[pet]} ) ) {
         /call Cast "${nuke1}" gem4 0 CheckPet
         /if ( ${Macro.Return.Equal[CAST_NOTREADY]} && ${Me.Gem[${nuke2}]} ) /call Cast "${nuke2}" gem3 0 CheckPet
         /if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_RESISTED]} ) {
            /if ( ${nukeMode}==1 ) {
               /varcalc nukeWaitMod 2*(90 - ${Me.PctMana})
            } else {
               /varset nukeWaitMod 0               
            }
            /if ( ${nukeDelay}>${nukeWaitMod} ) {
               /varset nukeWaitTimer ${nukeDelay}
            } else {
               /varset nukeWaitTimer ${nukeWaitMod}
            }
         }
      } else {
         /call ManaRobe
      }
   }
/goto :nuke_loop


Sub DebuffMobs
   /declare i int local
   /declare tempID string local
   /if ( ${mobList.Find[[]} ) {
      /for i 1 to ${mobList.Count[[]}
         /if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]}
         /varset tempID ${mobList.Arg[${i},[].Left[-1]}
         /if ( !${Defined[maloTimer${tempID}]} ) {
            /if ( !${Spawn[${tempID}].Type.Equal[npc]} ) {
               /declare maloTimer${tempID} int outer -1
            } else /if ( ( !${waitTimer${tempID}} && ( ${maloTimer${mobID}} || ${waitTimer${mobID}} ) ) || ${tempID}==${mobID} ) {
               /call UpdateMobList
               /target id ${tempID}
               /call Malo
            }
         }
      /next i
   }
/return

Sub CheckPet
   /if ( ${Zone.ID}!=${currentZone} ) {
      /call ClearMobList 
      /varset currentZone ${Zone.ID}
      /varset mobList
      /varset addList
      /varset buffQueue
      /varset mobID 0
      /varset petID 0
      /varset petID2 0
      /varset useAnchor 0
      /squelch alert clear 6
   }
   /call CheckForAdds
   /declare i int local
   /declare tempID int local
   /if ( ${petOff} && ${Me.Pet.ID} ) {
      /varset petOff 0
   }
   /if ( !${Spawn[${petID2}].Type.Equal[NPC]} && ${petOff2} ) /varset petOff2 0
   /if ( ${Spawn[${petID}].Type.Equal[NPC]} && !${petOff} ) {
      /echo Pet Off!
      /varset petAttacking false
      /varset petOff 1
   }
   /if ( ${Spawn[${petID2}].Type.Equal[NPC]} && !${petOff2} ) {
      /echo Chanter Pet Off!
      /varset petOff2 1
   }

   /if ( ${petOff} && ${Me.Casting.ID} && !( ${Me.Casting.Name.Equal[malosinia]} && ${Target.ID}==${petID} ) && !${Me.Casting.Name.Equal[Elemental Silence]} && !${Me.Casting.Name.Equal[call of the arch mage]} ) /call Interrupt
   /doevents gate
   /doevents rageon
   /doevents rageoff
   /doevents setvar
   /if ( ${castWaitTime}>5 ) /doevents chat
/return

Sub CheckPet2
   /if ( ${FindItem[Wand of Destructive Protection].ID} ) {
      /declare AETime float local
      /varcalc AETime (${MacroQuest.Running}-${uquaAETime})%90000
      /if ( ${AETime}>83000 ) {
         /if ( !${Me.Inventory[offhand].Name.Equal[Wand of Destructive Protection]} ) /call EquipItem "Wand of Destructive Protection|offhand"
      } else {
         /if ( ${AETime}>3000 && !${Me.Inventory[offhand].Name.Equal[${normalOffhand}]} ) /call EquipItem "${normalOffhand}|offhand"
      }
   } else {
      /if ( !${Me.Inventory[offhand].Name.Equal[${normalOffhand}]} ) /call SwapItem "${normalOffhand}" offhand
   }
   /if ( ${petOff} ) /call Charm ${petID}
   /if ( ${petOff2} &&  !( ${maloTimer${petID2}}>=4200 ) ) {
      /declare oldTargetID int local ${Target.ID}
      /tar id ${petID2}
      /call Malo
      /if ( ${Spawn[${oldTargetID}].ID} ) {
         /target id ${oldTargetID}
      } else {
         /keypress clear_target
      }
   }
/return

Sub CheckForAdds
:check_add_loop
   /if ( !${Spawn[${mobID}].Type.Equal[npc]} && !${Spawn[${mobID}].Type.Equal[pet]} ) {
      /varset addIndex 1
      /return
   }
   /varset addID ${NearestSpawn[${addIndex},npc radius ${minRadius}].ID}
   /if ( ${addID} ) {
      /if ( ${Spawn[${addID}].Distance3D}<=${minRadius} && ${addID}!=${petID} && ${Spawn[${addID}].LineOfSight} && ${aggroAnim.Find[|${Spawn[${addID}].Animation}|]} && ${mezTimer${addID}}!=-1 && ${Spawn[${addID}].Type.Equal[NPC]} ) {
         /call AddToList mobList ${addID}
         /if ( ${Macro.Return.Equal[1]} ) {
            /if ( !${Defined[waitTimer${addID}]} ) /declare waitTimer${addID} timer outer ${engageDelay}
            /echo Add detected! >> ${Spawn[${addID}].DisplayName} <<
         }
         /varset newAdds 1
      }
      /varcalc addIndex ${addIndex}+1
   } else {
      /varset addIndex 1
   }
/return

Sub Charm(int tempID)
   /if ( ${Me.Pet.ID} ) /return
   /varset noInvis 0
   /declare oldTargetID int local ${Target.ID}
:mez_pet
   /target id ${tempID}
   /call Cast "Elemental Silence" gem7 3s   
   /if ( !${Macro.Return.Equal[CAST_SUCCESS]} ) /goto :mez_pet
:malo_pet
   /target id ${tempID}
   /call Malo
   /if ( !${Macro.Return.Equal[CAST_SUCCESS]} ) /goto :malo_pet
   /target id ${tempID}
   /call Cast "Call of the Arch Mage" gem6 5s
   /if ( ${Me.Pet.ID} ) {
      /if ( ${Spawn[${oldTargetID}].ID} ) {
         /target id ${oldTargetID}
      } else {
         /keypress clear_target
      }
   }
   /varset noInvis ${Ini[${iniName},Settings,NoInvis,1]}
/return

Sub Malo
   /declare tempID int local ${Target.ID}
   /if ( !${Defined[maloResists${tempID}]} ) /declare maloResists${tempID} int outer 0
   /if ( ${maloResists${tempID}}==${resistsTillMala} ) /call Cast "${malaSpell}" ${malaType} 5s CheckPet
   /if ( ${maloResists${tempID}}==${resistsTillQuit} ) {
      /deletevar maloTimer${tempID}
      /declare maloTimer${tempID} int outer -1
      /return
   }
   /call Cast "${malosiniaSpell}" ${malosiniaType} 0 CheckPet
   /if ( !${Defined[maloTimer${tempID}]} ) /declare maloTimer${tempID} timer outer
   /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) {
      /varset maloTimer${tempID} 19m | ${maloDuration}
      /varset maloResists${tempID} 0
   } else /if ( ${Macro.Return.Equal[CAST_OUTOFMANA]} || ${Macro.Return.Equal[CAST_OUTOFRANGE]} || ${Macro.Return.Equal[CAST_CANNOTSEE]} ) {
      /varset maloTimer${tempID} 50     
   } else {
      /if ( ${Macro.Return.Equal[CAST_RESISTED]} ) /varcalc maloResists${tempID} ${maloResists${tempID}}+1
      /varset maloTimer${tempID} 1
   }
/return ${Macro.Return}


Sub CheckBuffs
   /varset deathFlag ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]}
   /if ( ${deathFlag} ) /goto :dead   

   /if ( ${Me.Combat} ) {
      /if ( !${Me.Inventory[mainhand].Name.Equal[${meleeWep}]} && ${FindItem[${meleeWep}].ID} ) /call SwapItem "${meleeWep}" mainhand
   } else {
      /if ( !${Me.Inventory[mainhand].Name.Equal[${normalMainhand}]} && ${FindItem[${normalMainhand}].ID} ) /call SwapItem "${normalMainhand}" mainhand
   }
   /declare i int local
   /declare j int local
   /declare buffText string local
   /declare targetName string local
   /declare spellName2 string local
   /declare spellType string local
   /declare spellRange int local 118
   /declare spellName string local
   /declare buffName string local
   /declare focusList string local Wunshi's Focusing,Focus of Alladnu,Focus of Soul,Talisman of Kragg,Focus of the Seventh,Talisman of Wunshi
   /declare shaman bool local false
   /declare targetType string local

   /if ( !${petID} && ${Me.Pet.ID} ) /varset petID ${Me.Pet.ID}
   /if ( !${petID2} && ${Spawn[${clarityBitch}].Pet.ID} ) /varset petID2 ${Spawn[${clarityBitch}].Pet.ID}
   /if ( !${Me.Pet.ID} && ${usePet} && !${petOff} && ${Me.CurrentMana}>=900 ) /call SumPet


   /if ( ${Me.Hunger}<5000 && ${useFood} ) {
      /declare foodName string local
      /declare oldSlotID int local
      /call GetFoodName
      /varset foodName ${Macro.Return}
      /if ( ${Bool[${foodName}]} ) {
         /varset oldSlotID ${FindItem[${foodName}].InvSlot.ID}
         /call SwapItem "${foodName}" "pack8"
         /nomodkey /itemnotify pack8 rightmouseup
         /if ( ${FindItem[${foodName}].ID} ) /call SwapItem "${foodName}" "${oldSlotID}"
      }
   }
   /if ( ${checkNamed} ) /call CheckNamed


   /if ( !${Me.Buff["Clairvoyance"].ID} && !${Me.Buff["Voice of Clairvoyance"].ID} && ${Spawn[pc ${clarityBitch} radius 100].ID} && !${c6Timer} ) {
      /chat tell ${clarityBitch} c6
      /varset c6Timer 1m
   }
   /if ( ${Cursor.Name.Equal[Rod of Mystical Transvergance]} ) /autoinventory
   /if ( !${FindItem[Rod of Mystical Transvergance].ID} ) /call AddToQueue "rod,${Me.Name}"
   /if ( ${FindItem[Rod of Mystical Transvergance].ID} && !${modRodTimer} && ${Me.PctHPs}>50 && ${Me.PctMana}<=95 ) {
      /call Cast "Rod of Mystical Transvergance" item
      /varset modRodTimer 3100
   }
   /if ( ${useMount} ) {
      /if ( !${Me.Mount.ID} ) /call Cast "${Me.Inventory[ammo].Name}" item
   } else {
      /if ( !${Me.Buff[${elementalType} Elemental Form I].ID} && !${Me.Buff[${elementalType} Elemental Form II].ID} && !${Me.Buff[${elementalType} Elemental Form III].ID} && ${Me.AltAbilityReady[Elemental Form: ${elementalType}]} ) /call Cast "Elemental Form: ${elementalType}" alt
   }
   /if ( ${Me.Pet.ID} ) {
      /if ( !${Me.PetBuff[${petHaste}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petHaste}" gem7 2s
      /if ( !${Me.PetBuff[burnout]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Burnout" gem7 2s
      /if ( !${Me.Buff[${siphonSpell} Recourse].ID} && !${Me.PetBuff[call of the arch mage]} && !${Me.Buff[Mind Wrack Recourse].ID} && ${Me.Pet.ID} && ${Me.Pet.Distance3D}<=100 && ${Me.Book[${siphonSpell}]} ) /call cast "${siphonSpell}" gem8 0 CheckPet
   }
   /if ( !${Me.Buff[${groupDSSpell}].ID} && ${useGroupDS} ) {
      /if ( ${Spawn[pc ${mainAssist}].ID} ) {
         /call AddToQueue "${groupDSSpell},${mainAssist}"
      } else {
         /call AddToQueue "${groupDSSpell},${Me.Name}"
      }
   }
   /if ( !${autoBuff} ) /goto :skip_buffs
   /if ( ${Me.PctHPs}<=${runeHP} ) {
      /if ( ${Me.Book[${runeSpell}]} ) {
         /if ( !${Me.Buff[${runeSpell}].ID} ) /call cast "${runeSpell}" ${runeType} 0 CheckPet
      } else /if ( ${FindItem[${runeSpell}].ID} ) {
         /if ( !${Me.Buff[${FindItem[${runeSpell}].Spell.Name}].ID} ) /call cast "${runeSpell}" ${runeType} 0 CheckPet
      }
   }
   /doevents Indoors
   /call CheckIniBuffs
|   /if ( ${Spawn[pc class shaman].ID} ) {
|      /if ( ${Raid.Members} ) {
|         /if ( ${Spawn[pc guild "${Me.Guild}" shm].ID} ) /varset shaman true
|      } else {
|         /for i 1 to ${Group}
|            /if ( ${Group[${i}].Class.Name.Equal[shaman]} ) /varset shaman true
|         /next i
|     }
|   }
| 
|   /if ( ${shaman} ) {
|      /if ( ${Me.Buff["${shielding}"].ID} ) /call ClickOffBuff "${shielding}"
|   } else {
|      /for i 1 to ${focusList.Length}
|         /if ( ${Me.Buff[${focusList.Arg[${i},,]}].ID} ) /goto :skip_buffs
|      /next i
|      /if ( !${Me.Buff[${shielding}].ID} ) /call AddToQueue "${shielding}"
   }
:skip_buffs
   /if ( ${Target.Name.Equal[${Me.Pet.Name}]} ) {
      /if ( ${Spawn[${oldTarget}].ID} ) {
         /target id ${oldTarget}
      } else {
         /keypress clear_target
      }
   }
   /if ( ${buffQueue.Find[[]} ) {
      /if ( ${buffQueue.Find[[]}>1 ) /varset buffQueue ${buffQueue.Right[-${Math.Calc[${buffQueue.Find[[]}-1]}]}
      /for i 1 to ${buffQueue.Count[[]}
         /varset buffText [${buffQueue.Arg[${i},[]}
         /varset spellName ${buffText.Arg[1,,].Right[-1]}
         /if ( ${spellName.Right[1].Equal["]"]} ) /varset spellName ${spellName.Left[-1]}
         /varset targetName ${buffText.Arg[2,,].Left[-1]}
         /call GetBuffName "${spellName}"
         /varset spellName ${Macro.Return.Arg[1,,]}
         /varset spellType ${Macro.Return.Arg[2,,]}
         /if ( ${spellType.Equal[item]} ) {
            /varset spellName2 ${FindItem[${spellName}].Spell.Name}
         } else {
            /varset spellName2 ${spellName}
         }
         /if ( ${Spell[${spellName2}].TargetType.Equal[Group v2]} ) {
            /varcalc spellRange 1.18*${Spell[${spellName2}].AERange}
         } else {
            /varcalc spellRange 1.18*${Spell[${spellName2}].Range}
         }
         /varset targetType pc
         /if ( !${Spawn[pc ${targetName}].ID} ) /varset targetType pet         
         /if ( ${Bool[${spellName}]} ) {
            /if ( ${Me.CurrentMana}>=${Math.Calc[${Spell[${spellName}].Mana}+${Me.ManaRegen}]} || ${spellType.Equal[item]} || ${spellType.Equal[alt]} ) {
               /if ( !${Bool[${targetName}]} ) {
                  /call Cast "${spellName}" ${spellType} 4s CheckForAdds
               } else /if ( ${Spawn[${targetType} ${targetName}].ID} && ( ${Spawn[pc ${targetName}].Distance3D}<=${spellRange} || !${spellRange} ) ) {
                  /target ${targetType} ${targetName}
                  /call Cast "${spellName}" ${spellType} 4s CheckForAdds
                  /if ( ${Spawn[${oldTarget}].ID} ) {
                     /if ( ${Target.Name.Equal[${targetName}]} ) /target id ${oldTarget}
                  } else {
                     /keypress clear_target
                  }   
               }
               /if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_UNKNOWNSPELL]} || ${Macro.Return.Equal[CAST_NOTARGET]} || ( ${Macro.Return.Equal[CAST_CANCELLED]} && ( !${newAdds} || !${useMez} ) ) ) {
                  /call DeleteFromQueue "${buffText}"
                  /varcalc i ${i}-1
               }
            }
         } else {
            /call DeleteFromQueue "${buffText}"
            /varcalc i ${i}-1
         }
      /next i
   }
   /return
   :dead
   /declare i int local
   /varset mobList
   /varset addList
   /varset buffQueue
   /varset mobID 0
   /varset petID 0
   /varset useAnchor 0
   /squelch alert clear 6
   /call ClearMobList
:wait_for_loot
   /varset deathFlag ${Math.Calc[${Me.MaxHPs}<2000]}
   /if ( ${Spawn[corpse radius 100 ${Me.Name}].ID} && ${deathFlag} ) {
      /target mycorpse
      /call LootCorpse
      /delay 5
      /goto :wait_for_loot
   }
   /if ( ${deathFlag} ) {
      /memspellset ${spellSet}
      /echo You're dead! Consenting and waiting for rez...
      /consent guild
      /delay 25
      /consent raid
      /delay 25
      /consent group
   :wait_for_rez
      /doevents
      /delay 1s
      /if ( !${Window[ConfirmationDialogBox].Open} ) /goto :wait_for_rez
      /delay 18s !${Window[SpellBookWnd].Open}
      /echo Yay a rez!
   :wait_for_rez2
      /delay 1
      /notify ConfirmationDialogBox Yes_Button leftmouseup
      /if ( ${Window[ConfirmationDialogBox].Open} ) /goto :wait_for_rez2
      /delay 5s ${Spawn[corpse radius 100 ${Me.Name}].ID}
      /goto :wait_for_loot
   }
/return

Sub GetBuffName(string spellName)
   /declare i int local
   /declare buffText string local
   /declare spellType string local gem5
   /if ( ${spellName.Equal[rod]} ) {
      /varset spellName ${rodSpell}
      /varset spellType ${rodType}
   }
   /if ( ${spellName.Equal[ds]} ) {
      /varset spellName ${singleDSSpell}
      /varset spellType gem6
   }
   /if ( ${spellName.Equal[coth]} ) /varset spellName Call of the Hero
   /for i 1 to 5
      /if ( ${spellName.Equal[${buffName${i}}]} ) /varset spellType ${buffType${i}}
   /next i
   /if ( ${Int[${Me.Book[${spellName}]}]} || ${AltAbility[${spellName}].ID} || ${FindItem[${spellName}].ID} ) /return ${spellName},${spellType}
/return

Sub SumPet
   /declare i int local
   /if ( ${Me.AltAbilityReady[suspended minion]} ) /call Cast "suspended minion" alt 2s
   /delay 3s ${Me.Pet.ID}
   /if ( !${Me.Pet.ID} ) {
      /call cast "${petSpell}" gem1 5s
      /tar id ${Me.Pet.ID}
      /call SumWeps
      /call Cast "${petShrinkSpell}" ${petShrinkType} 3s
      /call Cast "${petShrinkSpell}" ${petShrinkType} 3s
   }
/return

Sub SumWeps
   /if ( ${Target.Pet.ID} ) /target id ${Target.Pet.ID}
   /if ( !${Target.Type.Equal[pet]} ) /return
   /call Cast "${summonedWepSpell}" ${summonedWepType} 3s
   /call GiveToPet
   /call Cast "${summonedWepSpell}" ${summonedWepType} 3s
   /call GiveToPet
   /call Cast "${summonedBeltSpell}" ${summonedBeltType} 3s
   /call GiveToPet
   /call Cast "${summonedMaskSpell}" ${summonedMaskType} 3s
   /call GiveToPet
/return


Sub GiveToPet
   /declare i int local
   /varset i 1
:give_item
   /delay 5 ${Cursor.ID}
   /if ( ${Cursor.ID} && !${InvSlot[trade4].Item.ID} ) {
      /if ( ${Cursor.Name.Find[summoned:]} ) {
         /click left target
         /delay 1s ${InvSlot[trade${i}].Item.ID}
      } else {
         /autoinventory
      }
      /goto :give_item
   }
   /for i 1 to 4
      /if ( ${InvSlot[trade${i}].Item.ID} && !${InvSlot[trade${i}].Item.Name.Find[summoned:]} ) /notify GiveWnd GVW_Cancel_Button leftmouseup
   /next i
   /if ( ${Window[GiveWnd].Open} ) {
      /notify GiveWnd GVW_Give_Button leftmouseup
      /delay 5s !${Window[GiveWnd].Open}
   }
   /if ( ${Window[InventoryWindow].Open} ) /keypress inventory
/return

Sub Event_RageOn(string line)
   /declare tempID int local ${Target.ID}
   /if ( ${Spawn[${mobID}].ID} ) /varset tempID ${mobID}
   /if ( ${line.Find[${Spawn[${tempID}].DisplayName}]} && ${Me.Pet.ID} ) {
      /echo calling off pet...
      /pet back off
      /pet hold
   }
/return

Sub Event_RageOff(string line)
   /declare tempID int local ${Target.ID}
   /if ( ${Spawn[${mobID}].ID} ) /varset tempID ${mobID}
   /if ( ${line.Find[${Spawn[${tempID}].DisplayName}]} && ${Me.Pet.ID} ) {
      /target id ${tempID}
      /pet attack
   }
/return

Sub Event_Gate(string line)
   /if ( ${line.Find[${Spawn[${mobID}].DisplayName}]} && ${Me.Pet.ID} ) {
      /varset mobID 0
   }
/return

Sub Event_Goto(string line,string destination)
   /declare tempZone string local
   /if ( ${destination.Equal[pok]} ) {
      /call MoveToLoc -1700 428
      /call MoveToLoc -1180 -116
      /call MoveToLoc -274 -860
      /call MoveToLoc -222 -945
      /call MoveToLoc 704 -1324
      /call MoveToLoc 726 -1443
      /call MoveToLoc 772 -1440
      /doortarget poktele500
      /face nolook
      /varset tempZone ${Zone.Name}
      /keypress pitchdown hold
   :wait_for_zone_pok
      /keypress use hold
      /delay 1
      /if ( ${tempZone.Equal[${Zone.Name}]} ) /goto :wait_for_zone_pok
   }
   /if ( ${destination.Equal[wfp]} ) {
      /keypress centerview
      /call MoveToLoc -228 -283
      /call MoveToLoc -452 -236
      /doortarget pokfptport500
      /face nolook
      /keypress use hold
   }
   /if ( ${destination.Equal[ec]} ) {
      /call MoveToLoc -636 152
      /call MoveToLoc -559 195
      /face heading 90
      /keypress forward hold
      /varset tempZone ${Zone.Name}
   :wait_for_zone_ec
      /delay 5
      /if ( ${tempZone.Equal[${Zone.Name}]} ) /goto :wait_for_zone_ec
   }
   /if ( ${destination.Equal[nedaria]} ) {
      /call MoveToLoc -497 -762
      /call MoveToLoc -904 -365
      /call MoveToLoc -1049 844
      /call MoveToLoc -1338 795
      /call MoveToLoc -1662 667
      /call MoveToLoc -1671 276
      /call MoveToLoc -1768 16
      /call MoveToLoc -1617 -182
      /target magus
      /say nedaria
   }
   /if ( ${destination.Equal[natimbi]} ) {
      /call MoveToLoc 1050 1528
      /call MoveToLoc 1023 1529
      /target magus
      /say natimbi
   }
   /if ( ${destination.Equal[kodtaz]} ) {
      /if ( !${Me.Levitating} ) {
         /if ( ${Me.Invis} ) {
            /target clear
            /attack on
            /attack off
         }
         /call Cast "Summon Ring of Flight" gem5 10s
         /delay 5s ${Cursor.ID}
         /autoinv
         /target myself
         /call Cast "Summoned: Ring of Levitation" item
      }
      /if ( !${Me.Invis} ) /call Cast "Veil of Elements" gem5 10s
      /call MoveToLoc 36 -1458
      /call MoveToLoc 1071 -1520
      /call MoveToLoc 989 -447
      /call MoveToLoc 1099 110
      /call MoveToLoc 1029 1266
      /call MoveToLoc 1143 1546
      /doortarget nihobelisk800
      /face nolook loc 1144,1555
      /varset tempZone ${Zone.Name}
      /keypress pitchdown hold
   :wait_for_zone_kodtaz
      /keypress use hold
      /delay 1
      /if ( ${tempZone.Equal[${Zone.Name}]} ) /goto :wait_for_zone_kodtaz
   }
   /if ( ${destination.Equal[kt]} ) {
      /echo goto pok
      /echo goto wfp
      /echo goto ec
      /echo goto nedaria
      /echo goto natimbi
      /echo goto kodtaz
      /doevents Goto
   }
/return

Sub Event_Coth(string line,string sender,string name)
   /if ( !${Defined[name]} ) /declare name string local ${sender}
   /declare i int local
   /declare inGroup bool local false
   /if ( !${Spawn[pc ${name}].ID} ) {
      /if ( ${Spawn[pc ${sender}].ID} ) {
         /varset name ${sender}
      } else {
         /return
      }
   }
   /for i 1 to 5
      /if ( ${Group[${i}].Name.Find[${name}]} ) /varset inGroup true
   /next i
   /if ( ${inGroup} ) {
      /call AddToQueue "coth,${name}"
   } else /if ( ${GroupLeader.ID}==${Me.ID} ) {
      /target pc ${name}
      /keypress invite_follow
      /delay 10s ${Group[1].Name.Equal[${name}]} || ${Group[2].Name.Equal[${name}]} || ${Group[3].Name.Equal[${name}]} || ${Group[4].Name.Equal[${name}]} || ${Group[5].Name.Equal[${name}]}
      /for i 1 to 5
         /if ( ${Group[${i}].Name.Equal[${name}]} ) /varset inGroup true
      /next i
      /if ( ${inGroup} ) /call AddToQueue "coth,${name}"
   }
/return

Sub Event_Timer(string timerName,int timerValue)
   /if ( !${Defined[${timerName}]} ) /return
   /declare tempID int local 0
   /declare oldTargetID int local ${Target.ID}
   /if ( ${timerName.Left[9].Equal[maloTimer]} ) {
      /varset tempID ${timerName.Right[-9]}
      /if ( ${Spawn[${tempID}].Type.Equal[NPC]} ) {
         /target id ${tempID}
         /call Malo
      } else {
         /deletevar ${timerName}
      }
   } else {
      /return ${Macro.Return}
   }
   /if ( ${Target.ID}==${tempID} ) {
      /if ( ${Spawn[${oldTargetID}].ID} ) {
         /target id ${oldTargetID}
      } else {
         /keypress clear_target
      }
   }
/return ${Macro.Return}

Sub Event_PetWeps(string line,string sender)
   /declare tempID int local ${Spawn[pc ${sender}].Pet.ID}
   /if ( !${tempID} || ${Spawn[${tempID}].Distance3D}>250 || !${Spawn[${tempID}].LineOfSight} ) /return
   /target id ${tempID}
   /if ( ${Stick.Status.Length} ) {
      /stick 10
      /delay 5s ${Target.Distance3D}<=10
   } else {
      /declare tempTimer timer local 5s
   :move_to_pet
      /face fast nolook
      /keypress forward hold
      /if ( ${tempTimer} && ${Target.Distance3D}<=20 ) /goto :move_to_pet
      /keypress forward
   }
   /call SumWeps
   /if ( ${Spawn[pc ${followName} radius 150].ID} && ${Stick.Status.Equal[off]} ) {
      /target pc ${followName}
      /stick hold 10
   }
/return

Like i said they seem to work decent just cant get them to mem there spells, Mage use to mem each pet weapon on its own and hand it to the pet. Now it only does it if i have the pet weapons memmed.

Not sure what is wrong was working fine last week, when i was using it.
Wizzy one also use to mem his spells, kinda confused.
 
Uhhh, well, it depends. What were you using to tell those characters to mem/cast the spells? Because looking through the Events, there's *nothing* in those macros that I saw at a quick glance that would do anything like what you're saying.
 
Im not sure im not very good at reading these macro's i can change some things but not very knowledgable on how to write them. The mage one like i said use to mem each pet weapon one at a time and hand it to the pet and mem the next one. If the wrong pet spell was up it would mem the right one. Im not sure, was there another program running with the macros to help the macro do that?
 
Try this for the mage macro:
Rich (BB code):
Sub Event_PetWeps(string line,string sender)
   /declare tempID int local ${Spawn[pc ${sender}].Pet.ID}
   /if ( !${tempID} || ${Spawn[${tempID}].Distance3D}>250 || !${Spawn[${tempID}].LineOfSight} ) /return
   /target id ${tempID}
   /if ( ${Stick.Status.Length} ) {
      /stick 10
      /delay 5s ${Target.Distance3D}<=10
   } else {
      /declare tempTimer timer local 5s
   :move_to_pet
      /face fast nolook
      /keypress forward hold
      /if ( ${tempTimer} && ${Target.Distance3D}<=20 ) /goto :move_to_pet
      /keypress forward
   }
   /target ${sender}
   /call SumWeps
   /if ( ${Spawn[pc ${followName} radius 150].ID} && ${Stick.Status.Equal[off]} ) {
      /target pc ${followName}
      /stick hold 10
   }
/return

What I *think* might have been happening is that in that sub, you were targeting the pet, but in your next sub, stuff got messed up.

Make this change:
Rich (BB code):
Sub SumWeps
   /if ( ${Target.Pet.ID} ) /target id ${Target.Pet.ID}
   /if ( ${Target.Type.NotEqual[pet]} ) /return
   /call Cast "${summonedWepSpell}" ${summonedWepType} 3s
   /call GiveToPet
   /call Cast "${summonedWepSpell}" ${summonedWepType} 3s
   /call GiveToPet
   /call Cast "${summonedBeltSpell}" ${summonedBeltType} 3s
   /call GiveToPet
   /call Cast "${summonedMaskSpell}" ${summonedMaskType} 3s
   /call GiveToPet
/return
 
I use the mage macro quite a bit. If I were to guess what was causing your problem, I would say it may well be with instamem. Have you recently switched over to using the instamem plugin or switched back to not using it after having used it for a while?
 
Yes i did recently start using the plugin instamem, you think that will cause this to happen?

I will give it a try.

Thanks

That was it, I would have never figured that out. I unloaded the plugin and now macro is meming the spells agian.


Thanks again

Thez and Siddin for your helpful replys
 
I have had no problems with instamem until I recently upgraded a spell to Rk II. Now, for the life of me, I cannot get instamem to memspell it. I tried the quotes, used 'Rk. II' and 'Rank II' - nothing. This is with single memspells, not the sets.
 
not meming spells

Users who are viewing this thread

Back
Top