1. #1

    Getting data from LFG search

    So I had an addon idea while I was frustrating myself with Hellbane mobs. I wanted to track custom groups that I was looking for; Deathtalon, Vengeance, Terrorfist and Doomroller. Ie rather than go into LFG tool, search up the group and then spam refresh until a group finally comes up, I'd like to search up a group and then, if possible, literally just wait until such a group exists.

    In rough terms, I was picturing it as something ala this.



    Now my problem is, I did figure out the event for the search results.
    LFG_LIST_SEARCH_FAILED is returned whenever you search but get a failure. An empty search result is not a failure.
    LFG_LIST_SEARCH_RESULTS_RECEIVED appears whenever you complete a search, but it may be empty.
    LFG_LIST_SEARCH_RESULT_UPDATED is the actual search result, each result firing off one of these. Its only appears to be a group id.

    Going from there however, I ran into a problem immediately: I have literally no idea what to call with the group id. No amount of attempts with the various LFG-related API or such seem to return anything sensible. I was hoping to simply get something ala:

    LF LEATHER TRADER (x tanks, y healers, z dps)

    Anyone wiser than me know where in hells' bells this information can be found in all this mess?

  2. #2
    Having a quick look at the docs, something like this should be useful

    Code:
    C_LFGList.Search(6, "Doomroller") -- 6 = "Custom" category
    numResults, resultIDTable = C_LFGList.GetSearchResults();
    for k,v in pairs(resultIDTable) do
        local id, activityID, name, comment, voiceChat, iLvl, age, numBNetFriends, numCharFriends, numGuildMates, isDelisted, leaderName, numMembers = C_LFGList.GetSearchResultInfo(v);
    
       --Blah blah
    end
    Last edited by LuaKT; 2015-07-05 at 04:13 PM.

  3. #3
    Thanks for the help. I've since figured it out about simultaneously, hugely with help from reading the lua behind the addon Premade Notifier that, also, did a lot of what I was looking to do.

  4. #4
    Not to sound bad about this since I am not adding to the help, but dont those mobs die too fast to be listed on on Custom LFG or you talking about searching rare mob hunting groups?

  5. #5
    Quote Originally Posted by Faeldan_US View Post
    Not to sound bad about this since I am not adding to the help, but dont those mobs die too fast to be listed on on Custom LFG or you talking about searching rare mob hunting groups?
    If you're camping out a spot you'll usually get a group that hasn't quite killed it yet, though it may take a few attempts. With that said, I'm looking for this kind of stuff to be able to search LFG for various things that may not necessarily be related to this particular stuff.

    - - - Updated - - -

    Quote Originally Posted by LuaKT View Post
    Etc
    Idle curiosity though, where did you get data on what C_LFGList.GetSearchResultInfo(v) contains? It's that kind of stuff that I'm trying to figure out, less than how to code per se. Most of what I've been looking for seems undocumented, but clearly others are more aware of what it does seeing as they use stuff like this...

  6. #6
    Quote Originally Posted by Drunkenvalley View Post
    If you're camping out a spot you'll usually get a group that hasn't quite killed it yet, though it may take a few attempts. With that said, I'm looking for this kind of stuff to be able to search LFG for various things that may not necessarily be related to this particular stuff.

    - - - Updated - - -



    Idle curiosity though, where did you get data on what C_LFGList.GetSearchResultInfo(v) contains? It's that kind of stuff that I'm trying to figure out, less than how to code per se. Most of what I've been looking for seems undocumented, but clearly others are more aware of what it does seeing as they use stuff like this...
    Blizzard don't provide documentation for their functions so often you'll need to just look in the code.
    Resike has a repository on Github called BlizzardInterfaceCode
    On line 2013 in LFGList.lua you'll see what to expect from C_LFGList.GetSearchResultInfo(v)

  7. #7
    Quote Originally Posted by LuaKT View Post
    Etc
    Nice. Thank you, that's a great help.

  8. #8
    I actually had the same idea last week, so I made a small addon.
    It is based on Premade Group Finder by Ant. So all credits go to him!

    It searches the Premade Group list every few seconds for the Hellbane Rars, which I did not kill on that day. And reports any group it finds. I also added a convinient feature that automaticually joins the group if I'm near the spawn point of each Rare.

    deathtalon: Aktar's Post, Ruins of Kra'nak
    terrorfist: Rangari Refuge
    doomroller: Warcamp Gromdar (just beside that pet battle)
    vengeance: Temple of Sha'naar

    That make it work only on English clients, as I did not get the names of that subzones.

    I made it mainly only for myself, so it's not perfect but it does the job well.

    I am not allowed to post links, but I have uploaded it to GitHub, you find it when you look for my username there.

    https://github.com/Hiale/HellbaneHelper
    Last edited by lawomous; 2015-07-09 at 10:53 PM.

  9. #9
    Stood in the Fire
    15+ Year Old Account
    Join Date
    Mar 2007
    Location
    Denmark
    Posts
    413
    Quote Originally Posted by Hiale View Post
    I actually had the same idea last week, so I made a small addon.
    It is based on Premade Group Finder by Ant. So all credits go to him!

    It searches the Premade Group list every few seconds for the Hellbane Rars, which I did not kill on that day. And reports any group it finds. I also added a convinient feature that automaticually joins the group if I'm near the spawn point of each Rare.

    deathtalon: Aktar's Post, Ruins of Kra'nak
    terrorfist: Rangari Refuge
    doomroller: Warcamp Gromdar (just beside that pet battle)
    vengeance: Temple of Sha'naar

    That make it work only on English clients, as I did not get the names of that subzones.

    I made it mainly only for myself, so it's not perfect but it does the job well.

    I am not allowded to post links, but I have uploaded it to GitHub, you find it when you look for my username there.
    How does that autogroup thing work? I did nothing for me today while being at Terrorfists location. Also - slightly annoying it spams keywords every time your zone changes.

  10. #10
    Quote Originally Posted by Zungate View Post
    How does that autogroup thing work? I did nothing for me today while being at Terrorfists location. Also - slightly annoying it spams keywords every time your zone changes.
    Ah yeah, sorry about the spamming. I disabled it. First, I found out that first time a char logs in, you have to do a manual search, after that the automatic ones should work. And in Terrorfists case... there is a small Draenei village where you should stay (Rangari Refuge), the autogroup feature should work there.

  11. #11
    Hmm, tried the addon but it tells me in the addon screen it's incompatible.

  12. #12
    Quote Originally Posted by Drunkenvalley View Post
    So I had an addon idea while I was frustrating myself with Hellbane mobs. I wanted to track custom groups that I was looking for; Deathtalon, Vengeance, Terrorfist and Doomroller. Ie rather than go into LFG tool, search up the group and then spam refresh until a group finally comes up, I'd like to search up a group and then, if possible, literally just wait until such a group exists.

    In rough terms, I was picturing it as something ala this.

    <snip>

    Now my problem is, I did figure out the event for the search results.
    LFG_LIST_SEARCH_FAILED is returned whenever you search but get a failure. An empty search result is not a failure.
    LFG_LIST_SEARCH_RESULTS_RECEIVED appears whenever you complete a search, but it may be empty.
    LFG_LIST_SEARCH_RESULT_UPDATED is the actual search result, each result firing off one of these. Its only appears to be a group id.

    Going from there however, I ran into a problem immediately: I have literally no idea what to call with the group id. No amount of attempts with the various LFG-related API or such seem to return anything sensible. I was hoping to simply get something ala:

    LF LEATHER TRADER (x tanks, y healers, z dps)

    Anyone wiser than me know where in hells' bells this information can be found in all this mess?
    You know, that actually looks sexy as fuck with how you presented it in the screenshot, if you do finish making this addon, please publish it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •