• Visit Rebornbuddy
  • unid

    Discussion in 'Trinity' started by alex189, Dec 28, 2013.

    1. alex189

      alex189 New Member

      Joined:
      Aug 29, 2012
      Messages:
      45
      Likes Received:
      0
      Trophy Points:
      0
      Hi I did some research to find any possible way one would be able to store UNID ( not that this has anything to trinity to do at this moment as it's not implemented into trinity )
      and found that it seems ( if I'm not wrong ) CreateVendorBehavior() is the function used on town runs.

      ( Here's some string, I'm not gonna post the whole decompiled code since I dont know if it's allowed by mods or not )
      string ( NAME REMOVED ) = "IdentifyItems";
      string( NAME REMOVED ) = "Runs logic to identify rare and legendary items.";

      It's being decleared sometime before this comes along down the road
      ( CODE REMOVED )("StashItems", "Runs logic to stash items", ( CODE REMOVED ));
      ( CODE REMOVED )("SellAndRepair", "Runs logic to sell, and repair items.",( CODE REMOVED ));
      ( CODE REMOVED )("SalvageItems", "Runs logic to salvage items", ( CODE REMOVED ));

      My guess is that because there's so much code between this 2 parts it's more than likely the cain's book part is there,
      and was wondering if you could hook it, making a simple rutine for stashing 1 item and place that inside your hook function
      just to verify if I'm correct or not.

      Zeta.CommonBot.Logic

      public static Composite CreateLootBehavior()

      In the same area there is a bool that is set if they've started a townrun.

      It get's checked here:
      public static bool VendorRunStartedInTown

      tip: I found this as well if you wanna make a random vendor rutine:
      private static Vector3 VendorLoc
      {
      get
      {
      Act currentAct = ZetaDia.CurrentAct;
      if (currentAct <= Act.A2)
      {
      if (currentAct == Act.A1)
      {
      return new Vector3(2899.064f, 2784.804f, 24.04532f);
      }
      if (currentAct == Act.A2)
      {
      return new Vector3(334.446f, 139.0122f, -16.39508f);
      }
      }
      else
      {
      if (currentAct == Act.A3 || currentAct == Act.A4)
      {
      return new Vector3(447.8373f, 324.1446f, 0.1000005f);
      }
      }
      throw new ArgumentException();
      }
      }

      Regards, db user


      **EDIT**:

      Found where one should look:
      public static CharacterSettings Instance
      {
      get
      {
      CharacterSettings arg_14_0;
      if ((arg_14_0 = CharacterSettings.characterSettings_0) == null)
      {
      arg_14_0 = (CharacterSettings.characterSettings_0 = new CharacterSettings());
      }
      return arg_14_0;
      }
      }
      This way you can put your own loot rutine before the book of cain get's called

      Btw. that arg_14_0 is just a call to another structure to this function:
      public bool UseBookOfCain
      {
      get
      {
      return this.bool_4;
      }
      set
      {
      this.bool_4 = value;
      this.OnPropertyChanged("UseBookOfCain");
      }
      }
       

    Share This Page