Forgive my nooby-ness, and thank you for telling me about the troubles with Linux. I have added my forwards to the makefile and committed the change. I also fixed the FindScavengeItem signature. If you would, please update everything and recompile and let me know if it works now.
Also, check out the .inc to see the two new forwards, if you're into that kinda thing.
EDIT:
L4D2_OnUseHealingItems is called when the bot is deciding if and who needs healed. The forward is sent out before the bots decides who to heal, so it cannot (yet?) tell you what action the bot wants to take (heal self, heal other, take pills/shot, give pills/shot). But it can be used to prevent a bot from even thinking about using healing items by returning Plugin_Handled.
L4D2_OnFindScavengeItem is called when a bot is deciding if and what to pick up. The forward is sent out after the bot has decided what to pick up, so item will contain the entity index of the item the bot wants to go grab. If the bot didn't find a weapon it wants to grab, item will be 0. If you don't want them grabbing that item (e.g. Coach has a magnum and he's trying to scavenge a weapon_pistol_spawn), you can return Plugin_Handled and the bot won't even think about grabbing the item. I *think* you can change item to be another entity index and return Plugin_Changed to make the bot go grab some other item but have not yet tested this yet so be prepared for a crash if you try Plugin_Changed...but I'm reasonably sure I figured out how to convert the entity index back into a pointer.
Notably, these forwards are called quite often - any time the bot is thinking about what to do. Contrary to popular opinion, bots do think a lot. If you want to use the forwards, I suggest PrintToChatAll the SourcePawn args and see how often and what's being called and when etc to see how you should use these new forwards. Notably, you could probably use L4D2_OnFindScavengeItem with Plugin_Changed to force bots to pick up any item you want, since it is typically called with item=0 because the bot already has all the items it wants. This will probably also work for items bots ignore, since this is called after they make their decision.
PHP Code:
/**
* @brief Called when SurvivorBot::UseHealingItems(Action<SurvivorBot> *) is invoked
* @remarks Causes bots to use or give healing items (except in safe room on non-expert)
*
* @param client the client that will decide whether to use healing items
*
* @noreturn Pl_Handled to block, Pl_Continue otherwise.
*/
forward Action:L4D2_OnUseHealingItems(client);
/**
* @brief Called after SurvivorBot::FindScavengeItem(Action<SurvivorBot> *) is invoked
* @remarks Indicates which item the Survivor Bot will attempt to pick up
*
* @param client the client that will try to pick something up
* @param item the item the client will try to pick up (null means no item)
*
* @noreturn Pl_Handled to block, Pl_Continue otherwise.
*/
forward Action:L4D2_OnFindScavengeItem(client, &item);
__________________