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!

Using Items?

kagamihiiragi17

Community Developer
Joined
Jun 24, 2014
Messages
873
How to use items/access inventory

Is there a good way to use items in RebornBuddy? Ideally I'd like to modify the combat routines to apply a food buff if you won't have one and to pop potions if you fall below ~10% HP/MP, depending on the class. I've tried some things in the Reborn Console, but I can't tell how well my code works in there. Thanks!

EDIT: I figured it out, I trying to use Managers.Bag.Slots instead of Managers.InventoryManager.Slots, which wasn't working. Oops!

If anyone else has problems accessing the inventory or using items, here is some example code as rudimentary documentation:

Code:
string foodname = "Marmot Steak";
foreach (BagSlot a in InventoryManager.Slots)
{
     if (a.Name == foodname)
     {
          a.UseItem();
     }
}
 
Last edited:
Back
Top