What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

[FR] Pickup items only if its qty is larger than specified

tbdf

New Member
Joined
Jan 19, 2016
Messages
28
Reaction score
2
@jubisman

Is it possible that Trinity can support [STACKQTY] tag (ItemStackQuantity) in pickup.dis,
so we can pick up these items only if its quantity is larger than specified.

e.g.,
Code:
-- Crafting Materials
[BASETYPE] == "Misc" && [NAME] == "幽隱水晶" && [STACKQTY] < 2 -> [IGNORE]
[BASETYPE] == "Misc" && [NAME] == "魔塵" && [STACKQTY] < 2 -> [IGNORE]
[BASETYPE] == "Misc" && [NAME] == "萬用材料" && [STACKQTY] < 2 -> [IGNORE]

[BASETYPE] == "Gem" && [NAME] == "尊爵紅寶石" && [STACKQTY] < 2 -> [IGNORE]
[BASETYPE] == "Gem" && [NAME] == "尊爵綠寶石" && [STACKQTY] < 2 -> [IGNORE]
[BASETYPE] == "Gem" && [NAME] == "尊爵黃寶石" && [STACKQTY] < 2 -> [IGNORE]

possible impl.
Code:
Index: Cache/PickupItem.cs
===================================================================
--- Cache/PickupItem.cs	(revision 365)
+++ Cache/PickupItem.cs	(working copy)
@@ -28,6 +28,7 @@
         public float UpgradeDamage { get; set; }
         public float UpgradeToughness { get; set; }
         public float UpgradeHealing { get; set; }
+        public long ItemStackQuantity { get; set; }  
         public int WorldId { get; set; }
 
         public PickupItem() { }
Index: Cache/RefreshItem.cs
===================================================================
--- Cache/RefreshItem.cs	(revision 365)
+++ Cache/RefreshItem.cs	(working copy)
@@ -140,6 +140,7 @@
                     ActorSNO = CurrentCacheObject.ActorSNO,
                     ACDGuid = CurrentCacheObject.ACDGuid,
                     RActorGUID = CurrentCacheObject.RActorGuid,
+                    ItemStackQuantity = diaItem.CommonData.ItemStackQuantity
                 };
 
                 // Treat all globes as a yes
Index: ItemRules/Interpreter.cs
===================================================================
--- ItemRules/Interpreter.cs	(revision 365)
+++ ItemRules/Interpreter.cs	(working copy)
@@ -755,6 +755,9 @@
             // - QUALITY -------------------------------------------------------//
             itemDic.Add("[QUALITY]", Regex.Replace(item.Quality.ToString(), @"[\d-]", string.Empty));
             itemDic.Add("[D3QUALITY]", item.Quality.ToString());
+            
+            // - ItemStackQuantity -------------------------------------------------------//
+            itemDic.Add("[STACKQTY]", (float)item.ItemStackQuantity);
 
             // - ROLL ----------------------------------------------------------//
             float roll;
 
Hey,

I have never used ItemRules, so I don't really know how it works. I could look into it, but why don't you give ItemList a try? Do you have some sort of problem with it?
 
i have tried, but UI is not easy to configure
as a Programer, notepad++ is much easier :)
 
Back
Top