Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 07:20:19 am *

Login with username, password and session length
Pages: [1]
Print
Author Topic: T10 Kill Count Trackers  (Read 4652 times)
Dimur
Hero Member
Hero Member
*****
Posts: 699


View Profile
« on: November 06, 2018, 02:20:29 pm »

I posted this code in the Quality of Life macros thread, but the thread is getting pretty big and is just a random compilation of mq2 things I post as I learn them.  In the interests of keeping this information easily accessible, I'm branching this off into it's own thread and copying the information to here.

As much as I enjoy trying to figure all this mq2 code out, I realize most people probably either don't know what they need nor have the motivation to learn since very few come from a coding background.  Most people play EZ to get away from having to focus too hard on things they aren't motivated by.  So this next snippet is going to focus on something everyone on EZ should be familiar with again...social hotkeys.  I could post a long line of code and tell you where to copy and paste it and tell you how to execute it in game, but before I get ahead of myself and lose your interest I'm just going to show a hotkey you can use to track kill counts in T10.

This will check to see if you task window is open, if it isn't then it'll open it using the default keybind alt+q.  Then is checks your active quest list to see a quest that matches [IV: For].  If found, it clicks on that quest.  The next line again checks for a quest that matches [IV: For] and puts the task objective(s) into the bccmd window.  I do a second check for the quest before sending the objectives to the bccmd channel because if I didn't, it would send whatever quest I had highlighted's objectives.  Then this button executes the alt+q keypress again to close the window. No multilines, no nested if statements, just 4 simple lines to put into a social hotkey.

For the gnoll kill quest IV: For the Glory of Neriak:
Line 1: /if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /if ((${Window[TaskWnd].Child[TASK_TaskList].List[IV: For,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[IV: For,2]}
Line 3: /if ((${Window[TaskWnd].Child[TASK_TaskList].List[IV: For,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Gnoll Kill Counter
Line 4: /if (${Window[TaskWnd].Open}) /keypress alt+q


Note: This will ONLY work for the specified quest.

The code can be cannibalized and used for other kill quests by simply changing the search parameters for what .List[ ] is looking for.

Now with this handy hotkey, you could keep it simple and have each character with their own so you can cycle to their window and click it whenever you wanted to see their progress.  Most people use /bca and /bcaa commands so they don't have to cycle to each toon to execute a command.  We can do the same thing with this hotkey!  If we add a little bit of code that's familiar (/bca, /bcaa) and a little bit of code that may not be familiar (/noparse and /squelch), we can have a good clean response from all your characters that have the quest you are checking progress on and the ones that are finished or don't have the quest won't litter the channel with any type of response.

/noparse is an MQ2 command that tells MQ2 to not try to parse the following line of text.  What this means is that if I /bcaa //say ${Me.Name}, MQ2 is going to parse that before it broadcasts it and every toon will say the name of the character the code was sent from.  If you prepend it with /noparse, then MQ2 sends the whole string to each character to parse before saying their own names.  So when I'm checking for a quest, I want each character to check their quest window to see if they have it.  Without using /noparse, I'm telling them all if I have the quest.

/squelch is an MQ2 command that tells MQ2 to hide this line of text from the bccmd window. These hotkeys while small, still send a pretty big string of code to evaluate and by default, your bccmd window will show you the command you are being sent to process.  All /squelch does is keep your bccmd window clean.  You can omit squelch if you want to send the result text in a different channel like guild, raid or whatever chat channel you have set up for it.

So we have our plagueborn tracker hotkey.  We want all toons with the plagueborn kill count quest to report their status, so we take this code:
Line 1: /if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /if (${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}
Line 3: /if (${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Plaugeborn Kill Counter
Line 4: /if (${Window[TaskWnd].Open}) /keypress alt+q


...and we prepend each line with /noparse /squelch and /bcaa it to all toons
Line 1: /noparse /squelch /bcaa //if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}
Line 3: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Plaugeborn Kill Counter
Line 4: /noparse /squelch /bcaa //if (${Window[TaskWnd].Open}) /keypress alt+q

Note: Since we are using the /bcaa command we also have to use an extra slash in front of the /if so MQ2 knows that it is executing a /docommand.  This should be familiar to anyone using /bc commands.

I currently don't have any characters working on T10 progression, but if someone can supply the task names I'll update this post with the required code.  Here are the ones I do have:

QFI: Purge the Plagueborn Plagueborn kill 1000 Quest
Line 1: /noparse /squelch /bcaa //if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}
Line 3: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[QFI: Purge,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Plaugeborn Kill Counter
Line 4: /noparse /squelch /bcaa //if (${Window[TaskWnd].Open}) /keypress alt+q

IV: For the Glory of Neriak Gnoll kill 750 Quest
Line 1: /noparse /squelch /bcaa //if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[IV: For,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[IV: For,2]}
Line 3: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[IV: For,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Gnoll Kill Counter
Line 4: /noparse /squelch /bcaa //if (${Window[TaskWnd].Open}) /keypress alt+q

FA: All Full quest name missing but Orc kill 750 Quest
Line 1: /noparse /squelch /bcaa //if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[FA: All,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[FA: All,2]}
Line 3: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[FA: All,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Orc Kill Counter
Line 4: /noparse /squelch /bcaa //if (${Window[TaskWnd].Open}) /keypress alt+q

CFL: Tour Full quest name missing but Sarnak kill 750 Quest
Line 1: /noparse /squelch /bcaa //if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[CFL: Tour,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[CFL: Tour,2]}
Line 3: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[CFL: Tour,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Sarnak Kill Counter
Line 4: /noparse /squelch /bcaa //if (${Window[TaskWnd].Open}) /keypress alt+q

FA: Study Full quest name missing but Orc Weapon Quest
Line 1: /noparse /squelch /bcaa //if (!${Window[TaskWnd].Open}) /keypress alt+q
Line 2: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[FA: Study,2]}) /notify TaskWnd TASK_TaskList listselect ${Window[TaskWnd].Child[TASK_TaskList].List[FA: Study,2]}
Line 3: /noparse /squelch /bcaa //if (${Window[TaskWnd].Child[TASK_TaskList].List[FA: Study,2]}) /bc ${Window[TaskWnd].Child[TASK_TaskElementList].List[1,2]} Plaugeborn Kill Counter
Line 4: /noparse /squelch /bcaa //if (${Window[TaskWnd].Open}) /keypress alt+q

« Last Edit: February 16, 2019, 05:53:51 pm by Dimur » Logged
Pages: [1]
Print
Jump to:  

Recent

Stats

Members
  • Total Members: 6156
  • Latest: Rin1
Stats
  • Total Posts: 65127
  • Total Topics: 5066
  • Online Today: 331
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 0
Guests: 197
Total: 197
TinyPortal v1.0 beta 4 © Bloc