1
+ |
2
+ | FindAugsCmd . inc r1
3
+ | Adds eqbc chat commands for listing unused augs .
4
+ | Run these commands to create aliases :
5
+ | /alias /whitelistaug /echo WhiteList Aug
6
+ | /alias /blacklistaug /echo BlackList Aug
7
+ | /alias /findaugs /bc FindAugs
8
+ | /alias /findotheraugs /bc FindOtherAugs
9
+ |
10
+ | Augs will only be reported if they are on the white list .
11
+ | To add an aug to the whitelist : (Item links may be used )
12
+ | /whitelistaug Super Cool Augmentation of Doom
13
+ |
14
+ | Use /blacklistaug to place an aug on blacklist . A blacklisted aug will never be displayed .
15
+ |
16
+ | Use /findotheraugs to find augs currently not placed on either list . It will not display blacklisted augs .
17
+ |
18
+
19
+ # Event WhiteListAug "[MQ2] WhiteList Aug #1#"
20
+ # Event BlackListAug "[MQ2] BlackList Aug #1#"
21
+
22
+ # Event FindAugsCmd "<#1#> FindAugs#2#"
23
+ Sub Event_FindAugsCmd (line , ChatSender , eventParams )
24
+ | -Verify the event
25
+ /call verifyEvent "${ChatSender} " "${line} "
26
+ /varset ChatSender ${Macro.Return.Arg[1,_]}
27
+ | |-----------Valid User ----------| |--------Included Bot -----------| |-----------In Zone -------------| |------------In Range ------------|
28
+ /if (${Bool[${Macro.Return.Arg[2,_]} ]} && ${Bool[${Macro.Return.Arg[3,_]} ]} && ${Bool[${Macro.Return.Arg[4,_]} ]} && ${Bool[${Macro.Return.Arg[5,_]} ]}) {
29
+ /if (!${Defined[facReturn]} ) /declare facReturn string outer
30
+ /call ForEachAug DisplayIfWhiteListed
31
+ } else {
32
+ }
33
+ /return
34
+
35
+ # Event FindOtherAugsCmd "<#1#> FindOtherAugs#2#"
36
+ Sub Event_FindOtherAugsCmd (line , ChatSender , eventParams )
37
+ | -Verify the event
38
+ /call verifyEvent "${ChatSender} " "${line} "
39
+ /varset ChatSender ${Macro.Return.Arg[1,_]}
40
+ | |-----------Valid User ----------| |--------Included Bot -----------| |-----------In Zone -------------| |------------In Range ------------|
41
+ /if (${Bool[${Macro.Return.Arg[2,_]} ]} && ${Bool[${Macro.Return.Arg[3,_]} ]} && ${Bool[${Macro.Return.Arg[4,_]} ]} && ${Bool[${Macro.Return.Arg[5,_]} ]}) {
42
+ /if (!${Defined[facReturn]} ) /declare facReturn string outer
43
+ /call ForEachAug DisplayIfUnlisted
44
+ } else {
45
+ }
46
+ /return
47
+
48
+ Sub ForEachAug (callback )
49
+ /declare packSlot int local
50
+ /declare index int local
51
+ /declare itemName string local
52
+ /for index 23 to 30
53
+ /if (${Me.Inventory[${index} ]. Container }) {
54
+ /for packSlot 1 to 10
55
+ /if (${Me.Inventory[${index} ]. Item [${packSlot} ]. ID } && ${Me.Inventory[${index} ]. Item [${packSlot} ]. AugType }) {
56
+ /varset itemName ${Me.Inventory[${index} ]. Item [${packSlot} ]. Name }
57
+ /call ${callback} "${itemName} "
58
+ }
59
+ /next packSlot
60
+ } else {
61
+ /if (${Me.Inventory[${index} ]. ID } && ${Me.Inventory[${index} ]. AugType }) {
62
+ /varset itemName ${Me.Inventory[${index} ]. Name }
63
+ /call ${callback} "${itemName} "
64
+ }
65
+ }
66
+ /next index
67
+ /return
68
+
69
+ Sub DisplayIfWhiteListed (itemName )
70
+ /call FAC_IsWhiteListed "${itemName} " facReturn
71
+ /if (${facReturn} ) /bc Found Aug : ${itemName}
72
+ /return
73
+
74
+ Sub DisplayIfUnlisted (itemName )
75
+ /call FAC_IsWhiteListed "${itemName} " facReturn
76
+ /if (!${facReturn} ) {
77
+ /call FAC_IsBlackListed "${itemName} " facReturn
78
+ /if (!${facReturn} ) {
79
+ /bc Unlisted Aug : ${itemName}
80
+ }
81
+ }
82
+ /return
83
+
84
+ Sub FAC_IsWhiteListed (itemName , destVar )
85
+ /varset ${destVar} ${Ini[${augfinder_ini} , Whitelist , ${itemName.Replace[ ,_].Replace[',].Replace[`,]} , ${Ini[augfinder.ini,Whitelist,All,0]} ]}
86
+ /return
87
+
88
+ Sub FAC_IsBlackListed (itemName , destVar )
89
+ /varset ${destVar} ${Ini[${augfinder_ini} , Blacklist , ${itemName.Replace[ ,_].Replace[',].Replace[`,]} , 0 ]}
90
+ /return
91
+
92
+ Sub Event_WhiteListAug (line , args )
93
+ /if (${args.Find[]} ) {
94
+ /varset args ${args.Right[-51].Left[-1]}
95
+ }
96
+ /ini "${augfinder_ini} " "Whitelist" "${args.Replace[ ,_].Replace[',].Replace[`,]} " "1"
97
+ /call FAC_IsBlackListed "${args} " facReturn
98
+ /if (${facReturn} ) {
99
+ /ini "${augfinder_ini} " "Blacklist" "${args.Replace[ ,_].Replace[',].Replace[`,]} " "0"
100
+ }
101
+ /echo Added ${args} to Whitelist
102
+ /return
103
+
104
+ Sub Event_BlackListAug (line , args )
105
+ /if (${args.Find[]} ) {
106
+ /varset args ${args.Right[-51].Left[-1]}
107
+ }
108
+ /ini "${augfinder_ini} " "Blacklist" "${args.Replace[ ,_].Replace[',].Replace[`,]} " "1"
109
+ /call FAC_IsWhiteListed "${args} " facReturn
110
+ /if (${facReturn} ) {
111
+ /ini "${augfinder_ini} " "Whitelist" "${args.Replace[ ,_].Replace[',].Replace[`,]} " "0"
112
+ }
113
+ /echo Added ${args} to Blacklist
114
+ /return
115
+
116
+ Sub FAC_GetAugSlots (itemName , destVar )
117
+ /varset ${destVar}
118
+ /declare Pow2Iter string local 1 |2 |4 |8 |16 |32 |64 |128 |256 |512 |1024 |2048
119
+ /declare i int local 0
120
+ /declare itemAugType int local ${FindItem[${itemName} ]. AugType }
121
+ /declare thisIter int local
122
+ /for i 1 to ${Math.Calc[${Pow2Iter.Count[|]} +1 ]}
123
+ /varset thisIter ${Pow2Iter.Arg[${i} , |]}
124
+ /if ((${itemAugType} & ${thisIter} ) == ${thisIter} ) {
125
+ /varset ${destVar} ${${destVar} }|${i}
126
+ }
127
+ /next i
128
+ /varset ${destVar} ${${destVar} }|
129
+ /return
130
+
131
+ Sub FAC_OldFilterByAugSlots
132
+ |old code from main function , may want functionality later , idk
133
+ /declare argIndex int local
134
+ /declare showAug int local
135
+ /if (!${Defined[AugSlotsFound]} ) /declare AugSlotsFound string outer
136
+ /call FAC_GetAugSlots "${Me.Inventory[${index} ].Item[${packSlot} ].Name}" AugSlotsFound
137
+ /if (${Defined[args]} ) {
138
+ /varset showAug 0
139
+ /for argIndex 1 to ${Math.Calc[${args.Count[ ]} +1 ]}
140
+ /if (${AugSlotsFound.Find[|${args.Arg[${argIndex} , ]}|]}) {
141
+ /varset showAug 1
142
+ }
143
+ /next argIndex
144
+ /if (${showAug} ) {
145
+ /bc Aug Found : ${Me.Inventory[${index} ]. Item [${packSlot} ]. Name } Slots : ${AugSlotsFound.Replace[|, ]}
146
+ }
147
+ } else {
148
+ /bc Aug Found : ${Me.Inventory[${index} ]. Item [${packSlot} ]. Name } Slots : ${AugSlotsFound.Replace[|, ]}
149
+ }
150
+ /return
151
+
152
+ Sub DisplayIfItemAugWhiteListed (augname , itemName )
153
+ /call FAC_IsWhiteListed "${augname} " facReturn
154
+ /if (${facReturn} ) /bc Found Aug : ${itemName} : ${augname}
155
+ /return
156
+
157
+ Sub ForEachItem (callback )
158
+ /declare packSlot int local
159
+ /declare index int local
160
+ /declare itemName string local
161
+ /declare augName string local
162
+ /declare augcount int local
163
+ /declare augs int local
164
+
165
+ /for index 23 to 30
166
+ /if (${Me.Inventory[${index} ]. Container }) {
167
+ /for packSlot 1 to 10
168
+ /if (${Me.Inventory[${index} ]. Item [${packSlot} ]. ID } && ${Me.Inventory[${index} ]. Item [${packSlot} ]. Augs } > 0 ) {
169
+ /varset augcount ${Me.Inventory[${index} ]. Augs }
170
+ /for augs 1 to ${augcount}
171
+ /varset augName ${Me.Inventory[${index} ]. Item [${packSlot} ]. Item [${augs} ]}
172
+ /varset itemName ${Me.Inventory[${index} ]. Item [${packSlot} ]. Name }
173
+ /call ${callback} "${augName} " "${itemName} "
174
+ /next augs
175
+ }
176
+ /next packSlot
177
+ } else {
178
+ /if (${Me.Inventory[${index} ]. ID } && ${Me.Inventory[${index} ]. Augs } > 0 ) {
179
+ /varset augcount ${Me.Inventory[${index} ]. Augs }
180
+ /for augs 1 to ${augcount}
181
+ /varset augName ${Me.Inventory[${index} ]. Item [${augs} ]}
182
+ /varset itemName ${Me.Inventory[${index} ]. Name }
183
+ /call ${callback} "${augName} " "${itemName} "
184
+ /next augs
185
+ }
186
+ }
187
+ /next index
188
+ /return
189
+
190
+ # Event FindAugedCmd "<#1#> FindAuged#2#"
191
+ Sub Event_FindAugedCmd (line , ChatSender , eventParams )
192
+ | -Verify the event
193
+ /call verifyEvent "${ChatSender} " "${line} "
194
+ /varset ChatSender ${Macro.Return.Arg[1,_]}
195
+ | |-----------Valid User ----------| |--------Included Bot -----------| |-----------In Zone -------------| |------------In Range ------------|
196
+ /if (${Bool[${Macro.Return.Arg[2,_]} ]} && ${Bool[${Macro.Return.Arg[3,_]} ]} && ${Bool[${Macro.Return.Arg[4,_]} ]} && ${Bool[${Macro.Return.Arg[5,_]} ]}) {
197
+ /if (!${Defined[facReturn]} ) /declare facReturn string outer
198
+ /call ForEachItem DisplayIfItemAugWhiteListed
199
+ } else {
200
+ }
201
+ /return
202
+
203
+ Sub FindAugsCMD_Background_Events
204
+ /doevents FindAugedCmd
205
+ /doevents FindOtherAugsCmd
206
+ /doevents WhiteListAug
207
+ /doevents BlackListAug
208
+ /return
209
+
210
+ Sub FindAugsCMD_Aliases
211
+ /alias /whitelistaug /echo WhiteList Aug
212
+ /alias /blacklistaug /echo BlackList Aug
213
+ /alias /findaugs /bc FindAugs
214
+ /alias /findotheraugs /bc FindOtherAugs
215
+ /return
216
+
217
+ Sub FindAugsCMD_Setup
218
+ /declare augfinder_ini e3 Macro Inis \findaugscmd . ini
219
+ /return
220
+
221
+ Sub FindAugsCMD_CharacterSettings
222
+ /return
223
+
224
+ Sub FindAugsCMD_MacroSettings
225
+ /return
0 commit comments