• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • How to use items/eat food

    Discussion in 'Wildbuddy Developers' started by esk213, Apr 4, 2015.

    1. esk213

      esk213 New Member

      Joined:
      Jul 25, 2013
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      1
      While grinding or generally fighting my bot (I'm currently using a low level warrior) keeps fighting until he dies. I know how to detect whether my HP is low or not but how can I tell my bot to use food to recover health?

      Also another thing I realized with my bot dying from time to time is: How can the bot bypass the 5 second cooldown until you can usually press the respawn button? Without the bot I always have to wait those 5 seconds after I died until I can respawn. Since the bot instantly respawns for some reason, couldn't this be a detectable behavior for Carbine? Just curious about that.
       
    2. Deathdisguise

      Deathdisguise Community Developer

      Joined:
      Mar 7, 2015
      Messages:
      678
      Likes Received:
      6
      Trophy Points:
      0
      Try this:

      Code:
      string itemName = "Potato Chips";
      
      InventoryItem item = GameManager.Inventory.Bags.Items.FirstOrDefault(o => o.Name == itemName);
      
      if (item != null && item.IsValid)
         item.Use();
      

      The bot just wraps the Lua as far as I know for the death handling, you could just as easily make an addon that auto-releases on death at the same speed (technically faster). So while it may aid in their attempts to track someone down, it wouldn't be a 100% catch.
       

    Share This Page