Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #event Buffs "<#1#> Buffs"
- #event Buffs "<#*#> Buff #1#"
- Sub BuffCheck
- /declare i int local
- |-Combat Check
- /if (!${Defined[CombatTimer]}) /declare CombatTimer timer outer 0
- /if (${Defined[CombatTimer]} && ${CombatTimer} <= 1) {
- /if (${Me.Combat} || ${Assisting}) /varset CombatTimer 7s
- /for i 0 to ${Group}
- /if (${NetBots[${Group.Member[${i}]}].Attacking} && ${NetBots[${Group.Member[${i}]}].Zone} == ${Zone.ID}) /varset CombatTimer 7s
- /next i
- }
- |-If AutoRebuff=TRUE
- /if (${AutoRebuff}) {
- /if (!${Defined[RebuffTimer]}) /declare RebuffTimer timer outer 0
- |-If Arm=FALSE
- /if (!${Arm}) {
- /if (!${UseSafeZones}) /varset Arm TRUE
- |-Tribute
- /if (${UseAutoTribute} && ${Me.TributeActive} && ${Me.TributeTimer} < 3) /call TributeOff
- | |
- /if (${FindItem[Guise of the Deceiver].ID} && ${Math.Calc[${Me.Buff[Illusion: Dark Elf].Duration}*6].Int} < ${MinBuffDuration} && ${Spell[Illusion: Dark Elf].Stacks}) /call cast "Guise of the Deceiver" item
- /if (${FindItem[Mask of Deception].ID} && ${Math.Calc[${Me.Buff[Illusion: Dark Elf].Duration}*6-12].Int} < ${MinBuffDuration} && ${Spell[Illusion: Dark Elf].Stacks}) /call cast "Mask of Deception" item
- | |
- }
- |-If Arm=TRUE
- /if (${Arm}) {
- /if (${UseAutoTribute} && !${Me.TributeActive} && ${Me.CurrentFavor} > 500) /call TributeOn
- /if (${RebuffTimer} == 0 && ${CombatTimer} == 0) {
- |-Clickies-|
- /varset i 0
- /for i 1 to ${MyClickies.Size}
- /if ( ${Math.Calc[${Me.Buff[${MyClickyBuffs[${i}]}].Duration}*6-12]} < ${MinBuffDuration}) {
- /if (${FindItem[${MyClickies[${i}]}].ID} && ${Spell[${MyClickyBuffs[${i}]}].Stacks}) {
- /if (${Select[${Me.Class},Bard]} ) /call MelodyPause
- /doevents
- /if (${Spell[${MyClickyBuffs[${i}]}].TargetType.Equal[Single]}) {
- /call TrueTarget id ${Me.ID}
- /if (${Target.ID} != ${Me.ID}) /goto :skip_TARGETFAILED
- }
- /call cast "${MyClickies[${i}]}" item
- /delay 1s
- }
- }
- /next i
- /varset i o
- /for i 1 to ${MyBuffs.Size}
- /if (${Math.Calc[${Me.Buff[${MyBuffs[${i}]}].Duration}*6-12]} < ${MinBuffDuration}) {
- /doevents
- /if (${Me.CurrentMana} > ${Spell[${MyBuffs[${i}]}].Mana} && ${Spell[${MyBuffs[${i}]}].Stacks}) {
- /if (${Spell[${MyBuffs[${i}]}].TargetType.Equal[Single]}) {
- /call TrueTarget id ${Me.ID}
- /if (${Target.ID} != ${Me.ID}) /goto :skip_TARGETFAILED
- }
- /call cast "${MyBuffs[${i}]}" Gem${BuffGem} 20
- /delay 1s
- }
- }
- /next i
- /varset i o
- /for i 1 to ${MyAltAbilities.Size}
- /if (${Math.Calc[${Me.Buff[${MyAltAbilities[${i}]}].Duration}*6-12]} < ${MinBuffDuration} && ${Me.AltAbilityReady[${MyAltAbilities[${i}]}]}) {
- /doevents
- /if (${Spell[${MyAltAbilities[${i}]}].TargetType.Equal[Single]}) {
- /call TrueTarget id ${Me.ID}
- /if (${Target.ID} != ${Me.ID}) /goto :skip_TARGETFAILED
- }-
- /call cast "${MyAltAbilities[${i}]}" alt
- /delay 1s
- }
- /next i
- /if (${Pets}) /call CheckPetStatus
- }
- }
- }
- /if (${Defined[RebuffTimer]}) /varset RebuffTimer ${MinBuffDuration}s
- :skip_TARGETFAILED
- /return
- Sub event_Buffs(string line, string ChatSender)
- /if (${MyGroupBuffs.Size} > 0) {
- /docommand ${ChatToggle} Buffing ${ChatSender}
- /target id ${Spawn[${ChatSender}].ID}
- /declare i int local
- /for i 1 to ${MyGroupBuffs.Size}
- /if (${Me.CurrentMana} > ${Spell[${MyGroupBuffs[${i}]}].Mana}) /call cast "${MyGroupBuffs[${i}]}" Gem${BuffGem} 45s
- /if (${Me.CurrentMana} < ${Spell[${MyGroupBuffs[${i}]}].Mana}) /docommand ${ChatToggle} I'm too low on mana to cast ${MyGroupBuffs[${i}]} right now.
- /next i
- /docommand ${ChatToggle} Done buffing.
- }
- /return
- Sub TributeOff
- /declare LoopCounter int local 0
- /if (!${Window[TributeBenefitWnd].Open}) /keypress "alt u" release
- :Off_looping
- /varset LoopCounter ${Math.Calc[${LoopCounter}+1]}
- /if (${Me.TributeActive}) /notify TributeBenefitWnd DowngradeButton leftmouseup
- /delay 1s ${Me.TributeActive}
- /if (${Me.TributeActive} && ${LoopCounter} < 5) /goto :Off_looping
- /delay 1s
- /if (!${Me.TributeActive} && ${Window[TributeBenefitWnd].Open}) /keypress "alt u" release
- /return
- Sub TributeOn
- /declare LoopCounter int local 0
- /if ( !${Window[TributeBenefitWnd].Open} ) /keypress "alt u" release
- :On_looping
- /varset LoopCounter ${Math.Calc[${LoopCounter}+1]}
- /if ( !${Me.TributeActive} ) /notify TributeBenefitWnd DowngradeButton leftmouseup
- /delay 1s !${Me.TributeActive}
- /if ( !${Me.TributeActive} && ${LoopCounter} < 5 ) /goto :On_looping
- /delay 1s
- /if ( ${Me.TributeActive} && ${Window[TributeBenefitWnd].Open} ) /keypress "alt u" release
- /return
- Sub CheckPetStatus
- /if (${SpawnCount[${Me.Pet}]} < 1 && ${Me.CurrentMana} > ${Spell[${PetSpell}].Mana} && ${FindItem[${PetReageant}].ID}) {
- /if (${FindItem[Gloves of Dark Summoning].ID}) /call SwapItem "Gloves of Dark Summoning" hands
- /call Cast "${PetSpell}" gem${BuffGem} ${Spell[${PetSpell}].RecastTime}s
- /if (${FindItem[Miragul's Gloves of Risen Souls].ID}) /call SwapItem "Miragul's Gloves of Risen Souls" hands
- }
- /if ( ${PetBuffs} ) {
- /declare i int local
- /for i 1 to ${MyPetBuffs.Size}
- /if (${Me.PetBuff[${MyPetBuffs[${i}]}]} !> 0) {
- /call cast "${MyPetBuffs[${i}]}" Gem${BuffGem} 20
- /delay 1s
- }
- /next i
- }
- /return
- sub event_RecastIllusions
- /if (${Me.Buff[Illusion: Dark Elf].ID}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[Illusion: Dark Elf].ID}-1].Int} leftmouseup
- /return
- Sub CheckZoneType
- /echo ${Zone} has not been set as safe or dangerous, treating ${Zone} as dangerous.
- /echo You can use /echo <Set Safe Zone> or /echo <Set Dangerous Zone> to set zone specification.
- /return
- #event SetSafeZone "[MQ2] <Set Safe Zone>"
- Sub event_SetSafeZone
- /echo Adding ${Zone.Name} to known safe zones.
- /call INItoVar ${Macro_Ini} Settings,SafeZones SafeZones string outer
- /if (${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "SafeZones" "${SafeZones},${Zone.ShortName}"
- /if (!${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "SafeZones" "${Zone.ShortName}"
- /echo Settings will take effect the next time you zone in.
- /if (${Defined[SafeZones]}) /deletevar SafeZones
- /return
- #event SetDangerousZone "[MQ2] <Set Dangerous Zone>"
- Sub event_SetDangerousZone
- /echo Adding ${Zone.Name} to known dangerous zones.
- /call INItoVar ${Macro_Ini} Settings,DangerZones DangerZones string outer
- /if (${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "DangerZones" "${DangerZones},${Zone.ShortName}"
- /if (!${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "DangerZones" "${Zone.ShortName}"
- /echo Settings will take effect the next time you zone in.
- /if (${Defined[DangerZones]}) /deletevar DangerZones
- /return
- Sub Buff_Setup
- /call INItoVar ${Enigma_Ini} BuffCheck,AutoRebuffPersonal_On/Off AutoRebuff bool outer
- /call INItoVar ${Enigma_Ini} BuffCheck,UseSafeZones_On/Off UseSafeZones bool outer
- /call INItoVar ${Enigma_Ini} BuffCheck,UseAutoTribute_On/Off UseAutoTribute bool outer
- /call INItoVar ${Enigma_Ini} GroupBuffs,GroupBuffs_On/Off GroupBuffs bool outer
- /call INItoVar ${Enigma_Ini} Pets,UsePets_On/Off Pets bool outer
- /call INItoVar ${Enigma_Ini} BuffCheck,GemToUse BuffGem int outer
- /declare i int local
- /if (${AutoRebuff}) {
- /call INItoArray ${Enigma_Ini} SelfBuffs Item# MyClickies NOCHECK
- /call INItoArray ${Enigma_Ini} SelfBuffs ItemBuff# MyClickyBuffs NOCHECK
- /call INItoArray ${Enigma_Ini} SelfBuffs Buff# MyBuffs Me.Book
- /call INItoArray ${Enigma_Ini} SelfBuffs AltAbility# MyAltAbilities NOCHECK
- /call INItoVar ${Enigma_Ini} SelfBuffs,MinBuffDuration MinBuffDuration int outer
- }
- /if (${GroupBuffs}) {
- /call INItoArray ${Enigma_Ini} GroupBuffs GroupBuff# MyGroupBuffs Me.Book
- }
- /if (${Pets}) {
- /call INItoVar ${Enigma_Ini} Pets,PetSpell PetSpell string outer
- /call INItoVar ${Enigma_Ini} Pets,PetReageant PetReageant string outer
- /call INItoVar ${Enigma_Ini} Pets,PetBuffs_On/Off PetBuffs bool outer
- /call INItoArray ${Enigma_Ini} Pets PetBuff# MyPetBuffs Me.Book
- }
- /if (!${Defined[Arm]}) {
- /declare Arm bool outer FALSE
- /if (${UseSafeZones}) {
- /if (${Select[${Zone.ID},${SafeZones}]} == 0) /varset Arm TRUE
- /if (${Select[${Zone.ID},${SafeZones}]} != 0) /varset Arm FALSE
- } else /if (!${UseSafeZones} && !${Arm}) /varset Arm bool outer TRUE
- }
- /if (${Defined[RebuffTimer]} && ${RebuffTimer} > 0) /varset RebuffTimer 0
- /if (${Defined[CombatTimer]} && ${CombatTimer} > 0) /varset CombatTimer 0
- /if (!${Defined[CombatTimer]}) /declare CombatTimer timer outer 7s
- /return
- Sub MakeBuffCheck_Ini
- /if (!${Ini[${Enigma_Ini},BuffCheck].Length}) {
- /echo Adding buff settings to ${Me.CleanName}'s .ini file...
- /ini "${Enigma_Ini}" "BuffCheck" "AutoRebuffPersonal_On/Off"
- /ini "${Enigma_Ini}" "BuffCheck" "UseSafeZones_On/Off"
- /ini "${Enigma_Ini}" "BuffCheck" "UseAutoTribute_On/Off"
- /ini "${Enigma_Ini}" "SelfBuffs" "Item#1"
- /ini "${Enigma_Ini}" "SelfBuffs" "ItemBuff#1"
- /ini "${Enigma_Ini}" "SelfBuffs" "Buff#1"
- /ini "${Enigma_Ini}" "SelfBuffs" "AltAbility#1"
- /ini "${Enigma_Ini}" "SelfBuffs" "MinBuffDuration" "30"
- /ini "${Enigma_Ini}" "GroupBuffs" "GroupBuffs_On/Off"
- /ini "${Enigma_Ini}" "GroupBuffs" "GroupBuff#1"
- /ini "${Enigma_Ini}" "Pets" "UsePets_On/Off"
- /ini "${Enigma_Ini}" "Pets" "PetReageant"
- /ini "${Enigma_Ini}" "Pets" "PetSpell"
- /ini "${Enigma_Ini}" "Pets" "PetBuffs_On/Off"
- /ini "${Enigma_Ini}" "Pets" "PetBuff#1"
- /ini "${Enigma_Ini}" "BuffCheck" "GemToUse" "3"
- }
- /echo Ini has been updated and the macro ended. Modify the ${Enigma_Ini} file and restart, bitch.
- /endmacro
- /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement