Code: Select all
|** arch.mac Auto-Archery
Version 2.6 24 Sep 2005
by loadingpleasewait , updated by NeXuS With the help of a few people**|
#chat group
#chat tell
#include Spell_Routines.inc
#turbo 40
#Event exp "#*#experience!#*#"
#Event reroot "#*#Roots spell has worn off#*#"
#Event Casting "#*#You begin casting#*#"
#Event Death "You died#*#"
#Event Death "You have been slain by #*#!"
#Event Zoned "You have entered#*#"
#Event EarthCall "#*#slowed by the embracing earth#*#"
#Event GotHit "#*#YOU, but#*#"
#Event GotHit "#*#YOU for #*#"
#Event Enraged "#*#|${Target.CleanName}| has become ENRAGED#*#"
#Event NLEnraged "#*#|${Target.CleanName}| is no longer enraged#*#"
#Event SetForage "[MQ2] SetForage#*#"
#Event SetSelfBuff "[MQ2] SetSelfBuff#*#"
#Event SetSnare "[MQ2] SetSnare#*#"
#Event SetTaunt "[MQ2] SetTaunt#*#"
#Event SetVerbose "[MQ2] SetVerbose#*#"
#Event SetRoot "[MQ2] SetRoot#*#"
#Event SetAutoAssist "[MQ2] SetAutoAssist#*#"
#Event SetAssistDistance "[MQ2] SetAssistDistance#*#"
#Event SetTankName "[MQ2] SetTankName#*#"
#Event AddSelfBuff "[MQ2] AddSelfBuff#*#"
#Event RemSelfBuff "[MQ2] RemSelfBuff#*#"
#Event DisplayHelp "[MQ2] DisplayHelp#*#"
#Event ArchStatus "[MQ2] ArchStatus#*#"
#Event SetNoArch "[MQ2] SetNoArch#*#"
#Event SetTargetSpells "[MQ2] SetTSpells#*#"
#Event LootMyCorpse "[MQ2] LootMyCorpse#*#"
#Event Harmony "[MQ2] DoHarmony#*#"
#Event AutoJolt "[MQ2] SetJolt#*#"
#Event PatchHeal "[MQ2] SetPatchHeal#*#"
#Event HealPct "[MQ2] SetHealPct#*#"
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"
#Event StopFight "[MQ2] StopFighting!#*#"
#Event SetDD1 "[MQ2] SetDD1#*#"
#Event SetDD2 "[MQ2] SetDD2#*#"
#Event SetUseepic "[MQ2] Setuseepic#*#"
Sub Main
/echo Auto-Arch Macro Loading.
/declare j int outer
/declare g int outer
/declare Version outer 0
/declare autoassist bool outer FALSE
/declare noInvis int outer 1
/declare tankname string outer "Unknown"
/declare assistdistance outer 60
/declare healgrouppct outer 25
/declare PctToAssist outer 95
/declare noarch bool outer FALSE
/declare verbose bool outer FALSE
/declare targetspells bool outer FALSE
/declare foragetoggle bool outer FALSE
/declare waitforage bool outer FALSE
/declare invset outer 0
/declare notset outer -1
/declare sitstatus bool outer FALSE
/declare snaretoggle bool outer FALSE
/declare taunttoggle bool outer FALSE
/declare roottoggle bool outer FALSE
/declare needsnare outer 0
/declare immunetosnare bool outer FALSE
/declare LDExp float outer ${Me.PctGroupLeaderExp}
/declare AAExp float outer ${Me.PctAAExp}
/declare Exp float outer ${Me.PctExp}
/declare battle bool outer FALSE
/declare selfbuff bool outer FALSE
/declare autojolt bool outer FALSE
/declare diedBeforeZone bool outer FALSE
/declare useMU bool outer FALSE
/declare stickonnoarch bool outer FALSE
/declare rangerslowed bool outer FALSE
/declare leaveSlot string outer
/declare patchheal bool outer FALSE
/declare Healspell string outer "none"
/declare spellname string outer "none"
/declare triggername string outer "none"
/declare rootspell string outer "Earthen Roots"
/declare snarespell string outer "Ensnare"
/declare joltspell string outer "Cinder Jolt"
/declare targetarray[4] string outer
/declare ialias string outer None
/declare doIclick bool outer FALSE
/declare bouncenum int outer 1
/declare ibounce string outer None
/declare itemspellname string outer None
/declare isEnraged bool outer FALSE
/declare dd1 bool outer FALSE
/declare dd2 bool outer FALSE
/declare needdd1 bool outer TRUE
/declare needdd2 bool outer TRUE
/declare ddspell1 string outer "none"
/declare ddspell2 string outer "none"
/declare dir int outer
/declare behindTarget bool outer FALSE
/declare stopfighting bool outer FALSE
/declare eqassistonoff bool outer TRUE
/declare EpicReady timer outer
/declare Epic outer "Heartwood Blade"
/declare Useepictoggle bool outer FALSE
/if (${Ini[ArchSettings.ini,Version,ArchMacVersion].NotEqual[NULL]}) /varset Version ${Ini[ArchSettings.ini,Version,ArchMacVersion]}
/if (${Stick.Status.Length}) {
/varset useMU TRUE
/echo ** MQ2MoveUtils FOUND AutoMovement AVAILABLE)
} else {
/varset useMU FALSE
/echo ** MQ2MoveUtils NOT FOUND AutoMovement UNAVAILABLE
}
/if (!${Version.Equal[2.6]}) {
/echo Loading Aliases
/delay 1s
/squelch /alias /setforage /echo SetForage
/squelch /alias /setselfbuff /echo SetSelfBuff
/squelch /alias /setsnare /echo SetSnare
/squelch /alias /settaunt /echo SetTaunt
/squelch /alias /setverbose /echo SetVerbose
/squelch /alias /setroot /echo SetRoot
/squelch /alias /setnoarch /echo SetNoArch
/squelch /alias /setautoassist /echo SetAutoAssist
/squelch /alias /setassistdistance /echo SetAssistDistance
/squelch /alias /settankname /echo SetTankName
/squelch /alias /addselfbuff /echo AddSelfBuff
/squelch /alias /remselfbuff /echo RemSelfBuff
/squelch /alias /archhelp /echo DisplayHelp
/squelch /alias /archstatus /echo ArchStatus
/squelch /alias /lootmycorpse /echo LootMyCorpse
/squelch /alias /settspells /echo SetTSpells
/squelch /alias /harmony /echo DoHarmony
/squelch /alias /setjolt /echo SetJolt
/squelch /alias /setpatchheal /echo SetPatchHeal
/squelch /alias /sethealpct /echo SetHealPct
/squelch /alias /iset /echo ItemSet
/squelch /alias /ibounce /echo ItemBounce
/squelch /alias /iclick /echo ItemCast
/squelch /alias /stopfight /echo StopFighting!
/squelch /alias /setdd1 /echo SetDD1
/squelch /alias /setdd2 /echo SetDD2
/squelch /alias /setuseepic /echo Setuseepic
/echo Aliases Loaded, play on!
} else {
/echo Aliases Up To Date, Finished Loading
}
/echo Type /ArchHelp for assistance
/ini "ArchSettings.ini" "Version" "ArchMacVersion" "2.6"
/if (${Ini[ArchSettings.ini,General,HealSpell].NotEqual[NULL]}) /varset Healspell ${Ini[ArchSettings.ini,General,HealSpell]}
/if (${Ini[ArchSettings.ini,General,PatchHeal].NotEqual[NULL]}) /varset patchheal ${Ini[ArchSettings.ini,General,PatchHeal]}
/if (${Ini[ArchSettings.ini,General,JoltSpell].NotEqual[NULL]}) /varset joltspell ${Ini[ArchSettings.ini,General,JoltSpell]}
/if (${Ini[ArchSettings.ini,General,AutoJolt].NotEqual[NULL]}) /varset autojolt ${Ini[ArchSettings.ini,General,AutoJolt]}
/if (${Ini[ArchSettings.ini,General,RootSpell].NotEqual[NULL]}) /varset rootspell ${Ini[ArchSettings.ini,General,RootSpell]}
/if (${Ini[ArchSettings.ini,General,SnareSpell].NotEqual[NULL]}) /varset snarespell ${Ini[ArchSettings.ini,General,SnareSpell]}
/if (${Ini[ArchSettings.ini,General,AutoTaunt].NotEqual[NULL]}) /varset taunttoggle ${Ini[ArchSettings.ini,General,AutoTaunt]}
/if (${Ini[ArchSettings.ini,General,AutoForage].NotEqual[NULL]}) /varset foragetoggle ${Ini[ArchSettings.ini,General,AutoForage]}
/if (${Ini[ArchSettings.ini,General,AutoReRoot].NotEqual[NULL]}) /varset roottoggle ${Ini[ArchSettings.ini,General,AutoReRoot]}
/if (${Ini[ArchSettings.ini,General,Verbosity].NotEqual[NULL]}) /varset verbose ${Ini[ArchSettings.ini,General,Verbosity]}
/if (${Ini[ArchSettings.ini,General,NoArchery].NotEqual[NULL]}) /varset noarch ${Ini[ArchSettings.ini,General,NoArchery]}
/if (${Ini[ArchSettings.ini,General,StickOnNoArchery].NotEqual[NULL]}) /varset stickonnoarch ${Ini[ArchSettings.ini,General,StickOnNoArchery]}
/if (${Ini[ArchSettings.ini,General,SelfBuffing].NotEqual[NULL]}) /varset selfbuff ${Ini[ArchSettings.ini,General,SelfBuffing]}
/if (${Ini[ArchSettings.ini,General,TargetSpells].NotEqual[NULL]}) /varset targetspells ${Ini[ArchSettings.ini,General,TargetSpells]}
/if (${Ini[ArchSettings.ini,General,AutoAssist].NotEqual[NULL]}) /varset autoassist ${Ini[ArchSettings.ini,General,AutoAssist]}
/if (${Ini[ArchSettings.ini,General,TankToAssist].NotEqual[NULL]}) /varset tankname ${Ini[ArchSettings.ini,General,TankToAssist]}
/if (${Ini[ArchSettings.ini,General,AssistDistance].NotEqual[NULL]}) /varset assistdistance ${Ini[ArchSettings.ini,General,AssistDistance]}
/if (${Ini[ArchSettings.ini,General,PctHPsToAssist].NotEqual[NULL]}) /varset PctToAssist ${Ini[ArchSettings.ini,General,PctHPsToAssist]}
/if (${Ini[ArchSettings.ini,General,HealPct].NotEqual[NULL]}) /varset healgrouppct ${Ini[ArchSettings.ini,General,HealPct]}
/if (${Ini[ArchSettings.ini,General,EQAssistOnOff].NotEqual[NULL]}) /varset eqassistonoff ${Ini[ArchSettings.ini,General,EQAssistOnOff]}
/if (${Ini[ArchSettings.ini,General,AutoSnare].NotEqual[NULL]}) /varset snaretoggle ${Ini[ArchSettings.ini,General,AutoSnare]}
/if (${Ini[ArchSettings.ini,General,DDSpell1].NotEqual[NULL]}) /varset ddspell1 ${Ini[ArchSettings.ini,General,DDSpell1]}
/if (${Ini[ArchSettings.ini,General,AutoDD1].NotEqual[NULL]}) /varset dd1 ${Ini[ArchSettings.ini,General,AutoDD1]}
/if (${Ini[ArchSettings.ini,General,DDSpell2].NotEqual[NULL]}) /varset ddspell2 ${Ini[ArchSettings.ini,General,DDSpell2]}
/if (${Ini[ArchSettings.ini,General,AutoDD2].NotEqual[NULL]}) /varset dd2 ${Ini[ArchSettings.ini,General,AutoDD2]}
/if (${Ini[ArchSettings.ini,General,Useepic].NotEqual[NULL]}) /varset Useepictoggle ${Ini[ArchSettings.ini,General,Useepic]}
/if (${snaretoggle}) {
/varset needsnare 1
/varset immunetosnare FALSE
}
/for j 0 to 7
/if (${Defined[Param${j}]}) {
/if (${Param${j}.Equal[snare]}) {
/echo "Auto-Snare enabled"
/varset snaretoggle TRUE
/varset needsnare 1
/varset immunetosnare FALSE
/ini "ArchSettings.ini" "General" "AutoSnare" "${snaretoggle}"
}
/if (${Param${j}.Equal[taunt]}) {
/echo "Auto-Taunt enabled"
/varset taunttoggle TRUE
/ini "ArchSettings.ini" "General" "AutoTaunt" "${taunttoggle}"
}
/if (${Param${j}.Equal[forage]}) {
/echo "Auto-Forage enabled"
/varset foragetoggle TRUE
/ini "ArchSettings.ini" "General" "AutoForage" "${foragetoggle}"
}
/if (${Param${j}.Equal[root]}) {
/echo "Auto-ReRoot enabled"
/varset roottoggle TRUE
/ini "ArchSettings.ini" "General" "AutoReRoot" "${roottoggle}"
}
/if (${Param${j}.Equal[verbose]}) {
/echo "Group Anounce enabled"
/varset verbose TRUE
/ini "ArchSettings.ini" "General" "Verbosity" "${verbose}"
}
/if (${Param${j}.Equal[noarch]}) {
/echo "Auto-Arch macro will not Auto-Arch.. go figure?!?"
/varset noarch TRUE
/ini "ArchSettings.ini" "General" "NoArchery" "${noarch}"
}
/if (${Param${j}.Equal[selfbuff]}) {
/echo "SelfBuffing enabled"
/varset selfbuff TRUE
/ini "ArchSettings.ini" "General" "SelfBuffing" "${selfbuff}"
}
/if (${Param${j}.Equal[Useepic]}) {
/echo "Useepic enabled"
/varset Useepictoggle TRUE
/ini "ArchSettings.ini" "General" "Useepic" "${Useepictoggle}"
}
/if (${Param${j}.Equal[autoassist]}) {
/echo "Auto-Assist enabled"
/if (${eqassistonoff}) /assist on
/varset autoassist TRUE
/ini "ArchSettings.ini" "General" "AutoAssist" "${autoassist}"
/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) {
/echo You need to target your assist, and make sure its a player character!
/endmacro
} else {
/varset tankname ${Target.CleanName}
/ini "ArchSettings.ini" "General" "TankToAssist" "${tankname}"
/echo Assist set to ${tankname}
/if (${eqassistonoff}) /assist off
/ini "ArchSettings.ini" "General" "AssistDistance" "${assistdistance}"
}
}
}
/next j
/if (!${Ini[ArchSettings.ini,SelfBuffs,SelfBuff1].Length}) {
/for j 1 to 10
/ini "ArchSettings.ini" "SelfBuffs" "SelfBuff${j}" "NoBuffListed"
/next j
}
/if (!${Ini[ArchSettings.ini,TargetBuffs,TargetBuff1].Length}) {
/for j 1 to 8
/ini "ArchSettings.ini" "TargetBuffs" "TBuffTriggerWord${j}" "NoTriggerListed"
/ini "ArchSettings.ini" "TargetBuffs" "TargetBuff${j}" "NoBuffListed"
/next j
}
/if (!${Ini[ArchSettings.ini,AssistSpells,AssistSpell1].Length}) {
/for j 1 to 8
/ini "ArchSettings.ini" "AssistSpells" "ASpellTriggerWord${j}" "NoTriggerListed"
/ini "ArchSettings.ini" "AssistSpells" "AssistSpell${j}" "NoSpellListed"
/next j
}
/if (${autojolt}) /memspell 5 "${joltspell}"
/if (${patchheal}) /memspell 8 "${Healspell}"
:mainloop
/if (${patchheal}) /call healer
/if (${autoassist}) {
/assist ${tankname}
/if (${Target.Type.NotEqual[PC]} && ${Target.Distance}<${assistdistance} && !${Target.Type.Equal[Corpse]} && !${Target.Type.Equal[PET]} && ${Target.PctHPs}<${PctToAssist}) {
/if (${Me.Sitting}) {
/stand
/varset sitstatus TRUE
}
/call Archery
}
/delay 5
}
/if (${Me.Combat} && ${Target.ID} && ${Target.CleanName.NotEqual[${Me.Name}]}) /call Archery
/if ((${foragetoggle}) && (${Me.AbilityReady[Forage]})) /call forage
/doevents
/if (${selfbuff} && !${Me.Invis}) /call LazyRanger
|- If we're not hiding or moving, check clicky maintained spells
/if (${Me.Moving} || ${clicktimer} || ${Me.Invis}) /goto :DoneItemChecks
/varset j 1
:ItemCheckLoop
/varset ialias ${Ini[ArchSettings.ini].Arg[${j},|]}
/if (${ialias.NotEqual[NULL]}) {
|- Obtained an itemalias from the ArchSettings.ini file
|- We supposed to keep this spell up?
/if (${Ini[ArchSettings.ini,${ialias},KeepUp].Equal[FALSE]}) /goto :NextItem
|- Scan the item's bounce list for the active bouncers
/varset bouncenum 1
/varset doIclick TRUE
:BounceCheckLoop
/varset ibounce ${Ini[ArchSettings.ini,${ialias},BounceOff${bouncenum}]}
/if (${ibounce.NotEqual[NULL]}) {
/if (${ibounce.Equal[${Me.Buff[${ibounce}]}]}) /varset doIclick FALSE
} else /goto :DoneBounceChecks
/varcalc bouncenum ${bouncenum}+1
/goto :BounceCheckLoop
:DoneBounceChecks
|- By now we won't click the item if a bouncer spell is on us
|- Just have to check to see if the existing buff is on too
/varset itemspellname ${FindItem[${Ini[ArchSettings.ini,${ialias},FullName]}].Spell}
/if (${itemspellname.Equal[${Me.Buff[${itemspellname}]}]}) /varset doIclick FALSE
|- Finally, do it if we should
/if (${doIclick}) /docommand /iclick ${ialias}
|- Did we fail to find that previous item? (i.e. Dead and naked at bind point!)
/if (${clicktimer}) /goto :DoneItemChecks
:NextItem
/varcalc j ${j}+1
} else /goto :DoneItemChecks
/goto :ItemCheckLoop
:DoneItemChecks
/goto :mainloop
/return
Sub Archery
/attack off
/varset battle TRUE
/varset targetarray[1] ${Target.CleanName}
/varset targetarray[2] ${Target.Level}
/varset targetarray[3] ${Target.Name}
/varset targetarray[4] ${Target.ID}
/echo Fighting a ${targetarray[2]} ${targetarray[1]}
/face nolook
:CloserAF
/if (${Me.Combat}) /attack off
/if (${Target.Distance}>30 && ${Me.RangedReady} && !${noarch} && ${Target.LineOfSight} && ${Target.Animation}!=32 && ${Target.Animation}!=110) /ranged
/if (${noarch} && ${useMU} && ${stickonnoarch} && ${Stick.Status.Equal[OFF]}) {
/if (${Me.Underwater}) {
/squelch /stick 10 behind uw
} else {
/squelch /stick 10 behind
}
}
/if (${dd1}) /call DD1
/if (${dd2}) /call DD2
/if (${patchheal}) /call healer
/if (${foragetoggle} && ${Me.AbilityReady[Forage]}) /call forage
/if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.PctHPs}>1 && ${Target.Distance}<150 && !${Target.LineOfSight}) /popup Can't Snare, Need Line Of SIGHT!!
/if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.PctHPs}>1 && ${Target.Distance}<150 && ${Target.LineOfSight}) {
/Popup Attempting To Snare ${Target.CleanName}...
/if (${snarespell.Equal[Entrap]}) {
/call Cast "Entrap" Alt
} else {
/call Cast ${snarespell} gem4 10s
}
/delay 5
/doevents
/if (${castReturn.Equal[CAST_IMMUNE]}) {
/varset needsnare 0
/varset immunetosnare TRUE
/popup Immune To Snare!
/if (${verbose}) /gsay %t is Immune to snare
}
/if (${castReturn.Equal[CAST_RESISTED]}) {
/varset needsnare 1
/popup Snare Resisted!
}
/if (${castReturn.Equal[CAST_SUCCESS]} && !${immunetosnare}) {
/if (${verbose}) /gsay %t has been snared
/varset needsnare 0
/popup Snare Success!!
}
/if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}>150) {
} /popup "Too Far Away For Auto-Snare, GET CLOSER!!"
/delay 2
}
/doevents
/if (${Target.Distance}<15) /call closecombat
/if (${Target.ID}!=${targetarray[4]}) /goto :EndAF
/doevents
/if (!${Target.ID}) /goto :EndAF
/doevents
/if (${stopfighting}) /goto :StopFight
| /if (${selfbuff}) /call LazyRanger
/goto :CloserAF
:EndAF
/echo a ${targetarray[2]} ${targetarray[1]} is dead
:StopFight
/if (${stopfighting}) {
/varset stopfighting FALSE
/Popup AutoArch/Attack on ${targetarray[1]} is now OFF
/if (${useMU}) /stick off
/attack off
/varset autoassist FALSE
/echo AutoAssist is now OFF!!
}
/if (${snaretoggle}) {
/varset needsnare 1
/varset immunetosnare FALSE
}
/keypress Num_5
/if (${sitstatus}) {
/sit
/varset sitstatus FALSE
}
/if (${dd1}) /varset needdd1 TRUE
/if (${dd2}) /varset needdd2 TRUE
/varset battle FALSE
/if (${noarch} && ${useMU} && ${stickonnoarch} && ${Stick.Status.Equal[ON]}) /stick off
/varset rangerslowed FALSE
/varset isEnraged FALSE
/return
Sub closecombat
/popup Within Melee Range! CloseCombat Initiated!!
/attack on
:stillclose
/if (${foragetoggle} && ${Me.AbilityReady[Forage]}) {
/attack off
/delay 5
/call forage
/attack on
}
/if (${dd1}) /call DD1
/if (${dd2}) /call DD2
/if (${patchheal}) /call healer
/if (${Useepictoggle} !${EpicReady}) /call Useepic
/if (${Target.Distance}<${Target.MaxRangeTo} && ${Me.AbilityReady["Disarm"]}) /doability "Disarm"
/if (${Target.Distance}<${Target.MaxRangeTo} && ${Me.AbilityReady["Kick"]}) /doability "Kick"
/if (${taunttoggle} && ${Target.Distance}<${Target.MaxRangeTo} && ${Me.AbilityReady["Taunt"]}) /doability "Taunt"
/doevents
/if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}<150 && !${Target.LineOfSight}) /popup Can't Snare, Need Line Of SIGHT!!
/if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}<150 && ${Target.LineOfSight}) {
/Popup Attempting To Snare ${Target.CleanName}...
/if (${snarespell.Equal[Entrap]}) {
/if (!${Me.AltAbilityReady[entrap]}) /goto :waitforentrap
/call Cast "Entrap" Alt
} else {
/call Cast ${snarespell} gem4 10s
}
/delay 5
/doevents
/if (${castReturn.Equal[CAST_IMMUNE]}) {
/varset needsnare 0
/varset immunetosnare TRUE
/popup Immune To Snare!
/if (${verbose}) /gsay %t is Immune to snare
}
/if (${castReturn.Equal[CAST_RESISTED]}) {
/varset needsnare 1
/popup Snare Resisted!
}
/if (${castReturn.Equal[CAST_SUCCESS]} && !${immunetosnare}) {
/if (${verbose}) /gsay %t has been snared
/varset needsnare 0
/popup Snare Success!!
}
/if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}>150) {
/popup "Too Far Away For Auto-Snare, GET CLOSER!!"
/delay 2
}
}
:waitforentrap
/if (${isEnraged} && ${Target.ID} && !${Me.Combat}) {
/call Check_Behind
/varset behindTarget ${Macro.Return}
/if (${Target.ID} && ${behindTarget}) {
/attack on
/echo ** Attack re-started (No Enrage Risk): ${Target.CleanName}
}
}
/if (${isEnraged} && ${Target.ID}) {
/call Check_Behind
/varset behindTarget ${Macro.Return}
/if (${Target.ID} && !${behindTarget}) {
/attack off
/echo ** Attack ceased (Enrage Risk): ${Target.CleanName}
}
}
/if (${stopfighting}) {
/attack off
/return
}
/if (${Target.Distance}<${Target.MaxRangeTo} && ${Target.ID} && ${Target.ID}==${targetarray[4]} && ${Target.CleanName.NotEqual[${Me.Name}]}) /goto :stillclose
/attack off
/return
Sub DD1
/if (${needdd1} && ${Target.PctHPs}<70 && ${Target.LineOfSight} && ${Target.Animation}!=32) {
/call cast "${ddspell1}" gem1 5s
/varset needdd1 FALSE
}
/return
Sub Useepic
/if (${Useepictoggle} && !${EpicReady}) /call cast ${Epic} item
}
/varset EpicReady 360s
}
/return
Sub Event_SetUseepic(string Line)
/if (${Useepictoggle}) {
/varset Useepictoggle FALSE
/echo ** Useepic is now OFF!
} else {
/varset Useepictoggle TRUE
/echo ** Useepic is now ON!
}
}
/ini "ArchSettings.ini" "General" "Useepic" "${Useepictoggle}"
/return
Sub Event_SetDD1(string Line)
/if (${Line.Arg[3].Length}) {
/varset ddspell1 ${Line.Arg[3]}
/ini "ArchSettings.ini" "General" "DDSpell1" "${ddspell1}"
} else {
/if (${dd1}) {
/varset dd1 FALSE
/echo ** Auto-DD @70% is now OFF!
} else {
/varset dd1 TRUE
/echo ** Auto-DD @70% is now ON!
}
}
/echo ** DDSpell #1 == ${ddspell1}
/ini "ArchSettings.ini" "General" "AutoDD1" "${dd1}"
/return
Sub DD2
/if (${needdd2} && ${Target.PctHPs}<30 && ${Target.LineOfSight} && ${Target.Animation}!=32) {
/call cast "${ddspell2}" gem3 5s
/varset needdd2 FALSE
}
/return
Sub Event_SetDD2(string Line)
/if (${Line.Arg[3].Length}) {
/varset ddspell2 ${Line.Arg[3]}
/ini "ArchSettings.ini" "General" "DDSpell2" "${ddspell2}"
} else {
/if (${dd2}) {
/varset dd2 FALSE
/echo ** Auto-DD @30% is now OFF!
} else {
/varset dd2 TRUE
/echo ** Auto-DD @30% is now ON!
}
}
/echo ** DDSpell #2 == ${ddspell2}
/ini "ArchSettings.ini" "General" "AutoDD2" "${dd2}"
/return
Sub Check_Behind
/declare behindIt FALSE
|- Are we behind our target?
/for j -1 to 1
/varcalc dir (${Target.Heading.Clock}+${j})%12
/if (${dir}<1) /varcalc dir ${dir}+12
/if (${dir}>12) /varcalc dir ${dir}-12
/if (${dir} == ${Me.Heading.Clock}) /varset behindIt TRUE
/next j
/return ${behindIt}
Sub Event_exp
/echo ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
/popup ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%)
/varset LDExp ${Me.PctGroupLeaderExp}
/varset AAExp ${Me.PctAAExp}
/varset Exp ${Me.PctExp}
/return
Sub event_reroot
/if (${roottoggle}) {
/target npc ${targetarray[3]}
:tryagain
/call Cast "${rootspell}" gem2 10s
/doevents
/if (${castReturn}.Equal[CAST_RESIST]) /goto :tryagain
}
/return
sub event_GotHit
/if (${autojolt} && ${Me.SpellReady[${joltspell}]}) {
/popup Agro Detected, Casting Jolt!
/call cast "${joltspell}" gem5 5s
}
/if (${noarch} && ${useMU} && ${stickonnoarch} && ${Stick.MoveBehind}) {
/if (${Me.Underwater}) {
/squelch /stick 10 uw
} else {
/squelch /stick 10
}
}
/return
sub Event_Casting
:checkcast
/delay 1
/if (${Me.Casting.ID}) /goto :checkcast
/return
sub forage
/delay 3
/if (${Me.Sitting}) {
/stand
/varset sitstatus TRUE
}
/if (${Me.Ducking}) /stand
:WaitLoop
/if (${Me.Casting.ID}) {
/delay 1
/goto :WaitLoop
} else {
/doability Forage
/doevents
}
/call destroyornot
/if (${sitstatus}) {
/sit
/varset sitstatus FALSE
}
/return
sub Event_waitforage
/if (${foragetoggle}) /varset waitforage TRUE
/return
sub destroyornot
:Keep
/delay 5
/if (!${Cursor.ID}) /return
/varset invset ${Ini[ArchSettings.ini,ForageList,${Cursor.Name},${notset}]}
/if (${invset}==${notset}) {
/ini "ArchSettings.ini" "ForageList" "${Cursor.Name}" "1"
/varset invset 1
}
/if (${invset}==1) {
/echo Found ${Math.Calc[${FindItemCount[${Cursor.Name}]}+1].Int} ${Cursor.Name}'s so far!
/popup Found ${Math.Calc[${FindItemCount[${Cursor.Name}]}+1].Int} ${Cursor.Name}'s so far!
/mqlog Found ${Math.Calc[${FindItemCount[${Cursor.Name}]}+1].Int} ${Cursor.Name}'s so far!
/autoinv
/if (${Cursor.ID}) /goto :Keep
} else {
/popup "${Cursor.Name} Destroyed!"
/mqlog "${Cursor.Name} Destroyed!"
/destroy
/if (${Cursor.ID}) /goto :Keep
}
/return
Sub Wait4Rez
/echo Now Waiting for rez, Will auto accept and loot all items!
:waitforrez
/if (!${Window[ConfirmationDialogBox].Open}) {
/delay 5s ${Window[ConfirmationDialogBox].Open}
/goto :waitforrez
}
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
:zonein
/delay 5
/squelch /target mycorpse
/delay 5
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein
/if (${Target.CleanName.Equal[${Me}'s corpse]}) {
/delay 3s
/call Loot_Corpse
} else /goto :zonein
/return
Sub Loot_Corpse
/declare LootTotal int local 0
/declare LootSlot int local
/squelch /target mycorpse
/if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) {
/echo ** Can't target my corpse.
/return
}
/corpse
/delay 1s
/loot
/delay 3s
/if (${Me.State.NotEqual[BIND]}) {
/echo ** Massive lag right now... Aborting looting.
/return
}
:LootLag
/if (${LootTotal}!=${Corpse.Items}) {
/varset LootTotal ${Corpse.Items}
/delay 5
/goto :LootLag
}
/for LootSlot 1 to ${LootTotal}
:LootItem
/itemnotify loot${LootSlot} rightmouseup
/delay 3
/if (${Corpse.Item[${LootSlot}].ID}) {
/delay 2
/goto :LootItem
}
/next LootSlot
/delay 5
/echo ** Done looting my corpse.
/notify LootWnd DoneButton leftmouseup
/return
Sub Event_SetForage
/if (${foragetoggle}) {
/varset foragetoggle FALSE
/echo ** Auto-Forage is now OFF!
} else {
/varset foragetoggle TRUE
/echo ** Auto-Forage is now ON!
}
/ini "ArchSettings.ini" "General" "AutoForage" "${foragetoggle}"
/return
Sub Event_SetSelfBuff
/if (${selfbuff}) {
/varset selfbuff FALSE
/echo ** Self Buffing is now OFF!
} else {
/varset selfbuff TRUE
/echo ** Self Buffing is now ON!
}
/ini "ArchSettings.ini" "General" "SelfBuffing" "${selfbuff}"
/return
Sub Event_SetSnare(string Line)
/if (${Line.Arg[3].Length}) {
/varset snarespell ${Line.Arg[3]}
/ini "ArchSettings.ini" "General" "SnareSpell" "${snarespell}"
} else {
/if (${snaretoggle}) {
/varset snaretoggle FALSE
/echo ** Auto-Snare is now OFF!
} else {
/varset snaretoggle TRUE
/echo ** Auto-Snare is now ON!
}
}
/echo ** SnareSpell == ${snarespell}
/ini "ArchSettings.ini" "General" "AutoSnare" "${snaretoggle}"
/return
Sub Event_AutoJolt(string Line)
/if (${Line.Arg[3].Length}) {
/varset joltspell ${Line.Arg[3]}
/ini "ArchSettings.ini" "General" "JoltSpell" "${joltspell}"
} else {
/if (${autojolt}) {
/varset autojolt FALSE
/echo ** Auto-Jolt is now OFF!
} else {
/varset autojolt TRUE
/echo ** Auto-Jolt is now ON!
/memspell 5 "${joltspell}"
}
}
/echo ** JoltSpell == ${joltspell}
/ini "ArchSettings.ini" "General" "AutoJolt" "${autojolt}"
/return
Sub Event_SetTaunt
/if (${taunttoggle}) {
/varset taunttoggle FALSE
/echo ** Auto-Taunt is now OFF!
} else {
/varset taunttoggle TRUE
/echo ** Auto-Taunt is now ON!
}
/ini "ArchSettings.ini" "General" "AutoTaunt" "${taunttoggle}"
/return
Sub Event_SetVerbose
/if (${verbose}) {
/varset verbose FALSE
/echo ** Verbosity is now OFF!
} else {
/varset verbose TRUE
/echo ** Verbosity is now ON!
}
/ini "ArchSettings.ini" "General" "Verbosity" "${verbose}"
/return
Sub Event_SetNoArch(string Line)
/if (${Line.Arg[3].Equal[stick]}) {
/if (!${useMU}) {
/echo Sorry, MQ2MoveUtils UNAVAILABLE, go get the plugin!!
} else {
/if (${stickonnoarch}) {
/varset stickonnoarch FALSE
/echo ** /stick on NoArch Melee is now OFF!
} else {
/varset stickonnoarch TRUE
/echo ** /stick on NoArch Melee is now ON!
}
}
} else {
/if (${noarch}) {
/varset noarch FALSE
/echo ** Archery is now ON!
} else {
/varset noarch TRUE
/echo ** Archery is now OFF!
}
}
/ini "ArchSettings.ini" "General" "NoArchery" "${noarch}"
/ini "ArchSettings.ini" "General" "StickOnNoArchery" "${stickonnoarch}"
/return
Sub Event_SetRoot(string Line)
/if (${Line.Arg[3].Length}) {
/varset rootspell ${Line.Arg[3]}
/ini "ArchSettings.ini" "General" "RootSpell" "${rootspell}"
} else {
/if (${roottoggle}) {
/varset roottoggle FALSE
/echo ** Auto-ReRoot is now OFF!
} else {
/varset roottoggle TRUE
/echo ** Auto-ReRoot is now ON!
}
}
/echo ** RootSpell == ${rootspell}
/ini "ArchSettings.ini" "General" "AutoReRoot" "${roottoggle}"
/return
Sub Event_SetAutoAssist(string Line)
/if (${Line.Arg[3].Length}) {
/varset PctToAssist ${Line.Arg[3]}
/echo ** HP% to Assist = ${PctToAssist}
/ini "ArchSettings.ini" "General" "PctHPsToAssist" "${PctToAssist}"
} else {
/if (${autoassist}) {
/varset autoassist FALSE
/echo ** AutoAssist is now OFF!
/if (${eqassistonoff}) /squelch /assist on
} else {
/varset autoassist TRUE
/echo ** AutoAssist is now ON!
/if (${eqassistonoff}) /squelch /assist off
}
}
/ini "ArchSettings.ini" "General" "AutoAssist" "${autoassist}"
/return
Sub Event_SetAssistDistance(string Line)
/if (${Line.Arg[3].Length}) /varset assistdistance ${Line.Arg[3]}
/echo ** New AssistDistance == ${assistdistance}
/ini "ArchSettings.ini" "General" "AssistDistance" "${assistdistance}"
/return
Sub Event_SetTankName(string Line)
/if (${Line.Arg[3].Length}) /varset tankname ${Line.Arg[3]}
/echo ** New TankName == ${tankname}
/ini "ArchSettings.ini" "General" "TankToAssist" "${tankname}"
/return
Sub Event_SetTargetSpells
/if (${targetspells}) {
/varset targetspells FALSE
/echo ** TargetSpells are now OFF!
} else {
/varset targetspells TRUE
/echo ** TargetSpells are now ON!
}
/ini "ArchSettings.ini" "General" "TargetSpells" "${targetspells}"
/return
Sub Event_Death
/varset diedBeforeZone TRUE
/echo ** YOU DIED... Setting autoassist and selfbuff to off!
/varset autoassist FALSE
/varset selfbuff FALSE
/call Wait4Rez
}
/return
Sub Event_Zoned
/if (${eqassistonoff}) /squelch /assist off
/ini "ArchSettings.ini" "General" "AutoAssist" "${autoassist}"
/if (${diedBeforeZone}) {
/ini "ArchSettings.ini" "General" "SelfBuffing" "${selfbuff}"
/varset diedBeforeZone FALSE
}
/return
Sub LazyRanger
|====[Self Buffs]========================================
/for j 1 to 8
/doevents
/if (!${selfbuff}) /goto :FallOut
/varset spellname "${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}]}"
/if (${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}].NotEqual[NoBuffListed]}) {
/if (!${Me.Buff[${spellname}].ID}) {
/if (${Me.Sitting}) {
/stand
/varset sitstatus TRUE
}
/target ${Me}
/call Cast ${spellname} gem6 ${Math.Calc[${Spell[${spellname}].CastTime}+${Spell[${spellname}].RecastTime}+5].Int}s
/if (${sitstatus} && !${battle}) {
/sit
/varset sitstatus FALSE
}
}
}
/next j
/if (${battle}) /target ${targetarray[3]}
/doevents
:Fallout
/return
Sub Event_AddSelfBuff(string Line)
/if (${Line.Arg[3].Length}) {
/for j 1 to 20
/if (${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}].Equal[NoBuffListed]}) {
/ini "ArchSettings.ini" "SelfBuffs" "SelfBuff${j}" "${Line.Arg[3]}"
/echo ** ${Line.Arg[3]} added as a SelfBuff.
/goto :FallOut
}
/next j
/echo ** Self Buff slots all filled! Get rid of some!
} else {
/echo ** Huh?
}
:FallOut
/return
Sub Event_RemSelfBuff(string Line)
/if (${Line.Arg[3].Length}) {
/for j 1 to 20
/if (${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}].Equal[${Line.Arg[3]}]}) {
/ini "ArchSettings.ini" "SelfBuffs" "SelfBuff${j}" "NoBuffListed"
/echo ** ${Line.Arg[3]} removed as a SelfBuff.
/goto :FallOut
}
/next j
/echo ** Can't find ${Line.Arg[3]} in SelfBuff list!
} else {
/echo ** Huh?
}
:FallOut
/return
Sub Event_Chat(ChatType,Sender,ChatText)
/if (!${targetspells}) /return
|====[Target Buffs]========================================
/for j 1 to 8
/if (!${Ini[ArchSettings.ini,TargetBuffs,TargetBuff${j}].Equal[NoBuffListed]}) {
/varset triggername "${Ini[ArchSettings.ini,TargetBuffs,TBuffTriggerWord${j}]}"
/varset spellname "${Ini[ArchSettings.ini,TargetBuffs,TargetBuff${j}]}"
/if ( ${ChatText.Find[${triggername}]} ) {
/if (${targetspells}) {
/target ${Sender}
/delay 2s
/call cast ${spellname} gem6 ${Math.Calc[${Spell[${spellname}].CastTime}+${Spell[${spellname}].RecastTime}+5].Int}s
/if (${verbose}) /tell ${Sender} inc ${triggername}
}
}
}
/next j
|====[Assist Buffs]========================================
/for j 1 to 8
/if (!${Ini[ArchSettings.ini,AssistSpells,AssistSpell${j}].Equal[NoSpellListed]}) {
/varset triggername "${Ini[ArchSettings.ini,AssistSpell,ASpellTriggerWord${j}]}"
/varset spellname "${Ini[ArchSettings.ini,AssistSpells,AssistSpell${j}]}"
/if ( ${ChatText.Find[${triggername}]} ) {
/assist ${Sender}
/delay 2s
/call cast ${spellname} gem6 ${Math.Calc[${Spell[${spellname}].CastTime}+${Spell[${spellname}].RecastTime}+5].Int}s
/if (${verbose}) /tell ${Sender} Inc ${spellname]} on %T.
}
}
/next j
/if (${battle}) /target ${targetarray[3]}
/return
Sub Event_Harmony(string Line)
/declare spawnnum int local 1
/declare targ int local 0
/declare range int local 20
/if (${Line.Arg[3].Length}) /varset range ${Line.Arg[3]}
|Auto-harmonies mobs within a certain range of your target
|Directions: have a mob targeted, run the snippet,
|by the end of the code all of the mobs should be harmonied and your
|target ready to pull.
/echo ** Begining to HARMONY everything within a range of ${range} around ${Target.Name}.
/popup ** Begining to HARMONY everything within a range of ${range} around ${Target.Name}.
/varset targ ${Target.ID}
/varset spawnnum 1
:harmonyLoop
/if ( ${Spawn[${targ}].NearestSpawn[${spawnnum}, npc radius ${range}].ID} ) {
/target ${Spawn[${targ}].NearestSpawn[${spawnnum}, npc radius ${range}]}
/call Cast "Harmony of Nature" gem7 10s
/delay 55
/varset spawnnum ${Math.Calc[${spawnnum}+1]}
/echo incremented, retargeting ${targ}
/goto :harmonyLoop
}
/target id ${targ}
/echo ** Harmony Complete.. Go Ahead and Pull..
/popup ** Harmony Complete.. Go Ahead and Pull..
/return
Sub Event_LootMyCorpse(string Line)
/if (${Line.Arg[3].Length}) /varset leaveSlot ${Line.Arg[3]}
/declare lootTotal int local 0
/declare lootSlot int local 0
/declare skippedCount int local 0
/declare wornSlotNumber int local 0
/target mycorpse
/if (${Target.Type.NotEqual[CORPSE]}) {
/echo ** Can't target my corpse.
/return
}
/corpse
/delay 1s
/loot
/delay 1s
/if (${Me.State.NotEqual[BIND]}) {
/echo ** Error in getting onto corpse! Aborting.
/return
}
:lootLag
/varset lootTotal ${Corpse.Items}
/delay 2
/if (${lootTotal}!=${Corpse.Items}) {
/goto :lootLag
}
:doAgain
/for lootSlot 1 to ${lootTotal}
/if (${leaveSlot.Length}) {
/for wornSlotNumber 1 to ${Corpse.Item[${lootSlot}].WornSlots}
/if (${Corpse.Item[${lootSlot}].WornSlot[${wornSlotNumber}]} == ${InvSlot[${leaveSlot}].ID}) {
/varcalc skippedCount (${skippedCount} + 1)
/next lootSlot
}
/next wornSlotNumber
}
:lootItem
/if (${Corpse.Item[${lootSlot}].ID}) {
/itemnotify loot${lootSlot} rightmouseup
/delay 2
/goto :lootItem
}
/delay 2
/next lootSlot
/if (${Corpse.Items} > ${skippedCount}) /goto :doAgain
/delay 5
/echo ** Done looting my corpse.
/notify LootWnd DoneButton leftmouseup
/varset leaveSlot
/return
sub Event_EarthCall
/if (${verbose} && !${rangerslowed}) /gsay Ranger Slow Landed.. Hope it helps..
/varset rangerslowed TRUE
/return
Sub Event_PatchHeal(string Line)
/if (${Line.Arg[3].Length}) {
/varset Healspell ${Line.Arg[3]}
/ini "ArchSettings.ini" "General" "HealSpell" "${Healspell}"
} else {
/if (${patchheal}) {
/varset patchheal FALSE
/echo ** PatchHealing is now OFF!
} else {
/varset patchheal TRUE
/echo ** PatchHealing is now ON!
/memspell 8 "${Healspell}"
}
}
/echo ** HealSpell == ${Healspell}
/ini "ArchSettings.ini" "General" "PatchHeal" "${patchheal}"
/return
Sub Event_HealPct(string Line)
/if (${Line.Arg[3].Length}) /varset healgrouppct ${Line.Arg[3]}
/echo ** New GroupHealPct == ${healgrouppct}
/ini "ArchSettings.ini" "General" "HealPct" "${healgrouppct}"
/return
Sub Healer
/varset spellname "${Healspell}" TRUE
/for g 1 to ${Group}
/if (${Group.Member[${g}].ID} && ${Group.Member[${g}].PctHPs}<${healgrouppct}) {
/target PC ${Group.Member[${g}]}
/if (${verbose}) /g Inc ${Healspell} to %t
/call cast ${spellname} gem8
/if (${battle}==1) /target ${targetarray[3]}
}
/next g
/for g 1 to ${Group}
/if (${Group.Member[${g}].Pet.ID} && ${Group.Member[${g}].Pet.PctHPs}<${healgrouppct}) {
/target Pet ${Group.Member[${g}].Pet}
/if (${verbose}) /g Inc ${Healspell} to %t
/call cast ${spellname} gem8
/if (${battle}==1) /target ${targetarray[3]}
}
/next g
/if (${Me.PctHPs}<${healgrouppct}) {
/target ${Me}
/if (${verbose}) /g Inc ${Healspell} to %t
/call cast ${spellname} gem8
/if (${battle}==1) /target ${targetarray[3]}
}
/return
Sub Event_ItemSet(string Line)
|- Sanity check parameters
/if (!${Line.Arg[5].Length} || ${Line.Arg[6].Length}) {
/echo ** Improper use of /iset
/echo -- /iset <itemalias> keepup|nokeepup <"Item Name">
/echo -- For example:
/echo -- /iset gobby keepup "Shrunken Goblin Skull Earring"
/return
}
/ini "ArchSettings.ini" "${Line.Arg[3]}" "FullName" "${Line.Arg[5]}"
/ini "ArchSettings.ini" "${Line.Arg[3]}" "KeepUp" "${If[${Line.Arg[4].Equal[keepup]},TRUE,FALSE]}"
/echo ** ${Line.Arg[5]} (KeepUp=${If[${Line.Arg[4].Equal[keepup]},TRUE,FALSE]}) updated in INI!
/return
Sub Event_ItemBounce(string Line)
|- Sanity check parameters
/if (!${Line.Arg[4].Length}) {
/echo ** Improper use of /ibounce
/echo -- /ibounce <itemalias> "Some Spell Name"
/echo -- For example:
/echo -- /ibounce gobby "Strength of Tunare"
/return
}
|- Look for that item's section, return if non-existent
/if (!${Ini[ArchSettings.ini,${Line.Arg[3]}].Length}) {
/echo ** [${Line.Arg[3]}] not in INI file!
/return
}
|- Find the next available BounceOff key number and store the spell
/declare bindex int local 1
:CheckNextKey
/if (${Ini[ArchSettings.ini,${Line.Arg[3]},BounceOff${bindex}].Length}) {
|- This one is in use...
/varcalc bindex ${bindex}+1
/goto :CheckNextKey
} else {
|- This one not defined (yet). Good.
/ini "ArchSettings.ini" "${Line.Arg[3]}" "BounceOff${bindex}" "${Line.Arg[4]}"
/echo ** Added "${Line.Arg[4]}" to [${Line.Arg[3]}]'s bounce list
}
/return
Sub Event_ItemCast(string Line)
|- Sanity check parameter
/if (!${Line.Arg[3].Length}) {
/echo ** Improper use of /icast
/echo -- /icast <itemalias>
/echo -- For example:
/echo -- /icast gobby
/return
}
|- Look for that item's section, return if non-existent
/if (!${Ini[ArchSettings.ini,${Line.Arg[3]}].Length}) {
/echo ** [${Line.Arg[3]}] not in INI file!
/return
}
/declare fullname string local ${Ini[ArchSettings.ini,${Line.Arg[3]},FullName]}
|- Is it in a Bag?
/echo ** Attempting to use: ${fullname}
/if (${FindItem[${fullname}].InvSlot.Pack}) {
:OpenPack
/if (!${Window[${FindItem[${fullname}].InvSlot.Pack.Name}].Open}) {
/itemnotify ${FindItem[${fullname}].InvSlot.Pack.Name} rightmouseup
/delay 2
/goto :OpenPack
}
/declare camefrom ${FindItem[${fullname}].InvSlot}
:GrabItem
/if (!${Cursor.ID}) {
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/goto :GrabItem
}
/declare clickyID int local ${Cursor.ID}
/declare wornat int local ${Cursor.WornSlot[1]}
:SwapFirst
/if (${Cursor.ID}==${clickyID}) {
/itemnotify ${InvSlot[${wornat}]} leftmouseup
/delay 2
/goto :SwapFirst
}
|- Click it
/delay 2
/echo ** Clicking: ${fullname}
/declare previousID ${Cursor.ID}
/itemnotify ${InvSlot[${wornat}]} rightmouseup
:SwapAgain
/if (${Cursor.ID}==${previousID}) {
/itemnotify ${InvSlot[${wornat}]} leftmouseup
/delay 2
/goto :SwapAgain
}
|- Put it back
:PutItBack
/if (${Cursor.ID}==${clickyID}) {
/itemnotify ${InvSlot[${camefrom}]} leftmouseup
/delay 2
/goto :PutItBack
}
:SummonedCheck
/if (${Cursor.ID}) {
|- Something was summoned
/autoinv
/delay 2
/goto :SummonedCheck
}
:ClosePack
/if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) {
/itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup
/delay 2
/goto :ClosePack
}
} else {
|- Just click it
/if (${FindItem[${fullname}].InvSlot}) {
/echo ** Clicking: ${fullname}
/itemnotify ${FindItem[${fullname}].InvSlot} rightmouseup
/delay 2
} else {
/echo ** "${fullname}" not found!
}
}
:CastLoop
/delay 1
/if (${Me.Casting.ID}) /goto :CastLoop
/return
Sub Event_Enraged
/echo Enrage detected! Target: ${Target.CleanName}
/varset isEnraged TRUE
/return
Sub Event_NLEnraged
/echo Enrage done! Target: ${Target.CleanName}
/varset isEnraged FALSE
/if (${Target.ID} && ${battle}) /attack on
/return
Sub Event_StopFight
/varset stopfighting TRUE
/return
sub Event_DisplayHelp
/echo -=Arch.Mac Help=-
/echo /SetSnare <SnareSpell> Toggles AutoSnare off/on or sets the snare spell
/echo /SetRoot <RootSpell> Toggles AutoReRoot off/on or sets the root spell
/echo /SetJolt <JoltSpell> Toggles AutoJolt off/on or sets the jolt spell
/echo /SetDD1 <DD1 Spell> Toggles AutoDD at 70% off/on or sets the DD1 spell
/echo /SetDD2 <DD2 Spell> Toggles AutoDD at 30% off/on or sets the DD2 spell
/echo /SetPatchHeal <HealSpell> Toggles PatchHealing off/on or sets the heal spell
/echo /SetHealPct <#> Sets the % when to patch heal
/echo /SetTaunt Toggles AutoTaunt off/on
/echo /SetForage Toggles AutoForage off/on
/echo /SetVerbose Toggles Verbosity off/on
/echo /SetSelfBuff Toggles SelfBuffing off/on
/echo /AddSelfBuff <BuffName> Adds a SelfBuff
/echo /RemSelfBuff <BuffName> Removes a SelfBuff
/echo /SetTSpells Toggles Targeted spells on tell on/off
/echo /SetAutoAssist <HP%> Toggles AutoAssist off/on with #% HP at which to Assist
/echo /SetTankName <TankName> Sets the TankName to AutoAssist
/echo /SetAssistdistance <distance> Sets the distance to target to start attacking
/echo /SetNoArch <stick> Turns Archery off/on if MQ2MoveUtils, <stick> will stick on the Target.
/echo /LootMyCorpse <ItemSlot> Loots your corpse except for <itemslot> if specified
/echo /Harmony <range> Harmonies all spawns within <range> of your target.
/echo /iset <itemalias> keepup|nokeepup <"Item Name"> - Item settings
/echo /ibounce <itemalias> <"Spell Name"> - Add bounce-off spell
/echo /iclick <itemalias> - Click cast item defined in <itemalias>
/echo /stopfight Stop Attacking Current Target
/echo /Setuseepic off/on epic 1.5
/echo /ArchHelp Shows this dialog
/echo /ArchStatus Shows Current Status
/return
sub Event_ArchStatus
/echo -=Arch.Mac Status=-
/echo AutoSnare: ${snaretoggle}, SnareSpell: ${snarespell}
/echo AutoReRoot: ${roottoggle}, RootSpell: ${rootspell}
/echo AutoDD 70%: ${dd1}, DDSpell1: ${ddspell1}
/echo AutoDD 30%: ${dd2}, DDSpell2: ${ddspell2}
/echo AutoJolt: ${autojolt}, JoltSpell: ${joltspell}
/echo PatchHeal: ${patchheal}, HealSpell: ${Healspell}, HealPct: ${healgrouppct}
/echo AutoTaunt: ${taunttoggle}
/echo AutoForage: ${foragetoggle}
/echo Verbosity: ${verbose}
/echo NoArchery: ${noarch} StickOnNoArchery: ${stickonnoarch}
/echo AutoSelfBuff: ${selfbuff}
/echo TargetSpells: ${targetspells}
/echo AutoAssist: ${autoassist}, TankName: ${tankname}, AssistDistance: ${assistdistance}, HPsToAssist: ${PctToAssist}
/echo Useepic: ${useepictoggle}
/echo Status Complete....
/return