-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot_wiz.mac
228 lines (177 loc) · 6.71 KB
/
bot_wiz.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
|**
----------------------------
BOT_WIZ.mac
----------------------------
This macro is configured for use by any melee 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_wiz ${_tank1Name} ${_tank2Name} ${_healPoint} ${_assistArgs}
______________________________________________
REVISION HISTORY
11.09.10 xiris INITIAL REVISION using modified bot_nec
11.16.10 xiris Fixed some of the subs to be inline with latest changes
09.04.15 xiris Changed the variant_initialize to better handle the output from the loader
07.01.16 xiris Added manaburn event
11.11.17 xiris Added support for removal of mq2melee
09.17.18 xiris Included ALL xiris bot libraries in common instead of in individual macros
04.05.22 xiris Added new Events aggregator and handlers
______________________________________________
REQUIRED PLUGINS
mq2cast
mq2eqbc
mq2debuffs
mq2moveutils
______________________________________________
REQUIRED INCLUDES
xiris_common/xiris_common.inc
**|
#include xiris_common/xiris_common.inc
#TURBO 120
#EVENT MANABURN "#*#manaburnON"
#EVENT AEON "#*#aeNukeON"
#EVENT AEOFF "#*#aeNukeOFF"
#EVENT FIRETL "#*#firetl#*#"
Sub InitEvents_Class
/call RegisterClassEvents Events_WIZ 4
/return
Sub Events_WIZ
/doevents AEON
/doevents AEOFF
/doevents MANABURN
/doevents FIRETL
/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} <<
|-- 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
/call chkMTAlive FALSE
|-- 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
|-- dps library (ae caster)
/call chkQNuke
/call chkNuke
/call chkAENuke
/if (${bln_cast_JOLT_enabled}) /call chkDefensiveSpells
|-- 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
|**
----------------------------
Concussion
----------------------------
If Concussion counter is hit, Concussion to kill aggro
----------------------------
**|
Sub chkConcussion
/if (!${bln_engaged} || ${Me.Invis}||${Me.Moving}||!${bln_concUse}) /return
|/echo chkConcussion: ${bln_concUse} && ${Me.Standing} && (${int_concCount}>=${int_concCountActive})
/if (${bln_concUse} && ${Me.Standing} && (${int_concCount}>=${int_concCountActive})) {
/call chkSpellMemorized "${str_concSpell}" ${str_concGem} TRUE
/call MQ2Cast "${str_concSpell}" ${str_concGem}
/varset timer_concDelay ${timer_concDelay.OriginalValue}
/varset int_concCount 0
}
/return
|**
----------------------------
Utility Checking
----------------------------
Checks the utilities such as fail states (GM, Lobby, etc)
Checks to see if we should med, loot, leash
----------------------------
**|
Sub chkUtils
/call chkSit
/varset timer_check_utilities 20s
/return
|**
----------------------------
INITIALIZATION Subs
----------------------------
Initialization of values for this specific macro variant
----------------------------
**|
Sub variant_initialize(string _strTankName, int _intAssistAt, int _intTankHealPoint, string _strTankName2)
|-- set up default vars
/declare str_action string outer Assisting
|--Concussion
/declare bln_concUse bool outer ${Ini[INI_CHAR,JOLT,bln_concUse,TRUE]}
/declare bln_concAggro bool outer ${Ini[INI_CHAR,JOLT,bln_concAggro,FALSE]}
/declare int_concCountActive int outer ${Ini[INI_CHAR,JOLT,int_concCountActive,5]}
/declare str_concSpell string outer ${Ini[INI_CHAR,JOLT,str_concSpell,Ancient: Greater Concussion]}
/declare str_concGem string outer ${Ini[INI_CHAR,JOLT,str_concGem,alt]}
/declare timer_concDelay timer outer ${Ini[INI_CHAR,JOLT,timer_concDelay,3s]}
|--Translocation
/declare bln_tlUse bool outer ${Ini[INI_CHAR,Translocation,bln_tlUse,TRUE]}
/declare str_tlSpell string outer ${Ini[INI_CHAR,Translocation,str_tlSpell,Teleport]}
/declare str_tlGem string outer ${Ini[INI_CHAR,Translocation,str_tlGem,gem6]}
|--Snaring
/declare bln_snareUse bool outer ${Ini[INI_CHAR,Snare,bln_snareUse,FALSE]}
/declare int_snareHP int outer ${Ini[INI_CHAR,Snare,int_snareHP,35]}
/if (!${Defined[str_snareSpell]}) /declare str_snareSpell string outer ${Ini[INI_CHAR,Snare,str_snareSpell,Atol's Spectral Shackles]}
/varset str_snareSpell ${Ini[INI_CHAR,Snare,str_snareSpell,Atol's Spectral Shackles]}
/declare str_snareGem string outer ${Ini[INI_CHAR,Snare,str_snareSpell,alt]}
/declare int_snareLocalNPC int outer ${Ini[INI_CHAR,Snare,int_snareLocalNPC,99]}
/declare bln_snareActive bool outer FALSE
/declare int_snareCounter int outer 0
/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
Sub EVENT_MANABURN
/echo MBURN CALLED
/call MQ2Cast "Mana Burn" alt
/doevents flush
/return
Sub EVENT_AEON
/echo AE Nuking ACTIVE
/varset AENUKE_Active TRUE
/return
SUB EVENT_AEOFF
/echo AE Nuking DISABLED
/varset AENUKE_Active FALSE
/return
SUB EVENT_FIRETL
/if (!${bln_tlUse}) /return
/doevents flush
/dgt Firing TL
/call MQ2Cast "${str_tlSpell}" ${str_tlGem}
/delay 1m
/memspellset ${str_spellset}
/return