• Visit Rebornbuddy
  • Find out which collectable turn in is active.

    Discussion in 'Community Developer Forum' started by Neverdyne, May 28, 2019.

    1. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      I was wondering if anyone has figured out a way to know which masterpiece duty (collectable turn in set) is active, perhaps from the turn in window. The game database seems to organize the sets of items you can turn in as a "masterpiece duty", each set with a unique ID. I'm guessing the data saying which set is active isn't received by the client until they open the NPC window, but it would be nice to have an API call that checks that window and another that gives the time remaining on it. This information is the only thing stopping full automation of red and yellow script collection currently, which would help a lot for leveling and the daily crafter/gatherer routines.
       
    2. hkme

      hkme Member

      Joined:
      May 12, 2014
      Messages:
      197
      Likes Received:
      0
      Trophy Points:
      16
      Since I am farming the Irregular tomestones from squadron it consumes a lot of gc seals I went to revisit the supply and provisioning missions and spent some time to fully automated it.
      Then I remember reading this post earlier and took a look at the collectibles it looks quite similar to supply and provisioning missions,
      as in build 4221156, once you open the Rowena's House of Splendors window, the pointer is base + 1AE96C0, where the struct is 184 bytes, array size is 203 as i test it. It is from yellow to red, from fisher to carpenter.
      sample code for rebornconsole
      Code:
      ClearLog();
      var ptr = Core.Memory.ImageBase + 0x1AE96C0;
      for (var i=1; i<=204; i++)
      {
      var itemId = Core.Memory.Read<uint>(ptr);
      var job = Core.Memory.Read<ClassJobType>(ptr + 28);
      var starred = Core.Memory.Read<bool>(ptr + 5);
      Log("{0}, {1}, {2}, {3}", i, itemId, job, starred);
      ptr+= 184;
      }
      not sure if that's what you want.
       
    3. zzi

      zzi Active Member

      Joined:
      Mar 10, 2016
      Messages:
      308
      Likes Received:
      47
      Trophy Points:
      28
      Can we get more information or a ui screenshot so we can add this to rb? I am not familiar with masterpiece stuff
       
    4. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      One of the biggest daily grinds for crafters/gatherers is obtaining scripts. Right now I'm at a point where it does everything, except the user needs to enter which items are active at any moment.

      The masterpiece window can be accessed either through Timers => Rowena's House of Splendors, or by talking with the Collectable Appraiser NPC. Turning in items can only be done by talking to the NPC, but what really interests me is to get the information of which collectables are active right now through the Timers window, so it can be done anywhere. I believe the Timers window gets its information from the server upon you opening it.

      [​IMG]

      [​IMG]

      Once open, you can find the window using:
      Code:
      var window = RaptureAtkUnitManager.GetWindowByName("MasterPieceSupply");
      The "buttons" that I circled in red are tabs used to see the available collectables for each job. You can switch between them using:

      Code:
      window.SendAction(2, 1, 2, 1, jobIndex);
      
      switch (job)
                  {
                      case Job.Carpenter:
                          return 0;
                      case Job.Blacksmith:
                          return 1;
                      case Job.Armorer:
                          return 2;
                      case Job.Goldsmith:
                          return 3;
                      case Job.Leatherworker:
                          return 4;
                      case Job.Weaver:
                          return 5;
                      case Job.Alchemist:
                          return 6;
                      case Job.Culinarian:
                          return 7;
                      case Job.Miner:
                          return 8;
                      case Job.Botanist:
                          return 9;
                      case Job.Fisher:
                          return 10;
                      default:
                          return 0;
                  }
      
      However, what I can't figure out is how to read the items on the list. If you open the window through the NPC, once you're on the right tab, you can turn in items using:

      Code:
      window.SendAction(2, 0, 0, 1, index);
      The index value is obtained from game files (SaintCoinach). It's the key of the "MasterpieceDuty" row where that item is. If there was a way to read which items are active from the Timers window, it would be huge.
       
    5. nt153133

      nt153133 Member

      Joined:
      Nov 11, 2017
      Messages:
      68
      Likes Received:
      7
      Trophy Points:
      8
      Here, it's a bit late but i wrote a window reader for it that uses the window's elements. You can change classes and request a list of items or a dict with item,bool with the bool being if it's starred. I made a tiny botbase that demonstrates the use and will open the window from anywhere and print the list based on classes. I just hard coded 95 as the timer window interface since it's not really part of the window but it allows you to use AgentModule.ToggleAgentInterfaceById(95); to open timer UI and then
      RaptureAtkUnitManager.GetWindowByName("ContentsInfo").SendAction(2,3,0xC,3,6); to open the rowena interface.

      https://github.com/nt153133/MasterPieceSupply

      You can use this (with timer window open) to find out the agentID if it changes or if CN uses a different one. They tend to only change when whole new interface is added.

      Code:
      var windowName = "ContentsInfo";
      AtkAddonControl windowByName = RaptureAtkUnitManager.GetWindowByName(windowName);
      
      if(windowByName != null)
      {
          var test = windowByName.TryFindAgentInterface();
      
          for (int i = 0; i < AgentModule.AgentPointers.Count; i++)
          {
              if (test.Pointer.ToInt64() == AgentModule.AgentPointers.ToArray()[i].ToInt64())
                  Log("Agent Interface ID is: " + i);
          }
      }
      -Kayla D'orden
       

    Share This Page