Jump to content

Interact with NPC - PickUp Quest if option is available


Apexx

Recommended Posts

I tried to search what is, "NpcMarkerId" and what it refers to. I am trying to figure out if a certain quest has become open and available based whether or not that player's reputation is high enough and the quest is available when interacting with the quest giver. I did not want to hijack an old thread so I made this one. Everything is working just fine, BUT it tried to pick up the second and third parts of the quests that are not yet available (because low rep) and will sit there for minutes before continuing.

I even set the Settings: Skip 'PickUp' quest after (sec) to 8 in hopes it would only try to pick it up for a shorter duration before moving on.

Thanks in advance!

Link to comment
Share on other sites

I managed to figure it out.

C# Code:

// Check if Player's reputation earned with a certain faction has reached above ### value
wManager.Wow.Helpers.Lua.LuaDoString<bool>(@"
    for factionIndex = 1, GetNumFactions() do
        local name, description, standingId, bottomValue, topValue, earnedValue, atWarWith, canToggleAtWar,
            isHeader, isCollapsed, hasRep, isWatched, isChild, factionID = GetFactionInfo(factionIndex)
        if name == ""FACTION NAME HERE"" and earnedValue > #### then
            return true
        end
    end
");

And inside the Quest Editor Tools (Optional Settings -> Can Conditions:

PoNe5s.png

return (wManager.Wow.Helpers.Lua.LuaDoString<bool>(@"for factionIndex = 1, GetNumFactions() do local name, description, standingId, bottomValue, topValue, earnedValue, atWarWith, canToggleAtWar, isHeader, isCollapsed, hasRep, isWatched, isChild, factionID = GetFactionInfo(factionIndex) if name == ""FACTION NAME HERE"" and earnedValue > #### then return true end end"));

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...