• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • QuestIds of Target

    Discussion in 'Wildbuddy Developers' started by satbuster, Nov 3, 2015.

    1. satbuster

      satbuster Member

      Joined:
      Dec 19, 2014
      Messages:
      93
      Likes Received:
      0
      Trophy Points:
      6
      Hi,

      I'm trying to dump out quests offered by a NPC that is being targeted by player. Has anyone been able to extract IDs? As simple check to see if a NPC has any quests seems to always return false.

      Code:
      Actor me = GameManager.LocalPlayer;
      if (me != null) {
        Actor target = me.CurrentTarget;
        if (target != null) {
          Log.Info("Target.IsQuestGiving=" + target.IsQuestGiving);
          Log.Info("Target.IsQuestReceiving=" + target.IsQuestReceiving);
      ...
      ...
      

      -SB-
       
    2. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      The info you're looking at is kinda convoluted. They have multiple activation states for quests.

      Code:
              private bool IsQuestGiver(Actor actor)
              {
                  var a = new HashSet<ActivationType>(actor.ActivationTypes);
      
      
                  return a.Contains(ActivationType.QuestNew) ||
                         a.Contains(ActivationType.QuestNewMain) ||
                         a.Contains(ActivationType.QuestNewMain2) ||
                         a.Contains(ActivationType.QuestNewMain3);
              }
      
      
              private bool IsQuestTurnIn(Actor actor)
              {
                  var a = new HashSet<ActivationType>(actor.ActivationTypes);
      
      
                  return a.Contains(ActivationType.QuestReward);
              }
      
      To find out which quests the NPC actually offers, or receives, you need to talk to it. The data available in the client is usually wrong, or missing. It's quite unreliable. (The info is sent from the server)
       
      Last edited: Nov 3, 2015
    3. satbuster

      satbuster Member

      Joined:
      Dec 19, 2014
      Messages:
      93
      Likes Received:
      0
      Trophy Points:
      6
      Thanks. That should give me something to play around with.
       

    Share This Page