Jump to content
  • Adding ObjectManager.Me.GetFactionStanding("") to wrobot.


    Sye24
    • Version: All Product: WRobot General Type: Suggestion Status: Not Added
     Share

    hello @Droidz i was wondering if you could add this function to wrobot, for those who wish to check player Reputation. Should be easy to add. Here is the code i made for it. 

     

    Code : 

    public enum FactionStandingRank
            {
                Unknown = 0,
                Hated = 1,
                Hostile = 2,
                Unfriendly = 3,
                Neutral = 4,
                Friendly = 5,
                Honored = 6,
                Revered = 7,
                Exalted = 8
            }
    
            public static FactionStandingRank GetFactionStanding(this WoWLocalPlayer player, String FactionName)
            {
                Int32 results = 0; 
                try
                {
                    var Faction = @"for f = 1, GetNumFactions() do
                                        local GetFaction = {GetFactionInfo(f)}
                                        if GetFaction[1] == Name then
                                            if GetFaction[11] then 
                                                return GetFaction[3];
                                            end
                                        end
                                    end";
                    results = Lua.LuaDoString<Int32>(Faction.Replace("Name", FactionName.Replace("'", "\'")));
                }
                catch(Exception ex)
                {
                    Logging.Write("Error : " + ex);
                    results = 0;
                }
                return (FactionStandingRank)results;
            }

     


     Share


    User Feedback

    Recommended Comments



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...