AtticusG3
New Member
- Joined
- Aug 27, 2011
- Messages
- 425
- Reaction score
- 11
Hi Guys,
I'm not very adept in the world of LUA or the WoW API in general, but I'm trying to write a macro to, as the thread title suggests, set my "Watched Faction" (IE the one that shows up as an XP Bar) given the Factions ID or name (Preff Faction ID)
Currently I can only work out how to set it by the Index
however this is going to be different on all of my toons, so I'd rather have it set it from the factions ID (IE 42 in my index is faction 369, gadgetzan)
I'm at a loss to work out how to do this, I can get the factions name given the index with GetFactionInfoByID() but how do I get the Index?
Basically I'm asking someone to write me a LUA script to do this. Or help me work through the logic at least. So i can implement it in my profile to display the relevant faction rep bar when grinding the faction out.
I'm not very adept in the world of LUA or the WoW API in general, but I'm trying to write a macro to, as the thread title suggests, set my "Watched Faction" (IE the one that shows up as an XP Bar) given the Factions ID or name (Preff Faction ID)
Currently I can only work out how to set it by the Index
Code:
/run SetWatchedFactionID(42)
I'm at a loss to work out how to do this, I can get the factions name given the index with GetFactionInfoByID() but how do I get the Index?
Basically I'm asking someone to write me a LUA script to do this. Or help me work through the logic at least. So i can implement it in my profile to display the relevant faction rep bar when grinding the faction out.