What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

BagSlot.CanUse returns True on EVERYTHING

Wheredidigo

Community Developer
Joined
Dec 15, 2013
Messages
417
Mastahg,

I'm trying to use BagSlot.CanUse to determine which Items in my bag I can actually use, like Potions or Food. Unfortunately, right now the CanUse function is returning True for everything as long as you're not doing another action that would prevent you from actually using anything.

Is there a way you can make CanUse only return True for items that actually useable?

Here is the code snippet to run in RebornConsole, and a sample output of what it returned:

As an Example of something I'd like fixed:

Name: Mole Meat ItemCategory: Ingredient ActionType: Item CanUse: True

Mole Meat is not something you can use, it's just an ingredient that you can use in crafting recipe's.


Code:
foreach (var item in ff14bot.Managers.InventoryManager.FilledSlots.Where(x => x.BagId == InventoryBagId.Bag1 || x.BagId == InventoryBagId.Bag2 || x.BagId == InventoryBagId.Bag3 || x.BagId == InventoryBagId.Bag4))
{
	Log("Name: " + item.Item.EnglishName + "\tItemCategory: " + item.Item.EquipmentCatagory + "\tActionType: " + item.ActionType + "\tCanUse: " + item.CanUse());
}

Code:
Name: Prickly Pineapple	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Seema	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Dzemael Tomato	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Assassin Betta	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Bone Crayfish	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Maple Syrup	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Chub	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Black Truffle	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Apricot	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Mole Meat	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Night Milk	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Ala Mhigan Fighting Fish	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Buffalo Sirloin	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Night Milk	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Night Milk	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Ala Mhigan Fighting Fish	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Malm Kelp	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Honey Lemon	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Sweet Cream	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Merlthor Goby	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Seema	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Rainbow Trout	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Bone Crayfish	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Silverfish	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Boltfish	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Antelope Shank	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Moat Carp	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Assassin Betta	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Wahoo	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Smooth Butter	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Prickly Pineapple	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Nutmeg	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Honey	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Thanalan Tea Leaves	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Gelatin	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Laurel	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Gelatin	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Thanalan Tea Leaves	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Midland Basil	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Dzemael Tomato	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Dark Sleeper	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Mugwort	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Kissing Trout	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Chicken Stock	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Marjoram	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Kukuru Butter	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Crimson Trout	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Kukuru Powder	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Gridanian Walnut	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Lavender Oil	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Almonds	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Cider Vinegar	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Maple Sugar	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Night Milk	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Maple Syrup	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Clove Oil	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Apkallu Egg	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Honey Lemon	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Sun Lemon	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Lowland Grapes	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Black Truffle	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Harbor Herring	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Crimson Trout	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Rainbow Trout	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Gudgeon	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Sea Cucumber	ItemCategory: Seafood	ActionType: Item	CanUse: True
Name: Rolanberry	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Rolanberry	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Prickly Pineapple	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Prickly Pineapple	ItemCategory: Ingredient	ActionType: Item	CanUse: True
Name: Prickly Pineapple	ItemCategory: Ingredient	ActionType: Item	CanUse: True


Thanks
 
CanUse functions as if the item was on a hotbar and whether or not it was grayed out and your current target is valid. Its not meant to be used as a filter.
 
Back
Top