-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbot_enc.mac
More file actions
241 lines (184 loc) · 7.17 KB
/
bot_enc.mac
File metadata and controls
241 lines (184 loc) · 7.17 KB
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
|**
----------------------------
BOT_ENC.mac
----------------------------
This macro is configured for use by the enchanter class
Modify the BOT_CLS_CHARNAME.ini file for use by a specific toon
This was written ground up for usage with xiris's bots.
Usage: /mac bot_enc ${intTankID} ${intAssistHP} ${RV_healpoint} ${RV_secondassist}
______________________________________________
REVISION HISTORY
09.27.16 xiris INITIAL REVISION (logic outline from autoenc.mac)
10.24.16 xiris ADDED Buffing from external include
11.14.16 xiris Added support for an exclude list (see xiris_common for include)
09.01.17 xiris Swapped some subs with the better written shaman versions
09.17.18 xiris Included ALL xiris bot libraries in common instead of in individual macros
01.12.22 xiris Modified a bit to work a little smoother
04.01.22 xiris Added Rune Spamming
04.05.22 xiris Added new Events aggregator and handlers
04.16.22 xiris Cleaned up some older code, normalized all vars/name
Added a basis for Mezzing, Charming, MemoryFluxing
______________________________________________
REQUIRED PLUGINS
mq2cast
mq2eqbc
mq2debuffs
mq2moveutils
______________________________________________
REQUIRED INCLUDES
xiris_common/xiris_common.inc
**|
#include xiris_common/xiris_common.inc
#TURBO 120
#EVENT RUNEON "<#1#> RuneOn#*#"
#EVENT RUNEON "[#1#(msg)] RuneOn#*#"
#EVENT RUNEON "#1# tells you,#*#'RuneOn#*#'"
#EVENT RUNEON "#1# tells the group#*#'RuneOn#*#'"
#EVENT RUNEON "#1#tells the raid,#*#'RuneOn#*#'"
#EVENT RUNEONName "<#1#> RuneOn #2#"
#EVENT RUNEONName "[#1#(msg)] RuneOn #2#"
#EVENT RUNEONName "#1# tells you,#*#'RuneOn #2#'"
#EVENT RUNEONName "#1# tells the group#*#'RuneOn #2#'"
#EVENT RUNEONName "#1#tells the raid,#*#'RuneOn #2#'"
#EVENT RUNEOFF "<#1#> RuneOff#*#"
#EVENT RUNEOFF "[#1#(msg)] RuneOff#*#"
#EVENT RUNEOFF "#1# tells you,#*#'RuneOff#*#'"
#EVENT RUNEOFF "#1# tells the group#*#'RuneOff#*#'"
#EVENT RUNEOFF "#1#tells the raid,#*#'RuneOff#*#'"
Sub InitEvents_Class
/call RegisterClassEvents Events_ENC 2
/return
Sub Events_ENC
/doevents RUNEON
/doevents RUNEONName
/doevents RUNEOFF
/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} << @ ${_healPoint} ? ${_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 see if self needs to be cured (xiris_curing.inc)
/call chkNeedCure
|-- Check Auto Assist if its on
/if (${bln_autoAssist}) /call chkAutoAssist
/if (${bln_engaged}) {
|-- check all events
/call RunAllEvents
|-- debuff lib
/if (${${DEBUFF_Total}}) /call chkDebuffsOnSingleTarget ${int_targetID}
|-- class specific
/if (${Pet.ID}) /call chkPetAttack
/if (${int_cmbtBuffTotal} && !${bln_hasCharmedPet}) /call cmbtBuffGRP
|-- dps library (caster)
/if (!${bln_hasCharmedPet}) /call chkDOT
/if (!${bln_hasCharmedPet}) /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
|**
----------------------------
Utility Checking
----------------------------
Checks the utilities such as fail states (GM, Lobby, etc)
Checks to see if we should med, loot, leash
note: these routines are defined in xiris_common for the most part
----------------------------
**|
Sub chkUtils
|-- Class Methods
/call chkPet
|-- Standard Methods
/call chkSit
/varset timer_check_utilities 20s
/return
|**
----------------------------
RUNIC Subs
----------------------------
Handles the chain runing of target (usually MT)
----------------------------
**|
Sub EVENT_RUNEON(_line, _sender, _eventParams)
/varset bln_runeActive TRUE
/call RuneSpam ${_sender}
/return
Sub EVENT_RUNEONName(_line, _sender, _eventParams)
/varset bln_runeActive TRUE
/call RuneSpam ${_eventParams}
/return
Sub RuneSpam(_name)
/echo Runing ${_name}:${str_rune} ${str_runeGem}
/call chkSpellMemorized "${str_rune}" TRUE ${str_runeGem}
:runeLoop
/call TrueTarget ${Spawn[pc ${_name}].ID}
/delay 30s ${Me.SpellReady[${str_rune}]}
/call MQ2Cast "${str_rune}" ${str_runeGem} 5s
/call RunAllEvents
/if (${bln_runeActive}) /goto :runeLoop
/return
Sub EVENT_RUNEOFF
/call RuneSpamOff
/return
Sub RuneSpamOff
/echo --turning rune off--
/varset bln_runeActive FALSE
/return
|**
----------------------------
INITIALIZATION Subs
----------------------------
Initialization of values for this specific macro variant
----------------------------
**|
Sub variant_initialize
|-- set up default vars
/declare str_action string outer Enchanting
|--Enchanter Specific Settings
/declare str_mezSingle string outer ${Ini[INI_CHAR,ENC_Spells,Mez_Single,Euphoria]}
/declare use_mezSingle bool outer ${Ini[INI_CHAR,ENC_Spells,Mez_Single_Use,TRUE]}
/declare int_mezSingleMinLvl int outer ${Ini[INI_CHAR,ENC_Spells,Mez_Single_MinLevel,40]}
/declare int_mezSingleMaxLvl int outer ${Ini[INI_CHAR,ENC_Spells,Mez_Single_MaxLevel,73]}
/declare int_mezSingleGem string outer ${Ini[INI_CHAR,ENC_Spells,Mez_Single_Gem,gem4]}
/declare str_mezAE string outer ${Ini[INI_CHAR,ENC_Spells,Mez_AE,Bliss of the Nihil]}
/declare use_mezAE bool outer ${Ini[INI_CHAR,ENC_Spells,Mez_AE,TRUE]}
/declare int_mezAEMinLvl int outer ${Ini[INI_CHAR,ENC_Spells,Mez_AE_MinLevel,40]}
/declare int_mezAEMaxLvl int outer ${Ini[INI_CHAR,ENC_Spells,Mez_AE_MaxLevel,68]}
/declare int_mezAEGem string outer ${Ini[INI_CHAR,ENC_Spells,Mez_AE_Gem,gem5]}
/declare str_rune string outer ${Ini[INI_CHAR,ENC_Spells,Rune,Rune of Salik]}
/declare use_rune bool outer ${Ini[INI_CHAR,ENC_Spells,Rune_Use,TRUE]}
/declare str_runeGem string outer ${Ini[INI_CHAR,ENC_Spells,Rune_Gem,gem6]}
/declare bln_runeActive bool outer FALSE
/memspellset ${str_spellset}
/echo \at${Me.Class.Name} Loaded: MT: ${str_MTName}(${int_MTID}) HealPoint:${healPoint} ST: ${str_STName}(${int_STID})
/call InitEvents_Class
/return