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

How to use items/eat food

esk213

New Member
Joined
Jul 25, 2013
Messages
15
Reaction score
0
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.
 
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.
 
Back
Top