1. I've been looking over the listed API calls for faction functions, however I don't see anything that gives me the faction ID (not standing ID). Is there a way I can get the faction ID of lets say the faction that's being watched? And I mean without looking it up on wowhead ;P

    GetQuestLogRewardFactionInfo Apparently does this? But it's not documented and looks like it's only for current quests. Any ideas?

  2. It doesn't look like that information is currently exposed by the API for anything other than a quest that rewards reputation with a given faction, as you've indicated.

  3. To be honest, it looks like reputation was an after thought in the game, and not put together well. The whole system (as far as programming for) seems cumbersome.

    Thanks for your help though!

  4. Most systems are like that. WoW is in a transition to using faction IDs throughout the user interface, but the only place that is being done right now is the quest log. You can expect the API to improve as more things are needed. That's how most of these systems grow.

    It's not unique, most other systems are very similar.

  5. If I were to create a list of the current reputations linking their id's, what do you think would be the best way to do that. Currently I can only think of one simple way...

    Having a function that accepts the name of the reputation you are looking at, and returns the id number if it's a match.

    I was looking at maybe using tables where table.whatever is the name of the rep, but I don't think that I can use spaces and apostrophes in the name right?

  6. If I were to create a list of the current reputations linking their id's, what do you think would be the best way to do that. Currently I can only think of one simple way...

    Having a function that accepts the name of the reputation you are looking at, and returns the id number if it's a match.

    I was looking at maybe using tables where table.whatever is the name of the rep, but I don't think that I can use spaces and apostrophes in the name right?

    All you need is a table:

     local factions = {
       ["Alliance Vanguard"] = 1037,
       ["Bloodsail Buccaneers"] = 87,
     }
    

    The problem is I do not know if these are consistent across locales, I believe they are not, so your code would only work on EN clients. You don't need to use table.whatever to access a table, you can always use table[key], in this case table["Alliance Vanguard"] or table[factionName].

  7. Just in case someone wants it. I haven't verified there were no typos but there was a lot of typing.

     local factionIDs = {
       ["Alliance Vanguard"] = 1037,
       ["Argent Crusade"] = 1106,
       ["Argent Dawn"] = 529,
       ["Ashtongue Deathsworn"] = 1012,
       ["Baradin's Wardens"] = 1177,
       ["Bilgewater Cartel"] = 1133,
       ["Bloodsail Buccaneers"] = 87,
       ["Booty Bay"] = 21,
       ["Brood of Nozdormu"] = 910,
       ["Cenarion Circle"] = 609,
       ["Cenarion Expedition"] = 942,
       ["Darkmoon Faire"] = 909,
       ["Darkspear Trolls"] = 530,
       ["Darnassus"] = 69,
       ["Dragonmaw Clan"] = 1172,
       ["Everlook"] = 577,
       ["Exodar"] = 930,
       ["Explorers' League"] = 1068,
       ["Frenzyheart Tribe"] = 1104,
       ["Frostwolf Clan"] = 729,
       ["Gadgetzan"] = 369,
       ["Gelkis Clan Centaur"] = 92,
       ["Gilneas"] = 1134,
       ["Gnomeregan"] = 54,
       ["Guardians of Hyjal"] = 1158,
       ["Guild"] = 1168,
       ["Hellscream's Reach"] = 1178,
       ["Honor Hold"] = 946,
       ["Horde Expedition"] = 1052,
       ["Hydraxian Waterlords"] = 749,
       ["Ironforge"] = 47,
       ["Keepers of Time"] = 989,
       ["Kirin Tor"] = 1090,
       ["Knights of the Ebon Blade"] = 1098,
       ["Kurenai"] = 978,
       ["Lower City"] = 1011,
       ["Magram Clan Centaur"] = 93,
       ["Netherwing"] = 1015,
       ["Orgi'la"] = 1038,
       ["Orgrimmar"] = 76,
       ["Ramkahen"] = 1173,
       ["Ratchet"] = 470,
       ["Ravenholdt"] = 349,
       ["Sha'tari Skyguard"] = 1031,
       ["Shattered Sun Offensive"] = 1077,
       ["Shen'dralar"] = 809,
       ["Silvermoon City"] = 911,
       ["Silverwing Sentinels"] = 890,
       ["Sporeggar"] = 970,
       ["Stormpike Guard"] = 730,
       ["Stormwind"] = 72,
       ["Syndicate"] = 70,
       ["The Aldor"] = 932,
       ["The Ashen Verdict"] = 1156,
       ["The Consortium"] = 933,
       ["The Defilers"] = 510,
       ["The Earthen Ring"] = 1135,
       ["The Frostborn"] = 1126,
       ["The Hand of Vengeance"] = 1067,
       ["The Kalu'ak"] = 1073,
       ["The League of Arathor"] = 509,
       ["The Mag'har"] = 941,
       ["The Oracles"] = 1105,
       ["The Scale of the Sands"] = 990,
       ["The Scryers"] = 934,
       ["The Sha'tar"] = 935,
       ["The Silver Covenant"] = 1094,
       ["The Sons of Hodir"] = 1119,
       ["The Sunreavers"] = 1124,
       ["The Taunka"] = 1064,
       ["The Violet Eye"] = 967,
       ["The Wyrmrest Accord"] = 1091,
       ["Therazane"] = 1171,
       ["Thorium Brotherhood"] = 59,
       ["Thrallmar"] = 947,
       ["Thunder Bluff"] = 81,
       ["Timbermaw Hold"] = 576,
       ["Tranquillien"] = 922,
       ["Undercity"] = 68,
       ["Valiance Expedition"] = 1050,
       ["Warsong Offensive"] = 1085,
       ["Warsong Outriders"] = 889,
       ["Wildhammer Clan"] = 1174,
       ["Wintersaber Trainers"] = 589,
       ["Zandalar Tribe"] = 270
     }
    
  8. Wouldn't be too terrible to get this from sigrie or wowhead programtically.

  9. I haven't done anything like that for years. I wrote a vb program that would database counter-strike teams off of a website and allow you to search for people based on clan, id, name or whatever... but I don't have vb anymore, so I'm not sure how I'd do this anymore. I guess I could parse the source of the page in some kind of script.... I hate it when I answer myself in a post.

  10. This was parsed from the wowhead website source, so it is as correct as they are in accuracy. Here's the parser I made if anyone cares: http://waddellconsulting.com/parser.php

     local factions = {
       ["Alliance Vanguard"] = 1037,
       ["Argent Crusade"] = 1106,
       ["Argent Dawn"] = 529,
       ["Ashtongue Deathsworn"] = 1012,
       ["Baradin's Wardens"] = 1177,
       ["Bilgewater Cartel"] = 1133,
       ["Bloodsail Buccaneers"] = 87,
       ["Booty Bay"] = 21,
       ["Brood of Nozdormu"] = 910,
       ["Cenarion Circle"] = 609,
       ["Cenarion Expedition"] = 942,
       ["Darkmoon Faire"] = 909,
       ["Darkspear Trolls"] = 530,
       ["Darnassus"] = 69,
       ["Dragonmaw Clan"] = 1172,
       ["Everlook"] = 577,
       ["Exodar"] = 930,
       ["Explorers' League"] = 1068,
       ["Frenzyheart Tribe"] = 1104,
       ["Frostwolf Clan"] = 729,
       ["Gadgetzan"] = 369,
       ["Gelkis Clan Centaur"] = 92,
       ["Gilneas"] = 1134,
       ["Gnomeregan"] = 54,
       ["Guardians of Hyjal"] = 1158,
       ["Guild"] = 1168,
       ["Hellscream's Reach"] = 1178,
       ["Honor Hold"] = 946,
       ["Horde Expedition"] = 1052,
       ["Hydraxian Waterlords"] = 749,
       ["Ironforge"] = 47,
       ["Keepers of Time"] = 989,
       ["Kirin Tor"] = 1090,
       ["Knights of the Ebon Blade"] = 1098,
       ["Kurenai"] = 978,
       ["Lower City"] = 1011,
       ["Magram Clan Centaur"] = 93,
       ["Netherwing"] = 1015,
       ["Ogri'la"] = 1038,
       ["Orgrimmar"] = 76,
       ["Ramkahen"] = 1173,
       [Ratchet"] = 470,
       ["Ravenholdt"] = 349,
       ["Sha'tari Skyguard"] = 1031,
       ["Shattered Sun Offensive"] = 1077,
       ["Shen'dralar"] = 809,
       ["Silvermoon City"] = 911,
       ["Silverwing Sentinels"] = 890,
       ["Sporeggar"] = 970,
       ["Stormpike Guard"] = 730,
       ["Stormwind"] = 72,
       ["Syndicate"] = 70,
       ["The Aldor"] = 932,
       ["The Ashen Verdict"] = 1156,
       ["The Consortium"] = 933,
       ["The Defilers"] = 510,
       ["The Earthen Ring"] = 1135,
       ["The Frostborn"] = 1126,
       ["The Hand of Vengeance"] = 1067,
       ["The Kalu'ak"] = 1073,
       ["The League of Arathor"] = 509,
       ["The Mag'har"] = 941,
       ["The Oracles"] = 1105,
       ["The Scale of the Sands"] = 990,
       ["The Scryers"] = 934,
       ["The Sha'tar"] = 935,
       ["The Silver Covenant"] = 1094,
       ["The Sons of Hodir"] = 1119,
       ["The Sunreavers"] = 1124,
       ["The Taunka"] = 1064,
       ["The Violet Eye"] = 967,
       ["The Wyrmrest Accord"] = 1091,
       ["Therazane"] = 1171,
       ["Thorium Brotherhood"] = 59,
       ["Thrallmar"] = 947,
       ["Thunder Bluff"] = 81,
       ["Timbermaw Hold"] = 576,
       ["Tranquillien"] = 922,
       ["Undercity"] = 68,
       ["Valiance Expedition"] = 1050,
       ["Warsong Offensive"] = 1085,
       ["Warsong Outriders"] = 889,
       ["Wildhammer Clan"] = 1174,
       ["Wintersaber Trainers"] = 589,
       ["Zandalar Tribe"] = 270
     }
    

    The PHP source is below:

     <?php
     function parseIt($data){
       $myOffset = 0;
       while (strpos($data, '"id":', $myOffset)) {
         $posA = strpos($data, '"id":', $myOffset);
         $posB = strpos($data, ',"name":', $myOffset);
         $posC = strpos($data, '"', $posB + 9);
         $id = substr($data, $posA + 5, $posB - $posA - 5);
         $name = substr($data, $posB + 9, $posC - $posB - 9);
         $output = "[\"$name\"] = $id,";
         echo "$output<br />";
         $myOffset = $posC;
       }
     }
    
     if (!$_POST) {
       $demo = "{\"category\":0,\"category2\":1097,\"expansion\":2,\"id\":1037,\"name\":\"Alliance Vanguard\",\"side\":1}";
       echo "<center><h3>This parses the source code from wowhead website to gather all factions and their IDs</h3>
       <form method=\"post\" action=\"" . $SERVER["PHP_SELF"] . "\" id=\"parse-it\">
       <textarea cols=\"80\" rows=\"20\" name=\"toParse\">Copy and paste in this format: $demo</textarea><br />
       <a href=\"#\" onclick=\"document.getElementById('parse-it').submit()\">Parse It</a>
       </form></center>";
     } else if ($_POST) {
       $data = $_POST["toParse"];
       echo "<center><h3>This parses the source code from wowhead website to gather all factions and their IDs</h3>
       <form method=\"post\" action=\"" . $SERVER["PHP_SELF"] . "\" id=\"parse-it\">
       <textarea cols=\"80\" rows=\"20\" name=\"toParse\">$data</textarea><br />
       <a href=\"#\" onclick=\"document.getElementById('parse-it').submit()\">Parse It</a>
       </form></center>";
       parseIt($data);
     }
     ?>