About:- After several different methods and attempts over the years, finally here is one that works, might possibly break on game updates.
- Provides 2 cvars to control the health at which bots should attempt to heal with first aid or pills/adrenaline.
- Provides 2 cvars to determine if healing is only allowed when black and white with first aid or pills/adrenaline.
Thanks:- Psyk0tik - Looking through the code.
- Forgetest - Helping with version 2.0.
- Dragokas - Testing on L4D1 linux.
- Toranks - Asking for the plugin.
CVars:
Saved to
l4d_bot_healing.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// 0=Ignored. 1=Only allowing healing when self or target is black and white (Requires "Actions" extension).
l4d_bot_healing_die_first "0"
// 0=Ignored. 1=Only allowing healing or giving pills when self or target is black and white (Requires "Actions" extension).
l4d_bot_healing_die_pills "0"
// Allow bots to use First Aid when their health is below this value.
l4d_bot_healing_first "30.0"
// Allow bots to use Pills or Adrenaline when their health is below this value.
l4d_bot_healing_pills "50.0"
// Bot Healing Values plugin version.
l4d_bot_healing_version
Changes:
Code:
2.3 (07-Nov-2023)
- Fixed not deleting 1 handle on plugin start.
2.2 (25-May-2023)
- Fixed invalid client errors. Thanks to "Mystik Spiral" for reporting and "BHaType" for information.
- Client could be 0 but hooking would still be valid, so removing team check works fine and is valid.
2.1 (20-Aug-2022)
- Fixed the plugin not working on L4D2 Linux. GameData file has been updated.
- Optimized the "Actions" part of the plugin.
2.0 (19-Aug-2022)
- Changed the patching method to prevent crashes.
- Now requires "SourceScramble" extension or "Actions" extension.
- GameData is not requires when only use the "Actions" extension.
- Optionally uses the "Actions" extension to prevent healing until black and white.
- Plugin is compatible with the "Heartbeat (Revive Fix - Post Revive Options)" plugin.
- Thanks to "Forgetest" for helping and testing.
- Thanks to "HarryPotter" and "Toranks" for testing.
1.0 (01-Aug-2022)
- Initial release.
Requirements:- Recommended: Source Scramble extension (while Actions extension can handle this plugins features, this plugin is more optimized to use Source Scramble to patch the health value at which bots should heal).
- Optional: Actions extension (used to require bots to only heal when black and white, on their last strike).
Compiling:
Installation:DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires 2 include files!
- Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
- Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.
Updating from 1.0:- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.