-
Notifications
You must be signed in to change notification settings - Fork 1
/
bot_rng.mac
218 lines (173 loc) · 6.85 KB
/
bot_rng.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
|**
----------------------------
BOT_RNG.mac
----------------------------
This macro is configured for use by only the ranger class
Modify the BOT_RNG_CHARNAME.ini file for use by a specific toon
This was written ground up for usage with xiris's bots
Usage: /mac bot_rng ${intTankID} ${intAssistHP} ${RV_healpoint} ${RV_secondassist}
______________________________________________
REVISION HISTORY
12.03.15 xiris INITIAL REVISION
10.27.16 xiris ADDED Buffing from external include
11.22.16 xiris REMOVED Range attack 'cause it's useless post POP
09.17.18 xiris Included ALL xiris bot libraries in common instead of in individual macros
04.16.22 xiris Overhauled group heal method and variable names
Moved commons healing functions to the include
______________________________________________
REQUIRED PLUGINS
mq2cast
mq2eqbc
mq2debuffs
mq2moveutils
______________________________________________
REQUIRED INCLUDES
xiris_common/xiris_common.inc
**|
#include xiris_common/xiris_common.inc
#TURBO 120
#EVENT AutoFireOn "#*#AutoFire on#*#"
#EVENT AutoFireOff "#*#AutoFire off#*#"
Sub InitEvents_Class
|/call RegisterClassEvents Events_RNG 0
/return
Sub Events_RNG
/doevents AutoFireOn
/doevents AutoFireOff
/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 see if self needs to be cured (xiris_curing.inc)
/call chkNeedCure
|-- Check the group for healing (xiris_healing.inc)
/call chkHeal_Self
|-- Check Auto Assist if its on
/if (${bln_autoAssist}) /call chkAutoAssist
/if (${bln_engaged}) {
|-- check all events
/call RunAllEvents
|-- melee library
/if (!${mq2meleeEnabled}) /call chkCA_${Me.Class.ShortName}
|-- dps library (casting hybrid)
/call chkNuke
|-- std library (burns/aa/clicks)
/call chkAA
/call chkBurn
|/call chkCryActive
/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
----------------------------
**|
Sub chkUtils
|-- Standard Methods
/call chkSit
/varset timer_check_utilities 20s
/return
|**
----------------------------
Concussion
----------------------------
If Concussion counter is hit, Concussion to kill aggro
----------------------------
**|
Sub chkConcussion
/if (!${bln_engaged} || ${Me.Invis}||${Me.Moving}||!${bln_concUse}) /return
/if (${bln_concUse} && ${Me.Standing} && (!${timer_concDelay} || ${Me.TargetOfTarget.Name.Equal[${Me.Name}]})) {
/call chkSpellMemorized "${str_concSpell}" ${str_concGem} FALSE
/call MQ2Cast "${str_concSpell}" ${str_concGem}
/varset timer_concDelay ${timer_concDelay.OriginalValue}
/varset int_concCount 0
}
/return
|**
----------------------------
INITIALIZATION Sub
----------------------------
Initialization of values for this specific macro variant
----------------------------
**|
Sub variant_initialize
|-- set up default vars
/declare str_action string outer Assisting
|-- set up ranger specific variables
/declare bln_preEngaged bool outer FALSE
/declare bln_snared bool outer FALSE
/declare timer_nuke timer outer 0
/declare timer_dot timer outer 0
/declare timer_hail timer outer 0
/declare timer_sit timer outer 0
/declare int_prevSpell int outer 0
/declare str_excludes string outer
|--Archery
/declare bln_archeryAuto bool outer TRUE
/declare bln_autoFireState bool outer FALSE
/declare int_archeryDist int outer ${Ini[INI_CHAR,Settings,archeryDist,200]}
|--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,Concussion]}
/declare str_concGem string outer ${Ini[INI_CHAR,JOLT,str_concGem,alt]}
/declare timer_concDelay timer outer ${Ini[INI_CHAR,JOLT,timer_concDelay,10s]}
|--Hail of Arrows
| note: not available in POP
/declare bln_useHail bool outer ${Ini[INI_CHAR,HailOfArrows,bln_hailofarrows,FALSE]}
/declare str_hailSpell string outer ${Ini[INI_CHAR,HailOfArrows,str_hailSpell,Barrage of Arrows]}
/declare int_hailAt int outer ${Ini[INI_CHAR,HailOfArrows,int_hailAt,95]}
/declare int_hailStop int outer ${Ini[INI_CHAR,HailOfArrows,int_hailStop,10]}
/declare int_hailDelay int outer ${Ini[INI_CHAR,HailOfArrows,int_hailDelay,320]}
|--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_AutoFireOn
/varset bln_autoFireState TRUE
/return
Sub Event_AutoFireOff
/varset bln_autoFireState FALSE
/return