-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot_clr.mac
361 lines (291 loc) · 11 KB
/
bot_clr.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|**
----------------------------
BOT_CLR.mac
----------------------------
This macro is configured for use by the CLERIC class
Modify the BOT_CLR_CHARNAME.ini file for use by a specific toon
This was written ground up for usage with xiris's bots
Usage: /mac bot_clr ${_tank1Name} ${_tank2Name} ${_healPoint} ${_assistArgs}
______________________________________________
REVISION HISTORY
08.10.10 xiris INITIAL REVISION
10.02.10 xiris Fixed Group Healing issues
10.09.10 xiris Added rez routines
10.12.10 xiris Refactored the includes
10.21.10 xiris Renamed some of the methods
11.01.10 xiris Reverted to using spell_routines.inc
Modified the cast calls to use this.
11.09.10 xiris Modified healMAINTANK to check to see if the real MT is
available again.
11.15.10 xiris Modified some of the variable names
Removed the redundant chkMana (it is now in chkSit in mbot)
09.04.15 xiris Changed the variant_initialize to better handle the output from the loader
10.05.15 xiris Commented out Divine Arbitration check for emu (no oow yet)
12.04.15 xiris Modified how the initialization of parameters works
03.27.15 xiris Added handlers for chchain (see xiris_healing.inc)
09.10.17 xiris Cleaned up extraneous buffing stuff (see xiris_buffing.inc)
09.17.18 xiris Included ALL xiris bot libraries in common instead of in individual macros
12.22.21 xiris Added ability to be a battle cleric (chkNuke)
Cleaned up some of the MT checking if inside own group
04.16.22 xiris Overhauled group heal method and variable names
Moved commons healing functions to the include
04.19.22 xiris Integrated the CH2 macro functionality so we don't have to switch macros
05.13.22 xiris Updated Events to only listen to BC
08.05.22 xiris Added support for Divine Intervention begging
______________________________________________
REQUIRED PLUGINS
mq2cast
mq2eqbc
mq2debuffs
mq2moveutils
______________________________________________
REQUIRED INCLUDES
xiris_common/xiris_common.inc
**|
#include xiris_common/xiris_common.inc
#TURBO 120
#EVENT BattleCleric "#*#BattleOn#*#"
#EVENT CelestialRegeneration "#*#celregen#*#"
#EVENT AutoRezON "#*#AutoRezON#*#"
#EVENT AutoRezOFF "#*#AutoRezOFF#*#"
#EVENT CombatRezON "#*#CombatRezON#*#"
#EVENT CombatRezOFF "#*#CombatRezOFF#*#"
|-- Divine Intervention Events
#EVENT DivineInterventionRequest "#1# tells you#*#'dime#*#'"
#EVENT DivineInterventionRequest "#1# tells the group#*#'dime#*#'"
#EVENT DivineInterventionRequest "#1# tells the raid#*#'dime#*#'"
#EVENT DivineInterventionRequest "[ #1# #*#]#*#dime#*#"
Sub InitEvents_Class
/call RegisterClassEvents Events_CLR 8
/return
Sub Events_CLR
/doevents BattleCleric
/doevents CelestialRegeneration
/doevents AutoRezON
/doevents AutoRezOFF
/doevents CombatRezON
/doevents CombatRezOFF
/doevents DivineInterventionRequest
/return
Sub Main(string _tank1Name, string _tank2Name, string _tank3Name, int _healPoint, string _assistArgs)
/echo You are now in xiris_bot_${Me.Class.ShortName}.mac
|-- initialize the common xbot libraries
/call xbot_initialize ${_tank1Name} ${_tank2Name} ${_tank3Name} ${_healPoint} ${_assistArgs}
|-- initialize the macro specific libraries
/call variant_initialize
|-- report my status
/dgt [${Me.Class.ShortName}] ${Me.Name} ${str_action} >> ${Spawn[${_tank1Name}].CleanName} << @ ${int_point_tank_normal} ${_assistArgs}
|-- target the MT
/call TrueTarget ${int_MTID}
|**
----------------------------
Main Loop
----------------------------
Runs in order listed,
if adding any routine add the call here
----------------------------
**|
:MainLoop
/if (${Me.Hovering} || ${Window[tradewnd].Open} || ${Window[lootwnd].Open}) /goto :MainLoop
|-- Check all Events
/call RunAllEvents
|-- Check to make sure MT is still alive, if not, find another and target it
|/echo chkMTAlive
/call chkMTAlive TRUE
|-- Check to see if self needs to be cured (xiris_curing.inc)
/call chkNeedCure
|-- Check the three main groupings of heal classes (xiris_healing.inc)
/call chkHeal_MT
/call chkHeal_Self
/call chkHeal_Group
|-- Check to see if we are autorezzing
/if ((${bln_autoRez} && !${bln_engaged}) || (${bln_combatRez} && ${bln_engaged})) /call chkRessurection
|-- Check Divine Arbitration Flag
/if (!${bln_divineArbReady}) /call chkArbitrationReady
|-- Check Auto Assist if its on
/if (${bln_autoAssist} && ${bln_battleCleric}) /call chkAutoAssist
|-- If Engaged run Raid Events
/if (${bln_engaged}) {
|-- check all events
/call RunAllEvents
|-- verify engagement status (Acts like chkTargetStatus, but for non meleeing)
/call chkMobDead
|-- debuff lib
/if (${${DEBUFF_Total}}) /call chkDebuffsOnSingleTarget ${int_targetID}
|-- class specific
/if (${bln_cmbtBuffUse} && ${int_cmbtBuffTotal}) /call cmbtBuffMT
/if (${bln_battleCleric}) {
|-- dps library (priest)
/call chkNuke
|-- std library (burns/aa/clicks)
/call chkAA
/call chkBurn
/call chkClicky
|-- verify target status
/call chkTargetStatus
}
} else {
|-- check utilities, includes: sit,loot,leash (out of combat only) and only once every 10 seconds
/if (!${timer_check_utilities}) /call chkUtils
/if (!${timer_check_downshits}) /call chkDownshits
/if (!${timer_check_loot} && ${bln_looting}) /call chkLoot
}
|-- start again
/goto :MainLoop
/return
Sub EVENT_CelestialRegeneration
/call MGBCelestialRegeneration
/return
Sub chkMGBCelestialRotation
| loop through the MGB Celestial Rotation members
| if they have all fired before (me) and ! Celestial Regeneration, then fire mine.
/return
Sub MGBCelestialRegeneration
/if (${Me.AltAbilityReady[Mass Group Buff]} && ${Me.AltAbilityReady[Celestial Regeneration]}) {
/call MQ2Cast "Mass Group Buff" alt
/delay 10
/call MQ2Cast "Celestial Regeneration" alt
/return
}
/if (${Me.AltAbilityReady[Celestial Regeneration]}) {
/call MQ2Cast "Celestial Regeneration" alt
}
/return
Sub EVENT_DivineInterventionRequest(_line, _sender, _eventParams)
/if (${Bool[${Me.Spell[Divine Intervention].ID}]}) {
/if (${Me.SpellReady[Divine Intervention]}) {
/declare tid int local ${Spawn[pc ${_sender}].ID}
/if (${Target.ID} != ${tid}) {
/call TrueTarget ${tid}
}
/echo \agDivine Intervention\aw on \ay${Target.Name}(${tid})
/call MQ2Cast "Divine Intervention" gem6 8s
/docommand /${announceChannel} DI >> ${Target.Name}
} else {
/docommand /${announceChannel} DI is NOT ready, ask someone else!
}
}
/doevents flush DivineInterventionRequest
/return
Sub Event_AutoRezOn
/call AutoRezON
/doevents flush AutoRezON
/return
Sub AutoRezON
/dgt ${Me.Name} is now auto rezzing out of combat.
/varset bln_autoRez TRUE
/return
Sub Event_AutoRezOff
/call AutoRezOFF
/doevents flush AutoRezOFF
/return
Sub AutoRezOFF
/dgt ${Me.Name} is no auto rezzing out of combat.
/varset bln_autoRez FALSE
/return
Sub Event_CombatRezON
/call CombatRezON
/doevents flush CombatRezON
/return
Sub CombatRezON
/dgt ${Me.Name} is now auto rezzing during combat.
/varset bln_autoRez TRUE
/varset bln_combatRez TRUE
/return
Sub Event_CombatRezOFF
/call CombatRezOFF
/doevents flush CombatRezOFF
/return
Sub CombatRezOFF
/dgt ${Me.Name} is no longer auto rezzing during combat.
/varset bln_autoRez FALSE
/varset bln_combatRez FALSE
/return
|**
----------------------------
Check|Set to see if Divine Arbitration is Ready
----------------------------
**|
Sub chkArbitrationReady
/varset bln_divineArbReady FALSE
/if (${Me.AltAbilityReady[divine arbitration]} || !${FindItem[${str_epicName}].Timer}) /varset bln_divineArbReady TRUE
/return
|**
----------------------------
Check|Set to see if Divine Intervention is Ready
----------------------------
**|
Sub chkDivineIntervention
/if (${FindItemCount[Emerald]} && ${Me.SpellReady[Divine Intervention]} && !${NetBots[${Target.Name}].Buff[Divine Intervention].Name.Equal[Divine Intervention]}) {
/say Casting Divine Intervention on ${Target.Name}!
/call MQ2Cast "Divine Intervention"
}
/return
|**
----------------------------
UTILITY Subs
----------------------------
Things to do while OOC (or if in RAID)
----------------------------
**|
Sub chkUtils
|-- Standard Methods
/call chkSit
/varset timer_check_utilities 20s
/return
Sub chkYaulp
|/echo chkYaulp (${bln_engaged} && ${Me.PctMana}<=${int_medPercent} && ${Me.SpellReady[${str_spellYaulp}]})
/if (!${bln_useYaulp}) /return
/if (${bln_engaged} && ${Me.PctMana}<=${int_medPercent} && ${Me.SpellReady[${str_spellYaulp}]}) {
/call MQ2Cast "${str_spellYaulp}" ${str_gemYaulp}
}
/return
|--------------------------------------------------------------------------------
|SUB: setMTFromEvent
|--------------------------------------------------------------------------------
Sub setMTFromEvent(string cmd, string param)
/dgt setMTFromEvent:: ${cmd} ${param}
/call setMT ${param}
/return
Sub EVENT_BattleCleric(string _line, string _sender, string _eventParams)
|--Toggle Battle Cleric mode!
/if (${_eventParams.Equal[ON]}) {
/dgt ${Me.Name} is now a battle cleric!
/varset bln_battleCleric TRUE
}
/if (${_eventParamsEqual[OFF]}) {
/dgt ${Me.Name} is no longer a battle cleric.
/varset bln_battleCleric FALSE
}
/return
|**
----------------------------
INITIALIZATION Subs
----------------------------
Initialization of values for this specific macro variant
----------------------------
**|
Sub variant_initialize
|-- set up default vars
/declare int_CTGTID int outer 0
/declare int_currentFPoint int outer 30
/declare str_action string outer Healing
/declare str_currHeal string outer NULL
|-- Yaulp Settings
/declare bln_useYaulp bool outer ${Ini[INI_CHAR,Yaulp,bln_useYaulp,FALSE]}
/declare str_spellYaulp string outer ${Ini[INI_CHAR,Yaulp,str_spellYaulp,Yaulp VII]}
/declare str_gemYaulp string outer ${Ini[INI_CHAR,Yaulp,str_spellYaulp,gem9]}
|-- Heal Settings
/declare bln_annouce bool outer ${Ini[INI_CHAR,Cleric_Settings,bln_annouce,FALSE]}
/declare str_buffGem string outer ${Ini[INI_CHAR,Cleric_Settings,str_buffGem,gem9]}
|-- Items
/declare str_epicName string outer ${Ini[INI_CHAR,Items,str_epicName,Aegis of Superior Divinity]}
/declare bln_hasEpic bool outer ${Ini[INI_CHAR,Items,bln_hasEpic,FALSE]}
/declare bln_divineArb bool outer ${Ini[INI_CHAR,Items,bln_divineArb,TRUE]}
/declare bln_healAfterArb bool outer ${Ini[INI_CHAR,Items,bln_healAfterArb,TRUE]}
|-- Celestial MGB Rotation
/declare arr_celestial[17] string outer
/memspellset default
/echo \at${Me.Class.Name} Loaded: MT: ${str_MTName}(${int_MTID}) HealPoint:${healPoint} ST: ${str_STName}(${int_STID})
/call InitEvents_Class
/return