This is a macro someone suggested that just runs through your Options Window and sets the filters to either show or hide based on 2 pre-configured sets. The sets comprise of the filter settings I use on my main toon (main) and the filter settings I use on my alts (alt). You can configure the filter settings any way you like and set another conditional to check for that.
#Event OptionsWindowFilters "#*#setfilters #1#"
|===============================================================================================
| SUB: Main
|===============================================================================================
Sub Main()
/echo Use the following syntax for executing one of the two pre-defined filter sets
/echo '/echo setfilters main' or '/echo setfilters alt'
:Primeloop
/doevents
/goto :Primeloop
/return
|===============================================================================================
| SUB: Event_OptionsWindowFilters
|===============================================================================================
Sub Event_OptionsWindowFilters(string Line, string Filterset)
|Set a variable named filterSet to hold the input value Filterset
/declare filterSet string local
/declare Proceed int local 0
/declare index int local
|Set up various Filterset values for preset filtering
/if (${Filterset.Equal[main]}) {
/noparse /varset filterSet ${index} == 1 || ${index} == 2 || ${index} == 3 || ${index} == 10 || ${index} == 11 || ${index} == 20 || ${index} == 23 || ${index} == 26 ||${index} == 27 || ${index} == 28 || ${index} == 33
/varset Proceed 1
} else /if (${Filterset.Equal[alt]}) {
/noparse /varset filterSet ${index} == 1 || ${index} == 2 || ${index} == 3 || ${index} == 10 || ${index} == 11 || ${index} == 23 || ${index} == 26 || ${index} == 27 || ${index} == 28
/varset Proceed 1
} else {
/echo You need to use one of the pre-defined filters to apply these changes
/echo By default, the only pre-defined filter sets are either main or alt
/return
}
|Loop through each index in the list of filter options
/for index 1 to ${Window[OptionsWindow].Child[OFP_FilterList].List[stun]}
|Select the index at the value of the iterator named index
/notify OptionsChatPage OFP_FilterList listselect ${Window[OptionsWindow].Child[OFP_FilterList].List[=${Window[OptionsWindow].Child[OFP_FilterList].List[${index}]}]}
|Assign show to the indexes I want the setting to be Show for, if value of index doesn't match then set it to Hide
|If you don't want to be spammed with the settings being applied, comment out the /bc commands, it was used for debugging
/if (${Proceed} == 1) {
/if (${filterSet}) {
/notify OptionsChatPage OFP_FilterComboBox listselect ${Window[OptionsWindow].Child[OFP_FilterComboBox].List[=Show]}
/bc Setting ${Window[OptionsWindow].Child[OFP_FilterList].List[${index}]} to Show
} else {
/notify OptionsChatPage OFP_FilterComboBox listselect ${Window[OptionsWindow].Child[OFP_FilterComboBox].List[=Hide]}
/bc Setting ${Window[OptionsWindow].Child[OFP_FilterList].List[${index}]} to Hide
}
|Add a small delay of .3 seconds so people can see the changes being applied but not be spammed too fast to read
|Feel free to increase or decrease this delay to a value that works for you
/delay 3
}
/next index
/echo Filter set ${Filterset} has been applied, exiting this macro
/end
To explain a bit how this works, here's a super rough ascii chart that shows what settings I have I my main filterset:
1. Achievements | >Show< | Show Mine Only | | Hide |
2. Auctions | >Show< | | | Hide |
3. Bad Word | >Show< | | | Hide |
4. Bard Songs | Show | Show Mine Only | Show Group Only | >Hide< |
5. Bard Songs on Pets | Show | | | >Hide< |
6. Damage Over Time | Show | Show MineOnly | Show Group Only | >Hide< |
7. Damage Shields | Show | | | >Hide< |
8. Fellowship Messages | Show | | | >Hide< |
9. Focus Effectts | Show | | | >Hide< |
10. Group Chat | >Show< | | | Hide |
11. Guild Chat | >Show< | | | Hide |
12. Heal Over Time | Show | | | >Hide< |
13. Item Speech | Show | | | >Hide< |
14. Melee Criticals | Show | | | >Hide< |
15. Mercenary Messages | Show | | | >Hide< |
16. Missed Me | Show | | | >Hide< |
17. My Misses | Show | | | >Hide< |
18. My Pet Hits | Show | | | >Hide< |
19. My Pet Misses | Show | | | >Hide< |
20. NPC Spells | >Show< | | | Hide |
21. Others' Hits | Show | | | >Hide< |
22. Others' Misses | Show | | | >Hide< |
23. Out of Character | >Show< | | | Hide |
24. PC Spells | Show | | | >Hide< |
25. Pet Spells | Show | | | >Hide< |
26. PvP Messages | >Show< | | | Hide |
27. Shouts | >Show< | | | Hide |
28. Socials | >Show< | | | Hide |
29. Spam | Show | | | >Hide< |
30. Spell Criticals | Show | | | >Hide< |
31. Spell Damage | Show | | | >Hide< |
32. Strikethrough Messages | Show | | | >Hide< |
33. Stun Messages | >Show< | | | Hide |
Note that the only ones selected to show are 1, 2, 3, 10, 11, 20, 23, 26, 27, 28, and 33. All other things are set to hide, including the spell damage, spell crits, melee crits. If your pulls are smaller these probably won't lag your out that much, but the bigger pulls get, the more the incoming spam is going to wreak havoc on you so that's why they are filtered to hide for me.
In the macro, I loop through all of the different filters in the list and tell it the ones to set to show specifically and anything that I don't specify is automatically set to hide. Main is set specifically in line 28 of the code assigning a string value to the variable filterSet
/noparse /varset filterSet
with the following conditional:
${index} == 1 || ${index} == 2 || ${index} == 3 || ${index} == 10 || ${index} == 11 || ${index} == 20 || ${index} == 23 || ${index} == 26 ||${index} == 27 || ${index} == 28 || ${index} == 33
${index} is the iterator that increments each time the loop executes, so it's 1 the first time through and 2 the next time through, etc. This directly corresponds to the index on the filter list posted just above. NPC Spells is index 20 on the list, so that's included, for example. The double bar between each equality check is how you code an OR check. So if index is equal to 1 OR index is equal to 2 OR index is equal to 3...until all the indices I want to set to show are listed.
To modify it for yourself, just add or subtract whatever filter in the list you want to set to show. You can also use the show group only or show mine only attributes, but I never do so that's outside the scope of this post. I'm happy to walk anyone through how to do it, I just don't think it's worth wasting time on here.
As with all raw code posted, to make it a macro you open up notepad or any other text editor, File > New and copy/paste the stuff in the code box. File > Save As > File Name: setfilters.mac and Save As Type: All Files(*.*) and into your MQ2>Macros folder.