Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.57 KB | None | 0 0
  1. #event Buffs "<#1#> Buffs"
  2. #event Buffs "<#*#> Buff #1#"
  3. Sub BuffCheck
  4. /declare i int local
  5. |-Combat Check
  6. /if (!${Defined[CombatTimer]}) /declare CombatTimer timer outer 0
  7. /if (${Defined[CombatTimer]} && ${CombatTimer} <= 1) {
  8. /if (${Me.Combat} || ${Assisting}) /varset CombatTimer 7s
  9. /for i 0 to ${Group}
  10. /if (${NetBots[${Group.Member[${i}]}].Attacking} && ${NetBots[${Group.Member[${i}]}].Zone} == ${Zone.ID}) /varset CombatTimer 7s
  11. /next i
  12. }
  13. |-If AutoRebuff=TRUE
  14. /if (${AutoRebuff}) {
  15. /if (!${Defined[RebuffTimer]}) /declare RebuffTimer timer outer 0
  16. |-If Arm=FALSE
  17. /if (!${Arm}) {
  18. /if (!${UseSafeZones}) /varset Arm TRUE
  19. |-Tribute
  20. /if (${UseAutoTribute} && ${Me.TributeActive} && ${Me.TributeTimer} < 3) /call TributeOff
  21. | |
  22. /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
  23. /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
  24. | |
  25. }
  26. |-If Arm=TRUE
  27. /if (${Arm}) {
  28. /if (${UseAutoTribute} && !${Me.TributeActive} && ${Me.CurrentFavor} > 500) /call TributeOn
  29. /if (${RebuffTimer} == 0 && ${CombatTimer} == 0) {
  30. |-Clickies-|
  31. /varset i 0
  32. /for i 1 to ${MyClickies.Size}
  33. /if ( ${Math.Calc[${Me.Buff[${MyClickyBuffs[${i}]}].Duration}*6-12]} < ${MinBuffDuration}) {
  34. /if (${FindItem[${MyClickies[${i}]}].ID} && ${Spell[${MyClickyBuffs[${i}]}].Stacks}) {
  35. /if (${Select[${Me.Class},Bard]} ) /call MelodyPause
  36. /doevents
  37. /if (${Spell[${MyClickyBuffs[${i}]}].TargetType.Equal[Single]}) {
  38. /call TrueTarget id ${Me.ID}
  39. /if (${Target.ID} != ${Me.ID}) /goto :skip_TARGETFAILED
  40. }
  41. /call cast "${MyClickies[${i}]}" item
  42. /delay 1s
  43. }
  44. }
  45. /next i
  46. /varset i o
  47. /for i 1 to ${MyBuffs.Size}
  48. /if (${Math.Calc[${Me.Buff[${MyBuffs[${i}]}].Duration}*6-12]} < ${MinBuffDuration}) {
  49. /doevents
  50. /if (${Me.CurrentMana} > ${Spell[${MyBuffs[${i}]}].Mana} && ${Spell[${MyBuffs[${i}]}].Stacks}) {
  51. /if (${Spell[${MyBuffs[${i}]}].TargetType.Equal[Single]}) {
  52. /call TrueTarget id ${Me.ID}
  53. /if (${Target.ID} != ${Me.ID}) /goto :skip_TARGETFAILED
  54. }
  55. /call cast "${MyBuffs[${i}]}" Gem${BuffGem} 20
  56. /delay 1s
  57. }
  58. }
  59. /next i
  60. /varset i o
  61. /for i 1 to ${MyAltAbilities.Size}
  62. /if (${Math.Calc[${Me.Buff[${MyAltAbilities[${i}]}].Duration}*6-12]} < ${MinBuffDuration} && ${Me.AltAbilityReady[${MyAltAbilities[${i}]}]}) {
  63. /doevents
  64. /if (${Spell[${MyAltAbilities[${i}]}].TargetType.Equal[Single]}) {
  65. /call TrueTarget id ${Me.ID}
  66. /if (${Target.ID} != ${Me.ID}) /goto :skip_TARGETFAILED
  67. }-
  68. /call cast "${MyAltAbilities[${i}]}" alt
  69. /delay 1s
  70. }
  71. /next i
  72. /if (${Pets}) /call CheckPetStatus
  73. }
  74. }
  75. }
  76. /if (${Defined[RebuffTimer]}) /varset RebuffTimer ${MinBuffDuration}s
  77. :skip_TARGETFAILED
  78. /return
  79. Sub event_Buffs(string line, string ChatSender)
  80. /if (${MyGroupBuffs.Size} > 0) {
  81. /docommand ${ChatToggle} Buffing ${ChatSender}
  82. /target id ${Spawn[${ChatSender}].ID}
  83. /declare i int local
  84. /for i 1 to ${MyGroupBuffs.Size}
  85. /if (${Me.CurrentMana} > ${Spell[${MyGroupBuffs[${i}]}].Mana}) /call cast "${MyGroupBuffs[${i}]}" Gem${BuffGem} 45s
  86. /if (${Me.CurrentMana} < ${Spell[${MyGroupBuffs[${i}]}].Mana}) /docommand ${ChatToggle} I'm too low on mana to cast ${MyGroupBuffs[${i}]} right now.
  87. /next i
  88. /docommand ${ChatToggle} Done buffing.
  89. }
  90. /return
  91. Sub TributeOff
  92. /declare LoopCounter int local 0
  93. /if (!${Window[TributeBenefitWnd].Open}) /keypress "alt u" release
  94. :Off_looping
  95. /varset LoopCounter ${Math.Calc[${LoopCounter}+1]}
  96. /if (${Me.TributeActive}) /notify TributeBenefitWnd DowngradeButton leftmouseup
  97. /delay 1s ${Me.TributeActive}
  98. /if (${Me.TributeActive} && ${LoopCounter} < 5) /goto :Off_looping
  99. /delay 1s
  100. /if (!${Me.TributeActive} && ${Window[TributeBenefitWnd].Open}) /keypress "alt u" release
  101. /return
  102. Sub TributeOn
  103. /declare LoopCounter int local 0
  104. /if ( !${Window[TributeBenefitWnd].Open} ) /keypress "alt u" release
  105. :On_looping
  106. /varset LoopCounter ${Math.Calc[${LoopCounter}+1]}
  107. /if ( !${Me.TributeActive} ) /notify TributeBenefitWnd DowngradeButton leftmouseup
  108. /delay 1s !${Me.TributeActive}
  109. /if ( !${Me.TributeActive} && ${LoopCounter} < 5 ) /goto :On_looping
  110. /delay 1s
  111. /if ( ${Me.TributeActive} && ${Window[TributeBenefitWnd].Open} ) /keypress "alt u" release
  112. /return
  113. Sub CheckPetStatus
  114. /if (${SpawnCount[${Me.Pet}]} < 1 && ${Me.CurrentMana} > ${Spell[${PetSpell}].Mana} && ${FindItem[${PetReageant}].ID}) {
  115. /if (${FindItem[Gloves of Dark Summoning].ID}) /call SwapItem "Gloves of Dark Summoning" hands
  116. /call Cast "${PetSpell}" gem${BuffGem} ${Spell[${PetSpell}].RecastTime}s
  117. /if (${FindItem[Miragul's Gloves of Risen Souls].ID}) /call SwapItem "Miragul's Gloves of Risen Souls" hands
  118. }
  119. /if ( ${PetBuffs} ) {
  120. /declare i int local
  121. /for i 1 to ${MyPetBuffs.Size}
  122. /if (${Me.PetBuff[${MyPetBuffs[${i}]}]} !> 0) {
  123. /call cast "${MyPetBuffs[${i}]}" Gem${BuffGem} 20
  124. /delay 1s
  125. }
  126. /next i
  127. }
  128. /return
  129. sub event_RecastIllusions
  130. /if (${Me.Buff[Illusion: Dark Elf].ID}) /nomodkey /notify BuffWindow Buff${Math.Calc[${Me.Buff[Illusion: Dark Elf].ID}-1].Int} leftmouseup
  131. /return
  132. Sub CheckZoneType
  133. /echo ${Zone} has not been set as safe or dangerous, treating ${Zone} as dangerous.
  134. /echo You can use /echo <Set Safe Zone> or /echo <Set Dangerous Zone> to set zone specification.
  135. /return
  136. #event SetSafeZone "[MQ2] <Set Safe Zone>"
  137. Sub event_SetSafeZone
  138. /echo Adding ${Zone.Name} to known safe zones.
  139. /call INItoVar ${Macro_Ini} Settings,SafeZones SafeZones string outer
  140. /if (${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "SafeZones" "${SafeZones},${Zone.ShortName}"
  141. /if (!${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "SafeZones" "${Zone.ShortName}"
  142. /echo Settings will take effect the next time you zone in.
  143. /if (${Defined[SafeZones]}) /deletevar SafeZones
  144. /return
  145. #event SetDangerousZone "[MQ2] <Set Dangerous Zone>"
  146. Sub event_SetDangerousZone
  147. /echo Adding ${Zone.Name} to known dangerous zones.
  148. /call INItoVar ${Macro_Ini} Settings,DangerZones DangerZones string outer
  149. /if (${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "DangerZones" "${DangerZones},${Zone.ShortName}"
  150. /if (!${Ini[${Macro_Ini},Settings,DangerZones].Length}) /ini "${Macro_Ini}" "Settings" "DangerZones" "${Zone.ShortName}"
  151. /echo Settings will take effect the next time you zone in.
  152. /if (${Defined[DangerZones]}) /deletevar DangerZones
  153. /return
  154. Sub Buff_Setup
  155. /call INItoVar ${Enigma_Ini} BuffCheck,AutoRebuffPersonal_On/Off AutoRebuff bool outer
  156. /call INItoVar ${Enigma_Ini} BuffCheck,UseSafeZones_On/Off UseSafeZones bool outer
  157. /call INItoVar ${Enigma_Ini} BuffCheck,UseAutoTribute_On/Off UseAutoTribute bool outer
  158. /call INItoVar ${Enigma_Ini} GroupBuffs,GroupBuffs_On/Off GroupBuffs bool outer
  159. /call INItoVar ${Enigma_Ini} Pets,UsePets_On/Off Pets bool outer
  160. /call INItoVar ${Enigma_Ini} BuffCheck,GemToUse BuffGem int outer
  161. /declare i int local
  162. /if (${AutoRebuff}) {
  163. /call INItoArray ${Enigma_Ini} SelfBuffs Item# MyClickies NOCHECK
  164. /call INItoArray ${Enigma_Ini} SelfBuffs ItemBuff# MyClickyBuffs NOCHECK
  165. /call INItoArray ${Enigma_Ini} SelfBuffs Buff# MyBuffs Me.Book
  166. /call INItoArray ${Enigma_Ini} SelfBuffs AltAbility# MyAltAbilities NOCHECK
  167. /call INItoVar ${Enigma_Ini} SelfBuffs,MinBuffDuration MinBuffDuration int outer
  168. }
  169. /if (${GroupBuffs}) {
  170. /call INItoArray ${Enigma_Ini} GroupBuffs GroupBuff# MyGroupBuffs Me.Book
  171. }
  172. /if (${Pets}) {
  173. /call INItoVar ${Enigma_Ini} Pets,PetSpell PetSpell string outer
  174. /call INItoVar ${Enigma_Ini} Pets,PetReageant PetReageant string outer
  175. /call INItoVar ${Enigma_Ini} Pets,PetBuffs_On/Off PetBuffs bool outer
  176. /call INItoArray ${Enigma_Ini} Pets PetBuff# MyPetBuffs Me.Book
  177. }
  178. /if (!${Defined[Arm]}) {
  179. /declare Arm bool outer FALSE
  180. /if (${UseSafeZones}) {
  181. /if (${Select[${Zone.ID},${SafeZones}]} == 0) /varset Arm TRUE
  182. /if (${Select[${Zone.ID},${SafeZones}]} != 0) /varset Arm FALSE
  183. } else /if (!${UseSafeZones} && !${Arm}) /varset Arm bool outer TRUE
  184. }
  185. /if (${Defined[RebuffTimer]} && ${RebuffTimer} > 0) /varset RebuffTimer 0
  186. /if (${Defined[CombatTimer]} && ${CombatTimer} > 0) /varset CombatTimer 0
  187.  
  188. /if (!${Defined[CombatTimer]}) /declare CombatTimer timer outer 7s
  189. /return
  190. Sub MakeBuffCheck_Ini
  191. /if (!${Ini[${Enigma_Ini},BuffCheck].Length}) {
  192. /echo Adding buff settings to ${Me.CleanName}'s .ini file...
  193. /ini "${Enigma_Ini}" "BuffCheck" "AutoRebuffPersonal_On/Off"
  194. /ini "${Enigma_Ini}" "BuffCheck" "UseSafeZones_On/Off"
  195. /ini "${Enigma_Ini}" "BuffCheck" "UseAutoTribute_On/Off"
  196. /ini "${Enigma_Ini}" "SelfBuffs" "Item#1"
  197. /ini "${Enigma_Ini}" "SelfBuffs" "ItemBuff#1"
  198. /ini "${Enigma_Ini}" "SelfBuffs" "Buff#1"
  199. /ini "${Enigma_Ini}" "SelfBuffs" "AltAbility#1"
  200. /ini "${Enigma_Ini}" "SelfBuffs" "MinBuffDuration" "30"
  201. /ini "${Enigma_Ini}" "GroupBuffs" "GroupBuffs_On/Off"
  202. /ini "${Enigma_Ini}" "GroupBuffs" "GroupBuff#1"
  203. /ini "${Enigma_Ini}" "Pets" "UsePets_On/Off"
  204. /ini "${Enigma_Ini}" "Pets" "PetReageant"
  205. /ini "${Enigma_Ini}" "Pets" "PetSpell"
  206. /ini "${Enigma_Ini}" "Pets" "PetBuffs_On/Off"
  207. /ini "${Enigma_Ini}" "Pets" "PetBuff#1"
  208. /ini "${Enigma_Ini}" "BuffCheck" "GemToUse" "3"
  209. }
  210. /echo Ini has been updated and the macro ended. Modify the ${Enigma_Ini} file and restart, bitch.
  211. /endmacro
  212. /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement